{-# 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.GameSessionQueue where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.GameLift.Types.FilterConfiguration
import Amazonka.GameLift.Types.GameSessionQueueDestination
import Amazonka.GameLift.Types.PlayerLatencyPolicy
import Amazonka.GameLift.Types.PriorityConfiguration
import qualified Amazonka.Prelude as Prelude
data GameSessionQueue = GameSessionQueue'
{
GameSessionQueue -> Maybe Text
customEventData :: Prelude.Maybe Prelude.Text,
GameSessionQueue -> Maybe [GameSessionQueueDestination]
destinations :: Prelude.Maybe [GameSessionQueueDestination],
GameSessionQueue -> Maybe FilterConfiguration
filterConfiguration :: Prelude.Maybe FilterConfiguration,
GameSessionQueue -> Maybe Text
gameSessionQueueArn :: Prelude.Maybe Prelude.Text,
GameSessionQueue -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
GameSessionQueue -> Maybe Text
notificationTarget :: Prelude.Maybe Prelude.Text,
GameSessionQueue -> Maybe [PlayerLatencyPolicy]
playerLatencyPolicies :: Prelude.Maybe [PlayerLatencyPolicy],
GameSessionQueue -> Maybe PriorityConfiguration
priorityConfiguration :: Prelude.Maybe PriorityConfiguration,
GameSessionQueue -> Maybe Natural
timeoutInSeconds :: Prelude.Maybe Prelude.Natural
}
deriving (GameSessionQueue -> GameSessionQueue -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GameSessionQueue -> GameSessionQueue -> Bool
$c/= :: GameSessionQueue -> GameSessionQueue -> Bool
== :: GameSessionQueue -> GameSessionQueue -> Bool
$c== :: GameSessionQueue -> GameSessionQueue -> Bool
Prelude.Eq, ReadPrec [GameSessionQueue]
ReadPrec GameSessionQueue
Int -> ReadS GameSessionQueue
ReadS [GameSessionQueue]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GameSessionQueue]
$creadListPrec :: ReadPrec [GameSessionQueue]
readPrec :: ReadPrec GameSessionQueue
$creadPrec :: ReadPrec GameSessionQueue
readList :: ReadS [GameSessionQueue]
$creadList :: ReadS [GameSessionQueue]
readsPrec :: Int -> ReadS GameSessionQueue
$creadsPrec :: Int -> ReadS GameSessionQueue
Prelude.Read, Int -> GameSessionQueue -> ShowS
[GameSessionQueue] -> ShowS
GameSessionQueue -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GameSessionQueue] -> ShowS
$cshowList :: [GameSessionQueue] -> ShowS
show :: GameSessionQueue -> String
$cshow :: GameSessionQueue -> String
showsPrec :: Int -> GameSessionQueue -> ShowS
$cshowsPrec :: Int -> GameSessionQueue -> ShowS
Prelude.Show, forall x. Rep GameSessionQueue x -> GameSessionQueue
forall x. GameSessionQueue -> Rep GameSessionQueue x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GameSessionQueue x -> GameSessionQueue
$cfrom :: forall x. GameSessionQueue -> Rep GameSessionQueue x
Prelude.Generic)
newGameSessionQueue ::
GameSessionQueue
newGameSessionQueue :: GameSessionQueue
newGameSessionQueue =
GameSessionQueue'
{ $sel:customEventData:GameSessionQueue' :: Maybe Text
customEventData =
forall a. Maybe a
Prelude.Nothing,
$sel:destinations:GameSessionQueue' :: Maybe [GameSessionQueueDestination]
destinations = forall a. Maybe a
Prelude.Nothing,
$sel:filterConfiguration:GameSessionQueue' :: Maybe FilterConfiguration
filterConfiguration = forall a. Maybe a
Prelude.Nothing,
$sel:gameSessionQueueArn:GameSessionQueue' :: Maybe Text
gameSessionQueueArn = forall a. Maybe a
Prelude.Nothing,
$sel:name:GameSessionQueue' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:notificationTarget:GameSessionQueue' :: Maybe Text
notificationTarget = forall a. Maybe a
Prelude.Nothing,
$sel:playerLatencyPolicies:GameSessionQueue' :: Maybe [PlayerLatencyPolicy]
playerLatencyPolicies = forall a. Maybe a
Prelude.Nothing,
$sel:priorityConfiguration:GameSessionQueue' :: Maybe PriorityConfiguration
priorityConfiguration = forall a. Maybe a
Prelude.Nothing,
$sel:timeoutInSeconds:GameSessionQueue' :: Maybe Natural
timeoutInSeconds = forall a. Maybe a
Prelude.Nothing
}
gameSessionQueue_customEventData :: Lens.Lens' GameSessionQueue (Prelude.Maybe Prelude.Text)
gameSessionQueue_customEventData :: Lens' GameSessionQueue (Maybe Text)
gameSessionQueue_customEventData = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameSessionQueue' {Maybe Text
customEventData :: Maybe Text
$sel:customEventData:GameSessionQueue' :: GameSessionQueue -> Maybe Text
customEventData} -> Maybe Text
customEventData) (\s :: GameSessionQueue
s@GameSessionQueue' {} Maybe Text
a -> GameSessionQueue
s {$sel:customEventData:GameSessionQueue' :: Maybe Text
customEventData = Maybe Text
a} :: GameSessionQueue)
gameSessionQueue_destinations :: Lens.Lens' GameSessionQueue (Prelude.Maybe [GameSessionQueueDestination])
gameSessionQueue_destinations :: Lens' GameSessionQueue (Maybe [GameSessionQueueDestination])
gameSessionQueue_destinations = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameSessionQueue' {Maybe [GameSessionQueueDestination]
destinations :: Maybe [GameSessionQueueDestination]
$sel:destinations:GameSessionQueue' :: GameSessionQueue -> Maybe [GameSessionQueueDestination]
destinations} -> Maybe [GameSessionQueueDestination]
destinations) (\s :: GameSessionQueue
s@GameSessionQueue' {} Maybe [GameSessionQueueDestination]
a -> GameSessionQueue
s {$sel:destinations:GameSessionQueue' :: Maybe [GameSessionQueueDestination]
destinations = Maybe [GameSessionQueueDestination]
a} :: GameSessionQueue) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
gameSessionQueue_filterConfiguration :: Lens.Lens' GameSessionQueue (Prelude.Maybe FilterConfiguration)
gameSessionQueue_filterConfiguration :: Lens' GameSessionQueue (Maybe FilterConfiguration)
gameSessionQueue_filterConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameSessionQueue' {Maybe FilterConfiguration
filterConfiguration :: Maybe FilterConfiguration
$sel:filterConfiguration:GameSessionQueue' :: GameSessionQueue -> Maybe FilterConfiguration
filterConfiguration} -> Maybe FilterConfiguration
filterConfiguration) (\s :: GameSessionQueue
s@GameSessionQueue' {} Maybe FilterConfiguration
a -> GameSessionQueue
s {$sel:filterConfiguration:GameSessionQueue' :: Maybe FilterConfiguration
filterConfiguration = Maybe FilterConfiguration
a} :: GameSessionQueue)
gameSessionQueue_gameSessionQueueArn :: Lens.Lens' GameSessionQueue (Prelude.Maybe Prelude.Text)
gameSessionQueue_gameSessionQueueArn :: Lens' GameSessionQueue (Maybe Text)
gameSessionQueue_gameSessionQueueArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameSessionQueue' {Maybe Text
gameSessionQueueArn :: Maybe Text
$sel:gameSessionQueueArn:GameSessionQueue' :: GameSessionQueue -> Maybe Text
gameSessionQueueArn} -> Maybe Text
gameSessionQueueArn) (\s :: GameSessionQueue
s@GameSessionQueue' {} Maybe Text
a -> GameSessionQueue
s {$sel:gameSessionQueueArn:GameSessionQueue' :: Maybe Text
gameSessionQueueArn = Maybe Text
a} :: GameSessionQueue)
gameSessionQueue_name :: Lens.Lens' GameSessionQueue (Prelude.Maybe Prelude.Text)
gameSessionQueue_name :: Lens' GameSessionQueue (Maybe Text)
gameSessionQueue_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameSessionQueue' {Maybe Text
name :: Maybe Text
$sel:name:GameSessionQueue' :: GameSessionQueue -> Maybe Text
name} -> Maybe Text
name) (\s :: GameSessionQueue
s@GameSessionQueue' {} Maybe Text
a -> GameSessionQueue
s {$sel:name:GameSessionQueue' :: Maybe Text
name = Maybe Text
a} :: GameSessionQueue)
gameSessionQueue_notificationTarget :: Lens.Lens' GameSessionQueue (Prelude.Maybe Prelude.Text)
gameSessionQueue_notificationTarget :: Lens' GameSessionQueue (Maybe Text)
gameSessionQueue_notificationTarget = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameSessionQueue' {Maybe Text
notificationTarget :: Maybe Text
$sel:notificationTarget:GameSessionQueue' :: GameSessionQueue -> Maybe Text
notificationTarget} -> Maybe Text
notificationTarget) (\s :: GameSessionQueue
s@GameSessionQueue' {} Maybe Text
a -> GameSessionQueue
s {$sel:notificationTarget:GameSessionQueue' :: Maybe Text
notificationTarget = Maybe Text
a} :: GameSessionQueue)
gameSessionQueue_playerLatencyPolicies :: Lens.Lens' GameSessionQueue (Prelude.Maybe [PlayerLatencyPolicy])
gameSessionQueue_playerLatencyPolicies :: Lens' GameSessionQueue (Maybe [PlayerLatencyPolicy])
gameSessionQueue_playerLatencyPolicies = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameSessionQueue' {Maybe [PlayerLatencyPolicy]
playerLatencyPolicies :: Maybe [PlayerLatencyPolicy]
$sel:playerLatencyPolicies:GameSessionQueue' :: GameSessionQueue -> Maybe [PlayerLatencyPolicy]
playerLatencyPolicies} -> Maybe [PlayerLatencyPolicy]
playerLatencyPolicies) (\s :: GameSessionQueue
s@GameSessionQueue' {} Maybe [PlayerLatencyPolicy]
a -> GameSessionQueue
s {$sel:playerLatencyPolicies:GameSessionQueue' :: Maybe [PlayerLatencyPolicy]
playerLatencyPolicies = Maybe [PlayerLatencyPolicy]
a} :: GameSessionQueue) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
gameSessionQueue_priorityConfiguration :: Lens.Lens' GameSessionQueue (Prelude.Maybe PriorityConfiguration)
gameSessionQueue_priorityConfiguration :: Lens' GameSessionQueue (Maybe PriorityConfiguration)
gameSessionQueue_priorityConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameSessionQueue' {Maybe PriorityConfiguration
priorityConfiguration :: Maybe PriorityConfiguration
$sel:priorityConfiguration:GameSessionQueue' :: GameSessionQueue -> Maybe PriorityConfiguration
priorityConfiguration} -> Maybe PriorityConfiguration
priorityConfiguration) (\s :: GameSessionQueue
s@GameSessionQueue' {} Maybe PriorityConfiguration
a -> GameSessionQueue
s {$sel:priorityConfiguration:GameSessionQueue' :: Maybe PriorityConfiguration
priorityConfiguration = Maybe PriorityConfiguration
a} :: GameSessionQueue)
gameSessionQueue_timeoutInSeconds :: Lens.Lens' GameSessionQueue (Prelude.Maybe Prelude.Natural)
gameSessionQueue_timeoutInSeconds :: Lens' GameSessionQueue (Maybe Natural)
gameSessionQueue_timeoutInSeconds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameSessionQueue' {Maybe Natural
timeoutInSeconds :: Maybe Natural
$sel:timeoutInSeconds:GameSessionQueue' :: GameSessionQueue -> Maybe Natural
timeoutInSeconds} -> Maybe Natural
timeoutInSeconds) (\s :: GameSessionQueue
s@GameSessionQueue' {} Maybe Natural
a -> GameSessionQueue
s {$sel:timeoutInSeconds:GameSessionQueue' :: Maybe Natural
timeoutInSeconds = Maybe Natural
a} :: GameSessionQueue)
instance Data.FromJSON GameSessionQueue where
parseJSON :: Value -> Parser GameSessionQueue
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"GameSessionQueue"
( \Object
x ->
Maybe Text
-> Maybe [GameSessionQueueDestination]
-> Maybe FilterConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [PlayerLatencyPolicy]
-> Maybe PriorityConfiguration
-> Maybe Natural
-> GameSessionQueue
GameSessionQueue'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CustomEventData")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Destinations" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"FilterConfiguration")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"GameSessionQueueArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Name")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"NotificationTarget")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"PlayerLatencyPolicies"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"PriorityConfiguration")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"TimeoutInSeconds")
)
instance Prelude.Hashable GameSessionQueue where
hashWithSalt :: Int -> GameSessionQueue -> Int
hashWithSalt Int
_salt GameSessionQueue' {Maybe Natural
Maybe [GameSessionQueueDestination]
Maybe [PlayerLatencyPolicy]
Maybe Text
Maybe FilterConfiguration
Maybe PriorityConfiguration
timeoutInSeconds :: Maybe Natural
priorityConfiguration :: Maybe PriorityConfiguration
playerLatencyPolicies :: Maybe [PlayerLatencyPolicy]
notificationTarget :: Maybe Text
name :: Maybe Text
gameSessionQueueArn :: Maybe Text
filterConfiguration :: Maybe FilterConfiguration
destinations :: Maybe [GameSessionQueueDestination]
customEventData :: Maybe Text
$sel:timeoutInSeconds:GameSessionQueue' :: GameSessionQueue -> Maybe Natural
$sel:priorityConfiguration:GameSessionQueue' :: GameSessionQueue -> Maybe PriorityConfiguration
$sel:playerLatencyPolicies:GameSessionQueue' :: GameSessionQueue -> Maybe [PlayerLatencyPolicy]
$sel:notificationTarget:GameSessionQueue' :: GameSessionQueue -> Maybe Text
$sel:name:GameSessionQueue' :: GameSessionQueue -> Maybe Text
$sel:gameSessionQueueArn:GameSessionQueue' :: GameSessionQueue -> Maybe Text
$sel:filterConfiguration:GameSessionQueue' :: GameSessionQueue -> Maybe FilterConfiguration
$sel:destinations:GameSessionQueue' :: GameSessionQueue -> Maybe [GameSessionQueueDestination]
$sel:customEventData:GameSessionQueue' :: GameSessionQueue -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
customEventData
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [GameSessionQueueDestination]
destinations
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe FilterConfiguration
filterConfiguration
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
gameSessionQueueArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
notificationTarget
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [PlayerLatencyPolicy]
playerLatencyPolicies
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PriorityConfiguration
priorityConfiguration
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
timeoutInSeconds
instance Prelude.NFData GameSessionQueue where
rnf :: GameSessionQueue -> ()
rnf GameSessionQueue' {Maybe Natural
Maybe [GameSessionQueueDestination]
Maybe [PlayerLatencyPolicy]
Maybe Text
Maybe FilterConfiguration
Maybe PriorityConfiguration
timeoutInSeconds :: Maybe Natural
priorityConfiguration :: Maybe PriorityConfiguration
playerLatencyPolicies :: Maybe [PlayerLatencyPolicy]
notificationTarget :: Maybe Text
name :: Maybe Text
gameSessionQueueArn :: Maybe Text
filterConfiguration :: Maybe FilterConfiguration
destinations :: Maybe [GameSessionQueueDestination]
customEventData :: Maybe Text
$sel:timeoutInSeconds:GameSessionQueue' :: GameSessionQueue -> Maybe Natural
$sel:priorityConfiguration:GameSessionQueue' :: GameSessionQueue -> Maybe PriorityConfiguration
$sel:playerLatencyPolicies:GameSessionQueue' :: GameSessionQueue -> Maybe [PlayerLatencyPolicy]
$sel:notificationTarget:GameSessionQueue' :: GameSessionQueue -> Maybe Text
$sel:name:GameSessionQueue' :: GameSessionQueue -> Maybe Text
$sel:gameSessionQueueArn:GameSessionQueue' :: GameSessionQueue -> Maybe Text
$sel:filterConfiguration:GameSessionQueue' :: GameSessionQueue -> Maybe FilterConfiguration
$sel:destinations:GameSessionQueue' :: GameSessionQueue -> Maybe [GameSessionQueueDestination]
$sel:customEventData:GameSessionQueue' :: GameSessionQueue -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
customEventData
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [GameSessionQueueDestination]
destinations
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe FilterConfiguration
filterConfiguration
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
gameSessionQueueArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
notificationTarget
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [PlayerLatencyPolicy]
playerLatencyPolicies
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PriorityConfiguration
priorityConfiguration
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
timeoutInSeconds