{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.GameLift.UpdateGameSessionQueue
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates the configuration of a game session queue, which determines how
-- the queue processes new game session requests. To update settings,
-- specify the queue name to be updated and provide the new settings. When
-- updating destinations, provide a complete list of destinations.
--
-- __Learn more__
--
-- <https://docs.aws.amazon.com/gamelift/latest/developerguide/queues-intro.html Using Multi-Region Queues>
module Amazonka.GameLift.UpdateGameSessionQueue
  ( -- * Creating a Request
    UpdateGameSessionQueue (..),
    newUpdateGameSessionQueue,

    -- * Request Lenses
    updateGameSessionQueue_customEventData,
    updateGameSessionQueue_destinations,
    updateGameSessionQueue_filterConfiguration,
    updateGameSessionQueue_notificationTarget,
    updateGameSessionQueue_playerLatencyPolicies,
    updateGameSessionQueue_priorityConfiguration,
    updateGameSessionQueue_timeoutInSeconds,
    updateGameSessionQueue_name,

    -- * Destructuring the Response
    UpdateGameSessionQueueResponse (..),
    newUpdateGameSessionQueueResponse,

    -- * Response Lenses
    updateGameSessionQueueResponse_gameSessionQueue,
    updateGameSessionQueueResponse_httpStatus,
  )
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
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newUpdateGameSessionQueue' smart constructor.
data UpdateGameSessionQueue = UpdateGameSessionQueue'
  { -- | Information to be added to all events that are related to this game
    -- session queue.
    UpdateGameSessionQueue -> Maybe Text
customEventData :: Prelude.Maybe Prelude.Text,
    -- | A list of fleets and\/or fleet aliases that can be used to fulfill game
    -- session placement requests in the queue. Destinations are identified by
    -- either a fleet ARN or a fleet alias ARN, and are listed in order of
    -- placement preference. When updating this list, provide a complete list
    -- of destinations.
    UpdateGameSessionQueue -> Maybe [GameSessionQueueDestination]
destinations :: Prelude.Maybe [GameSessionQueueDestination],
    -- | A list of locations where a queue is allowed to place new game sessions.
    -- Locations are specified in the form of Amazon Web Services Region codes,
    -- such as @us-west-2@. If this parameter is not set, game sessions can be
    -- placed in any queue location. To remove an existing filter
    -- configuration, pass in an empty set.
    UpdateGameSessionQueue -> Maybe FilterConfiguration
filterConfiguration :: Prelude.Maybe FilterConfiguration,
    -- | An SNS topic ARN that is set up to receive game session placement
    -- notifications. See
    -- <https://docs.aws.amazon.com/gamelift/latest/developerguide/queue-notification.html Setting up notifications for game session placement>.
    UpdateGameSessionQueue -> Maybe Text
notificationTarget :: Prelude.Maybe Prelude.Text,
    -- | A set of policies that act as a sliding cap on player latency. FleetIQ
    -- works to deliver low latency for most players in a game session. These
    -- policies ensure that no individual player can be placed into a game with
    -- unreasonably high latency. Use multiple policies to gradually relax
    -- latency requirements a step at a time. Multiple policies are applied
    -- based on their maximum allowed latency, starting with the lowest value.
    -- When updating policies, provide a complete collection of policies.
    UpdateGameSessionQueue -> Maybe [PlayerLatencyPolicy]
playerLatencyPolicies :: Prelude.Maybe [PlayerLatencyPolicy],
    -- | Custom settings to use when prioritizing destinations and locations for
    -- game session placements. This configuration replaces the FleetIQ default
    -- prioritization process. Priority types that are not explicitly named
    -- will be automatically applied at the end of the prioritization process.
    -- To remove an existing priority configuration, pass in an empty set.
    UpdateGameSessionQueue -> Maybe PriorityConfiguration
priorityConfiguration :: Prelude.Maybe PriorityConfiguration,
    -- | The maximum time, in seconds, that a new game session placement request
    -- remains in the queue. When a request exceeds this time, the game session
    -- placement changes to a @TIMED_OUT@ status.
    UpdateGameSessionQueue -> Maybe Natural
timeoutInSeconds :: Prelude.Maybe Prelude.Natural,
    -- | A descriptive label that is associated with game session queue. Queue
    -- names must be unique within each Region. You can use either the queue ID
    -- or ARN value.
    UpdateGameSessionQueue -> Text
name :: Prelude.Text
  }
  deriving (UpdateGameSessionQueue -> UpdateGameSessionQueue -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateGameSessionQueue -> UpdateGameSessionQueue -> Bool
$c/= :: UpdateGameSessionQueue -> UpdateGameSessionQueue -> Bool
== :: UpdateGameSessionQueue -> UpdateGameSessionQueue -> Bool
$c== :: UpdateGameSessionQueue -> UpdateGameSessionQueue -> Bool
Prelude.Eq, ReadPrec [UpdateGameSessionQueue]
ReadPrec UpdateGameSessionQueue
Int -> ReadS UpdateGameSessionQueue
ReadS [UpdateGameSessionQueue]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateGameSessionQueue]
$creadListPrec :: ReadPrec [UpdateGameSessionQueue]
readPrec :: ReadPrec UpdateGameSessionQueue
$creadPrec :: ReadPrec UpdateGameSessionQueue
readList :: ReadS [UpdateGameSessionQueue]
$creadList :: ReadS [UpdateGameSessionQueue]
readsPrec :: Int -> ReadS UpdateGameSessionQueue
$creadsPrec :: Int -> ReadS UpdateGameSessionQueue
Prelude.Read, Int -> UpdateGameSessionQueue -> ShowS
[UpdateGameSessionQueue] -> ShowS
UpdateGameSessionQueue -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateGameSessionQueue] -> ShowS
$cshowList :: [UpdateGameSessionQueue] -> ShowS
show :: UpdateGameSessionQueue -> String
$cshow :: UpdateGameSessionQueue -> String
showsPrec :: Int -> UpdateGameSessionQueue -> ShowS
$cshowsPrec :: Int -> UpdateGameSessionQueue -> ShowS
Prelude.Show, forall x. Rep UpdateGameSessionQueue x -> UpdateGameSessionQueue
forall x. UpdateGameSessionQueue -> Rep UpdateGameSessionQueue x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateGameSessionQueue x -> UpdateGameSessionQueue
$cfrom :: forall x. UpdateGameSessionQueue -> Rep UpdateGameSessionQueue x
Prelude.Generic)

-- |
-- Create a value of 'UpdateGameSessionQueue' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'customEventData', 'updateGameSessionQueue_customEventData' - Information to be added to all events that are related to this game
-- session queue.
--
-- 'destinations', 'updateGameSessionQueue_destinations' - A list of fleets and\/or fleet aliases that can be used to fulfill game
-- session placement requests in the queue. Destinations are identified by
-- either a fleet ARN or a fleet alias ARN, and are listed in order of
-- placement preference. When updating this list, provide a complete list
-- of destinations.
--
-- 'filterConfiguration', 'updateGameSessionQueue_filterConfiguration' - A list of locations where a queue is allowed to place new game sessions.
-- Locations are specified in the form of Amazon Web Services Region codes,
-- such as @us-west-2@. If this parameter is not set, game sessions can be
-- placed in any queue location. To remove an existing filter
-- configuration, pass in an empty set.
--
-- 'notificationTarget', 'updateGameSessionQueue_notificationTarget' - An SNS topic ARN that is set up to receive game session placement
-- notifications. See
-- <https://docs.aws.amazon.com/gamelift/latest/developerguide/queue-notification.html Setting up notifications for game session placement>.
--
-- 'playerLatencyPolicies', 'updateGameSessionQueue_playerLatencyPolicies' - A set of policies that act as a sliding cap on player latency. FleetIQ
-- works to deliver low latency for most players in a game session. These
-- policies ensure that no individual player can be placed into a game with
-- unreasonably high latency. Use multiple policies to gradually relax
-- latency requirements a step at a time. Multiple policies are applied
-- based on their maximum allowed latency, starting with the lowest value.
-- When updating policies, provide a complete collection of policies.
--
-- 'priorityConfiguration', 'updateGameSessionQueue_priorityConfiguration' - Custom settings to use when prioritizing destinations and locations for
-- game session placements. This configuration replaces the FleetIQ default
-- prioritization process. Priority types that are not explicitly named
-- will be automatically applied at the end of the prioritization process.
-- To remove an existing priority configuration, pass in an empty set.
--
-- 'timeoutInSeconds', 'updateGameSessionQueue_timeoutInSeconds' - The maximum time, in seconds, that a new game session placement request
-- remains in the queue. When a request exceeds this time, the game session
-- placement changes to a @TIMED_OUT@ status.
--
-- 'name', 'updateGameSessionQueue_name' - A descriptive label that is associated with game session queue. Queue
-- names must be unique within each Region. You can use either the queue ID
-- or ARN value.
newUpdateGameSessionQueue ::
  -- | 'name'
  Prelude.Text ->
  UpdateGameSessionQueue
newUpdateGameSessionQueue :: Text -> UpdateGameSessionQueue
newUpdateGameSessionQueue Text
pName_ =
  UpdateGameSessionQueue'
    { $sel:customEventData:UpdateGameSessionQueue' :: Maybe Text
customEventData =
        forall a. Maybe a
Prelude.Nothing,
      $sel:destinations:UpdateGameSessionQueue' :: Maybe [GameSessionQueueDestination]
destinations = forall a. Maybe a
Prelude.Nothing,
      $sel:filterConfiguration:UpdateGameSessionQueue' :: Maybe FilterConfiguration
filterConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:notificationTarget:UpdateGameSessionQueue' :: Maybe Text
notificationTarget = forall a. Maybe a
Prelude.Nothing,
      $sel:playerLatencyPolicies:UpdateGameSessionQueue' :: Maybe [PlayerLatencyPolicy]
playerLatencyPolicies = forall a. Maybe a
Prelude.Nothing,
      $sel:priorityConfiguration:UpdateGameSessionQueue' :: Maybe PriorityConfiguration
priorityConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:timeoutInSeconds:UpdateGameSessionQueue' :: Maybe Natural
timeoutInSeconds = forall a. Maybe a
Prelude.Nothing,
      $sel:name:UpdateGameSessionQueue' :: Text
name = Text
pName_
    }

-- | Information to be added to all events that are related to this game
-- session queue.
updateGameSessionQueue_customEventData :: Lens.Lens' UpdateGameSessionQueue (Prelude.Maybe Prelude.Text)
updateGameSessionQueue_customEventData :: Lens' UpdateGameSessionQueue (Maybe Text)
updateGameSessionQueue_customEventData = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGameSessionQueue' {Maybe Text
customEventData :: Maybe Text
$sel:customEventData:UpdateGameSessionQueue' :: UpdateGameSessionQueue -> Maybe Text
customEventData} -> Maybe Text
customEventData) (\s :: UpdateGameSessionQueue
s@UpdateGameSessionQueue' {} Maybe Text
a -> UpdateGameSessionQueue
s {$sel:customEventData:UpdateGameSessionQueue' :: Maybe Text
customEventData = Maybe Text
a} :: UpdateGameSessionQueue)

-- | A list of fleets and\/or fleet aliases that can be used to fulfill game
-- session placement requests in the queue. Destinations are identified by
-- either a fleet ARN or a fleet alias ARN, and are listed in order of
-- placement preference. When updating this list, provide a complete list
-- of destinations.
updateGameSessionQueue_destinations :: Lens.Lens' UpdateGameSessionQueue (Prelude.Maybe [GameSessionQueueDestination])
updateGameSessionQueue_destinations :: Lens' UpdateGameSessionQueue (Maybe [GameSessionQueueDestination])
updateGameSessionQueue_destinations = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGameSessionQueue' {Maybe [GameSessionQueueDestination]
destinations :: Maybe [GameSessionQueueDestination]
$sel:destinations:UpdateGameSessionQueue' :: UpdateGameSessionQueue -> Maybe [GameSessionQueueDestination]
destinations} -> Maybe [GameSessionQueueDestination]
destinations) (\s :: UpdateGameSessionQueue
s@UpdateGameSessionQueue' {} Maybe [GameSessionQueueDestination]
a -> UpdateGameSessionQueue
s {$sel:destinations:UpdateGameSessionQueue' :: Maybe [GameSessionQueueDestination]
destinations = Maybe [GameSessionQueueDestination]
a} :: UpdateGameSessionQueue) 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

-- | A list of locations where a queue is allowed to place new game sessions.
-- Locations are specified in the form of Amazon Web Services Region codes,
-- such as @us-west-2@. If this parameter is not set, game sessions can be
-- placed in any queue location. To remove an existing filter
-- configuration, pass in an empty set.
updateGameSessionQueue_filterConfiguration :: Lens.Lens' UpdateGameSessionQueue (Prelude.Maybe FilterConfiguration)
updateGameSessionQueue_filterConfiguration :: Lens' UpdateGameSessionQueue (Maybe FilterConfiguration)
updateGameSessionQueue_filterConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGameSessionQueue' {Maybe FilterConfiguration
filterConfiguration :: Maybe FilterConfiguration
$sel:filterConfiguration:UpdateGameSessionQueue' :: UpdateGameSessionQueue -> Maybe FilterConfiguration
filterConfiguration} -> Maybe FilterConfiguration
filterConfiguration) (\s :: UpdateGameSessionQueue
s@UpdateGameSessionQueue' {} Maybe FilterConfiguration
a -> UpdateGameSessionQueue
s {$sel:filterConfiguration:UpdateGameSessionQueue' :: Maybe FilterConfiguration
filterConfiguration = Maybe FilterConfiguration
a} :: UpdateGameSessionQueue)

-- | An SNS topic ARN that is set up to receive game session placement
-- notifications. See
-- <https://docs.aws.amazon.com/gamelift/latest/developerguide/queue-notification.html Setting up notifications for game session placement>.
updateGameSessionQueue_notificationTarget :: Lens.Lens' UpdateGameSessionQueue (Prelude.Maybe Prelude.Text)
updateGameSessionQueue_notificationTarget :: Lens' UpdateGameSessionQueue (Maybe Text)
updateGameSessionQueue_notificationTarget = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGameSessionQueue' {Maybe Text
notificationTarget :: Maybe Text
$sel:notificationTarget:UpdateGameSessionQueue' :: UpdateGameSessionQueue -> Maybe Text
notificationTarget} -> Maybe Text
notificationTarget) (\s :: UpdateGameSessionQueue
s@UpdateGameSessionQueue' {} Maybe Text
a -> UpdateGameSessionQueue
s {$sel:notificationTarget:UpdateGameSessionQueue' :: Maybe Text
notificationTarget = Maybe Text
a} :: UpdateGameSessionQueue)

-- | A set of policies that act as a sliding cap on player latency. FleetIQ
-- works to deliver low latency for most players in a game session. These
-- policies ensure that no individual player can be placed into a game with
-- unreasonably high latency. Use multiple policies to gradually relax
-- latency requirements a step at a time. Multiple policies are applied
-- based on their maximum allowed latency, starting with the lowest value.
-- When updating policies, provide a complete collection of policies.
updateGameSessionQueue_playerLatencyPolicies :: Lens.Lens' UpdateGameSessionQueue (Prelude.Maybe [PlayerLatencyPolicy])
updateGameSessionQueue_playerLatencyPolicies :: Lens' UpdateGameSessionQueue (Maybe [PlayerLatencyPolicy])
updateGameSessionQueue_playerLatencyPolicies = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGameSessionQueue' {Maybe [PlayerLatencyPolicy]
playerLatencyPolicies :: Maybe [PlayerLatencyPolicy]
$sel:playerLatencyPolicies:UpdateGameSessionQueue' :: UpdateGameSessionQueue -> Maybe [PlayerLatencyPolicy]
playerLatencyPolicies} -> Maybe [PlayerLatencyPolicy]
playerLatencyPolicies) (\s :: UpdateGameSessionQueue
s@UpdateGameSessionQueue' {} Maybe [PlayerLatencyPolicy]
a -> UpdateGameSessionQueue
s {$sel:playerLatencyPolicies:UpdateGameSessionQueue' :: Maybe [PlayerLatencyPolicy]
playerLatencyPolicies = Maybe [PlayerLatencyPolicy]
a} :: UpdateGameSessionQueue) 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

-- | Custom settings to use when prioritizing destinations and locations for
-- game session placements. This configuration replaces the FleetIQ default
-- prioritization process. Priority types that are not explicitly named
-- will be automatically applied at the end of the prioritization process.
-- To remove an existing priority configuration, pass in an empty set.
updateGameSessionQueue_priorityConfiguration :: Lens.Lens' UpdateGameSessionQueue (Prelude.Maybe PriorityConfiguration)
updateGameSessionQueue_priorityConfiguration :: Lens' UpdateGameSessionQueue (Maybe PriorityConfiguration)
updateGameSessionQueue_priorityConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGameSessionQueue' {Maybe PriorityConfiguration
priorityConfiguration :: Maybe PriorityConfiguration
$sel:priorityConfiguration:UpdateGameSessionQueue' :: UpdateGameSessionQueue -> Maybe PriorityConfiguration
priorityConfiguration} -> Maybe PriorityConfiguration
priorityConfiguration) (\s :: UpdateGameSessionQueue
s@UpdateGameSessionQueue' {} Maybe PriorityConfiguration
a -> UpdateGameSessionQueue
s {$sel:priorityConfiguration:UpdateGameSessionQueue' :: Maybe PriorityConfiguration
priorityConfiguration = Maybe PriorityConfiguration
a} :: UpdateGameSessionQueue)

-- | The maximum time, in seconds, that a new game session placement request
-- remains in the queue. When a request exceeds this time, the game session
-- placement changes to a @TIMED_OUT@ status.
updateGameSessionQueue_timeoutInSeconds :: Lens.Lens' UpdateGameSessionQueue (Prelude.Maybe Prelude.Natural)
updateGameSessionQueue_timeoutInSeconds :: Lens' UpdateGameSessionQueue (Maybe Natural)
updateGameSessionQueue_timeoutInSeconds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGameSessionQueue' {Maybe Natural
timeoutInSeconds :: Maybe Natural
$sel:timeoutInSeconds:UpdateGameSessionQueue' :: UpdateGameSessionQueue -> Maybe Natural
timeoutInSeconds} -> Maybe Natural
timeoutInSeconds) (\s :: UpdateGameSessionQueue
s@UpdateGameSessionQueue' {} Maybe Natural
a -> UpdateGameSessionQueue
s {$sel:timeoutInSeconds:UpdateGameSessionQueue' :: Maybe Natural
timeoutInSeconds = Maybe Natural
a} :: UpdateGameSessionQueue)

-- | A descriptive label that is associated with game session queue. Queue
-- names must be unique within each Region. You can use either the queue ID
-- or ARN value.
updateGameSessionQueue_name :: Lens.Lens' UpdateGameSessionQueue Prelude.Text
updateGameSessionQueue_name :: Lens' UpdateGameSessionQueue Text
updateGameSessionQueue_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGameSessionQueue' {Text
name :: Text
$sel:name:UpdateGameSessionQueue' :: UpdateGameSessionQueue -> Text
name} -> Text
name) (\s :: UpdateGameSessionQueue
s@UpdateGameSessionQueue' {} Text
a -> UpdateGameSessionQueue
s {$sel:name:UpdateGameSessionQueue' :: Text
name = Text
a} :: UpdateGameSessionQueue)

instance Core.AWSRequest UpdateGameSessionQueue where
  type
    AWSResponse UpdateGameSessionQueue =
      UpdateGameSessionQueueResponse
  request :: (Service -> Service)
-> UpdateGameSessionQueue -> Request UpdateGameSessionQueue
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateGameSessionQueue
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateGameSessionQueue)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe GameSessionQueue -> Int -> UpdateGameSessionQueueResponse
UpdateGameSessionQueueResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"GameSessionQueue")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable UpdateGameSessionQueue where
  hashWithSalt :: Int -> UpdateGameSessionQueue -> Int
hashWithSalt Int
_salt UpdateGameSessionQueue' {Maybe Natural
Maybe [GameSessionQueueDestination]
Maybe [PlayerLatencyPolicy]
Maybe Text
Maybe FilterConfiguration
Maybe PriorityConfiguration
Text
name :: Text
timeoutInSeconds :: Maybe Natural
priorityConfiguration :: Maybe PriorityConfiguration
playerLatencyPolicies :: Maybe [PlayerLatencyPolicy]
notificationTarget :: Maybe Text
filterConfiguration :: Maybe FilterConfiguration
destinations :: Maybe [GameSessionQueueDestination]
customEventData :: Maybe Text
$sel:name:UpdateGameSessionQueue' :: UpdateGameSessionQueue -> Text
$sel:timeoutInSeconds:UpdateGameSessionQueue' :: UpdateGameSessionQueue -> Maybe Natural
$sel:priorityConfiguration:UpdateGameSessionQueue' :: UpdateGameSessionQueue -> Maybe PriorityConfiguration
$sel:playerLatencyPolicies:UpdateGameSessionQueue' :: UpdateGameSessionQueue -> Maybe [PlayerLatencyPolicy]
$sel:notificationTarget:UpdateGameSessionQueue' :: UpdateGameSessionQueue -> Maybe Text
$sel:filterConfiguration:UpdateGameSessionQueue' :: UpdateGameSessionQueue -> Maybe FilterConfiguration
$sel:destinations:UpdateGameSessionQueue' :: UpdateGameSessionQueue -> Maybe [GameSessionQueueDestination]
$sel:customEventData:UpdateGameSessionQueue' :: UpdateGameSessionQueue -> 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
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
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name

instance Prelude.NFData UpdateGameSessionQueue where
  rnf :: UpdateGameSessionQueue -> ()
rnf UpdateGameSessionQueue' {Maybe Natural
Maybe [GameSessionQueueDestination]
Maybe [PlayerLatencyPolicy]
Maybe Text
Maybe FilterConfiguration
Maybe PriorityConfiguration
Text
name :: Text
timeoutInSeconds :: Maybe Natural
priorityConfiguration :: Maybe PriorityConfiguration
playerLatencyPolicies :: Maybe [PlayerLatencyPolicy]
notificationTarget :: Maybe Text
filterConfiguration :: Maybe FilterConfiguration
destinations :: Maybe [GameSessionQueueDestination]
customEventData :: Maybe Text
$sel:name:UpdateGameSessionQueue' :: UpdateGameSessionQueue -> Text
$sel:timeoutInSeconds:UpdateGameSessionQueue' :: UpdateGameSessionQueue -> Maybe Natural
$sel:priorityConfiguration:UpdateGameSessionQueue' :: UpdateGameSessionQueue -> Maybe PriorityConfiguration
$sel:playerLatencyPolicies:UpdateGameSessionQueue' :: UpdateGameSessionQueue -> Maybe [PlayerLatencyPolicy]
$sel:notificationTarget:UpdateGameSessionQueue' :: UpdateGameSessionQueue -> Maybe Text
$sel:filterConfiguration:UpdateGameSessionQueue' :: UpdateGameSessionQueue -> Maybe FilterConfiguration
$sel:destinations:UpdateGameSessionQueue' :: UpdateGameSessionQueue -> Maybe [GameSessionQueueDestination]
$sel:customEventData:UpdateGameSessionQueue' :: UpdateGameSessionQueue -> 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
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
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name

instance Data.ToHeaders UpdateGameSessionQueue where
  toHeaders :: UpdateGameSessionQueue -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"GameLift.UpdateGameSessionQueue" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON UpdateGameSessionQueue where
  toJSON :: UpdateGameSessionQueue -> Value
toJSON UpdateGameSessionQueue' {Maybe Natural
Maybe [GameSessionQueueDestination]
Maybe [PlayerLatencyPolicy]
Maybe Text
Maybe FilterConfiguration
Maybe PriorityConfiguration
Text
name :: Text
timeoutInSeconds :: Maybe Natural
priorityConfiguration :: Maybe PriorityConfiguration
playerLatencyPolicies :: Maybe [PlayerLatencyPolicy]
notificationTarget :: Maybe Text
filterConfiguration :: Maybe FilterConfiguration
destinations :: Maybe [GameSessionQueueDestination]
customEventData :: Maybe Text
$sel:name:UpdateGameSessionQueue' :: UpdateGameSessionQueue -> Text
$sel:timeoutInSeconds:UpdateGameSessionQueue' :: UpdateGameSessionQueue -> Maybe Natural
$sel:priorityConfiguration:UpdateGameSessionQueue' :: UpdateGameSessionQueue -> Maybe PriorityConfiguration
$sel:playerLatencyPolicies:UpdateGameSessionQueue' :: UpdateGameSessionQueue -> Maybe [PlayerLatencyPolicy]
$sel:notificationTarget:UpdateGameSessionQueue' :: UpdateGameSessionQueue -> Maybe Text
$sel:filterConfiguration:UpdateGameSessionQueue' :: UpdateGameSessionQueue -> Maybe FilterConfiguration
$sel:destinations:UpdateGameSessionQueue' :: UpdateGameSessionQueue -> Maybe [GameSessionQueueDestination]
$sel:customEventData:UpdateGameSessionQueue' :: UpdateGameSessionQueue -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"CustomEventData" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
customEventData,
            (Key
"Destinations" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [GameSessionQueueDestination]
destinations,
            (Key
"FilterConfiguration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FilterConfiguration
filterConfiguration,
            (Key
"NotificationTarget" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
notificationTarget,
            (Key
"PlayerLatencyPolicies" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PlayerLatencyPolicy]
playerLatencyPolicies,
            (Key
"PriorityConfiguration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PriorityConfiguration
priorityConfiguration,
            (Key
"TimeoutInSeconds" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
timeoutInSeconds,
            forall a. a -> Maybe a
Prelude.Just (Key
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name)
          ]
      )

instance Data.ToPath UpdateGameSessionQueue where
  toPath :: UpdateGameSessionQueue -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Data.ToQuery UpdateGameSessionQueue where
  toQuery :: UpdateGameSessionQueue -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newUpdateGameSessionQueueResponse' smart constructor.
data UpdateGameSessionQueueResponse = UpdateGameSessionQueueResponse'
  { -- | An object that describes the newly updated game session queue.
    UpdateGameSessionQueueResponse -> Maybe GameSessionQueue
gameSessionQueue :: Prelude.Maybe GameSessionQueue,
    -- | The response's http status code.
    UpdateGameSessionQueueResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateGameSessionQueueResponse
-> UpdateGameSessionQueueResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateGameSessionQueueResponse
-> UpdateGameSessionQueueResponse -> Bool
$c/= :: UpdateGameSessionQueueResponse
-> UpdateGameSessionQueueResponse -> Bool
== :: UpdateGameSessionQueueResponse
-> UpdateGameSessionQueueResponse -> Bool
$c== :: UpdateGameSessionQueueResponse
-> UpdateGameSessionQueueResponse -> Bool
Prelude.Eq, ReadPrec [UpdateGameSessionQueueResponse]
ReadPrec UpdateGameSessionQueueResponse
Int -> ReadS UpdateGameSessionQueueResponse
ReadS [UpdateGameSessionQueueResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateGameSessionQueueResponse]
$creadListPrec :: ReadPrec [UpdateGameSessionQueueResponse]
readPrec :: ReadPrec UpdateGameSessionQueueResponse
$creadPrec :: ReadPrec UpdateGameSessionQueueResponse
readList :: ReadS [UpdateGameSessionQueueResponse]
$creadList :: ReadS [UpdateGameSessionQueueResponse]
readsPrec :: Int -> ReadS UpdateGameSessionQueueResponse
$creadsPrec :: Int -> ReadS UpdateGameSessionQueueResponse
Prelude.Read, Int -> UpdateGameSessionQueueResponse -> ShowS
[UpdateGameSessionQueueResponse] -> ShowS
UpdateGameSessionQueueResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateGameSessionQueueResponse] -> ShowS
$cshowList :: [UpdateGameSessionQueueResponse] -> ShowS
show :: UpdateGameSessionQueueResponse -> String
$cshow :: UpdateGameSessionQueueResponse -> String
showsPrec :: Int -> UpdateGameSessionQueueResponse -> ShowS
$cshowsPrec :: Int -> UpdateGameSessionQueueResponse -> ShowS
Prelude.Show, forall x.
Rep UpdateGameSessionQueueResponse x
-> UpdateGameSessionQueueResponse
forall x.
UpdateGameSessionQueueResponse
-> Rep UpdateGameSessionQueueResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateGameSessionQueueResponse x
-> UpdateGameSessionQueueResponse
$cfrom :: forall x.
UpdateGameSessionQueueResponse
-> Rep UpdateGameSessionQueueResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateGameSessionQueueResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'gameSessionQueue', 'updateGameSessionQueueResponse_gameSessionQueue' - An object that describes the newly updated game session queue.
--
-- 'httpStatus', 'updateGameSessionQueueResponse_httpStatus' - The response's http status code.
newUpdateGameSessionQueueResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateGameSessionQueueResponse
newUpdateGameSessionQueueResponse :: Int -> UpdateGameSessionQueueResponse
newUpdateGameSessionQueueResponse Int
pHttpStatus_ =
  UpdateGameSessionQueueResponse'
    { $sel:gameSessionQueue:UpdateGameSessionQueueResponse' :: Maybe GameSessionQueue
gameSessionQueue =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateGameSessionQueueResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An object that describes the newly updated game session queue.
updateGameSessionQueueResponse_gameSessionQueue :: Lens.Lens' UpdateGameSessionQueueResponse (Prelude.Maybe GameSessionQueue)
updateGameSessionQueueResponse_gameSessionQueue :: Lens' UpdateGameSessionQueueResponse (Maybe GameSessionQueue)
updateGameSessionQueueResponse_gameSessionQueue = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGameSessionQueueResponse' {Maybe GameSessionQueue
gameSessionQueue :: Maybe GameSessionQueue
$sel:gameSessionQueue:UpdateGameSessionQueueResponse' :: UpdateGameSessionQueueResponse -> Maybe GameSessionQueue
gameSessionQueue} -> Maybe GameSessionQueue
gameSessionQueue) (\s :: UpdateGameSessionQueueResponse
s@UpdateGameSessionQueueResponse' {} Maybe GameSessionQueue
a -> UpdateGameSessionQueueResponse
s {$sel:gameSessionQueue:UpdateGameSessionQueueResponse' :: Maybe GameSessionQueue
gameSessionQueue = Maybe GameSessionQueue
a} :: UpdateGameSessionQueueResponse)

-- | The response's http status code.
updateGameSessionQueueResponse_httpStatus :: Lens.Lens' UpdateGameSessionQueueResponse Prelude.Int
updateGameSessionQueueResponse_httpStatus :: Lens' UpdateGameSessionQueueResponse Int
updateGameSessionQueueResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGameSessionQueueResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateGameSessionQueueResponse' :: UpdateGameSessionQueueResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateGameSessionQueueResponse
s@UpdateGameSessionQueueResponse' {} Int
a -> UpdateGameSessionQueueResponse
s {$sel:httpStatus:UpdateGameSessionQueueResponse' :: Int
httpStatus = Int
a} :: UpdateGameSessionQueueResponse)

instance
  Prelude.NFData
    UpdateGameSessionQueueResponse
  where
  rnf :: UpdateGameSessionQueueResponse -> ()
rnf UpdateGameSessionQueueResponse' {Int
Maybe GameSessionQueue
httpStatus :: Int
gameSessionQueue :: Maybe GameSessionQueue
$sel:httpStatus:UpdateGameSessionQueueResponse' :: UpdateGameSessionQueueResponse -> Int
$sel:gameSessionQueue:UpdateGameSessionQueueResponse' :: UpdateGameSessionQueueResponse -> Maybe GameSessionQueue
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe GameSessionQueue
gameSessionQueue
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus