module Stratosphere.AmazonMQ.Broker.EncryptionOptionsProperty (
EncryptionOptionsProperty(..), mkEncryptionOptionsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data EncryptionOptionsProperty
=
EncryptionOptionsProperty {EncryptionOptionsProperty -> ()
haddock_workaround_ :: (),
EncryptionOptionsProperty -> Maybe (Value Text)
kmsKeyId :: (Prelude.Maybe (Value Prelude.Text)),
EncryptionOptionsProperty -> Value Bool
useAwsOwnedKey :: (Value Prelude.Bool)}
deriving stock (EncryptionOptionsProperty -> EncryptionOptionsProperty -> Bool
(EncryptionOptionsProperty -> EncryptionOptionsProperty -> Bool)
-> (EncryptionOptionsProperty -> EncryptionOptionsProperty -> Bool)
-> Eq EncryptionOptionsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EncryptionOptionsProperty -> EncryptionOptionsProperty -> Bool
== :: EncryptionOptionsProperty -> EncryptionOptionsProperty -> Bool
$c/= :: EncryptionOptionsProperty -> EncryptionOptionsProperty -> Bool
/= :: EncryptionOptionsProperty -> EncryptionOptionsProperty -> Bool
Prelude.Eq, Int -> EncryptionOptionsProperty -> ShowS
[EncryptionOptionsProperty] -> ShowS
EncryptionOptionsProperty -> String
(Int -> EncryptionOptionsProperty -> ShowS)
-> (EncryptionOptionsProperty -> String)
-> ([EncryptionOptionsProperty] -> ShowS)
-> Show EncryptionOptionsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EncryptionOptionsProperty -> ShowS
showsPrec :: Int -> EncryptionOptionsProperty -> ShowS
$cshow :: EncryptionOptionsProperty -> String
show :: EncryptionOptionsProperty -> String
$cshowList :: [EncryptionOptionsProperty] -> ShowS
showList :: [EncryptionOptionsProperty] -> ShowS
Prelude.Show)
mkEncryptionOptionsProperty ::
Value Prelude.Bool -> EncryptionOptionsProperty
mkEncryptionOptionsProperty :: Value Bool -> EncryptionOptionsProperty
mkEncryptionOptionsProperty Value Bool
useAwsOwnedKey
= EncryptionOptionsProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), useAwsOwnedKey :: Value Bool
useAwsOwnedKey = Value Bool
useAwsOwnedKey,
kmsKeyId :: Maybe (Value Text)
kmsKeyId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties EncryptionOptionsProperty where
toResourceProperties :: EncryptionOptionsProperty -> ResourceProperties
toResourceProperties EncryptionOptionsProperty {Maybe (Value Text)
()
Value Bool
haddock_workaround_ :: EncryptionOptionsProperty -> ()
kmsKeyId :: EncryptionOptionsProperty -> Maybe (Value Text)
useAwsOwnedKey :: EncryptionOptionsProperty -> Value Bool
haddock_workaround_ :: ()
kmsKeyId :: Maybe (Value Text)
useAwsOwnedKey :: Value Bool
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::AmazonMQ::Broker.EncryptionOptions",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"UseAwsOwnedKey" Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Bool
useAwsOwnedKey]
([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
"KmsKeyId" (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)
kmsKeyId]))}
instance JSON.ToJSON EncryptionOptionsProperty where
toJSON :: EncryptionOptionsProperty -> Value
toJSON EncryptionOptionsProperty {Maybe (Value Text)
()
Value Bool
haddock_workaround_ :: EncryptionOptionsProperty -> ()
kmsKeyId :: EncryptionOptionsProperty -> Maybe (Value Text)
useAwsOwnedKey :: EncryptionOptionsProperty -> Value Bool
haddock_workaround_ :: ()
kmsKeyId :: Maybe (Value Text)
useAwsOwnedKey :: Value Bool
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"UseAwsOwnedKey" Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Bool
useAwsOwnedKey]
([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
"KmsKeyId" (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)
kmsKeyId])))
instance Property "KmsKeyId" EncryptionOptionsProperty where
type PropertyType "KmsKeyId" EncryptionOptionsProperty = Value Prelude.Text
set :: PropertyType "KmsKeyId" EncryptionOptionsProperty
-> EncryptionOptionsProperty -> EncryptionOptionsProperty
set PropertyType "KmsKeyId" EncryptionOptionsProperty
newValue EncryptionOptionsProperty {Maybe (Value Text)
()
Value Bool
haddock_workaround_ :: EncryptionOptionsProperty -> ()
kmsKeyId :: EncryptionOptionsProperty -> Maybe (Value Text)
useAwsOwnedKey :: EncryptionOptionsProperty -> Value Bool
haddock_workaround_ :: ()
kmsKeyId :: Maybe (Value Text)
useAwsOwnedKey :: Value Bool
..}
= EncryptionOptionsProperty {kmsKeyId :: Maybe (Value Text)
kmsKeyId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "KmsKeyId" EncryptionOptionsProperty
Value Text
newValue, ()
Value Bool
haddock_workaround_ :: ()
useAwsOwnedKey :: Value Bool
haddock_workaround_ :: ()
useAwsOwnedKey :: Value Bool
..}
instance Property "UseAwsOwnedKey" EncryptionOptionsProperty where
type PropertyType "UseAwsOwnedKey" EncryptionOptionsProperty = Value Prelude.Bool
set :: PropertyType "UseAwsOwnedKey" EncryptionOptionsProperty
-> EncryptionOptionsProperty -> EncryptionOptionsProperty
set PropertyType "UseAwsOwnedKey" EncryptionOptionsProperty
newValue EncryptionOptionsProperty {Maybe (Value Text)
()
Value Bool
haddock_workaround_ :: EncryptionOptionsProperty -> ()
kmsKeyId :: EncryptionOptionsProperty -> Maybe (Value Text)
useAwsOwnedKey :: EncryptionOptionsProperty -> Value Bool
haddock_workaround_ :: ()
kmsKeyId :: Maybe (Value Text)
useAwsOwnedKey :: Value Bool
..}
= EncryptionOptionsProperty {useAwsOwnedKey :: Value Bool
useAwsOwnedKey = PropertyType "UseAwsOwnedKey" EncryptionOptionsProperty
Value Bool
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
kmsKeyId :: Maybe (Value Text)
haddock_workaround_ :: ()
kmsKeyId :: Maybe (Value Text)
..}