module Stratosphere.FIS.TargetAccountConfiguration (
        TargetAccountConfiguration(..), mkTargetAccountConfiguration
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TargetAccountConfiguration
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-fis-targetaccountconfiguration.html>
    TargetAccountConfiguration {TargetAccountConfiguration -> ()
haddock_workaround_ :: (),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-fis-targetaccountconfiguration.html#cfn-fis-targetaccountconfiguration-accountid>
                                TargetAccountConfiguration -> Value Text
accountId :: (Value Prelude.Text),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-fis-targetaccountconfiguration.html#cfn-fis-targetaccountconfiguration-description>
                                TargetAccountConfiguration -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-fis-targetaccountconfiguration.html#cfn-fis-targetaccountconfiguration-experimenttemplateid>
                                TargetAccountConfiguration -> Value Text
experimentTemplateId :: (Value Prelude.Text),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-fis-targetaccountconfiguration.html#cfn-fis-targetaccountconfiguration-rolearn>
                                TargetAccountConfiguration -> Value Text
roleArn :: (Value Prelude.Text)}
  deriving stock (TargetAccountConfiguration -> TargetAccountConfiguration -> Bool
(TargetAccountConfiguration -> TargetAccountConfiguration -> Bool)
-> (TargetAccountConfiguration
    -> TargetAccountConfiguration -> Bool)
-> Eq TargetAccountConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TargetAccountConfiguration -> TargetAccountConfiguration -> Bool
== :: TargetAccountConfiguration -> TargetAccountConfiguration -> Bool
$c/= :: TargetAccountConfiguration -> TargetAccountConfiguration -> Bool
/= :: TargetAccountConfiguration -> TargetAccountConfiguration -> Bool
Prelude.Eq, Int -> TargetAccountConfiguration -> ShowS
[TargetAccountConfiguration] -> ShowS
TargetAccountConfiguration -> String
(Int -> TargetAccountConfiguration -> ShowS)
-> (TargetAccountConfiguration -> String)
-> ([TargetAccountConfiguration] -> ShowS)
-> Show TargetAccountConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TargetAccountConfiguration -> ShowS
showsPrec :: Int -> TargetAccountConfiguration -> ShowS
$cshow :: TargetAccountConfiguration -> String
show :: TargetAccountConfiguration -> String
$cshowList :: [TargetAccountConfiguration] -> ShowS
showList :: [TargetAccountConfiguration] -> ShowS
Prelude.Show)
mkTargetAccountConfiguration ::
  Value Prelude.Text
  -> Value Prelude.Text
     -> Value Prelude.Text -> TargetAccountConfiguration
mkTargetAccountConfiguration :: Value Text
-> Value Text -> Value Text -> TargetAccountConfiguration
mkTargetAccountConfiguration Value Text
accountId Value Text
experimentTemplateId Value Text
roleArn
  = TargetAccountConfiguration
      {haddock_workaround_ :: ()
haddock_workaround_ = (), accountId :: Value Text
accountId = Value Text
accountId,
       experimentTemplateId :: Value Text
experimentTemplateId = Value Text
experimentTemplateId, roleArn :: Value Text
roleArn = Value Text
roleArn,
       description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TargetAccountConfiguration where
  toResourceProperties :: TargetAccountConfiguration -> ResourceProperties
toResourceProperties TargetAccountConfiguration {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TargetAccountConfiguration -> ()
accountId :: TargetAccountConfiguration -> Value Text
description :: TargetAccountConfiguration -> Maybe (Value Text)
experimentTemplateId :: TargetAccountConfiguration -> Value Text
roleArn :: TargetAccountConfiguration -> Value Text
haddock_workaround_ :: ()
accountId :: Value Text
description :: Maybe (Value Text)
experimentTemplateId :: Value Text
roleArn :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::FIS::TargetAccountConfiguration",
         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
"AccountId" 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
accountId,
                            Key
"ExperimentTemplateId" 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
experimentTemplateId,
                            Key
"RoleArn" 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
roleArn]
                           ([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
"Description" (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)
description]))}
instance JSON.ToJSON TargetAccountConfiguration where
  toJSON :: TargetAccountConfiguration -> Value
toJSON TargetAccountConfiguration {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TargetAccountConfiguration -> ()
accountId :: TargetAccountConfiguration -> Value Text
description :: TargetAccountConfiguration -> Maybe (Value Text)
experimentTemplateId :: TargetAccountConfiguration -> Value Text
roleArn :: TargetAccountConfiguration -> Value Text
haddock_workaround_ :: ()
accountId :: Value Text
description :: Maybe (Value Text)
experimentTemplateId :: Value Text
roleArn :: 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
"AccountId" 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
accountId,
               Key
"ExperimentTemplateId" 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
experimentTemplateId,
               Key
"RoleArn" 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
roleArn]
              ([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
"Description" (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)
description])))
instance Property "AccountId" TargetAccountConfiguration where
  type PropertyType "AccountId" TargetAccountConfiguration = Value Prelude.Text
  set :: PropertyType "AccountId" TargetAccountConfiguration
-> TargetAccountConfiguration -> TargetAccountConfiguration
set PropertyType "AccountId" TargetAccountConfiguration
newValue TargetAccountConfiguration {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TargetAccountConfiguration -> ()
accountId :: TargetAccountConfiguration -> Value Text
description :: TargetAccountConfiguration -> Maybe (Value Text)
experimentTemplateId :: TargetAccountConfiguration -> Value Text
roleArn :: TargetAccountConfiguration -> Value Text
haddock_workaround_ :: ()
accountId :: Value Text
description :: Maybe (Value Text)
experimentTemplateId :: Value Text
roleArn :: Value Text
..}
    = TargetAccountConfiguration {accountId :: Value Text
accountId = PropertyType "AccountId" TargetAccountConfiguration
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
experimentTemplateId :: Value Text
roleArn :: Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
experimentTemplateId :: Value Text
roleArn :: Value Text
..}
instance Property "Description" TargetAccountConfiguration where
  type PropertyType "Description" TargetAccountConfiguration = Value Prelude.Text
  set :: PropertyType "Description" TargetAccountConfiguration
-> TargetAccountConfiguration -> TargetAccountConfiguration
set PropertyType "Description" TargetAccountConfiguration
newValue TargetAccountConfiguration {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TargetAccountConfiguration -> ()
accountId :: TargetAccountConfiguration -> Value Text
description :: TargetAccountConfiguration -> Maybe (Value Text)
experimentTemplateId :: TargetAccountConfiguration -> Value Text
roleArn :: TargetAccountConfiguration -> Value Text
haddock_workaround_ :: ()
accountId :: Value Text
description :: Maybe (Value Text)
experimentTemplateId :: Value Text
roleArn :: Value Text
..}
    = TargetAccountConfiguration
        {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" TargetAccountConfiguration
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
accountId :: Value Text
experimentTemplateId :: Value Text
roleArn :: Value Text
haddock_workaround_ :: ()
accountId :: Value Text
experimentTemplateId :: Value Text
roleArn :: Value Text
..}
instance Property "ExperimentTemplateId" TargetAccountConfiguration where
  type PropertyType "ExperimentTemplateId" TargetAccountConfiguration = Value Prelude.Text
  set :: PropertyType "ExperimentTemplateId" TargetAccountConfiguration
-> TargetAccountConfiguration -> TargetAccountConfiguration
set PropertyType "ExperimentTemplateId" TargetAccountConfiguration
newValue TargetAccountConfiguration {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TargetAccountConfiguration -> ()
accountId :: TargetAccountConfiguration -> Value Text
description :: TargetAccountConfiguration -> Maybe (Value Text)
experimentTemplateId :: TargetAccountConfiguration -> Value Text
roleArn :: TargetAccountConfiguration -> Value Text
haddock_workaround_ :: ()
accountId :: Value Text
description :: Maybe (Value Text)
experimentTemplateId :: Value Text
roleArn :: Value Text
..}
    = TargetAccountConfiguration {experimentTemplateId :: Value Text
experimentTemplateId = PropertyType "ExperimentTemplateId" TargetAccountConfiguration
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
accountId :: Value Text
description :: Maybe (Value Text)
roleArn :: Value Text
haddock_workaround_ :: ()
accountId :: Value Text
description :: Maybe (Value Text)
roleArn :: Value Text
..}
instance Property "RoleArn" TargetAccountConfiguration where
  type PropertyType "RoleArn" TargetAccountConfiguration = Value Prelude.Text
  set :: PropertyType "RoleArn" TargetAccountConfiguration
-> TargetAccountConfiguration -> TargetAccountConfiguration
set PropertyType "RoleArn" TargetAccountConfiguration
newValue TargetAccountConfiguration {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TargetAccountConfiguration -> ()
accountId :: TargetAccountConfiguration -> Value Text
description :: TargetAccountConfiguration -> Maybe (Value Text)
experimentTemplateId :: TargetAccountConfiguration -> Value Text
roleArn :: TargetAccountConfiguration -> Value Text
haddock_workaround_ :: ()
accountId :: Value Text
description :: Maybe (Value Text)
experimentTemplateId :: Value Text
roleArn :: Value Text
..}
    = TargetAccountConfiguration {roleArn :: Value Text
roleArn = PropertyType "RoleArn" TargetAccountConfiguration
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
accountId :: Value Text
description :: Maybe (Value Text)
experimentTemplateId :: Value Text
haddock_workaround_ :: ()
accountId :: Value Text
description :: Maybe (Value Text)
experimentTemplateId :: Value Text
..}