{-# 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.CreateMatchmakingRuleSet
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a new rule set for FlexMatch matchmaking. A rule set describes
-- the type of match to create, such as the number and size of teams. It
-- also sets the parameters for acceptable player matches, such as minimum
-- skill level or character type.
--
-- To create a matchmaking rule set, provide unique rule set name and the
-- rule set body in JSON format. Rule sets must be defined in the same
-- Region as the matchmaking configuration they are used with.
--
-- Since matchmaking rule sets cannot be edited, it is a good idea to check
-- the rule set syntax using
-- <https://docs.aws.amazon.com/gamelift/latest/apireference/API_ValidateMatchmakingRuleSet.html ValidateMatchmakingRuleSet>
-- before creating a new rule set.
--
-- __Learn more__
--
-- -   <https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-rulesets.html Build a rule set>
--
-- -   <https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-configuration.html Design a matchmaker>
--
-- -   <https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-intro.html Matchmaking with FlexMatch>
module Amazonka.GameLift.CreateMatchmakingRuleSet
  ( -- * Creating a Request
    CreateMatchmakingRuleSet (..),
    newCreateMatchmakingRuleSet,

    -- * Request Lenses
    createMatchmakingRuleSet_tags,
    createMatchmakingRuleSet_name,
    createMatchmakingRuleSet_ruleSetBody,

    -- * Destructuring the Response
    CreateMatchmakingRuleSetResponse (..),
    newCreateMatchmakingRuleSetResponse,

    -- * Response Lenses
    createMatchmakingRuleSetResponse_httpStatus,
    createMatchmakingRuleSetResponse_ruleSet,
  )
where

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

-- | /See:/ 'newCreateMatchmakingRuleSet' smart constructor.
data CreateMatchmakingRuleSet = CreateMatchmakingRuleSet'
  { -- | A list of labels to assign to the new matchmaking rule set resource.
    -- Tags are developer-defined key-value pairs. Tagging Amazon Web Services
    -- resources are useful for resource management, access management and cost
    -- allocation. For more information, see
    -- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging Amazon Web Services Resources>
    -- in the /Amazon Web Services General Reference/.
    CreateMatchmakingRuleSet -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | A unique identifier for the matchmaking rule set. A matchmaking
    -- configuration identifies the rule set it uses by this name value. Note
    -- that the rule set name is different from the optional @name@ field in
    -- the rule set body.
    CreateMatchmakingRuleSet -> Text
name :: Prelude.Text,
    -- | A collection of matchmaking rules, formatted as a JSON string. Comments
    -- are not allowed in JSON, but most elements support a description field.
    CreateMatchmakingRuleSet -> Text
ruleSetBody :: Prelude.Text
  }
  deriving (CreateMatchmakingRuleSet -> CreateMatchmakingRuleSet -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateMatchmakingRuleSet -> CreateMatchmakingRuleSet -> Bool
$c/= :: CreateMatchmakingRuleSet -> CreateMatchmakingRuleSet -> Bool
== :: CreateMatchmakingRuleSet -> CreateMatchmakingRuleSet -> Bool
$c== :: CreateMatchmakingRuleSet -> CreateMatchmakingRuleSet -> Bool
Prelude.Eq, ReadPrec [CreateMatchmakingRuleSet]
ReadPrec CreateMatchmakingRuleSet
Int -> ReadS CreateMatchmakingRuleSet
ReadS [CreateMatchmakingRuleSet]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateMatchmakingRuleSet]
$creadListPrec :: ReadPrec [CreateMatchmakingRuleSet]
readPrec :: ReadPrec CreateMatchmakingRuleSet
$creadPrec :: ReadPrec CreateMatchmakingRuleSet
readList :: ReadS [CreateMatchmakingRuleSet]
$creadList :: ReadS [CreateMatchmakingRuleSet]
readsPrec :: Int -> ReadS CreateMatchmakingRuleSet
$creadsPrec :: Int -> ReadS CreateMatchmakingRuleSet
Prelude.Read, Int -> CreateMatchmakingRuleSet -> ShowS
[CreateMatchmakingRuleSet] -> ShowS
CreateMatchmakingRuleSet -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateMatchmakingRuleSet] -> ShowS
$cshowList :: [CreateMatchmakingRuleSet] -> ShowS
show :: CreateMatchmakingRuleSet -> String
$cshow :: CreateMatchmakingRuleSet -> String
showsPrec :: Int -> CreateMatchmakingRuleSet -> ShowS
$cshowsPrec :: Int -> CreateMatchmakingRuleSet -> ShowS
Prelude.Show, forall x.
Rep CreateMatchmakingRuleSet x -> CreateMatchmakingRuleSet
forall x.
CreateMatchmakingRuleSet -> Rep CreateMatchmakingRuleSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateMatchmakingRuleSet x -> CreateMatchmakingRuleSet
$cfrom :: forall x.
CreateMatchmakingRuleSet -> Rep CreateMatchmakingRuleSet x
Prelude.Generic)

-- |
-- Create a value of 'CreateMatchmakingRuleSet' 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:
--
-- 'tags', 'createMatchmakingRuleSet_tags' - A list of labels to assign to the new matchmaking rule set resource.
-- Tags are developer-defined key-value pairs. Tagging Amazon Web Services
-- resources are useful for resource management, access management and cost
-- allocation. For more information, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging Amazon Web Services Resources>
-- in the /Amazon Web Services General Reference/.
--
-- 'name', 'createMatchmakingRuleSet_name' - A unique identifier for the matchmaking rule set. A matchmaking
-- configuration identifies the rule set it uses by this name value. Note
-- that the rule set name is different from the optional @name@ field in
-- the rule set body.
--
-- 'ruleSetBody', 'createMatchmakingRuleSet_ruleSetBody' - A collection of matchmaking rules, formatted as a JSON string. Comments
-- are not allowed in JSON, but most elements support a description field.
newCreateMatchmakingRuleSet ::
  -- | 'name'
  Prelude.Text ->
  -- | 'ruleSetBody'
  Prelude.Text ->
  CreateMatchmakingRuleSet
newCreateMatchmakingRuleSet :: Text -> Text -> CreateMatchmakingRuleSet
newCreateMatchmakingRuleSet Text
pName_ Text
pRuleSetBody_ =
  CreateMatchmakingRuleSet'
    { $sel:tags:CreateMatchmakingRuleSet' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:name:CreateMatchmakingRuleSet' :: Text
name = Text
pName_,
      $sel:ruleSetBody:CreateMatchmakingRuleSet' :: Text
ruleSetBody = Text
pRuleSetBody_
    }

-- | A list of labels to assign to the new matchmaking rule set resource.
-- Tags are developer-defined key-value pairs. Tagging Amazon Web Services
-- resources are useful for resource management, access management and cost
-- allocation. For more information, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging Amazon Web Services Resources>
-- in the /Amazon Web Services General Reference/.
createMatchmakingRuleSet_tags :: Lens.Lens' CreateMatchmakingRuleSet (Prelude.Maybe [Tag])
createMatchmakingRuleSet_tags :: Lens' CreateMatchmakingRuleSet (Maybe [Tag])
createMatchmakingRuleSet_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMatchmakingRuleSet' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateMatchmakingRuleSet' :: CreateMatchmakingRuleSet -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateMatchmakingRuleSet
s@CreateMatchmakingRuleSet' {} Maybe [Tag]
a -> CreateMatchmakingRuleSet
s {$sel:tags:CreateMatchmakingRuleSet' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateMatchmakingRuleSet) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A unique identifier for the matchmaking rule set. A matchmaking
-- configuration identifies the rule set it uses by this name value. Note
-- that the rule set name is different from the optional @name@ field in
-- the rule set body.
createMatchmakingRuleSet_name :: Lens.Lens' CreateMatchmakingRuleSet Prelude.Text
createMatchmakingRuleSet_name :: Lens' CreateMatchmakingRuleSet Text
createMatchmakingRuleSet_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMatchmakingRuleSet' {Text
name :: Text
$sel:name:CreateMatchmakingRuleSet' :: CreateMatchmakingRuleSet -> Text
name} -> Text
name) (\s :: CreateMatchmakingRuleSet
s@CreateMatchmakingRuleSet' {} Text
a -> CreateMatchmakingRuleSet
s {$sel:name:CreateMatchmakingRuleSet' :: Text
name = Text
a} :: CreateMatchmakingRuleSet)

-- | A collection of matchmaking rules, formatted as a JSON string. Comments
-- are not allowed in JSON, but most elements support a description field.
createMatchmakingRuleSet_ruleSetBody :: Lens.Lens' CreateMatchmakingRuleSet Prelude.Text
createMatchmakingRuleSet_ruleSetBody :: Lens' CreateMatchmakingRuleSet Text
createMatchmakingRuleSet_ruleSetBody = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMatchmakingRuleSet' {Text
ruleSetBody :: Text
$sel:ruleSetBody:CreateMatchmakingRuleSet' :: CreateMatchmakingRuleSet -> Text
ruleSetBody} -> Text
ruleSetBody) (\s :: CreateMatchmakingRuleSet
s@CreateMatchmakingRuleSet' {} Text
a -> CreateMatchmakingRuleSet
s {$sel:ruleSetBody:CreateMatchmakingRuleSet' :: Text
ruleSetBody = Text
a} :: CreateMatchmakingRuleSet)

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

instance Prelude.Hashable CreateMatchmakingRuleSet where
  hashWithSalt :: Int -> CreateMatchmakingRuleSet -> Int
hashWithSalt Int
_salt CreateMatchmakingRuleSet' {Maybe [Tag]
Text
ruleSetBody :: Text
name :: Text
tags :: Maybe [Tag]
$sel:ruleSetBody:CreateMatchmakingRuleSet' :: CreateMatchmakingRuleSet -> Text
$sel:name:CreateMatchmakingRuleSet' :: CreateMatchmakingRuleSet -> Text
$sel:tags:CreateMatchmakingRuleSet' :: CreateMatchmakingRuleSet -> Maybe [Tag]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
ruleSetBody

instance Prelude.NFData CreateMatchmakingRuleSet where
  rnf :: CreateMatchmakingRuleSet -> ()
rnf CreateMatchmakingRuleSet' {Maybe [Tag]
Text
ruleSetBody :: Text
name :: Text
tags :: Maybe [Tag]
$sel:ruleSetBody:CreateMatchmakingRuleSet' :: CreateMatchmakingRuleSet -> Text
$sel:name:CreateMatchmakingRuleSet' :: CreateMatchmakingRuleSet -> Text
$sel:tags:CreateMatchmakingRuleSet' :: CreateMatchmakingRuleSet -> Maybe [Tag]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
ruleSetBody

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

instance Data.ToJSON CreateMatchmakingRuleSet where
  toJSON :: CreateMatchmakingRuleSet -> Value
toJSON CreateMatchmakingRuleSet' {Maybe [Tag]
Text
ruleSetBody :: Text
name :: Text
tags :: Maybe [Tag]
$sel:ruleSetBody:CreateMatchmakingRuleSet' :: CreateMatchmakingRuleSet -> Text
$sel:name:CreateMatchmakingRuleSet' :: CreateMatchmakingRuleSet -> Text
$sel:tags:CreateMatchmakingRuleSet' :: CreateMatchmakingRuleSet -> Maybe [Tag]
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"Tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
            forall a. a -> Maybe a
Prelude.Just (Key
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name),
            forall a. a -> Maybe a
Prelude.Just (Key
"RuleSetBody" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
ruleSetBody)
          ]
      )

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

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

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

-- |
-- Create a value of 'CreateMatchmakingRuleSetResponse' 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:
--
-- 'httpStatus', 'createMatchmakingRuleSetResponse_httpStatus' - The response's http status code.
--
-- 'ruleSet', 'createMatchmakingRuleSetResponse_ruleSet' - The newly created matchmaking rule set.
newCreateMatchmakingRuleSetResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'ruleSet'
  MatchmakingRuleSet ->
  CreateMatchmakingRuleSetResponse
newCreateMatchmakingRuleSetResponse :: Int -> MatchmakingRuleSet -> CreateMatchmakingRuleSetResponse
newCreateMatchmakingRuleSetResponse
  Int
pHttpStatus_
  MatchmakingRuleSet
pRuleSet_ =
    CreateMatchmakingRuleSetResponse'
      { $sel:httpStatus:CreateMatchmakingRuleSetResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:ruleSet:CreateMatchmakingRuleSetResponse' :: MatchmakingRuleSet
ruleSet = MatchmakingRuleSet
pRuleSet_
      }

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

-- | The newly created matchmaking rule set.
createMatchmakingRuleSetResponse_ruleSet :: Lens.Lens' CreateMatchmakingRuleSetResponse MatchmakingRuleSet
createMatchmakingRuleSetResponse_ruleSet :: Lens' CreateMatchmakingRuleSetResponse MatchmakingRuleSet
createMatchmakingRuleSetResponse_ruleSet = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMatchmakingRuleSetResponse' {MatchmakingRuleSet
ruleSet :: MatchmakingRuleSet
$sel:ruleSet:CreateMatchmakingRuleSetResponse' :: CreateMatchmakingRuleSetResponse -> MatchmakingRuleSet
ruleSet} -> MatchmakingRuleSet
ruleSet) (\s :: CreateMatchmakingRuleSetResponse
s@CreateMatchmakingRuleSetResponse' {} MatchmakingRuleSet
a -> CreateMatchmakingRuleSetResponse
s {$sel:ruleSet:CreateMatchmakingRuleSetResponse' :: MatchmakingRuleSet
ruleSet = MatchmakingRuleSet
a} :: CreateMatchmakingRuleSetResponse)

instance
  Prelude.NFData
    CreateMatchmakingRuleSetResponse
  where
  rnf :: CreateMatchmakingRuleSetResponse -> ()
rnf CreateMatchmakingRuleSetResponse' {Int
MatchmakingRuleSet
ruleSet :: MatchmakingRuleSet
httpStatus :: Int
$sel:ruleSet:CreateMatchmakingRuleSetResponse' :: CreateMatchmakingRuleSetResponse -> MatchmakingRuleSet
$sel:httpStatus:CreateMatchmakingRuleSetResponse' :: CreateMatchmakingRuleSetResponse -> Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf MatchmakingRuleSet
ruleSet