module Stratosphere.Route53RecoveryControl.Cluster.ClusterEndpointProperty (
        ClusterEndpointProperty(..), mkClusterEndpointProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ClusterEndpointProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53recoverycontrol-cluster-clusterendpoint.html>
    ClusterEndpointProperty {ClusterEndpointProperty -> ()
haddock_workaround_ :: (),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53recoverycontrol-cluster-clusterendpoint.html#cfn-route53recoverycontrol-cluster-clusterendpoint-endpoint>
                             ClusterEndpointProperty -> Maybe (Value Text)
endpoint :: (Prelude.Maybe (Value Prelude.Text)),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53recoverycontrol-cluster-clusterendpoint.html#cfn-route53recoverycontrol-cluster-clusterendpoint-region>
                             ClusterEndpointProperty -> Maybe (Value Text)
region :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (ClusterEndpointProperty -> ClusterEndpointProperty -> Bool
(ClusterEndpointProperty -> ClusterEndpointProperty -> Bool)
-> (ClusterEndpointProperty -> ClusterEndpointProperty -> Bool)
-> Eq ClusterEndpointProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ClusterEndpointProperty -> ClusterEndpointProperty -> Bool
== :: ClusterEndpointProperty -> ClusterEndpointProperty -> Bool
$c/= :: ClusterEndpointProperty -> ClusterEndpointProperty -> Bool
/= :: ClusterEndpointProperty -> ClusterEndpointProperty -> Bool
Prelude.Eq, Int -> ClusterEndpointProperty -> ShowS
[ClusterEndpointProperty] -> ShowS
ClusterEndpointProperty -> String
(Int -> ClusterEndpointProperty -> ShowS)
-> (ClusterEndpointProperty -> String)
-> ([ClusterEndpointProperty] -> ShowS)
-> Show ClusterEndpointProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ClusterEndpointProperty -> ShowS
showsPrec :: Int -> ClusterEndpointProperty -> ShowS
$cshow :: ClusterEndpointProperty -> String
show :: ClusterEndpointProperty -> String
$cshowList :: [ClusterEndpointProperty] -> ShowS
showList :: [ClusterEndpointProperty] -> ShowS
Prelude.Show)
mkClusterEndpointProperty :: ClusterEndpointProperty
mkClusterEndpointProperty :: ClusterEndpointProperty
mkClusterEndpointProperty
  = ClusterEndpointProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), endpoint :: Maybe (Value Text)
endpoint = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       region :: Maybe (Value Text)
region = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ClusterEndpointProperty where
  toResourceProperties :: ClusterEndpointProperty -> ResourceProperties
toResourceProperties ClusterEndpointProperty {Maybe (Value Text)
()
haddock_workaround_ :: ClusterEndpointProperty -> ()
endpoint :: ClusterEndpointProperty -> Maybe (Value Text)
region :: ClusterEndpointProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
endpoint :: Maybe (Value Text)
region :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Route53RecoveryControl::Cluster.ClusterEndpoint",
         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
"Endpoint" (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)
endpoint,
                            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
"Region" (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)
region])}
instance JSON.ToJSON ClusterEndpointProperty where
  toJSON :: ClusterEndpointProperty -> Value
toJSON ClusterEndpointProperty {Maybe (Value Text)
()
haddock_workaround_ :: ClusterEndpointProperty -> ()
endpoint :: ClusterEndpointProperty -> Maybe (Value Text)
region :: ClusterEndpointProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
endpoint :: Maybe (Value Text)
region :: 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
"Endpoint" (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)
endpoint,
               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
"Region" (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)
region]))
instance Property "Endpoint" ClusterEndpointProperty where
  type PropertyType "Endpoint" ClusterEndpointProperty = Value Prelude.Text
  set :: PropertyType "Endpoint" ClusterEndpointProperty
-> ClusterEndpointProperty -> ClusterEndpointProperty
set PropertyType "Endpoint" ClusterEndpointProperty
newValue ClusterEndpointProperty {Maybe (Value Text)
()
haddock_workaround_ :: ClusterEndpointProperty -> ()
endpoint :: ClusterEndpointProperty -> Maybe (Value Text)
region :: ClusterEndpointProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
endpoint :: Maybe (Value Text)
region :: Maybe (Value Text)
..}
    = ClusterEndpointProperty {endpoint :: Maybe (Value Text)
endpoint = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Endpoint" ClusterEndpointProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
region :: Maybe (Value Text)
haddock_workaround_ :: ()
region :: Maybe (Value Text)
..}
instance Property "Region" ClusterEndpointProperty where
  type PropertyType "Region" ClusterEndpointProperty = Value Prelude.Text
  set :: PropertyType "Region" ClusterEndpointProperty
-> ClusterEndpointProperty -> ClusterEndpointProperty
set PropertyType "Region" ClusterEndpointProperty
newValue ClusterEndpointProperty {Maybe (Value Text)
()
haddock_workaround_ :: ClusterEndpointProperty -> ()
endpoint :: ClusterEndpointProperty -> Maybe (Value Text)
region :: ClusterEndpointProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
endpoint :: Maybe (Value Text)
region :: Maybe (Value Text)
..}
    = ClusterEndpointProperty {region :: Maybe (Value Text)
region = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Region" ClusterEndpointProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
endpoint :: Maybe (Value Text)
haddock_workaround_ :: ()
endpoint :: Maybe (Value Text)
..}