module Stratosphere.IoT.EncryptionConfiguration (
EncryptionConfiguration(..), mkEncryptionConfiguration
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data EncryptionConfiguration
=
EncryptionConfiguration {EncryptionConfiguration -> ()
haddock_workaround_ :: (),
EncryptionConfiguration -> Value Text
encryptionType :: (Value Prelude.Text),
EncryptionConfiguration -> Maybe (Value Text)
kmsAccessRoleArn :: (Prelude.Maybe (Value Prelude.Text)),
EncryptionConfiguration -> Maybe (Value Text)
kmsKeyArn :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (EncryptionConfiguration -> EncryptionConfiguration -> Bool
(EncryptionConfiguration -> EncryptionConfiguration -> Bool)
-> (EncryptionConfiguration -> EncryptionConfiguration -> Bool)
-> Eq EncryptionConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EncryptionConfiguration -> EncryptionConfiguration -> Bool
== :: EncryptionConfiguration -> EncryptionConfiguration -> Bool
$c/= :: EncryptionConfiguration -> EncryptionConfiguration -> Bool
/= :: EncryptionConfiguration -> EncryptionConfiguration -> Bool
Prelude.Eq, Int -> EncryptionConfiguration -> ShowS
[EncryptionConfiguration] -> ShowS
EncryptionConfiguration -> String
(Int -> EncryptionConfiguration -> ShowS)
-> (EncryptionConfiguration -> String)
-> ([EncryptionConfiguration] -> ShowS)
-> Show EncryptionConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EncryptionConfiguration -> ShowS
showsPrec :: Int -> EncryptionConfiguration -> ShowS
$cshow :: EncryptionConfiguration -> String
show :: EncryptionConfiguration -> String
$cshowList :: [EncryptionConfiguration] -> ShowS
showList :: [EncryptionConfiguration] -> ShowS
Prelude.Show)
mkEncryptionConfiguration ::
Value Prelude.Text -> EncryptionConfiguration
mkEncryptionConfiguration :: Value Text -> EncryptionConfiguration
mkEncryptionConfiguration Value Text
encryptionType
= EncryptionConfiguration
{haddock_workaround_ :: ()
haddock_workaround_ = (), encryptionType :: Value Text
encryptionType = Value Text
encryptionType,
kmsAccessRoleArn :: Maybe (Value Text)
kmsAccessRoleArn = 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 EncryptionConfiguration where
toResourceProperties :: EncryptionConfiguration -> ResourceProperties
toResourceProperties EncryptionConfiguration {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: EncryptionConfiguration -> ()
encryptionType :: EncryptionConfiguration -> Value Text
kmsAccessRoleArn :: EncryptionConfiguration -> Maybe (Value Text)
kmsKeyArn :: EncryptionConfiguration -> Maybe (Value Text)
haddock_workaround_ :: ()
encryptionType :: Value Text
kmsAccessRoleArn :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::IoT::EncryptionConfiguration",
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
"EncryptionType" 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..= Value Text
encryptionType]
([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
"KmsAccessRoleArn" (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)
kmsAccessRoleArn,
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 EncryptionConfiguration where
toJSON :: EncryptionConfiguration -> Value
toJSON EncryptionConfiguration {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: EncryptionConfiguration -> ()
encryptionType :: EncryptionConfiguration -> Value Text
kmsAccessRoleArn :: EncryptionConfiguration -> Maybe (Value Text)
kmsKeyArn :: EncryptionConfiguration -> Maybe (Value Text)
haddock_workaround_ :: ()
encryptionType :: Value Text
kmsAccessRoleArn :: 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
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"EncryptionType" 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..= Value Text
encryptionType]
([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
"KmsAccessRoleArn" (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)
kmsAccessRoleArn,
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 "EncryptionType" EncryptionConfiguration where
type PropertyType "EncryptionType" EncryptionConfiguration = Value Prelude.Text
set :: PropertyType "EncryptionType" EncryptionConfiguration
-> EncryptionConfiguration -> EncryptionConfiguration
set PropertyType "EncryptionType" EncryptionConfiguration
newValue EncryptionConfiguration {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: EncryptionConfiguration -> ()
encryptionType :: EncryptionConfiguration -> Value Text
kmsAccessRoleArn :: EncryptionConfiguration -> Maybe (Value Text)
kmsKeyArn :: EncryptionConfiguration -> Maybe (Value Text)
haddock_workaround_ :: ()
encryptionType :: Value Text
kmsAccessRoleArn :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
..}
= EncryptionConfiguration {encryptionType :: Value Text
encryptionType = PropertyType "EncryptionType" EncryptionConfiguration
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
kmsAccessRoleArn :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
haddock_workaround_ :: ()
kmsAccessRoleArn :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
..}
instance Property "KmsAccessRoleArn" EncryptionConfiguration where
type PropertyType "KmsAccessRoleArn" EncryptionConfiguration = Value Prelude.Text
set :: PropertyType "KmsAccessRoleArn" EncryptionConfiguration
-> EncryptionConfiguration -> EncryptionConfiguration
set PropertyType "KmsAccessRoleArn" EncryptionConfiguration
newValue EncryptionConfiguration {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: EncryptionConfiguration -> ()
encryptionType :: EncryptionConfiguration -> Value Text
kmsAccessRoleArn :: EncryptionConfiguration -> Maybe (Value Text)
kmsKeyArn :: EncryptionConfiguration -> Maybe (Value Text)
haddock_workaround_ :: ()
encryptionType :: Value Text
kmsAccessRoleArn :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
..}
= EncryptionConfiguration
{kmsAccessRoleArn :: Maybe (Value Text)
kmsAccessRoleArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "KmsAccessRoleArn" EncryptionConfiguration
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
encryptionType :: Value Text
kmsKeyArn :: Maybe (Value Text)
haddock_workaround_ :: ()
encryptionType :: Value Text
kmsKeyArn :: Maybe (Value Text)
..}
instance Property "KmsKeyArn" EncryptionConfiguration where
type PropertyType "KmsKeyArn" EncryptionConfiguration = Value Prelude.Text
set :: PropertyType "KmsKeyArn" EncryptionConfiguration
-> EncryptionConfiguration -> EncryptionConfiguration
set PropertyType "KmsKeyArn" EncryptionConfiguration
newValue EncryptionConfiguration {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: EncryptionConfiguration -> ()
encryptionType :: EncryptionConfiguration -> Value Text
kmsAccessRoleArn :: EncryptionConfiguration -> Maybe (Value Text)
kmsKeyArn :: EncryptionConfiguration -> Maybe (Value Text)
haddock_workaround_ :: ()
encryptionType :: Value Text
kmsAccessRoleArn :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
..}
= EncryptionConfiguration {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" EncryptionConfiguration
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
encryptionType :: Value Text
kmsAccessRoleArn :: Maybe (Value Text)
haddock_workaround_ :: ()
encryptionType :: Value Text
kmsAccessRoleArn :: Maybe (Value Text)
..}