module Stratosphere.RDS.DBInstance.MasterUserSecretProperty (
        MasterUserSecretProperty(..), mkMasterUserSecretProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data MasterUserSecretProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbinstance-masterusersecret.html>
    MasterUserSecretProperty {MasterUserSecretProperty -> ()
haddock_workaround_ :: (),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbinstance-masterusersecret.html#cfn-rds-dbinstance-masterusersecret-kmskeyid>
                              MasterUserSecretProperty -> Maybe (Value Text)
kmsKeyId :: (Prelude.Maybe (Value Prelude.Text)),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbinstance-masterusersecret.html#cfn-rds-dbinstance-masterusersecret-secretarn>
                              MasterUserSecretProperty -> Maybe (Value Text)
secretArn :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (MasterUserSecretProperty -> MasterUserSecretProperty -> Bool
(MasterUserSecretProperty -> MasterUserSecretProperty -> Bool)
-> (MasterUserSecretProperty -> MasterUserSecretProperty -> Bool)
-> Eq MasterUserSecretProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MasterUserSecretProperty -> MasterUserSecretProperty -> Bool
== :: MasterUserSecretProperty -> MasterUserSecretProperty -> Bool
$c/= :: MasterUserSecretProperty -> MasterUserSecretProperty -> Bool
/= :: MasterUserSecretProperty -> MasterUserSecretProperty -> Bool
Prelude.Eq, Int -> MasterUserSecretProperty -> ShowS
[MasterUserSecretProperty] -> ShowS
MasterUserSecretProperty -> String
(Int -> MasterUserSecretProperty -> ShowS)
-> (MasterUserSecretProperty -> String)
-> ([MasterUserSecretProperty] -> ShowS)
-> Show MasterUserSecretProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MasterUserSecretProperty -> ShowS
showsPrec :: Int -> MasterUserSecretProperty -> ShowS
$cshow :: MasterUserSecretProperty -> String
show :: MasterUserSecretProperty -> String
$cshowList :: [MasterUserSecretProperty] -> ShowS
showList :: [MasterUserSecretProperty] -> ShowS
Prelude.Show)
mkMasterUserSecretProperty :: MasterUserSecretProperty
mkMasterUserSecretProperty :: MasterUserSecretProperty
mkMasterUserSecretProperty
  = MasterUserSecretProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), kmsKeyId :: Maybe (Value Text)
kmsKeyId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       secretArn :: Maybe (Value Text)
secretArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties MasterUserSecretProperty where
  toResourceProperties :: MasterUserSecretProperty -> ResourceProperties
toResourceProperties MasterUserSecretProperty {Maybe (Value Text)
()
haddock_workaround_ :: MasterUserSecretProperty -> ()
kmsKeyId :: MasterUserSecretProperty -> Maybe (Value Text)
secretArn :: MasterUserSecretProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
kmsKeyId :: Maybe (Value Text)
secretArn :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::RDS::DBInstance.MasterUserSecret",
         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
"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,
                            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 MasterUserSecretProperty where
  toJSON :: MasterUserSecretProperty -> Value
toJSON MasterUserSecretProperty {Maybe (Value Text)
()
haddock_workaround_ :: MasterUserSecretProperty -> ()
kmsKeyId :: MasterUserSecretProperty -> Maybe (Value Text)
secretArn :: MasterUserSecretProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
kmsKeyId :: Maybe (Value Text)
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
"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,
               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 "KmsKeyId" MasterUserSecretProperty where
  type PropertyType "KmsKeyId" MasterUserSecretProperty = Value Prelude.Text
  set :: PropertyType "KmsKeyId" MasterUserSecretProperty
-> MasterUserSecretProperty -> MasterUserSecretProperty
set PropertyType "KmsKeyId" MasterUserSecretProperty
newValue MasterUserSecretProperty {Maybe (Value Text)
()
haddock_workaround_ :: MasterUserSecretProperty -> ()
kmsKeyId :: MasterUserSecretProperty -> Maybe (Value Text)
secretArn :: MasterUserSecretProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
kmsKeyId :: Maybe (Value Text)
secretArn :: Maybe (Value Text)
..}
    = MasterUserSecretProperty {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" MasterUserSecretProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
secretArn :: Maybe (Value Text)
haddock_workaround_ :: ()
secretArn :: Maybe (Value Text)
..}
instance Property "SecretArn" MasterUserSecretProperty where
  type PropertyType "SecretArn" MasterUserSecretProperty = Value Prelude.Text
  set :: PropertyType "SecretArn" MasterUserSecretProperty
-> MasterUserSecretProperty -> MasterUserSecretProperty
set PropertyType "SecretArn" MasterUserSecretProperty
newValue MasterUserSecretProperty {Maybe (Value Text)
()
haddock_workaround_ :: MasterUserSecretProperty -> ()
kmsKeyId :: MasterUserSecretProperty -> Maybe (Value Text)
secretArn :: MasterUserSecretProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
kmsKeyId :: Maybe (Value Text)
secretArn :: Maybe (Value Text)
..}
    = MasterUserSecretProperty {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" MasterUserSecretProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
kmsKeyId :: Maybe (Value Text)
haddock_workaround_ :: ()
kmsKeyId :: Maybe (Value Text)
..}