{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.GameLift.CreateGameSessionQueue
(
CreateGameSessionQueue (..),
newCreateGameSessionQueue,
createGameSessionQueue_playerLatencyPolicies,
createGameSessionQueue_filterConfiguration,
createGameSessionQueue_notificationTarget,
createGameSessionQueue_timeoutInSeconds,
createGameSessionQueue_destinations,
createGameSessionQueue_customEventData,
createGameSessionQueue_priorityConfiguration,
createGameSessionQueue_tags,
createGameSessionQueue_name,
CreateGameSessionQueueResponse (..),
newCreateGameSessionQueueResponse,
createGameSessionQueueResponse_gameSessionQueue,
createGameSessionQueueResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.GameLift.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateGameSessionQueue = CreateGameSessionQueue'
{
CreateGameSessionQueue -> Maybe [PlayerLatencyPolicy]
playerLatencyPolicies :: Prelude.Maybe [PlayerLatencyPolicy],
CreateGameSessionQueue -> Maybe FilterConfiguration
filterConfiguration :: Prelude.Maybe FilterConfiguration,
CreateGameSessionQueue -> Maybe Text
notificationTarget :: Prelude.Maybe Prelude.Text,
CreateGameSessionQueue -> Maybe Natural
timeoutInSeconds :: Prelude.Maybe Prelude.Natural,
CreateGameSessionQueue -> Maybe [GameSessionQueueDestination]
destinations :: Prelude.Maybe [GameSessionQueueDestination],
CreateGameSessionQueue -> Maybe Text
customEventData :: Prelude.Maybe Prelude.Text,
CreateGameSessionQueue -> Maybe PriorityConfiguration
priorityConfiguration :: Prelude.Maybe PriorityConfiguration,
CreateGameSessionQueue -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateGameSessionQueue -> Text
name :: Prelude.Text
}
deriving (CreateGameSessionQueue -> CreateGameSessionQueue -> Bool
(CreateGameSessionQueue -> CreateGameSessionQueue -> Bool)
-> (CreateGameSessionQueue -> CreateGameSessionQueue -> Bool)
-> Eq CreateGameSessionQueue
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateGameSessionQueue -> CreateGameSessionQueue -> Bool
$c/= :: CreateGameSessionQueue -> CreateGameSessionQueue -> Bool
== :: CreateGameSessionQueue -> CreateGameSessionQueue -> Bool
$c== :: CreateGameSessionQueue -> CreateGameSessionQueue -> Bool
Prelude.Eq, ReadPrec [CreateGameSessionQueue]
ReadPrec CreateGameSessionQueue
Int -> ReadS CreateGameSessionQueue
ReadS [CreateGameSessionQueue]
(Int -> ReadS CreateGameSessionQueue)
-> ReadS [CreateGameSessionQueue]
-> ReadPrec CreateGameSessionQueue
-> ReadPrec [CreateGameSessionQueue]
-> Read CreateGameSessionQueue
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateGameSessionQueue]
$creadListPrec :: ReadPrec [CreateGameSessionQueue]
readPrec :: ReadPrec CreateGameSessionQueue
$creadPrec :: ReadPrec CreateGameSessionQueue
readList :: ReadS [CreateGameSessionQueue]
$creadList :: ReadS [CreateGameSessionQueue]
readsPrec :: Int -> ReadS CreateGameSessionQueue
$creadsPrec :: Int -> ReadS CreateGameSessionQueue
Prelude.Read, Int -> CreateGameSessionQueue -> ShowS
[CreateGameSessionQueue] -> ShowS
CreateGameSessionQueue -> String
(Int -> CreateGameSessionQueue -> ShowS)
-> (CreateGameSessionQueue -> String)
-> ([CreateGameSessionQueue] -> ShowS)
-> Show CreateGameSessionQueue
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateGameSessionQueue] -> ShowS
$cshowList :: [CreateGameSessionQueue] -> ShowS
show :: CreateGameSessionQueue -> String
$cshow :: CreateGameSessionQueue -> String
showsPrec :: Int -> CreateGameSessionQueue -> ShowS
$cshowsPrec :: Int -> CreateGameSessionQueue -> ShowS
Prelude.Show, (forall x. CreateGameSessionQueue -> Rep CreateGameSessionQueue x)
-> (forall x.
Rep CreateGameSessionQueue x -> CreateGameSessionQueue)
-> Generic CreateGameSessionQueue
forall x. Rep CreateGameSessionQueue x -> CreateGameSessionQueue
forall x. CreateGameSessionQueue -> Rep CreateGameSessionQueue x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateGameSessionQueue x -> CreateGameSessionQueue
$cfrom :: forall x. CreateGameSessionQueue -> Rep CreateGameSessionQueue x
Prelude.Generic)
newCreateGameSessionQueue ::
Prelude.Text ->
CreateGameSessionQueue
newCreateGameSessionQueue :: Text -> CreateGameSessionQueue
newCreateGameSessionQueue Text
pName_ =
CreateGameSessionQueue' :: Maybe [PlayerLatencyPolicy]
-> Maybe FilterConfiguration
-> Maybe Text
-> Maybe Natural
-> Maybe [GameSessionQueueDestination]
-> Maybe Text
-> Maybe PriorityConfiguration
-> Maybe [Tag]
-> Text
-> CreateGameSessionQueue
CreateGameSessionQueue'
{ $sel:playerLatencyPolicies:CreateGameSessionQueue' :: Maybe [PlayerLatencyPolicy]
playerLatencyPolicies =
Maybe [PlayerLatencyPolicy]
forall a. Maybe a
Prelude.Nothing,
$sel:filterConfiguration:CreateGameSessionQueue' :: Maybe FilterConfiguration
filterConfiguration = Maybe FilterConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:notificationTarget:CreateGameSessionQueue' :: Maybe Text
notificationTarget = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:timeoutInSeconds:CreateGameSessionQueue' :: Maybe Natural
timeoutInSeconds = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:destinations:CreateGameSessionQueue' :: Maybe [GameSessionQueueDestination]
destinations = Maybe [GameSessionQueueDestination]
forall a. Maybe a
Prelude.Nothing,
$sel:customEventData:CreateGameSessionQueue' :: Maybe Text
customEventData = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:priorityConfiguration:CreateGameSessionQueue' :: Maybe PriorityConfiguration
priorityConfiguration = Maybe PriorityConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateGameSessionQueue' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:name:CreateGameSessionQueue' :: Text
name = Text
pName_
}
createGameSessionQueue_playerLatencyPolicies :: Lens.Lens' CreateGameSessionQueue (Prelude.Maybe [PlayerLatencyPolicy])
createGameSessionQueue_playerLatencyPolicies :: (Maybe [PlayerLatencyPolicy] -> f (Maybe [PlayerLatencyPolicy]))
-> CreateGameSessionQueue -> f CreateGameSessionQueue
createGameSessionQueue_playerLatencyPolicies = (CreateGameSessionQueue -> Maybe [PlayerLatencyPolicy])
-> (CreateGameSessionQueue
-> Maybe [PlayerLatencyPolicy] -> CreateGameSessionQueue)
-> Lens
CreateGameSessionQueue
CreateGameSessionQueue
(Maybe [PlayerLatencyPolicy])
(Maybe [PlayerLatencyPolicy])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGameSessionQueue' {Maybe [PlayerLatencyPolicy]
playerLatencyPolicies :: Maybe [PlayerLatencyPolicy]
$sel:playerLatencyPolicies:CreateGameSessionQueue' :: CreateGameSessionQueue -> Maybe [PlayerLatencyPolicy]
playerLatencyPolicies} -> Maybe [PlayerLatencyPolicy]
playerLatencyPolicies) (\s :: CreateGameSessionQueue
s@CreateGameSessionQueue' {} Maybe [PlayerLatencyPolicy]
a -> CreateGameSessionQueue
s {$sel:playerLatencyPolicies:CreateGameSessionQueue' :: Maybe [PlayerLatencyPolicy]
playerLatencyPolicies = Maybe [PlayerLatencyPolicy]
a} :: CreateGameSessionQueue) ((Maybe [PlayerLatencyPolicy] -> f (Maybe [PlayerLatencyPolicy]))
-> CreateGameSessionQueue -> f CreateGameSessionQueue)
-> ((Maybe [PlayerLatencyPolicy]
-> f (Maybe [PlayerLatencyPolicy]))
-> Maybe [PlayerLatencyPolicy] -> f (Maybe [PlayerLatencyPolicy]))
-> (Maybe [PlayerLatencyPolicy] -> f (Maybe [PlayerLatencyPolicy]))
-> CreateGameSessionQueue
-> f CreateGameSessionQueue
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[PlayerLatencyPolicy]
[PlayerLatencyPolicy]
[PlayerLatencyPolicy]
[PlayerLatencyPolicy]
-> Iso
(Maybe [PlayerLatencyPolicy])
(Maybe [PlayerLatencyPolicy])
(Maybe [PlayerLatencyPolicy])
(Maybe [PlayerLatencyPolicy])
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
[PlayerLatencyPolicy]
[PlayerLatencyPolicy]
[PlayerLatencyPolicy]
[PlayerLatencyPolicy]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createGameSessionQueue_filterConfiguration :: Lens.Lens' CreateGameSessionQueue (Prelude.Maybe FilterConfiguration)
createGameSessionQueue_filterConfiguration :: (Maybe FilterConfiguration -> f (Maybe FilterConfiguration))
-> CreateGameSessionQueue -> f CreateGameSessionQueue
createGameSessionQueue_filterConfiguration = (CreateGameSessionQueue -> Maybe FilterConfiguration)
-> (CreateGameSessionQueue
-> Maybe FilterConfiguration -> CreateGameSessionQueue)
-> Lens
CreateGameSessionQueue
CreateGameSessionQueue
(Maybe FilterConfiguration)
(Maybe FilterConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGameSessionQueue' {Maybe FilterConfiguration
filterConfiguration :: Maybe FilterConfiguration
$sel:filterConfiguration:CreateGameSessionQueue' :: CreateGameSessionQueue -> Maybe FilterConfiguration
filterConfiguration} -> Maybe FilterConfiguration
filterConfiguration) (\s :: CreateGameSessionQueue
s@CreateGameSessionQueue' {} Maybe FilterConfiguration
a -> CreateGameSessionQueue
s {$sel:filterConfiguration:CreateGameSessionQueue' :: Maybe FilterConfiguration
filterConfiguration = Maybe FilterConfiguration
a} :: CreateGameSessionQueue)
createGameSessionQueue_notificationTarget :: Lens.Lens' CreateGameSessionQueue (Prelude.Maybe Prelude.Text)
createGameSessionQueue_notificationTarget :: (Maybe Text -> f (Maybe Text))
-> CreateGameSessionQueue -> f CreateGameSessionQueue
createGameSessionQueue_notificationTarget = (CreateGameSessionQueue -> Maybe Text)
-> (CreateGameSessionQueue -> Maybe Text -> CreateGameSessionQueue)
-> Lens
CreateGameSessionQueue
CreateGameSessionQueue
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGameSessionQueue' {Maybe Text
notificationTarget :: Maybe Text
$sel:notificationTarget:CreateGameSessionQueue' :: CreateGameSessionQueue -> Maybe Text
notificationTarget} -> Maybe Text
notificationTarget) (\s :: CreateGameSessionQueue
s@CreateGameSessionQueue' {} Maybe Text
a -> CreateGameSessionQueue
s {$sel:notificationTarget:CreateGameSessionQueue' :: Maybe Text
notificationTarget = Maybe Text
a} :: CreateGameSessionQueue)
createGameSessionQueue_timeoutInSeconds :: Lens.Lens' CreateGameSessionQueue (Prelude.Maybe Prelude.Natural)
createGameSessionQueue_timeoutInSeconds :: (Maybe Natural -> f (Maybe Natural))
-> CreateGameSessionQueue -> f CreateGameSessionQueue
createGameSessionQueue_timeoutInSeconds = (CreateGameSessionQueue -> Maybe Natural)
-> (CreateGameSessionQueue
-> Maybe Natural -> CreateGameSessionQueue)
-> Lens
CreateGameSessionQueue
CreateGameSessionQueue
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGameSessionQueue' {Maybe Natural
timeoutInSeconds :: Maybe Natural
$sel:timeoutInSeconds:CreateGameSessionQueue' :: CreateGameSessionQueue -> Maybe Natural
timeoutInSeconds} -> Maybe Natural
timeoutInSeconds) (\s :: CreateGameSessionQueue
s@CreateGameSessionQueue' {} Maybe Natural
a -> CreateGameSessionQueue
s {$sel:timeoutInSeconds:CreateGameSessionQueue' :: Maybe Natural
timeoutInSeconds = Maybe Natural
a} :: CreateGameSessionQueue)
createGameSessionQueue_destinations :: Lens.Lens' CreateGameSessionQueue (Prelude.Maybe [GameSessionQueueDestination])
createGameSessionQueue_destinations :: (Maybe [GameSessionQueueDestination]
-> f (Maybe [GameSessionQueueDestination]))
-> CreateGameSessionQueue -> f CreateGameSessionQueue
createGameSessionQueue_destinations = (CreateGameSessionQueue -> Maybe [GameSessionQueueDestination])
-> (CreateGameSessionQueue
-> Maybe [GameSessionQueueDestination] -> CreateGameSessionQueue)
-> Lens
CreateGameSessionQueue
CreateGameSessionQueue
(Maybe [GameSessionQueueDestination])
(Maybe [GameSessionQueueDestination])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGameSessionQueue' {Maybe [GameSessionQueueDestination]
destinations :: Maybe [GameSessionQueueDestination]
$sel:destinations:CreateGameSessionQueue' :: CreateGameSessionQueue -> Maybe [GameSessionQueueDestination]
destinations} -> Maybe [GameSessionQueueDestination]
destinations) (\s :: CreateGameSessionQueue
s@CreateGameSessionQueue' {} Maybe [GameSessionQueueDestination]
a -> CreateGameSessionQueue
s {$sel:destinations:CreateGameSessionQueue' :: Maybe [GameSessionQueueDestination]
destinations = Maybe [GameSessionQueueDestination]
a} :: CreateGameSessionQueue) ((Maybe [GameSessionQueueDestination]
-> f (Maybe [GameSessionQueueDestination]))
-> CreateGameSessionQueue -> f CreateGameSessionQueue)
-> ((Maybe [GameSessionQueueDestination]
-> f (Maybe [GameSessionQueueDestination]))
-> Maybe [GameSessionQueueDestination]
-> f (Maybe [GameSessionQueueDestination]))
-> (Maybe [GameSessionQueueDestination]
-> f (Maybe [GameSessionQueueDestination]))
-> CreateGameSessionQueue
-> f CreateGameSessionQueue
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[GameSessionQueueDestination]
[GameSessionQueueDestination]
[GameSessionQueueDestination]
[GameSessionQueueDestination]
-> Iso
(Maybe [GameSessionQueueDestination])
(Maybe [GameSessionQueueDestination])
(Maybe [GameSessionQueueDestination])
(Maybe [GameSessionQueueDestination])
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
[GameSessionQueueDestination]
[GameSessionQueueDestination]
[GameSessionQueueDestination]
[GameSessionQueueDestination]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createGameSessionQueue_customEventData :: Lens.Lens' CreateGameSessionQueue (Prelude.Maybe Prelude.Text)
createGameSessionQueue_customEventData :: (Maybe Text -> f (Maybe Text))
-> CreateGameSessionQueue -> f CreateGameSessionQueue
createGameSessionQueue_customEventData = (CreateGameSessionQueue -> Maybe Text)
-> (CreateGameSessionQueue -> Maybe Text -> CreateGameSessionQueue)
-> Lens
CreateGameSessionQueue
CreateGameSessionQueue
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGameSessionQueue' {Maybe Text
customEventData :: Maybe Text
$sel:customEventData:CreateGameSessionQueue' :: CreateGameSessionQueue -> Maybe Text
customEventData} -> Maybe Text
customEventData) (\s :: CreateGameSessionQueue
s@CreateGameSessionQueue' {} Maybe Text
a -> CreateGameSessionQueue
s {$sel:customEventData:CreateGameSessionQueue' :: Maybe Text
customEventData = Maybe Text
a} :: CreateGameSessionQueue)
createGameSessionQueue_priorityConfiguration :: Lens.Lens' CreateGameSessionQueue (Prelude.Maybe PriorityConfiguration)
createGameSessionQueue_priorityConfiguration :: (Maybe PriorityConfiguration -> f (Maybe PriorityConfiguration))
-> CreateGameSessionQueue -> f CreateGameSessionQueue
createGameSessionQueue_priorityConfiguration = (CreateGameSessionQueue -> Maybe PriorityConfiguration)
-> (CreateGameSessionQueue
-> Maybe PriorityConfiguration -> CreateGameSessionQueue)
-> Lens
CreateGameSessionQueue
CreateGameSessionQueue
(Maybe PriorityConfiguration)
(Maybe PriorityConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGameSessionQueue' {Maybe PriorityConfiguration
priorityConfiguration :: Maybe PriorityConfiguration
$sel:priorityConfiguration:CreateGameSessionQueue' :: CreateGameSessionQueue -> Maybe PriorityConfiguration
priorityConfiguration} -> Maybe PriorityConfiguration
priorityConfiguration) (\s :: CreateGameSessionQueue
s@CreateGameSessionQueue' {} Maybe PriorityConfiguration
a -> CreateGameSessionQueue
s {$sel:priorityConfiguration:CreateGameSessionQueue' :: Maybe PriorityConfiguration
priorityConfiguration = Maybe PriorityConfiguration
a} :: CreateGameSessionQueue)
createGameSessionQueue_tags :: Lens.Lens' CreateGameSessionQueue (Prelude.Maybe [Tag])
createGameSessionQueue_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateGameSessionQueue -> f CreateGameSessionQueue
createGameSessionQueue_tags = (CreateGameSessionQueue -> Maybe [Tag])
-> (CreateGameSessionQueue
-> Maybe [Tag] -> CreateGameSessionQueue)
-> Lens
CreateGameSessionQueue
CreateGameSessionQueue
(Maybe [Tag])
(Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGameSessionQueue' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateGameSessionQueue' :: CreateGameSessionQueue -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateGameSessionQueue
s@CreateGameSessionQueue' {} Maybe [Tag]
a -> CreateGameSessionQueue
s {$sel:tags:CreateGameSessionQueue' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateGameSessionQueue) ((Maybe [Tag] -> f (Maybe [Tag]))
-> CreateGameSessionQueue -> f CreateGameSessionQueue)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateGameSessionQueue
-> f CreateGameSessionQueue
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createGameSessionQueue_name :: Lens.Lens' CreateGameSessionQueue Prelude.Text
createGameSessionQueue_name :: (Text -> f Text)
-> CreateGameSessionQueue -> f CreateGameSessionQueue
createGameSessionQueue_name = (CreateGameSessionQueue -> Text)
-> (CreateGameSessionQueue -> Text -> CreateGameSessionQueue)
-> Lens CreateGameSessionQueue CreateGameSessionQueue Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGameSessionQueue' {Text
name :: Text
$sel:name:CreateGameSessionQueue' :: CreateGameSessionQueue -> Text
name} -> Text
name) (\s :: CreateGameSessionQueue
s@CreateGameSessionQueue' {} Text
a -> CreateGameSessionQueue
s {$sel:name:CreateGameSessionQueue' :: Text
name = Text
a} :: CreateGameSessionQueue)
instance Core.AWSRequest CreateGameSessionQueue where
type
AWSResponse CreateGameSessionQueue =
CreateGameSessionQueueResponse
request :: CreateGameSessionQueue -> Request CreateGameSessionQueue
request = Service -> CreateGameSessionQueue -> Request CreateGameSessionQueue
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateGameSessionQueue
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateGameSessionQueue)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateGameSessionQueue))
-> Logger
-> Service
-> Proxy CreateGameSessionQueue
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateGameSessionQueue)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe GameSessionQueue -> Int -> CreateGameSessionQueueResponse
CreateGameSessionQueueResponse'
(Maybe GameSessionQueue -> Int -> CreateGameSessionQueueResponse)
-> Either String (Maybe GameSessionQueue)
-> Either String (Int -> CreateGameSessionQueueResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe GameSessionQueue)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"GameSessionQueue")
Either String (Int -> CreateGameSessionQueueResponse)
-> Either String Int
-> Either String CreateGameSessionQueueResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable CreateGameSessionQueue
instance Prelude.NFData CreateGameSessionQueue
instance Core.ToHeaders CreateGameSessionQueue where
toHeaders :: CreateGameSessionQueue -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateGameSessionQueue -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"GameLift.CreateGameSessionQueue" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON CreateGameSessionQueue where
toJSON :: CreateGameSessionQueue -> Value
toJSON CreateGameSessionQueue' {Maybe Natural
Maybe [GameSessionQueueDestination]
Maybe [PlayerLatencyPolicy]
Maybe [Tag]
Maybe Text
Maybe FilterConfiguration
Maybe PriorityConfiguration
Text
name :: Text
tags :: Maybe [Tag]
priorityConfiguration :: Maybe PriorityConfiguration
customEventData :: Maybe Text
destinations :: Maybe [GameSessionQueueDestination]
timeoutInSeconds :: Maybe Natural
notificationTarget :: Maybe Text
filterConfiguration :: Maybe FilterConfiguration
playerLatencyPolicies :: Maybe [PlayerLatencyPolicy]
$sel:name:CreateGameSessionQueue' :: CreateGameSessionQueue -> Text
$sel:tags:CreateGameSessionQueue' :: CreateGameSessionQueue -> Maybe [Tag]
$sel:priorityConfiguration:CreateGameSessionQueue' :: CreateGameSessionQueue -> Maybe PriorityConfiguration
$sel:customEventData:CreateGameSessionQueue' :: CreateGameSessionQueue -> Maybe Text
$sel:destinations:CreateGameSessionQueue' :: CreateGameSessionQueue -> Maybe [GameSessionQueueDestination]
$sel:timeoutInSeconds:CreateGameSessionQueue' :: CreateGameSessionQueue -> Maybe Natural
$sel:notificationTarget:CreateGameSessionQueue' :: CreateGameSessionQueue -> Maybe Text
$sel:filterConfiguration:CreateGameSessionQueue' :: CreateGameSessionQueue -> Maybe FilterConfiguration
$sel:playerLatencyPolicies:CreateGameSessionQueue' :: CreateGameSessionQueue -> Maybe [PlayerLatencyPolicy]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"PlayerLatencyPolicies" Text -> [PlayerLatencyPolicy] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([PlayerLatencyPolicy] -> Pair)
-> Maybe [PlayerLatencyPolicy] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PlayerLatencyPolicy]
playerLatencyPolicies,
(Text
"FilterConfiguration" Text -> FilterConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(FilterConfiguration -> Pair)
-> Maybe FilterConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FilterConfiguration
filterConfiguration,
(Text
"NotificationTarget" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
notificationTarget,
(Text
"TimeoutInSeconds" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
timeoutInSeconds,
(Text
"Destinations" Text -> [GameSessionQueueDestination] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([GameSessionQueueDestination] -> Pair)
-> Maybe [GameSessionQueueDestination] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [GameSessionQueueDestination]
destinations,
(Text
"CustomEventData" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
customEventData,
(Text
"PriorityConfiguration" Text -> PriorityConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(PriorityConfiguration -> Pair)
-> Maybe PriorityConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PriorityConfiguration
priorityConfiguration,
(Text
"Tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name)
]
)
instance Core.ToPath CreateGameSessionQueue where
toPath :: CreateGameSessionQueue -> ByteString
toPath = ByteString -> CreateGameSessionQueue -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateGameSessionQueue where
toQuery :: CreateGameSessionQueue -> QueryString
toQuery = QueryString -> CreateGameSessionQueue -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateGameSessionQueueResponse = CreateGameSessionQueueResponse'
{
CreateGameSessionQueueResponse -> Maybe GameSessionQueue
gameSessionQueue :: Prelude.Maybe GameSessionQueue,
CreateGameSessionQueueResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateGameSessionQueueResponse
-> CreateGameSessionQueueResponse -> Bool
(CreateGameSessionQueueResponse
-> CreateGameSessionQueueResponse -> Bool)
-> (CreateGameSessionQueueResponse
-> CreateGameSessionQueueResponse -> Bool)
-> Eq CreateGameSessionQueueResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateGameSessionQueueResponse
-> CreateGameSessionQueueResponse -> Bool
$c/= :: CreateGameSessionQueueResponse
-> CreateGameSessionQueueResponse -> Bool
== :: CreateGameSessionQueueResponse
-> CreateGameSessionQueueResponse -> Bool
$c== :: CreateGameSessionQueueResponse
-> CreateGameSessionQueueResponse -> Bool
Prelude.Eq, ReadPrec [CreateGameSessionQueueResponse]
ReadPrec CreateGameSessionQueueResponse
Int -> ReadS CreateGameSessionQueueResponse
ReadS [CreateGameSessionQueueResponse]
(Int -> ReadS CreateGameSessionQueueResponse)
-> ReadS [CreateGameSessionQueueResponse]
-> ReadPrec CreateGameSessionQueueResponse
-> ReadPrec [CreateGameSessionQueueResponse]
-> Read CreateGameSessionQueueResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateGameSessionQueueResponse]
$creadListPrec :: ReadPrec [CreateGameSessionQueueResponse]
readPrec :: ReadPrec CreateGameSessionQueueResponse
$creadPrec :: ReadPrec CreateGameSessionQueueResponse
readList :: ReadS [CreateGameSessionQueueResponse]
$creadList :: ReadS [CreateGameSessionQueueResponse]
readsPrec :: Int -> ReadS CreateGameSessionQueueResponse
$creadsPrec :: Int -> ReadS CreateGameSessionQueueResponse
Prelude.Read, Int -> CreateGameSessionQueueResponse -> ShowS
[CreateGameSessionQueueResponse] -> ShowS
CreateGameSessionQueueResponse -> String
(Int -> CreateGameSessionQueueResponse -> ShowS)
-> (CreateGameSessionQueueResponse -> String)
-> ([CreateGameSessionQueueResponse] -> ShowS)
-> Show CreateGameSessionQueueResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateGameSessionQueueResponse] -> ShowS
$cshowList :: [CreateGameSessionQueueResponse] -> ShowS
show :: CreateGameSessionQueueResponse -> String
$cshow :: CreateGameSessionQueueResponse -> String
showsPrec :: Int -> CreateGameSessionQueueResponse -> ShowS
$cshowsPrec :: Int -> CreateGameSessionQueueResponse -> ShowS
Prelude.Show, (forall x.
CreateGameSessionQueueResponse
-> Rep CreateGameSessionQueueResponse x)
-> (forall x.
Rep CreateGameSessionQueueResponse x
-> CreateGameSessionQueueResponse)
-> Generic CreateGameSessionQueueResponse
forall x.
Rep CreateGameSessionQueueResponse x
-> CreateGameSessionQueueResponse
forall x.
CreateGameSessionQueueResponse
-> Rep CreateGameSessionQueueResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateGameSessionQueueResponse x
-> CreateGameSessionQueueResponse
$cfrom :: forall x.
CreateGameSessionQueueResponse
-> Rep CreateGameSessionQueueResponse x
Prelude.Generic)
newCreateGameSessionQueueResponse ::
Prelude.Int ->
CreateGameSessionQueueResponse
newCreateGameSessionQueueResponse :: Int -> CreateGameSessionQueueResponse
newCreateGameSessionQueueResponse Int
pHttpStatus_ =
CreateGameSessionQueueResponse' :: Maybe GameSessionQueue -> Int -> CreateGameSessionQueueResponse
CreateGameSessionQueueResponse'
{ $sel:gameSessionQueue:CreateGameSessionQueueResponse' :: Maybe GameSessionQueue
gameSessionQueue =
Maybe GameSessionQueue
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateGameSessionQueueResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createGameSessionQueueResponse_gameSessionQueue :: Lens.Lens' CreateGameSessionQueueResponse (Prelude.Maybe GameSessionQueue)
createGameSessionQueueResponse_gameSessionQueue :: (Maybe GameSessionQueue -> f (Maybe GameSessionQueue))
-> CreateGameSessionQueueResponse
-> f CreateGameSessionQueueResponse
createGameSessionQueueResponse_gameSessionQueue = (CreateGameSessionQueueResponse -> Maybe GameSessionQueue)
-> (CreateGameSessionQueueResponse
-> Maybe GameSessionQueue -> CreateGameSessionQueueResponse)
-> Lens
CreateGameSessionQueueResponse
CreateGameSessionQueueResponse
(Maybe GameSessionQueue)
(Maybe GameSessionQueue)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGameSessionQueueResponse' {Maybe GameSessionQueue
gameSessionQueue :: Maybe GameSessionQueue
$sel:gameSessionQueue:CreateGameSessionQueueResponse' :: CreateGameSessionQueueResponse -> Maybe GameSessionQueue
gameSessionQueue} -> Maybe GameSessionQueue
gameSessionQueue) (\s :: CreateGameSessionQueueResponse
s@CreateGameSessionQueueResponse' {} Maybe GameSessionQueue
a -> CreateGameSessionQueueResponse
s {$sel:gameSessionQueue:CreateGameSessionQueueResponse' :: Maybe GameSessionQueue
gameSessionQueue = Maybe GameSessionQueue
a} :: CreateGameSessionQueueResponse)
createGameSessionQueueResponse_httpStatus :: Lens.Lens' CreateGameSessionQueueResponse Prelude.Int
createGameSessionQueueResponse_httpStatus :: (Int -> f Int)
-> CreateGameSessionQueueResponse
-> f CreateGameSessionQueueResponse
createGameSessionQueueResponse_httpStatus = (CreateGameSessionQueueResponse -> Int)
-> (CreateGameSessionQueueResponse
-> Int -> CreateGameSessionQueueResponse)
-> Lens
CreateGameSessionQueueResponse
CreateGameSessionQueueResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGameSessionQueueResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateGameSessionQueueResponse' :: CreateGameSessionQueueResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateGameSessionQueueResponse
s@CreateGameSessionQueueResponse' {} Int
a -> CreateGameSessionQueueResponse
s {$sel:httpStatus:CreateGameSessionQueueResponse' :: Int
httpStatus = Int
a} :: CreateGameSessionQueueResponse)
instance
Prelude.NFData
CreateGameSessionQueueResponse