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