{-# 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.SecurityHub.Types.AwsS3ObjectDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AwsS3ObjectDetails = AwsS3ObjectDetails'
{
AwsS3ObjectDetails -> Maybe Text
eTag :: Prelude.Maybe Prelude.Text,
AwsS3ObjectDetails -> Maybe Text
versionId :: Prelude.Maybe Prelude.Text,
AwsS3ObjectDetails -> Maybe Text
sSEKMSKeyId :: Prelude.Maybe Prelude.Text,
AwsS3ObjectDetails -> Maybe Text
lastModified :: Prelude.Maybe Prelude.Text,
AwsS3ObjectDetails -> Maybe Text
serverSideEncryption :: Prelude.Maybe Prelude.Text,
AwsS3ObjectDetails -> Maybe Text
contentType :: Prelude.Maybe Prelude.Text
}
deriving (AwsS3ObjectDetails -> AwsS3ObjectDetails -> Bool
(AwsS3ObjectDetails -> AwsS3ObjectDetails -> Bool)
-> (AwsS3ObjectDetails -> AwsS3ObjectDetails -> Bool)
-> Eq AwsS3ObjectDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsS3ObjectDetails -> AwsS3ObjectDetails -> Bool
$c/= :: AwsS3ObjectDetails -> AwsS3ObjectDetails -> Bool
== :: AwsS3ObjectDetails -> AwsS3ObjectDetails -> Bool
$c== :: AwsS3ObjectDetails -> AwsS3ObjectDetails -> Bool
Prelude.Eq, ReadPrec [AwsS3ObjectDetails]
ReadPrec AwsS3ObjectDetails
Int -> ReadS AwsS3ObjectDetails
ReadS [AwsS3ObjectDetails]
(Int -> ReadS AwsS3ObjectDetails)
-> ReadS [AwsS3ObjectDetails]
-> ReadPrec AwsS3ObjectDetails
-> ReadPrec [AwsS3ObjectDetails]
-> Read AwsS3ObjectDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsS3ObjectDetails]
$creadListPrec :: ReadPrec [AwsS3ObjectDetails]
readPrec :: ReadPrec AwsS3ObjectDetails
$creadPrec :: ReadPrec AwsS3ObjectDetails
readList :: ReadS [AwsS3ObjectDetails]
$creadList :: ReadS [AwsS3ObjectDetails]
readsPrec :: Int -> ReadS AwsS3ObjectDetails
$creadsPrec :: Int -> ReadS AwsS3ObjectDetails
Prelude.Read, Int -> AwsS3ObjectDetails -> ShowS
[AwsS3ObjectDetails] -> ShowS
AwsS3ObjectDetails -> String
(Int -> AwsS3ObjectDetails -> ShowS)
-> (AwsS3ObjectDetails -> String)
-> ([AwsS3ObjectDetails] -> ShowS)
-> Show AwsS3ObjectDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsS3ObjectDetails] -> ShowS
$cshowList :: [AwsS3ObjectDetails] -> ShowS
show :: AwsS3ObjectDetails -> String
$cshow :: AwsS3ObjectDetails -> String
showsPrec :: Int -> AwsS3ObjectDetails -> ShowS
$cshowsPrec :: Int -> AwsS3ObjectDetails -> ShowS
Prelude.Show, (forall x. AwsS3ObjectDetails -> Rep AwsS3ObjectDetails x)
-> (forall x. Rep AwsS3ObjectDetails x -> AwsS3ObjectDetails)
-> Generic AwsS3ObjectDetails
forall x. Rep AwsS3ObjectDetails x -> AwsS3ObjectDetails
forall x. AwsS3ObjectDetails -> Rep AwsS3ObjectDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AwsS3ObjectDetails x -> AwsS3ObjectDetails
$cfrom :: forall x. AwsS3ObjectDetails -> Rep AwsS3ObjectDetails x
Prelude.Generic)
newAwsS3ObjectDetails ::
AwsS3ObjectDetails
newAwsS3ObjectDetails :: AwsS3ObjectDetails
newAwsS3ObjectDetails =
AwsS3ObjectDetails' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AwsS3ObjectDetails
AwsS3ObjectDetails'
{ $sel:eTag:AwsS3ObjectDetails' :: Maybe Text
eTag = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:versionId:AwsS3ObjectDetails' :: Maybe Text
versionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sSEKMSKeyId:AwsS3ObjectDetails' :: Maybe Text
sSEKMSKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastModified:AwsS3ObjectDetails' :: Maybe Text
lastModified = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:serverSideEncryption:AwsS3ObjectDetails' :: Maybe Text
serverSideEncryption = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:contentType:AwsS3ObjectDetails' :: Maybe Text
contentType = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
awsS3ObjectDetails_eTag :: Lens.Lens' AwsS3ObjectDetails (Prelude.Maybe Prelude.Text)
awsS3ObjectDetails_eTag :: (Maybe Text -> f (Maybe Text))
-> AwsS3ObjectDetails -> f AwsS3ObjectDetails
awsS3ObjectDetails_eTag = (AwsS3ObjectDetails -> Maybe Text)
-> (AwsS3ObjectDetails -> Maybe Text -> AwsS3ObjectDetails)
-> Lens
AwsS3ObjectDetails AwsS3ObjectDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsS3ObjectDetails' {Maybe Text
eTag :: Maybe Text
$sel:eTag:AwsS3ObjectDetails' :: AwsS3ObjectDetails -> Maybe Text
eTag} -> Maybe Text
eTag) (\s :: AwsS3ObjectDetails
s@AwsS3ObjectDetails' {} Maybe Text
a -> AwsS3ObjectDetails
s {$sel:eTag:AwsS3ObjectDetails' :: Maybe Text
eTag = Maybe Text
a} :: AwsS3ObjectDetails)
awsS3ObjectDetails_versionId :: Lens.Lens' AwsS3ObjectDetails (Prelude.Maybe Prelude.Text)
awsS3ObjectDetails_versionId :: (Maybe Text -> f (Maybe Text))
-> AwsS3ObjectDetails -> f AwsS3ObjectDetails
awsS3ObjectDetails_versionId = (AwsS3ObjectDetails -> Maybe Text)
-> (AwsS3ObjectDetails -> Maybe Text -> AwsS3ObjectDetails)
-> Lens
AwsS3ObjectDetails AwsS3ObjectDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsS3ObjectDetails' {Maybe Text
versionId :: Maybe Text
$sel:versionId:AwsS3ObjectDetails' :: AwsS3ObjectDetails -> Maybe Text
versionId} -> Maybe Text
versionId) (\s :: AwsS3ObjectDetails
s@AwsS3ObjectDetails' {} Maybe Text
a -> AwsS3ObjectDetails
s {$sel:versionId:AwsS3ObjectDetails' :: Maybe Text
versionId = Maybe Text
a} :: AwsS3ObjectDetails)
awsS3ObjectDetails_sSEKMSKeyId :: Lens.Lens' AwsS3ObjectDetails (Prelude.Maybe Prelude.Text)
awsS3ObjectDetails_sSEKMSKeyId :: (Maybe Text -> f (Maybe Text))
-> AwsS3ObjectDetails -> f AwsS3ObjectDetails
awsS3ObjectDetails_sSEKMSKeyId = (AwsS3ObjectDetails -> Maybe Text)
-> (AwsS3ObjectDetails -> Maybe Text -> AwsS3ObjectDetails)
-> Lens
AwsS3ObjectDetails AwsS3ObjectDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsS3ObjectDetails' {Maybe Text
sSEKMSKeyId :: Maybe Text
$sel:sSEKMSKeyId:AwsS3ObjectDetails' :: AwsS3ObjectDetails -> Maybe Text
sSEKMSKeyId} -> Maybe Text
sSEKMSKeyId) (\s :: AwsS3ObjectDetails
s@AwsS3ObjectDetails' {} Maybe Text
a -> AwsS3ObjectDetails
s {$sel:sSEKMSKeyId:AwsS3ObjectDetails' :: Maybe Text
sSEKMSKeyId = Maybe Text
a} :: AwsS3ObjectDetails)
awsS3ObjectDetails_lastModified :: Lens.Lens' AwsS3ObjectDetails (Prelude.Maybe Prelude.Text)
awsS3ObjectDetails_lastModified :: (Maybe Text -> f (Maybe Text))
-> AwsS3ObjectDetails -> f AwsS3ObjectDetails
awsS3ObjectDetails_lastModified = (AwsS3ObjectDetails -> Maybe Text)
-> (AwsS3ObjectDetails -> Maybe Text -> AwsS3ObjectDetails)
-> Lens
AwsS3ObjectDetails AwsS3ObjectDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsS3ObjectDetails' {Maybe Text
lastModified :: Maybe Text
$sel:lastModified:AwsS3ObjectDetails' :: AwsS3ObjectDetails -> Maybe Text
lastModified} -> Maybe Text
lastModified) (\s :: AwsS3ObjectDetails
s@AwsS3ObjectDetails' {} Maybe Text
a -> AwsS3ObjectDetails
s {$sel:lastModified:AwsS3ObjectDetails' :: Maybe Text
lastModified = Maybe Text
a} :: AwsS3ObjectDetails)
awsS3ObjectDetails_serverSideEncryption :: Lens.Lens' AwsS3ObjectDetails (Prelude.Maybe Prelude.Text)
awsS3ObjectDetails_serverSideEncryption :: (Maybe Text -> f (Maybe Text))
-> AwsS3ObjectDetails -> f AwsS3ObjectDetails
awsS3ObjectDetails_serverSideEncryption = (AwsS3ObjectDetails -> Maybe Text)
-> (AwsS3ObjectDetails -> Maybe Text -> AwsS3ObjectDetails)
-> Lens
AwsS3ObjectDetails AwsS3ObjectDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsS3ObjectDetails' {Maybe Text
serverSideEncryption :: Maybe Text
$sel:serverSideEncryption:AwsS3ObjectDetails' :: AwsS3ObjectDetails -> Maybe Text
serverSideEncryption} -> Maybe Text
serverSideEncryption) (\s :: AwsS3ObjectDetails
s@AwsS3ObjectDetails' {} Maybe Text
a -> AwsS3ObjectDetails
s {$sel:serverSideEncryption:AwsS3ObjectDetails' :: Maybe Text
serverSideEncryption = Maybe Text
a} :: AwsS3ObjectDetails)
awsS3ObjectDetails_contentType :: Lens.Lens' AwsS3ObjectDetails (Prelude.Maybe Prelude.Text)
awsS3ObjectDetails_contentType :: (Maybe Text -> f (Maybe Text))
-> AwsS3ObjectDetails -> f AwsS3ObjectDetails
awsS3ObjectDetails_contentType = (AwsS3ObjectDetails -> Maybe Text)
-> (AwsS3ObjectDetails -> Maybe Text -> AwsS3ObjectDetails)
-> Lens
AwsS3ObjectDetails AwsS3ObjectDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsS3ObjectDetails' {Maybe Text
contentType :: Maybe Text
$sel:contentType:AwsS3ObjectDetails' :: AwsS3ObjectDetails -> Maybe Text
contentType} -> Maybe Text
contentType) (\s :: AwsS3ObjectDetails
s@AwsS3ObjectDetails' {} Maybe Text
a -> AwsS3ObjectDetails
s {$sel:contentType:AwsS3ObjectDetails' :: Maybe Text
contentType = Maybe Text
a} :: AwsS3ObjectDetails)
instance Core.FromJSON AwsS3ObjectDetails where
parseJSON :: Value -> Parser AwsS3ObjectDetails
parseJSON =
String
-> (Object -> Parser AwsS3ObjectDetails)
-> Value
-> Parser AwsS3ObjectDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsS3ObjectDetails"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AwsS3ObjectDetails
AwsS3ObjectDetails'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AwsS3ObjectDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AwsS3ObjectDetails)
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
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AwsS3ObjectDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> AwsS3ObjectDetails)
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
"VersionId")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> AwsS3ObjectDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> AwsS3ObjectDetails)
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
"SSEKMSKeyId")
Parser
(Maybe Text -> Maybe Text -> Maybe Text -> AwsS3ObjectDetails)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> AwsS3ObjectDetails)
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
"LastModified")
Parser (Maybe Text -> Maybe Text -> AwsS3ObjectDetails)
-> Parser (Maybe Text) -> Parser (Maybe Text -> AwsS3ObjectDetails)
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
"ServerSideEncryption")
Parser (Maybe Text -> AwsS3ObjectDetails)
-> Parser (Maybe Text) -> Parser AwsS3ObjectDetails
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
"ContentType")
)
instance Prelude.Hashable AwsS3ObjectDetails
instance Prelude.NFData AwsS3ObjectDetails
instance Core.ToJSON AwsS3ObjectDetails where
toJSON :: AwsS3ObjectDetails -> Value
toJSON AwsS3ObjectDetails' {Maybe Text
contentType :: Maybe Text
serverSideEncryption :: Maybe Text
lastModified :: Maybe Text
sSEKMSKeyId :: Maybe Text
versionId :: Maybe Text
eTag :: Maybe Text
$sel:contentType:AwsS3ObjectDetails' :: AwsS3ObjectDetails -> Maybe Text
$sel:serverSideEncryption:AwsS3ObjectDetails' :: AwsS3ObjectDetails -> Maybe Text
$sel:lastModified:AwsS3ObjectDetails' :: AwsS3ObjectDetails -> Maybe Text
$sel:sSEKMSKeyId:AwsS3ObjectDetails' :: AwsS3ObjectDetails -> Maybe Text
$sel:versionId:AwsS3ObjectDetails' :: AwsS3ObjectDetails -> Maybe Text
$sel:eTag:AwsS3ObjectDetails' :: AwsS3ObjectDetails -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ETag" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
eTag,
(Text
"VersionId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
versionId,
(Text
"SSEKMSKeyId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
sSEKMSKeyId,
(Text
"LastModified" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
lastModified,
(Text
"ServerSideEncryption" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
serverSideEncryption,
(Text
"ContentType" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
contentType
]
)