module Stratosphere.PaymentCryptography.Key (
        module Exports, Key(..), mkKey
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.PaymentCryptography.Key.KeyAttributesProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data Key
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-paymentcryptography-key.html>
    Key {Key -> ()
haddock_workaround_ :: (),
         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-paymentcryptography-key.html#cfn-paymentcryptography-key-derivekeyusage>
         Key -> Maybe (Value Text)
deriveKeyUsage :: (Prelude.Maybe (Value Prelude.Text)),
         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-paymentcryptography-key.html#cfn-paymentcryptography-key-enabled>
         Key -> Maybe (Value Bool)
enabled :: (Prelude.Maybe (Value Prelude.Bool)),
         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-paymentcryptography-key.html#cfn-paymentcryptography-key-exportable>
         Key -> Value Bool
exportable :: (Value Prelude.Bool),
         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-paymentcryptography-key.html#cfn-paymentcryptography-key-keyattributes>
         Key -> KeyAttributesProperty
keyAttributes :: KeyAttributesProperty,
         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-paymentcryptography-key.html#cfn-paymentcryptography-key-keycheckvaluealgorithm>
         Key -> Maybe (Value Text)
keyCheckValueAlgorithm :: (Prelude.Maybe (Value Prelude.Text)),
         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-paymentcryptography-key.html#cfn-paymentcryptography-key-tags>
         Key -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (Key -> Key -> Bool
(Key -> Key -> Bool) -> (Key -> Key -> Bool) -> Eq Key
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Key -> Key -> Bool
== :: Key -> Key -> Bool
$c/= :: Key -> Key -> Bool
/= :: Key -> Key -> Bool
Prelude.Eq, Int -> Key -> ShowS
[Key] -> ShowS
Key -> String
(Int -> Key -> ShowS)
-> (Key -> String) -> ([Key] -> ShowS) -> Show Key
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Key -> ShowS
showsPrec :: Int -> Key -> ShowS
$cshow :: Key -> String
show :: Key -> String
$cshowList :: [Key] -> ShowS
showList :: [Key] -> ShowS
Prelude.Show)
mkKey :: Value Prelude.Bool -> KeyAttributesProperty -> Key
mkKey :: Value Bool -> KeyAttributesProperty -> Key
mkKey Value Bool
exportable KeyAttributesProperty
keyAttributes
  = Key
      {haddock_workaround_ :: ()
haddock_workaround_ = (), exportable :: Value Bool
exportable = Value Bool
exportable,
       keyAttributes :: KeyAttributesProperty
keyAttributes = KeyAttributesProperty
keyAttributes, deriveKeyUsage :: Maybe (Value Text)
deriveKeyUsage = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       enabled :: Maybe (Value Bool)
enabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
       keyCheckValueAlgorithm :: Maybe (Value Text)
keyCheckValueAlgorithm = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Key where
  toResourceProperties :: Key -> ResourceProperties
toResourceProperties Key {Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Bool
KeyAttributesProperty
haddock_workaround_ :: Key -> ()
deriveKeyUsage :: Key -> Maybe (Value Text)
enabled :: Key -> Maybe (Value Bool)
exportable :: Key -> Value Bool
keyAttributes :: Key -> KeyAttributesProperty
keyCheckValueAlgorithm :: Key -> Maybe (Value Text)
tags :: Key -> Maybe [Tag]
haddock_workaround_ :: ()
deriveKeyUsage :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
exportable :: Value Bool
keyAttributes :: KeyAttributesProperty
keyCheckValueAlgorithm :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::PaymentCryptography::Key",
         supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         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
"Exportable" 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
exportable,
                            Key
"KeyAttributes" Key -> KeyAttributesProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= KeyAttributesProperty
keyAttributes]
                           ([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
"DeriveKeyUsage" (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)
deriveKeyUsage,
                               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..=) Key
"Enabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
enabled,
                               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
"KeyCheckValueAlgorithm"
                                 (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)
keyCheckValueAlgorithm,
                               Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON Key where
  toJSON :: Key -> Value
toJSON Key {Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Bool
KeyAttributesProperty
haddock_workaround_ :: Key -> ()
deriveKeyUsage :: Key -> Maybe (Value Text)
enabled :: Key -> Maybe (Value Bool)
exportable :: Key -> Value Bool
keyAttributes :: Key -> KeyAttributesProperty
keyCheckValueAlgorithm :: Key -> Maybe (Value Text)
tags :: Key -> Maybe [Tag]
haddock_workaround_ :: ()
deriveKeyUsage :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
exportable :: Value Bool
keyAttributes :: KeyAttributesProperty
keyCheckValueAlgorithm :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = [(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
"Exportable" 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
exportable,
               Key
"KeyAttributes" Key -> KeyAttributesProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= KeyAttributesProperty
keyAttributes]
              ([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
"DeriveKeyUsage" (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)
deriveKeyUsage,
                  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..=) Key
"Enabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
enabled,
                  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
"KeyCheckValueAlgorithm"
                    (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)
keyCheckValueAlgorithm,
                  Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "DeriveKeyUsage" Key where
  type PropertyType "DeriveKeyUsage" Key = Value Prelude.Text
  set :: PropertyType "DeriveKeyUsage" Key -> Key -> Key
set PropertyType "DeriveKeyUsage" Key
newValue Key {Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Bool
KeyAttributesProperty
haddock_workaround_ :: Key -> ()
deriveKeyUsage :: Key -> Maybe (Value Text)
enabled :: Key -> Maybe (Value Bool)
exportable :: Key -> Value Bool
keyAttributes :: Key -> KeyAttributesProperty
keyCheckValueAlgorithm :: Key -> Maybe (Value Text)
tags :: Key -> Maybe [Tag]
haddock_workaround_ :: ()
deriveKeyUsage :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
exportable :: Value Bool
keyAttributes :: KeyAttributesProperty
keyCheckValueAlgorithm :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = Key {deriveKeyUsage :: Maybe (Value Text)
deriveKeyUsage = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DeriveKeyUsage" Key
Value Text
newValue, Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Bool
KeyAttributesProperty
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
exportable :: Value Bool
keyAttributes :: KeyAttributesProperty
keyCheckValueAlgorithm :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
exportable :: Value Bool
keyAttributes :: KeyAttributesProperty
keyCheckValueAlgorithm :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Enabled" Key where
  type PropertyType "Enabled" Key = Value Prelude.Bool
  set :: PropertyType "Enabled" Key -> Key -> Key
set PropertyType "Enabled" Key
newValue Key {Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Bool
KeyAttributesProperty
haddock_workaround_ :: Key -> ()
deriveKeyUsage :: Key -> Maybe (Value Text)
enabled :: Key -> Maybe (Value Bool)
exportable :: Key -> Value Bool
keyAttributes :: Key -> KeyAttributesProperty
keyCheckValueAlgorithm :: Key -> Maybe (Value Text)
tags :: Key -> Maybe [Tag]
haddock_workaround_ :: ()
deriveKeyUsage :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
exportable :: Value Bool
keyAttributes :: KeyAttributesProperty
keyCheckValueAlgorithm :: Maybe (Value Text)
tags :: Maybe [Tag]
..} = Key {enabled :: Maybe (Value Bool)
enabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Enabled" Key
Value Bool
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Bool
KeyAttributesProperty
haddock_workaround_ :: ()
deriveKeyUsage :: Maybe (Value Text)
exportable :: Value Bool
keyAttributes :: KeyAttributesProperty
keyCheckValueAlgorithm :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
deriveKeyUsage :: Maybe (Value Text)
exportable :: Value Bool
keyAttributes :: KeyAttributesProperty
keyCheckValueAlgorithm :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Exportable" Key where
  type PropertyType "Exportable" Key = Value Prelude.Bool
  set :: PropertyType "Exportable" Key -> Key -> Key
set PropertyType "Exportable" Key
newValue Key {Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Bool
KeyAttributesProperty
haddock_workaround_ :: Key -> ()
deriveKeyUsage :: Key -> Maybe (Value Text)
enabled :: Key -> Maybe (Value Bool)
exportable :: Key -> Value Bool
keyAttributes :: Key -> KeyAttributesProperty
keyCheckValueAlgorithm :: Key -> Maybe (Value Text)
tags :: Key -> Maybe [Tag]
haddock_workaround_ :: ()
deriveKeyUsage :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
exportable :: Value Bool
keyAttributes :: KeyAttributesProperty
keyCheckValueAlgorithm :: Maybe (Value Text)
tags :: Maybe [Tag]
..} = Key {exportable :: Value Bool
exportable = PropertyType "Exportable" Key
Value Bool
newValue, Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
()
KeyAttributesProperty
haddock_workaround_ :: ()
deriveKeyUsage :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
keyAttributes :: KeyAttributesProperty
keyCheckValueAlgorithm :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
deriveKeyUsage :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
keyAttributes :: KeyAttributesProperty
keyCheckValueAlgorithm :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "KeyAttributes" Key where
  type PropertyType "KeyAttributes" Key = KeyAttributesProperty
  set :: PropertyType "KeyAttributes" Key -> Key -> Key
set PropertyType "KeyAttributes" Key
newValue Key {Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Bool
KeyAttributesProperty
haddock_workaround_ :: Key -> ()
deriveKeyUsage :: Key -> Maybe (Value Text)
enabled :: Key -> Maybe (Value Bool)
exportable :: Key -> Value Bool
keyAttributes :: Key -> KeyAttributesProperty
keyCheckValueAlgorithm :: Key -> Maybe (Value Text)
tags :: Key -> Maybe [Tag]
haddock_workaround_ :: ()
deriveKeyUsage :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
exportable :: Value Bool
keyAttributes :: KeyAttributesProperty
keyCheckValueAlgorithm :: Maybe (Value Text)
tags :: Maybe [Tag]
..} = Key {keyAttributes :: KeyAttributesProperty
keyAttributes = PropertyType "KeyAttributes" Key
KeyAttributesProperty
newValue, Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Bool
haddock_workaround_ :: ()
deriveKeyUsage :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
exportable :: Value Bool
keyCheckValueAlgorithm :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
deriveKeyUsage :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
exportable :: Value Bool
keyCheckValueAlgorithm :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "KeyCheckValueAlgorithm" Key where
  type PropertyType "KeyCheckValueAlgorithm" Key = Value Prelude.Text
  set :: PropertyType "KeyCheckValueAlgorithm" Key -> Key -> Key
set PropertyType "KeyCheckValueAlgorithm" Key
newValue Key {Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Bool
KeyAttributesProperty
haddock_workaround_ :: Key -> ()
deriveKeyUsage :: Key -> Maybe (Value Text)
enabled :: Key -> Maybe (Value Bool)
exportable :: Key -> Value Bool
keyAttributes :: Key -> KeyAttributesProperty
keyCheckValueAlgorithm :: Key -> Maybe (Value Text)
tags :: Key -> Maybe [Tag]
haddock_workaround_ :: ()
deriveKeyUsage :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
exportable :: Value Bool
keyAttributes :: KeyAttributesProperty
keyCheckValueAlgorithm :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = Key {keyCheckValueAlgorithm :: Maybe (Value Text)
keyCheckValueAlgorithm = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "KeyCheckValueAlgorithm" Key
Value Text
newValue, Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Bool
KeyAttributesProperty
haddock_workaround_ :: ()
deriveKeyUsage :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
exportable :: Value Bool
keyAttributes :: KeyAttributesProperty
tags :: Maybe [Tag]
haddock_workaround_ :: ()
deriveKeyUsage :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
exportable :: Value Bool
keyAttributes :: KeyAttributesProperty
tags :: Maybe [Tag]
..}
instance Property "Tags" Key where
  type PropertyType "Tags" Key = [Tag]
  set :: PropertyType "Tags" Key -> Key -> Key
set PropertyType "Tags" Key
newValue Key {Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Bool
KeyAttributesProperty
haddock_workaround_ :: Key -> ()
deriveKeyUsage :: Key -> Maybe (Value Text)
enabled :: Key -> Maybe (Value Bool)
exportable :: Key -> Value Bool
keyAttributes :: Key -> KeyAttributesProperty
keyCheckValueAlgorithm :: Key -> Maybe (Value Text)
tags :: Key -> Maybe [Tag]
haddock_workaround_ :: ()
deriveKeyUsage :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
exportable :: Value Bool
keyAttributes :: KeyAttributesProperty
keyCheckValueAlgorithm :: Maybe (Value Text)
tags :: Maybe [Tag]
..} = Key {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" Key
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
Value Bool
KeyAttributesProperty
haddock_workaround_ :: ()
deriveKeyUsage :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
exportable :: Value Bool
keyAttributes :: KeyAttributesProperty
keyCheckValueAlgorithm :: Maybe (Value Text)
haddock_workaround_ :: ()
deriveKeyUsage :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
exportable :: Value Bool
keyAttributes :: KeyAttributesProperty
keyCheckValueAlgorithm :: Maybe (Value Text)
..}