{-# 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.DescribeGameSessions
(
DescribeGameSessions (..),
newDescribeGameSessions,
describeGameSessions_aliasId,
describeGameSessions_fleetId,
describeGameSessions_gameSessionId,
describeGameSessions_limit,
describeGameSessions_location,
describeGameSessions_nextToken,
describeGameSessions_statusFilter,
DescribeGameSessionsResponse (..),
newDescribeGameSessionsResponse,
describeGameSessionsResponse_gameSessions,
describeGameSessionsResponse_nextToken,
describeGameSessionsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.GameLift.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DescribeGameSessions = DescribeGameSessions'
{
DescribeGameSessions -> Maybe Text
aliasId :: Prelude.Maybe Prelude.Text,
DescribeGameSessions -> Maybe Text
fleetId :: Prelude.Maybe Prelude.Text,
DescribeGameSessions -> Maybe Text
gameSessionId :: Prelude.Maybe Prelude.Text,
DescribeGameSessions -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
DescribeGameSessions -> Maybe Text
location :: Prelude.Maybe Prelude.Text,
DescribeGameSessions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeGameSessions -> Maybe Text
statusFilter :: Prelude.Maybe Prelude.Text
}
deriving (DescribeGameSessions -> DescribeGameSessions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeGameSessions -> DescribeGameSessions -> Bool
$c/= :: DescribeGameSessions -> DescribeGameSessions -> Bool
== :: DescribeGameSessions -> DescribeGameSessions -> Bool
$c== :: DescribeGameSessions -> DescribeGameSessions -> Bool
Prelude.Eq, ReadPrec [DescribeGameSessions]
ReadPrec DescribeGameSessions
Int -> ReadS DescribeGameSessions
ReadS [DescribeGameSessions]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeGameSessions]
$creadListPrec :: ReadPrec [DescribeGameSessions]
readPrec :: ReadPrec DescribeGameSessions
$creadPrec :: ReadPrec DescribeGameSessions
readList :: ReadS [DescribeGameSessions]
$creadList :: ReadS [DescribeGameSessions]
readsPrec :: Int -> ReadS DescribeGameSessions
$creadsPrec :: Int -> ReadS DescribeGameSessions
Prelude.Read, Int -> DescribeGameSessions -> ShowS
[DescribeGameSessions] -> ShowS
DescribeGameSessions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeGameSessions] -> ShowS
$cshowList :: [DescribeGameSessions] -> ShowS
show :: DescribeGameSessions -> String
$cshow :: DescribeGameSessions -> String
showsPrec :: Int -> DescribeGameSessions -> ShowS
$cshowsPrec :: Int -> DescribeGameSessions -> ShowS
Prelude.Show, forall x. Rep DescribeGameSessions x -> DescribeGameSessions
forall x. DescribeGameSessions -> Rep DescribeGameSessions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeGameSessions x -> DescribeGameSessions
$cfrom :: forall x. DescribeGameSessions -> Rep DescribeGameSessions x
Prelude.Generic)
newDescribeGameSessions ::
DescribeGameSessions
newDescribeGameSessions :: DescribeGameSessions
newDescribeGameSessions =
DescribeGameSessions'
{ $sel:aliasId:DescribeGameSessions' :: Maybe Text
aliasId = forall a. Maybe a
Prelude.Nothing,
$sel:fleetId:DescribeGameSessions' :: Maybe Text
fleetId = forall a. Maybe a
Prelude.Nothing,
$sel:gameSessionId:DescribeGameSessions' :: Maybe Text
gameSessionId = forall a. Maybe a
Prelude.Nothing,
$sel:limit:DescribeGameSessions' :: Maybe Natural
limit = forall a. Maybe a
Prelude.Nothing,
$sel:location:DescribeGameSessions' :: Maybe Text
location = forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeGameSessions' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
$sel:statusFilter:DescribeGameSessions' :: Maybe Text
statusFilter = forall a. Maybe a
Prelude.Nothing
}
describeGameSessions_aliasId :: Lens.Lens' DescribeGameSessions (Prelude.Maybe Prelude.Text)
describeGameSessions_aliasId :: Lens' DescribeGameSessions (Maybe Text)
describeGameSessions_aliasId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGameSessions' {Maybe Text
aliasId :: Maybe Text
$sel:aliasId:DescribeGameSessions' :: DescribeGameSessions -> Maybe Text
aliasId} -> Maybe Text
aliasId) (\s :: DescribeGameSessions
s@DescribeGameSessions' {} Maybe Text
a -> DescribeGameSessions
s {$sel:aliasId:DescribeGameSessions' :: Maybe Text
aliasId = Maybe Text
a} :: DescribeGameSessions)
describeGameSessions_fleetId :: Lens.Lens' DescribeGameSessions (Prelude.Maybe Prelude.Text)
describeGameSessions_fleetId :: Lens' DescribeGameSessions (Maybe Text)
describeGameSessions_fleetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGameSessions' {Maybe Text
fleetId :: Maybe Text
$sel:fleetId:DescribeGameSessions' :: DescribeGameSessions -> Maybe Text
fleetId} -> Maybe Text
fleetId) (\s :: DescribeGameSessions
s@DescribeGameSessions' {} Maybe Text
a -> DescribeGameSessions
s {$sel:fleetId:DescribeGameSessions' :: Maybe Text
fleetId = Maybe Text
a} :: DescribeGameSessions)
describeGameSessions_gameSessionId :: Lens.Lens' DescribeGameSessions (Prelude.Maybe Prelude.Text)
describeGameSessions_gameSessionId :: Lens' DescribeGameSessions (Maybe Text)
describeGameSessions_gameSessionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGameSessions' {Maybe Text
gameSessionId :: Maybe Text
$sel:gameSessionId:DescribeGameSessions' :: DescribeGameSessions -> Maybe Text
gameSessionId} -> Maybe Text
gameSessionId) (\s :: DescribeGameSessions
s@DescribeGameSessions' {} Maybe Text
a -> DescribeGameSessions
s {$sel:gameSessionId:DescribeGameSessions' :: Maybe Text
gameSessionId = Maybe Text
a} :: DescribeGameSessions)
describeGameSessions_limit :: Lens.Lens' DescribeGameSessions (Prelude.Maybe Prelude.Natural)
describeGameSessions_limit :: Lens' DescribeGameSessions (Maybe Natural)
describeGameSessions_limit = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGameSessions' {Maybe Natural
limit :: Maybe Natural
$sel:limit:DescribeGameSessions' :: DescribeGameSessions -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: DescribeGameSessions
s@DescribeGameSessions' {} Maybe Natural
a -> DescribeGameSessions
s {$sel:limit:DescribeGameSessions' :: Maybe Natural
limit = Maybe Natural
a} :: DescribeGameSessions)
describeGameSessions_location :: Lens.Lens' DescribeGameSessions (Prelude.Maybe Prelude.Text)
describeGameSessions_location :: Lens' DescribeGameSessions (Maybe Text)
describeGameSessions_location = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGameSessions' {Maybe Text
location :: Maybe Text
$sel:location:DescribeGameSessions' :: DescribeGameSessions -> Maybe Text
location} -> Maybe Text
location) (\s :: DescribeGameSessions
s@DescribeGameSessions' {} Maybe Text
a -> DescribeGameSessions
s {$sel:location:DescribeGameSessions' :: Maybe Text
location = Maybe Text
a} :: DescribeGameSessions)
describeGameSessions_nextToken :: Lens.Lens' DescribeGameSessions (Prelude.Maybe Prelude.Text)
describeGameSessions_nextToken :: Lens' DescribeGameSessions (Maybe Text)
describeGameSessions_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGameSessions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeGameSessions' :: DescribeGameSessions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeGameSessions
s@DescribeGameSessions' {} Maybe Text
a -> DescribeGameSessions
s {$sel:nextToken:DescribeGameSessions' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeGameSessions)
describeGameSessions_statusFilter :: Lens.Lens' DescribeGameSessions (Prelude.Maybe Prelude.Text)
describeGameSessions_statusFilter :: Lens' DescribeGameSessions (Maybe Text)
describeGameSessions_statusFilter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGameSessions' {Maybe Text
statusFilter :: Maybe Text
$sel:statusFilter:DescribeGameSessions' :: DescribeGameSessions -> Maybe Text
statusFilter} -> Maybe Text
statusFilter) (\s :: DescribeGameSessions
s@DescribeGameSessions' {} Maybe Text
a -> DescribeGameSessions
s {$sel:statusFilter:DescribeGameSessions' :: Maybe Text
statusFilter = Maybe Text
a} :: DescribeGameSessions)
instance Core.AWSPager DescribeGameSessions where
page :: DescribeGameSessions
-> AWSResponse DescribeGameSessions -> Maybe DescribeGameSessions
page DescribeGameSessions
rq AWSResponse DescribeGameSessions
rs
| forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeGameSessions
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeGameSessionsResponse (Maybe Text)
describeGameSessionsResponse_nextToken
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
forall a. Maybe a
Prelude.Nothing
| forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeGameSessions
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeGameSessionsResponse (Maybe [GameSession])
describeGameSessionsResponse_gameSessions
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
forall a. a -> Maybe a
Prelude.Just
forall a b. (a -> b) -> a -> b
Prelude.$ DescribeGameSessions
rq
forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeGameSessions (Maybe Text)
describeGameSessions_nextToken
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeGameSessions
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeGameSessionsResponse (Maybe Text)
describeGameSessionsResponse_nextToken
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
instance Core.AWSRequest DescribeGameSessions where
type
AWSResponse DescribeGameSessions =
DescribeGameSessionsResponse
request :: (Service -> Service)
-> DescribeGameSessions -> Request DescribeGameSessions
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeGameSessions
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeGameSessions)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe [GameSession]
-> Maybe Text -> Int -> DescribeGameSessionsResponse
DescribeGameSessionsResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"GameSessions" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextToken")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable DescribeGameSessions where
hashWithSalt :: Int -> DescribeGameSessions -> Int
hashWithSalt Int
_salt DescribeGameSessions' {Maybe Natural
Maybe Text
statusFilter :: Maybe Text
nextToken :: Maybe Text
location :: Maybe Text
limit :: Maybe Natural
gameSessionId :: Maybe Text
fleetId :: Maybe Text
aliasId :: Maybe Text
$sel:statusFilter:DescribeGameSessions' :: DescribeGameSessions -> Maybe Text
$sel:nextToken:DescribeGameSessions' :: DescribeGameSessions -> Maybe Text
$sel:location:DescribeGameSessions' :: DescribeGameSessions -> Maybe Text
$sel:limit:DescribeGameSessions' :: DescribeGameSessions -> Maybe Natural
$sel:gameSessionId:DescribeGameSessions' :: DescribeGameSessions -> Maybe Text
$sel:fleetId:DescribeGameSessions' :: DescribeGameSessions -> Maybe Text
$sel:aliasId:DescribeGameSessions' :: DescribeGameSessions -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
aliasId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
fleetId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
gameSessionId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
limit
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
location
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
statusFilter
instance Prelude.NFData DescribeGameSessions where
rnf :: DescribeGameSessions -> ()
rnf DescribeGameSessions' {Maybe Natural
Maybe Text
statusFilter :: Maybe Text
nextToken :: Maybe Text
location :: Maybe Text
limit :: Maybe Natural
gameSessionId :: Maybe Text
fleetId :: Maybe Text
aliasId :: Maybe Text
$sel:statusFilter:DescribeGameSessions' :: DescribeGameSessions -> Maybe Text
$sel:nextToken:DescribeGameSessions' :: DescribeGameSessions -> Maybe Text
$sel:location:DescribeGameSessions' :: DescribeGameSessions -> Maybe Text
$sel:limit:DescribeGameSessions' :: DescribeGameSessions -> Maybe Natural
$sel:gameSessionId:DescribeGameSessions' :: DescribeGameSessions -> Maybe Text
$sel:fleetId:DescribeGameSessions' :: DescribeGameSessions -> Maybe Text
$sel:aliasId:DescribeGameSessions' :: DescribeGameSessions -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
aliasId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
fleetId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
gameSessionId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
limit
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
location
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
statusFilter
instance Data.ToHeaders DescribeGameSessions where
toHeaders :: DescribeGameSessions -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"GameLift.DescribeGameSessions" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON DescribeGameSessions where
toJSON :: DescribeGameSessions -> Value
toJSON DescribeGameSessions' {Maybe Natural
Maybe Text
statusFilter :: Maybe Text
nextToken :: Maybe Text
location :: Maybe Text
limit :: Maybe Natural
gameSessionId :: Maybe Text
fleetId :: Maybe Text
aliasId :: Maybe Text
$sel:statusFilter:DescribeGameSessions' :: DescribeGameSessions -> Maybe Text
$sel:nextToken:DescribeGameSessions' :: DescribeGameSessions -> Maybe Text
$sel:location:DescribeGameSessions' :: DescribeGameSessions -> Maybe Text
$sel:limit:DescribeGameSessions' :: DescribeGameSessions -> Maybe Natural
$sel:gameSessionId:DescribeGameSessions' :: DescribeGameSessions -> Maybe Text
$sel:fleetId:DescribeGameSessions' :: DescribeGameSessions -> Maybe Text
$sel:aliasId:DescribeGameSessions' :: DescribeGameSessions -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"AliasId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
aliasId,
(Key
"FleetId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
fleetId,
(Key
"GameSessionId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
gameSessionId,
(Key
"Limit" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
limit,
(Key
"Location" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
location,
(Key
"NextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
(Key
"StatusFilter" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
statusFilter
]
)
instance Data.ToPath DescribeGameSessions where
toPath :: DescribeGameSessions -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DescribeGameSessions where
toQuery :: DescribeGameSessions -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DescribeGameSessionsResponse = DescribeGameSessionsResponse'
{
DescribeGameSessionsResponse -> Maybe [GameSession]
gameSessions :: Prelude.Maybe [GameSession],
DescribeGameSessionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeGameSessionsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeGameSessionsResponse
-> DescribeGameSessionsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeGameSessionsResponse
-> DescribeGameSessionsResponse -> Bool
$c/= :: DescribeGameSessionsResponse
-> DescribeGameSessionsResponse -> Bool
== :: DescribeGameSessionsResponse
-> DescribeGameSessionsResponse -> Bool
$c== :: DescribeGameSessionsResponse
-> DescribeGameSessionsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeGameSessionsResponse]
ReadPrec DescribeGameSessionsResponse
Int -> ReadS DescribeGameSessionsResponse
ReadS [DescribeGameSessionsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeGameSessionsResponse]
$creadListPrec :: ReadPrec [DescribeGameSessionsResponse]
readPrec :: ReadPrec DescribeGameSessionsResponse
$creadPrec :: ReadPrec DescribeGameSessionsResponse
readList :: ReadS [DescribeGameSessionsResponse]
$creadList :: ReadS [DescribeGameSessionsResponse]
readsPrec :: Int -> ReadS DescribeGameSessionsResponse
$creadsPrec :: Int -> ReadS DescribeGameSessionsResponse
Prelude.Read, Int -> DescribeGameSessionsResponse -> ShowS
[DescribeGameSessionsResponse] -> ShowS
DescribeGameSessionsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeGameSessionsResponse] -> ShowS
$cshowList :: [DescribeGameSessionsResponse] -> ShowS
show :: DescribeGameSessionsResponse -> String
$cshow :: DescribeGameSessionsResponse -> String
showsPrec :: Int -> DescribeGameSessionsResponse -> ShowS
$cshowsPrec :: Int -> DescribeGameSessionsResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeGameSessionsResponse x -> DescribeGameSessionsResponse
forall x.
DescribeGameSessionsResponse -> Rep DescribeGameSessionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeGameSessionsResponse x -> DescribeGameSessionsResponse
$cfrom :: forall x.
DescribeGameSessionsResponse -> Rep DescribeGameSessionsResponse x
Prelude.Generic)
newDescribeGameSessionsResponse ::
Prelude.Int ->
DescribeGameSessionsResponse
newDescribeGameSessionsResponse :: Int -> DescribeGameSessionsResponse
newDescribeGameSessionsResponse Int
pHttpStatus_ =
DescribeGameSessionsResponse'
{ $sel:gameSessions:DescribeGameSessionsResponse' :: Maybe [GameSession]
gameSessions =
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeGameSessionsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeGameSessionsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeGameSessionsResponse_gameSessions :: Lens.Lens' DescribeGameSessionsResponse (Prelude.Maybe [GameSession])
describeGameSessionsResponse_gameSessions :: Lens' DescribeGameSessionsResponse (Maybe [GameSession])
describeGameSessionsResponse_gameSessions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGameSessionsResponse' {Maybe [GameSession]
gameSessions :: Maybe [GameSession]
$sel:gameSessions:DescribeGameSessionsResponse' :: DescribeGameSessionsResponse -> Maybe [GameSession]
gameSessions} -> Maybe [GameSession]
gameSessions) (\s :: DescribeGameSessionsResponse
s@DescribeGameSessionsResponse' {} Maybe [GameSession]
a -> DescribeGameSessionsResponse
s {$sel:gameSessions:DescribeGameSessionsResponse' :: Maybe [GameSession]
gameSessions = Maybe [GameSession]
a} :: DescribeGameSessionsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeGameSessionsResponse_nextToken :: Lens.Lens' DescribeGameSessionsResponse (Prelude.Maybe Prelude.Text)
describeGameSessionsResponse_nextToken :: Lens' DescribeGameSessionsResponse (Maybe Text)
describeGameSessionsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGameSessionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeGameSessionsResponse' :: DescribeGameSessionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeGameSessionsResponse
s@DescribeGameSessionsResponse' {} Maybe Text
a -> DescribeGameSessionsResponse
s {$sel:nextToken:DescribeGameSessionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeGameSessionsResponse)
describeGameSessionsResponse_httpStatus :: Lens.Lens' DescribeGameSessionsResponse Prelude.Int
describeGameSessionsResponse_httpStatus :: Lens' DescribeGameSessionsResponse Int
describeGameSessionsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGameSessionsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeGameSessionsResponse' :: DescribeGameSessionsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeGameSessionsResponse
s@DescribeGameSessionsResponse' {} Int
a -> DescribeGameSessionsResponse
s {$sel:httpStatus:DescribeGameSessionsResponse' :: Int
httpStatus = Int
a} :: DescribeGameSessionsResponse)
instance Prelude.NFData DescribeGameSessionsResponse where
rnf :: DescribeGameSessionsResponse -> ()
rnf DescribeGameSessionsResponse' {Int
Maybe [GameSession]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
gameSessions :: Maybe [GameSession]
$sel:httpStatus:DescribeGameSessionsResponse' :: DescribeGameSessionsResponse -> Int
$sel:nextToken:DescribeGameSessionsResponse' :: DescribeGameSessionsResponse -> Maybe Text
$sel:gameSessions:DescribeGameSessionsResponse' :: DescribeGameSessionsResponse -> Maybe [GameSession]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [GameSession]
gameSessions
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus