{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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. 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'
{ $sel:etag:S3KeyOutput' :: Maybe Text
etag = forall a. Maybe a
Prelude.Nothing,
$sel:s3Key:S3KeyOutput' :: Maybe Text
s3Key = forall a. Maybe a
Prelude.Nothing
}
s3KeyOutput_etag :: Lens.Lens' S3KeyOutput (Prelude.Maybe Prelude.Text)
s3KeyOutput_etag :: Lens' S3KeyOutput (Maybe Text)
s3KeyOutput_etag = 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 :: Lens' S3KeyOutput (Maybe Text)
s3KeyOutput_s3Key = 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 Data.FromJSON S3KeyOutput where
parseJSON :: Value -> Parser S3KeyOutput
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"S3KeyOutput"
( \Object
x ->
Maybe Text -> Maybe Text -> S3KeyOutput
S3KeyOutput'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"etag")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"s3Key")
)
instance Prelude.Hashable S3KeyOutput where
hashWithSalt :: Int -> S3KeyOutput -> Int
hashWithSalt Int
_salt S3KeyOutput' {Maybe Text
s3Key :: Maybe Text
etag :: Maybe Text
$sel:s3Key:S3KeyOutput' :: S3KeyOutput -> Maybe Text
$sel:etag:S3KeyOutput' :: S3KeyOutput -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
etag
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
s3Key
instance Prelude.NFData S3KeyOutput where
rnf :: S3KeyOutput -> ()
rnf S3KeyOutput' {Maybe Text
s3Key :: Maybe Text
etag :: Maybe Text
$sel:s3Key:S3KeyOutput' :: S3KeyOutput -> Maybe Text
$sel:etag:S3KeyOutput' :: S3KeyOutput -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
etag seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
s3Key