module Stratosphere.Route53RecoveryControl.RoutingControl (
        RoutingControl(..), mkRoutingControl
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data RoutingControl
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53recoverycontrol-routingcontrol.html>
    RoutingControl {RoutingControl -> ()
haddock_workaround_ :: (),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53recoverycontrol-routingcontrol.html#cfn-route53recoverycontrol-routingcontrol-clusterarn>
                    RoutingControl -> Maybe (Value Text)
clusterArn :: (Prelude.Maybe (Value Prelude.Text)),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53recoverycontrol-routingcontrol.html#cfn-route53recoverycontrol-routingcontrol-controlpanelarn>
                    RoutingControl -> Maybe (Value Text)
controlPanelArn :: (Prelude.Maybe (Value Prelude.Text)),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53recoverycontrol-routingcontrol.html#cfn-route53recoverycontrol-routingcontrol-name>
                    RoutingControl -> Value Text
name :: (Value Prelude.Text)}
  deriving stock (RoutingControl -> RoutingControl -> Bool
(RoutingControl -> RoutingControl -> Bool)
-> (RoutingControl -> RoutingControl -> Bool) -> Eq RoutingControl
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RoutingControl -> RoutingControl -> Bool
== :: RoutingControl -> RoutingControl -> Bool
$c/= :: RoutingControl -> RoutingControl -> Bool
/= :: RoutingControl -> RoutingControl -> Bool
Prelude.Eq, Int -> RoutingControl -> ShowS
[RoutingControl] -> ShowS
RoutingControl -> String
(Int -> RoutingControl -> ShowS)
-> (RoutingControl -> String)
-> ([RoutingControl] -> ShowS)
-> Show RoutingControl
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RoutingControl -> ShowS
showsPrec :: Int -> RoutingControl -> ShowS
$cshow :: RoutingControl -> String
show :: RoutingControl -> String
$cshowList :: [RoutingControl] -> ShowS
showList :: [RoutingControl] -> ShowS
Prelude.Show)
mkRoutingControl :: Value Prelude.Text -> RoutingControl
mkRoutingControl :: Value Text -> RoutingControl
mkRoutingControl Value Text
name
  = RoutingControl
      {haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name,
       clusterArn :: Maybe (Value Text)
clusterArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, controlPanelArn :: Maybe (Value Text)
controlPanelArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RoutingControl where
  toResourceProperties :: RoutingControl -> ResourceProperties
toResourceProperties RoutingControl {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RoutingControl -> ()
clusterArn :: RoutingControl -> Maybe (Value Text)
controlPanelArn :: RoutingControl -> Maybe (Value Text)
name :: RoutingControl -> Value Text
haddock_workaround_ :: ()
clusterArn :: Maybe (Value Text)
controlPanelArn :: Maybe (Value Text)
name :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Route53RecoveryControl::RoutingControl",
         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
"Name" 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
name]
                           ([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
"ClusterArn" (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)
clusterArn,
                               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
"ControlPanelArn" (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)
controlPanelArn]))}
instance JSON.ToJSON RoutingControl where
  toJSON :: RoutingControl -> Value
toJSON RoutingControl {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RoutingControl -> ()
clusterArn :: RoutingControl -> Maybe (Value Text)
controlPanelArn :: RoutingControl -> Maybe (Value Text)
name :: RoutingControl -> Value Text
haddock_workaround_ :: ()
clusterArn :: Maybe (Value Text)
controlPanelArn :: Maybe (Value Text)
name :: 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
"Name" 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
name]
              ([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
"ClusterArn" (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)
clusterArn,
                  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
"ControlPanelArn" (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)
controlPanelArn])))
instance Property "ClusterArn" RoutingControl where
  type PropertyType "ClusterArn" RoutingControl = Value Prelude.Text
  set :: PropertyType "ClusterArn" RoutingControl
-> RoutingControl -> RoutingControl
set PropertyType "ClusterArn" RoutingControl
newValue RoutingControl {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RoutingControl -> ()
clusterArn :: RoutingControl -> Maybe (Value Text)
controlPanelArn :: RoutingControl -> Maybe (Value Text)
name :: RoutingControl -> Value Text
haddock_workaround_ :: ()
clusterArn :: Maybe (Value Text)
controlPanelArn :: Maybe (Value Text)
name :: Value Text
..}
    = RoutingControl {clusterArn :: Maybe (Value Text)
clusterArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ClusterArn" RoutingControl
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
controlPanelArn :: Maybe (Value Text)
name :: Value Text
haddock_workaround_ :: ()
controlPanelArn :: Maybe (Value Text)
name :: Value Text
..}
instance Property "ControlPanelArn" RoutingControl where
  type PropertyType "ControlPanelArn" RoutingControl = Value Prelude.Text
  set :: PropertyType "ControlPanelArn" RoutingControl
-> RoutingControl -> RoutingControl
set PropertyType "ControlPanelArn" RoutingControl
newValue RoutingControl {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RoutingControl -> ()
clusterArn :: RoutingControl -> Maybe (Value Text)
controlPanelArn :: RoutingControl -> Maybe (Value Text)
name :: RoutingControl -> Value Text
haddock_workaround_ :: ()
clusterArn :: Maybe (Value Text)
controlPanelArn :: Maybe (Value Text)
name :: Value Text
..}
    = RoutingControl {controlPanelArn :: Maybe (Value Text)
controlPanelArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ControlPanelArn" RoutingControl
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
clusterArn :: Maybe (Value Text)
name :: Value Text
haddock_workaround_ :: ()
clusterArn :: Maybe (Value Text)
name :: Value Text
..}
instance Property "Name" RoutingControl where
  type PropertyType "Name" RoutingControl = Value Prelude.Text
  set :: PropertyType "Name" RoutingControl
-> RoutingControl -> RoutingControl
set PropertyType "Name" RoutingControl
newValue RoutingControl {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RoutingControl -> ()
clusterArn :: RoutingControl -> Maybe (Value Text)
controlPanelArn :: RoutingControl -> Maybe (Value Text)
name :: RoutingControl -> Value Text
haddock_workaround_ :: ()
clusterArn :: Maybe (Value Text)
controlPanelArn :: Maybe (Value Text)
name :: Value Text
..}
    = RoutingControl {name :: Value Text
name = PropertyType "Name" RoutingControl
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
clusterArn :: Maybe (Value Text)
controlPanelArn :: Maybe (Value Text)
haddock_workaround_ :: ()
clusterArn :: Maybe (Value Text)
controlPanelArn :: Maybe (Value Text)
..}