module Stratosphere.ServiceDiscovery.PublicDnsNamespace.PropertiesProperty (
module Exports, PropertiesProperty(..), mkPropertiesProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.ServiceDiscovery.PublicDnsNamespace.PublicDnsPropertiesMutableProperty as Exports
import Stratosphere.ResourceProperties
data PropertiesProperty
=
PropertiesProperty {PropertiesProperty -> ()
haddock_workaround_ :: (),
PropertiesProperty -> Maybe PublicDnsPropertiesMutableProperty
dnsProperties :: (Prelude.Maybe PublicDnsPropertiesMutableProperty)}
deriving stock (PropertiesProperty -> PropertiesProperty -> Bool
(PropertiesProperty -> PropertiesProperty -> Bool)
-> (PropertiesProperty -> PropertiesProperty -> Bool)
-> Eq PropertiesProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PropertiesProperty -> PropertiesProperty -> Bool
== :: PropertiesProperty -> PropertiesProperty -> Bool
$c/= :: PropertiesProperty -> PropertiesProperty -> Bool
/= :: PropertiesProperty -> PropertiesProperty -> Bool
Prelude.Eq, Int -> PropertiesProperty -> ShowS
[PropertiesProperty] -> ShowS
PropertiesProperty -> String
(Int -> PropertiesProperty -> ShowS)
-> (PropertiesProperty -> String)
-> ([PropertiesProperty] -> ShowS)
-> Show PropertiesProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PropertiesProperty -> ShowS
showsPrec :: Int -> PropertiesProperty -> ShowS
$cshow :: PropertiesProperty -> String
show :: PropertiesProperty -> String
$cshowList :: [PropertiesProperty] -> ShowS
showList :: [PropertiesProperty] -> ShowS
Prelude.Show)
mkPropertiesProperty :: PropertiesProperty
mkPropertiesProperty :: PropertiesProperty
mkPropertiesProperty
= PropertiesProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), dnsProperties :: Maybe PublicDnsPropertiesMutableProperty
dnsProperties = Maybe PublicDnsPropertiesMutableProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PropertiesProperty where
toResourceProperties :: PropertiesProperty -> ResourceProperties
toResourceProperties PropertiesProperty {Maybe PublicDnsPropertiesMutableProperty
()
haddock_workaround_ :: PropertiesProperty -> ()
dnsProperties :: PropertiesProperty -> Maybe PublicDnsPropertiesMutableProperty
haddock_workaround_ :: ()
dnsProperties :: Maybe PublicDnsPropertiesMutableProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::ServiceDiscovery::PublicDnsNamespace.Properties",
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 -> PublicDnsPropertiesMutableProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DnsProperties" (PublicDnsPropertiesMutableProperty -> (Key, Value))
-> Maybe PublicDnsPropertiesMutableProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PublicDnsPropertiesMutableProperty
dnsProperties])}
instance JSON.ToJSON PropertiesProperty where
toJSON :: PropertiesProperty -> Value
toJSON PropertiesProperty {Maybe PublicDnsPropertiesMutableProperty
()
haddock_workaround_ :: PropertiesProperty -> ()
dnsProperties :: PropertiesProperty -> Maybe PublicDnsPropertiesMutableProperty
haddock_workaround_ :: ()
dnsProperties :: Maybe PublicDnsPropertiesMutableProperty
..}
= [(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 -> PublicDnsPropertiesMutableProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DnsProperties" (PublicDnsPropertiesMutableProperty -> (Key, Value))
-> Maybe PublicDnsPropertiesMutableProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PublicDnsPropertiesMutableProperty
dnsProperties]))
instance Property "DnsProperties" PropertiesProperty where
type PropertyType "DnsProperties" PropertiesProperty = PublicDnsPropertiesMutableProperty
set :: PropertyType "DnsProperties" PropertiesProperty
-> PropertiesProperty -> PropertiesProperty
set PropertyType "DnsProperties" PropertiesProperty
newValue PropertiesProperty {Maybe PublicDnsPropertiesMutableProperty
()
haddock_workaround_ :: PropertiesProperty -> ()
dnsProperties :: PropertiesProperty -> Maybe PublicDnsPropertiesMutableProperty
haddock_workaround_ :: ()
dnsProperties :: Maybe PublicDnsPropertiesMutableProperty
..}
= PropertiesProperty {dnsProperties :: Maybe PublicDnsPropertiesMutableProperty
dnsProperties = PublicDnsPropertiesMutableProperty
-> Maybe PublicDnsPropertiesMutableProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DnsProperties" PropertiesProperty
PublicDnsPropertiesMutableProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}