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