module Stratosphere.Synthetics.Canary.S3EncryptionProperty (
S3EncryptionProperty(..), mkS3EncryptionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data S3EncryptionProperty
=
S3EncryptionProperty {S3EncryptionProperty -> ()
haddock_workaround_ :: (),
S3EncryptionProperty -> Maybe (Value Text)
encryptionMode :: (Prelude.Maybe (Value Prelude.Text)),
S3EncryptionProperty -> Maybe (Value Text)
kmsKeyArn :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (S3EncryptionProperty -> S3EncryptionProperty -> Bool
(S3EncryptionProperty -> S3EncryptionProperty -> Bool)
-> (S3EncryptionProperty -> S3EncryptionProperty -> Bool)
-> Eq S3EncryptionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: S3EncryptionProperty -> S3EncryptionProperty -> Bool
== :: S3EncryptionProperty -> S3EncryptionProperty -> Bool
$c/= :: S3EncryptionProperty -> S3EncryptionProperty -> Bool
/= :: S3EncryptionProperty -> S3EncryptionProperty -> Bool
Prelude.Eq, Int -> S3EncryptionProperty -> ShowS
[S3EncryptionProperty] -> ShowS
S3EncryptionProperty -> String
(Int -> S3EncryptionProperty -> ShowS)
-> (S3EncryptionProperty -> String)
-> ([S3EncryptionProperty] -> ShowS)
-> Show S3EncryptionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> S3EncryptionProperty -> ShowS
showsPrec :: Int -> S3EncryptionProperty -> ShowS
$cshow :: S3EncryptionProperty -> String
show :: S3EncryptionProperty -> String
$cshowList :: [S3EncryptionProperty] -> ShowS
showList :: [S3EncryptionProperty] -> ShowS
Prelude.Show)
mkS3EncryptionProperty :: S3EncryptionProperty
mkS3EncryptionProperty :: S3EncryptionProperty
mkS3EncryptionProperty
= S3EncryptionProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), encryptionMode :: Maybe (Value Text)
encryptionMode = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
kmsKeyArn :: Maybe (Value Text)
kmsKeyArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties S3EncryptionProperty where
toResourceProperties :: S3EncryptionProperty -> ResourceProperties
toResourceProperties S3EncryptionProperty {Maybe (Value Text)
()
haddock_workaround_ :: S3EncryptionProperty -> ()
encryptionMode :: S3EncryptionProperty -> Maybe (Value Text)
kmsKeyArn :: S3EncryptionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
encryptionMode :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Synthetics::Canary.S3Encryption",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"EncryptionMode" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
encryptionMode,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"KmsKeyArn" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
kmsKeyArn])}
instance JSON.ToJSON S3EncryptionProperty where
toJSON :: S3EncryptionProperty -> Value
toJSON S3EncryptionProperty {Maybe (Value Text)
()
haddock_workaround_ :: S3EncryptionProperty -> ()
encryptionMode :: S3EncryptionProperty -> Maybe (Value Text)
kmsKeyArn :: S3EncryptionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
encryptionMode :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"EncryptionMode" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
encryptionMode,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"KmsKeyArn" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
kmsKeyArn]))
instance Property "EncryptionMode" S3EncryptionProperty where
type PropertyType "EncryptionMode" S3EncryptionProperty = Value Prelude.Text
set :: PropertyType "EncryptionMode" S3EncryptionProperty
-> S3EncryptionProperty -> S3EncryptionProperty
set PropertyType "EncryptionMode" S3EncryptionProperty
newValue S3EncryptionProperty {Maybe (Value Text)
()
haddock_workaround_ :: S3EncryptionProperty -> ()
encryptionMode :: S3EncryptionProperty -> Maybe (Value Text)
kmsKeyArn :: S3EncryptionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
encryptionMode :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
..}
= S3EncryptionProperty {encryptionMode :: Maybe (Value Text)
encryptionMode = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "EncryptionMode" S3EncryptionProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
kmsKeyArn :: Maybe (Value Text)
haddock_workaround_ :: ()
kmsKeyArn :: Maybe (Value Text)
..}
instance Property "KmsKeyArn" S3EncryptionProperty where
type PropertyType "KmsKeyArn" S3EncryptionProperty = Value Prelude.Text
set :: PropertyType "KmsKeyArn" S3EncryptionProperty
-> S3EncryptionProperty -> S3EncryptionProperty
set PropertyType "KmsKeyArn" S3EncryptionProperty
newValue S3EncryptionProperty {Maybe (Value Text)
()
haddock_workaround_ :: S3EncryptionProperty -> ()
encryptionMode :: S3EncryptionProperty -> Maybe (Value Text)
kmsKeyArn :: S3EncryptionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
encryptionMode :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
..}
= S3EncryptionProperty {kmsKeyArn :: Maybe (Value Text)
kmsKeyArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "KmsKeyArn" S3EncryptionProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
encryptionMode :: Maybe (Value Text)
haddock_workaround_ :: ()
encryptionMode :: Maybe (Value Text)
..}