module Stratosphere.PaymentCryptography.Alias (
Alias(..), mkAlias
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Alias
=
Alias {Alias -> ()
haddock_workaround_ :: (),
Alias -> Value Text
aliasName :: (Value Prelude.Text),
Alias -> Maybe (Value Text)
keyArn :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (Alias -> Alias -> Bool
(Alias -> Alias -> Bool) -> (Alias -> Alias -> Bool) -> Eq Alias
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Alias -> Alias -> Bool
== :: Alias -> Alias -> Bool
$c/= :: Alias -> Alias -> Bool
/= :: Alias -> Alias -> Bool
Prelude.Eq, Int -> Alias -> ShowS
[Alias] -> ShowS
Alias -> String
(Int -> Alias -> ShowS)
-> (Alias -> String) -> ([Alias] -> ShowS) -> Show Alias
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Alias -> ShowS
showsPrec :: Int -> Alias -> ShowS
$cshow :: Alias -> String
show :: Alias -> String
$cshowList :: [Alias] -> ShowS
showList :: [Alias] -> ShowS
Prelude.Show)
mkAlias :: Value Prelude.Text -> Alias
mkAlias :: Value Text -> Alias
mkAlias Value Text
aliasName
= Alias
{haddock_workaround_ :: ()
haddock_workaround_ = (), aliasName :: Value Text
aliasName = Value Text
aliasName,
keyArn :: Maybe (Value Text)
keyArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Alias where
toResourceProperties :: Alias -> ResourceProperties
toResourceProperties Alias {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Alias -> ()
aliasName :: Alias -> Value Text
keyArn :: Alias -> Maybe (Value Text)
haddock_workaround_ :: ()
aliasName :: Value Text
keyArn :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::PaymentCryptography::Alias",
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
"AliasName" 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
aliasName]
([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
"KeyArn" (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)
keyArn]))}
instance JSON.ToJSON Alias where
toJSON :: Alias -> Value
toJSON Alias {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Alias -> ()
aliasName :: Alias -> Value Text
keyArn :: Alias -> Maybe (Value Text)
haddock_workaround_ :: ()
aliasName :: Value Text
keyArn :: 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
"AliasName" 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
aliasName]
([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
"KeyArn" (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)
keyArn])))
instance Property "AliasName" Alias where
type PropertyType "AliasName" Alias = Value Prelude.Text
set :: PropertyType "AliasName" Alias -> Alias -> Alias
set PropertyType "AliasName" Alias
newValue Alias {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Alias -> ()
aliasName :: Alias -> Value Text
keyArn :: Alias -> Maybe (Value Text)
haddock_workaround_ :: ()
aliasName :: Value Text
keyArn :: Maybe (Value Text)
..} = Alias {aliasName :: Value Text
aliasName = PropertyType "AliasName" Alias
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
keyArn :: Maybe (Value Text)
haddock_workaround_ :: ()
keyArn :: Maybe (Value Text)
..}
instance Property "KeyArn" Alias where
type PropertyType "KeyArn" Alias = Value Prelude.Text
set :: PropertyType "KeyArn" Alias -> Alias -> Alias
set PropertyType "KeyArn" Alias
newValue Alias {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Alias -> ()
aliasName :: Alias -> Value Text
keyArn :: Alias -> Maybe (Value Text)
haddock_workaround_ :: ()
aliasName :: Value Text
keyArn :: Maybe (Value Text)
..}
= Alias {keyArn :: Maybe (Value Text)
keyArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "KeyArn" Alias
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
aliasName :: Value Text
haddock_workaround_ :: ()
aliasName :: Value Text
..}