module Stratosphere.Connect.TrafficDistributionGroup (
TrafficDistributionGroup(..), mkTrafficDistributionGroup
) 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 TrafficDistributionGroup
=
TrafficDistributionGroup {TrafficDistributionGroup -> ()
haddock_workaround_ :: (),
TrafficDistributionGroup -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
TrafficDistributionGroup -> Value Text
instanceArn :: (Value Prelude.Text),
TrafficDistributionGroup -> Value Text
name :: (Value Prelude.Text),
TrafficDistributionGroup -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (TrafficDistributionGroup -> TrafficDistributionGroup -> Bool
(TrafficDistributionGroup -> TrafficDistributionGroup -> Bool)
-> (TrafficDistributionGroup -> TrafficDistributionGroup -> Bool)
-> Eq TrafficDistributionGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TrafficDistributionGroup -> TrafficDistributionGroup -> Bool
== :: TrafficDistributionGroup -> TrafficDistributionGroup -> Bool
$c/= :: TrafficDistributionGroup -> TrafficDistributionGroup -> Bool
/= :: TrafficDistributionGroup -> TrafficDistributionGroup -> Bool
Prelude.Eq, Int -> TrafficDistributionGroup -> ShowS
[TrafficDistributionGroup] -> ShowS
TrafficDistributionGroup -> String
(Int -> TrafficDistributionGroup -> ShowS)
-> (TrafficDistributionGroup -> String)
-> ([TrafficDistributionGroup] -> ShowS)
-> Show TrafficDistributionGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TrafficDistributionGroup -> ShowS
showsPrec :: Int -> TrafficDistributionGroup -> ShowS
$cshow :: TrafficDistributionGroup -> String
show :: TrafficDistributionGroup -> String
$cshowList :: [TrafficDistributionGroup] -> ShowS
showList :: [TrafficDistributionGroup] -> ShowS
Prelude.Show)
mkTrafficDistributionGroup ::
Value Prelude.Text
-> Value Prelude.Text -> TrafficDistributionGroup
mkTrafficDistributionGroup :: Value Text -> Value Text -> TrafficDistributionGroup
mkTrafficDistributionGroup Value Text
instanceArn Value Text
name
= TrafficDistributionGroup
{haddock_workaround_ :: ()
haddock_workaround_ = (), instanceArn :: Value Text
instanceArn = Value Text
instanceArn, 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 TrafficDistributionGroup where
toResourceProperties :: TrafficDistributionGroup -> ResourceProperties
toResourceProperties TrafficDistributionGroup {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TrafficDistributionGroup -> ()
description :: TrafficDistributionGroup -> Maybe (Value Text)
instanceArn :: TrafficDistributionGroup -> Value Text
name :: TrafficDistributionGroup -> Value Text
tags :: TrafficDistributionGroup -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
instanceArn :: Value Text
name :: Value Text
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Connect::TrafficDistributionGroup",
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
"InstanceArn" 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
instanceArn, 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 TrafficDistributionGroup where
toJSON :: TrafficDistributionGroup -> Value
toJSON TrafficDistributionGroup {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TrafficDistributionGroup -> ()
description :: TrafficDistributionGroup -> Maybe (Value Text)
instanceArn :: TrafficDistributionGroup -> Value Text
name :: TrafficDistributionGroup -> Value Text
tags :: TrafficDistributionGroup -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
instanceArn :: 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
"InstanceArn" 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
instanceArn, 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" TrafficDistributionGroup where
type PropertyType "Description" TrafficDistributionGroup = Value Prelude.Text
set :: PropertyType "Description" TrafficDistributionGroup
-> TrafficDistributionGroup -> TrafficDistributionGroup
set PropertyType "Description" TrafficDistributionGroup
newValue TrafficDistributionGroup {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TrafficDistributionGroup -> ()
description :: TrafficDistributionGroup -> Maybe (Value Text)
instanceArn :: TrafficDistributionGroup -> Value Text
name :: TrafficDistributionGroup -> Value Text
tags :: TrafficDistributionGroup -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
instanceArn :: Value Text
name :: Value Text
tags :: Maybe [Tag]
..}
= TrafficDistributionGroup
{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" TrafficDistributionGroup
Value Text
newValue, Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
instanceArn :: Value Text
name :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
instanceArn :: Value Text
name :: Value Text
tags :: Maybe [Tag]
..}
instance Property "InstanceArn" TrafficDistributionGroup where
type PropertyType "InstanceArn" TrafficDistributionGroup = Value Prelude.Text
set :: PropertyType "InstanceArn" TrafficDistributionGroup
-> TrafficDistributionGroup -> TrafficDistributionGroup
set PropertyType "InstanceArn" TrafficDistributionGroup
newValue TrafficDistributionGroup {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TrafficDistributionGroup -> ()
description :: TrafficDistributionGroup -> Maybe (Value Text)
instanceArn :: TrafficDistributionGroup -> Value Text
name :: TrafficDistributionGroup -> Value Text
tags :: TrafficDistributionGroup -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
instanceArn :: Value Text
name :: Value Text
tags :: Maybe [Tag]
..}
= TrafficDistributionGroup {instanceArn :: Value Text
instanceArn = PropertyType "InstanceArn" TrafficDistributionGroup
Value Text
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 "Name" TrafficDistributionGroup where
type PropertyType "Name" TrafficDistributionGroup = Value Prelude.Text
set :: PropertyType "Name" TrafficDistributionGroup
-> TrafficDistributionGroup -> TrafficDistributionGroup
set PropertyType "Name" TrafficDistributionGroup
newValue TrafficDistributionGroup {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TrafficDistributionGroup -> ()
description :: TrafficDistributionGroup -> Maybe (Value Text)
instanceArn :: TrafficDistributionGroup -> Value Text
name :: TrafficDistributionGroup -> Value Text
tags :: TrafficDistributionGroup -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
instanceArn :: Value Text
name :: Value Text
tags :: Maybe [Tag]
..}
= TrafficDistributionGroup {name :: Value Text
name = PropertyType "Name" TrafficDistributionGroup
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
instanceArn :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
instanceArn :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Tags" TrafficDistributionGroup where
type PropertyType "Tags" TrafficDistributionGroup = [Tag]
set :: PropertyType "Tags" TrafficDistributionGroup
-> TrafficDistributionGroup -> TrafficDistributionGroup
set PropertyType "Tags" TrafficDistributionGroup
newValue TrafficDistributionGroup {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TrafficDistributionGroup -> ()
description :: TrafficDistributionGroup -> Maybe (Value Text)
instanceArn :: TrafficDistributionGroup -> Value Text
name :: TrafficDistributionGroup -> Value Text
tags :: TrafficDistributionGroup -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
instanceArn :: Value Text
name :: Value Text
tags :: Maybe [Tag]
..}
= TrafficDistributionGroup {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" TrafficDistributionGroup
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
instanceArn :: Value Text
name :: Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
instanceArn :: Value Text
name :: Value Text
..}