{-# 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.GreengrassV2.ListCoreDevices
(
ListCoreDevices (..),
newListCoreDevices,
listCoreDevices_status,
listCoreDevices_thingGroupArn,
listCoreDevices_nextToken,
listCoreDevices_maxResults,
ListCoreDevicesResponse (..),
newListCoreDevicesResponse,
listCoreDevicesResponse_nextToken,
listCoreDevicesResponse_coreDevices,
listCoreDevicesResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.GreengrassV2.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 ListCoreDevices = ListCoreDevices'
{
ListCoreDevices -> Maybe CoreDeviceStatus
status :: Prelude.Maybe CoreDeviceStatus,
ListCoreDevices -> Maybe Text
thingGroupArn :: Prelude.Maybe Prelude.Text,
ListCoreDevices -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListCoreDevices -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
}
deriving (ListCoreDevices -> ListCoreDevices -> Bool
(ListCoreDevices -> ListCoreDevices -> Bool)
-> (ListCoreDevices -> ListCoreDevices -> Bool)
-> Eq ListCoreDevices
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListCoreDevices -> ListCoreDevices -> Bool
$c/= :: ListCoreDevices -> ListCoreDevices -> Bool
== :: ListCoreDevices -> ListCoreDevices -> Bool
$c== :: ListCoreDevices -> ListCoreDevices -> Bool
Prelude.Eq, ReadPrec [ListCoreDevices]
ReadPrec ListCoreDevices
Int -> ReadS ListCoreDevices
ReadS [ListCoreDevices]
(Int -> ReadS ListCoreDevices)
-> ReadS [ListCoreDevices]
-> ReadPrec ListCoreDevices
-> ReadPrec [ListCoreDevices]
-> Read ListCoreDevices
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListCoreDevices]
$creadListPrec :: ReadPrec [ListCoreDevices]
readPrec :: ReadPrec ListCoreDevices
$creadPrec :: ReadPrec ListCoreDevices
readList :: ReadS [ListCoreDevices]
$creadList :: ReadS [ListCoreDevices]
readsPrec :: Int -> ReadS ListCoreDevices
$creadsPrec :: Int -> ReadS ListCoreDevices
Prelude.Read, Int -> ListCoreDevices -> ShowS
[ListCoreDevices] -> ShowS
ListCoreDevices -> String
(Int -> ListCoreDevices -> ShowS)
-> (ListCoreDevices -> String)
-> ([ListCoreDevices] -> ShowS)
-> Show ListCoreDevices
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListCoreDevices] -> ShowS
$cshowList :: [ListCoreDevices] -> ShowS
show :: ListCoreDevices -> String
$cshow :: ListCoreDevices -> String
showsPrec :: Int -> ListCoreDevices -> ShowS
$cshowsPrec :: Int -> ListCoreDevices -> ShowS
Prelude.Show, (forall x. ListCoreDevices -> Rep ListCoreDevices x)
-> (forall x. Rep ListCoreDevices x -> ListCoreDevices)
-> Generic ListCoreDevices
forall x. Rep ListCoreDevices x -> ListCoreDevices
forall x. ListCoreDevices -> Rep ListCoreDevices x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListCoreDevices x -> ListCoreDevices
$cfrom :: forall x. ListCoreDevices -> Rep ListCoreDevices x
Prelude.Generic)
newListCoreDevices ::
ListCoreDevices
newListCoreDevices :: ListCoreDevices
newListCoreDevices =
ListCoreDevices' :: Maybe CoreDeviceStatus
-> Maybe Text -> Maybe Text -> Maybe Natural -> ListCoreDevices
ListCoreDevices'
{ $sel:status:ListCoreDevices' :: Maybe CoreDeviceStatus
status = Maybe CoreDeviceStatus
forall a. Maybe a
Prelude.Nothing,
$sel:thingGroupArn:ListCoreDevices' :: Maybe Text
thingGroupArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListCoreDevices' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListCoreDevices' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
listCoreDevices_status :: Lens.Lens' ListCoreDevices (Prelude.Maybe CoreDeviceStatus)
listCoreDevices_status :: (Maybe CoreDeviceStatus -> f (Maybe CoreDeviceStatus))
-> ListCoreDevices -> f ListCoreDevices
listCoreDevices_status = (ListCoreDevices -> Maybe CoreDeviceStatus)
-> (ListCoreDevices -> Maybe CoreDeviceStatus -> ListCoreDevices)
-> Lens
ListCoreDevices
ListCoreDevices
(Maybe CoreDeviceStatus)
(Maybe CoreDeviceStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCoreDevices' {Maybe CoreDeviceStatus
status :: Maybe CoreDeviceStatus
$sel:status:ListCoreDevices' :: ListCoreDevices -> Maybe CoreDeviceStatus
status} -> Maybe CoreDeviceStatus
status) (\s :: ListCoreDevices
s@ListCoreDevices' {} Maybe CoreDeviceStatus
a -> ListCoreDevices
s {$sel:status:ListCoreDevices' :: Maybe CoreDeviceStatus
status = Maybe CoreDeviceStatus
a} :: ListCoreDevices)
listCoreDevices_thingGroupArn :: Lens.Lens' ListCoreDevices (Prelude.Maybe Prelude.Text)
listCoreDevices_thingGroupArn :: (Maybe Text -> f (Maybe Text))
-> ListCoreDevices -> f ListCoreDevices
listCoreDevices_thingGroupArn = (ListCoreDevices -> Maybe Text)
-> (ListCoreDevices -> Maybe Text -> ListCoreDevices)
-> Lens ListCoreDevices ListCoreDevices (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCoreDevices' {Maybe Text
thingGroupArn :: Maybe Text
$sel:thingGroupArn:ListCoreDevices' :: ListCoreDevices -> Maybe Text
thingGroupArn} -> Maybe Text
thingGroupArn) (\s :: ListCoreDevices
s@ListCoreDevices' {} Maybe Text
a -> ListCoreDevices
s {$sel:thingGroupArn:ListCoreDevices' :: Maybe Text
thingGroupArn = Maybe Text
a} :: ListCoreDevices)
listCoreDevices_nextToken :: Lens.Lens' ListCoreDevices (Prelude.Maybe Prelude.Text)
listCoreDevices_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListCoreDevices -> f ListCoreDevices
listCoreDevices_nextToken = (ListCoreDevices -> Maybe Text)
-> (ListCoreDevices -> Maybe Text -> ListCoreDevices)
-> Lens ListCoreDevices ListCoreDevices (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCoreDevices' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListCoreDevices' :: ListCoreDevices -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListCoreDevices
s@ListCoreDevices' {} Maybe Text
a -> ListCoreDevices
s {$sel:nextToken:ListCoreDevices' :: Maybe Text
nextToken = Maybe Text
a} :: ListCoreDevices)
listCoreDevices_maxResults :: Lens.Lens' ListCoreDevices (Prelude.Maybe Prelude.Natural)
listCoreDevices_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListCoreDevices -> f ListCoreDevices
listCoreDevices_maxResults = (ListCoreDevices -> Maybe Natural)
-> (ListCoreDevices -> Maybe Natural -> ListCoreDevices)
-> Lens
ListCoreDevices ListCoreDevices (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCoreDevices' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListCoreDevices' :: ListCoreDevices -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListCoreDevices
s@ListCoreDevices' {} Maybe Natural
a -> ListCoreDevices
s {$sel:maxResults:ListCoreDevices' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListCoreDevices)
instance Core.AWSPager ListCoreDevices where
page :: ListCoreDevices
-> AWSResponse ListCoreDevices -> Maybe ListCoreDevices
page ListCoreDevices
rq AWSResponse ListCoreDevices
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListCoreDevices
ListCoreDevicesResponse
rs
ListCoreDevicesResponse
-> Getting (First Text) ListCoreDevicesResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListCoreDevicesResponse
-> Const (First Text) ListCoreDevicesResponse
Lens' ListCoreDevicesResponse (Maybe Text)
listCoreDevicesResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListCoreDevicesResponse
-> Const (First Text) ListCoreDevicesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListCoreDevicesResponse 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 ListCoreDevices
forall a. Maybe a
Prelude.Nothing
| Maybe [CoreDevice] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListCoreDevices
ListCoreDevicesResponse
rs
ListCoreDevicesResponse
-> Getting
(First [CoreDevice]) ListCoreDevicesResponse [CoreDevice]
-> Maybe [CoreDevice]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [CoreDevice]
-> Const (First [CoreDevice]) (Maybe [CoreDevice]))
-> ListCoreDevicesResponse
-> Const (First [CoreDevice]) ListCoreDevicesResponse
Lens' ListCoreDevicesResponse (Maybe [CoreDevice])
listCoreDevicesResponse_coreDevices
((Maybe [CoreDevice]
-> Const (First [CoreDevice]) (Maybe [CoreDevice]))
-> ListCoreDevicesResponse
-> Const (First [CoreDevice]) ListCoreDevicesResponse)
-> (([CoreDevice] -> Const (First [CoreDevice]) [CoreDevice])
-> Maybe [CoreDevice]
-> Const (First [CoreDevice]) (Maybe [CoreDevice]))
-> Getting
(First [CoreDevice]) ListCoreDevicesResponse [CoreDevice]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([CoreDevice] -> Const (First [CoreDevice]) [CoreDevice])
-> Maybe [CoreDevice]
-> Const (First [CoreDevice]) (Maybe [CoreDevice])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListCoreDevices
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListCoreDevices -> Maybe ListCoreDevices
forall a. a -> Maybe a
Prelude.Just (ListCoreDevices -> Maybe ListCoreDevices)
-> ListCoreDevices -> Maybe ListCoreDevices
forall a b. (a -> b) -> a -> b
Prelude.$
ListCoreDevices
rq
ListCoreDevices
-> (ListCoreDevices -> ListCoreDevices) -> ListCoreDevices
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListCoreDevices -> Identity ListCoreDevices
Lens ListCoreDevices ListCoreDevices (Maybe Text) (Maybe Text)
listCoreDevices_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListCoreDevices -> Identity ListCoreDevices)
-> Maybe Text -> ListCoreDevices -> ListCoreDevices
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListCoreDevices
ListCoreDevicesResponse
rs
ListCoreDevicesResponse
-> Getting (First Text) ListCoreDevicesResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListCoreDevicesResponse
-> Const (First Text) ListCoreDevicesResponse
Lens' ListCoreDevicesResponse (Maybe Text)
listCoreDevicesResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListCoreDevicesResponse
-> Const (First Text) ListCoreDevicesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListCoreDevicesResponse 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 ListCoreDevices where
type
AWSResponse ListCoreDevices =
ListCoreDevicesResponse
request :: ListCoreDevices -> Request ListCoreDevices
request = Service -> ListCoreDevices -> Request ListCoreDevices
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy ListCoreDevices
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListCoreDevices)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListCoreDevices))
-> Logger
-> Service
-> Proxy ListCoreDevices
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListCoreDevices)))
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 [CoreDevice] -> Int -> ListCoreDevicesResponse
ListCoreDevicesResponse'
(Maybe Text
-> Maybe [CoreDevice] -> Int -> ListCoreDevicesResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe [CoreDevice] -> Int -> ListCoreDevicesResponse)
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 [CoreDevice] -> Int -> ListCoreDevicesResponse)
-> Either String (Maybe [CoreDevice])
-> Either String (Int -> ListCoreDevicesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [CoreDevice]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"coreDevices" Either String (Maybe (Maybe [CoreDevice]))
-> Maybe [CoreDevice] -> Either String (Maybe [CoreDevice])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [CoreDevice]
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> ListCoreDevicesResponse)
-> Either String Int -> Either String ListCoreDevicesResponse
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 ListCoreDevices
instance Prelude.NFData ListCoreDevices
instance Core.ToHeaders ListCoreDevices where
toHeaders :: ListCoreDevices -> ResponseHeaders
toHeaders =
ResponseHeaders -> ListCoreDevices -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ 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.ToPath ListCoreDevices where
toPath :: ListCoreDevices -> ByteString
toPath = ByteString -> ListCoreDevices -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/greengrass/v2/coreDevices"
instance Core.ToQuery ListCoreDevices where
toQuery :: ListCoreDevices -> QueryString
toQuery ListCoreDevices' {Maybe Natural
Maybe Text
Maybe CoreDeviceStatus
maxResults :: Maybe Natural
nextToken :: Maybe Text
thingGroupArn :: Maybe Text
status :: Maybe CoreDeviceStatus
$sel:maxResults:ListCoreDevices' :: ListCoreDevices -> Maybe Natural
$sel:nextToken:ListCoreDevices' :: ListCoreDevices -> Maybe Text
$sel:thingGroupArn:ListCoreDevices' :: ListCoreDevices -> Maybe Text
$sel:status:ListCoreDevices' :: ListCoreDevices -> Maybe CoreDeviceStatus
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"status" ByteString -> Maybe CoreDeviceStatus -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe CoreDeviceStatus
status,
ByteString
"thingGroupArn" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
thingGroupArn,
ByteString
"nextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
ByteString
"maxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
]
data ListCoreDevicesResponse = ListCoreDevicesResponse'
{
ListCoreDevicesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListCoreDevicesResponse -> Maybe [CoreDevice]
coreDevices :: Prelude.Maybe [CoreDevice],
ListCoreDevicesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListCoreDevicesResponse -> ListCoreDevicesResponse -> Bool
(ListCoreDevicesResponse -> ListCoreDevicesResponse -> Bool)
-> (ListCoreDevicesResponse -> ListCoreDevicesResponse -> Bool)
-> Eq ListCoreDevicesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListCoreDevicesResponse -> ListCoreDevicesResponse -> Bool
$c/= :: ListCoreDevicesResponse -> ListCoreDevicesResponse -> Bool
== :: ListCoreDevicesResponse -> ListCoreDevicesResponse -> Bool
$c== :: ListCoreDevicesResponse -> ListCoreDevicesResponse -> Bool
Prelude.Eq, ReadPrec [ListCoreDevicesResponse]
ReadPrec ListCoreDevicesResponse
Int -> ReadS ListCoreDevicesResponse
ReadS [ListCoreDevicesResponse]
(Int -> ReadS ListCoreDevicesResponse)
-> ReadS [ListCoreDevicesResponse]
-> ReadPrec ListCoreDevicesResponse
-> ReadPrec [ListCoreDevicesResponse]
-> Read ListCoreDevicesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListCoreDevicesResponse]
$creadListPrec :: ReadPrec [ListCoreDevicesResponse]
readPrec :: ReadPrec ListCoreDevicesResponse
$creadPrec :: ReadPrec ListCoreDevicesResponse
readList :: ReadS [ListCoreDevicesResponse]
$creadList :: ReadS [ListCoreDevicesResponse]
readsPrec :: Int -> ReadS ListCoreDevicesResponse
$creadsPrec :: Int -> ReadS ListCoreDevicesResponse
Prelude.Read, Int -> ListCoreDevicesResponse -> ShowS
[ListCoreDevicesResponse] -> ShowS
ListCoreDevicesResponse -> String
(Int -> ListCoreDevicesResponse -> ShowS)
-> (ListCoreDevicesResponse -> String)
-> ([ListCoreDevicesResponse] -> ShowS)
-> Show ListCoreDevicesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListCoreDevicesResponse] -> ShowS
$cshowList :: [ListCoreDevicesResponse] -> ShowS
show :: ListCoreDevicesResponse -> String
$cshow :: ListCoreDevicesResponse -> String
showsPrec :: Int -> ListCoreDevicesResponse -> ShowS
$cshowsPrec :: Int -> ListCoreDevicesResponse -> ShowS
Prelude.Show, (forall x.
ListCoreDevicesResponse -> Rep ListCoreDevicesResponse x)
-> (forall x.
Rep ListCoreDevicesResponse x -> ListCoreDevicesResponse)
-> Generic ListCoreDevicesResponse
forall x. Rep ListCoreDevicesResponse x -> ListCoreDevicesResponse
forall x. ListCoreDevicesResponse -> Rep ListCoreDevicesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListCoreDevicesResponse x -> ListCoreDevicesResponse
$cfrom :: forall x. ListCoreDevicesResponse -> Rep ListCoreDevicesResponse x
Prelude.Generic)
newListCoreDevicesResponse ::
Prelude.Int ->
ListCoreDevicesResponse
newListCoreDevicesResponse :: Int -> ListCoreDevicesResponse
newListCoreDevicesResponse Int
pHttpStatus_ =
ListCoreDevicesResponse' :: Maybe Text -> Maybe [CoreDevice] -> Int -> ListCoreDevicesResponse
ListCoreDevicesResponse'
{ $sel:nextToken:ListCoreDevicesResponse' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:coreDevices:ListCoreDevicesResponse' :: Maybe [CoreDevice]
coreDevices = Maybe [CoreDevice]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListCoreDevicesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listCoreDevicesResponse_nextToken :: Lens.Lens' ListCoreDevicesResponse (Prelude.Maybe Prelude.Text)
listCoreDevicesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListCoreDevicesResponse -> f ListCoreDevicesResponse
listCoreDevicesResponse_nextToken = (ListCoreDevicesResponse -> Maybe Text)
-> (ListCoreDevicesResponse
-> Maybe Text -> ListCoreDevicesResponse)
-> Lens' ListCoreDevicesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCoreDevicesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListCoreDevicesResponse' :: ListCoreDevicesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListCoreDevicesResponse
s@ListCoreDevicesResponse' {} Maybe Text
a -> ListCoreDevicesResponse
s {$sel:nextToken:ListCoreDevicesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListCoreDevicesResponse)
listCoreDevicesResponse_coreDevices :: Lens.Lens' ListCoreDevicesResponse (Prelude.Maybe [CoreDevice])
listCoreDevicesResponse_coreDevices :: (Maybe [CoreDevice] -> f (Maybe [CoreDevice]))
-> ListCoreDevicesResponse -> f ListCoreDevicesResponse
listCoreDevicesResponse_coreDevices = (ListCoreDevicesResponse -> Maybe [CoreDevice])
-> (ListCoreDevicesResponse
-> Maybe [CoreDevice] -> ListCoreDevicesResponse)
-> Lens' ListCoreDevicesResponse (Maybe [CoreDevice])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCoreDevicesResponse' {Maybe [CoreDevice]
coreDevices :: Maybe [CoreDevice]
$sel:coreDevices:ListCoreDevicesResponse' :: ListCoreDevicesResponse -> Maybe [CoreDevice]
coreDevices} -> Maybe [CoreDevice]
coreDevices) (\s :: ListCoreDevicesResponse
s@ListCoreDevicesResponse' {} Maybe [CoreDevice]
a -> ListCoreDevicesResponse
s {$sel:coreDevices:ListCoreDevicesResponse' :: Maybe [CoreDevice]
coreDevices = Maybe [CoreDevice]
a} :: ListCoreDevicesResponse) ((Maybe [CoreDevice] -> f (Maybe [CoreDevice]))
-> ListCoreDevicesResponse -> f ListCoreDevicesResponse)
-> ((Maybe [CoreDevice] -> f (Maybe [CoreDevice]))
-> Maybe [CoreDevice] -> f (Maybe [CoreDevice]))
-> (Maybe [CoreDevice] -> f (Maybe [CoreDevice]))
-> ListCoreDevicesResponse
-> f ListCoreDevicesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [CoreDevice] [CoreDevice] [CoreDevice] [CoreDevice]
-> Iso
(Maybe [CoreDevice])
(Maybe [CoreDevice])
(Maybe [CoreDevice])
(Maybe [CoreDevice])
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 [CoreDevice] [CoreDevice] [CoreDevice] [CoreDevice]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listCoreDevicesResponse_httpStatus :: Lens.Lens' ListCoreDevicesResponse Prelude.Int
listCoreDevicesResponse_httpStatus :: (Int -> f Int)
-> ListCoreDevicesResponse -> f ListCoreDevicesResponse
listCoreDevicesResponse_httpStatus = (ListCoreDevicesResponse -> Int)
-> (ListCoreDevicesResponse -> Int -> ListCoreDevicesResponse)
-> Lens ListCoreDevicesResponse ListCoreDevicesResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCoreDevicesResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListCoreDevicesResponse' :: ListCoreDevicesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListCoreDevicesResponse
s@ListCoreDevicesResponse' {} Int
a -> ListCoreDevicesResponse
s {$sel:httpStatus:ListCoreDevicesResponse' :: Int
httpStatus = Int
a} :: ListCoreDevicesResponse)
instance Prelude.NFData ListCoreDevicesResponse