{-# 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-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- 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>
--
-- __Related actions__
--
-- CreateMatchmakingConfiguration | DescribeMatchmakingConfigurations |
-- UpdateMatchmakingConfiguration | DeleteMatchmakingConfiguration |
-- CreateMatchmakingRuleSet | DescribeMatchmakingRuleSets |
-- ValidateMatchmakingRuleSet | DeleteMatchmakingRuleSet |
-- <https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-awssdk.html#reference-awssdk-resources-fleets All APIs by task>
module Amazonka.GameLift.UpdateMatchmakingConfiguration
  ( -- * Creating a Request
    UpdateMatchmakingConfiguration (..),
    newUpdateMatchmakingConfiguration,

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

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

    -- * Response Lenses
    updateMatchmakingConfigurationResponse_configuration,
    updateMatchmakingConfigurationResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.GameLift.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | Represents the input for a request operation.
--
-- /See:/ 'newUpdateMatchmakingConfiguration' smart constructor.
data UpdateMatchmakingConfiguration = 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 StartMatchBackfill 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,
    -- | A set of custom properties for a game session, formatted as key:value
    -- pairs. These properties are passed to a game server process in the
    -- GameSession object 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 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,
    -- | 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 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,
    -- | 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,
    -- | 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,
    -- | 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],
    -- | Information to add to all events related to the matchmaking
    -- configuration.
    UpdateMatchmakingConfiguration -> Maybe Text
customEventData :: Prelude.Maybe Prelude.Text,
    -- | 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,
    -- | A set of custom game session properties, formatted as a single string
    -- value. This data is passed to a game server process in the GameSession
    -- object 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 Text
gameSessionData :: Prelude.Maybe Prelude.Text,
    -- | A descriptive label that is associated with matchmaking configuration.
    UpdateMatchmakingConfiguration -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | 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,
    -- | 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
(UpdateMatchmakingConfiguration
 -> UpdateMatchmakingConfiguration -> Bool)
-> (UpdateMatchmakingConfiguration
    -> UpdateMatchmakingConfiguration -> Bool)
-> Eq UpdateMatchmakingConfiguration
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]
(Int -> ReadS UpdateMatchmakingConfiguration)
-> ReadS [UpdateMatchmakingConfiguration]
-> ReadPrec UpdateMatchmakingConfiguration
-> ReadPrec [UpdateMatchmakingConfiguration]
-> Read 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
(Int -> UpdateMatchmakingConfiguration -> ShowS)
-> (UpdateMatchmakingConfiguration -> String)
-> ([UpdateMatchmakingConfiguration] -> ShowS)
-> Show UpdateMatchmakingConfiguration
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.
 UpdateMatchmakingConfiguration
 -> Rep UpdateMatchmakingConfiguration x)
-> (forall x.
    Rep UpdateMatchmakingConfiguration x
    -> UpdateMatchmakingConfiguration)
-> Generic UpdateMatchmakingConfiguration
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:
--
-- '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 StartMatchBackfill 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@.
--
-- '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 in the
-- GameSession object 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@.
--
-- '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.
--
-- 'acceptanceTimeoutSeconds', 'updateMatchmakingConfiguration_acceptanceTimeoutSeconds' - The length of time (in seconds) to wait for players to accept a proposed
-- match, if acceptance is required.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- 'customEventData', 'updateMatchmakingConfiguration_customEventData' - Information to add to all events related to the matchmaking
-- configuration.
--
-- '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.
--
-- '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 in the GameSession
-- object 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@.
--
-- 'description', 'updateMatchmakingConfiguration_description' - A descriptive label that is associated with matchmaking configuration.
--
-- '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@.
--
-- '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' :: Maybe BackfillMode
-> Maybe [GameProperty]
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> Maybe FlexMatchMode
-> Maybe [Text]
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Text
-> UpdateMatchmakingConfiguration
UpdateMatchmakingConfiguration'
    { $sel:backfillMode:UpdateMatchmakingConfiguration' :: Maybe BackfillMode
backfillMode =
        Maybe BackfillMode
forall a. Maybe a
Prelude.Nothing,
      $sel:gameProperties:UpdateMatchmakingConfiguration' :: Maybe [GameProperty]
gameProperties = Maybe [GameProperty]
forall a. Maybe a
Prelude.Nothing,
      $sel:ruleSetName:UpdateMatchmakingConfiguration' :: Maybe Text
ruleSetName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:acceptanceTimeoutSeconds:UpdateMatchmakingConfiguration' :: Maybe Natural
acceptanceTimeoutSeconds = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:requestTimeoutSeconds:UpdateMatchmakingConfiguration' :: Maybe Natural
requestTimeoutSeconds = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:notificationTarget:UpdateMatchmakingConfiguration' :: Maybe Text
notificationTarget = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:flexMatchMode:UpdateMatchmakingConfiguration' :: Maybe FlexMatchMode
flexMatchMode = Maybe FlexMatchMode
forall a. Maybe a
Prelude.Nothing,
      $sel:gameSessionQueueArns:UpdateMatchmakingConfiguration' :: Maybe [Text]
gameSessionQueueArns = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:customEventData:UpdateMatchmakingConfiguration' :: Maybe Text
customEventData = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:acceptanceRequired:UpdateMatchmakingConfiguration' :: Maybe Bool
acceptanceRequired = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:gameSessionData:UpdateMatchmakingConfiguration' :: Maybe Text
gameSessionData = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:UpdateMatchmakingConfiguration' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:additionalPlayerCount:UpdateMatchmakingConfiguration' :: Maybe Natural
additionalPlayerCount = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:name:UpdateMatchmakingConfiguration' :: Text
name = Text
pName_
    }

-- | 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 StartMatchBackfill 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 :: (Maybe BackfillMode -> f (Maybe BackfillMode))
-> UpdateMatchmakingConfiguration
-> f UpdateMatchmakingConfiguration
updateMatchmakingConfiguration_backfillMode = (UpdateMatchmakingConfiguration -> Maybe BackfillMode)
-> (UpdateMatchmakingConfiguration
    -> Maybe BackfillMode -> UpdateMatchmakingConfiguration)
-> Lens
     UpdateMatchmakingConfiguration
     UpdateMatchmakingConfiguration
     (Maybe BackfillMode)
     (Maybe 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)

-- | A set of custom properties for a game session, formatted as key:value
-- pairs. These properties are passed to a game server process in the
-- GameSession object 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 :: (Maybe [GameProperty] -> f (Maybe [GameProperty]))
-> UpdateMatchmakingConfiguration
-> f UpdateMatchmakingConfiguration
updateMatchmakingConfiguration_gameProperties = (UpdateMatchmakingConfiguration -> Maybe [GameProperty])
-> (UpdateMatchmakingConfiguration
    -> Maybe [GameProperty] -> UpdateMatchmakingConfiguration)
-> Lens
     UpdateMatchmakingConfiguration
     UpdateMatchmakingConfiguration
     (Maybe [GameProperty])
     (Maybe [GameProperty])
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) ((Maybe [GameProperty] -> f (Maybe [GameProperty]))
 -> UpdateMatchmakingConfiguration
 -> f UpdateMatchmakingConfiguration)
-> ((Maybe [GameProperty] -> f (Maybe [GameProperty]))
    -> Maybe [GameProperty] -> f (Maybe [GameProperty]))
-> (Maybe [GameProperty] -> f (Maybe [GameProperty]))
-> UpdateMatchmakingConfiguration
-> f UpdateMatchmakingConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [GameProperty] [GameProperty] [GameProperty] [GameProperty]
-> Iso
     (Maybe [GameProperty])
     (Maybe [GameProperty])
     (Maybe [GameProperty])
     (Maybe [GameProperty])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [GameProperty] [GameProperty] [GameProperty] [GameProperty]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> UpdateMatchmakingConfiguration
-> f UpdateMatchmakingConfiguration
updateMatchmakingConfiguration_ruleSetName = (UpdateMatchmakingConfiguration -> Maybe Text)
-> (UpdateMatchmakingConfiguration
    -> Maybe Text -> UpdateMatchmakingConfiguration)
-> Lens
     UpdateMatchmakingConfiguration
     UpdateMatchmakingConfiguration
     (Maybe Text)
     (Maybe Text)
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)

-- | 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 :: (Maybe Natural -> f (Maybe Natural))
-> UpdateMatchmakingConfiguration
-> f UpdateMatchmakingConfiguration
updateMatchmakingConfiguration_acceptanceTimeoutSeconds = (UpdateMatchmakingConfiguration -> Maybe Natural)
-> (UpdateMatchmakingConfiguration
    -> Maybe Natural -> UpdateMatchmakingConfiguration)
-> Lens
     UpdateMatchmakingConfiguration
     UpdateMatchmakingConfiguration
     (Maybe Natural)
     (Maybe Natural)
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 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 :: (Maybe Natural -> f (Maybe Natural))
-> UpdateMatchmakingConfiguration
-> f UpdateMatchmakingConfiguration
updateMatchmakingConfiguration_requestTimeoutSeconds = (UpdateMatchmakingConfiguration -> Maybe Natural)
-> (UpdateMatchmakingConfiguration
    -> Maybe Natural -> UpdateMatchmakingConfiguration)
-> Lens
     UpdateMatchmakingConfiguration
     UpdateMatchmakingConfiguration
     (Maybe Natural)
     (Maybe Natural)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> UpdateMatchmakingConfiguration
-> f UpdateMatchmakingConfiguration
updateMatchmakingConfiguration_notificationTarget = (UpdateMatchmakingConfiguration -> Maybe Text)
-> (UpdateMatchmakingConfiguration
    -> Maybe Text -> UpdateMatchmakingConfiguration)
-> Lens
     UpdateMatchmakingConfiguration
     UpdateMatchmakingConfiguration
     (Maybe Text)
     (Maybe Text)
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)

-- | 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 :: (Maybe FlexMatchMode -> f (Maybe FlexMatchMode))
-> UpdateMatchmakingConfiguration
-> f UpdateMatchmakingConfiguration
updateMatchmakingConfiguration_flexMatchMode = (UpdateMatchmakingConfiguration -> Maybe FlexMatchMode)
-> (UpdateMatchmakingConfiguration
    -> Maybe FlexMatchMode -> UpdateMatchmakingConfiguration)
-> Lens
     UpdateMatchmakingConfiguration
     UpdateMatchmakingConfiguration
     (Maybe FlexMatchMode)
     (Maybe 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)

-- | 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 :: (Maybe [Text] -> f (Maybe [Text]))
-> UpdateMatchmakingConfiguration
-> f UpdateMatchmakingConfiguration
updateMatchmakingConfiguration_gameSessionQueueArns = (UpdateMatchmakingConfiguration -> Maybe [Text])
-> (UpdateMatchmakingConfiguration
    -> Maybe [Text] -> UpdateMatchmakingConfiguration)
-> Lens
     UpdateMatchmakingConfiguration
     UpdateMatchmakingConfiguration
     (Maybe [Text])
     (Maybe [Text])
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) ((Maybe [Text] -> f (Maybe [Text]))
 -> UpdateMatchmakingConfiguration
 -> f UpdateMatchmakingConfiguration)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> UpdateMatchmakingConfiguration
-> f UpdateMatchmakingConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Information to add to all events related to the matchmaking
-- configuration.
updateMatchmakingConfiguration_customEventData :: Lens.Lens' UpdateMatchmakingConfiguration (Prelude.Maybe Prelude.Text)
updateMatchmakingConfiguration_customEventData :: (Maybe Text -> f (Maybe Text))
-> UpdateMatchmakingConfiguration
-> f UpdateMatchmakingConfiguration
updateMatchmakingConfiguration_customEventData = (UpdateMatchmakingConfiguration -> Maybe Text)
-> (UpdateMatchmakingConfiguration
    -> Maybe Text -> UpdateMatchmakingConfiguration)
-> Lens
     UpdateMatchmakingConfiguration
     UpdateMatchmakingConfiguration
     (Maybe Text)
     (Maybe Text)
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 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 :: (Maybe Bool -> f (Maybe Bool))
-> UpdateMatchmakingConfiguration
-> f UpdateMatchmakingConfiguration
updateMatchmakingConfiguration_acceptanceRequired = (UpdateMatchmakingConfiguration -> Maybe Bool)
-> (UpdateMatchmakingConfiguration
    -> Maybe Bool -> UpdateMatchmakingConfiguration)
-> Lens
     UpdateMatchmakingConfiguration
     UpdateMatchmakingConfiguration
     (Maybe Bool)
     (Maybe Bool)
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)

-- | A set of custom game session properties, formatted as a single string
-- value. This data is passed to a game server process in the GameSession
-- object 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_gameSessionData :: Lens.Lens' UpdateMatchmakingConfiguration (Prelude.Maybe Prelude.Text)
updateMatchmakingConfiguration_gameSessionData :: (Maybe Text -> f (Maybe Text))
-> UpdateMatchmakingConfiguration
-> f UpdateMatchmakingConfiguration
updateMatchmakingConfiguration_gameSessionData = (UpdateMatchmakingConfiguration -> Maybe Text)
-> (UpdateMatchmakingConfiguration
    -> Maybe Text -> UpdateMatchmakingConfiguration)
-> Lens
     UpdateMatchmakingConfiguration
     UpdateMatchmakingConfiguration
     (Maybe Text)
     (Maybe Text)
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)

-- | A descriptive label that is associated with matchmaking configuration.
updateMatchmakingConfiguration_description :: Lens.Lens' UpdateMatchmakingConfiguration (Prelude.Maybe Prelude.Text)
updateMatchmakingConfiguration_description :: (Maybe Text -> f (Maybe Text))
-> UpdateMatchmakingConfiguration
-> f UpdateMatchmakingConfiguration
updateMatchmakingConfiguration_description = (UpdateMatchmakingConfiguration -> Maybe Text)
-> (UpdateMatchmakingConfiguration
    -> Maybe Text -> UpdateMatchmakingConfiguration)
-> Lens
     UpdateMatchmakingConfiguration
     UpdateMatchmakingConfiguration
     (Maybe Text)
     (Maybe Text)
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)

-- | 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 :: (Maybe Natural -> f (Maybe Natural))
-> UpdateMatchmakingConfiguration
-> f UpdateMatchmakingConfiguration
updateMatchmakingConfiguration_additionalPlayerCount = (UpdateMatchmakingConfiguration -> Maybe Natural)
-> (UpdateMatchmakingConfiguration
    -> Maybe Natural -> UpdateMatchmakingConfiguration)
-> Lens
     UpdateMatchmakingConfiguration
     UpdateMatchmakingConfiguration
     (Maybe Natural)
     (Maybe Natural)
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)

-- | 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 :: (Text -> f Text)
-> UpdateMatchmakingConfiguration
-> f UpdateMatchmakingConfiguration
updateMatchmakingConfiguration_name = (UpdateMatchmakingConfiguration -> Text)
-> (UpdateMatchmakingConfiguration
    -> Text -> UpdateMatchmakingConfiguration)
-> Lens
     UpdateMatchmakingConfiguration
     UpdateMatchmakingConfiguration
     Text
     Text
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 :: UpdateMatchmakingConfiguration
-> Request UpdateMatchmakingConfiguration
request = Service
-> UpdateMatchmakingConfiguration
-> Request UpdateMatchmakingConfiguration
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateMatchmakingConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse UpdateMatchmakingConfiguration)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateMatchmakingConfiguration))
-> Logger
-> Service
-> Proxy UpdateMatchmakingConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse UpdateMatchmakingConfiguration)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe MatchmakingConfiguration
-> Int -> UpdateMatchmakingConfigurationResponse
UpdateMatchmakingConfigurationResponse'
            (Maybe MatchmakingConfiguration
 -> Int -> UpdateMatchmakingConfigurationResponse)
-> Either String (Maybe MatchmakingConfiguration)
-> Either String (Int -> UpdateMatchmakingConfigurationResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe MatchmakingConfiguration)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Configuration")
            Either String (Int -> UpdateMatchmakingConfigurationResponse)
-> Either String Int
-> Either String UpdateMatchmakingConfigurationResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    UpdateMatchmakingConfiguration

instance
  Prelude.NFData
    UpdateMatchmakingConfiguration

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

instance Core.ToJSON UpdateMatchmakingConfiguration where
  toJSON :: UpdateMatchmakingConfiguration -> Value
toJSON UpdateMatchmakingConfiguration' {Maybe Bool
Maybe Natural
Maybe [Text]
Maybe [GameProperty]
Maybe Text
Maybe BackfillMode
Maybe FlexMatchMode
Text
name :: Text
additionalPlayerCount :: Maybe Natural
description :: Maybe Text
gameSessionData :: Maybe Text
acceptanceRequired :: Maybe Bool
customEventData :: Maybe Text
gameSessionQueueArns :: Maybe [Text]
flexMatchMode :: Maybe FlexMatchMode
notificationTarget :: Maybe Text
requestTimeoutSeconds :: Maybe Natural
acceptanceTimeoutSeconds :: Maybe Natural
ruleSetName :: Maybe Text
gameProperties :: Maybe [GameProperty]
backfillMode :: Maybe BackfillMode
$sel:name:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Text
$sel:additionalPlayerCount:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Natural
$sel:description:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Text
$sel:gameSessionData:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Text
$sel:acceptanceRequired:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Bool
$sel:customEventData:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Text
$sel:gameSessionQueueArns:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe [Text]
$sel:flexMatchMode:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe FlexMatchMode
$sel:notificationTarget:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Text
$sel:requestTimeoutSeconds:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Natural
$sel:acceptanceTimeoutSeconds:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Natural
$sel:ruleSetName:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe Text
$sel:gameProperties:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe [GameProperty]
$sel:backfillMode:UpdateMatchmakingConfiguration' :: UpdateMatchmakingConfiguration -> Maybe BackfillMode
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"BackfillMode" Text -> BackfillMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (BackfillMode -> Pair) -> Maybe BackfillMode -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BackfillMode
backfillMode,
            (Text
"GameProperties" Text -> [GameProperty] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([GameProperty] -> Pair) -> Maybe [GameProperty] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [GameProperty]
gameProperties,
            (Text
"RuleSetName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
ruleSetName,
            (Text
"AcceptanceTimeoutSeconds" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
acceptanceTimeoutSeconds,
            (Text
"RequestTimeoutSeconds" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
requestTimeoutSeconds,
            (Text
"NotificationTarget" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
notificationTarget,
            (Text
"FlexMatchMode" Text -> FlexMatchMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (FlexMatchMode -> Pair) -> Maybe FlexMatchMode -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FlexMatchMode
flexMatchMode,
            (Text
"GameSessionQueueArns" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
gameSessionQueueArns,
            (Text
"CustomEventData" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
customEventData,
            (Text
"AcceptanceRequired" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
acceptanceRequired,
            (Text
"GameSessionData" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
gameSessionData,
            (Text
"Description" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
            (Text
"AdditionalPlayerCount" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
additionalPlayerCount,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name)
          ]
      )

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

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

-- | Represents the returned data in response to a request operation.
--
-- /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
(UpdateMatchmakingConfigurationResponse
 -> UpdateMatchmakingConfigurationResponse -> Bool)
-> (UpdateMatchmakingConfigurationResponse
    -> UpdateMatchmakingConfigurationResponse -> Bool)
-> Eq UpdateMatchmakingConfigurationResponse
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]
(Int -> ReadS UpdateMatchmakingConfigurationResponse)
-> ReadS [UpdateMatchmakingConfigurationResponse]
-> ReadPrec UpdateMatchmakingConfigurationResponse
-> ReadPrec [UpdateMatchmakingConfigurationResponse]
-> Read 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
(Int -> UpdateMatchmakingConfigurationResponse -> ShowS)
-> (UpdateMatchmakingConfigurationResponse -> String)
-> ([UpdateMatchmakingConfigurationResponse] -> ShowS)
-> Show UpdateMatchmakingConfigurationResponse
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.
 UpdateMatchmakingConfigurationResponse
 -> Rep UpdateMatchmakingConfigurationResponse x)
-> (forall x.
    Rep UpdateMatchmakingConfigurationResponse x
    -> UpdateMatchmakingConfigurationResponse)
-> Generic UpdateMatchmakingConfigurationResponse
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' :: Maybe MatchmakingConfiguration
-> Int -> UpdateMatchmakingConfigurationResponse
UpdateMatchmakingConfigurationResponse'
      { $sel:configuration:UpdateMatchmakingConfigurationResponse' :: Maybe MatchmakingConfiguration
configuration =
          Maybe MatchmakingConfiguration
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 :: (Maybe MatchmakingConfiguration
 -> f (Maybe MatchmakingConfiguration))
-> UpdateMatchmakingConfigurationResponse
-> f UpdateMatchmakingConfigurationResponse
updateMatchmakingConfigurationResponse_configuration = (UpdateMatchmakingConfigurationResponse
 -> Maybe MatchmakingConfiguration)
-> (UpdateMatchmakingConfigurationResponse
    -> Maybe MatchmakingConfiguration
    -> UpdateMatchmakingConfigurationResponse)
-> Lens
     UpdateMatchmakingConfigurationResponse
     UpdateMatchmakingConfigurationResponse
     (Maybe MatchmakingConfiguration)
     (Maybe MatchmakingConfiguration)
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 :: (Int -> f Int)
-> UpdateMatchmakingConfigurationResponse
-> f UpdateMatchmakingConfigurationResponse
updateMatchmakingConfigurationResponse_httpStatus = (UpdateMatchmakingConfigurationResponse -> Int)
-> (UpdateMatchmakingConfigurationResponse
    -> Int -> UpdateMatchmakingConfigurationResponse)
-> Lens
     UpdateMatchmakingConfigurationResponse
     UpdateMatchmakingConfigurationResponse
     Int
     Int
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