module Stratosphere.Route53RecoveryControl.ControlPanel (
ControlPanel(..), mkControlPanel
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data ControlPanel
=
ControlPanel {ControlPanel -> ()
haddock_workaround_ :: (),
ControlPanel -> Maybe (Value Text)
clusterArn :: (Prelude.Maybe (Value Prelude.Text)),
ControlPanel -> Value Text
name :: (Value Prelude.Text),
ControlPanel -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (ControlPanel -> ControlPanel -> Bool
(ControlPanel -> ControlPanel -> Bool)
-> (ControlPanel -> ControlPanel -> Bool) -> Eq ControlPanel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ControlPanel -> ControlPanel -> Bool
== :: ControlPanel -> ControlPanel -> Bool
$c/= :: ControlPanel -> ControlPanel -> Bool
/= :: ControlPanel -> ControlPanel -> Bool
Prelude.Eq, Int -> ControlPanel -> ShowS
[ControlPanel] -> ShowS
ControlPanel -> String
(Int -> ControlPanel -> ShowS)
-> (ControlPanel -> String)
-> ([ControlPanel] -> ShowS)
-> Show ControlPanel
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ControlPanel -> ShowS
showsPrec :: Int -> ControlPanel -> ShowS
$cshow :: ControlPanel -> String
show :: ControlPanel -> String
$cshowList :: [ControlPanel] -> ShowS
showList :: [ControlPanel] -> ShowS
Prelude.Show)
mkControlPanel :: Value Prelude.Text -> ControlPanel
mkControlPanel :: Value Text -> ControlPanel
mkControlPanel Value Text
name
= ControlPanel
{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, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ControlPanel where
toResourceProperties :: ControlPanel -> ResourceProperties
toResourceProperties ControlPanel {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ControlPanel -> ()
clusterArn :: ControlPanel -> Maybe (Value Text)
name :: ControlPanel -> Value Text
tags :: ControlPanel -> Maybe [Tag]
haddock_workaround_ :: ()
clusterArn :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Route53RecoveryControl::ControlPanel",
supportsTags :: Bool
supportsTags = Bool
Prelude.True,
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 -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON ControlPanel where
toJSON :: ControlPanel -> Value
toJSON ControlPanel {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ControlPanel -> ()
clusterArn :: ControlPanel -> Maybe (Value Text)
name :: ControlPanel -> Value Text
tags :: ControlPanel -> Maybe [Tag]
haddock_workaround_ :: ()
clusterArn :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
..}
= [(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 -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "ClusterArn" ControlPanel where
type PropertyType "ClusterArn" ControlPanel = Value Prelude.Text
set :: PropertyType "ClusterArn" ControlPanel
-> ControlPanel -> ControlPanel
set PropertyType "ClusterArn" ControlPanel
newValue ControlPanel {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ControlPanel -> ()
clusterArn :: ControlPanel -> Maybe (Value Text)
name :: ControlPanel -> Value Text
tags :: ControlPanel -> Maybe [Tag]
haddock_workaround_ :: ()
clusterArn :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
..}
= ControlPanel {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" ControlPanel
Value Text
newValue, Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
name :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
name :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Name" ControlPanel where
type PropertyType "Name" ControlPanel = Value Prelude.Text
set :: PropertyType "Name" ControlPanel -> ControlPanel -> ControlPanel
set PropertyType "Name" ControlPanel
newValue ControlPanel {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ControlPanel -> ()
clusterArn :: ControlPanel -> Maybe (Value Text)
name :: ControlPanel -> Value Text
tags :: ControlPanel -> Maybe [Tag]
haddock_workaround_ :: ()
clusterArn :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
..} = ControlPanel {name :: Value Text
name = PropertyType "Name" ControlPanel
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ()
clusterArn :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
clusterArn :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Tags" ControlPanel where
type PropertyType "Tags" ControlPanel = [Tag]
set :: PropertyType "Tags" ControlPanel -> ControlPanel -> ControlPanel
set PropertyType "Tags" ControlPanel
newValue ControlPanel {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ControlPanel -> ()
clusterArn :: ControlPanel -> Maybe (Value Text)
name :: ControlPanel -> Value Text
tags :: ControlPanel -> Maybe [Tag]
haddock_workaround_ :: ()
clusterArn :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
..}
= ControlPanel {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" ControlPanel
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
clusterArn :: Maybe (Value Text)
name :: Value Text
haddock_workaround_ :: ()
clusterArn :: Maybe (Value Text)
name :: Value Text
..}