{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.RobOMaker.Types.S3KeyOutput where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data S3KeyOutput = S3KeyOutput'
{
S3KeyOutput -> Maybe Text
etag :: Prelude.Maybe Prelude.Text,
S3KeyOutput -> Maybe Text
s3Key :: Prelude.Maybe Prelude.Text
}
deriving (S3KeyOutput -> S3KeyOutput -> Bool
(S3KeyOutput -> S3KeyOutput -> Bool)
-> (S3KeyOutput -> S3KeyOutput -> Bool) -> Eq S3KeyOutput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: S3KeyOutput -> S3KeyOutput -> Bool
$c/= :: S3KeyOutput -> S3KeyOutput -> Bool
== :: S3KeyOutput -> S3KeyOutput -> Bool
$c== :: S3KeyOutput -> S3KeyOutput -> Bool
Prelude.Eq, ReadPrec [S3KeyOutput]
ReadPrec S3KeyOutput
Int -> ReadS S3KeyOutput
ReadS [S3KeyOutput]
(Int -> ReadS S3KeyOutput)
-> ReadS [S3KeyOutput]
-> ReadPrec S3KeyOutput
-> ReadPrec [S3KeyOutput]
-> Read S3KeyOutput
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [S3KeyOutput]
$creadListPrec :: ReadPrec [S3KeyOutput]
readPrec :: ReadPrec S3KeyOutput
$creadPrec :: ReadPrec S3KeyOutput
readList :: ReadS [S3KeyOutput]
$creadList :: ReadS [S3KeyOutput]
readsPrec :: Int -> ReadS S3KeyOutput
$creadsPrec :: Int -> ReadS S3KeyOutput
Prelude.Read, Int -> S3KeyOutput -> ShowS
[S3KeyOutput] -> ShowS
S3KeyOutput -> String
(Int -> S3KeyOutput -> ShowS)
-> (S3KeyOutput -> String)
-> ([S3KeyOutput] -> ShowS)
-> Show S3KeyOutput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [S3KeyOutput] -> ShowS
$cshowList :: [S3KeyOutput] -> ShowS
show :: S3KeyOutput -> String
$cshow :: S3KeyOutput -> String
showsPrec :: Int -> S3KeyOutput -> ShowS
$cshowsPrec :: Int -> S3KeyOutput -> ShowS
Prelude.Show, (forall x. S3KeyOutput -> Rep S3KeyOutput x)
-> (forall x. Rep S3KeyOutput x -> S3KeyOutput)
-> Generic S3KeyOutput
forall x. Rep S3KeyOutput x -> S3KeyOutput
forall x. S3KeyOutput -> Rep S3KeyOutput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep S3KeyOutput x -> S3KeyOutput
$cfrom :: forall x. S3KeyOutput -> Rep S3KeyOutput x
Prelude.Generic)
newS3KeyOutput ::
S3KeyOutput
newS3KeyOutput :: S3KeyOutput
newS3KeyOutput =
S3KeyOutput' :: Maybe Text -> Maybe Text -> S3KeyOutput
S3KeyOutput'
{ $sel:etag:S3KeyOutput' :: Maybe Text
etag = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:s3Key:S3KeyOutput' :: Maybe Text
s3Key = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
s3KeyOutput_etag :: Lens.Lens' S3KeyOutput (Prelude.Maybe Prelude.Text)
s3KeyOutput_etag :: (Maybe Text -> f (Maybe Text)) -> S3KeyOutput -> f S3KeyOutput
s3KeyOutput_etag = (S3KeyOutput -> Maybe Text)
-> (S3KeyOutput -> Maybe Text -> S3KeyOutput)
-> Lens S3KeyOutput S3KeyOutput (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3KeyOutput' {Maybe Text
etag :: Maybe Text
$sel:etag:S3KeyOutput' :: S3KeyOutput -> Maybe Text
etag} -> Maybe Text
etag) (\s :: S3KeyOutput
s@S3KeyOutput' {} Maybe Text
a -> S3KeyOutput
s {$sel:etag:S3KeyOutput' :: Maybe Text
etag = Maybe Text
a} :: S3KeyOutput)
s3KeyOutput_s3Key :: Lens.Lens' S3KeyOutput (Prelude.Maybe Prelude.Text)
s3KeyOutput_s3Key :: (Maybe Text -> f (Maybe Text)) -> S3KeyOutput -> f S3KeyOutput
s3KeyOutput_s3Key = (S3KeyOutput -> Maybe Text)
-> (S3KeyOutput -> Maybe Text -> S3KeyOutput)
-> Lens S3KeyOutput S3KeyOutput (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3KeyOutput' {Maybe Text
s3Key :: Maybe Text
$sel:s3Key:S3KeyOutput' :: S3KeyOutput -> Maybe Text
s3Key} -> Maybe Text
s3Key) (\s :: S3KeyOutput
s@S3KeyOutput' {} Maybe Text
a -> S3KeyOutput
s {$sel:s3Key:S3KeyOutput' :: Maybe Text
s3Key = Maybe Text
a} :: S3KeyOutput)
instance Core.FromJSON S3KeyOutput where
parseJSON :: Value -> Parser S3KeyOutput
parseJSON =
String
-> (Object -> Parser S3KeyOutput) -> Value -> Parser S3KeyOutput
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"S3KeyOutput"
( \Object
x ->
Maybe Text -> Maybe Text -> S3KeyOutput
S3KeyOutput'
(Maybe Text -> Maybe Text -> S3KeyOutput)
-> Parser (Maybe Text) -> Parser (Maybe Text -> S3KeyOutput)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"etag") Parser (Maybe Text -> S3KeyOutput)
-> Parser (Maybe Text) -> Parser S3KeyOutput
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"s3Key")
)
instance Prelude.Hashable S3KeyOutput
instance Prelude.NFData S3KeyOutput