{-# 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.DeviceFarm.ListDeviceInstances
(
ListDeviceInstances (..),
newListDeviceInstances,
listDeviceInstances_nextToken,
listDeviceInstances_maxResults,
ListDeviceInstancesResponse (..),
newListDeviceInstancesResponse,
listDeviceInstancesResponse_nextToken,
listDeviceInstancesResponse_deviceInstances,
listDeviceInstancesResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.DeviceFarm.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 ListDeviceInstances = ListDeviceInstances'
{
ListDeviceInstances -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListDeviceInstances -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int
}
deriving (ListDeviceInstances -> ListDeviceInstances -> Bool
(ListDeviceInstances -> ListDeviceInstances -> Bool)
-> (ListDeviceInstances -> ListDeviceInstances -> Bool)
-> Eq ListDeviceInstances
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDeviceInstances -> ListDeviceInstances -> Bool
$c/= :: ListDeviceInstances -> ListDeviceInstances -> Bool
== :: ListDeviceInstances -> ListDeviceInstances -> Bool
$c== :: ListDeviceInstances -> ListDeviceInstances -> Bool
Prelude.Eq, ReadPrec [ListDeviceInstances]
ReadPrec ListDeviceInstances
Int -> ReadS ListDeviceInstances
ReadS [ListDeviceInstances]
(Int -> ReadS ListDeviceInstances)
-> ReadS [ListDeviceInstances]
-> ReadPrec ListDeviceInstances
-> ReadPrec [ListDeviceInstances]
-> Read ListDeviceInstances
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDeviceInstances]
$creadListPrec :: ReadPrec [ListDeviceInstances]
readPrec :: ReadPrec ListDeviceInstances
$creadPrec :: ReadPrec ListDeviceInstances
readList :: ReadS [ListDeviceInstances]
$creadList :: ReadS [ListDeviceInstances]
readsPrec :: Int -> ReadS ListDeviceInstances
$creadsPrec :: Int -> ReadS ListDeviceInstances
Prelude.Read, Int -> ListDeviceInstances -> ShowS
[ListDeviceInstances] -> ShowS
ListDeviceInstances -> String
(Int -> ListDeviceInstances -> ShowS)
-> (ListDeviceInstances -> String)
-> ([ListDeviceInstances] -> ShowS)
-> Show ListDeviceInstances
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDeviceInstances] -> ShowS
$cshowList :: [ListDeviceInstances] -> ShowS
show :: ListDeviceInstances -> String
$cshow :: ListDeviceInstances -> String
showsPrec :: Int -> ListDeviceInstances -> ShowS
$cshowsPrec :: Int -> ListDeviceInstances -> ShowS
Prelude.Show, (forall x. ListDeviceInstances -> Rep ListDeviceInstances x)
-> (forall x. Rep ListDeviceInstances x -> ListDeviceInstances)
-> Generic ListDeviceInstances
forall x. Rep ListDeviceInstances x -> ListDeviceInstances
forall x. ListDeviceInstances -> Rep ListDeviceInstances x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListDeviceInstances x -> ListDeviceInstances
$cfrom :: forall x. ListDeviceInstances -> Rep ListDeviceInstances x
Prelude.Generic)
newListDeviceInstances ::
ListDeviceInstances
newListDeviceInstances :: ListDeviceInstances
newListDeviceInstances =
ListDeviceInstances' :: Maybe Text -> Maybe Int -> ListDeviceInstances
ListDeviceInstances'
{ $sel:nextToken:ListDeviceInstances' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListDeviceInstances' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
listDeviceInstances_nextToken :: Lens.Lens' ListDeviceInstances (Prelude.Maybe Prelude.Text)
listDeviceInstances_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListDeviceInstances -> f ListDeviceInstances
listDeviceInstances_nextToken = (ListDeviceInstances -> Maybe Text)
-> (ListDeviceInstances -> Maybe Text -> ListDeviceInstances)
-> Lens
ListDeviceInstances ListDeviceInstances (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDeviceInstances' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDeviceInstances' :: ListDeviceInstances -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDeviceInstances
s@ListDeviceInstances' {} Maybe Text
a -> ListDeviceInstances
s {$sel:nextToken:ListDeviceInstances' :: Maybe Text
nextToken = Maybe Text
a} :: ListDeviceInstances)
listDeviceInstances_maxResults :: Lens.Lens' ListDeviceInstances (Prelude.Maybe Prelude.Int)
listDeviceInstances_maxResults :: (Maybe Int -> f (Maybe Int))
-> ListDeviceInstances -> f ListDeviceInstances
listDeviceInstances_maxResults = (ListDeviceInstances -> Maybe Int)
-> (ListDeviceInstances -> Maybe Int -> ListDeviceInstances)
-> Lens
ListDeviceInstances ListDeviceInstances (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDeviceInstances' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:ListDeviceInstances' :: ListDeviceInstances -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: ListDeviceInstances
s@ListDeviceInstances' {} Maybe Int
a -> ListDeviceInstances
s {$sel:maxResults:ListDeviceInstances' :: Maybe Int
maxResults = Maybe Int
a} :: ListDeviceInstances)
instance Core.AWSPager ListDeviceInstances where
page :: ListDeviceInstances
-> AWSResponse ListDeviceInstances -> Maybe ListDeviceInstances
page ListDeviceInstances
rq AWSResponse ListDeviceInstances
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListDeviceInstances
ListDeviceInstancesResponse
rs
ListDeviceInstancesResponse
-> Getting (First Text) ListDeviceInstancesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListDeviceInstancesResponse
-> Const (First Text) ListDeviceInstancesResponse
Lens' ListDeviceInstancesResponse (Maybe Text)
listDeviceInstancesResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListDeviceInstancesResponse
-> Const (First Text) ListDeviceInstancesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListDeviceInstancesResponse 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 ListDeviceInstances
forall a. Maybe a
Prelude.Nothing
| Maybe [DeviceInstance] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListDeviceInstances
ListDeviceInstancesResponse
rs
ListDeviceInstancesResponse
-> Getting
(First [DeviceInstance])
ListDeviceInstancesResponse
[DeviceInstance]
-> Maybe [DeviceInstance]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [DeviceInstance]
-> Const (First [DeviceInstance]) (Maybe [DeviceInstance]))
-> ListDeviceInstancesResponse
-> Const (First [DeviceInstance]) ListDeviceInstancesResponse
Lens' ListDeviceInstancesResponse (Maybe [DeviceInstance])
listDeviceInstancesResponse_deviceInstances
((Maybe [DeviceInstance]
-> Const (First [DeviceInstance]) (Maybe [DeviceInstance]))
-> ListDeviceInstancesResponse
-> Const (First [DeviceInstance]) ListDeviceInstancesResponse)
-> (([DeviceInstance]
-> Const (First [DeviceInstance]) [DeviceInstance])
-> Maybe [DeviceInstance]
-> Const (First [DeviceInstance]) (Maybe [DeviceInstance]))
-> Getting
(First [DeviceInstance])
ListDeviceInstancesResponse
[DeviceInstance]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DeviceInstance]
-> Const (First [DeviceInstance]) [DeviceInstance])
-> Maybe [DeviceInstance]
-> Const (First [DeviceInstance]) (Maybe [DeviceInstance])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListDeviceInstances
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListDeviceInstances -> Maybe ListDeviceInstances
forall a. a -> Maybe a
Prelude.Just (ListDeviceInstances -> Maybe ListDeviceInstances)
-> ListDeviceInstances -> Maybe ListDeviceInstances
forall a b. (a -> b) -> a -> b
Prelude.$
ListDeviceInstances
rq
ListDeviceInstances
-> (ListDeviceInstances -> ListDeviceInstances)
-> ListDeviceInstances
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListDeviceInstances -> Identity ListDeviceInstances
Lens
ListDeviceInstances ListDeviceInstances (Maybe Text) (Maybe Text)
listDeviceInstances_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListDeviceInstances -> Identity ListDeviceInstances)
-> Maybe Text -> ListDeviceInstances -> ListDeviceInstances
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListDeviceInstances
ListDeviceInstancesResponse
rs
ListDeviceInstancesResponse
-> Getting (First Text) ListDeviceInstancesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListDeviceInstancesResponse
-> Const (First Text) ListDeviceInstancesResponse
Lens' ListDeviceInstancesResponse (Maybe Text)
listDeviceInstancesResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListDeviceInstancesResponse
-> Const (First Text) ListDeviceInstancesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListDeviceInstancesResponse 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 ListDeviceInstances where
type
AWSResponse ListDeviceInstances =
ListDeviceInstancesResponse
request :: ListDeviceInstances -> Request ListDeviceInstances
request = Service -> ListDeviceInstances -> Request ListDeviceInstances
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ListDeviceInstances
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListDeviceInstances)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListDeviceInstances))
-> Logger
-> Service
-> Proxy ListDeviceInstances
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListDeviceInstances)))
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 [DeviceInstance] -> Int -> ListDeviceInstancesResponse
ListDeviceInstancesResponse'
(Maybe Text
-> Maybe [DeviceInstance] -> Int -> ListDeviceInstancesResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe [DeviceInstance] -> Int -> ListDeviceInstancesResponse)
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 [DeviceInstance] -> Int -> ListDeviceInstancesResponse)
-> Either String (Maybe [DeviceInstance])
-> Either String (Int -> ListDeviceInstancesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [DeviceInstance]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"deviceInstances"
Either String (Maybe (Maybe [DeviceInstance]))
-> Maybe [DeviceInstance] -> Either String (Maybe [DeviceInstance])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [DeviceInstance]
forall a. Monoid a => a
Prelude.mempty
)
Either String (Int -> ListDeviceInstancesResponse)
-> Either String Int -> Either String ListDeviceInstancesResponse
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 ListDeviceInstances
instance Prelude.NFData ListDeviceInstances
instance Core.ToHeaders ListDeviceInstances where
toHeaders :: ListDeviceInstances -> ResponseHeaders
toHeaders =
ResponseHeaders -> ListDeviceInstances -> 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
"DeviceFarm_20150623.ListDeviceInstances" ::
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 ListDeviceInstances where
toJSON :: ListDeviceInstances -> Value
toJSON ListDeviceInstances' {Maybe Int
Maybe Text
maxResults :: Maybe Int
nextToken :: Maybe Text
$sel:maxResults:ListDeviceInstances' :: ListDeviceInstances -> Maybe Int
$sel:nextToken:ListDeviceInstances' :: ListDeviceInstances -> 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
"maxResults" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxResults
]
)
instance Core.ToPath ListDeviceInstances where
toPath :: ListDeviceInstances -> ByteString
toPath = ByteString -> ListDeviceInstances -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ListDeviceInstances where
toQuery :: ListDeviceInstances -> QueryString
toQuery = QueryString -> ListDeviceInstances -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data ListDeviceInstancesResponse = ListDeviceInstancesResponse'
{
ListDeviceInstancesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListDeviceInstancesResponse -> Maybe [DeviceInstance]
deviceInstances :: Prelude.Maybe [DeviceInstance],
ListDeviceInstancesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListDeviceInstancesResponse -> ListDeviceInstancesResponse -> Bool
(ListDeviceInstancesResponse
-> ListDeviceInstancesResponse -> Bool)
-> (ListDeviceInstancesResponse
-> ListDeviceInstancesResponse -> Bool)
-> Eq ListDeviceInstancesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDeviceInstancesResponse -> ListDeviceInstancesResponse -> Bool
$c/= :: ListDeviceInstancesResponse -> ListDeviceInstancesResponse -> Bool
== :: ListDeviceInstancesResponse -> ListDeviceInstancesResponse -> Bool
$c== :: ListDeviceInstancesResponse -> ListDeviceInstancesResponse -> Bool
Prelude.Eq, ReadPrec [ListDeviceInstancesResponse]
ReadPrec ListDeviceInstancesResponse
Int -> ReadS ListDeviceInstancesResponse
ReadS [ListDeviceInstancesResponse]
(Int -> ReadS ListDeviceInstancesResponse)
-> ReadS [ListDeviceInstancesResponse]
-> ReadPrec ListDeviceInstancesResponse
-> ReadPrec [ListDeviceInstancesResponse]
-> Read ListDeviceInstancesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDeviceInstancesResponse]
$creadListPrec :: ReadPrec [ListDeviceInstancesResponse]
readPrec :: ReadPrec ListDeviceInstancesResponse
$creadPrec :: ReadPrec ListDeviceInstancesResponse
readList :: ReadS [ListDeviceInstancesResponse]
$creadList :: ReadS [ListDeviceInstancesResponse]
readsPrec :: Int -> ReadS ListDeviceInstancesResponse
$creadsPrec :: Int -> ReadS ListDeviceInstancesResponse
Prelude.Read, Int -> ListDeviceInstancesResponse -> ShowS
[ListDeviceInstancesResponse] -> ShowS
ListDeviceInstancesResponse -> String
(Int -> ListDeviceInstancesResponse -> ShowS)
-> (ListDeviceInstancesResponse -> String)
-> ([ListDeviceInstancesResponse] -> ShowS)
-> Show ListDeviceInstancesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDeviceInstancesResponse] -> ShowS
$cshowList :: [ListDeviceInstancesResponse] -> ShowS
show :: ListDeviceInstancesResponse -> String
$cshow :: ListDeviceInstancesResponse -> String
showsPrec :: Int -> ListDeviceInstancesResponse -> ShowS
$cshowsPrec :: Int -> ListDeviceInstancesResponse -> ShowS
Prelude.Show, (forall x.
ListDeviceInstancesResponse -> Rep ListDeviceInstancesResponse x)
-> (forall x.
Rep ListDeviceInstancesResponse x -> ListDeviceInstancesResponse)
-> Generic ListDeviceInstancesResponse
forall x.
Rep ListDeviceInstancesResponse x -> ListDeviceInstancesResponse
forall x.
ListDeviceInstancesResponse -> Rep ListDeviceInstancesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListDeviceInstancesResponse x -> ListDeviceInstancesResponse
$cfrom :: forall x.
ListDeviceInstancesResponse -> Rep ListDeviceInstancesResponse x
Prelude.Generic)
newListDeviceInstancesResponse ::
Prelude.Int ->
ListDeviceInstancesResponse
newListDeviceInstancesResponse :: Int -> ListDeviceInstancesResponse
newListDeviceInstancesResponse Int
pHttpStatus_ =
ListDeviceInstancesResponse' :: Maybe Text
-> Maybe [DeviceInstance] -> Int -> ListDeviceInstancesResponse
ListDeviceInstancesResponse'
{ $sel:nextToken:ListDeviceInstancesResponse' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:deviceInstances:ListDeviceInstancesResponse' :: Maybe [DeviceInstance]
deviceInstances = Maybe [DeviceInstance]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListDeviceInstancesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listDeviceInstancesResponse_nextToken :: Lens.Lens' ListDeviceInstancesResponse (Prelude.Maybe Prelude.Text)
listDeviceInstancesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListDeviceInstancesResponse -> f ListDeviceInstancesResponse
listDeviceInstancesResponse_nextToken = (ListDeviceInstancesResponse -> Maybe Text)
-> (ListDeviceInstancesResponse
-> Maybe Text -> ListDeviceInstancesResponse)
-> Lens' ListDeviceInstancesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDeviceInstancesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDeviceInstancesResponse' :: ListDeviceInstancesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDeviceInstancesResponse
s@ListDeviceInstancesResponse' {} Maybe Text
a -> ListDeviceInstancesResponse
s {$sel:nextToken:ListDeviceInstancesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListDeviceInstancesResponse)
listDeviceInstancesResponse_deviceInstances :: Lens.Lens' ListDeviceInstancesResponse (Prelude.Maybe [DeviceInstance])
listDeviceInstancesResponse_deviceInstances :: (Maybe [DeviceInstance] -> f (Maybe [DeviceInstance]))
-> ListDeviceInstancesResponse -> f ListDeviceInstancesResponse
listDeviceInstancesResponse_deviceInstances = (ListDeviceInstancesResponse -> Maybe [DeviceInstance])
-> (ListDeviceInstancesResponse
-> Maybe [DeviceInstance] -> ListDeviceInstancesResponse)
-> Lens' ListDeviceInstancesResponse (Maybe [DeviceInstance])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDeviceInstancesResponse' {Maybe [DeviceInstance]
deviceInstances :: Maybe [DeviceInstance]
$sel:deviceInstances:ListDeviceInstancesResponse' :: ListDeviceInstancesResponse -> Maybe [DeviceInstance]
deviceInstances} -> Maybe [DeviceInstance]
deviceInstances) (\s :: ListDeviceInstancesResponse
s@ListDeviceInstancesResponse' {} Maybe [DeviceInstance]
a -> ListDeviceInstancesResponse
s {$sel:deviceInstances:ListDeviceInstancesResponse' :: Maybe [DeviceInstance]
deviceInstances = Maybe [DeviceInstance]
a} :: ListDeviceInstancesResponse) ((Maybe [DeviceInstance] -> f (Maybe [DeviceInstance]))
-> ListDeviceInstancesResponse -> f ListDeviceInstancesResponse)
-> ((Maybe [DeviceInstance] -> f (Maybe [DeviceInstance]))
-> Maybe [DeviceInstance] -> f (Maybe [DeviceInstance]))
-> (Maybe [DeviceInstance] -> f (Maybe [DeviceInstance]))
-> ListDeviceInstancesResponse
-> f ListDeviceInstancesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[DeviceInstance] [DeviceInstance] [DeviceInstance] [DeviceInstance]
-> Iso
(Maybe [DeviceInstance])
(Maybe [DeviceInstance])
(Maybe [DeviceInstance])
(Maybe [DeviceInstance])
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
[DeviceInstance] [DeviceInstance] [DeviceInstance] [DeviceInstance]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listDeviceInstancesResponse_httpStatus :: Lens.Lens' ListDeviceInstancesResponse Prelude.Int
listDeviceInstancesResponse_httpStatus :: (Int -> f Int)
-> ListDeviceInstancesResponse -> f ListDeviceInstancesResponse
listDeviceInstancesResponse_httpStatus = (ListDeviceInstancesResponse -> Int)
-> (ListDeviceInstancesResponse
-> Int -> ListDeviceInstancesResponse)
-> Lens
ListDeviceInstancesResponse ListDeviceInstancesResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDeviceInstancesResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListDeviceInstancesResponse' :: ListDeviceInstancesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListDeviceInstancesResponse
s@ListDeviceInstancesResponse' {} Int
a -> ListDeviceInstancesResponse
s {$sel:httpStatus:ListDeviceInstancesResponse' :: Int
httpStatus = Int
a} :: ListDeviceInstancesResponse)
instance Prelude.NFData ListDeviceInstancesResponse