{-# 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.AwsCloudFrontDistributionOriginS3OriginConfig where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AwsCloudFrontDistributionOriginS3OriginConfig = AwsCloudFrontDistributionOriginS3OriginConfig'
{
AwsCloudFrontDistributionOriginS3OriginConfig -> Maybe Text
originAccessIdentity :: Prelude.Maybe Prelude.Text
}
deriving (AwsCloudFrontDistributionOriginS3OriginConfig
-> AwsCloudFrontDistributionOriginS3OriginConfig -> Bool
(AwsCloudFrontDistributionOriginS3OriginConfig
-> AwsCloudFrontDistributionOriginS3OriginConfig -> Bool)
-> (AwsCloudFrontDistributionOriginS3OriginConfig
-> AwsCloudFrontDistributionOriginS3OriginConfig -> Bool)
-> Eq AwsCloudFrontDistributionOriginS3OriginConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsCloudFrontDistributionOriginS3OriginConfig
-> AwsCloudFrontDistributionOriginS3OriginConfig -> Bool
$c/= :: AwsCloudFrontDistributionOriginS3OriginConfig
-> AwsCloudFrontDistributionOriginS3OriginConfig -> Bool
== :: AwsCloudFrontDistributionOriginS3OriginConfig
-> AwsCloudFrontDistributionOriginS3OriginConfig -> Bool
$c== :: AwsCloudFrontDistributionOriginS3OriginConfig
-> AwsCloudFrontDistributionOriginS3OriginConfig -> Bool
Prelude.Eq, ReadPrec [AwsCloudFrontDistributionOriginS3OriginConfig]
ReadPrec AwsCloudFrontDistributionOriginS3OriginConfig
Int -> ReadS AwsCloudFrontDistributionOriginS3OriginConfig
ReadS [AwsCloudFrontDistributionOriginS3OriginConfig]
(Int -> ReadS AwsCloudFrontDistributionOriginS3OriginConfig)
-> ReadS [AwsCloudFrontDistributionOriginS3OriginConfig]
-> ReadPrec AwsCloudFrontDistributionOriginS3OriginConfig
-> ReadPrec [AwsCloudFrontDistributionOriginS3OriginConfig]
-> Read AwsCloudFrontDistributionOriginS3OriginConfig
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsCloudFrontDistributionOriginS3OriginConfig]
$creadListPrec :: ReadPrec [AwsCloudFrontDistributionOriginS3OriginConfig]
readPrec :: ReadPrec AwsCloudFrontDistributionOriginS3OriginConfig
$creadPrec :: ReadPrec AwsCloudFrontDistributionOriginS3OriginConfig
readList :: ReadS [AwsCloudFrontDistributionOriginS3OriginConfig]
$creadList :: ReadS [AwsCloudFrontDistributionOriginS3OriginConfig]
readsPrec :: Int -> ReadS AwsCloudFrontDistributionOriginS3OriginConfig
$creadsPrec :: Int -> ReadS AwsCloudFrontDistributionOriginS3OriginConfig
Prelude.Read, Int -> AwsCloudFrontDistributionOriginS3OriginConfig -> ShowS
[AwsCloudFrontDistributionOriginS3OriginConfig] -> ShowS
AwsCloudFrontDistributionOriginS3OriginConfig -> String
(Int -> AwsCloudFrontDistributionOriginS3OriginConfig -> ShowS)
-> (AwsCloudFrontDistributionOriginS3OriginConfig -> String)
-> ([AwsCloudFrontDistributionOriginS3OriginConfig] -> ShowS)
-> Show AwsCloudFrontDistributionOriginS3OriginConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsCloudFrontDistributionOriginS3OriginConfig] -> ShowS
$cshowList :: [AwsCloudFrontDistributionOriginS3OriginConfig] -> ShowS
show :: AwsCloudFrontDistributionOriginS3OriginConfig -> String
$cshow :: AwsCloudFrontDistributionOriginS3OriginConfig -> String
showsPrec :: Int -> AwsCloudFrontDistributionOriginS3OriginConfig -> ShowS
$cshowsPrec :: Int -> AwsCloudFrontDistributionOriginS3OriginConfig -> ShowS
Prelude.Show, (forall x.
AwsCloudFrontDistributionOriginS3OriginConfig
-> Rep AwsCloudFrontDistributionOriginS3OriginConfig x)
-> (forall x.
Rep AwsCloudFrontDistributionOriginS3OriginConfig x
-> AwsCloudFrontDistributionOriginS3OriginConfig)
-> Generic AwsCloudFrontDistributionOriginS3OriginConfig
forall x.
Rep AwsCloudFrontDistributionOriginS3OriginConfig x
-> AwsCloudFrontDistributionOriginS3OriginConfig
forall x.
AwsCloudFrontDistributionOriginS3OriginConfig
-> Rep AwsCloudFrontDistributionOriginS3OriginConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsCloudFrontDistributionOriginS3OriginConfig x
-> AwsCloudFrontDistributionOriginS3OriginConfig
$cfrom :: forall x.
AwsCloudFrontDistributionOriginS3OriginConfig
-> Rep AwsCloudFrontDistributionOriginS3OriginConfig x
Prelude.Generic)
newAwsCloudFrontDistributionOriginS3OriginConfig ::
AwsCloudFrontDistributionOriginS3OriginConfig
newAwsCloudFrontDistributionOriginS3OriginConfig :: AwsCloudFrontDistributionOriginS3OriginConfig
newAwsCloudFrontDistributionOriginS3OriginConfig =
AwsCloudFrontDistributionOriginS3OriginConfig' :: Maybe Text -> AwsCloudFrontDistributionOriginS3OriginConfig
AwsCloudFrontDistributionOriginS3OriginConfig'
{ $sel:originAccessIdentity:AwsCloudFrontDistributionOriginS3OriginConfig' :: Maybe Text
originAccessIdentity =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
awsCloudFrontDistributionOriginS3OriginConfig_originAccessIdentity :: Lens.Lens' AwsCloudFrontDistributionOriginS3OriginConfig (Prelude.Maybe Prelude.Text)
awsCloudFrontDistributionOriginS3OriginConfig_originAccessIdentity :: (Maybe Text -> f (Maybe Text))
-> AwsCloudFrontDistributionOriginS3OriginConfig
-> f AwsCloudFrontDistributionOriginS3OriginConfig
awsCloudFrontDistributionOriginS3OriginConfig_originAccessIdentity = (AwsCloudFrontDistributionOriginS3OriginConfig -> Maybe Text)
-> (AwsCloudFrontDistributionOriginS3OriginConfig
-> Maybe Text -> AwsCloudFrontDistributionOriginS3OriginConfig)
-> Lens
AwsCloudFrontDistributionOriginS3OriginConfig
AwsCloudFrontDistributionOriginS3OriginConfig
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsCloudFrontDistributionOriginS3OriginConfig' {Maybe Text
originAccessIdentity :: Maybe Text
$sel:originAccessIdentity:AwsCloudFrontDistributionOriginS3OriginConfig' :: AwsCloudFrontDistributionOriginS3OriginConfig -> Maybe Text
originAccessIdentity} -> Maybe Text
originAccessIdentity) (\s :: AwsCloudFrontDistributionOriginS3OriginConfig
s@AwsCloudFrontDistributionOriginS3OriginConfig' {} Maybe Text
a -> AwsCloudFrontDistributionOriginS3OriginConfig
s {$sel:originAccessIdentity:AwsCloudFrontDistributionOriginS3OriginConfig' :: Maybe Text
originAccessIdentity = Maybe Text
a} :: AwsCloudFrontDistributionOriginS3OriginConfig)
instance
Core.FromJSON
AwsCloudFrontDistributionOriginS3OriginConfig
where
parseJSON :: Value -> Parser AwsCloudFrontDistributionOriginS3OriginConfig
parseJSON =
String
-> (Object -> Parser AwsCloudFrontDistributionOriginS3OriginConfig)
-> Value
-> Parser AwsCloudFrontDistributionOriginS3OriginConfig
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsCloudFrontDistributionOriginS3OriginConfig"
( \Object
x ->
Maybe Text -> AwsCloudFrontDistributionOriginS3OriginConfig
AwsCloudFrontDistributionOriginS3OriginConfig'
(Maybe Text -> AwsCloudFrontDistributionOriginS3OriginConfig)
-> Parser (Maybe Text)
-> Parser AwsCloudFrontDistributionOriginS3OriginConfig
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
"OriginAccessIdentity")
)
instance
Prelude.Hashable
AwsCloudFrontDistributionOriginS3OriginConfig
instance
Prelude.NFData
AwsCloudFrontDistributionOriginS3OriginConfig
instance
Core.ToJSON
AwsCloudFrontDistributionOriginS3OriginConfig
where
toJSON :: AwsCloudFrontDistributionOriginS3OriginConfig -> Value
toJSON
AwsCloudFrontDistributionOriginS3OriginConfig' {Maybe Text
originAccessIdentity :: Maybe Text
$sel:originAccessIdentity:AwsCloudFrontDistributionOriginS3OriginConfig' :: AwsCloudFrontDistributionOriginS3OriginConfig -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"OriginAccessIdentity" 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
originAccessIdentity
]
)