{-# 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.GameSession where
import qualified Amazonka.Core as Core
import Amazonka.GameLift.Types.GameProperty
import Amazonka.GameLift.Types.GameSessionStatus
import Amazonka.GameLift.Types.GameSessionStatusReason
import Amazonka.GameLift.Types.PlayerSessionCreationPolicy
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data GameSession = GameSession'
{
GameSession -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
GameSession -> Maybe GameSessionStatus
status :: Prelude.Maybe GameSessionStatus,
GameSession -> Maybe [GameProperty]
gameProperties :: Prelude.Maybe [GameProperty],
GameSession -> Maybe Text
ipAddress :: Prelude.Maybe Prelude.Text,
GameSession -> Maybe Text
location :: Prelude.Maybe Prelude.Text,
GameSession -> Maybe Text
gameSessionId :: Prelude.Maybe Prelude.Text,
GameSession -> Maybe Text
matchmakerData :: Prelude.Maybe Prelude.Text,
GameSession -> Maybe Text
fleetArn :: Prelude.Maybe Prelude.Text,
GameSession -> Maybe Natural
maximumPlayerSessionCount :: Prelude.Maybe Prelude.Natural,
GameSession -> Maybe POSIX
terminationTime :: Prelude.Maybe Core.POSIX,
GameSession -> Maybe PlayerSessionCreationPolicy
playerSessionCreationPolicy :: Prelude.Maybe PlayerSessionCreationPolicy,
GameSession -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
GameSession -> Maybe Natural
currentPlayerSessionCount :: Prelude.Maybe Prelude.Natural,
GameSession -> Maybe GameSessionStatusReason
statusReason :: Prelude.Maybe GameSessionStatusReason,
GameSession -> Maybe Text
gameSessionData :: Prelude.Maybe Prelude.Text,
GameSession -> Maybe Text
fleetId :: Prelude.Maybe Prelude.Text,
GameSession -> Maybe Text
dnsName :: Prelude.Maybe Prelude.Text,
GameSession -> Maybe Text
creatorId :: Prelude.Maybe Prelude.Text,
GameSession -> Maybe Natural
port :: Prelude.Maybe Prelude.Natural
}
deriving (GameSession -> GameSession -> Bool
(GameSession -> GameSession -> Bool)
-> (GameSession -> GameSession -> Bool) -> Eq GameSession
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GameSession -> GameSession -> Bool
$c/= :: GameSession -> GameSession -> Bool
== :: GameSession -> GameSession -> Bool
$c== :: GameSession -> GameSession -> Bool
Prelude.Eq, ReadPrec [GameSession]
ReadPrec GameSession
Int -> ReadS GameSession
ReadS [GameSession]
(Int -> ReadS GameSession)
-> ReadS [GameSession]
-> ReadPrec GameSession
-> ReadPrec [GameSession]
-> Read GameSession
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GameSession]
$creadListPrec :: ReadPrec [GameSession]
readPrec :: ReadPrec GameSession
$creadPrec :: ReadPrec GameSession
readList :: ReadS [GameSession]
$creadList :: ReadS [GameSession]
readsPrec :: Int -> ReadS GameSession
$creadsPrec :: Int -> ReadS GameSession
Prelude.Read, Int -> GameSession -> ShowS
[GameSession] -> ShowS
GameSession -> String
(Int -> GameSession -> ShowS)
-> (GameSession -> String)
-> ([GameSession] -> ShowS)
-> Show GameSession
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GameSession] -> ShowS
$cshowList :: [GameSession] -> ShowS
show :: GameSession -> String
$cshow :: GameSession -> String
showsPrec :: Int -> GameSession -> ShowS
$cshowsPrec :: Int -> GameSession -> ShowS
Prelude.Show, (forall x. GameSession -> Rep GameSession x)
-> (forall x. Rep GameSession x -> GameSession)
-> Generic GameSession
forall x. Rep GameSession x -> GameSession
forall x. GameSession -> Rep GameSession x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GameSession x -> GameSession
$cfrom :: forall x. GameSession -> Rep GameSession x
Prelude.Generic)
newGameSession ::
GameSession
newGameSession :: GameSession
newGameSession =
GameSession' :: Maybe POSIX
-> Maybe GameSessionStatus
-> Maybe [GameProperty]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe POSIX
-> Maybe PlayerSessionCreationPolicy
-> Maybe Text
-> Maybe Natural
-> Maybe GameSessionStatusReason
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> GameSession
GameSession'
{ $sel:creationTime:GameSession' :: Maybe POSIX
creationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:status:GameSession' :: Maybe GameSessionStatus
status = Maybe GameSessionStatus
forall a. Maybe a
Prelude.Nothing,
$sel:gameProperties:GameSession' :: Maybe [GameProperty]
gameProperties = Maybe [GameProperty]
forall a. Maybe a
Prelude.Nothing,
$sel:ipAddress:GameSession' :: Maybe Text
ipAddress = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:location:GameSession' :: Maybe Text
location = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:gameSessionId:GameSession' :: Maybe Text
gameSessionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:matchmakerData:GameSession' :: Maybe Text
matchmakerData = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:fleetArn:GameSession' :: Maybe Text
fleetArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maximumPlayerSessionCount:GameSession' :: Maybe Natural
maximumPlayerSessionCount = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:terminationTime:GameSession' :: Maybe POSIX
terminationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:playerSessionCreationPolicy:GameSession' :: Maybe PlayerSessionCreationPolicy
playerSessionCreationPolicy = Maybe PlayerSessionCreationPolicy
forall a. Maybe a
Prelude.Nothing,
$sel:name:GameSession' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:currentPlayerSessionCount:GameSession' :: Maybe Natural
currentPlayerSessionCount = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:statusReason:GameSession' :: Maybe GameSessionStatusReason
statusReason = Maybe GameSessionStatusReason
forall a. Maybe a
Prelude.Nothing,
$sel:gameSessionData:GameSession' :: Maybe Text
gameSessionData = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:fleetId:GameSession' :: Maybe Text
fleetId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:dnsName:GameSession' :: Maybe Text
dnsName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:creatorId:GameSession' :: Maybe Text
creatorId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:port:GameSession' :: Maybe Natural
port = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
gameSession_creationTime :: Lens.Lens' GameSession (Prelude.Maybe Prelude.UTCTime)
gameSession_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GameSession -> f GameSession
gameSession_creationTime = (GameSession -> Maybe POSIX)
-> (GameSession -> Maybe POSIX -> GameSession)
-> Lens GameSession GameSession (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameSession' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:GameSession' :: GameSession -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: GameSession
s@GameSession' {} Maybe POSIX
a -> GameSession
s {$sel:creationTime:GameSession' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: GameSession) ((Maybe POSIX -> f (Maybe POSIX)) -> GameSession -> f GameSession)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GameSession
-> f GameSession
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
gameSession_status :: Lens.Lens' GameSession (Prelude.Maybe GameSessionStatus)
gameSession_status :: (Maybe GameSessionStatus -> f (Maybe GameSessionStatus))
-> GameSession -> f GameSession
gameSession_status = (GameSession -> Maybe GameSessionStatus)
-> (GameSession -> Maybe GameSessionStatus -> GameSession)
-> Lens
GameSession
GameSession
(Maybe GameSessionStatus)
(Maybe GameSessionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameSession' {Maybe GameSessionStatus
status :: Maybe GameSessionStatus
$sel:status:GameSession' :: GameSession -> Maybe GameSessionStatus
status} -> Maybe GameSessionStatus
status) (\s :: GameSession
s@GameSession' {} Maybe GameSessionStatus
a -> GameSession
s {$sel:status:GameSession' :: Maybe GameSessionStatus
status = Maybe GameSessionStatus
a} :: GameSession)
gameSession_gameProperties :: Lens.Lens' GameSession (Prelude.Maybe [GameProperty])
gameSession_gameProperties :: (Maybe [GameProperty] -> f (Maybe [GameProperty]))
-> GameSession -> f GameSession
gameSession_gameProperties = (GameSession -> Maybe [GameProperty])
-> (GameSession -> Maybe [GameProperty] -> GameSession)
-> Lens
GameSession
GameSession
(Maybe [GameProperty])
(Maybe [GameProperty])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameSession' {Maybe [GameProperty]
gameProperties :: Maybe [GameProperty]
$sel:gameProperties:GameSession' :: GameSession -> Maybe [GameProperty]
gameProperties} -> Maybe [GameProperty]
gameProperties) (\s :: GameSession
s@GameSession' {} Maybe [GameProperty]
a -> GameSession
s {$sel:gameProperties:GameSession' :: Maybe [GameProperty]
gameProperties = Maybe [GameProperty]
a} :: GameSession) ((Maybe [GameProperty] -> f (Maybe [GameProperty]))
-> GameSession -> f GameSession)
-> ((Maybe [GameProperty] -> f (Maybe [GameProperty]))
-> Maybe [GameProperty] -> f (Maybe [GameProperty]))
-> (Maybe [GameProperty] -> f (Maybe [GameProperty]))
-> GameSession
-> f GameSession
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [GameProperty] [GameProperty] [GameProperty] [GameProperty]
-> Iso
(Maybe [GameProperty])
(Maybe [GameProperty])
(Maybe [GameProperty])
(Maybe [GameProperty])
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 [GameProperty] [GameProperty] [GameProperty] [GameProperty]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
gameSession_ipAddress :: Lens.Lens' GameSession (Prelude.Maybe Prelude.Text)
gameSession_ipAddress :: (Maybe Text -> f (Maybe Text)) -> GameSession -> f GameSession
gameSession_ipAddress = (GameSession -> Maybe Text)
-> (GameSession -> Maybe Text -> GameSession)
-> Lens GameSession GameSession (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameSession' {Maybe Text
ipAddress :: Maybe Text
$sel:ipAddress:GameSession' :: GameSession -> Maybe Text
ipAddress} -> Maybe Text
ipAddress) (\s :: GameSession
s@GameSession' {} Maybe Text
a -> GameSession
s {$sel:ipAddress:GameSession' :: Maybe Text
ipAddress = Maybe Text
a} :: GameSession)
gameSession_location :: Lens.Lens' GameSession (Prelude.Maybe Prelude.Text)
gameSession_location :: (Maybe Text -> f (Maybe Text)) -> GameSession -> f GameSession
gameSession_location = (GameSession -> Maybe Text)
-> (GameSession -> Maybe Text -> GameSession)
-> Lens GameSession GameSession (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameSession' {Maybe Text
location :: Maybe Text
$sel:location:GameSession' :: GameSession -> Maybe Text
location} -> Maybe Text
location) (\s :: GameSession
s@GameSession' {} Maybe Text
a -> GameSession
s {$sel:location:GameSession' :: Maybe Text
location = Maybe Text
a} :: GameSession)
gameSession_gameSessionId :: Lens.Lens' GameSession (Prelude.Maybe Prelude.Text)
gameSession_gameSessionId :: (Maybe Text -> f (Maybe Text)) -> GameSession -> f GameSession
gameSession_gameSessionId = (GameSession -> Maybe Text)
-> (GameSession -> Maybe Text -> GameSession)
-> Lens GameSession GameSession (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameSession' {Maybe Text
gameSessionId :: Maybe Text
$sel:gameSessionId:GameSession' :: GameSession -> Maybe Text
gameSessionId} -> Maybe Text
gameSessionId) (\s :: GameSession
s@GameSession' {} Maybe Text
a -> GameSession
s {$sel:gameSessionId:GameSession' :: Maybe Text
gameSessionId = Maybe Text
a} :: GameSession)
gameSession_matchmakerData :: Lens.Lens' GameSession (Prelude.Maybe Prelude.Text)
gameSession_matchmakerData :: (Maybe Text -> f (Maybe Text)) -> GameSession -> f GameSession
gameSession_matchmakerData = (GameSession -> Maybe Text)
-> (GameSession -> Maybe Text -> GameSession)
-> Lens GameSession GameSession (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameSession' {Maybe Text
matchmakerData :: Maybe Text
$sel:matchmakerData:GameSession' :: GameSession -> Maybe Text
matchmakerData} -> Maybe Text
matchmakerData) (\s :: GameSession
s@GameSession' {} Maybe Text
a -> GameSession
s {$sel:matchmakerData:GameSession' :: Maybe Text
matchmakerData = Maybe Text
a} :: GameSession)
gameSession_fleetArn :: Lens.Lens' GameSession (Prelude.Maybe Prelude.Text)
gameSession_fleetArn :: (Maybe Text -> f (Maybe Text)) -> GameSession -> f GameSession
gameSession_fleetArn = (GameSession -> Maybe Text)
-> (GameSession -> Maybe Text -> GameSession)
-> Lens GameSession GameSession (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameSession' {Maybe Text
fleetArn :: Maybe Text
$sel:fleetArn:GameSession' :: GameSession -> Maybe Text
fleetArn} -> Maybe Text
fleetArn) (\s :: GameSession
s@GameSession' {} Maybe Text
a -> GameSession
s {$sel:fleetArn:GameSession' :: Maybe Text
fleetArn = Maybe Text
a} :: GameSession)
gameSession_maximumPlayerSessionCount :: Lens.Lens' GameSession (Prelude.Maybe Prelude.Natural)
gameSession_maximumPlayerSessionCount :: (Maybe Natural -> f (Maybe Natural))
-> GameSession -> f GameSession
gameSession_maximumPlayerSessionCount = (GameSession -> Maybe Natural)
-> (GameSession -> Maybe Natural -> GameSession)
-> Lens GameSession GameSession (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameSession' {Maybe Natural
maximumPlayerSessionCount :: Maybe Natural
$sel:maximumPlayerSessionCount:GameSession' :: GameSession -> Maybe Natural
maximumPlayerSessionCount} -> Maybe Natural
maximumPlayerSessionCount) (\s :: GameSession
s@GameSession' {} Maybe Natural
a -> GameSession
s {$sel:maximumPlayerSessionCount:GameSession' :: Maybe Natural
maximumPlayerSessionCount = Maybe Natural
a} :: GameSession)
gameSession_terminationTime :: Lens.Lens' GameSession (Prelude.Maybe Prelude.UTCTime)
gameSession_terminationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GameSession -> f GameSession
gameSession_terminationTime = (GameSession -> Maybe POSIX)
-> (GameSession -> Maybe POSIX -> GameSession)
-> Lens GameSession GameSession (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameSession' {Maybe POSIX
terminationTime :: Maybe POSIX
$sel:terminationTime:GameSession' :: GameSession -> Maybe POSIX
terminationTime} -> Maybe POSIX
terminationTime) (\s :: GameSession
s@GameSession' {} Maybe POSIX
a -> GameSession
s {$sel:terminationTime:GameSession' :: Maybe POSIX
terminationTime = Maybe POSIX
a} :: GameSession) ((Maybe POSIX -> f (Maybe POSIX)) -> GameSession -> f GameSession)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GameSession
-> f GameSession
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
gameSession_playerSessionCreationPolicy :: Lens.Lens' GameSession (Prelude.Maybe PlayerSessionCreationPolicy)
gameSession_playerSessionCreationPolicy :: (Maybe PlayerSessionCreationPolicy
-> f (Maybe PlayerSessionCreationPolicy))
-> GameSession -> f GameSession
gameSession_playerSessionCreationPolicy = (GameSession -> Maybe PlayerSessionCreationPolicy)
-> (GameSession
-> Maybe PlayerSessionCreationPolicy -> GameSession)
-> Lens
GameSession
GameSession
(Maybe PlayerSessionCreationPolicy)
(Maybe PlayerSessionCreationPolicy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameSession' {Maybe PlayerSessionCreationPolicy
playerSessionCreationPolicy :: Maybe PlayerSessionCreationPolicy
$sel:playerSessionCreationPolicy:GameSession' :: GameSession -> Maybe PlayerSessionCreationPolicy
playerSessionCreationPolicy} -> Maybe PlayerSessionCreationPolicy
playerSessionCreationPolicy) (\s :: GameSession
s@GameSession' {} Maybe PlayerSessionCreationPolicy
a -> GameSession
s {$sel:playerSessionCreationPolicy:GameSession' :: Maybe PlayerSessionCreationPolicy
playerSessionCreationPolicy = Maybe PlayerSessionCreationPolicy
a} :: GameSession)
gameSession_name :: Lens.Lens' GameSession (Prelude.Maybe Prelude.Text)
gameSession_name :: (Maybe Text -> f (Maybe Text)) -> GameSession -> f GameSession
gameSession_name = (GameSession -> Maybe Text)
-> (GameSession -> Maybe Text -> GameSession)
-> Lens GameSession GameSession (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameSession' {Maybe Text
name :: Maybe Text
$sel:name:GameSession' :: GameSession -> Maybe Text
name} -> Maybe Text
name) (\s :: GameSession
s@GameSession' {} Maybe Text
a -> GameSession
s {$sel:name:GameSession' :: Maybe Text
name = Maybe Text
a} :: GameSession)
gameSession_currentPlayerSessionCount :: Lens.Lens' GameSession (Prelude.Maybe Prelude.Natural)
gameSession_currentPlayerSessionCount :: (Maybe Natural -> f (Maybe Natural))
-> GameSession -> f GameSession
gameSession_currentPlayerSessionCount = (GameSession -> Maybe Natural)
-> (GameSession -> Maybe Natural -> GameSession)
-> Lens GameSession GameSession (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameSession' {Maybe Natural
currentPlayerSessionCount :: Maybe Natural
$sel:currentPlayerSessionCount:GameSession' :: GameSession -> Maybe Natural
currentPlayerSessionCount} -> Maybe Natural
currentPlayerSessionCount) (\s :: GameSession
s@GameSession' {} Maybe Natural
a -> GameSession
s {$sel:currentPlayerSessionCount:GameSession' :: Maybe Natural
currentPlayerSessionCount = Maybe Natural
a} :: GameSession)
gameSession_statusReason :: Lens.Lens' GameSession (Prelude.Maybe GameSessionStatusReason)
gameSession_statusReason :: (Maybe GameSessionStatusReason
-> f (Maybe GameSessionStatusReason))
-> GameSession -> f GameSession
gameSession_statusReason = (GameSession -> Maybe GameSessionStatusReason)
-> (GameSession -> Maybe GameSessionStatusReason -> GameSession)
-> Lens
GameSession
GameSession
(Maybe GameSessionStatusReason)
(Maybe GameSessionStatusReason)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameSession' {Maybe GameSessionStatusReason
statusReason :: Maybe GameSessionStatusReason
$sel:statusReason:GameSession' :: GameSession -> Maybe GameSessionStatusReason
statusReason} -> Maybe GameSessionStatusReason
statusReason) (\s :: GameSession
s@GameSession' {} Maybe GameSessionStatusReason
a -> GameSession
s {$sel:statusReason:GameSession' :: Maybe GameSessionStatusReason
statusReason = Maybe GameSessionStatusReason
a} :: GameSession)
gameSession_gameSessionData :: Lens.Lens' GameSession (Prelude.Maybe Prelude.Text)
gameSession_gameSessionData :: (Maybe Text -> f (Maybe Text)) -> GameSession -> f GameSession
gameSession_gameSessionData = (GameSession -> Maybe Text)
-> (GameSession -> Maybe Text -> GameSession)
-> Lens GameSession GameSession (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameSession' {Maybe Text
gameSessionData :: Maybe Text
$sel:gameSessionData:GameSession' :: GameSession -> Maybe Text
gameSessionData} -> Maybe Text
gameSessionData) (\s :: GameSession
s@GameSession' {} Maybe Text
a -> GameSession
s {$sel:gameSessionData:GameSession' :: Maybe Text
gameSessionData = Maybe Text
a} :: GameSession)
gameSession_fleetId :: Lens.Lens' GameSession (Prelude.Maybe Prelude.Text)
gameSession_fleetId :: (Maybe Text -> f (Maybe Text)) -> GameSession -> f GameSession
gameSession_fleetId = (GameSession -> Maybe Text)
-> (GameSession -> Maybe Text -> GameSession)
-> Lens GameSession GameSession (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameSession' {Maybe Text
fleetId :: Maybe Text
$sel:fleetId:GameSession' :: GameSession -> Maybe Text
fleetId} -> Maybe Text
fleetId) (\s :: GameSession
s@GameSession' {} Maybe Text
a -> GameSession
s {$sel:fleetId:GameSession' :: Maybe Text
fleetId = Maybe Text
a} :: GameSession)
gameSession_dnsName :: Lens.Lens' GameSession (Prelude.Maybe Prelude.Text)
gameSession_dnsName :: (Maybe Text -> f (Maybe Text)) -> GameSession -> f GameSession
gameSession_dnsName = (GameSession -> Maybe Text)
-> (GameSession -> Maybe Text -> GameSession)
-> Lens GameSession GameSession (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameSession' {Maybe Text
dnsName :: Maybe Text
$sel:dnsName:GameSession' :: GameSession -> Maybe Text
dnsName} -> Maybe Text
dnsName) (\s :: GameSession
s@GameSession' {} Maybe Text
a -> GameSession
s {$sel:dnsName:GameSession' :: Maybe Text
dnsName = Maybe Text
a} :: GameSession)
gameSession_creatorId :: Lens.Lens' GameSession (Prelude.Maybe Prelude.Text)
gameSession_creatorId :: (Maybe Text -> f (Maybe Text)) -> GameSession -> f GameSession
gameSession_creatorId = (GameSession -> Maybe Text)
-> (GameSession -> Maybe Text -> GameSession)
-> Lens GameSession GameSession (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameSession' {Maybe Text
creatorId :: Maybe Text
$sel:creatorId:GameSession' :: GameSession -> Maybe Text
creatorId} -> Maybe Text
creatorId) (\s :: GameSession
s@GameSession' {} Maybe Text
a -> GameSession
s {$sel:creatorId:GameSession' :: Maybe Text
creatorId = Maybe Text
a} :: GameSession)
gameSession_port :: Lens.Lens' GameSession (Prelude.Maybe Prelude.Natural)
gameSession_port :: (Maybe Natural -> f (Maybe Natural))
-> GameSession -> f GameSession
gameSession_port = (GameSession -> Maybe Natural)
-> (GameSession -> Maybe Natural -> GameSession)
-> Lens GameSession GameSession (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameSession' {Maybe Natural
port :: Maybe Natural
$sel:port:GameSession' :: GameSession -> Maybe Natural
port} -> Maybe Natural
port) (\s :: GameSession
s@GameSession' {} Maybe Natural
a -> GameSession
s {$sel:port:GameSession' :: Maybe Natural
port = Maybe Natural
a} :: GameSession)
instance Core.FromJSON GameSession where
parseJSON :: Value -> Parser GameSession
parseJSON =
String
-> (Object -> Parser GameSession) -> Value -> Parser GameSession
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"GameSession"
( \Object
x ->
Maybe POSIX
-> Maybe GameSessionStatus
-> Maybe [GameProperty]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe POSIX
-> Maybe PlayerSessionCreationPolicy
-> Maybe Text
-> Maybe Natural
-> Maybe GameSessionStatusReason
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> GameSession
GameSession'
(Maybe POSIX
-> Maybe GameSessionStatus
-> Maybe [GameProperty]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe POSIX
-> Maybe PlayerSessionCreationPolicy
-> Maybe Text
-> Maybe Natural
-> Maybe GameSessionStatusReason
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> GameSession)
-> Parser (Maybe POSIX)
-> Parser
(Maybe GameSessionStatus
-> Maybe [GameProperty]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe POSIX
-> Maybe PlayerSessionCreationPolicy
-> Maybe Text
-> Maybe Natural
-> Maybe GameSessionStatusReason
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> GameSession)
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 GameSessionStatus
-> Maybe [GameProperty]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe POSIX
-> Maybe PlayerSessionCreationPolicy
-> Maybe Text
-> Maybe Natural
-> Maybe GameSessionStatusReason
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> GameSession)
-> Parser (Maybe GameSessionStatus)
-> Parser
(Maybe [GameProperty]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe POSIX
-> Maybe PlayerSessionCreationPolicy
-> Maybe Text
-> Maybe Natural
-> Maybe GameSessionStatusReason
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> GameSession)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe GameSessionStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser
(Maybe [GameProperty]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe POSIX
-> Maybe PlayerSessionCreationPolicy
-> Maybe Text
-> Maybe Natural
-> Maybe GameSessionStatusReason
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> GameSession)
-> Parser (Maybe [GameProperty])
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe POSIX
-> Maybe PlayerSessionCreationPolicy
-> Maybe Text
-> Maybe Natural
-> Maybe GameSessionStatusReason
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> GameSession)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [GameProperty]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"GameProperties" Parser (Maybe (Maybe [GameProperty]))
-> Maybe [GameProperty] -> Parser (Maybe [GameProperty])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [GameProperty]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe POSIX
-> Maybe PlayerSessionCreationPolicy
-> Maybe Text
-> Maybe Natural
-> Maybe GameSessionStatusReason
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> GameSession)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe POSIX
-> Maybe PlayerSessionCreationPolicy
-> Maybe Text
-> Maybe Natural
-> Maybe GameSessionStatusReason
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> GameSession)
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
"IpAddress")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe POSIX
-> Maybe PlayerSessionCreationPolicy
-> Maybe Text
-> Maybe Natural
-> Maybe GameSessionStatusReason
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> GameSession)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe POSIX
-> Maybe PlayerSessionCreationPolicy
-> Maybe Text
-> Maybe Natural
-> Maybe GameSessionStatusReason
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> GameSession)
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
"Location")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe POSIX
-> Maybe PlayerSessionCreationPolicy
-> Maybe Text
-> Maybe Natural
-> Maybe GameSessionStatusReason
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> GameSession)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe POSIX
-> Maybe PlayerSessionCreationPolicy
-> Maybe Text
-> Maybe Natural
-> Maybe GameSessionStatusReason
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> GameSession)
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
"GameSessionId")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe POSIX
-> Maybe PlayerSessionCreationPolicy
-> Maybe Text
-> Maybe Natural
-> Maybe GameSessionStatusReason
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> GameSession)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Natural
-> Maybe POSIX
-> Maybe PlayerSessionCreationPolicy
-> Maybe Text
-> Maybe Natural
-> Maybe GameSessionStatusReason
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> GameSession)
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
"MatchmakerData")
Parser
(Maybe Text
-> Maybe Natural
-> Maybe POSIX
-> Maybe PlayerSessionCreationPolicy
-> Maybe Text
-> Maybe Natural
-> Maybe GameSessionStatusReason
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> GameSession)
-> Parser (Maybe Text)
-> Parser
(Maybe Natural
-> Maybe POSIX
-> Maybe PlayerSessionCreationPolicy
-> Maybe Text
-> Maybe Natural
-> Maybe GameSessionStatusReason
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> GameSession)
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
"FleetArn")
Parser
(Maybe Natural
-> Maybe POSIX
-> Maybe PlayerSessionCreationPolicy
-> Maybe Text
-> Maybe Natural
-> Maybe GameSessionStatusReason
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> GameSession)
-> Parser (Maybe Natural)
-> Parser
(Maybe POSIX
-> Maybe PlayerSessionCreationPolicy
-> Maybe Text
-> Maybe Natural
-> Maybe GameSessionStatusReason
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> GameSession)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MaximumPlayerSessionCount")
Parser
(Maybe POSIX
-> Maybe PlayerSessionCreationPolicy
-> Maybe Text
-> Maybe Natural
-> Maybe GameSessionStatusReason
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> GameSession)
-> Parser (Maybe POSIX)
-> Parser
(Maybe PlayerSessionCreationPolicy
-> Maybe Text
-> Maybe Natural
-> Maybe GameSessionStatusReason
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> GameSession)
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
"TerminationTime")
Parser
(Maybe PlayerSessionCreationPolicy
-> Maybe Text
-> Maybe Natural
-> Maybe GameSessionStatusReason
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> GameSession)
-> Parser (Maybe PlayerSessionCreationPolicy)
-> Parser
(Maybe Text
-> Maybe Natural
-> Maybe GameSessionStatusReason
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> GameSession)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PlayerSessionCreationPolicy)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PlayerSessionCreationPolicy")
Parser
(Maybe Text
-> Maybe Natural
-> Maybe GameSessionStatusReason
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> GameSession)
-> Parser (Maybe Text)
-> Parser
(Maybe Natural
-> Maybe GameSessionStatusReason
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> GameSession)
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 Natural
-> Maybe GameSessionStatusReason
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> GameSession)
-> Parser (Maybe Natural)
-> Parser
(Maybe GameSessionStatusReason
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> GameSession)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CurrentPlayerSessionCount")
Parser
(Maybe GameSessionStatusReason
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> GameSession)
-> Parser (Maybe GameSessionStatusReason)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> GameSession)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe GameSessionStatusReason)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StatusReason")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> GameSession)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Natural -> GameSession)
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
"GameSessionData")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Natural -> GameSession)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Natural -> GameSession)
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
"FleetId")
Parser (Maybe Text -> Maybe Text -> Maybe Natural -> GameSession)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Natural -> GameSession)
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
"DnsName")
Parser (Maybe Text -> Maybe Natural -> GameSession)
-> Parser (Maybe Text) -> Parser (Maybe Natural -> GameSession)
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
"CreatorId")
Parser (Maybe Natural -> GameSession)
-> Parser (Maybe Natural) -> Parser GameSession
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Port")
)
instance Prelude.Hashable GameSession
instance Prelude.NFData GameSession