module Stratosphere.GameLift.Alias (
module Exports, Alias(..), mkAlias
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.GameLift.Alias.RoutingStrategyProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data Alias
=
Alias {Alias -> ()
haddock_workaround_ :: (),
Alias -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
Alias -> Value Text
name :: (Value Prelude.Text),
Alias -> RoutingStrategyProperty
routingStrategy :: RoutingStrategyProperty,
Alias -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (Alias -> Alias -> Bool
(Alias -> Alias -> Bool) -> (Alias -> Alias -> Bool) -> Eq Alias
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Alias -> Alias -> Bool
== :: Alias -> Alias -> Bool
$c/= :: Alias -> Alias -> Bool
/= :: Alias -> Alias -> Bool
Prelude.Eq, Int -> Alias -> ShowS
[Alias] -> ShowS
Alias -> String
(Int -> Alias -> ShowS)
-> (Alias -> String) -> ([Alias] -> ShowS) -> Show Alias
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Alias -> ShowS
showsPrec :: Int -> Alias -> ShowS
$cshow :: Alias -> String
show :: Alias -> String
$cshowList :: [Alias] -> ShowS
showList :: [Alias] -> ShowS
Prelude.Show)
mkAlias :: Value Prelude.Text -> RoutingStrategyProperty -> Alias
mkAlias :: Value Text -> RoutingStrategyProperty -> Alias
mkAlias Value Text
name RoutingStrategyProperty
routingStrategy
= Alias
{haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name,
routingStrategy :: RoutingStrategyProperty
routingStrategy = RoutingStrategyProperty
routingStrategy, 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 Alias where
toResourceProperties :: Alias -> ResourceProperties
toResourceProperties Alias {Maybe [Tag]
Maybe (Value Text)
()
Value Text
RoutingStrategyProperty
haddock_workaround_ :: Alias -> ()
description :: Alias -> Maybe (Value Text)
name :: Alias -> Value Text
routingStrategy :: Alias -> RoutingStrategyProperty
tags :: Alias -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
routingStrategy :: RoutingStrategyProperty
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::GameLift::Alias", 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, Key
"RoutingStrategy" Key -> RoutingStrategyProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= RoutingStrategyProperty
routingStrategy]
([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 Alias where
toJSON :: Alias -> Value
toJSON Alias {Maybe [Tag]
Maybe (Value Text)
()
Value Text
RoutingStrategyProperty
haddock_workaround_ :: Alias -> ()
description :: Alias -> Maybe (Value Text)
name :: Alias -> Value Text
routingStrategy :: Alias -> RoutingStrategyProperty
tags :: Alias -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
routingStrategy :: RoutingStrategyProperty
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, Key
"RoutingStrategy" Key -> RoutingStrategyProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= RoutingStrategyProperty
routingStrategy]
([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" Alias where
type PropertyType "Description" Alias = Value Prelude.Text
set :: PropertyType "Description" Alias -> Alias -> Alias
set PropertyType "Description" Alias
newValue Alias {Maybe [Tag]
Maybe (Value Text)
()
Value Text
RoutingStrategyProperty
haddock_workaround_ :: Alias -> ()
description :: Alias -> Maybe (Value Text)
name :: Alias -> Value Text
routingStrategy :: Alias -> RoutingStrategyProperty
tags :: Alias -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
routingStrategy :: RoutingStrategyProperty
tags :: Maybe [Tag]
..}
= Alias {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" Alias
Value Text
newValue, Maybe [Tag]
()
Value Text
RoutingStrategyProperty
haddock_workaround_ :: ()
name :: Value Text
routingStrategy :: RoutingStrategyProperty
tags :: Maybe [Tag]
haddock_workaround_ :: ()
name :: Value Text
routingStrategy :: RoutingStrategyProperty
tags :: Maybe [Tag]
..}
instance Property "Name" Alias where
type PropertyType "Name" Alias = Value Prelude.Text
set :: PropertyType "Name" Alias -> Alias -> Alias
set PropertyType "Name" Alias
newValue Alias {Maybe [Tag]
Maybe (Value Text)
()
Value Text
RoutingStrategyProperty
haddock_workaround_ :: Alias -> ()
description :: Alias -> Maybe (Value Text)
name :: Alias -> Value Text
routingStrategy :: Alias -> RoutingStrategyProperty
tags :: Alias -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
routingStrategy :: RoutingStrategyProperty
tags :: Maybe [Tag]
..} = Alias {name :: Value Text
name = PropertyType "Name" Alias
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
RoutingStrategyProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
routingStrategy :: RoutingStrategyProperty
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
routingStrategy :: RoutingStrategyProperty
tags :: Maybe [Tag]
..}
instance Property "RoutingStrategy" Alias where
type PropertyType "RoutingStrategy" Alias = RoutingStrategyProperty
set :: PropertyType "RoutingStrategy" Alias -> Alias -> Alias
set PropertyType "RoutingStrategy" Alias
newValue Alias {Maybe [Tag]
Maybe (Value Text)
()
Value Text
RoutingStrategyProperty
haddock_workaround_ :: Alias -> ()
description :: Alias -> Maybe (Value Text)
name :: Alias -> Value Text
routingStrategy :: Alias -> RoutingStrategyProperty
tags :: Alias -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
routingStrategy :: RoutingStrategyProperty
tags :: Maybe [Tag]
..} = Alias {routingStrategy :: RoutingStrategyProperty
routingStrategy = PropertyType "RoutingStrategy" Alias
RoutingStrategyProperty
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" Alias where
type PropertyType "Tags" Alias = [Tag]
set :: PropertyType "Tags" Alias -> Alias -> Alias
set PropertyType "Tags" Alias
newValue Alias {Maybe [Tag]
Maybe (Value Text)
()
Value Text
RoutingStrategyProperty
haddock_workaround_ :: Alias -> ()
description :: Alias -> Maybe (Value Text)
name :: Alias -> Value Text
routingStrategy :: Alias -> RoutingStrategyProperty
tags :: Alias -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
routingStrategy :: RoutingStrategyProperty
tags :: Maybe [Tag]
..} = Alias {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" Alias
newValue, Maybe (Value Text)
()
Value Text
RoutingStrategyProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
routingStrategy :: RoutingStrategyProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
routingStrategy :: RoutingStrategyProperty
..}