{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

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

-- |
-- Module      : Amazonka.GameLift.Types.MatchmakingConfiguration
-- 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)
module Amazonka.GameLift.Types.MatchmakingConfiguration where

import qualified Amazonka.Core as Core
import Amazonka.GameLift.Types.BackfillMode
import Amazonka.GameLift.Types.FlexMatchMode
import Amazonka.GameLift.Types.GameProperty
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Guidelines for use with FlexMatch to match players into games. All
-- matchmaking requests must specify a matchmaking configuration.
--
-- /See:/ 'newMatchmakingConfiguration' smart constructor.
data MatchmakingConfiguration = MatchmakingConfiguration'
  { -- | A time stamp indicating when this data object was created. Format is a
    -- number expressed in Unix time as milliseconds (for example
    -- @\"1469498468.057\"@).
    MatchmakingConfiguration -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | The method used to backfill game sessions created with this matchmaking
    -- configuration. MANUAL indicates that the game makes backfill requests or
    -- does not use the match backfill feature. AUTOMATIC indicates that
    -- GameLift creates StartMatchBackfill requests 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@.
    MatchmakingConfiguration -> 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 when @FlexMatchMode@
    -- is set to @STANDALONE@.
    MatchmakingConfiguration -> Maybe [GameProperty]
gameProperties :: Prelude.Maybe [GameProperty],
    -- | A unique identifier for the matchmaking rule set to use with this
    -- configuration. A matchmaking configuration can only use rule sets that
    -- are defined in the same Region.
    MatchmakingConfiguration -> 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. If any player rejects the match or
    -- fails to accept before the timeout, the ticket continues to look for an
    -- acceptable match.
    MatchmakingConfiguration -> 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.
    MatchmakingConfiguration -> Maybe Natural
requestTimeoutSeconds :: Prelude.Maybe Prelude.Natural,
    -- | An SNS topic ARN that is set up to receive matchmaking notifications.
    MatchmakingConfiguration -> 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.
    MatchmakingConfiguration -> 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. This property is not set when @FlexMatchMode@
    -- is set to @STANDALONE@.
    MatchmakingConfiguration -> Maybe [Text]
gameSessionQueueArns :: Prelude.Maybe [Prelude.Text],
    -- | A unique identifier for the matchmaking configuration. This name is used
    -- to identify the configuration associated with a matchmaking request or
    -- ticket.
    MatchmakingConfiguration -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | Information to attach to all events related to the matchmaking
    -- configuration.
    MatchmakingConfiguration -> Maybe Text
customEventData :: 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 matchmaking configuration resource and
    -- uniquely identifies it. ARNs are unique across all Regions. Format is
    -- @arn:aws:gamelift:\<region>::matchmakingconfiguration\/\<matchmaking configuration name>@.
    -- In a GameLift configuration ARN, the resource ID matches the /Name/
    -- value.
    MatchmakingConfiguration -> Maybe Text
configurationArn :: 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. When this option is enabled, matchmaking
    -- tickets use the status @REQUIRES_ACCEPTANCE@ to indicate when a
    -- completed potential match is waiting for player acceptance.
    MatchmakingConfiguration -> 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 when @FlexMatchMode@
    -- is set to @STANDALONE@.
    MatchmakingConfiguration -> Maybe Text
gameSessionData :: Prelude.Maybe Prelude.Text,
    -- | A descriptive label that is associated with matchmaking configuration.
    MatchmakingConfiguration -> 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 when
    -- @FlexMatchMode@ is set to @STANDALONE@.
    MatchmakingConfiguration -> Maybe Natural
additionalPlayerCount :: Prelude.Maybe Prelude.Natural,
    -- | The Amazon Resource Name
    -- (<https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html ARN>)
    -- associated with the GameLift matchmaking rule set resource that this
    -- configuration uses.
    MatchmakingConfiguration -> Maybe Text
ruleSetArn :: Prelude.Maybe Prelude.Text
  }
  deriving (MatchmakingConfiguration -> MatchmakingConfiguration -> Bool
(MatchmakingConfiguration -> MatchmakingConfiguration -> Bool)
-> (MatchmakingConfiguration -> MatchmakingConfiguration -> Bool)
-> Eq MatchmakingConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MatchmakingConfiguration -> MatchmakingConfiguration -> Bool
$c/= :: MatchmakingConfiguration -> MatchmakingConfiguration -> Bool
== :: MatchmakingConfiguration -> MatchmakingConfiguration -> Bool
$c== :: MatchmakingConfiguration -> MatchmakingConfiguration -> Bool
Prelude.Eq, ReadPrec [MatchmakingConfiguration]
ReadPrec MatchmakingConfiguration
Int -> ReadS MatchmakingConfiguration
ReadS [MatchmakingConfiguration]
(Int -> ReadS MatchmakingConfiguration)
-> ReadS [MatchmakingConfiguration]
-> ReadPrec MatchmakingConfiguration
-> ReadPrec [MatchmakingConfiguration]
-> Read MatchmakingConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MatchmakingConfiguration]
$creadListPrec :: ReadPrec [MatchmakingConfiguration]
readPrec :: ReadPrec MatchmakingConfiguration
$creadPrec :: ReadPrec MatchmakingConfiguration
readList :: ReadS [MatchmakingConfiguration]
$creadList :: ReadS [MatchmakingConfiguration]
readsPrec :: Int -> ReadS MatchmakingConfiguration
$creadsPrec :: Int -> ReadS MatchmakingConfiguration
Prelude.Read, Int -> MatchmakingConfiguration -> ShowS
[MatchmakingConfiguration] -> ShowS
MatchmakingConfiguration -> String
(Int -> MatchmakingConfiguration -> ShowS)
-> (MatchmakingConfiguration -> String)
-> ([MatchmakingConfiguration] -> ShowS)
-> Show MatchmakingConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MatchmakingConfiguration] -> ShowS
$cshowList :: [MatchmakingConfiguration] -> ShowS
show :: MatchmakingConfiguration -> String
$cshow :: MatchmakingConfiguration -> String
showsPrec :: Int -> MatchmakingConfiguration -> ShowS
$cshowsPrec :: Int -> MatchmakingConfiguration -> ShowS
Prelude.Show, (forall x.
 MatchmakingConfiguration -> Rep MatchmakingConfiguration x)
-> (forall x.
    Rep MatchmakingConfiguration x -> MatchmakingConfiguration)
-> Generic MatchmakingConfiguration
forall x.
Rep MatchmakingConfiguration x -> MatchmakingConfiguration
forall x.
MatchmakingConfiguration -> Rep MatchmakingConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MatchmakingConfiguration x -> MatchmakingConfiguration
$cfrom :: forall x.
MatchmakingConfiguration -> Rep MatchmakingConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'MatchmakingConfiguration' 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:
--
-- 'creationTime', 'matchmakingConfiguration_creationTime' - A time stamp indicating when this data object was created. Format is a
-- number expressed in Unix time as milliseconds (for example
-- @\"1469498468.057\"@).
--
-- 'backfillMode', 'matchmakingConfiguration_backfillMode' - The method used to backfill game sessions created with this matchmaking
-- configuration. MANUAL indicates that the game makes backfill requests or
-- does not use the match backfill feature. AUTOMATIC indicates that
-- GameLift creates StartMatchBackfill requests 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', 'matchmakingConfiguration_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 when @FlexMatchMode@
-- is set to @STANDALONE@.
--
-- 'ruleSetName', 'matchmakingConfiguration_ruleSetName' - A unique identifier for the matchmaking rule set to use with this
-- configuration. A matchmaking configuration can only use rule sets that
-- are defined in the same Region.
--
-- 'acceptanceTimeoutSeconds', 'matchmakingConfiguration_acceptanceTimeoutSeconds' - The length of time (in seconds) to wait for players to accept a proposed
-- match, if acceptance is required. If any player rejects the match or
-- fails to accept before the timeout, the ticket continues to look for an
-- acceptable match.
--
-- 'requestTimeoutSeconds', 'matchmakingConfiguration_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', 'matchmakingConfiguration_notificationTarget' - An SNS topic ARN that is set up to receive matchmaking notifications.
--
-- 'flexMatchMode', 'matchmakingConfiguration_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', 'matchmakingConfiguration_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. This property is not set when @FlexMatchMode@
-- is set to @STANDALONE@.
--
-- 'name', 'matchmakingConfiguration_name' - A unique identifier for the matchmaking configuration. This name is used
-- to identify the configuration associated with a matchmaking request or
-- ticket.
--
-- 'customEventData', 'matchmakingConfiguration_customEventData' - Information to attach to all events related to the matchmaking
-- configuration.
--
-- 'configurationArn', 'matchmakingConfiguration_configurationArn' - The Amazon Resource Name
-- (<https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html ARN>)
-- that is assigned to a GameLift matchmaking configuration resource and
-- uniquely identifies it. ARNs are unique across all Regions. Format is
-- @arn:aws:gamelift:\<region>::matchmakingconfiguration\/\<matchmaking configuration name>@.
-- In a GameLift configuration ARN, the resource ID matches the /Name/
-- value.
--
-- 'acceptanceRequired', 'matchmakingConfiguration_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. When this option is enabled, matchmaking
-- tickets use the status @REQUIRES_ACCEPTANCE@ to indicate when a
-- completed potential match is waiting for player acceptance.
--
-- 'gameSessionData', 'matchmakingConfiguration_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 when @FlexMatchMode@
-- is set to @STANDALONE@.
--
-- 'description', 'matchmakingConfiguration_description' - A descriptive label that is associated with matchmaking configuration.
--
-- 'additionalPlayerCount', 'matchmakingConfiguration_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 when
-- @FlexMatchMode@ is set to @STANDALONE@.
--
-- 'ruleSetArn', 'matchmakingConfiguration_ruleSetArn' - The Amazon Resource Name
-- (<https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html ARN>)
-- associated with the GameLift matchmaking rule set resource that this
-- configuration uses.
newMatchmakingConfiguration ::
  MatchmakingConfiguration
newMatchmakingConfiguration :: MatchmakingConfiguration
newMatchmakingConfiguration =
  MatchmakingConfiguration' :: Maybe POSIX
-> Maybe BackfillMode
-> Maybe [GameProperty]
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> Maybe FlexMatchMode
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> MatchmakingConfiguration
MatchmakingConfiguration'
    { $sel:creationTime:MatchmakingConfiguration' :: Maybe POSIX
creationTime =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:backfillMode:MatchmakingConfiguration' :: Maybe BackfillMode
backfillMode = Maybe BackfillMode
forall a. Maybe a
Prelude.Nothing,
      $sel:gameProperties:MatchmakingConfiguration' :: Maybe [GameProperty]
gameProperties = Maybe [GameProperty]
forall a. Maybe a
Prelude.Nothing,
      $sel:ruleSetName:MatchmakingConfiguration' :: Maybe Text
ruleSetName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:acceptanceTimeoutSeconds:MatchmakingConfiguration' :: Maybe Natural
acceptanceTimeoutSeconds = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:requestTimeoutSeconds:MatchmakingConfiguration' :: Maybe Natural
requestTimeoutSeconds = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:notificationTarget:MatchmakingConfiguration' :: Maybe Text
notificationTarget = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:flexMatchMode:MatchmakingConfiguration' :: Maybe FlexMatchMode
flexMatchMode = Maybe FlexMatchMode
forall a. Maybe a
Prelude.Nothing,
      $sel:gameSessionQueueArns:MatchmakingConfiguration' :: Maybe [Text]
gameSessionQueueArns = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:name:MatchmakingConfiguration' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:customEventData:MatchmakingConfiguration' :: Maybe Text
customEventData = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:configurationArn:MatchmakingConfiguration' :: Maybe Text
configurationArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:acceptanceRequired:MatchmakingConfiguration' :: Maybe Bool
acceptanceRequired = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:gameSessionData:MatchmakingConfiguration' :: Maybe Text
gameSessionData = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:MatchmakingConfiguration' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:additionalPlayerCount:MatchmakingConfiguration' :: Maybe Natural
additionalPlayerCount = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:ruleSetArn:MatchmakingConfiguration' :: Maybe Text
ruleSetArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | A time stamp indicating when this data object was created. Format is a
-- number expressed in Unix time as milliseconds (for example
-- @\"1469498468.057\"@).
matchmakingConfiguration_creationTime :: Lens.Lens' MatchmakingConfiguration (Prelude.Maybe Prelude.UTCTime)
matchmakingConfiguration_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> MatchmakingConfiguration -> f MatchmakingConfiguration
matchmakingConfiguration_creationTime = (MatchmakingConfiguration -> Maybe POSIX)
-> (MatchmakingConfiguration
    -> Maybe POSIX -> MatchmakingConfiguration)
-> Lens
     MatchmakingConfiguration
     MatchmakingConfiguration
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MatchmakingConfiguration' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:MatchmakingConfiguration' :: MatchmakingConfiguration -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: MatchmakingConfiguration
s@MatchmakingConfiguration' {} Maybe POSIX
a -> MatchmakingConfiguration
s {$sel:creationTime:MatchmakingConfiguration' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: MatchmakingConfiguration) ((Maybe POSIX -> f (Maybe POSIX))
 -> MatchmakingConfiguration -> f MatchmakingConfiguration)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> MatchmakingConfiguration
-> f MatchmakingConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The method used to backfill game sessions created with this matchmaking
-- configuration. MANUAL indicates that the game makes backfill requests or
-- does not use the match backfill feature. AUTOMATIC indicates that
-- GameLift creates StartMatchBackfill requests 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@.
matchmakingConfiguration_backfillMode :: Lens.Lens' MatchmakingConfiguration (Prelude.Maybe BackfillMode)
matchmakingConfiguration_backfillMode :: (Maybe BackfillMode -> f (Maybe BackfillMode))
-> MatchmakingConfiguration -> f MatchmakingConfiguration
matchmakingConfiguration_backfillMode = (MatchmakingConfiguration -> Maybe BackfillMode)
-> (MatchmakingConfiguration
    -> Maybe BackfillMode -> MatchmakingConfiguration)
-> Lens
     MatchmakingConfiguration
     MatchmakingConfiguration
     (Maybe BackfillMode)
     (Maybe BackfillMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MatchmakingConfiguration' {Maybe BackfillMode
backfillMode :: Maybe BackfillMode
$sel:backfillMode:MatchmakingConfiguration' :: MatchmakingConfiguration -> Maybe BackfillMode
backfillMode} -> Maybe BackfillMode
backfillMode) (\s :: MatchmakingConfiguration
s@MatchmakingConfiguration' {} Maybe BackfillMode
a -> MatchmakingConfiguration
s {$sel:backfillMode:MatchmakingConfiguration' :: Maybe BackfillMode
backfillMode = Maybe BackfillMode
a} :: MatchmakingConfiguration)

-- | 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 when @FlexMatchMode@
-- is set to @STANDALONE@.
matchmakingConfiguration_gameProperties :: Lens.Lens' MatchmakingConfiguration (Prelude.Maybe [GameProperty])
matchmakingConfiguration_gameProperties :: (Maybe [GameProperty] -> f (Maybe [GameProperty]))
-> MatchmakingConfiguration -> f MatchmakingConfiguration
matchmakingConfiguration_gameProperties = (MatchmakingConfiguration -> Maybe [GameProperty])
-> (MatchmakingConfiguration
    -> Maybe [GameProperty] -> MatchmakingConfiguration)
-> Lens
     MatchmakingConfiguration
     MatchmakingConfiguration
     (Maybe [GameProperty])
     (Maybe [GameProperty])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MatchmakingConfiguration' {Maybe [GameProperty]
gameProperties :: Maybe [GameProperty]
$sel:gameProperties:MatchmakingConfiguration' :: MatchmakingConfiguration -> Maybe [GameProperty]
gameProperties} -> Maybe [GameProperty]
gameProperties) (\s :: MatchmakingConfiguration
s@MatchmakingConfiguration' {} Maybe [GameProperty]
a -> MatchmakingConfiguration
s {$sel:gameProperties:MatchmakingConfiguration' :: Maybe [GameProperty]
gameProperties = Maybe [GameProperty]
a} :: MatchmakingConfiguration) ((Maybe [GameProperty] -> f (Maybe [GameProperty]))
 -> MatchmakingConfiguration -> f MatchmakingConfiguration)
-> ((Maybe [GameProperty] -> f (Maybe [GameProperty]))
    -> Maybe [GameProperty] -> f (Maybe [GameProperty]))
-> (Maybe [GameProperty] -> f (Maybe [GameProperty]))
-> MatchmakingConfiguration
-> f MatchmakingConfiguration
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. A matchmaking configuration can only use rule sets that
-- are defined in the same Region.
matchmakingConfiguration_ruleSetName :: Lens.Lens' MatchmakingConfiguration (Prelude.Maybe Prelude.Text)
matchmakingConfiguration_ruleSetName :: (Maybe Text -> f (Maybe Text))
-> MatchmakingConfiguration -> f MatchmakingConfiguration
matchmakingConfiguration_ruleSetName = (MatchmakingConfiguration -> Maybe Text)
-> (MatchmakingConfiguration
    -> Maybe Text -> MatchmakingConfiguration)
-> Lens
     MatchmakingConfiguration
     MatchmakingConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MatchmakingConfiguration' {Maybe Text
ruleSetName :: Maybe Text
$sel:ruleSetName:MatchmakingConfiguration' :: MatchmakingConfiguration -> Maybe Text
ruleSetName} -> Maybe Text
ruleSetName) (\s :: MatchmakingConfiguration
s@MatchmakingConfiguration' {} Maybe Text
a -> MatchmakingConfiguration
s {$sel:ruleSetName:MatchmakingConfiguration' :: Maybe Text
ruleSetName = Maybe Text
a} :: MatchmakingConfiguration)

-- | The length of time (in seconds) to wait for players to accept a proposed
-- match, if acceptance is required. If any player rejects the match or
-- fails to accept before the timeout, the ticket continues to look for an
-- acceptable match.
matchmakingConfiguration_acceptanceTimeoutSeconds :: Lens.Lens' MatchmakingConfiguration (Prelude.Maybe Prelude.Natural)
matchmakingConfiguration_acceptanceTimeoutSeconds :: (Maybe Natural -> f (Maybe Natural))
-> MatchmakingConfiguration -> f MatchmakingConfiguration
matchmakingConfiguration_acceptanceTimeoutSeconds = (MatchmakingConfiguration -> Maybe Natural)
-> (MatchmakingConfiguration
    -> Maybe Natural -> MatchmakingConfiguration)
-> Lens
     MatchmakingConfiguration
     MatchmakingConfiguration
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MatchmakingConfiguration' {Maybe Natural
acceptanceTimeoutSeconds :: Maybe Natural
$sel:acceptanceTimeoutSeconds:MatchmakingConfiguration' :: MatchmakingConfiguration -> Maybe Natural
acceptanceTimeoutSeconds} -> Maybe Natural
acceptanceTimeoutSeconds) (\s :: MatchmakingConfiguration
s@MatchmakingConfiguration' {} Maybe Natural
a -> MatchmakingConfiguration
s {$sel:acceptanceTimeoutSeconds:MatchmakingConfiguration' :: Maybe Natural
acceptanceTimeoutSeconds = Maybe Natural
a} :: MatchmakingConfiguration)

-- | 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.
matchmakingConfiguration_requestTimeoutSeconds :: Lens.Lens' MatchmakingConfiguration (Prelude.Maybe Prelude.Natural)
matchmakingConfiguration_requestTimeoutSeconds :: (Maybe Natural -> f (Maybe Natural))
-> MatchmakingConfiguration -> f MatchmakingConfiguration
matchmakingConfiguration_requestTimeoutSeconds = (MatchmakingConfiguration -> Maybe Natural)
-> (MatchmakingConfiguration
    -> Maybe Natural -> MatchmakingConfiguration)
-> Lens
     MatchmakingConfiguration
     MatchmakingConfiguration
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MatchmakingConfiguration' {Maybe Natural
requestTimeoutSeconds :: Maybe Natural
$sel:requestTimeoutSeconds:MatchmakingConfiguration' :: MatchmakingConfiguration -> Maybe Natural
requestTimeoutSeconds} -> Maybe Natural
requestTimeoutSeconds) (\s :: MatchmakingConfiguration
s@MatchmakingConfiguration' {} Maybe Natural
a -> MatchmakingConfiguration
s {$sel:requestTimeoutSeconds:MatchmakingConfiguration' :: Maybe Natural
requestTimeoutSeconds = Maybe Natural
a} :: MatchmakingConfiguration)

-- | An SNS topic ARN that is set up to receive matchmaking notifications.
matchmakingConfiguration_notificationTarget :: Lens.Lens' MatchmakingConfiguration (Prelude.Maybe Prelude.Text)
matchmakingConfiguration_notificationTarget :: (Maybe Text -> f (Maybe Text))
-> MatchmakingConfiguration -> f MatchmakingConfiguration
matchmakingConfiguration_notificationTarget = (MatchmakingConfiguration -> Maybe Text)
-> (MatchmakingConfiguration
    -> Maybe Text -> MatchmakingConfiguration)
-> Lens
     MatchmakingConfiguration
     MatchmakingConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MatchmakingConfiguration' {Maybe Text
notificationTarget :: Maybe Text
$sel:notificationTarget:MatchmakingConfiguration' :: MatchmakingConfiguration -> Maybe Text
notificationTarget} -> Maybe Text
notificationTarget) (\s :: MatchmakingConfiguration
s@MatchmakingConfiguration' {} Maybe Text
a -> MatchmakingConfiguration
s {$sel:notificationTarget:MatchmakingConfiguration' :: Maybe Text
notificationTarget = Maybe Text
a} :: MatchmakingConfiguration)

-- | 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.
matchmakingConfiguration_flexMatchMode :: Lens.Lens' MatchmakingConfiguration (Prelude.Maybe FlexMatchMode)
matchmakingConfiguration_flexMatchMode :: (Maybe FlexMatchMode -> f (Maybe FlexMatchMode))
-> MatchmakingConfiguration -> f MatchmakingConfiguration
matchmakingConfiguration_flexMatchMode = (MatchmakingConfiguration -> Maybe FlexMatchMode)
-> (MatchmakingConfiguration
    -> Maybe FlexMatchMode -> MatchmakingConfiguration)
-> Lens
     MatchmakingConfiguration
     MatchmakingConfiguration
     (Maybe FlexMatchMode)
     (Maybe FlexMatchMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MatchmakingConfiguration' {Maybe FlexMatchMode
flexMatchMode :: Maybe FlexMatchMode
$sel:flexMatchMode:MatchmakingConfiguration' :: MatchmakingConfiguration -> Maybe FlexMatchMode
flexMatchMode} -> Maybe FlexMatchMode
flexMatchMode) (\s :: MatchmakingConfiguration
s@MatchmakingConfiguration' {} Maybe FlexMatchMode
a -> MatchmakingConfiguration
s {$sel:flexMatchMode:MatchmakingConfiguration' :: Maybe FlexMatchMode
flexMatchMode = Maybe FlexMatchMode
a} :: MatchmakingConfiguration)

-- | 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. This property is not set when @FlexMatchMode@
-- is set to @STANDALONE@.
matchmakingConfiguration_gameSessionQueueArns :: Lens.Lens' MatchmakingConfiguration (Prelude.Maybe [Prelude.Text])
matchmakingConfiguration_gameSessionQueueArns :: (Maybe [Text] -> f (Maybe [Text]))
-> MatchmakingConfiguration -> f MatchmakingConfiguration
matchmakingConfiguration_gameSessionQueueArns = (MatchmakingConfiguration -> Maybe [Text])
-> (MatchmakingConfiguration
    -> Maybe [Text] -> MatchmakingConfiguration)
-> Lens
     MatchmakingConfiguration
     MatchmakingConfiguration
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MatchmakingConfiguration' {Maybe [Text]
gameSessionQueueArns :: Maybe [Text]
$sel:gameSessionQueueArns:MatchmakingConfiguration' :: MatchmakingConfiguration -> Maybe [Text]
gameSessionQueueArns} -> Maybe [Text]
gameSessionQueueArns) (\s :: MatchmakingConfiguration
s@MatchmakingConfiguration' {} Maybe [Text]
a -> MatchmakingConfiguration
s {$sel:gameSessionQueueArns:MatchmakingConfiguration' :: Maybe [Text]
gameSessionQueueArns = Maybe [Text]
a} :: MatchmakingConfiguration) ((Maybe [Text] -> f (Maybe [Text]))
 -> MatchmakingConfiguration -> f MatchmakingConfiguration)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> MatchmakingConfiguration
-> f MatchmakingConfiguration
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

-- | A unique identifier for the matchmaking configuration. This name is used
-- to identify the configuration associated with a matchmaking request or
-- ticket.
matchmakingConfiguration_name :: Lens.Lens' MatchmakingConfiguration (Prelude.Maybe Prelude.Text)
matchmakingConfiguration_name :: (Maybe Text -> f (Maybe Text))
-> MatchmakingConfiguration -> f MatchmakingConfiguration
matchmakingConfiguration_name = (MatchmakingConfiguration -> Maybe Text)
-> (MatchmakingConfiguration
    -> Maybe Text -> MatchmakingConfiguration)
-> Lens
     MatchmakingConfiguration
     MatchmakingConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MatchmakingConfiguration' {Maybe Text
name :: Maybe Text
$sel:name:MatchmakingConfiguration' :: MatchmakingConfiguration -> Maybe Text
name} -> Maybe Text
name) (\s :: MatchmakingConfiguration
s@MatchmakingConfiguration' {} Maybe Text
a -> MatchmakingConfiguration
s {$sel:name:MatchmakingConfiguration' :: Maybe Text
name = Maybe Text
a} :: MatchmakingConfiguration)

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

-- | The Amazon Resource Name
-- (<https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html ARN>)
-- that is assigned to a GameLift matchmaking configuration resource and
-- uniquely identifies it. ARNs are unique across all Regions. Format is
-- @arn:aws:gamelift:\<region>::matchmakingconfiguration\/\<matchmaking configuration name>@.
-- In a GameLift configuration ARN, the resource ID matches the /Name/
-- value.
matchmakingConfiguration_configurationArn :: Lens.Lens' MatchmakingConfiguration (Prelude.Maybe Prelude.Text)
matchmakingConfiguration_configurationArn :: (Maybe Text -> f (Maybe Text))
-> MatchmakingConfiguration -> f MatchmakingConfiguration
matchmakingConfiguration_configurationArn = (MatchmakingConfiguration -> Maybe Text)
-> (MatchmakingConfiguration
    -> Maybe Text -> MatchmakingConfiguration)
-> Lens
     MatchmakingConfiguration
     MatchmakingConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MatchmakingConfiguration' {Maybe Text
configurationArn :: Maybe Text
$sel:configurationArn:MatchmakingConfiguration' :: MatchmakingConfiguration -> Maybe Text
configurationArn} -> Maybe Text
configurationArn) (\s :: MatchmakingConfiguration
s@MatchmakingConfiguration' {} Maybe Text
a -> MatchmakingConfiguration
s {$sel:configurationArn:MatchmakingConfiguration' :: Maybe Text
configurationArn = Maybe Text
a} :: MatchmakingConfiguration)

-- | 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. When this option is enabled, matchmaking
-- tickets use the status @REQUIRES_ACCEPTANCE@ to indicate when a
-- completed potential match is waiting for player acceptance.
matchmakingConfiguration_acceptanceRequired :: Lens.Lens' MatchmakingConfiguration (Prelude.Maybe Prelude.Bool)
matchmakingConfiguration_acceptanceRequired :: (Maybe Bool -> f (Maybe Bool))
-> MatchmakingConfiguration -> f MatchmakingConfiguration
matchmakingConfiguration_acceptanceRequired = (MatchmakingConfiguration -> Maybe Bool)
-> (MatchmakingConfiguration
    -> Maybe Bool -> MatchmakingConfiguration)
-> Lens
     MatchmakingConfiguration
     MatchmakingConfiguration
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MatchmakingConfiguration' {Maybe Bool
acceptanceRequired :: Maybe Bool
$sel:acceptanceRequired:MatchmakingConfiguration' :: MatchmakingConfiguration -> Maybe Bool
acceptanceRequired} -> Maybe Bool
acceptanceRequired) (\s :: MatchmakingConfiguration
s@MatchmakingConfiguration' {} Maybe Bool
a -> MatchmakingConfiguration
s {$sel:acceptanceRequired:MatchmakingConfiguration' :: Maybe Bool
acceptanceRequired = Maybe Bool
a} :: MatchmakingConfiguration)

-- | 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 when @FlexMatchMode@
-- is set to @STANDALONE@.
matchmakingConfiguration_gameSessionData :: Lens.Lens' MatchmakingConfiguration (Prelude.Maybe Prelude.Text)
matchmakingConfiguration_gameSessionData :: (Maybe Text -> f (Maybe Text))
-> MatchmakingConfiguration -> f MatchmakingConfiguration
matchmakingConfiguration_gameSessionData = (MatchmakingConfiguration -> Maybe Text)
-> (MatchmakingConfiguration
    -> Maybe Text -> MatchmakingConfiguration)
-> Lens
     MatchmakingConfiguration
     MatchmakingConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MatchmakingConfiguration' {Maybe Text
gameSessionData :: Maybe Text
$sel:gameSessionData:MatchmakingConfiguration' :: MatchmakingConfiguration -> Maybe Text
gameSessionData} -> Maybe Text
gameSessionData) (\s :: MatchmakingConfiguration
s@MatchmakingConfiguration' {} Maybe Text
a -> MatchmakingConfiguration
s {$sel:gameSessionData:MatchmakingConfiguration' :: Maybe Text
gameSessionData = Maybe Text
a} :: MatchmakingConfiguration)

-- | A descriptive label that is associated with matchmaking configuration.
matchmakingConfiguration_description :: Lens.Lens' MatchmakingConfiguration (Prelude.Maybe Prelude.Text)
matchmakingConfiguration_description :: (Maybe Text -> f (Maybe Text))
-> MatchmakingConfiguration -> f MatchmakingConfiguration
matchmakingConfiguration_description = (MatchmakingConfiguration -> Maybe Text)
-> (MatchmakingConfiguration
    -> Maybe Text -> MatchmakingConfiguration)
-> Lens
     MatchmakingConfiguration
     MatchmakingConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MatchmakingConfiguration' {Maybe Text
description :: Maybe Text
$sel:description:MatchmakingConfiguration' :: MatchmakingConfiguration -> Maybe Text
description} -> Maybe Text
description) (\s :: MatchmakingConfiguration
s@MatchmakingConfiguration' {} Maybe Text
a -> MatchmakingConfiguration
s {$sel:description:MatchmakingConfiguration' :: Maybe Text
description = Maybe Text
a} :: MatchmakingConfiguration)

-- | 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 when
-- @FlexMatchMode@ is set to @STANDALONE@.
matchmakingConfiguration_additionalPlayerCount :: Lens.Lens' MatchmakingConfiguration (Prelude.Maybe Prelude.Natural)
matchmakingConfiguration_additionalPlayerCount :: (Maybe Natural -> f (Maybe Natural))
-> MatchmakingConfiguration -> f MatchmakingConfiguration
matchmakingConfiguration_additionalPlayerCount = (MatchmakingConfiguration -> Maybe Natural)
-> (MatchmakingConfiguration
    -> Maybe Natural -> MatchmakingConfiguration)
-> Lens
     MatchmakingConfiguration
     MatchmakingConfiguration
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MatchmakingConfiguration' {Maybe Natural
additionalPlayerCount :: Maybe Natural
$sel:additionalPlayerCount:MatchmakingConfiguration' :: MatchmakingConfiguration -> Maybe Natural
additionalPlayerCount} -> Maybe Natural
additionalPlayerCount) (\s :: MatchmakingConfiguration
s@MatchmakingConfiguration' {} Maybe Natural
a -> MatchmakingConfiguration
s {$sel:additionalPlayerCount:MatchmakingConfiguration' :: Maybe Natural
additionalPlayerCount = Maybe Natural
a} :: MatchmakingConfiguration)

-- | The Amazon Resource Name
-- (<https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html ARN>)
-- associated with the GameLift matchmaking rule set resource that this
-- configuration uses.
matchmakingConfiguration_ruleSetArn :: Lens.Lens' MatchmakingConfiguration (Prelude.Maybe Prelude.Text)
matchmakingConfiguration_ruleSetArn :: (Maybe Text -> f (Maybe Text))
-> MatchmakingConfiguration -> f MatchmakingConfiguration
matchmakingConfiguration_ruleSetArn = (MatchmakingConfiguration -> Maybe Text)
-> (MatchmakingConfiguration
    -> Maybe Text -> MatchmakingConfiguration)
-> Lens
     MatchmakingConfiguration
     MatchmakingConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MatchmakingConfiguration' {Maybe Text
ruleSetArn :: Maybe Text
$sel:ruleSetArn:MatchmakingConfiguration' :: MatchmakingConfiguration -> Maybe Text
ruleSetArn} -> Maybe Text
ruleSetArn) (\s :: MatchmakingConfiguration
s@MatchmakingConfiguration' {} Maybe Text
a -> MatchmakingConfiguration
s {$sel:ruleSetArn:MatchmakingConfiguration' :: Maybe Text
ruleSetArn = Maybe Text
a} :: MatchmakingConfiguration)

instance Core.FromJSON MatchmakingConfiguration where
  parseJSON :: Value -> Parser MatchmakingConfiguration
parseJSON =
    String
-> (Object -> Parser MatchmakingConfiguration)
-> Value
-> Parser MatchmakingConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"MatchmakingConfiguration"
      ( \Object
x ->
          Maybe POSIX
-> Maybe BackfillMode
-> Maybe [GameProperty]
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> Maybe FlexMatchMode
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> MatchmakingConfiguration
MatchmakingConfiguration'
            (Maybe POSIX
 -> Maybe BackfillMode
 -> Maybe [GameProperty]
 -> Maybe Text
 -> Maybe Natural
 -> Maybe Natural
 -> Maybe Text
 -> Maybe FlexMatchMode
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Maybe Natural
 -> Maybe Text
 -> MatchmakingConfiguration)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe BackfillMode
      -> Maybe [GameProperty]
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Text
      -> Maybe FlexMatchMode
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> MatchmakingConfiguration)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreationTime")
            Parser
  (Maybe BackfillMode
   -> Maybe [GameProperty]
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Text
   -> Maybe FlexMatchMode
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> MatchmakingConfiguration)
-> Parser (Maybe BackfillMode)
-> Parser
     (Maybe [GameProperty]
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Text
      -> Maybe FlexMatchMode
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> MatchmakingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe BackfillMode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BackfillMode")
            Parser
  (Maybe [GameProperty]
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Text
   -> Maybe FlexMatchMode
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> MatchmakingConfiguration)
-> Parser (Maybe [GameProperty])
-> Parser
     (Maybe Text
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Text
      -> Maybe FlexMatchMode
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> MatchmakingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [GameProperty]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"GameProperties" Parser (Maybe (Maybe [GameProperty]))
-> Maybe [GameProperty] -> Parser (Maybe [GameProperty])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [GameProperty]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Text
   -> Maybe FlexMatchMode
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> MatchmakingConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Natural
      -> Maybe Natural
      -> Maybe Text
      -> Maybe FlexMatchMode
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> MatchmakingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RuleSetName")
            Parser
  (Maybe Natural
   -> Maybe Natural
   -> Maybe Text
   -> Maybe FlexMatchMode
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> MatchmakingConfiguration)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Natural
      -> Maybe Text
      -> Maybe FlexMatchMode
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> MatchmakingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AcceptanceTimeoutSeconds")
            Parser
  (Maybe Natural
   -> Maybe Text
   -> Maybe FlexMatchMode
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> MatchmakingConfiguration)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Text
      -> Maybe FlexMatchMode
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> MatchmakingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RequestTimeoutSeconds")
            Parser
  (Maybe Text
   -> Maybe FlexMatchMode
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> MatchmakingConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe FlexMatchMode
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> MatchmakingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NotificationTarget")
            Parser
  (Maybe FlexMatchMode
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> MatchmakingConfiguration)
-> Parser (Maybe FlexMatchMode)
-> Parser
     (Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> MatchmakingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe FlexMatchMode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FlexMatchMode")
            Parser
  (Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> MatchmakingConfiguration)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> MatchmakingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"GameSessionQueueArns"
                            Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> MatchmakingConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> MatchmakingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Name")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> MatchmakingConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> MatchmakingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CustomEventData")
            Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> MatchmakingConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> MatchmakingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ConfigurationArn")
            Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> MatchmakingConfiguration)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> MatchmakingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AcceptanceRequired")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> MatchmakingConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Natural -> Maybe Text -> MatchmakingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"GameSessionData")
            Parser
  (Maybe Text
   -> Maybe Natural -> Maybe Text -> MatchmakingConfiguration)
-> Parser (Maybe Text)
-> Parser (Maybe Natural -> Maybe Text -> MatchmakingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Description")
            Parser (Maybe Natural -> Maybe Text -> MatchmakingConfiguration)
-> Parser (Maybe Natural)
-> Parser (Maybe Text -> MatchmakingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AdditionalPlayerCount")
            Parser (Maybe Text -> MatchmakingConfiguration)
-> Parser (Maybe Text) -> Parser MatchmakingConfiguration
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RuleSetArn")
      )

instance Prelude.Hashable MatchmakingConfiguration

instance Prelude.NFData MatchmakingConfiguration