{-# 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.DescribeInstances
(
DescribeInstances (..),
newDescribeInstances,
describeInstances_instanceId,
describeInstances_location,
describeInstances_nextToken,
describeInstances_limit,
describeInstances_fleetId,
DescribeInstancesResponse (..),
newDescribeInstancesResponse,
describeInstancesResponse_nextToken,
describeInstancesResponse_instances,
describeInstancesResponse_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 DescribeInstances = DescribeInstances'
{
DescribeInstances -> Maybe Text
instanceId :: Prelude.Maybe Prelude.Text,
DescribeInstances -> Maybe Text
location :: Prelude.Maybe Prelude.Text,
DescribeInstances -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeInstances -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
DescribeInstances -> Text
fleetId :: Prelude.Text
}
deriving (DescribeInstances -> DescribeInstances -> Bool
(DescribeInstances -> DescribeInstances -> Bool)
-> (DescribeInstances -> DescribeInstances -> Bool)
-> Eq DescribeInstances
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeInstances -> DescribeInstances -> Bool
$c/= :: DescribeInstances -> DescribeInstances -> Bool
== :: DescribeInstances -> DescribeInstances -> Bool
$c== :: DescribeInstances -> DescribeInstances -> Bool
Prelude.Eq, ReadPrec [DescribeInstances]
ReadPrec DescribeInstances
Int -> ReadS DescribeInstances
ReadS [DescribeInstances]
(Int -> ReadS DescribeInstances)
-> ReadS [DescribeInstances]
-> ReadPrec DescribeInstances
-> ReadPrec [DescribeInstances]
-> Read DescribeInstances
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeInstances]
$creadListPrec :: ReadPrec [DescribeInstances]
readPrec :: ReadPrec DescribeInstances
$creadPrec :: ReadPrec DescribeInstances
readList :: ReadS [DescribeInstances]
$creadList :: ReadS [DescribeInstances]
readsPrec :: Int -> ReadS DescribeInstances
$creadsPrec :: Int -> ReadS DescribeInstances
Prelude.Read, Int -> DescribeInstances -> ShowS
[DescribeInstances] -> ShowS
DescribeInstances -> String
(Int -> DescribeInstances -> ShowS)
-> (DescribeInstances -> String)
-> ([DescribeInstances] -> ShowS)
-> Show DescribeInstances
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeInstances] -> ShowS
$cshowList :: [DescribeInstances] -> ShowS
show :: DescribeInstances -> String
$cshow :: DescribeInstances -> String
showsPrec :: Int -> DescribeInstances -> ShowS
$cshowsPrec :: Int -> DescribeInstances -> ShowS
Prelude.Show, (forall x. DescribeInstances -> Rep DescribeInstances x)
-> (forall x. Rep DescribeInstances x -> DescribeInstances)
-> Generic DescribeInstances
forall x. Rep DescribeInstances x -> DescribeInstances
forall x. DescribeInstances -> Rep DescribeInstances x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeInstances x -> DescribeInstances
$cfrom :: forall x. DescribeInstances -> Rep DescribeInstances x
Prelude.Generic)
newDescribeInstances ::
Prelude.Text ->
DescribeInstances
newDescribeInstances :: Text -> DescribeInstances
newDescribeInstances Text
pFleetId_ =
DescribeInstances' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Text
-> DescribeInstances
DescribeInstances'
{ $sel:instanceId:DescribeInstances' :: Maybe Text
instanceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:location:DescribeInstances' :: Maybe Text
location = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeInstances' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:limit:DescribeInstances' :: Maybe Natural
limit = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:fleetId:DescribeInstances' :: Text
fleetId = Text
pFleetId_
}
describeInstances_instanceId :: Lens.Lens' DescribeInstances (Prelude.Maybe Prelude.Text)
describeInstances_instanceId :: (Maybe Text -> f (Maybe Text))
-> DescribeInstances -> f DescribeInstances
describeInstances_instanceId = (DescribeInstances -> Maybe Text)
-> (DescribeInstances -> Maybe Text -> DescribeInstances)
-> Lens
DescribeInstances DescribeInstances (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInstances' {Maybe Text
instanceId :: Maybe Text
$sel:instanceId:DescribeInstances' :: DescribeInstances -> Maybe Text
instanceId} -> Maybe Text
instanceId) (\s :: DescribeInstances
s@DescribeInstances' {} Maybe Text
a -> DescribeInstances
s {$sel:instanceId:DescribeInstances' :: Maybe Text
instanceId = Maybe Text
a} :: DescribeInstances)
describeInstances_location :: Lens.Lens' DescribeInstances (Prelude.Maybe Prelude.Text)
describeInstances_location :: (Maybe Text -> f (Maybe Text))
-> DescribeInstances -> f DescribeInstances
describeInstances_location = (DescribeInstances -> Maybe Text)
-> (DescribeInstances -> Maybe Text -> DescribeInstances)
-> Lens
DescribeInstances DescribeInstances (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInstances' {Maybe Text
location :: Maybe Text
$sel:location:DescribeInstances' :: DescribeInstances -> Maybe Text
location} -> Maybe Text
location) (\s :: DescribeInstances
s@DescribeInstances' {} Maybe Text
a -> DescribeInstances
s {$sel:location:DescribeInstances' :: Maybe Text
location = Maybe Text
a} :: DescribeInstances)
describeInstances_nextToken :: Lens.Lens' DescribeInstances (Prelude.Maybe Prelude.Text)
describeInstances_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeInstances -> f DescribeInstances
describeInstances_nextToken = (DescribeInstances -> Maybe Text)
-> (DescribeInstances -> Maybe Text -> DescribeInstances)
-> Lens
DescribeInstances DescribeInstances (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInstances' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeInstances' :: DescribeInstances -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeInstances
s@DescribeInstances' {} Maybe Text
a -> DescribeInstances
s {$sel:nextToken:DescribeInstances' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeInstances)
describeInstances_limit :: Lens.Lens' DescribeInstances (Prelude.Maybe Prelude.Natural)
describeInstances_limit :: (Maybe Natural -> f (Maybe Natural))
-> DescribeInstances -> f DescribeInstances
describeInstances_limit = (DescribeInstances -> Maybe Natural)
-> (DescribeInstances -> Maybe Natural -> DescribeInstances)
-> Lens
DescribeInstances DescribeInstances (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInstances' {Maybe Natural
limit :: Maybe Natural
$sel:limit:DescribeInstances' :: DescribeInstances -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: DescribeInstances
s@DescribeInstances' {} Maybe Natural
a -> DescribeInstances
s {$sel:limit:DescribeInstances' :: Maybe Natural
limit = Maybe Natural
a} :: DescribeInstances)
describeInstances_fleetId :: Lens.Lens' DescribeInstances Prelude.Text
describeInstances_fleetId :: (Text -> f Text) -> DescribeInstances -> f DescribeInstances
describeInstances_fleetId = (DescribeInstances -> Text)
-> (DescribeInstances -> Text -> DescribeInstances)
-> Lens DescribeInstances DescribeInstances Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInstances' {Text
fleetId :: Text
$sel:fleetId:DescribeInstances' :: DescribeInstances -> Text
fleetId} -> Text
fleetId) (\s :: DescribeInstances
s@DescribeInstances' {} Text
a -> DescribeInstances
s {$sel:fleetId:DescribeInstances' :: Text
fleetId = Text
a} :: DescribeInstances)
instance Core.AWSPager DescribeInstances where
page :: DescribeInstances
-> AWSResponse DescribeInstances -> Maybe DescribeInstances
page DescribeInstances
rq AWSResponse DescribeInstances
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeInstances
DescribeInstancesResponse
rs
DescribeInstancesResponse
-> Getting (First Text) DescribeInstancesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeInstancesResponse
-> Const (First Text) DescribeInstancesResponse
Lens' DescribeInstancesResponse (Maybe Text)
describeInstancesResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeInstancesResponse
-> Const (First Text) DescribeInstancesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeInstancesResponse 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 DescribeInstances
forall a. Maybe a
Prelude.Nothing
| Maybe [Instance] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeInstances
DescribeInstancesResponse
rs
DescribeInstancesResponse
-> Getting (First [Instance]) DescribeInstancesResponse [Instance]
-> Maybe [Instance]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [Instance] -> Const (First [Instance]) (Maybe [Instance]))
-> DescribeInstancesResponse
-> Const (First [Instance]) DescribeInstancesResponse
Lens' DescribeInstancesResponse (Maybe [Instance])
describeInstancesResponse_instances
((Maybe [Instance] -> Const (First [Instance]) (Maybe [Instance]))
-> DescribeInstancesResponse
-> Const (First [Instance]) DescribeInstancesResponse)
-> (([Instance] -> Const (First [Instance]) [Instance])
-> Maybe [Instance] -> Const (First [Instance]) (Maybe [Instance]))
-> Getting (First [Instance]) DescribeInstancesResponse [Instance]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Instance] -> Const (First [Instance]) [Instance])
-> Maybe [Instance] -> Const (First [Instance]) (Maybe [Instance])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeInstances
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
DescribeInstances -> Maybe DescribeInstances
forall a. a -> Maybe a
Prelude.Just (DescribeInstances -> Maybe DescribeInstances)
-> DescribeInstances -> Maybe DescribeInstances
forall a b. (a -> b) -> a -> b
Prelude.$
DescribeInstances
rq
DescribeInstances
-> (DescribeInstances -> DescribeInstances) -> DescribeInstances
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeInstances -> Identity DescribeInstances
Lens DescribeInstances DescribeInstances (Maybe Text) (Maybe Text)
describeInstances_nextToken
((Maybe Text -> Identity (Maybe Text))
-> DescribeInstances -> Identity DescribeInstances)
-> Maybe Text -> DescribeInstances -> DescribeInstances
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeInstances
DescribeInstancesResponse
rs
DescribeInstancesResponse
-> Getting (First Text) DescribeInstancesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeInstancesResponse
-> Const (First Text) DescribeInstancesResponse
Lens' DescribeInstancesResponse (Maybe Text)
describeInstancesResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeInstancesResponse
-> Const (First Text) DescribeInstancesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeInstancesResponse 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 DescribeInstances where
type
AWSResponse DescribeInstances =
DescribeInstancesResponse
request :: DescribeInstances -> Request DescribeInstances
request = Service -> DescribeInstances -> Request DescribeInstances
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeInstances
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeInstances)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeInstances))
-> Logger
-> Service
-> Proxy DescribeInstances
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeInstances)))
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 [Instance] -> Int -> DescribeInstancesResponse
DescribeInstancesResponse'
(Maybe Text
-> Maybe [Instance] -> Int -> DescribeInstancesResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe [Instance] -> Int -> DescribeInstancesResponse)
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 [Instance] -> Int -> DescribeInstancesResponse)
-> Either String (Maybe [Instance])
-> Either String (Int -> DescribeInstancesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Instance]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Instances" Either String (Maybe (Maybe [Instance]))
-> Maybe [Instance] -> Either String (Maybe [Instance])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Instance]
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> DescribeInstancesResponse)
-> Either String Int -> Either String DescribeInstancesResponse
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 DescribeInstances
instance Prelude.NFData DescribeInstances
instance Core.ToHeaders DescribeInstances where
toHeaders :: DescribeInstances -> ResponseHeaders
toHeaders =
ResponseHeaders -> DescribeInstances -> 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.DescribeInstances" :: 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 DescribeInstances where
toJSON :: DescribeInstances -> Value
toJSON DescribeInstances' {Maybe Natural
Maybe Text
Text
fleetId :: Text
limit :: Maybe Natural
nextToken :: Maybe Text
location :: Maybe Text
instanceId :: Maybe Text
$sel:fleetId:DescribeInstances' :: DescribeInstances -> Text
$sel:limit:DescribeInstances' :: DescribeInstances -> Maybe Natural
$sel:nextToken:DescribeInstances' :: DescribeInstances -> Maybe Text
$sel:location:DescribeInstances' :: DescribeInstances -> Maybe Text
$sel:instanceId:DescribeInstances' :: DescribeInstances -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"InstanceId" 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
instanceId,
(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
"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,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"FleetId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
fleetId)
]
)
instance Core.ToPath DescribeInstances where
toPath :: DescribeInstances -> ByteString
toPath = ByteString -> DescribeInstances -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeInstances where
toQuery :: DescribeInstances -> QueryString
toQuery = QueryString -> DescribeInstances -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeInstancesResponse = DescribeInstancesResponse'
{
DescribeInstancesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeInstancesResponse -> Maybe [Instance]
instances :: Prelude.Maybe [Instance],
DescribeInstancesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeInstancesResponse -> DescribeInstancesResponse -> Bool
(DescribeInstancesResponse -> DescribeInstancesResponse -> Bool)
-> (DescribeInstancesResponse -> DescribeInstancesResponse -> Bool)
-> Eq DescribeInstancesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeInstancesResponse -> DescribeInstancesResponse -> Bool
$c/= :: DescribeInstancesResponse -> DescribeInstancesResponse -> Bool
== :: DescribeInstancesResponse -> DescribeInstancesResponse -> Bool
$c== :: DescribeInstancesResponse -> DescribeInstancesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeInstancesResponse]
ReadPrec DescribeInstancesResponse
Int -> ReadS DescribeInstancesResponse
ReadS [DescribeInstancesResponse]
(Int -> ReadS DescribeInstancesResponse)
-> ReadS [DescribeInstancesResponse]
-> ReadPrec DescribeInstancesResponse
-> ReadPrec [DescribeInstancesResponse]
-> Read DescribeInstancesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeInstancesResponse]
$creadListPrec :: ReadPrec [DescribeInstancesResponse]
readPrec :: ReadPrec DescribeInstancesResponse
$creadPrec :: ReadPrec DescribeInstancesResponse
readList :: ReadS [DescribeInstancesResponse]
$creadList :: ReadS [DescribeInstancesResponse]
readsPrec :: Int -> ReadS DescribeInstancesResponse
$creadsPrec :: Int -> ReadS DescribeInstancesResponse
Prelude.Read, Int -> DescribeInstancesResponse -> ShowS
[DescribeInstancesResponse] -> ShowS
DescribeInstancesResponse -> String
(Int -> DescribeInstancesResponse -> ShowS)
-> (DescribeInstancesResponse -> String)
-> ([DescribeInstancesResponse] -> ShowS)
-> Show DescribeInstancesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeInstancesResponse] -> ShowS
$cshowList :: [DescribeInstancesResponse] -> ShowS
show :: DescribeInstancesResponse -> String
$cshow :: DescribeInstancesResponse -> String
showsPrec :: Int -> DescribeInstancesResponse -> ShowS
$cshowsPrec :: Int -> DescribeInstancesResponse -> ShowS
Prelude.Show, (forall x.
DescribeInstancesResponse -> Rep DescribeInstancesResponse x)
-> (forall x.
Rep DescribeInstancesResponse x -> DescribeInstancesResponse)
-> Generic DescribeInstancesResponse
forall x.
Rep DescribeInstancesResponse x -> DescribeInstancesResponse
forall x.
DescribeInstancesResponse -> Rep DescribeInstancesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeInstancesResponse x -> DescribeInstancesResponse
$cfrom :: forall x.
DescribeInstancesResponse -> Rep DescribeInstancesResponse x
Prelude.Generic)
newDescribeInstancesResponse ::
Prelude.Int ->
DescribeInstancesResponse
newDescribeInstancesResponse :: Int -> DescribeInstancesResponse
newDescribeInstancesResponse Int
pHttpStatus_ =
DescribeInstancesResponse' :: Maybe Text -> Maybe [Instance] -> Int -> DescribeInstancesResponse
DescribeInstancesResponse'
{ $sel:nextToken:DescribeInstancesResponse' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:instances:DescribeInstancesResponse' :: Maybe [Instance]
instances = Maybe [Instance]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeInstancesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeInstancesResponse_nextToken :: Lens.Lens' DescribeInstancesResponse (Prelude.Maybe Prelude.Text)
describeInstancesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeInstancesResponse -> f DescribeInstancesResponse
describeInstancesResponse_nextToken = (DescribeInstancesResponse -> Maybe Text)
-> (DescribeInstancesResponse
-> Maybe Text -> DescribeInstancesResponse)
-> Lens' DescribeInstancesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInstancesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeInstancesResponse' :: DescribeInstancesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeInstancesResponse
s@DescribeInstancesResponse' {} Maybe Text
a -> DescribeInstancesResponse
s {$sel:nextToken:DescribeInstancesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeInstancesResponse)
describeInstancesResponse_instances :: Lens.Lens' DescribeInstancesResponse (Prelude.Maybe [Instance])
describeInstancesResponse_instances :: (Maybe [Instance] -> f (Maybe [Instance]))
-> DescribeInstancesResponse -> f DescribeInstancesResponse
describeInstancesResponse_instances = (DescribeInstancesResponse -> Maybe [Instance])
-> (DescribeInstancesResponse
-> Maybe [Instance] -> DescribeInstancesResponse)
-> Lens' DescribeInstancesResponse (Maybe [Instance])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInstancesResponse' {Maybe [Instance]
instances :: Maybe [Instance]
$sel:instances:DescribeInstancesResponse' :: DescribeInstancesResponse -> Maybe [Instance]
instances} -> Maybe [Instance]
instances) (\s :: DescribeInstancesResponse
s@DescribeInstancesResponse' {} Maybe [Instance]
a -> DescribeInstancesResponse
s {$sel:instances:DescribeInstancesResponse' :: Maybe [Instance]
instances = Maybe [Instance]
a} :: DescribeInstancesResponse) ((Maybe [Instance] -> f (Maybe [Instance]))
-> DescribeInstancesResponse -> f DescribeInstancesResponse)
-> ((Maybe [Instance] -> f (Maybe [Instance]))
-> Maybe [Instance] -> f (Maybe [Instance]))
-> (Maybe [Instance] -> f (Maybe [Instance]))
-> DescribeInstancesResponse
-> f DescribeInstancesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Instance] [Instance] [Instance] [Instance]
-> Iso
(Maybe [Instance])
(Maybe [Instance])
(Maybe [Instance])
(Maybe [Instance])
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 [Instance] [Instance] [Instance] [Instance]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeInstancesResponse_httpStatus :: Lens.Lens' DescribeInstancesResponse Prelude.Int
describeInstancesResponse_httpStatus :: (Int -> f Int)
-> DescribeInstancesResponse -> f DescribeInstancesResponse
describeInstancesResponse_httpStatus = (DescribeInstancesResponse -> Int)
-> (DescribeInstancesResponse -> Int -> DescribeInstancesResponse)
-> Lens DescribeInstancesResponse DescribeInstancesResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInstancesResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeInstancesResponse' :: DescribeInstancesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeInstancesResponse
s@DescribeInstancesResponse' {} Int
a -> DescribeInstancesResponse
s {$sel:httpStatus:DescribeInstancesResponse' :: Int
httpStatus = Int
a} :: DescribeInstancesResponse)
instance Prelude.NFData DescribeInstancesResponse