module Stratosphere.RDS.GlobalCluster.GlobalEndpointProperty (
        GlobalEndpointProperty(..), mkGlobalEndpointProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data GlobalEndpointProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-globalcluster-globalendpoint.html>
    GlobalEndpointProperty {GlobalEndpointProperty -> ()
haddock_workaround_ :: (),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-globalcluster-globalendpoint.html#cfn-rds-globalcluster-globalendpoint-address>
                            GlobalEndpointProperty -> Maybe (Value Text)
address :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (GlobalEndpointProperty -> GlobalEndpointProperty -> Bool
(GlobalEndpointProperty -> GlobalEndpointProperty -> Bool)
-> (GlobalEndpointProperty -> GlobalEndpointProperty -> Bool)
-> Eq GlobalEndpointProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GlobalEndpointProperty -> GlobalEndpointProperty -> Bool
== :: GlobalEndpointProperty -> GlobalEndpointProperty -> Bool
$c/= :: GlobalEndpointProperty -> GlobalEndpointProperty -> Bool
/= :: GlobalEndpointProperty -> GlobalEndpointProperty -> Bool
Prelude.Eq, Int -> GlobalEndpointProperty -> ShowS
[GlobalEndpointProperty] -> ShowS
GlobalEndpointProperty -> String
(Int -> GlobalEndpointProperty -> ShowS)
-> (GlobalEndpointProperty -> String)
-> ([GlobalEndpointProperty] -> ShowS)
-> Show GlobalEndpointProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GlobalEndpointProperty -> ShowS
showsPrec :: Int -> GlobalEndpointProperty -> ShowS
$cshow :: GlobalEndpointProperty -> String
show :: GlobalEndpointProperty -> String
$cshowList :: [GlobalEndpointProperty] -> ShowS
showList :: [GlobalEndpointProperty] -> ShowS
Prelude.Show)
mkGlobalEndpointProperty :: GlobalEndpointProperty
mkGlobalEndpointProperty :: GlobalEndpointProperty
mkGlobalEndpointProperty
  = GlobalEndpointProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), address :: Maybe (Value Text)
address = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties GlobalEndpointProperty where
  toResourceProperties :: GlobalEndpointProperty -> ResourceProperties
toResourceProperties GlobalEndpointProperty {Maybe (Value Text)
()
haddock_workaround_ :: GlobalEndpointProperty -> ()
address :: GlobalEndpointProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
address :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::RDS::GlobalCluster.GlobalEndpoint",
         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
"Address" (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)
address])}
instance JSON.ToJSON GlobalEndpointProperty where
  toJSON :: GlobalEndpointProperty -> Value
toJSON GlobalEndpointProperty {Maybe (Value Text)
()
haddock_workaround_ :: GlobalEndpointProperty -> ()
address :: GlobalEndpointProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
address :: 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
"Address" (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)
address]))
instance Property "Address" GlobalEndpointProperty where
  type PropertyType "Address" GlobalEndpointProperty = Value Prelude.Text
  set :: PropertyType "Address" GlobalEndpointProperty
-> GlobalEndpointProperty -> GlobalEndpointProperty
set PropertyType "Address" GlobalEndpointProperty
newValue GlobalEndpointProperty {Maybe (Value Text)
()
haddock_workaround_ :: GlobalEndpointProperty -> ()
address :: GlobalEndpointProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
address :: Maybe (Value Text)
..}
    = GlobalEndpointProperty {address :: Maybe (Value Text)
address = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Address" GlobalEndpointProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}