{-# 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.DescribeGameServerInstances
(
DescribeGameServerInstances (..),
newDescribeGameServerInstances,
describeGameServerInstances_nextToken,
describeGameServerInstances_instanceIds,
describeGameServerInstances_limit,
describeGameServerInstances_gameServerGroupName,
DescribeGameServerInstancesResponse (..),
newDescribeGameServerInstancesResponse,
describeGameServerInstancesResponse_gameServerInstances,
describeGameServerInstancesResponse_nextToken,
describeGameServerInstancesResponse_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 DescribeGameServerInstances = DescribeGameServerInstances'
{
DescribeGameServerInstances -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeGameServerInstances -> Maybe (NonEmpty Text)
instanceIds :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
DescribeGameServerInstances -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
DescribeGameServerInstances -> Text
gameServerGroupName :: Prelude.Text
}
deriving (DescribeGameServerInstances -> DescribeGameServerInstances -> Bool
(DescribeGameServerInstances
-> DescribeGameServerInstances -> Bool)
-> (DescribeGameServerInstances
-> DescribeGameServerInstances -> Bool)
-> Eq DescribeGameServerInstances
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeGameServerInstances -> DescribeGameServerInstances -> Bool
$c/= :: DescribeGameServerInstances -> DescribeGameServerInstances -> Bool
== :: DescribeGameServerInstances -> DescribeGameServerInstances -> Bool
$c== :: DescribeGameServerInstances -> DescribeGameServerInstances -> Bool
Prelude.Eq, ReadPrec [DescribeGameServerInstances]
ReadPrec DescribeGameServerInstances
Int -> ReadS DescribeGameServerInstances
ReadS [DescribeGameServerInstances]
(Int -> ReadS DescribeGameServerInstances)
-> ReadS [DescribeGameServerInstances]
-> ReadPrec DescribeGameServerInstances
-> ReadPrec [DescribeGameServerInstances]
-> Read DescribeGameServerInstances
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeGameServerInstances]
$creadListPrec :: ReadPrec [DescribeGameServerInstances]
readPrec :: ReadPrec DescribeGameServerInstances
$creadPrec :: ReadPrec DescribeGameServerInstances
readList :: ReadS [DescribeGameServerInstances]
$creadList :: ReadS [DescribeGameServerInstances]
readsPrec :: Int -> ReadS DescribeGameServerInstances
$creadsPrec :: Int -> ReadS DescribeGameServerInstances
Prelude.Read, Int -> DescribeGameServerInstances -> ShowS
[DescribeGameServerInstances] -> ShowS
DescribeGameServerInstances -> String
(Int -> DescribeGameServerInstances -> ShowS)
-> (DescribeGameServerInstances -> String)
-> ([DescribeGameServerInstances] -> ShowS)
-> Show DescribeGameServerInstances
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeGameServerInstances] -> ShowS
$cshowList :: [DescribeGameServerInstances] -> ShowS
show :: DescribeGameServerInstances -> String
$cshow :: DescribeGameServerInstances -> String
showsPrec :: Int -> DescribeGameServerInstances -> ShowS
$cshowsPrec :: Int -> DescribeGameServerInstances -> ShowS
Prelude.Show, (forall x.
DescribeGameServerInstances -> Rep DescribeGameServerInstances x)
-> (forall x.
Rep DescribeGameServerInstances x -> DescribeGameServerInstances)
-> Generic DescribeGameServerInstances
forall x.
Rep DescribeGameServerInstances x -> DescribeGameServerInstances
forall x.
DescribeGameServerInstances -> Rep DescribeGameServerInstances x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeGameServerInstances x -> DescribeGameServerInstances
$cfrom :: forall x.
DescribeGameServerInstances -> Rep DescribeGameServerInstances x
Prelude.Generic)
newDescribeGameServerInstances ::
Prelude.Text ->
DescribeGameServerInstances
newDescribeGameServerInstances :: Text -> DescribeGameServerInstances
newDescribeGameServerInstances Text
pGameServerGroupName_ =
DescribeGameServerInstances' :: Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe Natural
-> Text
-> DescribeGameServerInstances
DescribeGameServerInstances'
{ $sel:nextToken:DescribeGameServerInstances' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:instanceIds:DescribeGameServerInstances' :: Maybe (NonEmpty Text)
instanceIds = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
$sel:limit:DescribeGameServerInstances' :: Maybe Natural
limit = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:gameServerGroupName:DescribeGameServerInstances' :: Text
gameServerGroupName = Text
pGameServerGroupName_
}
describeGameServerInstances_nextToken :: Lens.Lens' DescribeGameServerInstances (Prelude.Maybe Prelude.Text)
describeGameServerInstances_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeGameServerInstances -> f DescribeGameServerInstances
describeGameServerInstances_nextToken = (DescribeGameServerInstances -> Maybe Text)
-> (DescribeGameServerInstances
-> Maybe Text -> DescribeGameServerInstances)
-> Lens
DescribeGameServerInstances
DescribeGameServerInstances
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGameServerInstances' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeGameServerInstances' :: DescribeGameServerInstances -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeGameServerInstances
s@DescribeGameServerInstances' {} Maybe Text
a -> DescribeGameServerInstances
s {$sel:nextToken:DescribeGameServerInstances' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeGameServerInstances)
describeGameServerInstances_instanceIds :: Lens.Lens' DescribeGameServerInstances (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
describeGameServerInstances_instanceIds :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> DescribeGameServerInstances -> f DescribeGameServerInstances
describeGameServerInstances_instanceIds = (DescribeGameServerInstances -> Maybe (NonEmpty Text))
-> (DescribeGameServerInstances
-> Maybe (NonEmpty Text) -> DescribeGameServerInstances)
-> Lens
DescribeGameServerInstances
DescribeGameServerInstances
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGameServerInstances' {Maybe (NonEmpty Text)
instanceIds :: Maybe (NonEmpty Text)
$sel:instanceIds:DescribeGameServerInstances' :: DescribeGameServerInstances -> Maybe (NonEmpty Text)
instanceIds} -> Maybe (NonEmpty Text)
instanceIds) (\s :: DescribeGameServerInstances
s@DescribeGameServerInstances' {} Maybe (NonEmpty Text)
a -> DescribeGameServerInstances
s {$sel:instanceIds:DescribeGameServerInstances' :: Maybe (NonEmpty Text)
instanceIds = Maybe (NonEmpty Text)
a} :: DescribeGameServerInstances) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> DescribeGameServerInstances -> f DescribeGameServerInstances)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> DescribeGameServerInstances
-> f DescribeGameServerInstances
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty 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
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeGameServerInstances_limit :: Lens.Lens' DescribeGameServerInstances (Prelude.Maybe Prelude.Natural)
describeGameServerInstances_limit :: (Maybe Natural -> f (Maybe Natural))
-> DescribeGameServerInstances -> f DescribeGameServerInstances
describeGameServerInstances_limit = (DescribeGameServerInstances -> Maybe Natural)
-> (DescribeGameServerInstances
-> Maybe Natural -> DescribeGameServerInstances)
-> Lens
DescribeGameServerInstances
DescribeGameServerInstances
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGameServerInstances' {Maybe Natural
limit :: Maybe Natural
$sel:limit:DescribeGameServerInstances' :: DescribeGameServerInstances -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: DescribeGameServerInstances
s@DescribeGameServerInstances' {} Maybe Natural
a -> DescribeGameServerInstances
s {$sel:limit:DescribeGameServerInstances' :: Maybe Natural
limit = Maybe Natural
a} :: DescribeGameServerInstances)
describeGameServerInstances_gameServerGroupName :: Lens.Lens' DescribeGameServerInstances Prelude.Text
describeGameServerInstances_gameServerGroupName :: (Text -> f Text)
-> DescribeGameServerInstances -> f DescribeGameServerInstances
describeGameServerInstances_gameServerGroupName = (DescribeGameServerInstances -> Text)
-> (DescribeGameServerInstances
-> Text -> DescribeGameServerInstances)
-> Lens
DescribeGameServerInstances DescribeGameServerInstances Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGameServerInstances' {Text
gameServerGroupName :: Text
$sel:gameServerGroupName:DescribeGameServerInstances' :: DescribeGameServerInstances -> Text
gameServerGroupName} -> Text
gameServerGroupName) (\s :: DescribeGameServerInstances
s@DescribeGameServerInstances' {} Text
a -> DescribeGameServerInstances
s {$sel:gameServerGroupName:DescribeGameServerInstances' :: Text
gameServerGroupName = Text
a} :: DescribeGameServerInstances)
instance Core.AWSPager DescribeGameServerInstances where
page :: DescribeGameServerInstances
-> AWSResponse DescribeGameServerInstances
-> Maybe DescribeGameServerInstances
page DescribeGameServerInstances
rq AWSResponse DescribeGameServerInstances
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeGameServerInstances
DescribeGameServerInstancesResponse
rs
DescribeGameServerInstancesResponse
-> Getting (First Text) DescribeGameServerInstancesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeGameServerInstancesResponse
-> Const (First Text) DescribeGameServerInstancesResponse
Lens' DescribeGameServerInstancesResponse (Maybe Text)
describeGameServerInstancesResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeGameServerInstancesResponse
-> Const (First Text) DescribeGameServerInstancesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeGameServerInstancesResponse 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 DescribeGameServerInstances
forall a. Maybe a
Prelude.Nothing
| Maybe [GameServerInstance] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeGameServerInstances
DescribeGameServerInstancesResponse
rs
DescribeGameServerInstancesResponse
-> Getting
(First [GameServerInstance])
DescribeGameServerInstancesResponse
[GameServerInstance]
-> Maybe [GameServerInstance]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [GameServerInstance]
-> Const (First [GameServerInstance]) (Maybe [GameServerInstance]))
-> DescribeGameServerInstancesResponse
-> Const
(First [GameServerInstance]) DescribeGameServerInstancesResponse
Lens'
DescribeGameServerInstancesResponse (Maybe [GameServerInstance])
describeGameServerInstancesResponse_gameServerInstances
((Maybe [GameServerInstance]
-> Const (First [GameServerInstance]) (Maybe [GameServerInstance]))
-> DescribeGameServerInstancesResponse
-> Const
(First [GameServerInstance]) DescribeGameServerInstancesResponse)
-> (([GameServerInstance]
-> Const (First [GameServerInstance]) [GameServerInstance])
-> Maybe [GameServerInstance]
-> Const (First [GameServerInstance]) (Maybe [GameServerInstance]))
-> Getting
(First [GameServerInstance])
DescribeGameServerInstancesResponse
[GameServerInstance]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([GameServerInstance]
-> Const (First [GameServerInstance]) [GameServerInstance])
-> Maybe [GameServerInstance]
-> Const (First [GameServerInstance]) (Maybe [GameServerInstance])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeGameServerInstances
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
DescribeGameServerInstances -> Maybe DescribeGameServerInstances
forall a. a -> Maybe a
Prelude.Just (DescribeGameServerInstances -> Maybe DescribeGameServerInstances)
-> DescribeGameServerInstances -> Maybe DescribeGameServerInstances
forall a b. (a -> b) -> a -> b
Prelude.$
DescribeGameServerInstances
rq
DescribeGameServerInstances
-> (DescribeGameServerInstances -> DescribeGameServerInstances)
-> DescribeGameServerInstances
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeGameServerInstances
-> Identity DescribeGameServerInstances
Lens
DescribeGameServerInstances
DescribeGameServerInstances
(Maybe Text)
(Maybe Text)
describeGameServerInstances_nextToken
((Maybe Text -> Identity (Maybe Text))
-> DescribeGameServerInstances
-> Identity DescribeGameServerInstances)
-> Maybe Text
-> DescribeGameServerInstances
-> DescribeGameServerInstances
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeGameServerInstances
DescribeGameServerInstancesResponse
rs
DescribeGameServerInstancesResponse
-> Getting (First Text) DescribeGameServerInstancesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeGameServerInstancesResponse
-> Const (First Text) DescribeGameServerInstancesResponse
Lens' DescribeGameServerInstancesResponse (Maybe Text)
describeGameServerInstancesResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeGameServerInstancesResponse
-> Const (First Text) DescribeGameServerInstancesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeGameServerInstancesResponse 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 DescribeGameServerInstances where
type
AWSResponse DescribeGameServerInstances =
DescribeGameServerInstancesResponse
request :: DescribeGameServerInstances -> Request DescribeGameServerInstances
request = Service
-> DescribeGameServerInstances
-> Request DescribeGameServerInstances
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeGameServerInstances
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeGameServerInstances)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeGameServerInstances))
-> Logger
-> Service
-> Proxy DescribeGameServerInstances
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeGameServerInstances)))
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 [GameServerInstance]
-> Maybe Text -> Int -> DescribeGameServerInstancesResponse
DescribeGameServerInstancesResponse'
(Maybe [GameServerInstance]
-> Maybe Text -> Int -> DescribeGameServerInstancesResponse)
-> Either String (Maybe [GameServerInstance])
-> Either
String (Maybe Text -> Int -> DescribeGameServerInstancesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [GameServerInstance]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"GameServerInstances"
Either String (Maybe (Maybe [GameServerInstance]))
-> Maybe [GameServerInstance]
-> Either String (Maybe [GameServerInstance])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [GameServerInstance]
forall a. Monoid a => a
Prelude.mempty
)
Either
String (Maybe Text -> Int -> DescribeGameServerInstancesResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeGameServerInstancesResponse)
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 -> DescribeGameServerInstancesResponse)
-> Either String Int
-> Either String DescribeGameServerInstancesResponse
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 DescribeGameServerInstances
instance Prelude.NFData DescribeGameServerInstances
instance Core.ToHeaders DescribeGameServerInstances where
toHeaders :: DescribeGameServerInstances -> ResponseHeaders
toHeaders =
ResponseHeaders -> DescribeGameServerInstances -> 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.DescribeGameServerInstances" ::
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 DescribeGameServerInstances where
toJSON :: DescribeGameServerInstances -> Value
toJSON DescribeGameServerInstances' {Maybe Natural
Maybe (NonEmpty Text)
Maybe Text
Text
gameServerGroupName :: Text
limit :: Maybe Natural
instanceIds :: Maybe (NonEmpty Text)
nextToken :: Maybe Text
$sel:gameServerGroupName:DescribeGameServerInstances' :: DescribeGameServerInstances -> Text
$sel:limit:DescribeGameServerInstances' :: DescribeGameServerInstances -> Maybe Natural
$sel:instanceIds:DescribeGameServerInstances' :: DescribeGameServerInstances -> Maybe (NonEmpty Text)
$sel:nextToken:DescribeGameServerInstances' :: DescribeGameServerInstances -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (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
"InstanceIds" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Text -> Pair) -> Maybe (NonEmpty Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
instanceIds,
(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,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"GameServerGroupName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
gameServerGroupName)
]
)
instance Core.ToPath DescribeGameServerInstances where
toPath :: DescribeGameServerInstances -> ByteString
toPath = ByteString -> DescribeGameServerInstances -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeGameServerInstances where
toQuery :: DescribeGameServerInstances -> QueryString
toQuery = QueryString -> DescribeGameServerInstances -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeGameServerInstancesResponse = DescribeGameServerInstancesResponse'
{
DescribeGameServerInstancesResponse -> Maybe [GameServerInstance]
gameServerInstances :: Prelude.Maybe [GameServerInstance],
DescribeGameServerInstancesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeGameServerInstancesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeGameServerInstancesResponse
-> DescribeGameServerInstancesResponse -> Bool
(DescribeGameServerInstancesResponse
-> DescribeGameServerInstancesResponse -> Bool)
-> (DescribeGameServerInstancesResponse
-> DescribeGameServerInstancesResponse -> Bool)
-> Eq DescribeGameServerInstancesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeGameServerInstancesResponse
-> DescribeGameServerInstancesResponse -> Bool
$c/= :: DescribeGameServerInstancesResponse
-> DescribeGameServerInstancesResponse -> Bool
== :: DescribeGameServerInstancesResponse
-> DescribeGameServerInstancesResponse -> Bool
$c== :: DescribeGameServerInstancesResponse
-> DescribeGameServerInstancesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeGameServerInstancesResponse]
ReadPrec DescribeGameServerInstancesResponse
Int -> ReadS DescribeGameServerInstancesResponse
ReadS [DescribeGameServerInstancesResponse]
(Int -> ReadS DescribeGameServerInstancesResponse)
-> ReadS [DescribeGameServerInstancesResponse]
-> ReadPrec DescribeGameServerInstancesResponse
-> ReadPrec [DescribeGameServerInstancesResponse]
-> Read DescribeGameServerInstancesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeGameServerInstancesResponse]
$creadListPrec :: ReadPrec [DescribeGameServerInstancesResponse]
readPrec :: ReadPrec DescribeGameServerInstancesResponse
$creadPrec :: ReadPrec DescribeGameServerInstancesResponse
readList :: ReadS [DescribeGameServerInstancesResponse]
$creadList :: ReadS [DescribeGameServerInstancesResponse]
readsPrec :: Int -> ReadS DescribeGameServerInstancesResponse
$creadsPrec :: Int -> ReadS DescribeGameServerInstancesResponse
Prelude.Read, Int -> DescribeGameServerInstancesResponse -> ShowS
[DescribeGameServerInstancesResponse] -> ShowS
DescribeGameServerInstancesResponse -> String
(Int -> DescribeGameServerInstancesResponse -> ShowS)
-> (DescribeGameServerInstancesResponse -> String)
-> ([DescribeGameServerInstancesResponse] -> ShowS)
-> Show DescribeGameServerInstancesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeGameServerInstancesResponse] -> ShowS
$cshowList :: [DescribeGameServerInstancesResponse] -> ShowS
show :: DescribeGameServerInstancesResponse -> String
$cshow :: DescribeGameServerInstancesResponse -> String
showsPrec :: Int -> DescribeGameServerInstancesResponse -> ShowS
$cshowsPrec :: Int -> DescribeGameServerInstancesResponse -> ShowS
Prelude.Show, (forall x.
DescribeGameServerInstancesResponse
-> Rep DescribeGameServerInstancesResponse x)
-> (forall x.
Rep DescribeGameServerInstancesResponse x
-> DescribeGameServerInstancesResponse)
-> Generic DescribeGameServerInstancesResponse
forall x.
Rep DescribeGameServerInstancesResponse x
-> DescribeGameServerInstancesResponse
forall x.
DescribeGameServerInstancesResponse
-> Rep DescribeGameServerInstancesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeGameServerInstancesResponse x
-> DescribeGameServerInstancesResponse
$cfrom :: forall x.
DescribeGameServerInstancesResponse
-> Rep DescribeGameServerInstancesResponse x
Prelude.Generic)
newDescribeGameServerInstancesResponse ::
Prelude.Int ->
DescribeGameServerInstancesResponse
newDescribeGameServerInstancesResponse :: Int -> DescribeGameServerInstancesResponse
newDescribeGameServerInstancesResponse Int
pHttpStatus_ =
DescribeGameServerInstancesResponse' :: Maybe [GameServerInstance]
-> Maybe Text -> Int -> DescribeGameServerInstancesResponse
DescribeGameServerInstancesResponse'
{ $sel:gameServerInstances:DescribeGameServerInstancesResponse' :: Maybe [GameServerInstance]
gameServerInstances =
Maybe [GameServerInstance]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeGameServerInstancesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeGameServerInstancesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeGameServerInstancesResponse_gameServerInstances :: Lens.Lens' DescribeGameServerInstancesResponse (Prelude.Maybe [GameServerInstance])
describeGameServerInstancesResponse_gameServerInstances :: (Maybe [GameServerInstance] -> f (Maybe [GameServerInstance]))
-> DescribeGameServerInstancesResponse
-> f DescribeGameServerInstancesResponse
describeGameServerInstancesResponse_gameServerInstances = (DescribeGameServerInstancesResponse -> Maybe [GameServerInstance])
-> (DescribeGameServerInstancesResponse
-> Maybe [GameServerInstance]
-> DescribeGameServerInstancesResponse)
-> Lens'
DescribeGameServerInstancesResponse (Maybe [GameServerInstance])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGameServerInstancesResponse' {Maybe [GameServerInstance]
gameServerInstances :: Maybe [GameServerInstance]
$sel:gameServerInstances:DescribeGameServerInstancesResponse' :: DescribeGameServerInstancesResponse -> Maybe [GameServerInstance]
gameServerInstances} -> Maybe [GameServerInstance]
gameServerInstances) (\s :: DescribeGameServerInstancesResponse
s@DescribeGameServerInstancesResponse' {} Maybe [GameServerInstance]
a -> DescribeGameServerInstancesResponse
s {$sel:gameServerInstances:DescribeGameServerInstancesResponse' :: Maybe [GameServerInstance]
gameServerInstances = Maybe [GameServerInstance]
a} :: DescribeGameServerInstancesResponse) ((Maybe [GameServerInstance] -> f (Maybe [GameServerInstance]))
-> DescribeGameServerInstancesResponse
-> f DescribeGameServerInstancesResponse)
-> ((Maybe [GameServerInstance] -> f (Maybe [GameServerInstance]))
-> Maybe [GameServerInstance] -> f (Maybe [GameServerInstance]))
-> (Maybe [GameServerInstance] -> f (Maybe [GameServerInstance]))
-> DescribeGameServerInstancesResponse
-> f DescribeGameServerInstancesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[GameServerInstance]
[GameServerInstance]
[GameServerInstance]
[GameServerInstance]
-> Iso
(Maybe [GameServerInstance])
(Maybe [GameServerInstance])
(Maybe [GameServerInstance])
(Maybe [GameServerInstance])
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
[GameServerInstance]
[GameServerInstance]
[GameServerInstance]
[GameServerInstance]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeGameServerInstancesResponse_nextToken :: Lens.Lens' DescribeGameServerInstancesResponse (Prelude.Maybe Prelude.Text)
describeGameServerInstancesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeGameServerInstancesResponse
-> f DescribeGameServerInstancesResponse
describeGameServerInstancesResponse_nextToken = (DescribeGameServerInstancesResponse -> Maybe Text)
-> (DescribeGameServerInstancesResponse
-> Maybe Text -> DescribeGameServerInstancesResponse)
-> Lens' DescribeGameServerInstancesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGameServerInstancesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeGameServerInstancesResponse' :: DescribeGameServerInstancesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeGameServerInstancesResponse
s@DescribeGameServerInstancesResponse' {} Maybe Text
a -> DescribeGameServerInstancesResponse
s {$sel:nextToken:DescribeGameServerInstancesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeGameServerInstancesResponse)
describeGameServerInstancesResponse_httpStatus :: Lens.Lens' DescribeGameServerInstancesResponse Prelude.Int
describeGameServerInstancesResponse_httpStatus :: (Int -> f Int)
-> DescribeGameServerInstancesResponse
-> f DescribeGameServerInstancesResponse
describeGameServerInstancesResponse_httpStatus = (DescribeGameServerInstancesResponse -> Int)
-> (DescribeGameServerInstancesResponse
-> Int -> DescribeGameServerInstancesResponse)
-> Lens
DescribeGameServerInstancesResponse
DescribeGameServerInstancesResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGameServerInstancesResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeGameServerInstancesResponse' :: DescribeGameServerInstancesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeGameServerInstancesResponse
s@DescribeGameServerInstancesResponse' {} Int
a -> DescribeGameServerInstancesResponse
s {$sel:httpStatus:DescribeGameServerInstancesResponse' :: Int
httpStatus = Int
a} :: DescribeGameServerInstancesResponse)
instance
Prelude.NFData
DescribeGameServerInstancesResponse