module Stratosphere.EVS.Environment.SecretProperty (
SecretProperty(..), mkSecretProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SecretProperty
=
SecretProperty {SecretProperty -> ()
haddock_workaround_ :: (),
SecretProperty -> Maybe (Value Text)
secretArn :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (SecretProperty -> SecretProperty -> Bool
(SecretProperty -> SecretProperty -> Bool)
-> (SecretProperty -> SecretProperty -> Bool) -> Eq SecretProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SecretProperty -> SecretProperty -> Bool
== :: SecretProperty -> SecretProperty -> Bool
$c/= :: SecretProperty -> SecretProperty -> Bool
/= :: SecretProperty -> SecretProperty -> Bool
Prelude.Eq, Int -> SecretProperty -> ShowS
[SecretProperty] -> ShowS
SecretProperty -> String
(Int -> SecretProperty -> ShowS)
-> (SecretProperty -> String)
-> ([SecretProperty] -> ShowS)
-> Show SecretProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SecretProperty -> ShowS
showsPrec :: Int -> SecretProperty -> ShowS
$cshow :: SecretProperty -> String
show :: SecretProperty -> String
$cshowList :: [SecretProperty] -> ShowS
showList :: [SecretProperty] -> ShowS
Prelude.Show)
mkSecretProperty :: SecretProperty
mkSecretProperty :: SecretProperty
mkSecretProperty
= SecretProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), secretArn :: Maybe (Value Text)
secretArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SecretProperty where
toResourceProperties :: SecretProperty -> ResourceProperties
toResourceProperties SecretProperty {Maybe (Value Text)
()
haddock_workaround_ :: SecretProperty -> ()
secretArn :: SecretProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
secretArn :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::EVS::Environment.Secret",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([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
"SecretArn" (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)
secretArn])}
instance JSON.ToJSON SecretProperty where
toJSON :: SecretProperty -> Value
toJSON SecretProperty {Maybe (Value Text)
()
haddock_workaround_ :: SecretProperty -> ()
secretArn :: SecretProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
secretArn :: Maybe (Value Text)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([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
"SecretArn" (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)
secretArn]))
instance Property "SecretArn" SecretProperty where
type PropertyType "SecretArn" SecretProperty = Value Prelude.Text
set :: PropertyType "SecretArn" SecretProperty
-> SecretProperty -> SecretProperty
set PropertyType "SecretArn" SecretProperty
newValue SecretProperty {Maybe (Value Text)
()
haddock_workaround_ :: SecretProperty -> ()
secretArn :: SecretProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
secretArn :: Maybe (Value Text)
..}
= SecretProperty {secretArn :: Maybe (Value Text)
secretArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SecretArn" SecretProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}