module Stratosphere.StepFunctions.StateMachine.EncryptionConfigurationProperty (
        EncryptionConfigurationProperty(..),
        mkEncryptionConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data EncryptionConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-encryptionconfiguration.html>
    EncryptionConfigurationProperty {EncryptionConfigurationProperty -> ()
haddock_workaround_ :: (),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-encryptionconfiguration.html#cfn-stepfunctions-statemachine-encryptionconfiguration-kmsdatakeyreuseperiodseconds>
                                     EncryptionConfigurationProperty -> Maybe (Value Integer)
kmsDataKeyReusePeriodSeconds :: (Prelude.Maybe (Value Prelude.Integer)),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-encryptionconfiguration.html#cfn-stepfunctions-statemachine-encryptionconfiguration-kmskeyid>
                                     EncryptionConfigurationProperty -> Maybe (Value Text)
kmsKeyId :: (Prelude.Maybe (Value Prelude.Text)),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-encryptionconfiguration.html#cfn-stepfunctions-statemachine-encryptionconfiguration-type>
                                     EncryptionConfigurationProperty -> Value Text
type' :: (Value Prelude.Text)}
  deriving stock (EncryptionConfigurationProperty
-> EncryptionConfigurationProperty -> Bool
(EncryptionConfigurationProperty
 -> EncryptionConfigurationProperty -> Bool)
-> (EncryptionConfigurationProperty
    -> EncryptionConfigurationProperty -> Bool)
-> Eq EncryptionConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EncryptionConfigurationProperty
-> EncryptionConfigurationProperty -> Bool
== :: EncryptionConfigurationProperty
-> EncryptionConfigurationProperty -> Bool
$c/= :: EncryptionConfigurationProperty
-> EncryptionConfigurationProperty -> Bool
/= :: EncryptionConfigurationProperty
-> EncryptionConfigurationProperty -> Bool
Prelude.Eq, Int -> EncryptionConfigurationProperty -> ShowS
[EncryptionConfigurationProperty] -> ShowS
EncryptionConfigurationProperty -> String
(Int -> EncryptionConfigurationProperty -> ShowS)
-> (EncryptionConfigurationProperty -> String)
-> ([EncryptionConfigurationProperty] -> ShowS)
-> Show EncryptionConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EncryptionConfigurationProperty -> ShowS
showsPrec :: Int -> EncryptionConfigurationProperty -> ShowS
$cshow :: EncryptionConfigurationProperty -> String
show :: EncryptionConfigurationProperty -> String
$cshowList :: [EncryptionConfigurationProperty] -> ShowS
showList :: [EncryptionConfigurationProperty] -> ShowS
Prelude.Show)
mkEncryptionConfigurationProperty ::
  Value Prelude.Text -> EncryptionConfigurationProperty
mkEncryptionConfigurationProperty :: Value Text -> EncryptionConfigurationProperty
mkEncryptionConfigurationProperty Value Text
type'
  = EncryptionConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), type' :: Value Text
type' = Value Text
type',
       kmsDataKeyReusePeriodSeconds :: Maybe (Value Integer)
kmsDataKeyReusePeriodSeconds = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       kmsKeyId :: Maybe (Value Text)
kmsKeyId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties EncryptionConfigurationProperty where
  toResourceProperties :: EncryptionConfigurationProperty -> ResourceProperties
toResourceProperties EncryptionConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: EncryptionConfigurationProperty -> ()
kmsDataKeyReusePeriodSeconds :: EncryptionConfigurationProperty -> Maybe (Value Integer)
kmsKeyId :: EncryptionConfigurationProperty -> Maybe (Value Text)
type' :: EncryptionConfigurationProperty -> Value Text
haddock_workaround_ :: ()
kmsDataKeyReusePeriodSeconds :: Maybe (Value Integer)
kmsKeyId :: Maybe (Value Text)
type' :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::StepFunctions::StateMachine.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
"Type" 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
type']
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"KmsDataKeyReusePeriodSeconds"
                                 (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
kmsDataKeyReusePeriodSeconds,
                               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 EncryptionConfigurationProperty where
  toJSON :: EncryptionConfigurationProperty -> Value
toJSON EncryptionConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: EncryptionConfigurationProperty -> ()
kmsDataKeyReusePeriodSeconds :: EncryptionConfigurationProperty -> Maybe (Value Integer)
kmsKeyId :: EncryptionConfigurationProperty -> Maybe (Value Text)
type' :: EncryptionConfigurationProperty -> Value Text
haddock_workaround_ :: ()
kmsDataKeyReusePeriodSeconds :: Maybe (Value Integer)
kmsKeyId :: Maybe (Value Text)
type' :: 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
"Type" 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
type']
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"KmsDataKeyReusePeriodSeconds"
                    (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
kmsDataKeyReusePeriodSeconds,
                  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 "KmsDataKeyReusePeriodSeconds" EncryptionConfigurationProperty where
  type PropertyType "KmsDataKeyReusePeriodSeconds" EncryptionConfigurationProperty = Value Prelude.Integer
  set :: PropertyType
  "KmsDataKeyReusePeriodSeconds" EncryptionConfigurationProperty
-> EncryptionConfigurationProperty
-> EncryptionConfigurationProperty
set PropertyType
  "KmsDataKeyReusePeriodSeconds" EncryptionConfigurationProperty
newValue EncryptionConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: EncryptionConfigurationProperty -> ()
kmsDataKeyReusePeriodSeconds :: EncryptionConfigurationProperty -> Maybe (Value Integer)
kmsKeyId :: EncryptionConfigurationProperty -> Maybe (Value Text)
type' :: EncryptionConfigurationProperty -> Value Text
haddock_workaround_ :: ()
kmsDataKeyReusePeriodSeconds :: Maybe (Value Integer)
kmsKeyId :: Maybe (Value Text)
type' :: Value Text
..}
    = EncryptionConfigurationProperty
        {kmsDataKeyReusePeriodSeconds :: Maybe (Value Integer)
kmsDataKeyReusePeriodSeconds = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "KmsDataKeyReusePeriodSeconds" EncryptionConfigurationProperty
Value Integer
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
kmsKeyId :: Maybe (Value Text)
type' :: Value Text
haddock_workaround_ :: ()
kmsKeyId :: Maybe (Value Text)
type' :: Value Text
..}
instance Property "KmsKeyId" EncryptionConfigurationProperty where
  type PropertyType "KmsKeyId" EncryptionConfigurationProperty = Value Prelude.Text
  set :: PropertyType "KmsKeyId" EncryptionConfigurationProperty
-> EncryptionConfigurationProperty
-> EncryptionConfigurationProperty
set PropertyType "KmsKeyId" EncryptionConfigurationProperty
newValue EncryptionConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: EncryptionConfigurationProperty -> ()
kmsDataKeyReusePeriodSeconds :: EncryptionConfigurationProperty -> Maybe (Value Integer)
kmsKeyId :: EncryptionConfigurationProperty -> Maybe (Value Text)
type' :: EncryptionConfigurationProperty -> Value Text
haddock_workaround_ :: ()
kmsDataKeyReusePeriodSeconds :: Maybe (Value Integer)
kmsKeyId :: Maybe (Value Text)
type' :: Value Text
..}
    = EncryptionConfigurationProperty
        {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" EncryptionConfigurationProperty
Value Text
newValue, Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: ()
kmsDataKeyReusePeriodSeconds :: Maybe (Value Integer)
type' :: Value Text
haddock_workaround_ :: ()
kmsDataKeyReusePeriodSeconds :: Maybe (Value Integer)
type' :: Value Text
..}
instance Property "Type" EncryptionConfigurationProperty where
  type PropertyType "Type" EncryptionConfigurationProperty = Value Prelude.Text
  set :: PropertyType "Type" EncryptionConfigurationProperty
-> EncryptionConfigurationProperty
-> EncryptionConfigurationProperty
set PropertyType "Type" EncryptionConfigurationProperty
newValue EncryptionConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: EncryptionConfigurationProperty -> ()
kmsDataKeyReusePeriodSeconds :: EncryptionConfigurationProperty -> Maybe (Value Integer)
kmsKeyId :: EncryptionConfigurationProperty -> Maybe (Value Text)
type' :: EncryptionConfigurationProperty -> Value Text
haddock_workaround_ :: ()
kmsDataKeyReusePeriodSeconds :: Maybe (Value Integer)
kmsKeyId :: Maybe (Value Text)
type' :: Value Text
..}
    = EncryptionConfigurationProperty {type' :: Value Text
type' = PropertyType "Type" EncryptionConfigurationProperty
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
kmsDataKeyReusePeriodSeconds :: Maybe (Value Integer)
kmsKeyId :: Maybe (Value Text)
haddock_workaround_ :: ()
kmsDataKeyReusePeriodSeconds :: Maybe (Value Integer)
kmsKeyId :: Maybe (Value Text)
..}