{-# 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 #-}
module Amazonka.GameLift.DescribeMatchmakingConfigurations
(
DescribeMatchmakingConfigurations (..),
newDescribeMatchmakingConfigurations,
describeMatchmakingConfigurations_ruleSetName,
describeMatchmakingConfigurations_nextToken,
describeMatchmakingConfigurations_names,
describeMatchmakingConfigurations_limit,
DescribeMatchmakingConfigurationsResponse (..),
newDescribeMatchmakingConfigurationsResponse,
describeMatchmakingConfigurationsResponse_configurations,
describeMatchmakingConfigurationsResponse_nextToken,
describeMatchmakingConfigurationsResponse_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
data DescribeMatchmakingConfigurations = DescribeMatchmakingConfigurations'
{
DescribeMatchmakingConfigurations -> Maybe Text
ruleSetName :: Prelude.Maybe Prelude.Text,
DescribeMatchmakingConfigurations -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeMatchmakingConfigurations -> Maybe [Text]
names :: Prelude.Maybe [Prelude.Text],
DescribeMatchmakingConfigurations -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural
}
deriving (DescribeMatchmakingConfigurations
-> DescribeMatchmakingConfigurations -> Bool
(DescribeMatchmakingConfigurations
-> DescribeMatchmakingConfigurations -> Bool)
-> (DescribeMatchmakingConfigurations
-> DescribeMatchmakingConfigurations -> Bool)
-> Eq DescribeMatchmakingConfigurations
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeMatchmakingConfigurations
-> DescribeMatchmakingConfigurations -> Bool
$c/= :: DescribeMatchmakingConfigurations
-> DescribeMatchmakingConfigurations -> Bool
== :: DescribeMatchmakingConfigurations
-> DescribeMatchmakingConfigurations -> Bool
$c== :: DescribeMatchmakingConfigurations
-> DescribeMatchmakingConfigurations -> Bool
Prelude.Eq, ReadPrec [DescribeMatchmakingConfigurations]
ReadPrec DescribeMatchmakingConfigurations
Int -> ReadS DescribeMatchmakingConfigurations
ReadS [DescribeMatchmakingConfigurations]
(Int -> ReadS DescribeMatchmakingConfigurations)
-> ReadS [DescribeMatchmakingConfigurations]
-> ReadPrec DescribeMatchmakingConfigurations
-> ReadPrec [DescribeMatchmakingConfigurations]
-> Read DescribeMatchmakingConfigurations
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeMatchmakingConfigurations]
$creadListPrec :: ReadPrec [DescribeMatchmakingConfigurations]
readPrec :: ReadPrec DescribeMatchmakingConfigurations
$creadPrec :: ReadPrec DescribeMatchmakingConfigurations
readList :: ReadS [DescribeMatchmakingConfigurations]
$creadList :: ReadS [DescribeMatchmakingConfigurations]
readsPrec :: Int -> ReadS DescribeMatchmakingConfigurations
$creadsPrec :: Int -> ReadS DescribeMatchmakingConfigurations
Prelude.Read, Int -> DescribeMatchmakingConfigurations -> ShowS
[DescribeMatchmakingConfigurations] -> ShowS
DescribeMatchmakingConfigurations -> String
(Int -> DescribeMatchmakingConfigurations -> ShowS)
-> (DescribeMatchmakingConfigurations -> String)
-> ([DescribeMatchmakingConfigurations] -> ShowS)
-> Show DescribeMatchmakingConfigurations
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeMatchmakingConfigurations] -> ShowS
$cshowList :: [DescribeMatchmakingConfigurations] -> ShowS
show :: DescribeMatchmakingConfigurations -> String
$cshow :: DescribeMatchmakingConfigurations -> String
showsPrec :: Int -> DescribeMatchmakingConfigurations -> ShowS
$cshowsPrec :: Int -> DescribeMatchmakingConfigurations -> ShowS
Prelude.Show, (forall x.
DescribeMatchmakingConfigurations
-> Rep DescribeMatchmakingConfigurations x)
-> (forall x.
Rep DescribeMatchmakingConfigurations x
-> DescribeMatchmakingConfigurations)
-> Generic DescribeMatchmakingConfigurations
forall x.
Rep DescribeMatchmakingConfigurations x
-> DescribeMatchmakingConfigurations
forall x.
DescribeMatchmakingConfigurations
-> Rep DescribeMatchmakingConfigurations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeMatchmakingConfigurations x
-> DescribeMatchmakingConfigurations
$cfrom :: forall x.
DescribeMatchmakingConfigurations
-> Rep DescribeMatchmakingConfigurations x
Prelude.Generic)
newDescribeMatchmakingConfigurations ::
DescribeMatchmakingConfigurations
newDescribeMatchmakingConfigurations :: DescribeMatchmakingConfigurations
newDescribeMatchmakingConfigurations =
DescribeMatchmakingConfigurations' :: Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Natural
-> DescribeMatchmakingConfigurations
DescribeMatchmakingConfigurations'
{ $sel:ruleSetName:DescribeMatchmakingConfigurations' :: Maybe Text
ruleSetName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeMatchmakingConfigurations' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:names:DescribeMatchmakingConfigurations' :: Maybe [Text]
names = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:limit:DescribeMatchmakingConfigurations' :: Maybe Natural
limit = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
describeMatchmakingConfigurations_ruleSetName :: Lens.Lens' DescribeMatchmakingConfigurations (Prelude.Maybe Prelude.Text)
describeMatchmakingConfigurations_ruleSetName :: (Maybe Text -> f (Maybe Text))
-> DescribeMatchmakingConfigurations
-> f DescribeMatchmakingConfigurations
describeMatchmakingConfigurations_ruleSetName = (DescribeMatchmakingConfigurations -> Maybe Text)
-> (DescribeMatchmakingConfigurations
-> Maybe Text -> DescribeMatchmakingConfigurations)
-> Lens
DescribeMatchmakingConfigurations
DescribeMatchmakingConfigurations
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMatchmakingConfigurations' {Maybe Text
ruleSetName :: Maybe Text
$sel:ruleSetName:DescribeMatchmakingConfigurations' :: DescribeMatchmakingConfigurations -> Maybe Text
ruleSetName} -> Maybe Text
ruleSetName) (\s :: DescribeMatchmakingConfigurations
s@DescribeMatchmakingConfigurations' {} Maybe Text
a -> DescribeMatchmakingConfigurations
s {$sel:ruleSetName:DescribeMatchmakingConfigurations' :: Maybe Text
ruleSetName = Maybe Text
a} :: DescribeMatchmakingConfigurations)
describeMatchmakingConfigurations_nextToken :: Lens.Lens' DescribeMatchmakingConfigurations (Prelude.Maybe Prelude.Text)
describeMatchmakingConfigurations_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeMatchmakingConfigurations
-> f DescribeMatchmakingConfigurations
describeMatchmakingConfigurations_nextToken = (DescribeMatchmakingConfigurations -> Maybe Text)
-> (DescribeMatchmakingConfigurations
-> Maybe Text -> DescribeMatchmakingConfigurations)
-> Lens
DescribeMatchmakingConfigurations
DescribeMatchmakingConfigurations
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMatchmakingConfigurations' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeMatchmakingConfigurations' :: DescribeMatchmakingConfigurations -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeMatchmakingConfigurations
s@DescribeMatchmakingConfigurations' {} Maybe Text
a -> DescribeMatchmakingConfigurations
s {$sel:nextToken:DescribeMatchmakingConfigurations' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeMatchmakingConfigurations)
describeMatchmakingConfigurations_names :: Lens.Lens' DescribeMatchmakingConfigurations (Prelude.Maybe [Prelude.Text])
describeMatchmakingConfigurations_names :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeMatchmakingConfigurations
-> f DescribeMatchmakingConfigurations
describeMatchmakingConfigurations_names = (DescribeMatchmakingConfigurations -> Maybe [Text])
-> (DescribeMatchmakingConfigurations
-> Maybe [Text] -> DescribeMatchmakingConfigurations)
-> Lens
DescribeMatchmakingConfigurations
DescribeMatchmakingConfigurations
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMatchmakingConfigurations' {Maybe [Text]
names :: Maybe [Text]
$sel:names:DescribeMatchmakingConfigurations' :: DescribeMatchmakingConfigurations -> Maybe [Text]
names} -> Maybe [Text]
names) (\s :: DescribeMatchmakingConfigurations
s@DescribeMatchmakingConfigurations' {} Maybe [Text]
a -> DescribeMatchmakingConfigurations
s {$sel:names:DescribeMatchmakingConfigurations' :: Maybe [Text]
names = Maybe [Text]
a} :: DescribeMatchmakingConfigurations) ((Maybe [Text] -> f (Maybe [Text]))
-> DescribeMatchmakingConfigurations
-> f DescribeMatchmakingConfigurations)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeMatchmakingConfigurations
-> f DescribeMatchmakingConfigurations
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
describeMatchmakingConfigurations_limit :: Lens.Lens' DescribeMatchmakingConfigurations (Prelude.Maybe Prelude.Natural)
describeMatchmakingConfigurations_limit :: (Maybe Natural -> f (Maybe Natural))
-> DescribeMatchmakingConfigurations
-> f DescribeMatchmakingConfigurations
describeMatchmakingConfigurations_limit = (DescribeMatchmakingConfigurations -> Maybe Natural)
-> (DescribeMatchmakingConfigurations
-> Maybe Natural -> DescribeMatchmakingConfigurations)
-> Lens
DescribeMatchmakingConfigurations
DescribeMatchmakingConfigurations
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMatchmakingConfigurations' {Maybe Natural
limit :: Maybe Natural
$sel:limit:DescribeMatchmakingConfigurations' :: DescribeMatchmakingConfigurations -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: DescribeMatchmakingConfigurations
s@DescribeMatchmakingConfigurations' {} Maybe Natural
a -> DescribeMatchmakingConfigurations
s {$sel:limit:DescribeMatchmakingConfigurations' :: Maybe Natural
limit = Maybe Natural
a} :: DescribeMatchmakingConfigurations)
instance
Core.AWSPager
DescribeMatchmakingConfigurations
where
page :: DescribeMatchmakingConfigurations
-> AWSResponse DescribeMatchmakingConfigurations
-> Maybe DescribeMatchmakingConfigurations
page DescribeMatchmakingConfigurations
rq AWSResponse DescribeMatchmakingConfigurations
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeMatchmakingConfigurations
DescribeMatchmakingConfigurationsResponse
rs
DescribeMatchmakingConfigurationsResponse
-> Getting
(First Text) DescribeMatchmakingConfigurationsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeMatchmakingConfigurationsResponse
-> Const (First Text) DescribeMatchmakingConfigurationsResponse
Lens' DescribeMatchmakingConfigurationsResponse (Maybe Text)
describeMatchmakingConfigurationsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeMatchmakingConfigurationsResponse
-> Const (First Text) DescribeMatchmakingConfigurationsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
(First Text) DescribeMatchmakingConfigurationsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeMatchmakingConfigurations
forall a. Maybe a
Prelude.Nothing
| Maybe [MatchmakingConfiguration] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeMatchmakingConfigurations
DescribeMatchmakingConfigurationsResponse
rs
DescribeMatchmakingConfigurationsResponse
-> Getting
(First [MatchmakingConfiguration])
DescribeMatchmakingConfigurationsResponse
[MatchmakingConfiguration]
-> Maybe [MatchmakingConfiguration]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [MatchmakingConfiguration]
-> Const
(First [MatchmakingConfiguration])
(Maybe [MatchmakingConfiguration]))
-> DescribeMatchmakingConfigurationsResponse
-> Const
(First [MatchmakingConfiguration])
DescribeMatchmakingConfigurationsResponse
Lens'
DescribeMatchmakingConfigurationsResponse
(Maybe [MatchmakingConfiguration])
describeMatchmakingConfigurationsResponse_configurations
((Maybe [MatchmakingConfiguration]
-> Const
(First [MatchmakingConfiguration])
(Maybe [MatchmakingConfiguration]))
-> DescribeMatchmakingConfigurationsResponse
-> Const
(First [MatchmakingConfiguration])
DescribeMatchmakingConfigurationsResponse)
-> (([MatchmakingConfiguration]
-> Const
(First [MatchmakingConfiguration]) [MatchmakingConfiguration])
-> Maybe [MatchmakingConfiguration]
-> Const
(First [MatchmakingConfiguration])
(Maybe [MatchmakingConfiguration]))
-> Getting
(First [MatchmakingConfiguration])
DescribeMatchmakingConfigurationsResponse
[MatchmakingConfiguration]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([MatchmakingConfiguration]
-> Const
(First [MatchmakingConfiguration]) [MatchmakingConfiguration])
-> Maybe [MatchmakingConfiguration]
-> Const
(First [MatchmakingConfiguration])
(Maybe [MatchmakingConfiguration])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeMatchmakingConfigurations
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
DescribeMatchmakingConfigurations
-> Maybe DescribeMatchmakingConfigurations
forall a. a -> Maybe a
Prelude.Just (DescribeMatchmakingConfigurations
-> Maybe DescribeMatchmakingConfigurations)
-> DescribeMatchmakingConfigurations
-> Maybe DescribeMatchmakingConfigurations
forall a b. (a -> b) -> a -> b
Prelude.$
DescribeMatchmakingConfigurations
rq
DescribeMatchmakingConfigurations
-> (DescribeMatchmakingConfigurations
-> DescribeMatchmakingConfigurations)
-> DescribeMatchmakingConfigurations
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeMatchmakingConfigurations
-> Identity DescribeMatchmakingConfigurations
Lens
DescribeMatchmakingConfigurations
DescribeMatchmakingConfigurations
(Maybe Text)
(Maybe Text)
describeMatchmakingConfigurations_nextToken
((Maybe Text -> Identity (Maybe Text))
-> DescribeMatchmakingConfigurations
-> Identity DescribeMatchmakingConfigurations)
-> Maybe Text
-> DescribeMatchmakingConfigurations
-> DescribeMatchmakingConfigurations
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeMatchmakingConfigurations
DescribeMatchmakingConfigurationsResponse
rs
DescribeMatchmakingConfigurationsResponse
-> Getting
(First Text) DescribeMatchmakingConfigurationsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeMatchmakingConfigurationsResponse
-> Const (First Text) DescribeMatchmakingConfigurationsResponse
Lens' DescribeMatchmakingConfigurationsResponse (Maybe Text)
describeMatchmakingConfigurationsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeMatchmakingConfigurationsResponse
-> Const (First Text) DescribeMatchmakingConfigurationsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
(First Text) DescribeMatchmakingConfigurationsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
instance
Core.AWSRequest
DescribeMatchmakingConfigurations
where
type
AWSResponse DescribeMatchmakingConfigurations =
DescribeMatchmakingConfigurationsResponse
request :: DescribeMatchmakingConfigurations
-> Request DescribeMatchmakingConfigurations
request = Service
-> DescribeMatchmakingConfigurations
-> Request DescribeMatchmakingConfigurations
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeMatchmakingConfigurations
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DescribeMatchmakingConfigurations)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeMatchmakingConfigurations))
-> Logger
-> Service
-> Proxy DescribeMatchmakingConfigurations
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DescribeMatchmakingConfigurations)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe [MatchmakingConfiguration]
-> Maybe Text -> Int -> DescribeMatchmakingConfigurationsResponse
DescribeMatchmakingConfigurationsResponse'
(Maybe [MatchmakingConfiguration]
-> Maybe Text -> Int -> DescribeMatchmakingConfigurationsResponse)
-> Either String (Maybe [MatchmakingConfiguration])
-> Either
String
(Maybe Text -> Int -> DescribeMatchmakingConfigurationsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text -> Either String (Maybe (Maybe [MatchmakingConfiguration]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Configurations" Either String (Maybe (Maybe [MatchmakingConfiguration]))
-> Maybe [MatchmakingConfiguration]
-> Either String (Maybe [MatchmakingConfiguration])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [MatchmakingConfiguration]
forall a. Monoid a => a
Prelude.mempty)
Either
String
(Maybe Text -> Int -> DescribeMatchmakingConfigurationsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeMatchmakingConfigurationsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
Either String (Int -> DescribeMatchmakingConfigurationsResponse)
-> Either String Int
-> Either String DescribeMatchmakingConfigurationsResponse
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
DescribeMatchmakingConfigurations
instance
Prelude.NFData
DescribeMatchmakingConfigurations
instance
Core.ToHeaders
DescribeMatchmakingConfigurations
where
toHeaders :: DescribeMatchmakingConfigurations -> ResponseHeaders
toHeaders =
ResponseHeaders
-> DescribeMatchmakingConfigurations -> 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.DescribeMatchmakingConfigurations" ::
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
DescribeMatchmakingConfigurations
where
toJSON :: DescribeMatchmakingConfigurations -> Value
toJSON DescribeMatchmakingConfigurations' {Maybe Natural
Maybe [Text]
Maybe Text
limit :: Maybe Natural
names :: Maybe [Text]
nextToken :: Maybe Text
ruleSetName :: Maybe Text
$sel:limit:DescribeMatchmakingConfigurations' :: DescribeMatchmakingConfigurations -> Maybe Natural
$sel:names:DescribeMatchmakingConfigurations' :: DescribeMatchmakingConfigurations -> Maybe [Text]
$sel:nextToken:DescribeMatchmakingConfigurations' :: DescribeMatchmakingConfigurations -> Maybe Text
$sel:ruleSetName:DescribeMatchmakingConfigurations' :: DescribeMatchmakingConfigurations -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"RuleSetName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
ruleSetName,
(Text
"NextToken" 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
nextToken,
(Text
"Names" 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]
names,
(Text
"Limit" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
limit
]
)
instance
Core.ToPath
DescribeMatchmakingConfigurations
where
toPath :: DescribeMatchmakingConfigurations -> ByteString
toPath = ByteString -> DescribeMatchmakingConfigurations -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
DescribeMatchmakingConfigurations
where
toQuery :: DescribeMatchmakingConfigurations -> QueryString
toQuery = QueryString -> DescribeMatchmakingConfigurations -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeMatchmakingConfigurationsResponse = DescribeMatchmakingConfigurationsResponse'
{
DescribeMatchmakingConfigurationsResponse
-> Maybe [MatchmakingConfiguration]
configurations :: Prelude.Maybe [MatchmakingConfiguration],
DescribeMatchmakingConfigurationsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeMatchmakingConfigurationsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeMatchmakingConfigurationsResponse
-> DescribeMatchmakingConfigurationsResponse -> Bool
(DescribeMatchmakingConfigurationsResponse
-> DescribeMatchmakingConfigurationsResponse -> Bool)
-> (DescribeMatchmakingConfigurationsResponse
-> DescribeMatchmakingConfigurationsResponse -> Bool)
-> Eq DescribeMatchmakingConfigurationsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeMatchmakingConfigurationsResponse
-> DescribeMatchmakingConfigurationsResponse -> Bool
$c/= :: DescribeMatchmakingConfigurationsResponse
-> DescribeMatchmakingConfigurationsResponse -> Bool
== :: DescribeMatchmakingConfigurationsResponse
-> DescribeMatchmakingConfigurationsResponse -> Bool
$c== :: DescribeMatchmakingConfigurationsResponse
-> DescribeMatchmakingConfigurationsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeMatchmakingConfigurationsResponse]
ReadPrec DescribeMatchmakingConfigurationsResponse
Int -> ReadS DescribeMatchmakingConfigurationsResponse
ReadS [DescribeMatchmakingConfigurationsResponse]
(Int -> ReadS DescribeMatchmakingConfigurationsResponse)
-> ReadS [DescribeMatchmakingConfigurationsResponse]
-> ReadPrec DescribeMatchmakingConfigurationsResponse
-> ReadPrec [DescribeMatchmakingConfigurationsResponse]
-> Read DescribeMatchmakingConfigurationsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeMatchmakingConfigurationsResponse]
$creadListPrec :: ReadPrec [DescribeMatchmakingConfigurationsResponse]
readPrec :: ReadPrec DescribeMatchmakingConfigurationsResponse
$creadPrec :: ReadPrec DescribeMatchmakingConfigurationsResponse
readList :: ReadS [DescribeMatchmakingConfigurationsResponse]
$creadList :: ReadS [DescribeMatchmakingConfigurationsResponse]
readsPrec :: Int -> ReadS DescribeMatchmakingConfigurationsResponse
$creadsPrec :: Int -> ReadS DescribeMatchmakingConfigurationsResponse
Prelude.Read, Int -> DescribeMatchmakingConfigurationsResponse -> ShowS
[DescribeMatchmakingConfigurationsResponse] -> ShowS
DescribeMatchmakingConfigurationsResponse -> String
(Int -> DescribeMatchmakingConfigurationsResponse -> ShowS)
-> (DescribeMatchmakingConfigurationsResponse -> String)
-> ([DescribeMatchmakingConfigurationsResponse] -> ShowS)
-> Show DescribeMatchmakingConfigurationsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeMatchmakingConfigurationsResponse] -> ShowS
$cshowList :: [DescribeMatchmakingConfigurationsResponse] -> ShowS
show :: DescribeMatchmakingConfigurationsResponse -> String
$cshow :: DescribeMatchmakingConfigurationsResponse -> String
showsPrec :: Int -> DescribeMatchmakingConfigurationsResponse -> ShowS
$cshowsPrec :: Int -> DescribeMatchmakingConfigurationsResponse -> ShowS
Prelude.Show, (forall x.
DescribeMatchmakingConfigurationsResponse
-> Rep DescribeMatchmakingConfigurationsResponse x)
-> (forall x.
Rep DescribeMatchmakingConfigurationsResponse x
-> DescribeMatchmakingConfigurationsResponse)
-> Generic DescribeMatchmakingConfigurationsResponse
forall x.
Rep DescribeMatchmakingConfigurationsResponse x
-> DescribeMatchmakingConfigurationsResponse
forall x.
DescribeMatchmakingConfigurationsResponse
-> Rep DescribeMatchmakingConfigurationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeMatchmakingConfigurationsResponse x
-> DescribeMatchmakingConfigurationsResponse
$cfrom :: forall x.
DescribeMatchmakingConfigurationsResponse
-> Rep DescribeMatchmakingConfigurationsResponse x
Prelude.Generic)
newDescribeMatchmakingConfigurationsResponse ::
Prelude.Int ->
DescribeMatchmakingConfigurationsResponse
newDescribeMatchmakingConfigurationsResponse :: Int -> DescribeMatchmakingConfigurationsResponse
newDescribeMatchmakingConfigurationsResponse
Int
pHttpStatus_ =
DescribeMatchmakingConfigurationsResponse' :: Maybe [MatchmakingConfiguration]
-> Maybe Text -> Int -> DescribeMatchmakingConfigurationsResponse
DescribeMatchmakingConfigurationsResponse'
{ $sel:configurations:DescribeMatchmakingConfigurationsResponse' :: Maybe [MatchmakingConfiguration]
configurations =
Maybe [MatchmakingConfiguration]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeMatchmakingConfigurationsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeMatchmakingConfigurationsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeMatchmakingConfigurationsResponse_configurations :: Lens.Lens' DescribeMatchmakingConfigurationsResponse (Prelude.Maybe [MatchmakingConfiguration])
describeMatchmakingConfigurationsResponse_configurations :: (Maybe [MatchmakingConfiguration]
-> f (Maybe [MatchmakingConfiguration]))
-> DescribeMatchmakingConfigurationsResponse
-> f DescribeMatchmakingConfigurationsResponse
describeMatchmakingConfigurationsResponse_configurations = (DescribeMatchmakingConfigurationsResponse
-> Maybe [MatchmakingConfiguration])
-> (DescribeMatchmakingConfigurationsResponse
-> Maybe [MatchmakingConfiguration]
-> DescribeMatchmakingConfigurationsResponse)
-> Lens'
DescribeMatchmakingConfigurationsResponse
(Maybe [MatchmakingConfiguration])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMatchmakingConfigurationsResponse' {Maybe [MatchmakingConfiguration]
configurations :: Maybe [MatchmakingConfiguration]
$sel:configurations:DescribeMatchmakingConfigurationsResponse' :: DescribeMatchmakingConfigurationsResponse
-> Maybe [MatchmakingConfiguration]
configurations} -> Maybe [MatchmakingConfiguration]
configurations) (\s :: DescribeMatchmakingConfigurationsResponse
s@DescribeMatchmakingConfigurationsResponse' {} Maybe [MatchmakingConfiguration]
a -> DescribeMatchmakingConfigurationsResponse
s {$sel:configurations:DescribeMatchmakingConfigurationsResponse' :: Maybe [MatchmakingConfiguration]
configurations = Maybe [MatchmakingConfiguration]
a} :: DescribeMatchmakingConfigurationsResponse) ((Maybe [MatchmakingConfiguration]
-> f (Maybe [MatchmakingConfiguration]))
-> DescribeMatchmakingConfigurationsResponse
-> f DescribeMatchmakingConfigurationsResponse)
-> ((Maybe [MatchmakingConfiguration]
-> f (Maybe [MatchmakingConfiguration]))
-> Maybe [MatchmakingConfiguration]
-> f (Maybe [MatchmakingConfiguration]))
-> (Maybe [MatchmakingConfiguration]
-> f (Maybe [MatchmakingConfiguration]))
-> DescribeMatchmakingConfigurationsResponse
-> f DescribeMatchmakingConfigurationsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[MatchmakingConfiguration]
[MatchmakingConfiguration]
[MatchmakingConfiguration]
[MatchmakingConfiguration]
-> Iso
(Maybe [MatchmakingConfiguration])
(Maybe [MatchmakingConfiguration])
(Maybe [MatchmakingConfiguration])
(Maybe [MatchmakingConfiguration])
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
[MatchmakingConfiguration]
[MatchmakingConfiguration]
[MatchmakingConfiguration]
[MatchmakingConfiguration]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeMatchmakingConfigurationsResponse_nextToken :: Lens.Lens' DescribeMatchmakingConfigurationsResponse (Prelude.Maybe Prelude.Text)
describeMatchmakingConfigurationsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeMatchmakingConfigurationsResponse
-> f DescribeMatchmakingConfigurationsResponse
describeMatchmakingConfigurationsResponse_nextToken = (DescribeMatchmakingConfigurationsResponse -> Maybe Text)
-> (DescribeMatchmakingConfigurationsResponse
-> Maybe Text -> DescribeMatchmakingConfigurationsResponse)
-> Lens' DescribeMatchmakingConfigurationsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMatchmakingConfigurationsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeMatchmakingConfigurationsResponse' :: DescribeMatchmakingConfigurationsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeMatchmakingConfigurationsResponse
s@DescribeMatchmakingConfigurationsResponse' {} Maybe Text
a -> DescribeMatchmakingConfigurationsResponse
s {$sel:nextToken:DescribeMatchmakingConfigurationsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeMatchmakingConfigurationsResponse)
describeMatchmakingConfigurationsResponse_httpStatus :: Lens.Lens' DescribeMatchmakingConfigurationsResponse Prelude.Int
describeMatchmakingConfigurationsResponse_httpStatus :: (Int -> f Int)
-> DescribeMatchmakingConfigurationsResponse
-> f DescribeMatchmakingConfigurationsResponse
describeMatchmakingConfigurationsResponse_httpStatus = (DescribeMatchmakingConfigurationsResponse -> Int)
-> (DescribeMatchmakingConfigurationsResponse
-> Int -> DescribeMatchmakingConfigurationsResponse)
-> Lens
DescribeMatchmakingConfigurationsResponse
DescribeMatchmakingConfigurationsResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMatchmakingConfigurationsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeMatchmakingConfigurationsResponse' :: DescribeMatchmakingConfigurationsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeMatchmakingConfigurationsResponse
s@DescribeMatchmakingConfigurationsResponse' {} Int
a -> DescribeMatchmakingConfigurationsResponse
s {$sel:httpStatus:DescribeMatchmakingConfigurationsResponse' :: Int
httpStatus = Int
a} :: DescribeMatchmakingConfigurationsResponse)
instance
Prelude.NFData
DescribeMatchmakingConfigurationsResponse