{-# 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.DescribePlayerSessions
(
DescribePlayerSessions (..),
newDescribePlayerSessions,
describePlayerSessions_gameSessionId,
describePlayerSessions_nextToken,
describePlayerSessions_limit,
describePlayerSessions_playerSessionId,
describePlayerSessions_playerId,
describePlayerSessions_playerSessionStatusFilter,
DescribePlayerSessionsResponse (..),
newDescribePlayerSessionsResponse,
describePlayerSessionsResponse_nextToken,
describePlayerSessionsResponse_playerSessions,
describePlayerSessionsResponse_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 DescribePlayerSessions = DescribePlayerSessions'
{
DescribePlayerSessions -> Maybe Text
gameSessionId :: Prelude.Maybe Prelude.Text,
DescribePlayerSessions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribePlayerSessions -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
DescribePlayerSessions -> Maybe Text
playerSessionId :: Prelude.Maybe Prelude.Text,
DescribePlayerSessions -> Maybe Text
playerId :: Prelude.Maybe Prelude.Text,
DescribePlayerSessions -> Maybe Text
playerSessionStatusFilter :: Prelude.Maybe Prelude.Text
}
deriving (DescribePlayerSessions -> DescribePlayerSessions -> Bool
(DescribePlayerSessions -> DescribePlayerSessions -> Bool)
-> (DescribePlayerSessions -> DescribePlayerSessions -> Bool)
-> Eq DescribePlayerSessions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribePlayerSessions -> DescribePlayerSessions -> Bool
$c/= :: DescribePlayerSessions -> DescribePlayerSessions -> Bool
== :: DescribePlayerSessions -> DescribePlayerSessions -> Bool
$c== :: DescribePlayerSessions -> DescribePlayerSessions -> Bool
Prelude.Eq, ReadPrec [DescribePlayerSessions]
ReadPrec DescribePlayerSessions
Int -> ReadS DescribePlayerSessions
ReadS [DescribePlayerSessions]
(Int -> ReadS DescribePlayerSessions)
-> ReadS [DescribePlayerSessions]
-> ReadPrec DescribePlayerSessions
-> ReadPrec [DescribePlayerSessions]
-> Read DescribePlayerSessions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribePlayerSessions]
$creadListPrec :: ReadPrec [DescribePlayerSessions]
readPrec :: ReadPrec DescribePlayerSessions
$creadPrec :: ReadPrec DescribePlayerSessions
readList :: ReadS [DescribePlayerSessions]
$creadList :: ReadS [DescribePlayerSessions]
readsPrec :: Int -> ReadS DescribePlayerSessions
$creadsPrec :: Int -> ReadS DescribePlayerSessions
Prelude.Read, Int -> DescribePlayerSessions -> ShowS
[DescribePlayerSessions] -> ShowS
DescribePlayerSessions -> String
(Int -> DescribePlayerSessions -> ShowS)
-> (DescribePlayerSessions -> String)
-> ([DescribePlayerSessions] -> ShowS)
-> Show DescribePlayerSessions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribePlayerSessions] -> ShowS
$cshowList :: [DescribePlayerSessions] -> ShowS
show :: DescribePlayerSessions -> String
$cshow :: DescribePlayerSessions -> String
showsPrec :: Int -> DescribePlayerSessions -> ShowS
$cshowsPrec :: Int -> DescribePlayerSessions -> ShowS
Prelude.Show, (forall x. DescribePlayerSessions -> Rep DescribePlayerSessions x)
-> (forall x.
Rep DescribePlayerSessions x -> DescribePlayerSessions)
-> Generic DescribePlayerSessions
forall x. Rep DescribePlayerSessions x -> DescribePlayerSessions
forall x. DescribePlayerSessions -> Rep DescribePlayerSessions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribePlayerSessions x -> DescribePlayerSessions
$cfrom :: forall x. DescribePlayerSessions -> Rep DescribePlayerSessions x
Prelude.Generic)
newDescribePlayerSessions ::
DescribePlayerSessions
newDescribePlayerSessions :: DescribePlayerSessions
newDescribePlayerSessions =
DescribePlayerSessions' :: Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DescribePlayerSessions
DescribePlayerSessions'
{ $sel:gameSessionId:DescribePlayerSessions' :: Maybe Text
gameSessionId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribePlayerSessions' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:limit:DescribePlayerSessions' :: Maybe Natural
limit = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:playerSessionId:DescribePlayerSessions' :: Maybe Text
playerSessionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:playerId:DescribePlayerSessions' :: Maybe Text
playerId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:playerSessionStatusFilter:DescribePlayerSessions' :: Maybe Text
playerSessionStatusFilter = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
describePlayerSessions_gameSessionId :: Lens.Lens' DescribePlayerSessions (Prelude.Maybe Prelude.Text)
describePlayerSessions_gameSessionId :: (Maybe Text -> f (Maybe Text))
-> DescribePlayerSessions -> f DescribePlayerSessions
describePlayerSessions_gameSessionId = (DescribePlayerSessions -> Maybe Text)
-> (DescribePlayerSessions -> Maybe Text -> DescribePlayerSessions)
-> Lens
DescribePlayerSessions
DescribePlayerSessions
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePlayerSessions' {Maybe Text
gameSessionId :: Maybe Text
$sel:gameSessionId:DescribePlayerSessions' :: DescribePlayerSessions -> Maybe Text
gameSessionId} -> Maybe Text
gameSessionId) (\s :: DescribePlayerSessions
s@DescribePlayerSessions' {} Maybe Text
a -> DescribePlayerSessions
s {$sel:gameSessionId:DescribePlayerSessions' :: Maybe Text
gameSessionId = Maybe Text
a} :: DescribePlayerSessions)
describePlayerSessions_nextToken :: Lens.Lens' DescribePlayerSessions (Prelude.Maybe Prelude.Text)
describePlayerSessions_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribePlayerSessions -> f DescribePlayerSessions
describePlayerSessions_nextToken = (DescribePlayerSessions -> Maybe Text)
-> (DescribePlayerSessions -> Maybe Text -> DescribePlayerSessions)
-> Lens
DescribePlayerSessions
DescribePlayerSessions
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePlayerSessions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribePlayerSessions' :: DescribePlayerSessions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribePlayerSessions
s@DescribePlayerSessions' {} Maybe Text
a -> DescribePlayerSessions
s {$sel:nextToken:DescribePlayerSessions' :: Maybe Text
nextToken = Maybe Text
a} :: DescribePlayerSessions)
describePlayerSessions_limit :: Lens.Lens' DescribePlayerSessions (Prelude.Maybe Prelude.Natural)
describePlayerSessions_limit :: (Maybe Natural -> f (Maybe Natural))
-> DescribePlayerSessions -> f DescribePlayerSessions
describePlayerSessions_limit = (DescribePlayerSessions -> Maybe Natural)
-> (DescribePlayerSessions
-> Maybe Natural -> DescribePlayerSessions)
-> Lens
DescribePlayerSessions
DescribePlayerSessions
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePlayerSessions' {Maybe Natural
limit :: Maybe Natural
$sel:limit:DescribePlayerSessions' :: DescribePlayerSessions -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: DescribePlayerSessions
s@DescribePlayerSessions' {} Maybe Natural
a -> DescribePlayerSessions
s {$sel:limit:DescribePlayerSessions' :: Maybe Natural
limit = Maybe Natural
a} :: DescribePlayerSessions)
describePlayerSessions_playerSessionId :: Lens.Lens' DescribePlayerSessions (Prelude.Maybe Prelude.Text)
describePlayerSessions_playerSessionId :: (Maybe Text -> f (Maybe Text))
-> DescribePlayerSessions -> f DescribePlayerSessions
describePlayerSessions_playerSessionId = (DescribePlayerSessions -> Maybe Text)
-> (DescribePlayerSessions -> Maybe Text -> DescribePlayerSessions)
-> Lens
DescribePlayerSessions
DescribePlayerSessions
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePlayerSessions' {Maybe Text
playerSessionId :: Maybe Text
$sel:playerSessionId:DescribePlayerSessions' :: DescribePlayerSessions -> Maybe Text
playerSessionId} -> Maybe Text
playerSessionId) (\s :: DescribePlayerSessions
s@DescribePlayerSessions' {} Maybe Text
a -> DescribePlayerSessions
s {$sel:playerSessionId:DescribePlayerSessions' :: Maybe Text
playerSessionId = Maybe Text
a} :: DescribePlayerSessions)
describePlayerSessions_playerId :: Lens.Lens' DescribePlayerSessions (Prelude.Maybe Prelude.Text)
describePlayerSessions_playerId :: (Maybe Text -> f (Maybe Text))
-> DescribePlayerSessions -> f DescribePlayerSessions
describePlayerSessions_playerId = (DescribePlayerSessions -> Maybe Text)
-> (DescribePlayerSessions -> Maybe Text -> DescribePlayerSessions)
-> Lens
DescribePlayerSessions
DescribePlayerSessions
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePlayerSessions' {Maybe Text
playerId :: Maybe Text
$sel:playerId:DescribePlayerSessions' :: DescribePlayerSessions -> Maybe Text
playerId} -> Maybe Text
playerId) (\s :: DescribePlayerSessions
s@DescribePlayerSessions' {} Maybe Text
a -> DescribePlayerSessions
s {$sel:playerId:DescribePlayerSessions' :: Maybe Text
playerId = Maybe Text
a} :: DescribePlayerSessions)
describePlayerSessions_playerSessionStatusFilter :: Lens.Lens' DescribePlayerSessions (Prelude.Maybe Prelude.Text)
describePlayerSessions_playerSessionStatusFilter :: (Maybe Text -> f (Maybe Text))
-> DescribePlayerSessions -> f DescribePlayerSessions
describePlayerSessions_playerSessionStatusFilter = (DescribePlayerSessions -> Maybe Text)
-> (DescribePlayerSessions -> Maybe Text -> DescribePlayerSessions)
-> Lens
DescribePlayerSessions
DescribePlayerSessions
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePlayerSessions' {Maybe Text
playerSessionStatusFilter :: Maybe Text
$sel:playerSessionStatusFilter:DescribePlayerSessions' :: DescribePlayerSessions -> Maybe Text
playerSessionStatusFilter} -> Maybe Text
playerSessionStatusFilter) (\s :: DescribePlayerSessions
s@DescribePlayerSessions' {} Maybe Text
a -> DescribePlayerSessions
s {$sel:playerSessionStatusFilter:DescribePlayerSessions' :: Maybe Text
playerSessionStatusFilter = Maybe Text
a} :: DescribePlayerSessions)
instance Core.AWSPager DescribePlayerSessions where
page :: DescribePlayerSessions
-> AWSResponse DescribePlayerSessions
-> Maybe DescribePlayerSessions
page DescribePlayerSessions
rq AWSResponse DescribePlayerSessions
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribePlayerSessions
DescribePlayerSessionsResponse
rs
DescribePlayerSessionsResponse
-> Getting (First Text) DescribePlayerSessionsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribePlayerSessionsResponse
-> Const (First Text) DescribePlayerSessionsResponse
Lens' DescribePlayerSessionsResponse (Maybe Text)
describePlayerSessionsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribePlayerSessionsResponse
-> Const (First Text) DescribePlayerSessionsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribePlayerSessionsResponse 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 DescribePlayerSessions
forall a. Maybe a
Prelude.Nothing
| Maybe [PlayerSession] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribePlayerSessions
DescribePlayerSessionsResponse
rs
DescribePlayerSessionsResponse
-> Getting
(First [PlayerSession])
DescribePlayerSessionsResponse
[PlayerSession]
-> Maybe [PlayerSession]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [PlayerSession]
-> Const (First [PlayerSession]) (Maybe [PlayerSession]))
-> DescribePlayerSessionsResponse
-> Const (First [PlayerSession]) DescribePlayerSessionsResponse
Lens' DescribePlayerSessionsResponse (Maybe [PlayerSession])
describePlayerSessionsResponse_playerSessions
((Maybe [PlayerSession]
-> Const (First [PlayerSession]) (Maybe [PlayerSession]))
-> DescribePlayerSessionsResponse
-> Const (First [PlayerSession]) DescribePlayerSessionsResponse)
-> (([PlayerSession]
-> Const (First [PlayerSession]) [PlayerSession])
-> Maybe [PlayerSession]
-> Const (First [PlayerSession]) (Maybe [PlayerSession]))
-> Getting
(First [PlayerSession])
DescribePlayerSessionsResponse
[PlayerSession]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([PlayerSession] -> Const (First [PlayerSession]) [PlayerSession])
-> Maybe [PlayerSession]
-> Const (First [PlayerSession]) (Maybe [PlayerSession])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribePlayerSessions
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
DescribePlayerSessions -> Maybe DescribePlayerSessions
forall a. a -> Maybe a
Prelude.Just (DescribePlayerSessions -> Maybe DescribePlayerSessions)
-> DescribePlayerSessions -> Maybe DescribePlayerSessions
forall a b. (a -> b) -> a -> b
Prelude.$
DescribePlayerSessions
rq
DescribePlayerSessions
-> (DescribePlayerSessions -> DescribePlayerSessions)
-> DescribePlayerSessions
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribePlayerSessions -> Identity DescribePlayerSessions
Lens
DescribePlayerSessions
DescribePlayerSessions
(Maybe Text)
(Maybe Text)
describePlayerSessions_nextToken
((Maybe Text -> Identity (Maybe Text))
-> DescribePlayerSessions -> Identity DescribePlayerSessions)
-> Maybe Text -> DescribePlayerSessions -> DescribePlayerSessions
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribePlayerSessions
DescribePlayerSessionsResponse
rs
DescribePlayerSessionsResponse
-> Getting (First Text) DescribePlayerSessionsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribePlayerSessionsResponse
-> Const (First Text) DescribePlayerSessionsResponse
Lens' DescribePlayerSessionsResponse (Maybe Text)
describePlayerSessionsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribePlayerSessionsResponse
-> Const (First Text) DescribePlayerSessionsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribePlayerSessionsResponse 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 DescribePlayerSessions where
type
AWSResponse DescribePlayerSessions =
DescribePlayerSessionsResponse
request :: DescribePlayerSessions -> Request DescribePlayerSessions
request = Service -> DescribePlayerSessions -> Request DescribePlayerSessions
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DescribePlayerSessions
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribePlayerSessions)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribePlayerSessions))
-> Logger
-> Service
-> Proxy DescribePlayerSessions
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribePlayerSessions)))
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 Text
-> Maybe [PlayerSession] -> Int -> DescribePlayerSessionsResponse
DescribePlayerSessionsResponse'
(Maybe Text
-> Maybe [PlayerSession] -> Int -> DescribePlayerSessionsResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe [PlayerSession] -> Int -> DescribePlayerSessionsResponse)
forall (f :: * -> *) a b. Functor 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
(Maybe [PlayerSession] -> Int -> DescribePlayerSessionsResponse)
-> Either String (Maybe [PlayerSession])
-> Either String (Int -> DescribePlayerSessionsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [PlayerSession]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"PlayerSessions" Either String (Maybe (Maybe [PlayerSession]))
-> Maybe [PlayerSession] -> Either String (Maybe [PlayerSession])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [PlayerSession]
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> DescribePlayerSessionsResponse)
-> Either String Int
-> Either String DescribePlayerSessionsResponse
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 DescribePlayerSessions
instance Prelude.NFData DescribePlayerSessions
instance Core.ToHeaders DescribePlayerSessions where
toHeaders :: DescribePlayerSessions -> ResponseHeaders
toHeaders =
ResponseHeaders -> DescribePlayerSessions -> 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.DescribePlayerSessions" ::
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 DescribePlayerSessions where
toJSON :: DescribePlayerSessions -> Value
toJSON DescribePlayerSessions' {Maybe Natural
Maybe Text
playerSessionStatusFilter :: Maybe Text
playerId :: Maybe Text
playerSessionId :: Maybe Text
limit :: Maybe Natural
nextToken :: Maybe Text
gameSessionId :: Maybe Text
$sel:playerSessionStatusFilter:DescribePlayerSessions' :: DescribePlayerSessions -> Maybe Text
$sel:playerId:DescribePlayerSessions' :: DescribePlayerSessions -> Maybe Text
$sel:playerSessionId:DescribePlayerSessions' :: DescribePlayerSessions -> Maybe Text
$sel:limit:DescribePlayerSessions' :: DescribePlayerSessions -> Maybe Natural
$sel:nextToken:DescribePlayerSessions' :: DescribePlayerSessions -> Maybe Text
$sel:gameSessionId:DescribePlayerSessions' :: DescribePlayerSessions -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"GameSessionId" 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
gameSessionId,
(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
"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,
(Text
"PlayerSessionId" 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
playerSessionId,
(Text
"PlayerId" 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
playerId,
(Text
"PlayerSessionStatusFilter" 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
playerSessionStatusFilter
]
)
instance Core.ToPath DescribePlayerSessions where
toPath :: DescribePlayerSessions -> ByteString
toPath = ByteString -> DescribePlayerSessions -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribePlayerSessions where
toQuery :: DescribePlayerSessions -> QueryString
toQuery = QueryString -> DescribePlayerSessions -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribePlayerSessionsResponse = DescribePlayerSessionsResponse'
{
DescribePlayerSessionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribePlayerSessionsResponse -> Maybe [PlayerSession]
playerSessions :: Prelude.Maybe [PlayerSession],
DescribePlayerSessionsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribePlayerSessionsResponse
-> DescribePlayerSessionsResponse -> Bool
(DescribePlayerSessionsResponse
-> DescribePlayerSessionsResponse -> Bool)
-> (DescribePlayerSessionsResponse
-> DescribePlayerSessionsResponse -> Bool)
-> Eq DescribePlayerSessionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribePlayerSessionsResponse
-> DescribePlayerSessionsResponse -> Bool
$c/= :: DescribePlayerSessionsResponse
-> DescribePlayerSessionsResponse -> Bool
== :: DescribePlayerSessionsResponse
-> DescribePlayerSessionsResponse -> Bool
$c== :: DescribePlayerSessionsResponse
-> DescribePlayerSessionsResponse -> Bool
Prelude.Eq, ReadPrec [DescribePlayerSessionsResponse]
ReadPrec DescribePlayerSessionsResponse
Int -> ReadS DescribePlayerSessionsResponse
ReadS [DescribePlayerSessionsResponse]
(Int -> ReadS DescribePlayerSessionsResponse)
-> ReadS [DescribePlayerSessionsResponse]
-> ReadPrec DescribePlayerSessionsResponse
-> ReadPrec [DescribePlayerSessionsResponse]
-> Read DescribePlayerSessionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribePlayerSessionsResponse]
$creadListPrec :: ReadPrec [DescribePlayerSessionsResponse]
readPrec :: ReadPrec DescribePlayerSessionsResponse
$creadPrec :: ReadPrec DescribePlayerSessionsResponse
readList :: ReadS [DescribePlayerSessionsResponse]
$creadList :: ReadS [DescribePlayerSessionsResponse]
readsPrec :: Int -> ReadS DescribePlayerSessionsResponse
$creadsPrec :: Int -> ReadS DescribePlayerSessionsResponse
Prelude.Read, Int -> DescribePlayerSessionsResponse -> ShowS
[DescribePlayerSessionsResponse] -> ShowS
DescribePlayerSessionsResponse -> String
(Int -> DescribePlayerSessionsResponse -> ShowS)
-> (DescribePlayerSessionsResponse -> String)
-> ([DescribePlayerSessionsResponse] -> ShowS)
-> Show DescribePlayerSessionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribePlayerSessionsResponse] -> ShowS
$cshowList :: [DescribePlayerSessionsResponse] -> ShowS
show :: DescribePlayerSessionsResponse -> String
$cshow :: DescribePlayerSessionsResponse -> String
showsPrec :: Int -> DescribePlayerSessionsResponse -> ShowS
$cshowsPrec :: Int -> DescribePlayerSessionsResponse -> ShowS
Prelude.Show, (forall x.
DescribePlayerSessionsResponse
-> Rep DescribePlayerSessionsResponse x)
-> (forall x.
Rep DescribePlayerSessionsResponse x
-> DescribePlayerSessionsResponse)
-> Generic DescribePlayerSessionsResponse
forall x.
Rep DescribePlayerSessionsResponse x
-> DescribePlayerSessionsResponse
forall x.
DescribePlayerSessionsResponse
-> Rep DescribePlayerSessionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribePlayerSessionsResponse x
-> DescribePlayerSessionsResponse
$cfrom :: forall x.
DescribePlayerSessionsResponse
-> Rep DescribePlayerSessionsResponse x
Prelude.Generic)
newDescribePlayerSessionsResponse ::
Prelude.Int ->
DescribePlayerSessionsResponse
newDescribePlayerSessionsResponse :: Int -> DescribePlayerSessionsResponse
newDescribePlayerSessionsResponse Int
pHttpStatus_ =
DescribePlayerSessionsResponse' :: Maybe Text
-> Maybe [PlayerSession] -> Int -> DescribePlayerSessionsResponse
DescribePlayerSessionsResponse'
{ $sel:nextToken:DescribePlayerSessionsResponse' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:playerSessions:DescribePlayerSessionsResponse' :: Maybe [PlayerSession]
playerSessions = Maybe [PlayerSession]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribePlayerSessionsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describePlayerSessionsResponse_nextToken :: Lens.Lens' DescribePlayerSessionsResponse (Prelude.Maybe Prelude.Text)
describePlayerSessionsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribePlayerSessionsResponse
-> f DescribePlayerSessionsResponse
describePlayerSessionsResponse_nextToken = (DescribePlayerSessionsResponse -> Maybe Text)
-> (DescribePlayerSessionsResponse
-> Maybe Text -> DescribePlayerSessionsResponse)
-> Lens' DescribePlayerSessionsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePlayerSessionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribePlayerSessionsResponse' :: DescribePlayerSessionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribePlayerSessionsResponse
s@DescribePlayerSessionsResponse' {} Maybe Text
a -> DescribePlayerSessionsResponse
s {$sel:nextToken:DescribePlayerSessionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribePlayerSessionsResponse)
describePlayerSessionsResponse_playerSessions :: Lens.Lens' DescribePlayerSessionsResponse (Prelude.Maybe [PlayerSession])
describePlayerSessionsResponse_playerSessions :: (Maybe [PlayerSession] -> f (Maybe [PlayerSession]))
-> DescribePlayerSessionsResponse
-> f DescribePlayerSessionsResponse
describePlayerSessionsResponse_playerSessions = (DescribePlayerSessionsResponse -> Maybe [PlayerSession])
-> (DescribePlayerSessionsResponse
-> Maybe [PlayerSession] -> DescribePlayerSessionsResponse)
-> Lens' DescribePlayerSessionsResponse (Maybe [PlayerSession])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePlayerSessionsResponse' {Maybe [PlayerSession]
playerSessions :: Maybe [PlayerSession]
$sel:playerSessions:DescribePlayerSessionsResponse' :: DescribePlayerSessionsResponse -> Maybe [PlayerSession]
playerSessions} -> Maybe [PlayerSession]
playerSessions) (\s :: DescribePlayerSessionsResponse
s@DescribePlayerSessionsResponse' {} Maybe [PlayerSession]
a -> DescribePlayerSessionsResponse
s {$sel:playerSessions:DescribePlayerSessionsResponse' :: Maybe [PlayerSession]
playerSessions = Maybe [PlayerSession]
a} :: DescribePlayerSessionsResponse) ((Maybe [PlayerSession] -> f (Maybe [PlayerSession]))
-> DescribePlayerSessionsResponse
-> f DescribePlayerSessionsResponse)
-> ((Maybe [PlayerSession] -> f (Maybe [PlayerSession]))
-> Maybe [PlayerSession] -> f (Maybe [PlayerSession]))
-> (Maybe [PlayerSession] -> f (Maybe [PlayerSession]))
-> DescribePlayerSessionsResponse
-> f DescribePlayerSessionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[PlayerSession] [PlayerSession] [PlayerSession] [PlayerSession]
-> Iso
(Maybe [PlayerSession])
(Maybe [PlayerSession])
(Maybe [PlayerSession])
(Maybe [PlayerSession])
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
[PlayerSession] [PlayerSession] [PlayerSession] [PlayerSession]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describePlayerSessionsResponse_httpStatus :: Lens.Lens' DescribePlayerSessionsResponse Prelude.Int
describePlayerSessionsResponse_httpStatus :: (Int -> f Int)
-> DescribePlayerSessionsResponse
-> f DescribePlayerSessionsResponse
describePlayerSessionsResponse_httpStatus = (DescribePlayerSessionsResponse -> Int)
-> (DescribePlayerSessionsResponse
-> Int -> DescribePlayerSessionsResponse)
-> Lens
DescribePlayerSessionsResponse
DescribePlayerSessionsResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePlayerSessionsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribePlayerSessionsResponse' :: DescribePlayerSessionsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribePlayerSessionsResponse
s@DescribePlayerSessionsResponse' {} Int
a -> DescribePlayerSessionsResponse
s {$sel:httpStatus:DescribePlayerSessionsResponse' :: Int
httpStatus = Int
a} :: DescribePlayerSessionsResponse)
instance
Prelude.NFData
DescribePlayerSessionsResponse