{-# 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.StartMatchmaking
-- 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)
--
-- Uses FlexMatch to create a game match for a group of players based on
-- custom matchmaking rules. With games that use GameLift managed hosting,
-- this operation also triggers GameLift to find hosting resources and
-- start a new game session for the new match. Each matchmaking request
-- includes information on one or more players and specifies the FlexMatch
-- matchmaker to use. When a request is for multiple players, FlexMatch
-- attempts to build a match that includes all players in the request,
-- placing them in the same team and finding additional players as needed
-- to fill the match.
--
-- To start matchmaking, provide a unique ticket ID, specify a matchmaking
-- configuration, and include the players to be matched. You must also
-- include any player attributes that are required by the matchmaking
-- configuration\'s rule set. If successful, a matchmaking ticket is
-- returned with status set to @QUEUED@.
--
-- Track matchmaking events to respond as needed and acquire game session
-- connection information for successfully completed matches. Ticket status
-- updates are tracked using event notification through Amazon Simple
-- Notification Service (SNS), which is defined in the matchmaking
-- configuration.
--
-- __Learn more__
--
-- <https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-client.html Add FlexMatch to a game client>
--
-- <https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-notification.html Set Up FlexMatch event notification>
--
-- <https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/gamelift-match.html How GameLift FlexMatch works>
--
-- __Related actions__
--
-- StartMatchmaking | DescribeMatchmaking | StopMatchmaking | AcceptMatch |
-- StartMatchBackfill |
-- <https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-awssdk.html#reference-awssdk-resources-fleets All APIs by task>
module Amazonka.GameLift.StartMatchmaking
  ( -- * Creating a Request
    StartMatchmaking (..),
    newStartMatchmaking,

    -- * Request Lenses
    startMatchmaking_ticketId,
    startMatchmaking_configurationName,
    startMatchmaking_players,

    -- * Destructuring the Response
    StartMatchmakingResponse (..),
    newStartMatchmakingResponse,

    -- * Response Lenses
    startMatchmakingResponse_matchmakingTicket,
    startMatchmakingResponse_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:/ 'newStartMatchmaking' smart constructor.
data StartMatchmaking = StartMatchmaking'
  { -- | A unique identifier for a matchmaking ticket. If no ticket ID is
    -- specified here, Amazon GameLift will generate one in the form of a UUID.
    -- Use this identifier to track the matchmaking ticket status and retrieve
    -- match results.
    StartMatchmaking -> Maybe Text
ticketId :: Prelude.Maybe Prelude.Text,
    -- | Name of the matchmaking configuration to use for this request.
    -- Matchmaking configurations must exist in the same Region as this
    -- request. You can use either the configuration name or ARN value.
    StartMatchmaking -> Text
configurationName :: Prelude.Text,
    -- | Information on each player to be matched. This information must include
    -- a player ID, and may contain player attributes and latency data to be
    -- used in the matchmaking process. After a successful match, @Player@
    -- objects contain the name of the team the player is assigned to.
    StartMatchmaking -> [Player]
players :: [Player]
  }
  deriving (StartMatchmaking -> StartMatchmaking -> Bool
(StartMatchmaking -> StartMatchmaking -> Bool)
-> (StartMatchmaking -> StartMatchmaking -> Bool)
-> Eq StartMatchmaking
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartMatchmaking -> StartMatchmaking -> Bool
$c/= :: StartMatchmaking -> StartMatchmaking -> Bool
== :: StartMatchmaking -> StartMatchmaking -> Bool
$c== :: StartMatchmaking -> StartMatchmaking -> Bool
Prelude.Eq, ReadPrec [StartMatchmaking]
ReadPrec StartMatchmaking
Int -> ReadS StartMatchmaking
ReadS [StartMatchmaking]
(Int -> ReadS StartMatchmaking)
-> ReadS [StartMatchmaking]
-> ReadPrec StartMatchmaking
-> ReadPrec [StartMatchmaking]
-> Read StartMatchmaking
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartMatchmaking]
$creadListPrec :: ReadPrec [StartMatchmaking]
readPrec :: ReadPrec StartMatchmaking
$creadPrec :: ReadPrec StartMatchmaking
readList :: ReadS [StartMatchmaking]
$creadList :: ReadS [StartMatchmaking]
readsPrec :: Int -> ReadS StartMatchmaking
$creadsPrec :: Int -> ReadS StartMatchmaking
Prelude.Read, Int -> StartMatchmaking -> ShowS
[StartMatchmaking] -> ShowS
StartMatchmaking -> String
(Int -> StartMatchmaking -> ShowS)
-> (StartMatchmaking -> String)
-> ([StartMatchmaking] -> ShowS)
-> Show StartMatchmaking
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartMatchmaking] -> ShowS
$cshowList :: [StartMatchmaking] -> ShowS
show :: StartMatchmaking -> String
$cshow :: StartMatchmaking -> String
showsPrec :: Int -> StartMatchmaking -> ShowS
$cshowsPrec :: Int -> StartMatchmaking -> ShowS
Prelude.Show, (forall x. StartMatchmaking -> Rep StartMatchmaking x)
-> (forall x. Rep StartMatchmaking x -> StartMatchmaking)
-> Generic StartMatchmaking
forall x. Rep StartMatchmaking x -> StartMatchmaking
forall x. StartMatchmaking -> Rep StartMatchmaking x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StartMatchmaking x -> StartMatchmaking
$cfrom :: forall x. StartMatchmaking -> Rep StartMatchmaking x
Prelude.Generic)

-- |
-- Create a value of 'StartMatchmaking' 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:
--
-- 'ticketId', 'startMatchmaking_ticketId' - A unique identifier for a matchmaking ticket. If no ticket ID is
-- specified here, Amazon GameLift will generate one in the form of a UUID.
-- Use this identifier to track the matchmaking ticket status and retrieve
-- match results.
--
-- 'configurationName', 'startMatchmaking_configurationName' - Name of the matchmaking configuration to use for this request.
-- Matchmaking configurations must exist in the same Region as this
-- request. You can use either the configuration name or ARN value.
--
-- 'players', 'startMatchmaking_players' - Information on each player to be matched. This information must include
-- a player ID, and may contain player attributes and latency data to be
-- used in the matchmaking process. After a successful match, @Player@
-- objects contain the name of the team the player is assigned to.
newStartMatchmaking ::
  -- | 'configurationName'
  Prelude.Text ->
  StartMatchmaking
newStartMatchmaking :: Text -> StartMatchmaking
newStartMatchmaking Text
pConfigurationName_ =
  StartMatchmaking' :: Maybe Text -> Text -> [Player] -> StartMatchmaking
StartMatchmaking'
    { $sel:ticketId:StartMatchmaking' :: Maybe Text
ticketId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:configurationName:StartMatchmaking' :: Text
configurationName = Text
pConfigurationName_,
      $sel:players:StartMatchmaking' :: [Player]
players = [Player]
forall a. Monoid a => a
Prelude.mempty
    }

-- | A unique identifier for a matchmaking ticket. If no ticket ID is
-- specified here, Amazon GameLift will generate one in the form of a UUID.
-- Use this identifier to track the matchmaking ticket status and retrieve
-- match results.
startMatchmaking_ticketId :: Lens.Lens' StartMatchmaking (Prelude.Maybe Prelude.Text)
startMatchmaking_ticketId :: (Maybe Text -> f (Maybe Text))
-> StartMatchmaking -> f StartMatchmaking
startMatchmaking_ticketId = (StartMatchmaking -> Maybe Text)
-> (StartMatchmaking -> Maybe Text -> StartMatchmaking)
-> Lens StartMatchmaking StartMatchmaking (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartMatchmaking' {Maybe Text
ticketId :: Maybe Text
$sel:ticketId:StartMatchmaking' :: StartMatchmaking -> Maybe Text
ticketId} -> Maybe Text
ticketId) (\s :: StartMatchmaking
s@StartMatchmaking' {} Maybe Text
a -> StartMatchmaking
s {$sel:ticketId:StartMatchmaking' :: Maybe Text
ticketId = Maybe Text
a} :: StartMatchmaking)

-- | Name of the matchmaking configuration to use for this request.
-- Matchmaking configurations must exist in the same Region as this
-- request. You can use either the configuration name or ARN value.
startMatchmaking_configurationName :: Lens.Lens' StartMatchmaking Prelude.Text
startMatchmaking_configurationName :: (Text -> f Text) -> StartMatchmaking -> f StartMatchmaking
startMatchmaking_configurationName = (StartMatchmaking -> Text)
-> (StartMatchmaking -> Text -> StartMatchmaking)
-> Lens StartMatchmaking StartMatchmaking Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartMatchmaking' {Text
configurationName :: Text
$sel:configurationName:StartMatchmaking' :: StartMatchmaking -> Text
configurationName} -> Text
configurationName) (\s :: StartMatchmaking
s@StartMatchmaking' {} Text
a -> StartMatchmaking
s {$sel:configurationName:StartMatchmaking' :: Text
configurationName = Text
a} :: StartMatchmaking)

-- | Information on each player to be matched. This information must include
-- a player ID, and may contain player attributes and latency data to be
-- used in the matchmaking process. After a successful match, @Player@
-- objects contain the name of the team the player is assigned to.
startMatchmaking_players :: Lens.Lens' StartMatchmaking [Player]
startMatchmaking_players :: ([Player] -> f [Player]) -> StartMatchmaking -> f StartMatchmaking
startMatchmaking_players = (StartMatchmaking -> [Player])
-> (StartMatchmaking -> [Player] -> StartMatchmaking)
-> Lens StartMatchmaking StartMatchmaking [Player] [Player]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartMatchmaking' {[Player]
players :: [Player]
$sel:players:StartMatchmaking' :: StartMatchmaking -> [Player]
players} -> [Player]
players) (\s :: StartMatchmaking
s@StartMatchmaking' {} [Player]
a -> StartMatchmaking
s {$sel:players:StartMatchmaking' :: [Player]
players = [Player]
a} :: StartMatchmaking) (([Player] -> f [Player])
 -> StartMatchmaking -> f StartMatchmaking)
-> (([Player] -> f [Player]) -> [Player] -> f [Player])
-> ([Player] -> f [Player])
-> StartMatchmaking
-> f StartMatchmaking
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Player] -> f [Player]) -> [Player] -> f [Player]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSRequest StartMatchmaking where
  type
    AWSResponse StartMatchmaking =
      StartMatchmakingResponse
  request :: StartMatchmaking -> Request StartMatchmaking
request = Service -> StartMatchmaking -> Request StartMatchmaking
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy StartMatchmaking
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse StartMatchmaking)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse StartMatchmaking))
-> Logger
-> Service
-> Proxy StartMatchmaking
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse StartMatchmaking)))
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 MatchmakingTicket -> Int -> StartMatchmakingResponse
StartMatchmakingResponse'
            (Maybe MatchmakingTicket -> Int -> StartMatchmakingResponse)
-> Either String (Maybe MatchmakingTicket)
-> Either String (Int -> StartMatchmakingResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe MatchmakingTicket)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"MatchmakingTicket")
            Either String (Int -> StartMatchmakingResponse)
-> Either String Int -> Either String StartMatchmakingResponse
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 StartMatchmaking

instance Prelude.NFData StartMatchmaking

instance Core.ToHeaders StartMatchmaking where
  toHeaders :: StartMatchmaking -> ResponseHeaders
toHeaders =
    ResponseHeaders -> StartMatchmaking -> 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.StartMatchmaking" :: 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 StartMatchmaking where
  toJSON :: StartMatchmaking -> Value
toJSON StartMatchmaking' {[Player]
Maybe Text
Text
players :: [Player]
configurationName :: Text
ticketId :: Maybe Text
$sel:players:StartMatchmaking' :: StartMatchmaking -> [Player]
$sel:configurationName:StartMatchmaking' :: StartMatchmaking -> Text
$sel:ticketId:StartMatchmaking' :: StartMatchmaking -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"TicketId" 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
ticketId,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"ConfigurationName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
configurationName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Players" Text -> [Player] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Player]
players)
          ]
      )

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

instance Core.ToQuery StartMatchmaking where
  toQuery :: StartMatchmaking -> QueryString
toQuery = QueryString -> StartMatchmaking -> 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:/ 'newStartMatchmakingResponse' smart constructor.
data StartMatchmakingResponse = StartMatchmakingResponse'
  { -- | Ticket representing the matchmaking request. This object include the
    -- information included in the request, ticket status, and match results as
    -- generated during the matchmaking process.
    StartMatchmakingResponse -> Maybe MatchmakingTicket
matchmakingTicket :: Prelude.Maybe MatchmakingTicket,
    -- | The response's http status code.
    StartMatchmakingResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (StartMatchmakingResponse -> StartMatchmakingResponse -> Bool
(StartMatchmakingResponse -> StartMatchmakingResponse -> Bool)
-> (StartMatchmakingResponse -> StartMatchmakingResponse -> Bool)
-> Eq StartMatchmakingResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartMatchmakingResponse -> StartMatchmakingResponse -> Bool
$c/= :: StartMatchmakingResponse -> StartMatchmakingResponse -> Bool
== :: StartMatchmakingResponse -> StartMatchmakingResponse -> Bool
$c== :: StartMatchmakingResponse -> StartMatchmakingResponse -> Bool
Prelude.Eq, ReadPrec [StartMatchmakingResponse]
ReadPrec StartMatchmakingResponse
Int -> ReadS StartMatchmakingResponse
ReadS [StartMatchmakingResponse]
(Int -> ReadS StartMatchmakingResponse)
-> ReadS [StartMatchmakingResponse]
-> ReadPrec StartMatchmakingResponse
-> ReadPrec [StartMatchmakingResponse]
-> Read StartMatchmakingResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartMatchmakingResponse]
$creadListPrec :: ReadPrec [StartMatchmakingResponse]
readPrec :: ReadPrec StartMatchmakingResponse
$creadPrec :: ReadPrec StartMatchmakingResponse
readList :: ReadS [StartMatchmakingResponse]
$creadList :: ReadS [StartMatchmakingResponse]
readsPrec :: Int -> ReadS StartMatchmakingResponse
$creadsPrec :: Int -> ReadS StartMatchmakingResponse
Prelude.Read, Int -> StartMatchmakingResponse -> ShowS
[StartMatchmakingResponse] -> ShowS
StartMatchmakingResponse -> String
(Int -> StartMatchmakingResponse -> ShowS)
-> (StartMatchmakingResponse -> String)
-> ([StartMatchmakingResponse] -> ShowS)
-> Show StartMatchmakingResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartMatchmakingResponse] -> ShowS
$cshowList :: [StartMatchmakingResponse] -> ShowS
show :: StartMatchmakingResponse -> String
$cshow :: StartMatchmakingResponse -> String
showsPrec :: Int -> StartMatchmakingResponse -> ShowS
$cshowsPrec :: Int -> StartMatchmakingResponse -> ShowS
Prelude.Show, (forall x.
 StartMatchmakingResponse -> Rep StartMatchmakingResponse x)
-> (forall x.
    Rep StartMatchmakingResponse x -> StartMatchmakingResponse)
-> Generic StartMatchmakingResponse
forall x.
Rep StartMatchmakingResponse x -> StartMatchmakingResponse
forall x.
StartMatchmakingResponse -> Rep StartMatchmakingResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartMatchmakingResponse x -> StartMatchmakingResponse
$cfrom :: forall x.
StartMatchmakingResponse -> Rep StartMatchmakingResponse x
Prelude.Generic)

-- |
-- Create a value of 'StartMatchmakingResponse' 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:
--
-- 'matchmakingTicket', 'startMatchmakingResponse_matchmakingTicket' - Ticket representing the matchmaking request. This object include the
-- information included in the request, ticket status, and match results as
-- generated during the matchmaking process.
--
-- 'httpStatus', 'startMatchmakingResponse_httpStatus' - The response's http status code.
newStartMatchmakingResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  StartMatchmakingResponse
newStartMatchmakingResponse :: Int -> StartMatchmakingResponse
newStartMatchmakingResponse Int
pHttpStatus_ =
  StartMatchmakingResponse' :: Maybe MatchmakingTicket -> Int -> StartMatchmakingResponse
StartMatchmakingResponse'
    { $sel:matchmakingTicket:StartMatchmakingResponse' :: Maybe MatchmakingTicket
matchmakingTicket =
        Maybe MatchmakingTicket
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:StartMatchmakingResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Ticket representing the matchmaking request. This object include the
-- information included in the request, ticket status, and match results as
-- generated during the matchmaking process.
startMatchmakingResponse_matchmakingTicket :: Lens.Lens' StartMatchmakingResponse (Prelude.Maybe MatchmakingTicket)
startMatchmakingResponse_matchmakingTicket :: (Maybe MatchmakingTicket -> f (Maybe MatchmakingTicket))
-> StartMatchmakingResponse -> f StartMatchmakingResponse
startMatchmakingResponse_matchmakingTicket = (StartMatchmakingResponse -> Maybe MatchmakingTicket)
-> (StartMatchmakingResponse
    -> Maybe MatchmakingTicket -> StartMatchmakingResponse)
-> Lens
     StartMatchmakingResponse
     StartMatchmakingResponse
     (Maybe MatchmakingTicket)
     (Maybe MatchmakingTicket)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartMatchmakingResponse' {Maybe MatchmakingTicket
matchmakingTicket :: Maybe MatchmakingTicket
$sel:matchmakingTicket:StartMatchmakingResponse' :: StartMatchmakingResponse -> Maybe MatchmakingTicket
matchmakingTicket} -> Maybe MatchmakingTicket
matchmakingTicket) (\s :: StartMatchmakingResponse
s@StartMatchmakingResponse' {} Maybe MatchmakingTicket
a -> StartMatchmakingResponse
s {$sel:matchmakingTicket:StartMatchmakingResponse' :: Maybe MatchmakingTicket
matchmakingTicket = Maybe MatchmakingTicket
a} :: StartMatchmakingResponse)

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

instance Prelude.NFData StartMatchmakingResponse