module Stratosphere.ServiceDiscovery.PublicDnsNamespace (
        module Exports, PublicDnsNamespace(..), mkPublicDnsNamespace
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.ServiceDiscovery.PublicDnsNamespace.PropertiesProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data PublicDnsNamespace
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicediscovery-publicdnsnamespace.html>
    PublicDnsNamespace {PublicDnsNamespace -> ()
haddock_workaround_ :: (),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicediscovery-publicdnsnamespace.html#cfn-servicediscovery-publicdnsnamespace-description>
                        PublicDnsNamespace -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicediscovery-publicdnsnamespace.html#cfn-servicediscovery-publicdnsnamespace-name>
                        PublicDnsNamespace -> Value Text
name :: (Value Prelude.Text),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicediscovery-publicdnsnamespace.html#cfn-servicediscovery-publicdnsnamespace-properties>
                        PublicDnsNamespace -> Maybe PropertiesProperty
properties :: (Prelude.Maybe PropertiesProperty),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicediscovery-publicdnsnamespace.html#cfn-servicediscovery-publicdnsnamespace-tags>
                        PublicDnsNamespace -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (PublicDnsNamespace -> PublicDnsNamespace -> Bool
(PublicDnsNamespace -> PublicDnsNamespace -> Bool)
-> (PublicDnsNamespace -> PublicDnsNamespace -> Bool)
-> Eq PublicDnsNamespace
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PublicDnsNamespace -> PublicDnsNamespace -> Bool
== :: PublicDnsNamespace -> PublicDnsNamespace -> Bool
$c/= :: PublicDnsNamespace -> PublicDnsNamespace -> Bool
/= :: PublicDnsNamespace -> PublicDnsNamespace -> Bool
Prelude.Eq, Int -> PublicDnsNamespace -> ShowS
[PublicDnsNamespace] -> ShowS
PublicDnsNamespace -> String
(Int -> PublicDnsNamespace -> ShowS)
-> (PublicDnsNamespace -> String)
-> ([PublicDnsNamespace] -> ShowS)
-> Show PublicDnsNamespace
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PublicDnsNamespace -> ShowS
showsPrec :: Int -> PublicDnsNamespace -> ShowS
$cshow :: PublicDnsNamespace -> String
show :: PublicDnsNamespace -> String
$cshowList :: [PublicDnsNamespace] -> ShowS
showList :: [PublicDnsNamespace] -> ShowS
Prelude.Show)
mkPublicDnsNamespace :: Value Prelude.Text -> PublicDnsNamespace
mkPublicDnsNamespace :: Value Text -> PublicDnsNamespace
mkPublicDnsNamespace Value Text
name
  = PublicDnsNamespace
      {haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name,
       description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, properties :: Maybe PropertiesProperty
properties = Maybe PropertiesProperty
forall a. Maybe a
Prelude.Nothing,
       tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PublicDnsNamespace where
  toResourceProperties :: PublicDnsNamespace -> ResourceProperties
toResourceProperties PublicDnsNamespace {Maybe [Tag]
Maybe (Value Text)
Maybe PropertiesProperty
()
Value Text
haddock_workaround_ :: PublicDnsNamespace -> ()
description :: PublicDnsNamespace -> Maybe (Value Text)
name :: PublicDnsNamespace -> Value Text
properties :: PublicDnsNamespace -> Maybe PropertiesProperty
tags :: PublicDnsNamespace -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
properties :: Maybe PropertiesProperty
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ServiceDiscovery::PublicDnsNamespace",
         supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"Name" 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..= Value Text
name]
                           ([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
"Description" (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)
description,
                               Key -> PropertiesProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Properties" (PropertiesProperty -> (Key, Value))
-> Maybe PropertiesProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PropertiesProperty
properties,
                               Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON PublicDnsNamespace where
  toJSON :: PublicDnsNamespace -> Value
toJSON PublicDnsNamespace {Maybe [Tag]
Maybe (Value Text)
Maybe PropertiesProperty
()
Value Text
haddock_workaround_ :: PublicDnsNamespace -> ()
description :: PublicDnsNamespace -> Maybe (Value Text)
name :: PublicDnsNamespace -> Value Text
properties :: PublicDnsNamespace -> Maybe PropertiesProperty
tags :: PublicDnsNamespace -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
properties :: Maybe PropertiesProperty
tags :: Maybe [Tag]
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"Name" 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..= Value Text
name]
              ([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
"Description" (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)
description,
                  Key -> PropertiesProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Properties" (PropertiesProperty -> (Key, Value))
-> Maybe PropertiesProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PropertiesProperty
properties,
                  Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "Description" PublicDnsNamespace where
  type PropertyType "Description" PublicDnsNamespace = Value Prelude.Text
  set :: PropertyType "Description" PublicDnsNamespace
-> PublicDnsNamespace -> PublicDnsNamespace
set PropertyType "Description" PublicDnsNamespace
newValue PublicDnsNamespace {Maybe [Tag]
Maybe (Value Text)
Maybe PropertiesProperty
()
Value Text
haddock_workaround_ :: PublicDnsNamespace -> ()
description :: PublicDnsNamespace -> Maybe (Value Text)
name :: PublicDnsNamespace -> Value Text
properties :: PublicDnsNamespace -> Maybe PropertiesProperty
tags :: PublicDnsNamespace -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
properties :: Maybe PropertiesProperty
tags :: Maybe [Tag]
..}
    = PublicDnsNamespace {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" PublicDnsNamespace
Value Text
newValue, Maybe [Tag]
Maybe PropertiesProperty
()
Value Text
haddock_workaround_ :: ()
name :: Value Text
properties :: Maybe PropertiesProperty
tags :: Maybe [Tag]
haddock_workaround_ :: ()
name :: Value Text
properties :: Maybe PropertiesProperty
tags :: Maybe [Tag]
..}
instance Property "Name" PublicDnsNamespace where
  type PropertyType "Name" PublicDnsNamespace = Value Prelude.Text
  set :: PropertyType "Name" PublicDnsNamespace
-> PublicDnsNamespace -> PublicDnsNamespace
set PropertyType "Name" PublicDnsNamespace
newValue PublicDnsNamespace {Maybe [Tag]
Maybe (Value Text)
Maybe PropertiesProperty
()
Value Text
haddock_workaround_ :: PublicDnsNamespace -> ()
description :: PublicDnsNamespace -> Maybe (Value Text)
name :: PublicDnsNamespace -> Value Text
properties :: PublicDnsNamespace -> Maybe PropertiesProperty
tags :: PublicDnsNamespace -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
properties :: Maybe PropertiesProperty
tags :: Maybe [Tag]
..}
    = PublicDnsNamespace {name :: Value Text
name = PropertyType "Name" PublicDnsNamespace
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
Maybe PropertiesProperty
()
haddock_workaround_ :: ()
description :: Maybe (Value Text)
properties :: Maybe PropertiesProperty
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
properties :: Maybe PropertiesProperty
tags :: Maybe [Tag]
..}
instance Property "Properties" PublicDnsNamespace where
  type PropertyType "Properties" PublicDnsNamespace = PropertiesProperty
  set :: PropertyType "Properties" PublicDnsNamespace
-> PublicDnsNamespace -> PublicDnsNamespace
set PropertyType "Properties" PublicDnsNamespace
newValue PublicDnsNamespace {Maybe [Tag]
Maybe (Value Text)
Maybe PropertiesProperty
()
Value Text
haddock_workaround_ :: PublicDnsNamespace -> ()
description :: PublicDnsNamespace -> Maybe (Value Text)
name :: PublicDnsNamespace -> Value Text
properties :: PublicDnsNamespace -> Maybe PropertiesProperty
tags :: PublicDnsNamespace -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
properties :: Maybe PropertiesProperty
tags :: Maybe [Tag]
..}
    = PublicDnsNamespace {properties :: Maybe PropertiesProperty
properties = PropertiesProperty -> Maybe PropertiesProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Properties" PublicDnsNamespace
PropertiesProperty
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Tags" PublicDnsNamespace where
  type PropertyType "Tags" PublicDnsNamespace = [Tag]
  set :: PropertyType "Tags" PublicDnsNamespace
-> PublicDnsNamespace -> PublicDnsNamespace
set PropertyType "Tags" PublicDnsNamespace
newValue PublicDnsNamespace {Maybe [Tag]
Maybe (Value Text)
Maybe PropertiesProperty
()
Value Text
haddock_workaround_ :: PublicDnsNamespace -> ()
description :: PublicDnsNamespace -> Maybe (Value Text)
name :: PublicDnsNamespace -> Value Text
properties :: PublicDnsNamespace -> Maybe PropertiesProperty
tags :: PublicDnsNamespace -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
properties :: Maybe PropertiesProperty
tags :: Maybe [Tag]
..}
    = PublicDnsNamespace {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" PublicDnsNamespace
newValue, Maybe (Value Text)
Maybe PropertiesProperty
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
properties :: Maybe PropertiesProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
properties :: Maybe PropertiesProperty
..}