module Stratosphere.RDS.DBCluster.ReadEndpointProperty (
ReadEndpointProperty(..), mkReadEndpointProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ReadEndpointProperty
=
ReadEndpointProperty {ReadEndpointProperty -> ()
haddock_workaround_ :: (),
ReadEndpointProperty -> Maybe (Value Text)
address :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (ReadEndpointProperty -> ReadEndpointProperty -> Bool
(ReadEndpointProperty -> ReadEndpointProperty -> Bool)
-> (ReadEndpointProperty -> ReadEndpointProperty -> Bool)
-> Eq ReadEndpointProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ReadEndpointProperty -> ReadEndpointProperty -> Bool
== :: ReadEndpointProperty -> ReadEndpointProperty -> Bool
$c/= :: ReadEndpointProperty -> ReadEndpointProperty -> Bool
/= :: ReadEndpointProperty -> ReadEndpointProperty -> Bool
Prelude.Eq, Int -> ReadEndpointProperty -> ShowS
[ReadEndpointProperty] -> ShowS
ReadEndpointProperty -> String
(Int -> ReadEndpointProperty -> ShowS)
-> (ReadEndpointProperty -> String)
-> ([ReadEndpointProperty] -> ShowS)
-> Show ReadEndpointProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ReadEndpointProperty -> ShowS
showsPrec :: Int -> ReadEndpointProperty -> ShowS
$cshow :: ReadEndpointProperty -> String
show :: ReadEndpointProperty -> String
$cshowList :: [ReadEndpointProperty] -> ShowS
showList :: [ReadEndpointProperty] -> ShowS
Prelude.Show)
mkReadEndpointProperty :: ReadEndpointProperty
mkReadEndpointProperty :: ReadEndpointProperty
mkReadEndpointProperty
= ReadEndpointProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), address :: Maybe (Value Text)
address = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ReadEndpointProperty where
toResourceProperties :: ReadEndpointProperty -> ResourceProperties
toResourceProperties ReadEndpointProperty {Maybe (Value Text)
()
haddock_workaround_ :: ReadEndpointProperty -> ()
address :: ReadEndpointProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
address :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::RDS::DBCluster.ReadEndpoint",
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 ReadEndpointProperty where
toJSON :: ReadEndpointProperty -> Value
toJSON ReadEndpointProperty {Maybe (Value Text)
()
haddock_workaround_ :: ReadEndpointProperty -> ()
address :: ReadEndpointProperty -> 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" ReadEndpointProperty where
type PropertyType "Address" ReadEndpointProperty = Value Prelude.Text
set :: PropertyType "Address" ReadEndpointProperty
-> ReadEndpointProperty -> ReadEndpointProperty
set PropertyType "Address" ReadEndpointProperty
newValue ReadEndpointProperty {Maybe (Value Text)
()
haddock_workaround_ :: ReadEndpointProperty -> ()
address :: ReadEndpointProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
address :: Maybe (Value Text)
..}
= ReadEndpointProperty {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" ReadEndpointProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}