{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.GameLift.Types.Alias where
import qualified Amazonka.Core as Core
import Amazonka.GameLift.Types.RoutingStrategy
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Alias = Alias'
{
Alias -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
Alias -> Maybe POSIX
lastUpdatedTime :: Prelude.Maybe Core.POSIX,
Alias -> Maybe Text
aliasId :: Prelude.Maybe Prelude.Text,
Alias -> Maybe RoutingStrategy
routingStrategy :: Prelude.Maybe RoutingStrategy,
Alias -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
Alias -> Maybe Text
aliasArn :: Prelude.Maybe Prelude.Text,
Alias -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (Alias -> Alias -> Bool
(Alias -> Alias -> Bool) -> (Alias -> Alias -> Bool) -> Eq Alias
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Alias -> Alias -> Bool
$c/= :: Alias -> Alias -> Bool
== :: Alias -> Alias -> Bool
$c== :: Alias -> Alias -> Bool
Prelude.Eq, ReadPrec [Alias]
ReadPrec Alias
Int -> ReadS Alias
ReadS [Alias]
(Int -> ReadS Alias)
-> ReadS [Alias]
-> ReadPrec Alias
-> ReadPrec [Alias]
-> Read Alias
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Alias]
$creadListPrec :: ReadPrec [Alias]
readPrec :: ReadPrec Alias
$creadPrec :: ReadPrec Alias
readList :: ReadS [Alias]
$creadList :: ReadS [Alias]
readsPrec :: Int -> ReadS Alias
$creadsPrec :: Int -> ReadS Alias
Prelude.Read, 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
showList :: [Alias] -> ShowS
$cshowList :: [Alias] -> ShowS
show :: Alias -> String
$cshow :: Alias -> String
showsPrec :: Int -> Alias -> ShowS
$cshowsPrec :: Int -> Alias -> ShowS
Prelude.Show, (forall x. Alias -> Rep Alias x)
-> (forall x. Rep Alias x -> Alias) -> Generic Alias
forall x. Rep Alias x -> Alias
forall x. Alias -> Rep Alias x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Alias x -> Alias
$cfrom :: forall x. Alias -> Rep Alias x
Prelude.Generic)
newAlias ::
Alias
newAlias :: Alias
newAlias =
Alias' :: Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe RoutingStrategy
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Alias
Alias'
{ $sel:creationTime:Alias' :: Maybe POSIX
creationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedTime:Alias' :: Maybe POSIX
lastUpdatedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:aliasId:Alias' :: Maybe Text
aliasId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:routingStrategy:Alias' :: Maybe RoutingStrategy
routingStrategy = Maybe RoutingStrategy
forall a. Maybe a
Prelude.Nothing,
$sel:name:Alias' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:aliasArn:Alias' :: Maybe Text
aliasArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:Alias' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
alias_creationTime :: Lens.Lens' Alias (Prelude.Maybe Prelude.UTCTime)
alias_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Alias -> f Alias
alias_creationTime = (Alias -> Maybe POSIX)
-> (Alias -> Maybe POSIX -> Alias)
-> Lens Alias Alias (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Alias' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:Alias' :: Alias -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: Alias
s@Alias' {} Maybe POSIX
a -> Alias
s {$sel:creationTime:Alias' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: Alias) ((Maybe POSIX -> f (Maybe POSIX)) -> Alias -> f Alias)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Alias
-> f Alias
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
alias_lastUpdatedTime :: Lens.Lens' Alias (Prelude.Maybe Prelude.UTCTime)
alias_lastUpdatedTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Alias -> f Alias
alias_lastUpdatedTime = (Alias -> Maybe POSIX)
-> (Alias -> Maybe POSIX -> Alias)
-> Lens Alias Alias (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Alias' {Maybe POSIX
lastUpdatedTime :: Maybe POSIX
$sel:lastUpdatedTime:Alias' :: Alias -> Maybe POSIX
lastUpdatedTime} -> Maybe POSIX
lastUpdatedTime) (\s :: Alias
s@Alias' {} Maybe POSIX
a -> Alias
s {$sel:lastUpdatedTime:Alias' :: Maybe POSIX
lastUpdatedTime = Maybe POSIX
a} :: Alias) ((Maybe POSIX -> f (Maybe POSIX)) -> Alias -> f Alias)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Alias
-> f Alias
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
alias_aliasId :: Lens.Lens' Alias (Prelude.Maybe Prelude.Text)
alias_aliasId :: (Maybe Text -> f (Maybe Text)) -> Alias -> f Alias
alias_aliasId = (Alias -> Maybe Text)
-> (Alias -> Maybe Text -> Alias)
-> Lens Alias Alias (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Alias' {Maybe Text
aliasId :: Maybe Text
$sel:aliasId:Alias' :: Alias -> Maybe Text
aliasId} -> Maybe Text
aliasId) (\s :: Alias
s@Alias' {} Maybe Text
a -> Alias
s {$sel:aliasId:Alias' :: Maybe Text
aliasId = Maybe Text
a} :: Alias)
alias_routingStrategy :: Lens.Lens' Alias (Prelude.Maybe RoutingStrategy)
alias_routingStrategy :: (Maybe RoutingStrategy -> f (Maybe RoutingStrategy))
-> Alias -> f Alias
alias_routingStrategy = (Alias -> Maybe RoutingStrategy)
-> (Alias -> Maybe RoutingStrategy -> Alias)
-> Lens Alias Alias (Maybe RoutingStrategy) (Maybe RoutingStrategy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Alias' {Maybe RoutingStrategy
routingStrategy :: Maybe RoutingStrategy
$sel:routingStrategy:Alias' :: Alias -> Maybe RoutingStrategy
routingStrategy} -> Maybe RoutingStrategy
routingStrategy) (\s :: Alias
s@Alias' {} Maybe RoutingStrategy
a -> Alias
s {$sel:routingStrategy:Alias' :: Maybe RoutingStrategy
routingStrategy = Maybe RoutingStrategy
a} :: Alias)
alias_name :: Lens.Lens' Alias (Prelude.Maybe Prelude.Text)
alias_name :: (Maybe Text -> f (Maybe Text)) -> Alias -> f Alias
alias_name = (Alias -> Maybe Text)
-> (Alias -> Maybe Text -> Alias)
-> Lens Alias Alias (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Alias' {Maybe Text
name :: Maybe Text
$sel:name:Alias' :: Alias -> Maybe Text
name} -> Maybe Text
name) (\s :: Alias
s@Alias' {} Maybe Text
a -> Alias
s {$sel:name:Alias' :: Maybe Text
name = Maybe Text
a} :: Alias)
alias_aliasArn :: Lens.Lens' Alias (Prelude.Maybe Prelude.Text)
alias_aliasArn :: (Maybe Text -> f (Maybe Text)) -> Alias -> f Alias
alias_aliasArn = (Alias -> Maybe Text)
-> (Alias -> Maybe Text -> Alias)
-> Lens Alias Alias (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Alias' {Maybe Text
aliasArn :: Maybe Text
$sel:aliasArn:Alias' :: Alias -> Maybe Text
aliasArn} -> Maybe Text
aliasArn) (\s :: Alias
s@Alias' {} Maybe Text
a -> Alias
s {$sel:aliasArn:Alias' :: Maybe Text
aliasArn = Maybe Text
a} :: Alias)
alias_description :: Lens.Lens' Alias (Prelude.Maybe Prelude.Text)
alias_description :: (Maybe Text -> f (Maybe Text)) -> Alias -> f Alias
alias_description = (Alias -> Maybe Text)
-> (Alias -> Maybe Text -> Alias)
-> Lens Alias Alias (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Alias' {Maybe Text
description :: Maybe Text
$sel:description:Alias' :: Alias -> Maybe Text
description} -> Maybe Text
description) (\s :: Alias
s@Alias' {} Maybe Text
a -> Alias
s {$sel:description:Alias' :: Maybe Text
description = Maybe Text
a} :: Alias)
instance Core.FromJSON Alias where
parseJSON :: Value -> Parser Alias
parseJSON =
String -> (Object -> Parser Alias) -> Value -> Parser Alias
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Alias"
( \Object
x ->
Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe RoutingStrategy
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Alias
Alias'
(Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe RoutingStrategy
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Alias)
-> Parser (Maybe POSIX)
-> Parser
(Maybe POSIX
-> Maybe Text
-> Maybe RoutingStrategy
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Alias)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreationTime")
Parser
(Maybe POSIX
-> Maybe Text
-> Maybe RoutingStrategy
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Alias)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe RoutingStrategy
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Alias)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastUpdatedTime")
Parser
(Maybe Text
-> Maybe RoutingStrategy
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Alias)
-> Parser (Maybe Text)
-> Parser
(Maybe RoutingStrategy
-> Maybe Text -> Maybe Text -> Maybe Text -> Alias)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AliasId")
Parser
(Maybe RoutingStrategy
-> Maybe Text -> Maybe Text -> Maybe Text -> Alias)
-> Parser (Maybe RoutingStrategy)
-> Parser (Maybe Text -> Maybe Text -> Maybe Text -> Alias)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RoutingStrategy)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RoutingStrategy")
Parser (Maybe Text -> Maybe Text -> Maybe Text -> Alias)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Alias)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Name")
Parser (Maybe Text -> Maybe Text -> Alias)
-> Parser (Maybe Text) -> Parser (Maybe Text -> Alias)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AliasArn")
Parser (Maybe Text -> Alias) -> Parser (Maybe Text) -> Parser Alias
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Description")
)
instance Prelude.Hashable Alias
instance Prelude.NFData Alias