module Stratosphere.ARCRegionSwitch.Plan.RegionSwitchPlanConfigurationProperty (
        RegionSwitchPlanConfigurationProperty(..),
        mkRegionSwitchPlanConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data RegionSwitchPlanConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-regionswitchplanconfiguration.html>
    RegionSwitchPlanConfigurationProperty {RegionSwitchPlanConfigurationProperty -> ()
haddock_workaround_ :: (),
                                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-regionswitchplanconfiguration.html#cfn-arcregionswitch-plan-regionswitchplanconfiguration-arn>
                                           RegionSwitchPlanConfigurationProperty -> Value Text
arn :: (Value Prelude.Text),
                                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-regionswitchplanconfiguration.html#cfn-arcregionswitch-plan-regionswitchplanconfiguration-crossaccountrole>
                                           RegionSwitchPlanConfigurationProperty -> Maybe (Value Text)
crossAccountRole :: (Prelude.Maybe (Value Prelude.Text)),
                                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-regionswitchplanconfiguration.html#cfn-arcregionswitch-plan-regionswitchplanconfiguration-externalid>
                                           RegionSwitchPlanConfigurationProperty -> Maybe (Value Text)
externalId :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (RegionSwitchPlanConfigurationProperty
-> RegionSwitchPlanConfigurationProperty -> Bool
(RegionSwitchPlanConfigurationProperty
 -> RegionSwitchPlanConfigurationProperty -> Bool)
-> (RegionSwitchPlanConfigurationProperty
    -> RegionSwitchPlanConfigurationProperty -> Bool)
-> Eq RegionSwitchPlanConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RegionSwitchPlanConfigurationProperty
-> RegionSwitchPlanConfigurationProperty -> Bool
== :: RegionSwitchPlanConfigurationProperty
-> RegionSwitchPlanConfigurationProperty -> Bool
$c/= :: RegionSwitchPlanConfigurationProperty
-> RegionSwitchPlanConfigurationProperty -> Bool
/= :: RegionSwitchPlanConfigurationProperty
-> RegionSwitchPlanConfigurationProperty -> Bool
Prelude.Eq, Int -> RegionSwitchPlanConfigurationProperty -> ShowS
[RegionSwitchPlanConfigurationProperty] -> ShowS
RegionSwitchPlanConfigurationProperty -> String
(Int -> RegionSwitchPlanConfigurationProperty -> ShowS)
-> (RegionSwitchPlanConfigurationProperty -> String)
-> ([RegionSwitchPlanConfigurationProperty] -> ShowS)
-> Show RegionSwitchPlanConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RegionSwitchPlanConfigurationProperty -> ShowS
showsPrec :: Int -> RegionSwitchPlanConfigurationProperty -> ShowS
$cshow :: RegionSwitchPlanConfigurationProperty -> String
show :: RegionSwitchPlanConfigurationProperty -> String
$cshowList :: [RegionSwitchPlanConfigurationProperty] -> ShowS
showList :: [RegionSwitchPlanConfigurationProperty] -> ShowS
Prelude.Show)
mkRegionSwitchPlanConfigurationProperty ::
  Value Prelude.Text -> RegionSwitchPlanConfigurationProperty
mkRegionSwitchPlanConfigurationProperty :: Value Text -> RegionSwitchPlanConfigurationProperty
mkRegionSwitchPlanConfigurationProperty Value Text
arn
  = RegionSwitchPlanConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), arn :: Value Text
arn = Value Text
arn,
       crossAccountRole :: Maybe (Value Text)
crossAccountRole = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, externalId :: Maybe (Value Text)
externalId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RegionSwitchPlanConfigurationProperty where
  toResourceProperties :: RegionSwitchPlanConfigurationProperty -> ResourceProperties
toResourceProperties RegionSwitchPlanConfigurationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RegionSwitchPlanConfigurationProperty -> ()
arn :: RegionSwitchPlanConfigurationProperty -> Value Text
crossAccountRole :: RegionSwitchPlanConfigurationProperty -> Maybe (Value Text)
externalId :: RegionSwitchPlanConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Value Text
crossAccountRole :: Maybe (Value Text)
externalId :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ARCRegionSwitch::Plan.RegionSwitchPlanConfiguration",
         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
"Arn" 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
arn]
                           ([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
"CrossAccountRole" (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)
crossAccountRole,
                               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
"ExternalId" (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)
externalId]))}
instance JSON.ToJSON RegionSwitchPlanConfigurationProperty where
  toJSON :: RegionSwitchPlanConfigurationProperty -> Value
toJSON RegionSwitchPlanConfigurationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RegionSwitchPlanConfigurationProperty -> ()
arn :: RegionSwitchPlanConfigurationProperty -> Value Text
crossAccountRole :: RegionSwitchPlanConfigurationProperty -> Maybe (Value Text)
externalId :: RegionSwitchPlanConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Value Text
crossAccountRole :: Maybe (Value Text)
externalId :: 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
"Arn" 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
arn]
              ([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
"CrossAccountRole" (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)
crossAccountRole,
                  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
"ExternalId" (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)
externalId])))
instance Property "Arn" RegionSwitchPlanConfigurationProperty where
  type PropertyType "Arn" RegionSwitchPlanConfigurationProperty = Value Prelude.Text
  set :: PropertyType "Arn" RegionSwitchPlanConfigurationProperty
-> RegionSwitchPlanConfigurationProperty
-> RegionSwitchPlanConfigurationProperty
set PropertyType "Arn" RegionSwitchPlanConfigurationProperty
newValue RegionSwitchPlanConfigurationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RegionSwitchPlanConfigurationProperty -> ()
arn :: RegionSwitchPlanConfigurationProperty -> Value Text
crossAccountRole :: RegionSwitchPlanConfigurationProperty -> Maybe (Value Text)
externalId :: RegionSwitchPlanConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Value Text
crossAccountRole :: Maybe (Value Text)
externalId :: Maybe (Value Text)
..}
    = RegionSwitchPlanConfigurationProperty {arn :: Value Text
arn = PropertyType "Arn" RegionSwitchPlanConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
crossAccountRole :: Maybe (Value Text)
externalId :: Maybe (Value Text)
haddock_workaround_ :: ()
crossAccountRole :: Maybe (Value Text)
externalId :: Maybe (Value Text)
..}
instance Property "CrossAccountRole" RegionSwitchPlanConfigurationProperty where
  type PropertyType "CrossAccountRole" RegionSwitchPlanConfigurationProperty = Value Prelude.Text
  set :: PropertyType
  "CrossAccountRole" RegionSwitchPlanConfigurationProperty
-> RegionSwitchPlanConfigurationProperty
-> RegionSwitchPlanConfigurationProperty
set PropertyType
  "CrossAccountRole" RegionSwitchPlanConfigurationProperty
newValue RegionSwitchPlanConfigurationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RegionSwitchPlanConfigurationProperty -> ()
arn :: RegionSwitchPlanConfigurationProperty -> Value Text
crossAccountRole :: RegionSwitchPlanConfigurationProperty -> Maybe (Value Text)
externalId :: RegionSwitchPlanConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Value Text
crossAccountRole :: Maybe (Value Text)
externalId :: Maybe (Value Text)
..}
    = RegionSwitchPlanConfigurationProperty
        {crossAccountRole :: Maybe (Value Text)
crossAccountRole = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "CrossAccountRole" RegionSwitchPlanConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
arn :: Value Text
externalId :: Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Value Text
externalId :: Maybe (Value Text)
..}
instance Property "ExternalId" RegionSwitchPlanConfigurationProperty where
  type PropertyType "ExternalId" RegionSwitchPlanConfigurationProperty = Value Prelude.Text
  set :: PropertyType "ExternalId" RegionSwitchPlanConfigurationProperty
-> RegionSwitchPlanConfigurationProperty
-> RegionSwitchPlanConfigurationProperty
set PropertyType "ExternalId" RegionSwitchPlanConfigurationProperty
newValue RegionSwitchPlanConfigurationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RegionSwitchPlanConfigurationProperty -> ()
arn :: RegionSwitchPlanConfigurationProperty -> Value Text
crossAccountRole :: RegionSwitchPlanConfigurationProperty -> Maybe (Value Text)
externalId :: RegionSwitchPlanConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Value Text
crossAccountRole :: Maybe (Value Text)
externalId :: Maybe (Value Text)
..}
    = RegionSwitchPlanConfigurationProperty
        {externalId :: Maybe (Value Text)
externalId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ExternalId" RegionSwitchPlanConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
arn :: Value Text
crossAccountRole :: Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Value Text
crossAccountRole :: Maybe (Value Text)
..}