{-# 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.DescribeGameSessionDetails
(
DescribeGameSessionDetails (..),
newDescribeGameSessionDetails,
describeGameSessionDetails_location,
describeGameSessionDetails_gameSessionId,
describeGameSessionDetails_aliasId,
describeGameSessionDetails_nextToken,
describeGameSessionDetails_statusFilter,
describeGameSessionDetails_limit,
describeGameSessionDetails_fleetId,
DescribeGameSessionDetailsResponse (..),
newDescribeGameSessionDetailsResponse,
describeGameSessionDetailsResponse_gameSessionDetails,
describeGameSessionDetailsResponse_nextToken,
describeGameSessionDetailsResponse_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 DescribeGameSessionDetails = DescribeGameSessionDetails'
{
DescribeGameSessionDetails -> Maybe Text
location :: Prelude.Maybe Prelude.Text,
DescribeGameSessionDetails -> Maybe Text
gameSessionId :: Prelude.Maybe Prelude.Text,
DescribeGameSessionDetails -> Maybe Text
aliasId :: Prelude.Maybe Prelude.Text,
DescribeGameSessionDetails -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeGameSessionDetails -> Maybe Text
statusFilter :: Prelude.Maybe Prelude.Text,
DescribeGameSessionDetails -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
DescribeGameSessionDetails -> Maybe Text
fleetId :: Prelude.Maybe Prelude.Text
}
deriving (DescribeGameSessionDetails -> DescribeGameSessionDetails -> Bool
(DescribeGameSessionDetails -> DescribeGameSessionDetails -> Bool)
-> (DescribeGameSessionDetails
-> DescribeGameSessionDetails -> Bool)
-> Eq DescribeGameSessionDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeGameSessionDetails -> DescribeGameSessionDetails -> Bool
$c/= :: DescribeGameSessionDetails -> DescribeGameSessionDetails -> Bool
== :: DescribeGameSessionDetails -> DescribeGameSessionDetails -> Bool
$c== :: DescribeGameSessionDetails -> DescribeGameSessionDetails -> Bool
Prelude.Eq, ReadPrec [DescribeGameSessionDetails]
ReadPrec DescribeGameSessionDetails
Int -> ReadS DescribeGameSessionDetails
ReadS [DescribeGameSessionDetails]
(Int -> ReadS DescribeGameSessionDetails)
-> ReadS [DescribeGameSessionDetails]
-> ReadPrec DescribeGameSessionDetails
-> ReadPrec [DescribeGameSessionDetails]
-> Read DescribeGameSessionDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeGameSessionDetails]
$creadListPrec :: ReadPrec [DescribeGameSessionDetails]
readPrec :: ReadPrec DescribeGameSessionDetails
$creadPrec :: ReadPrec DescribeGameSessionDetails
readList :: ReadS [DescribeGameSessionDetails]
$creadList :: ReadS [DescribeGameSessionDetails]
readsPrec :: Int -> ReadS DescribeGameSessionDetails
$creadsPrec :: Int -> ReadS DescribeGameSessionDetails
Prelude.Read, Int -> DescribeGameSessionDetails -> ShowS
[DescribeGameSessionDetails] -> ShowS
DescribeGameSessionDetails -> String
(Int -> DescribeGameSessionDetails -> ShowS)
-> (DescribeGameSessionDetails -> String)
-> ([DescribeGameSessionDetails] -> ShowS)
-> Show DescribeGameSessionDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeGameSessionDetails] -> ShowS
$cshowList :: [DescribeGameSessionDetails] -> ShowS
show :: DescribeGameSessionDetails -> String
$cshow :: DescribeGameSessionDetails -> String
showsPrec :: Int -> DescribeGameSessionDetails -> ShowS
$cshowsPrec :: Int -> DescribeGameSessionDetails -> ShowS
Prelude.Show, (forall x.
DescribeGameSessionDetails -> Rep DescribeGameSessionDetails x)
-> (forall x.
Rep DescribeGameSessionDetails x -> DescribeGameSessionDetails)
-> Generic DescribeGameSessionDetails
forall x.
Rep DescribeGameSessionDetails x -> DescribeGameSessionDetails
forall x.
DescribeGameSessionDetails -> Rep DescribeGameSessionDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeGameSessionDetails x -> DescribeGameSessionDetails
$cfrom :: forall x.
DescribeGameSessionDetails -> Rep DescribeGameSessionDetails x
Prelude.Generic)
newDescribeGameSessionDetails ::
DescribeGameSessionDetails
newDescribeGameSessionDetails :: DescribeGameSessionDetails
newDescribeGameSessionDetails =
DescribeGameSessionDetails' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> DescribeGameSessionDetails
DescribeGameSessionDetails'
{ $sel:location:DescribeGameSessionDetails' :: Maybe Text
location =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:gameSessionId:DescribeGameSessionDetails' :: Maybe Text
gameSessionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:aliasId:DescribeGameSessionDetails' :: Maybe Text
aliasId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeGameSessionDetails' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:statusFilter:DescribeGameSessionDetails' :: Maybe Text
statusFilter = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:limit:DescribeGameSessionDetails' :: Maybe Natural
limit = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:fleetId:DescribeGameSessionDetails' :: Maybe Text
fleetId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
describeGameSessionDetails_location :: Lens.Lens' DescribeGameSessionDetails (Prelude.Maybe Prelude.Text)
describeGameSessionDetails_location :: (Maybe Text -> f (Maybe Text))
-> DescribeGameSessionDetails -> f DescribeGameSessionDetails
describeGameSessionDetails_location = (DescribeGameSessionDetails -> Maybe Text)
-> (DescribeGameSessionDetails
-> Maybe Text -> DescribeGameSessionDetails)
-> Lens
DescribeGameSessionDetails
DescribeGameSessionDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGameSessionDetails' {Maybe Text
location :: Maybe Text
$sel:location:DescribeGameSessionDetails' :: DescribeGameSessionDetails -> Maybe Text
location} -> Maybe Text
location) (\s :: DescribeGameSessionDetails
s@DescribeGameSessionDetails' {} Maybe Text
a -> DescribeGameSessionDetails
s {$sel:location:DescribeGameSessionDetails' :: Maybe Text
location = Maybe Text
a} :: DescribeGameSessionDetails)
describeGameSessionDetails_gameSessionId :: Lens.Lens' DescribeGameSessionDetails (Prelude.Maybe Prelude.Text)
describeGameSessionDetails_gameSessionId :: (Maybe Text -> f (Maybe Text))
-> DescribeGameSessionDetails -> f DescribeGameSessionDetails
describeGameSessionDetails_gameSessionId = (DescribeGameSessionDetails -> Maybe Text)
-> (DescribeGameSessionDetails
-> Maybe Text -> DescribeGameSessionDetails)
-> Lens
DescribeGameSessionDetails
DescribeGameSessionDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGameSessionDetails' {Maybe Text
gameSessionId :: Maybe Text
$sel:gameSessionId:DescribeGameSessionDetails' :: DescribeGameSessionDetails -> Maybe Text
gameSessionId} -> Maybe Text
gameSessionId) (\s :: DescribeGameSessionDetails
s@DescribeGameSessionDetails' {} Maybe Text
a -> DescribeGameSessionDetails
s {$sel:gameSessionId:DescribeGameSessionDetails' :: Maybe Text
gameSessionId = Maybe Text
a} :: DescribeGameSessionDetails)
describeGameSessionDetails_aliasId :: Lens.Lens' DescribeGameSessionDetails (Prelude.Maybe Prelude.Text)
describeGameSessionDetails_aliasId :: (Maybe Text -> f (Maybe Text))
-> DescribeGameSessionDetails -> f DescribeGameSessionDetails
describeGameSessionDetails_aliasId = (DescribeGameSessionDetails -> Maybe Text)
-> (DescribeGameSessionDetails
-> Maybe Text -> DescribeGameSessionDetails)
-> Lens
DescribeGameSessionDetails
DescribeGameSessionDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGameSessionDetails' {Maybe Text
aliasId :: Maybe Text
$sel:aliasId:DescribeGameSessionDetails' :: DescribeGameSessionDetails -> Maybe Text
aliasId} -> Maybe Text
aliasId) (\s :: DescribeGameSessionDetails
s@DescribeGameSessionDetails' {} Maybe Text
a -> DescribeGameSessionDetails
s {$sel:aliasId:DescribeGameSessionDetails' :: Maybe Text
aliasId = Maybe Text
a} :: DescribeGameSessionDetails)
describeGameSessionDetails_nextToken :: Lens.Lens' DescribeGameSessionDetails (Prelude.Maybe Prelude.Text)
describeGameSessionDetails_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeGameSessionDetails -> f DescribeGameSessionDetails
describeGameSessionDetails_nextToken = (DescribeGameSessionDetails -> Maybe Text)
-> (DescribeGameSessionDetails
-> Maybe Text -> DescribeGameSessionDetails)
-> Lens
DescribeGameSessionDetails
DescribeGameSessionDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGameSessionDetails' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeGameSessionDetails' :: DescribeGameSessionDetails -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeGameSessionDetails
s@DescribeGameSessionDetails' {} Maybe Text
a -> DescribeGameSessionDetails
s {$sel:nextToken:DescribeGameSessionDetails' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeGameSessionDetails)
describeGameSessionDetails_statusFilter :: Lens.Lens' DescribeGameSessionDetails (Prelude.Maybe Prelude.Text)
describeGameSessionDetails_statusFilter :: (Maybe Text -> f (Maybe Text))
-> DescribeGameSessionDetails -> f DescribeGameSessionDetails
describeGameSessionDetails_statusFilter = (DescribeGameSessionDetails -> Maybe Text)
-> (DescribeGameSessionDetails
-> Maybe Text -> DescribeGameSessionDetails)
-> Lens
DescribeGameSessionDetails
DescribeGameSessionDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGameSessionDetails' {Maybe Text
statusFilter :: Maybe Text
$sel:statusFilter:DescribeGameSessionDetails' :: DescribeGameSessionDetails -> Maybe Text
statusFilter} -> Maybe Text
statusFilter) (\s :: DescribeGameSessionDetails
s@DescribeGameSessionDetails' {} Maybe Text
a -> DescribeGameSessionDetails
s {$sel:statusFilter:DescribeGameSessionDetails' :: Maybe Text
statusFilter = Maybe Text
a} :: DescribeGameSessionDetails)
describeGameSessionDetails_limit :: Lens.Lens' DescribeGameSessionDetails (Prelude.Maybe Prelude.Natural)
describeGameSessionDetails_limit :: (Maybe Natural -> f (Maybe Natural))
-> DescribeGameSessionDetails -> f DescribeGameSessionDetails
describeGameSessionDetails_limit = (DescribeGameSessionDetails -> Maybe Natural)
-> (DescribeGameSessionDetails
-> Maybe Natural -> DescribeGameSessionDetails)
-> Lens
DescribeGameSessionDetails
DescribeGameSessionDetails
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGameSessionDetails' {Maybe Natural
limit :: Maybe Natural
$sel:limit:DescribeGameSessionDetails' :: DescribeGameSessionDetails -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: DescribeGameSessionDetails
s@DescribeGameSessionDetails' {} Maybe Natural
a -> DescribeGameSessionDetails
s {$sel:limit:DescribeGameSessionDetails' :: Maybe Natural
limit = Maybe Natural
a} :: DescribeGameSessionDetails)
describeGameSessionDetails_fleetId :: Lens.Lens' DescribeGameSessionDetails (Prelude.Maybe Prelude.Text)
describeGameSessionDetails_fleetId :: (Maybe Text -> f (Maybe Text))
-> DescribeGameSessionDetails -> f DescribeGameSessionDetails
describeGameSessionDetails_fleetId = (DescribeGameSessionDetails -> Maybe Text)
-> (DescribeGameSessionDetails
-> Maybe Text -> DescribeGameSessionDetails)
-> Lens
DescribeGameSessionDetails
DescribeGameSessionDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGameSessionDetails' {Maybe Text
fleetId :: Maybe Text
$sel:fleetId:DescribeGameSessionDetails' :: DescribeGameSessionDetails -> Maybe Text
fleetId} -> Maybe Text
fleetId) (\s :: DescribeGameSessionDetails
s@DescribeGameSessionDetails' {} Maybe Text
a -> DescribeGameSessionDetails
s {$sel:fleetId:DescribeGameSessionDetails' :: Maybe Text
fleetId = Maybe Text
a} :: DescribeGameSessionDetails)
instance Core.AWSPager DescribeGameSessionDetails where
page :: DescribeGameSessionDetails
-> AWSResponse DescribeGameSessionDetails
-> Maybe DescribeGameSessionDetails
page DescribeGameSessionDetails
rq AWSResponse DescribeGameSessionDetails
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeGameSessionDetails
DescribeGameSessionDetailsResponse
rs
DescribeGameSessionDetailsResponse
-> Getting (First Text) DescribeGameSessionDetailsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeGameSessionDetailsResponse
-> Const (First Text) DescribeGameSessionDetailsResponse
Lens' DescribeGameSessionDetailsResponse (Maybe Text)
describeGameSessionDetailsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeGameSessionDetailsResponse
-> Const (First Text) DescribeGameSessionDetailsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeGameSessionDetailsResponse 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 DescribeGameSessionDetails
forall a. Maybe a
Prelude.Nothing
| Maybe [GameSessionDetail] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeGameSessionDetails
DescribeGameSessionDetailsResponse
rs
DescribeGameSessionDetailsResponse
-> Getting
(First [GameSessionDetail])
DescribeGameSessionDetailsResponse
[GameSessionDetail]
-> Maybe [GameSessionDetail]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [GameSessionDetail]
-> Const (First [GameSessionDetail]) (Maybe [GameSessionDetail]))
-> DescribeGameSessionDetailsResponse
-> Const
(First [GameSessionDetail]) DescribeGameSessionDetailsResponse
Lens'
DescribeGameSessionDetailsResponse (Maybe [GameSessionDetail])
describeGameSessionDetailsResponse_gameSessionDetails
((Maybe [GameSessionDetail]
-> Const (First [GameSessionDetail]) (Maybe [GameSessionDetail]))
-> DescribeGameSessionDetailsResponse
-> Const
(First [GameSessionDetail]) DescribeGameSessionDetailsResponse)
-> (([GameSessionDetail]
-> Const (First [GameSessionDetail]) [GameSessionDetail])
-> Maybe [GameSessionDetail]
-> Const (First [GameSessionDetail]) (Maybe [GameSessionDetail]))
-> Getting
(First [GameSessionDetail])
DescribeGameSessionDetailsResponse
[GameSessionDetail]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([GameSessionDetail]
-> Const (First [GameSessionDetail]) [GameSessionDetail])
-> Maybe [GameSessionDetail]
-> Const (First [GameSessionDetail]) (Maybe [GameSessionDetail])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeGameSessionDetails
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
DescribeGameSessionDetails -> Maybe DescribeGameSessionDetails
forall a. a -> Maybe a
Prelude.Just (DescribeGameSessionDetails -> Maybe DescribeGameSessionDetails)
-> DescribeGameSessionDetails -> Maybe DescribeGameSessionDetails
forall a b. (a -> b) -> a -> b
Prelude.$
DescribeGameSessionDetails
rq
DescribeGameSessionDetails
-> (DescribeGameSessionDetails -> DescribeGameSessionDetails)
-> DescribeGameSessionDetails
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeGameSessionDetails
-> Identity DescribeGameSessionDetails
Lens
DescribeGameSessionDetails
DescribeGameSessionDetails
(Maybe Text)
(Maybe Text)
describeGameSessionDetails_nextToken
((Maybe Text -> Identity (Maybe Text))
-> DescribeGameSessionDetails
-> Identity DescribeGameSessionDetails)
-> Maybe Text
-> DescribeGameSessionDetails
-> DescribeGameSessionDetails
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeGameSessionDetails
DescribeGameSessionDetailsResponse
rs
DescribeGameSessionDetailsResponse
-> Getting (First Text) DescribeGameSessionDetailsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeGameSessionDetailsResponse
-> Const (First Text) DescribeGameSessionDetailsResponse
Lens' DescribeGameSessionDetailsResponse (Maybe Text)
describeGameSessionDetailsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeGameSessionDetailsResponse
-> Const (First Text) DescribeGameSessionDetailsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeGameSessionDetailsResponse 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 DescribeGameSessionDetails where
type
AWSResponse DescribeGameSessionDetails =
DescribeGameSessionDetailsResponse
request :: DescribeGameSessionDetails -> Request DescribeGameSessionDetails
request = Service
-> DescribeGameSessionDetails -> Request DescribeGameSessionDetails
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeGameSessionDetails
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeGameSessionDetails)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeGameSessionDetails))
-> Logger
-> Service
-> Proxy DescribeGameSessionDetails
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeGameSessionDetails)))
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 [GameSessionDetail]
-> Maybe Text -> Int -> DescribeGameSessionDetailsResponse
DescribeGameSessionDetailsResponse'
(Maybe [GameSessionDetail]
-> Maybe Text -> Int -> DescribeGameSessionDetailsResponse)
-> Either String (Maybe [GameSessionDetail])
-> Either
String (Maybe Text -> Int -> DescribeGameSessionDetailsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Either String (Maybe (Maybe [GameSessionDetail]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"GameSessionDetails"
Either String (Maybe (Maybe [GameSessionDetail]))
-> Maybe [GameSessionDetail]
-> Either String (Maybe [GameSessionDetail])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [GameSessionDetail]
forall a. Monoid a => a
Prelude.mempty
)
Either
String (Maybe Text -> Int -> DescribeGameSessionDetailsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeGameSessionDetailsResponse)
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 -> DescribeGameSessionDetailsResponse)
-> Either String Int
-> Either String DescribeGameSessionDetailsResponse
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 DescribeGameSessionDetails
instance Prelude.NFData DescribeGameSessionDetails
instance Core.ToHeaders DescribeGameSessionDetails where
toHeaders :: DescribeGameSessionDetails -> ResponseHeaders
toHeaders =
ResponseHeaders -> DescribeGameSessionDetails -> 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.DescribeGameSessionDetails" ::
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 DescribeGameSessionDetails where
toJSON :: DescribeGameSessionDetails -> Value
toJSON DescribeGameSessionDetails' {Maybe Natural
Maybe Text
fleetId :: Maybe Text
limit :: Maybe Natural
statusFilter :: Maybe Text
nextToken :: Maybe Text
aliasId :: Maybe Text
gameSessionId :: Maybe Text
location :: Maybe Text
$sel:fleetId:DescribeGameSessionDetails' :: DescribeGameSessionDetails -> Maybe Text
$sel:limit:DescribeGameSessionDetails' :: DescribeGameSessionDetails -> Maybe Natural
$sel:statusFilter:DescribeGameSessionDetails' :: DescribeGameSessionDetails -> Maybe Text
$sel:nextToken:DescribeGameSessionDetails' :: DescribeGameSessionDetails -> Maybe Text
$sel:aliasId:DescribeGameSessionDetails' :: DescribeGameSessionDetails -> Maybe Text
$sel:gameSessionId:DescribeGameSessionDetails' :: DescribeGameSessionDetails -> Maybe Text
$sel:location:DescribeGameSessionDetails' :: DescribeGameSessionDetails -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Location" 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
location,
(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
"AliasId" 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
aliasId,
(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
"StatusFilter" 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
statusFilter,
(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
"FleetId" 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
fleetId
]
)
instance Core.ToPath DescribeGameSessionDetails where
toPath :: DescribeGameSessionDetails -> ByteString
toPath = ByteString -> DescribeGameSessionDetails -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeGameSessionDetails where
toQuery :: DescribeGameSessionDetails -> QueryString
toQuery = QueryString -> DescribeGameSessionDetails -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeGameSessionDetailsResponse = DescribeGameSessionDetailsResponse'
{
DescribeGameSessionDetailsResponse -> Maybe [GameSessionDetail]
gameSessionDetails :: Prelude.Maybe [GameSessionDetail],
DescribeGameSessionDetailsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeGameSessionDetailsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeGameSessionDetailsResponse
-> DescribeGameSessionDetailsResponse -> Bool
(DescribeGameSessionDetailsResponse
-> DescribeGameSessionDetailsResponse -> Bool)
-> (DescribeGameSessionDetailsResponse
-> DescribeGameSessionDetailsResponse -> Bool)
-> Eq DescribeGameSessionDetailsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeGameSessionDetailsResponse
-> DescribeGameSessionDetailsResponse -> Bool
$c/= :: DescribeGameSessionDetailsResponse
-> DescribeGameSessionDetailsResponse -> Bool
== :: DescribeGameSessionDetailsResponse
-> DescribeGameSessionDetailsResponse -> Bool
$c== :: DescribeGameSessionDetailsResponse
-> DescribeGameSessionDetailsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeGameSessionDetailsResponse]
ReadPrec DescribeGameSessionDetailsResponse
Int -> ReadS DescribeGameSessionDetailsResponse
ReadS [DescribeGameSessionDetailsResponse]
(Int -> ReadS DescribeGameSessionDetailsResponse)
-> ReadS [DescribeGameSessionDetailsResponse]
-> ReadPrec DescribeGameSessionDetailsResponse
-> ReadPrec [DescribeGameSessionDetailsResponse]
-> Read DescribeGameSessionDetailsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeGameSessionDetailsResponse]
$creadListPrec :: ReadPrec [DescribeGameSessionDetailsResponse]
readPrec :: ReadPrec DescribeGameSessionDetailsResponse
$creadPrec :: ReadPrec DescribeGameSessionDetailsResponse
readList :: ReadS [DescribeGameSessionDetailsResponse]
$creadList :: ReadS [DescribeGameSessionDetailsResponse]
readsPrec :: Int -> ReadS DescribeGameSessionDetailsResponse
$creadsPrec :: Int -> ReadS DescribeGameSessionDetailsResponse
Prelude.Read, Int -> DescribeGameSessionDetailsResponse -> ShowS
[DescribeGameSessionDetailsResponse] -> ShowS
DescribeGameSessionDetailsResponse -> String
(Int -> DescribeGameSessionDetailsResponse -> ShowS)
-> (DescribeGameSessionDetailsResponse -> String)
-> ([DescribeGameSessionDetailsResponse] -> ShowS)
-> Show DescribeGameSessionDetailsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeGameSessionDetailsResponse] -> ShowS
$cshowList :: [DescribeGameSessionDetailsResponse] -> ShowS
show :: DescribeGameSessionDetailsResponse -> String
$cshow :: DescribeGameSessionDetailsResponse -> String
showsPrec :: Int -> DescribeGameSessionDetailsResponse -> ShowS
$cshowsPrec :: Int -> DescribeGameSessionDetailsResponse -> ShowS
Prelude.Show, (forall x.
DescribeGameSessionDetailsResponse
-> Rep DescribeGameSessionDetailsResponse x)
-> (forall x.
Rep DescribeGameSessionDetailsResponse x
-> DescribeGameSessionDetailsResponse)
-> Generic DescribeGameSessionDetailsResponse
forall x.
Rep DescribeGameSessionDetailsResponse x
-> DescribeGameSessionDetailsResponse
forall x.
DescribeGameSessionDetailsResponse
-> Rep DescribeGameSessionDetailsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeGameSessionDetailsResponse x
-> DescribeGameSessionDetailsResponse
$cfrom :: forall x.
DescribeGameSessionDetailsResponse
-> Rep DescribeGameSessionDetailsResponse x
Prelude.Generic)
newDescribeGameSessionDetailsResponse ::
Prelude.Int ->
DescribeGameSessionDetailsResponse
newDescribeGameSessionDetailsResponse :: Int -> DescribeGameSessionDetailsResponse
newDescribeGameSessionDetailsResponse Int
pHttpStatus_ =
DescribeGameSessionDetailsResponse' :: Maybe [GameSessionDetail]
-> Maybe Text -> Int -> DescribeGameSessionDetailsResponse
DescribeGameSessionDetailsResponse'
{ $sel:gameSessionDetails:DescribeGameSessionDetailsResponse' :: Maybe [GameSessionDetail]
gameSessionDetails =
Maybe [GameSessionDetail]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeGameSessionDetailsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeGameSessionDetailsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeGameSessionDetailsResponse_gameSessionDetails :: Lens.Lens' DescribeGameSessionDetailsResponse (Prelude.Maybe [GameSessionDetail])
describeGameSessionDetailsResponse_gameSessionDetails :: (Maybe [GameSessionDetail] -> f (Maybe [GameSessionDetail]))
-> DescribeGameSessionDetailsResponse
-> f DescribeGameSessionDetailsResponse
describeGameSessionDetailsResponse_gameSessionDetails = (DescribeGameSessionDetailsResponse -> Maybe [GameSessionDetail])
-> (DescribeGameSessionDetailsResponse
-> Maybe [GameSessionDetail] -> DescribeGameSessionDetailsResponse)
-> Lens'
DescribeGameSessionDetailsResponse (Maybe [GameSessionDetail])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGameSessionDetailsResponse' {Maybe [GameSessionDetail]
gameSessionDetails :: Maybe [GameSessionDetail]
$sel:gameSessionDetails:DescribeGameSessionDetailsResponse' :: DescribeGameSessionDetailsResponse -> Maybe [GameSessionDetail]
gameSessionDetails} -> Maybe [GameSessionDetail]
gameSessionDetails) (\s :: DescribeGameSessionDetailsResponse
s@DescribeGameSessionDetailsResponse' {} Maybe [GameSessionDetail]
a -> DescribeGameSessionDetailsResponse
s {$sel:gameSessionDetails:DescribeGameSessionDetailsResponse' :: Maybe [GameSessionDetail]
gameSessionDetails = Maybe [GameSessionDetail]
a} :: DescribeGameSessionDetailsResponse) ((Maybe [GameSessionDetail] -> f (Maybe [GameSessionDetail]))
-> DescribeGameSessionDetailsResponse
-> f DescribeGameSessionDetailsResponse)
-> ((Maybe [GameSessionDetail] -> f (Maybe [GameSessionDetail]))
-> Maybe [GameSessionDetail] -> f (Maybe [GameSessionDetail]))
-> (Maybe [GameSessionDetail] -> f (Maybe [GameSessionDetail]))
-> DescribeGameSessionDetailsResponse
-> f DescribeGameSessionDetailsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[GameSessionDetail]
[GameSessionDetail]
[GameSessionDetail]
[GameSessionDetail]
-> Iso
(Maybe [GameSessionDetail])
(Maybe [GameSessionDetail])
(Maybe [GameSessionDetail])
(Maybe [GameSessionDetail])
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
[GameSessionDetail]
[GameSessionDetail]
[GameSessionDetail]
[GameSessionDetail]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeGameSessionDetailsResponse_nextToken :: Lens.Lens' DescribeGameSessionDetailsResponse (Prelude.Maybe Prelude.Text)
describeGameSessionDetailsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeGameSessionDetailsResponse
-> f DescribeGameSessionDetailsResponse
describeGameSessionDetailsResponse_nextToken = (DescribeGameSessionDetailsResponse -> Maybe Text)
-> (DescribeGameSessionDetailsResponse
-> Maybe Text -> DescribeGameSessionDetailsResponse)
-> Lens' DescribeGameSessionDetailsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGameSessionDetailsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeGameSessionDetailsResponse' :: DescribeGameSessionDetailsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeGameSessionDetailsResponse
s@DescribeGameSessionDetailsResponse' {} Maybe Text
a -> DescribeGameSessionDetailsResponse
s {$sel:nextToken:DescribeGameSessionDetailsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeGameSessionDetailsResponse)
describeGameSessionDetailsResponse_httpStatus :: Lens.Lens' DescribeGameSessionDetailsResponse Prelude.Int
describeGameSessionDetailsResponse_httpStatus :: (Int -> f Int)
-> DescribeGameSessionDetailsResponse
-> f DescribeGameSessionDetailsResponse
describeGameSessionDetailsResponse_httpStatus = (DescribeGameSessionDetailsResponse -> Int)
-> (DescribeGameSessionDetailsResponse
-> Int -> DescribeGameSessionDetailsResponse)
-> Lens
DescribeGameSessionDetailsResponse
DescribeGameSessionDetailsResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGameSessionDetailsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeGameSessionDetailsResponse' :: DescribeGameSessionDetailsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeGameSessionDetailsResponse
s@DescribeGameSessionDetailsResponse' {} Int
a -> DescribeGameSessionDetailsResponse
s {$sel:httpStatus:DescribeGameSessionDetailsResponse' :: Int
httpStatus = Int
a} :: DescribeGameSessionDetailsResponse)
instance
Prelude.NFData
DescribeGameSessionDetailsResponse