module Stratosphere.ServiceDiscovery.HttpNamespace (
HttpNamespace(..), mkHttpNamespace
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data HttpNamespace
=
HttpNamespace {HttpNamespace -> ()
haddock_workaround_ :: (),
HttpNamespace -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
HttpNamespace -> Value Text
name :: (Value Prelude.Text),
HttpNamespace -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (HttpNamespace -> HttpNamespace -> Bool
(HttpNamespace -> HttpNamespace -> Bool)
-> (HttpNamespace -> HttpNamespace -> Bool) -> Eq HttpNamespace
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: HttpNamespace -> HttpNamespace -> Bool
== :: HttpNamespace -> HttpNamespace -> Bool
$c/= :: HttpNamespace -> HttpNamespace -> Bool
/= :: HttpNamespace -> HttpNamespace -> Bool
Prelude.Eq, Int -> HttpNamespace -> ShowS
[HttpNamespace] -> ShowS
HttpNamespace -> String
(Int -> HttpNamespace -> ShowS)
-> (HttpNamespace -> String)
-> ([HttpNamespace] -> ShowS)
-> Show HttpNamespace
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> HttpNamespace -> ShowS
showsPrec :: Int -> HttpNamespace -> ShowS
$cshow :: HttpNamespace -> String
show :: HttpNamespace -> String
$cshowList :: [HttpNamespace] -> ShowS
showList :: [HttpNamespace] -> ShowS
Prelude.Show)
mkHttpNamespace :: Value Prelude.Text -> HttpNamespace
mkHttpNamespace :: Value Text -> HttpNamespace
mkHttpNamespace Value Text
name
= HttpNamespace
{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, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties HttpNamespace where
toResourceProperties :: HttpNamespace -> ResourceProperties
toResourceProperties HttpNamespace {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: HttpNamespace -> ()
description :: HttpNamespace -> Maybe (Value Text)
name :: HttpNamespace -> Value Text
tags :: HttpNamespace -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::ServiceDiscovery::HttpNamespace",
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 -> [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 HttpNamespace where
toJSON :: HttpNamespace -> Value
toJSON HttpNamespace {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: HttpNamespace -> ()
description :: HttpNamespace -> Maybe (Value Text)
name :: HttpNamespace -> Value Text
tags :: HttpNamespace -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
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 -> [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" HttpNamespace where
type PropertyType "Description" HttpNamespace = Value Prelude.Text
set :: PropertyType "Description" HttpNamespace
-> HttpNamespace -> HttpNamespace
set PropertyType "Description" HttpNamespace
newValue HttpNamespace {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: HttpNamespace -> ()
description :: HttpNamespace -> Maybe (Value Text)
name :: HttpNamespace -> Value Text
tags :: HttpNamespace -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
..}
= HttpNamespace {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" HttpNamespace
Value Text
newValue, Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
name :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
name :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Name" HttpNamespace where
type PropertyType "Name" HttpNamespace = Value Prelude.Text
set :: PropertyType "Name" HttpNamespace -> HttpNamespace -> HttpNamespace
set PropertyType "Name" HttpNamespace
newValue HttpNamespace {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: HttpNamespace -> ()
description :: HttpNamespace -> Maybe (Value Text)
name :: HttpNamespace -> Value Text
tags :: HttpNamespace -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
..}
= HttpNamespace {name :: Value Text
name = PropertyType "Name" HttpNamespace
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ()
description :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Tags" HttpNamespace where
type PropertyType "Tags" HttpNamespace = [Tag]
set :: PropertyType "Tags" HttpNamespace -> HttpNamespace -> HttpNamespace
set PropertyType "Tags" HttpNamespace
newValue HttpNamespace {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: HttpNamespace -> ()
description :: HttpNamespace -> Maybe (Value Text)
name :: HttpNamespace -> Value Text
tags :: HttpNamespace -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
..}
= HttpNamespace {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" HttpNamespace
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
..}