{-# 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.UpdateMatchmakingConfiguration
-- 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 settings for a FlexMatch matchmaking configuration. These
-- changes affect all matches and game sessions that are created after the
-- update. To update settings, specify the configuration name to be updated
-- and provide the new settings.
--
-- __Learn more__
--
-- <https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-configuration.html Design a FlexMatch matchmaker>
module Amazonka.GameLift.UpdateMatchmakingConfiguration
  ( -- * Creating a Request
    UpdateMatchmakingConfiguration (..),
    newUpdateMatchmakingConfiguration,

    -- * Request Lenses
    updateMatchmakingConfiguration_acceptanceRequired,
    updateMatchmakingConfiguration_acceptanceTimeoutSeconds,
    updateMatchmakingConfiguration_additionalPlayerCount,
    updateMatchmakingConfiguration_backfillMode,
    updateMatchmakingConfiguration_customEventData,
    updateMatchmakingConfiguration_description,
    updateMatchmakingConfiguration_flexMatchMode,
    updateMatchmakingConfiguration_gameProperties,
    updateMatchmakingConfiguration_gameSessionData,
    updateMatchmakingConfiguration_gameSessionQueueArns,
    updateMatchmakingConfiguration_notificationTarget,
    updateMatchmakingConfiguration_requestTimeoutSeconds,
    updateMatchmakingConfiguration_ruleSetName,
    updateMatchmakingConfiguration_name,

    -- * Destructuring the Response
    UpdateMatchmakingConfigurationResponse (..),
    newUpdateMatchmakingConfigurationResponse,

    -- * Response Lenses
    updateMatchmakingConfigurationResponse_configuration,
    updateMatchmakingConfigurationResponse_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:/ 'newUpdateMatchmakingConfiguration' smart constructor.
data UpdateMatchmakingConfiguration = UpdateMatchmakingConfiguration'
  { -- | A flag that indicates whether a match that was created with this
    -- configuration must be accepted by the matched players. To require
    -- acceptance, set to TRUE. With this option enabled, matchmaking tickets
    -- use the status @REQUIRES_ACCEPTANCE@ to indicate when a completed
    -- potential match is waiting for player acceptance.
    UpdateMatchmakingConfiguration -> Maybe Bool
acceptanceRequired :: Prelude.Maybe Prelude.Bool,
    -- | The length of time (in seconds) to wait for players to accept a proposed
    -- match, if acceptance is required.
    UpdateMatchmakingConfiguration -> Maybe Natural
acceptanceTimeoutSeconds :: Prelude.Maybe Prelude.Natural,
    -- | The number of player slots in a match to keep open for future players.
    -- For example, if the configuration\'s rule set specifies a match for a
    -- single 12-person team, and the additional player count is set to 2, only
    -- 10 players are selected for the match. This parameter is not used if
    -- @FlexMatchMode@ is set to @STANDALONE@.
    UpdateMatchmakingConfiguration -> Maybe Natural
additionalPlayerCount :: Prelude.Maybe Prelude.Natural,
    -- | The method that is used to backfill game sessions created with this
    -- matchmaking configuration. Specify MANUAL when your game manages
    -- backfill requests manually or does not use the match backfill feature.
    -- Specify AUTOMATIC to have GameLift create a match backfill request
    -- whenever a game session has one or more open slots. Learn more about
    -- manual and automatic backfill in
    -- <https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-backfill.html Backfill Existing Games with FlexMatch>.
    -- Automatic backfill is not available when @FlexMatchMode@ is set to
    -- @STANDALONE@.
    UpdateMatchmakingConfiguration -> Maybe BackfillMode
backfillMode :: Prelude.Maybe BackfillMode,
    -- | Information to add to all events related to the matchmaking
    -- configuration.
    UpdateMatchmakingConfiguration -> Maybe Text
customEventData :: Prelude.Maybe Prelude.Text,
    -- | A description for the matchmaking configuration.
    UpdateMatchmakingConfiguration -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | Indicates whether this matchmaking configuration is being used with
    -- GameLift hosting or as a standalone matchmaking solution.
    --
    -- -   __STANDALONE__ - FlexMatch forms matches and returns match
    --     information, including players and team assignments, in a
    --     <https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-events.html#match-events-matchmakingsucceeded MatchmakingSucceeded>
    --     event.
    --
    -- -   __WITH_QUEUE__ - FlexMatch forms matches and uses the specified
    --     GameLift queue to start a game session for the match.
    UpdateMatchmakingConfiguration -> Maybe FlexMatchMode
flexMatchMode :: Prelude.Maybe FlexMatchMode,
    -- | A set of custom properties for a game session, formatted as key:value
    -- pairs. These properties are passed to a game server process with a
    -- request to start a new game session (see
    -- <https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession Start a Game Session>).
    -- This information is added to the new @GameSession@ object that is
    -- created for a successful match. This parameter is not used if
    -- @FlexMatchMode@ is set to @STANDALONE@.
    UpdateMatchmakingConfiguration -> Maybe [GameProperty]
gameProperties :: Prelude.Maybe [GameProperty],
    -- | A set of custom game session properties, formatted as a single string
    -- value. This data is passed to a game server process with a request to
    -- start a new game session (see
    -- <https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession Start a Game Session>).
    -- This information is added to the game session that is created for a
    -- successful match. This parameter is not used if @FlexMatchMode@ is set
    -- to @STANDALONE@.
    UpdateMatchmakingConfiguration -> Maybe Text
gameSessionData :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name
    -- (<https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html ARN>)
    -- that is assigned to a GameLift game session queue resource and uniquely
    -- identifies it. ARNs are unique across all Regions. Format is
    -- @arn:aws:gamelift:\<region>::gamesessionqueue\/\<queue name>@. Queues
    -- can be located in any Region. Queues are used to start new
    -- GameLift-hosted game sessions for matches that are created with this
    -- matchmaking configuration. If @FlexMatchMode@ is set to @STANDALONE@, do
    -- not set this parameter.
    UpdateMatchmakingConfiguration -> Maybe [Text]
gameSessionQueueArns :: Prelude.Maybe [Prelude.Text],
    -- | An SNS topic ARN that is set up to receive matchmaking notifications.
    -- See
    -- <https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-notification.html Setting up notifications for matchmaking>
    -- for more information.
    UpdateMatchmakingConfiguration -> Maybe Text
notificationTarget :: Prelude.Maybe Prelude.Text,
    -- | The maximum duration, in seconds, that a matchmaking ticket can remain
    -- in process before timing out. Requests that fail due to timing out can
    -- be resubmitted as needed.
    UpdateMatchmakingConfiguration -> Maybe Natural
requestTimeoutSeconds :: Prelude.Maybe Prelude.Natural,
    -- | A unique identifier for the matchmaking rule set to use with this
    -- configuration. You can use either the rule set name or ARN value. A
    -- matchmaking configuration can only use rule sets that are defined in the
    -- same Region.
    UpdateMatchmakingConfiguration -> Maybe Text
ruleSetName :: Prelude.Maybe Prelude.Text,
    -- | A unique identifier for the matchmaking configuration to update. You can
    -- use either the configuration name or ARN value.
    UpdateMatchmakingConfiguration -> Text
name :: Prelude.Text
  }
  deriving (UpdateMatchmakingConfiguration
-> UpdateMatchmakingConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateMatchmakingConfiguration
-> UpdateMatchmakingConfiguration -> Bool
$c/= :: UpdateMatchmakingConfiguration
-> UpdateMatchmakingConfiguration -> Bool
== :: UpdateMatchmakingConfiguration
-> UpdateMatchmakingConfiguration -> Bool
$c== :: UpdateMatchmakingConfiguration
-> UpdateMatchmakingConfiguration -> Bool
Prelude.Eq, ReadPrec [UpdateMatchmakingConfiguration]
ReadPrec UpdateMatchmakingConfiguration
Int -> ReadS UpdateMatchmakingConfiguration
ReadS [UpdateMatchmakingConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateMatchmakingConfiguration]
$creadListPrec :: ReadPrec [UpdateMatchmakingConfiguration]
readPrec :: ReadPrec UpdateMatchmakingConfiguration
$creadPrec :: ReadPrec UpdateMatchmakingConfiguration
readList :: ReadS [UpdateMatchmakingConfiguration]
$creadList :: ReadS [UpdateMatchmakingConfiguration]
readsPrec :: Int -> ReadS UpdateMatchmakingConfiguration
$creadsPrec :: Int -> ReadS UpdateMatchmakingConfiguration
Prelude.Read, Int -> UpdateMatchmakingConfiguration -> ShowS
[UpdateMatchmakingConfiguration] -> ShowS
UpdateMatchmakingConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateMatchmakingConfiguration] -> ShowS
$cshowList :: [UpdateMatchmakingConfiguration] -> ShowS
show :: UpdateMatchmakingConfiguration -> String
$cshow :: UpdateMatchmakingConfiguration -> String
showsPrec :: Int -> UpdateMatchmakingConfiguration -> ShowS
$cshowsPrec :: Int -> UpdateMatchmakingConfiguration -> ShowS
Prelude.Show, forall x.
Rep UpdateMatchmakingConfiguration x
-> UpdateMatchmakingConfiguration
forall x.
UpdateMatchmakingConfiguration
-> Rep UpdateMatchmakingConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateMatchmakingConfiguration x
-> UpdateMatchmakingConfiguration
$cfrom :: forall x.
UpdateMatchmakingConfiguration
-> Rep UpdateMatchmakingConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'UpdateMatchmakingConfiguration' 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:
--
-- 'acceptanceRequired', 'updateMatchmakingConfiguration_acceptanceRequired' - A flag that indicates whether a match that was created with this
-- configuration must be accepted by the matched players. To require
-- acceptance, set to TRUE. With this option enabled, matchmaking tickets
-- use the status @REQUIRES_ACCEPTANCE@ to indicate when a completed
-- potential match is waiting for player acceptance.
--
-- 'acceptanceTimeoutSeconds', 'updateMatchmakingConfiguration_acceptanceTimeoutSeconds' - The length of time (in seconds) to wait for players to accept a proposed
-- match, if acceptance is required.
--
-- 'additionalPlayerCount', 'updateMatchmakingConfiguration_additionalPlayerCount' - The number of player slots in a match to keep open for future players.
-- For example, if the configuration\'s rule set specifies a match for a
-- single 12-person team, and the additional player count is set to 2, only
-- 10 players are selected for the match. This parameter is not used if
-- @FlexMatchMode@ is set to @STANDALONE@.
--
-- 'backfillMode', 'updateMatchmakingConfiguration_backfillMode' - The method that is used to backfill game sessions created with this
-- matchmaking configuration. Specify MANUAL when your game manages
-- backfill requests manually or does not use the match backfill feature.
-- Specify AUTOMATIC to have GameLift create a match backfill request
-- whenever a game session has one or more open slots. Learn more about
-- manual and automatic backfill in
-- <https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-backfill.html Backfill Existing Games with FlexMatch>.
-- Automatic backfill is not available when @FlexMatchMode@ is set to
-- @STANDALONE@.
--
-- 'customEventData', 'updateMatchmakingConfiguration_customEventData' - Information to add to all events related to the matchmaking
-- configuration.
--
-- 'description', 'updateMatchmakingConfiguration_description' - A description for the matchmaking configuration.
--
-- 'flexMatchMode', 'updateMatchmakingConfiguration_flexMatchMode' - Indicates whether this matchmaking configuration is being used with
-- GameLift hosting or as a standalone matchmaking solution.
--
-- -   __STANDALONE__ - FlexMatch forms matches and returns match
--     information, including players and team assignments, in a
--     <https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-events.html#match-events-matchmakingsucceeded MatchmakingSucceeded>
--     event.
--
-- -   __WITH_QUEUE__ - FlexMatch forms matches and uses the specified
--     GameLift queue to start a game session for the match.
--
-- 'gameProperties', 'updateMatchmakingConfiguration_gameProperties' - A set of custom properties for a game session, formatted as key:value
-- pairs. These properties are passed to a game server process with a
-- request to start a new game session (see
-- <https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession Start a Game Session>).
-- This information is added to the new @GameSession@ object that is
-- created for a successful match. This parameter is not used if
-- @FlexMatchMode@ is set to @STANDALONE@.
--
-- 'gameSessionData', 'updateMatchmakingConfiguration_gameSessionData' - A set of custom game session properties, formatted as a single string
-- value. This data is passed to a game server process with a request to
-- start a new game session (see
-- <https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession Start a Game Session>).
-- This information is added to the game session that is created for a
-- successful match. This parameter is not used if @FlexMatchMode@ is set
-- to @STANDALONE@.
--
-- 'gameSessionQueueArns', 'updateMatchmakingConfiguration_gameSessionQueueArns' - The Amazon Resource Name
-- (<https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html ARN>)
-- that is assigned to a GameLift game session queue resource and uniquely
-- identifies it. ARNs are unique across all Regions. Format is
-- @arn:aws:gamelift:\<region>::gamesessionqueue\/\<queue name>@. Queues
-- can be located in any Region. Queues are used to start new
-- GameLift-hosted game sessions for matches that are created with this
-- matchmaking configuration. If @FlexMatchMode@ is set to @STANDALONE@, do
-- not set this parameter.
--
-- 'notificationTarget', 'updateMatchmakingConfiguration_notificationTarget' - An SNS topic ARN that is set up to receive matchmaking notifications.
-- See
-- <https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-notification.html Setting up notifications for matchmaking>
-- for more information.
--
-- 'requestTimeoutSeconds', 'updateMatchmakingConfiguration_requestTimeoutSeconds' - The maximum duration, in seconds, that a matchmaking ticket can remain
-- in process before timing out. Requests that fail due to timing out can
-- be resubmitted as needed.
--
-- 'ruleSetName', 'updateMatchmakingConfiguration_ruleSetName' - A unique identifier for the matchmaking rule set to use with this
-- configuration. You can use either the rule set name or ARN value. A
-- matchmaking configuration can only use rule sets that are defined in the
-- same Region.
--
-- 'name', 'updateMatchmakingConfiguration_name' - A unique identifier for the matchmaking configuration to update. You can
-- use either the configuration name or ARN value.
newUpdateMatchmakingConfiguration ::
  -- | 'name'
  Prelude.Text ->
  UpdateMatchmakingConfiguration
newUpdateMatchmakingConfiguration :: Text -> UpdateMatchmakingConfiguration
newUpdateMatchmakingConfiguration Text
pName_ =
  UpdateMatchmakingConfiguration'
    { $sel:acceptanceRequired:UpdateMatchmakingConfiguration' :: Maybe Bool
acceptanceRequired =
        forall a. Maybe a
Prelude.Nothing,
      $sel:acceptanceTimeoutSeconds:UpdateMatchmakingConfiguration' :: Maybe Natural
acceptanceTimeoutSeconds = forall a. Maybe a
Prelude.Nothing,
      $sel:additionalPlayerCount:UpdateMatchmakingConfiguration' :: Maybe Natural
additionalPlayerCount = forall a. Maybe a
Prelude.Nothing,
      $sel:backfillMode:UpdateMatchmakingConfiguration' :: Maybe BackfillMode
backfillMode = forall a. Maybe a
Prelude.Nothing,
      $sel:customEventData:UpdateMatchmakingConfiguration' :: Maybe Text
customEventData = forall a. Maybe a
Prelude.Nothing,
      $sel:description:UpdateMatchmakingConfiguration' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:flexMatchMode:UpdateMatchmakingConfiguration' :: Maybe FlexMatchMode
flexMatchMode = forall a. Maybe a
Prelude.Nothing,
      $sel:gameProperties:UpdateMatchmakingConfiguration' :: Maybe [GameProperty]
gameProperties = forall a. Maybe a
Prelude.Nothing,
      $sel:gameSessionData:UpdateMatchmakingConfiguration' :: Maybe Text
gameSessionData = forall a. Maybe a
Prelude.Nothing,
      $sel:gameSessionQueueArns:UpdateMatchmakingConfiguration' :: Maybe [Text]
gameSessionQueueArns = forall a. Maybe a
Prelude.Nothing,
      $sel:notificationTarget:UpdateMatchmakingConfiguration' :: Maybe Text
notificationTarget = forall a. Maybe a
Prelude.Nothing,
      $sel:requestTimeoutSeconds:UpdateMatchmakingConfiguration' :: Maybe Natural
requestTimeoutSeconds = forall a. Maybe a
Prelude.Nothing,
      $sel:ruleSetName:UpdateMatchmakingConfiguration' :: Maybe Text
ruleSetName = forall a. Maybe a
Prelude.Nothing,
      $sel:name:UpdateMatchmakingConfiguration' :: Text
name = Text
pName_
    }

-- | A flag that indicates whether a match that was created with this
-- configuration must be accepted by the matched players. To require
-- acceptance, set to TRUE. With this option enabled, matchmaking tickets
-- use the status @REQUIRES_ACCEPTANCE@ to indicate when a completed
-- potential match is waiting for player acceptance.
updateMatchmakingConfiguration_acceptanceRequired :: Lens.Lens' UpdateMatchmakingConfiguration (Prelude.Maybe Prelude.Bool)
updateMatchmakingConfiguration_acceptanceRequired :: Lens' UpdateMatchmakingConfiguration (Maybe Bool)
updateMatchmakingConfiguration_acceptanceRequired = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMatchmakingConfiguration' {Maybe Bool
acceptanceRequired :: Maybe Bool
$sel:acceptanceRequired:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Bool
acceptanceRequired} -> Maybe Bool
acceptanceRequired) (\s :: UpdateMatchmakingConfiguration
s@UpdateMatchmakingConfiguration' {} Maybe Bool
a -> UpdateMatchmakingConfiguration
s {$sel:acceptanceRequired:UpdateMatchmakingConfiguration' :: Maybe Bool
acceptanceRequired = Maybe Bool
a} :: UpdateMatchmakingConfiguration)

-- | The length of time (in seconds) to wait for players to accept a proposed
-- match, if acceptance is required.
updateMatchmakingConfiguration_acceptanceTimeoutSeconds :: Lens.Lens' UpdateMatchmakingConfiguration (Prelude.Maybe Prelude.Natural)
updateMatchmakingConfiguration_acceptanceTimeoutSeconds :: Lens' UpdateMatchmakingConfiguration (Maybe Natural)
updateMatchmakingConfiguration_acceptanceTimeoutSeconds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMatchmakingConfiguration' {Maybe Natural
acceptanceTimeoutSeconds :: Maybe Natural
$sel:acceptanceTimeoutSeconds:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Natural
acceptanceTimeoutSeconds} -> Maybe Natural
acceptanceTimeoutSeconds) (\s :: UpdateMatchmakingConfiguration
s@UpdateMatchmakingConfiguration' {} Maybe Natural
a -> UpdateMatchmakingConfiguration
s {$sel:acceptanceTimeoutSeconds:UpdateMatchmakingConfiguration' :: Maybe Natural
acceptanceTimeoutSeconds = Maybe Natural
a} :: UpdateMatchmakingConfiguration)

-- | The number of player slots in a match to keep open for future players.
-- For example, if the configuration\'s rule set specifies a match for a
-- single 12-person team, and the additional player count is set to 2, only
-- 10 players are selected for the match. This parameter is not used if
-- @FlexMatchMode@ is set to @STANDALONE@.
updateMatchmakingConfiguration_additionalPlayerCount :: Lens.Lens' UpdateMatchmakingConfiguration (Prelude.Maybe Prelude.Natural)
updateMatchmakingConfiguration_additionalPlayerCount :: Lens' UpdateMatchmakingConfiguration (Maybe Natural)
updateMatchmakingConfiguration_additionalPlayerCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMatchmakingConfiguration' {Maybe Natural
additionalPlayerCount :: Maybe Natural
$sel:additionalPlayerCount:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Natural
additionalPlayerCount} -> Maybe Natural
additionalPlayerCount) (\s :: UpdateMatchmakingConfiguration
s@UpdateMatchmakingConfiguration' {} Maybe Natural
a -> UpdateMatchmakingConfiguration
s {$sel:additionalPlayerCount:UpdateMatchmakingConfiguration' :: Maybe Natural
additionalPlayerCount = Maybe Natural
a} :: UpdateMatchmakingConfiguration)

-- | The method that is used to backfill game sessions created with this
-- matchmaking configuration. Specify MANUAL when your game manages
-- backfill requests manually or does not use the match backfill feature.
-- Specify AUTOMATIC to have GameLift create a match backfill request
-- whenever a game session has one or more open slots. Learn more about
-- manual and automatic backfill in
-- <https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-backfill.html Backfill Existing Games with FlexMatch>.
-- Automatic backfill is not available when @FlexMatchMode@ is set to
-- @STANDALONE@.
updateMatchmakingConfiguration_backfillMode :: Lens.Lens' UpdateMatchmakingConfiguration (Prelude.Maybe BackfillMode)
updateMatchmakingConfiguration_backfillMode :: Lens' UpdateMatchmakingConfiguration (Maybe BackfillMode)
updateMatchmakingConfiguration_backfillMode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMatchmakingConfiguration' {Maybe BackfillMode
backfillMode :: Maybe BackfillMode
$sel:backfillMode:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe BackfillMode
backfillMode} -> Maybe BackfillMode
backfillMode) (\s :: UpdateMatchmakingConfiguration
s@UpdateMatchmakingConfiguration' {} Maybe BackfillMode
a -> UpdateMatchmakingConfiguration
s {$sel:backfillMode:UpdateMatchmakingConfiguration' :: Maybe BackfillMode
backfillMode = Maybe BackfillMode
a} :: UpdateMatchmakingConfiguration)

-- | Information to add to all events related to the matchmaking
-- configuration.
updateMatchmakingConfiguration_customEventData :: Lens.Lens' UpdateMatchmakingConfiguration (Prelude.Maybe Prelude.Text)
updateMatchmakingConfiguration_customEventData :: Lens' UpdateMatchmakingConfiguration (Maybe Text)
updateMatchmakingConfiguration_customEventData = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMatchmakingConfiguration' {Maybe Text
customEventData :: Maybe Text
$sel:customEventData:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Text
customEventData} -> Maybe Text
customEventData) (\s :: UpdateMatchmakingConfiguration
s@UpdateMatchmakingConfiguration' {} Maybe Text
a -> UpdateMatchmakingConfiguration
s {$sel:customEventData:UpdateMatchmakingConfiguration' :: Maybe Text
customEventData = Maybe Text
a} :: UpdateMatchmakingConfiguration)

-- | A description for the matchmaking configuration.
updateMatchmakingConfiguration_description :: Lens.Lens' UpdateMatchmakingConfiguration (Prelude.Maybe Prelude.Text)
updateMatchmakingConfiguration_description :: Lens' UpdateMatchmakingConfiguration (Maybe Text)
updateMatchmakingConfiguration_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMatchmakingConfiguration' {Maybe Text
description :: Maybe Text
$sel:description:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateMatchmakingConfiguration
s@UpdateMatchmakingConfiguration' {} Maybe Text
a -> UpdateMatchmakingConfiguration
s {$sel:description:UpdateMatchmakingConfiguration' :: Maybe Text
description = Maybe Text
a} :: UpdateMatchmakingConfiguration)

-- | Indicates whether this matchmaking configuration is being used with
-- GameLift hosting or as a standalone matchmaking solution.
--
-- -   __STANDALONE__ - FlexMatch forms matches and returns match
--     information, including players and team assignments, in a
--     <https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-events.html#match-events-matchmakingsucceeded MatchmakingSucceeded>
--     event.
--
-- -   __WITH_QUEUE__ - FlexMatch forms matches and uses the specified
--     GameLift queue to start a game session for the match.
updateMatchmakingConfiguration_flexMatchMode :: Lens.Lens' UpdateMatchmakingConfiguration (Prelude.Maybe FlexMatchMode)
updateMatchmakingConfiguration_flexMatchMode :: Lens' UpdateMatchmakingConfiguration (Maybe FlexMatchMode)
updateMatchmakingConfiguration_flexMatchMode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMatchmakingConfiguration' {Maybe FlexMatchMode
flexMatchMode :: Maybe FlexMatchMode
$sel:flexMatchMode:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe FlexMatchMode
flexMatchMode} -> Maybe FlexMatchMode
flexMatchMode) (\s :: UpdateMatchmakingConfiguration
s@UpdateMatchmakingConfiguration' {} Maybe FlexMatchMode
a -> UpdateMatchmakingConfiguration
s {$sel:flexMatchMode:UpdateMatchmakingConfiguration' :: Maybe FlexMatchMode
flexMatchMode = Maybe FlexMatchMode
a} :: UpdateMatchmakingConfiguration)

-- | A set of custom properties for a game session, formatted as key:value
-- pairs. These properties are passed to a game server process with a
-- request to start a new game session (see
-- <https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession Start a Game Session>).
-- This information is added to the new @GameSession@ object that is
-- created for a successful match. This parameter is not used if
-- @FlexMatchMode@ is set to @STANDALONE@.
updateMatchmakingConfiguration_gameProperties :: Lens.Lens' UpdateMatchmakingConfiguration (Prelude.Maybe [GameProperty])
updateMatchmakingConfiguration_gameProperties :: Lens' UpdateMatchmakingConfiguration (Maybe [GameProperty])
updateMatchmakingConfiguration_gameProperties = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMatchmakingConfiguration' {Maybe [GameProperty]
gameProperties :: Maybe [GameProperty]
$sel:gameProperties:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe [GameProperty]
gameProperties} -> Maybe [GameProperty]
gameProperties) (\s :: UpdateMatchmakingConfiguration
s@UpdateMatchmakingConfiguration' {} Maybe [GameProperty]
a -> UpdateMatchmakingConfiguration
s {$sel:gameProperties:UpdateMatchmakingConfiguration' :: Maybe [GameProperty]
gameProperties = Maybe [GameProperty]
a} :: UpdateMatchmakingConfiguration) 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 set of custom game session properties, formatted as a single string
-- value. This data is passed to a game server process with a request to
-- start a new game session (see
-- <https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession Start a Game Session>).
-- This information is added to the game session that is created for a
-- successful match. This parameter is not used if @FlexMatchMode@ is set
-- to @STANDALONE@.
updateMatchmakingConfiguration_gameSessionData :: Lens.Lens' UpdateMatchmakingConfiguration (Prelude.Maybe Prelude.Text)
updateMatchmakingConfiguration_gameSessionData :: Lens' UpdateMatchmakingConfiguration (Maybe Text)
updateMatchmakingConfiguration_gameSessionData = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMatchmakingConfiguration' {Maybe Text
gameSessionData :: Maybe Text
$sel:gameSessionData:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Text
gameSessionData} -> Maybe Text
gameSessionData) (\s :: UpdateMatchmakingConfiguration
s@UpdateMatchmakingConfiguration' {} Maybe Text
a -> UpdateMatchmakingConfiguration
s {$sel:gameSessionData:UpdateMatchmakingConfiguration' :: Maybe Text
gameSessionData = Maybe Text
a} :: UpdateMatchmakingConfiguration)

-- | The Amazon Resource Name
-- (<https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html ARN>)
-- that is assigned to a GameLift game session queue resource and uniquely
-- identifies it. ARNs are unique across all Regions. Format is
-- @arn:aws:gamelift:\<region>::gamesessionqueue\/\<queue name>@. Queues
-- can be located in any Region. Queues are used to start new
-- GameLift-hosted game sessions for matches that are created with this
-- matchmaking configuration. If @FlexMatchMode@ is set to @STANDALONE@, do
-- not set this parameter.
updateMatchmakingConfiguration_gameSessionQueueArns :: Lens.Lens' UpdateMatchmakingConfiguration (Prelude.Maybe [Prelude.Text])
updateMatchmakingConfiguration_gameSessionQueueArns :: Lens' UpdateMatchmakingConfiguration (Maybe [Text])
updateMatchmakingConfiguration_gameSessionQueueArns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMatchmakingConfiguration' {Maybe [Text]
gameSessionQueueArns :: Maybe [Text]
$sel:gameSessionQueueArns:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe [Text]
gameSessionQueueArns} -> Maybe [Text]
gameSessionQueueArns) (\s :: UpdateMatchmakingConfiguration
s@UpdateMatchmakingConfiguration' {} Maybe [Text]
a -> UpdateMatchmakingConfiguration
s {$sel:gameSessionQueueArns:UpdateMatchmakingConfiguration' :: Maybe [Text]
gameSessionQueueArns = Maybe [Text]
a} :: UpdateMatchmakingConfiguration) 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

-- | An SNS topic ARN that is set up to receive matchmaking notifications.
-- See
-- <https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-notification.html Setting up notifications for matchmaking>
-- for more information.
updateMatchmakingConfiguration_notificationTarget :: Lens.Lens' UpdateMatchmakingConfiguration (Prelude.Maybe Prelude.Text)
updateMatchmakingConfiguration_notificationTarget :: Lens' UpdateMatchmakingConfiguration (Maybe Text)
updateMatchmakingConfiguration_notificationTarget = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMatchmakingConfiguration' {Maybe Text
notificationTarget :: Maybe Text
$sel:notificationTarget:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Text
notificationTarget} -> Maybe Text
notificationTarget) (\s :: UpdateMatchmakingConfiguration
s@UpdateMatchmakingConfiguration' {} Maybe Text
a -> UpdateMatchmakingConfiguration
s {$sel:notificationTarget:UpdateMatchmakingConfiguration' :: Maybe Text
notificationTarget = Maybe Text
a} :: UpdateMatchmakingConfiguration)

-- | The maximum duration, in seconds, that a matchmaking ticket can remain
-- in process before timing out. Requests that fail due to timing out can
-- be resubmitted as needed.
updateMatchmakingConfiguration_requestTimeoutSeconds :: Lens.Lens' UpdateMatchmakingConfiguration (Prelude.Maybe Prelude.Natural)
updateMatchmakingConfiguration_requestTimeoutSeconds :: Lens' UpdateMatchmakingConfiguration (Maybe Natural)
updateMatchmakingConfiguration_requestTimeoutSeconds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMatchmakingConfiguration' {Maybe Natural
requestTimeoutSeconds :: Maybe Natural
$sel:requestTimeoutSeconds:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Natural
requestTimeoutSeconds} -> Maybe Natural
requestTimeoutSeconds) (\s :: UpdateMatchmakingConfiguration
s@UpdateMatchmakingConfiguration' {} Maybe Natural
a -> UpdateMatchmakingConfiguration
s {$sel:requestTimeoutSeconds:UpdateMatchmakingConfiguration' :: Maybe Natural
requestTimeoutSeconds = Maybe Natural
a} :: UpdateMatchmakingConfiguration)

-- | A unique identifier for the matchmaking rule set to use with this
-- configuration. You can use either the rule set name or ARN value. A
-- matchmaking configuration can only use rule sets that are defined in the
-- same Region.
updateMatchmakingConfiguration_ruleSetName :: Lens.Lens' UpdateMatchmakingConfiguration (Prelude.Maybe Prelude.Text)
updateMatchmakingConfiguration_ruleSetName :: Lens' UpdateMatchmakingConfiguration (Maybe Text)
updateMatchmakingConfiguration_ruleSetName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMatchmakingConfiguration' {Maybe Text
ruleSetName :: Maybe Text
$sel:ruleSetName:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Text
ruleSetName} -> Maybe Text
ruleSetName) (\s :: UpdateMatchmakingConfiguration
s@UpdateMatchmakingConfiguration' {} Maybe Text
a -> UpdateMatchmakingConfiguration
s {$sel:ruleSetName:UpdateMatchmakingConfiguration' :: Maybe Text
ruleSetName = Maybe Text
a} :: UpdateMatchmakingConfiguration)

-- | A unique identifier for the matchmaking configuration to update. You can
-- use either the configuration name or ARN value.
updateMatchmakingConfiguration_name :: Lens.Lens' UpdateMatchmakingConfiguration Prelude.Text
updateMatchmakingConfiguration_name :: Lens' UpdateMatchmakingConfiguration Text
updateMatchmakingConfiguration_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMatchmakingConfiguration' {Text
name :: Text
$sel:name:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Text
name} -> Text
name) (\s :: UpdateMatchmakingConfiguration
s@UpdateMatchmakingConfiguration' {} Text
a -> UpdateMatchmakingConfiguration
s {$sel:name:UpdateMatchmakingConfiguration' :: Text
name = Text
a} :: UpdateMatchmakingConfiguration)

instance
  Core.AWSRequest
    UpdateMatchmakingConfiguration
  where
  type
    AWSResponse UpdateMatchmakingConfiguration =
      UpdateMatchmakingConfigurationResponse
  request :: (Service -> Service)
-> UpdateMatchmakingConfiguration
-> Request UpdateMatchmakingConfiguration
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 UpdateMatchmakingConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse UpdateMatchmakingConfiguration)))
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 MatchmakingConfiguration
-> Int -> UpdateMatchmakingConfigurationResponse
UpdateMatchmakingConfigurationResponse'
            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
"Configuration")
            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
    UpdateMatchmakingConfiguration
  where
  hashWithSalt :: Int -> UpdateMatchmakingConfiguration -> Int
hashWithSalt
    Int
_salt
    UpdateMatchmakingConfiguration' {Maybe Bool
Maybe Natural
Maybe [Text]
Maybe [GameProperty]
Maybe Text
Maybe BackfillMode
Maybe FlexMatchMode
Text
name :: Text
ruleSetName :: Maybe Text
requestTimeoutSeconds :: Maybe Natural
notificationTarget :: Maybe Text
gameSessionQueueArns :: Maybe [Text]
gameSessionData :: Maybe Text
gameProperties :: Maybe [GameProperty]
flexMatchMode :: Maybe FlexMatchMode
description :: Maybe Text
customEventData :: Maybe Text
backfillMode :: Maybe BackfillMode
additionalPlayerCount :: Maybe Natural
acceptanceTimeoutSeconds :: Maybe Natural
acceptanceRequired :: Maybe Bool
$sel:name:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Text
$sel:ruleSetName:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Text
$sel:requestTimeoutSeconds:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Natural
$sel:notificationTarget:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Text
$sel:gameSessionQueueArns:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe [Text]
$sel:gameSessionData:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Text
$sel:gameProperties:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe [GameProperty]
$sel:flexMatchMode:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe FlexMatchMode
$sel:description:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Text
$sel:customEventData:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Text
$sel:backfillMode:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe BackfillMode
$sel:additionalPlayerCount:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Natural
$sel:acceptanceTimeoutSeconds:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Natural
$sel:acceptanceRequired:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Bool
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
acceptanceRequired
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
acceptanceTimeoutSeconds
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
additionalPlayerCount
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe BackfillMode
backfillMode
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
customEventData
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe FlexMatchMode
flexMatchMode
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [GameProperty]
gameProperties
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
gameSessionData
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
gameSessionQueueArns
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
notificationTarget
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
requestTimeoutSeconds
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ruleSetName
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name

instance
  Prelude.NFData
    UpdateMatchmakingConfiguration
  where
  rnf :: UpdateMatchmakingConfiguration -> ()
rnf UpdateMatchmakingConfiguration' {Maybe Bool
Maybe Natural
Maybe [Text]
Maybe [GameProperty]
Maybe Text
Maybe BackfillMode
Maybe FlexMatchMode
Text
name :: Text
ruleSetName :: Maybe Text
requestTimeoutSeconds :: Maybe Natural
notificationTarget :: Maybe Text
gameSessionQueueArns :: Maybe [Text]
gameSessionData :: Maybe Text
gameProperties :: Maybe [GameProperty]
flexMatchMode :: Maybe FlexMatchMode
description :: Maybe Text
customEventData :: Maybe Text
backfillMode :: Maybe BackfillMode
additionalPlayerCount :: Maybe Natural
acceptanceTimeoutSeconds :: Maybe Natural
acceptanceRequired :: Maybe Bool
$sel:name:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Text
$sel:ruleSetName:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Text
$sel:requestTimeoutSeconds:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Natural
$sel:notificationTarget:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Text
$sel:gameSessionQueueArns:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe [Text]
$sel:gameSessionData:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Text
$sel:gameProperties:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe [GameProperty]
$sel:flexMatchMode:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe FlexMatchMode
$sel:description:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Text
$sel:customEventData:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Text
$sel:backfillMode:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe BackfillMode
$sel:additionalPlayerCount:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Natural
$sel:acceptanceTimeoutSeconds:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Natural
$sel:acceptanceRequired:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Bool
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
acceptanceRequired
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
acceptanceTimeoutSeconds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
additionalPlayerCount
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe BackfillMode
backfillMode
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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 Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe FlexMatchMode
flexMatchMode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [GameProperty]
gameProperties
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
gameSessionData
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
gameSessionQueueArns
      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 Natural
requestTimeoutSeconds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ruleSetName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name

instance
  Data.ToHeaders
    UpdateMatchmakingConfiguration
  where
  toHeaders :: UpdateMatchmakingConfiguration -> 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.UpdateMatchmakingConfiguration" ::
                          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 UpdateMatchmakingConfiguration where
  toJSON :: UpdateMatchmakingConfiguration -> Value
toJSON UpdateMatchmakingConfiguration' {Maybe Bool
Maybe Natural
Maybe [Text]
Maybe [GameProperty]
Maybe Text
Maybe BackfillMode
Maybe FlexMatchMode
Text
name :: Text
ruleSetName :: Maybe Text
requestTimeoutSeconds :: Maybe Natural
notificationTarget :: Maybe Text
gameSessionQueueArns :: Maybe [Text]
gameSessionData :: Maybe Text
gameProperties :: Maybe [GameProperty]
flexMatchMode :: Maybe FlexMatchMode
description :: Maybe Text
customEventData :: Maybe Text
backfillMode :: Maybe BackfillMode
additionalPlayerCount :: Maybe Natural
acceptanceTimeoutSeconds :: Maybe Natural
acceptanceRequired :: Maybe Bool
$sel:name:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Text
$sel:ruleSetName:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Text
$sel:requestTimeoutSeconds:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Natural
$sel:notificationTarget:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Text
$sel:gameSessionQueueArns:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe [Text]
$sel:gameSessionData:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Text
$sel:gameProperties:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe [GameProperty]
$sel:flexMatchMode:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe FlexMatchMode
$sel:description:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Text
$sel:customEventData:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Text
$sel:backfillMode:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe BackfillMode
$sel:additionalPlayerCount:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Natural
$sel:acceptanceTimeoutSeconds:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Natural
$sel:acceptanceRequired:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Bool
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"AcceptanceRequired" 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 Bool
acceptanceRequired,
            (Key
"AcceptanceTimeoutSeconds" 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
acceptanceTimeoutSeconds,
            (Key
"AdditionalPlayerCount" 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
additionalPlayerCount,
            (Key
"BackfillMode" 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 BackfillMode
backfillMode,
            (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
"Description" 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
description,
            (Key
"FlexMatchMode" 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 FlexMatchMode
flexMatchMode,
            (Key
"GameProperties" 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 [GameProperty]
gameProperties,
            (Key
"GameSessionData" 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
gameSessionData,
            (Key
"GameSessionQueueArns" 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]
gameSessionQueueArns,
            (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
"RequestTimeoutSeconds" 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
requestTimeoutSeconds,
            (Key
"RuleSetName" 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
ruleSetName,
            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 UpdateMatchmakingConfiguration where
  toPath :: UpdateMatchmakingConfiguration -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newUpdateMatchmakingConfigurationResponse' smart constructor.
data UpdateMatchmakingConfigurationResponse = UpdateMatchmakingConfigurationResponse'
  { -- | The updated matchmaking configuration.
    UpdateMatchmakingConfigurationResponse
-> Maybe MatchmakingConfiguration
configuration :: Prelude.Maybe MatchmakingConfiguration,
    -- | The response's http status code.
    UpdateMatchmakingConfigurationResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateMatchmakingConfigurationResponse
-> UpdateMatchmakingConfigurationResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateMatchmakingConfigurationResponse
-> UpdateMatchmakingConfigurationResponse -> Bool
$c/= :: UpdateMatchmakingConfigurationResponse
-> UpdateMatchmakingConfigurationResponse -> Bool
== :: UpdateMatchmakingConfigurationResponse
-> UpdateMatchmakingConfigurationResponse -> Bool
$c== :: UpdateMatchmakingConfigurationResponse
-> UpdateMatchmakingConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [UpdateMatchmakingConfigurationResponse]
ReadPrec UpdateMatchmakingConfigurationResponse
Int -> ReadS UpdateMatchmakingConfigurationResponse
ReadS [UpdateMatchmakingConfigurationResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateMatchmakingConfigurationResponse]
$creadListPrec :: ReadPrec [UpdateMatchmakingConfigurationResponse]
readPrec :: ReadPrec UpdateMatchmakingConfigurationResponse
$creadPrec :: ReadPrec UpdateMatchmakingConfigurationResponse
readList :: ReadS [UpdateMatchmakingConfigurationResponse]
$creadList :: ReadS [UpdateMatchmakingConfigurationResponse]
readsPrec :: Int -> ReadS UpdateMatchmakingConfigurationResponse
$creadsPrec :: Int -> ReadS UpdateMatchmakingConfigurationResponse
Prelude.Read, Int -> UpdateMatchmakingConfigurationResponse -> ShowS
[UpdateMatchmakingConfigurationResponse] -> ShowS
UpdateMatchmakingConfigurationResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateMatchmakingConfigurationResponse] -> ShowS
$cshowList :: [UpdateMatchmakingConfigurationResponse] -> ShowS
show :: UpdateMatchmakingConfigurationResponse -> String
$cshow :: UpdateMatchmakingConfigurationResponse -> String
showsPrec :: Int -> UpdateMatchmakingConfigurationResponse -> ShowS
$cshowsPrec :: Int -> UpdateMatchmakingConfigurationResponse -> ShowS
Prelude.Show, forall x.
Rep UpdateMatchmakingConfigurationResponse x
-> UpdateMatchmakingConfigurationResponse
forall x.
UpdateMatchmakingConfigurationResponse
-> Rep UpdateMatchmakingConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateMatchmakingConfigurationResponse x
-> UpdateMatchmakingConfigurationResponse
$cfrom :: forall x.
UpdateMatchmakingConfigurationResponse
-> Rep UpdateMatchmakingConfigurationResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateMatchmakingConfigurationResponse' 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:
--
-- 'configuration', 'updateMatchmakingConfigurationResponse_configuration' - The updated matchmaking configuration.
--
-- 'httpStatus', 'updateMatchmakingConfigurationResponse_httpStatus' - The response's http status code.
newUpdateMatchmakingConfigurationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateMatchmakingConfigurationResponse
newUpdateMatchmakingConfigurationResponse :: Int -> UpdateMatchmakingConfigurationResponse
newUpdateMatchmakingConfigurationResponse
  Int
pHttpStatus_ =
    UpdateMatchmakingConfigurationResponse'
      { $sel:configuration:UpdateMatchmakingConfigurationResponse' :: Maybe MatchmakingConfiguration
configuration =
          forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:UpdateMatchmakingConfigurationResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The updated matchmaking configuration.
updateMatchmakingConfigurationResponse_configuration :: Lens.Lens' UpdateMatchmakingConfigurationResponse (Prelude.Maybe MatchmakingConfiguration)
updateMatchmakingConfigurationResponse_configuration :: Lens'
  UpdateMatchmakingConfigurationResponse
  (Maybe MatchmakingConfiguration)
updateMatchmakingConfigurationResponse_configuration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMatchmakingConfigurationResponse' {Maybe MatchmakingConfiguration
configuration :: Maybe MatchmakingConfiguration
$sel:configuration:UpdateMatchmakingConfigurationResponse' :: UpdateMatchmakingConfigurationResponse
-> Maybe MatchmakingConfiguration
configuration} -> Maybe MatchmakingConfiguration
configuration) (\s :: UpdateMatchmakingConfigurationResponse
s@UpdateMatchmakingConfigurationResponse' {} Maybe MatchmakingConfiguration
a -> UpdateMatchmakingConfigurationResponse
s {$sel:configuration:UpdateMatchmakingConfigurationResponse' :: Maybe MatchmakingConfiguration
configuration = Maybe MatchmakingConfiguration
a} :: UpdateMatchmakingConfigurationResponse)

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

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