{-# 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.Synthetics.Types.ArtifactConfigInput where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Synthetics.Types.S3EncryptionConfig
data ArtifactConfigInput = ArtifactConfigInput'
{
ArtifactConfigInput -> Maybe S3EncryptionConfig
s3Encryption :: Prelude.Maybe S3EncryptionConfig
}
deriving (ArtifactConfigInput -> ArtifactConfigInput -> Bool
(ArtifactConfigInput -> ArtifactConfigInput -> Bool)
-> (ArtifactConfigInput -> ArtifactConfigInput -> Bool)
-> Eq ArtifactConfigInput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ArtifactConfigInput -> ArtifactConfigInput -> Bool
$c/= :: ArtifactConfigInput -> ArtifactConfigInput -> Bool
== :: ArtifactConfigInput -> ArtifactConfigInput -> Bool
$c== :: ArtifactConfigInput -> ArtifactConfigInput -> Bool
Prelude.Eq, ReadPrec [ArtifactConfigInput]
ReadPrec ArtifactConfigInput
Int -> ReadS ArtifactConfigInput
ReadS [ArtifactConfigInput]
(Int -> ReadS ArtifactConfigInput)
-> ReadS [ArtifactConfigInput]
-> ReadPrec ArtifactConfigInput
-> ReadPrec [ArtifactConfigInput]
-> Read ArtifactConfigInput
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ArtifactConfigInput]
$creadListPrec :: ReadPrec [ArtifactConfigInput]
readPrec :: ReadPrec ArtifactConfigInput
$creadPrec :: ReadPrec ArtifactConfigInput
readList :: ReadS [ArtifactConfigInput]
$creadList :: ReadS [ArtifactConfigInput]
readsPrec :: Int -> ReadS ArtifactConfigInput
$creadsPrec :: Int -> ReadS ArtifactConfigInput
Prelude.Read, Int -> ArtifactConfigInput -> ShowS
[ArtifactConfigInput] -> ShowS
ArtifactConfigInput -> String
(Int -> ArtifactConfigInput -> ShowS)
-> (ArtifactConfigInput -> String)
-> ([ArtifactConfigInput] -> ShowS)
-> Show ArtifactConfigInput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ArtifactConfigInput] -> ShowS
$cshowList :: [ArtifactConfigInput] -> ShowS
show :: ArtifactConfigInput -> String
$cshow :: ArtifactConfigInput -> String
showsPrec :: Int -> ArtifactConfigInput -> ShowS
$cshowsPrec :: Int -> ArtifactConfigInput -> ShowS
Prelude.Show, (forall x. ArtifactConfigInput -> Rep ArtifactConfigInput x)
-> (forall x. Rep ArtifactConfigInput x -> ArtifactConfigInput)
-> Generic ArtifactConfigInput
forall x. Rep ArtifactConfigInput x -> ArtifactConfigInput
forall x. ArtifactConfigInput -> Rep ArtifactConfigInput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ArtifactConfigInput x -> ArtifactConfigInput
$cfrom :: forall x. ArtifactConfigInput -> Rep ArtifactConfigInput x
Prelude.Generic)
newArtifactConfigInput ::
ArtifactConfigInput
newArtifactConfigInput :: ArtifactConfigInput
newArtifactConfigInput =
ArtifactConfigInput' :: Maybe S3EncryptionConfig -> ArtifactConfigInput
ArtifactConfigInput'
{ $sel:s3Encryption:ArtifactConfigInput' :: Maybe S3EncryptionConfig
s3Encryption =
Maybe S3EncryptionConfig
forall a. Maybe a
Prelude.Nothing
}
artifactConfigInput_s3Encryption :: Lens.Lens' ArtifactConfigInput (Prelude.Maybe S3EncryptionConfig)
artifactConfigInput_s3Encryption :: (Maybe S3EncryptionConfig -> f (Maybe S3EncryptionConfig))
-> ArtifactConfigInput -> f ArtifactConfigInput
artifactConfigInput_s3Encryption = (ArtifactConfigInput -> Maybe S3EncryptionConfig)
-> (ArtifactConfigInput
-> Maybe S3EncryptionConfig -> ArtifactConfigInput)
-> Lens
ArtifactConfigInput
ArtifactConfigInput
(Maybe S3EncryptionConfig)
(Maybe S3EncryptionConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ArtifactConfigInput' {Maybe S3EncryptionConfig
s3Encryption :: Maybe S3EncryptionConfig
$sel:s3Encryption:ArtifactConfigInput' :: ArtifactConfigInput -> Maybe S3EncryptionConfig
s3Encryption} -> Maybe S3EncryptionConfig
s3Encryption) (\s :: ArtifactConfigInput
s@ArtifactConfigInput' {} Maybe S3EncryptionConfig
a -> ArtifactConfigInput
s {$sel:s3Encryption:ArtifactConfigInput' :: Maybe S3EncryptionConfig
s3Encryption = Maybe S3EncryptionConfig
a} :: ArtifactConfigInput)
instance Prelude.Hashable ArtifactConfigInput
instance Prelude.NFData ArtifactConfigInput
instance Core.ToJSON ArtifactConfigInput where
toJSON :: ArtifactConfigInput -> Value
toJSON ArtifactConfigInput' {Maybe S3EncryptionConfig
s3Encryption :: Maybe S3EncryptionConfig
$sel:s3Encryption:ArtifactConfigInput' :: ArtifactConfigInput -> Maybe S3EncryptionConfig
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Text
"S3Encryption" Text -> S3EncryptionConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (S3EncryptionConfig -> Pair)
-> Maybe S3EncryptionConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe S3EncryptionConfig
s3Encryption]
)