{-# 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.IoT.ListThingPrincipals
(
ListThingPrincipals (..),
newListThingPrincipals,
listThingPrincipals_nextToken,
listThingPrincipals_maxResults,
listThingPrincipals_thingName,
ListThingPrincipalsResponse (..),
newListThingPrincipalsResponse,
listThingPrincipalsResponse_principals,
listThingPrincipalsResponse_nextToken,
listThingPrincipalsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.IoT.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 ListThingPrincipals = ListThingPrincipals'
{
ListThingPrincipals -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListThingPrincipals -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
ListThingPrincipals -> Text
thingName :: Prelude.Text
}
deriving (ListThingPrincipals -> ListThingPrincipals -> Bool
(ListThingPrincipals -> ListThingPrincipals -> Bool)
-> (ListThingPrincipals -> ListThingPrincipals -> Bool)
-> Eq ListThingPrincipals
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListThingPrincipals -> ListThingPrincipals -> Bool
$c/= :: ListThingPrincipals -> ListThingPrincipals -> Bool
== :: ListThingPrincipals -> ListThingPrincipals -> Bool
$c== :: ListThingPrincipals -> ListThingPrincipals -> Bool
Prelude.Eq, ReadPrec [ListThingPrincipals]
ReadPrec ListThingPrincipals
Int -> ReadS ListThingPrincipals
ReadS [ListThingPrincipals]
(Int -> ReadS ListThingPrincipals)
-> ReadS [ListThingPrincipals]
-> ReadPrec ListThingPrincipals
-> ReadPrec [ListThingPrincipals]
-> Read ListThingPrincipals
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListThingPrincipals]
$creadListPrec :: ReadPrec [ListThingPrincipals]
readPrec :: ReadPrec ListThingPrincipals
$creadPrec :: ReadPrec ListThingPrincipals
readList :: ReadS [ListThingPrincipals]
$creadList :: ReadS [ListThingPrincipals]
readsPrec :: Int -> ReadS ListThingPrincipals
$creadsPrec :: Int -> ReadS ListThingPrincipals
Prelude.Read, Int -> ListThingPrincipals -> ShowS
[ListThingPrincipals] -> ShowS
ListThingPrincipals -> String
(Int -> ListThingPrincipals -> ShowS)
-> (ListThingPrincipals -> String)
-> ([ListThingPrincipals] -> ShowS)
-> Show ListThingPrincipals
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListThingPrincipals] -> ShowS
$cshowList :: [ListThingPrincipals] -> ShowS
show :: ListThingPrincipals -> String
$cshow :: ListThingPrincipals -> String
showsPrec :: Int -> ListThingPrincipals -> ShowS
$cshowsPrec :: Int -> ListThingPrincipals -> ShowS
Prelude.Show, (forall x. ListThingPrincipals -> Rep ListThingPrincipals x)
-> (forall x. Rep ListThingPrincipals x -> ListThingPrincipals)
-> Generic ListThingPrincipals
forall x. Rep ListThingPrincipals x -> ListThingPrincipals
forall x. ListThingPrincipals -> Rep ListThingPrincipals x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListThingPrincipals x -> ListThingPrincipals
$cfrom :: forall x. ListThingPrincipals -> Rep ListThingPrincipals x
Prelude.Generic)
newListThingPrincipals ::
Prelude.Text ->
ListThingPrincipals
newListThingPrincipals :: Text -> ListThingPrincipals
newListThingPrincipals Text
pThingName_ =
ListThingPrincipals' :: Maybe Text -> Maybe Natural -> Text -> ListThingPrincipals
ListThingPrincipals'
{ $sel:nextToken:ListThingPrincipals' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListThingPrincipals' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:thingName:ListThingPrincipals' :: Text
thingName = Text
pThingName_
}
listThingPrincipals_nextToken :: Lens.Lens' ListThingPrincipals (Prelude.Maybe Prelude.Text)
listThingPrincipals_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListThingPrincipals -> f ListThingPrincipals
listThingPrincipals_nextToken = (ListThingPrincipals -> Maybe Text)
-> (ListThingPrincipals -> Maybe Text -> ListThingPrincipals)
-> Lens
ListThingPrincipals ListThingPrincipals (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListThingPrincipals' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListThingPrincipals' :: ListThingPrincipals -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListThingPrincipals
s@ListThingPrincipals' {} Maybe Text
a -> ListThingPrincipals
s {$sel:nextToken:ListThingPrincipals' :: Maybe Text
nextToken = Maybe Text
a} :: ListThingPrincipals)
listThingPrincipals_maxResults :: Lens.Lens' ListThingPrincipals (Prelude.Maybe Prelude.Natural)
listThingPrincipals_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListThingPrincipals -> f ListThingPrincipals
listThingPrincipals_maxResults = (ListThingPrincipals -> Maybe Natural)
-> (ListThingPrincipals -> Maybe Natural -> ListThingPrincipals)
-> Lens
ListThingPrincipals
ListThingPrincipals
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListThingPrincipals' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListThingPrincipals' :: ListThingPrincipals -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListThingPrincipals
s@ListThingPrincipals' {} Maybe Natural
a -> ListThingPrincipals
s {$sel:maxResults:ListThingPrincipals' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListThingPrincipals)
listThingPrincipals_thingName :: Lens.Lens' ListThingPrincipals Prelude.Text
listThingPrincipals_thingName :: (Text -> f Text) -> ListThingPrincipals -> f ListThingPrincipals
listThingPrincipals_thingName = (ListThingPrincipals -> Text)
-> (ListThingPrincipals -> Text -> ListThingPrincipals)
-> Lens ListThingPrincipals ListThingPrincipals Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListThingPrincipals' {Text
thingName :: Text
$sel:thingName:ListThingPrincipals' :: ListThingPrincipals -> Text
thingName} -> Text
thingName) (\s :: ListThingPrincipals
s@ListThingPrincipals' {} Text
a -> ListThingPrincipals
s {$sel:thingName:ListThingPrincipals' :: Text
thingName = Text
a} :: ListThingPrincipals)
instance Core.AWSPager ListThingPrincipals where
page :: ListThingPrincipals
-> AWSResponse ListThingPrincipals -> Maybe ListThingPrincipals
page ListThingPrincipals
rq AWSResponse ListThingPrincipals
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListThingPrincipals
ListThingPrincipalsResponse
rs
ListThingPrincipalsResponse
-> Getting (First Text) ListThingPrincipalsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListThingPrincipalsResponse
-> Const (First Text) ListThingPrincipalsResponse
Lens' ListThingPrincipalsResponse (Maybe Text)
listThingPrincipalsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListThingPrincipalsResponse
-> Const (First Text) ListThingPrincipalsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListThingPrincipalsResponse 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 ListThingPrincipals
forall a. Maybe a
Prelude.Nothing
| Maybe [Text] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListThingPrincipals
ListThingPrincipalsResponse
rs
ListThingPrincipalsResponse
-> Getting (First [Text]) ListThingPrincipalsResponse [Text]
-> Maybe [Text]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [Text] -> Const (First [Text]) (Maybe [Text]))
-> ListThingPrincipalsResponse
-> Const (First [Text]) ListThingPrincipalsResponse
Lens' ListThingPrincipalsResponse (Maybe [Text])
listThingPrincipalsResponse_principals
((Maybe [Text] -> Const (First [Text]) (Maybe [Text]))
-> ListThingPrincipalsResponse
-> Const (First [Text]) ListThingPrincipalsResponse)
-> (([Text] -> Const (First [Text]) [Text])
-> Maybe [Text] -> Const (First [Text]) (Maybe [Text]))
-> Getting (First [Text]) ListThingPrincipalsResponse [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 ListThingPrincipals
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListThingPrincipals -> Maybe ListThingPrincipals
forall a. a -> Maybe a
Prelude.Just (ListThingPrincipals -> Maybe ListThingPrincipals)
-> ListThingPrincipals -> Maybe ListThingPrincipals
forall a b. (a -> b) -> a -> b
Prelude.$
ListThingPrincipals
rq
ListThingPrincipals
-> (ListThingPrincipals -> ListThingPrincipals)
-> ListThingPrincipals
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListThingPrincipals -> Identity ListThingPrincipals
Lens
ListThingPrincipals ListThingPrincipals (Maybe Text) (Maybe Text)
listThingPrincipals_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListThingPrincipals -> Identity ListThingPrincipals)
-> Maybe Text -> ListThingPrincipals -> ListThingPrincipals
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListThingPrincipals
ListThingPrincipalsResponse
rs
ListThingPrincipalsResponse
-> Getting (First Text) ListThingPrincipalsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListThingPrincipalsResponse
-> Const (First Text) ListThingPrincipalsResponse
Lens' ListThingPrincipalsResponse (Maybe Text)
listThingPrincipalsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListThingPrincipalsResponse
-> Const (First Text) ListThingPrincipalsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListThingPrincipalsResponse 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 ListThingPrincipals where
type
AWSResponse ListThingPrincipals =
ListThingPrincipalsResponse
request :: ListThingPrincipals -> Request ListThingPrincipals
request = Service -> ListThingPrincipals -> Request ListThingPrincipals
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy ListThingPrincipals
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListThingPrincipals)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListThingPrincipals))
-> Logger
-> Service
-> Proxy ListThingPrincipals
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListThingPrincipals)))
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 Text -> Int -> ListThingPrincipalsResponse
ListThingPrincipalsResponse'
(Maybe [Text] -> Maybe Text -> Int -> ListThingPrincipalsResponse)
-> Either String (Maybe [Text])
-> Either String (Maybe Text -> Int -> ListThingPrincipalsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"principals" Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
Either String (Maybe Text -> Int -> ListThingPrincipalsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListThingPrincipalsResponse)
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 -> ListThingPrincipalsResponse)
-> Either String Int -> Either String ListThingPrincipalsResponse
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 ListThingPrincipals
instance Prelude.NFData ListThingPrincipals
instance Core.ToHeaders ListThingPrincipals where
toHeaders :: ListThingPrincipals -> ResponseHeaders
toHeaders = ResponseHeaders -> ListThingPrincipals -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath ListThingPrincipals where
toPath :: ListThingPrincipals -> ByteString
toPath ListThingPrincipals' {Maybe Natural
Maybe Text
Text
thingName :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:thingName:ListThingPrincipals' :: ListThingPrincipals -> Text
$sel:maxResults:ListThingPrincipals' :: ListThingPrincipals -> Maybe Natural
$sel:nextToken:ListThingPrincipals' :: ListThingPrincipals -> Maybe Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/things/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
thingName, ByteString
"/principals"]
instance Core.ToQuery ListThingPrincipals where
toQuery :: ListThingPrincipals -> QueryString
toQuery ListThingPrincipals' {Maybe Natural
Maybe Text
Text
thingName :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:thingName:ListThingPrincipals' :: ListThingPrincipals -> Text
$sel:maxResults:ListThingPrincipals' :: ListThingPrincipals -> Maybe Natural
$sel:nextToken:ListThingPrincipals' :: ListThingPrincipals -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ 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 ListThingPrincipalsResponse = ListThingPrincipalsResponse'
{
ListThingPrincipalsResponse -> Maybe [Text]
principals :: Prelude.Maybe [Prelude.Text],
ListThingPrincipalsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListThingPrincipalsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListThingPrincipalsResponse -> ListThingPrincipalsResponse -> Bool
(ListThingPrincipalsResponse
-> ListThingPrincipalsResponse -> Bool)
-> (ListThingPrincipalsResponse
-> ListThingPrincipalsResponse -> Bool)
-> Eq ListThingPrincipalsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListThingPrincipalsResponse -> ListThingPrincipalsResponse -> Bool
$c/= :: ListThingPrincipalsResponse -> ListThingPrincipalsResponse -> Bool
== :: ListThingPrincipalsResponse -> ListThingPrincipalsResponse -> Bool
$c== :: ListThingPrincipalsResponse -> ListThingPrincipalsResponse -> Bool
Prelude.Eq, ReadPrec [ListThingPrincipalsResponse]
ReadPrec ListThingPrincipalsResponse
Int -> ReadS ListThingPrincipalsResponse
ReadS [ListThingPrincipalsResponse]
(Int -> ReadS ListThingPrincipalsResponse)
-> ReadS [ListThingPrincipalsResponse]
-> ReadPrec ListThingPrincipalsResponse
-> ReadPrec [ListThingPrincipalsResponse]
-> Read ListThingPrincipalsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListThingPrincipalsResponse]
$creadListPrec :: ReadPrec [ListThingPrincipalsResponse]
readPrec :: ReadPrec ListThingPrincipalsResponse
$creadPrec :: ReadPrec ListThingPrincipalsResponse
readList :: ReadS [ListThingPrincipalsResponse]
$creadList :: ReadS [ListThingPrincipalsResponse]
readsPrec :: Int -> ReadS ListThingPrincipalsResponse
$creadsPrec :: Int -> ReadS ListThingPrincipalsResponse
Prelude.Read, Int -> ListThingPrincipalsResponse -> ShowS
[ListThingPrincipalsResponse] -> ShowS
ListThingPrincipalsResponse -> String
(Int -> ListThingPrincipalsResponse -> ShowS)
-> (ListThingPrincipalsResponse -> String)
-> ([ListThingPrincipalsResponse] -> ShowS)
-> Show ListThingPrincipalsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListThingPrincipalsResponse] -> ShowS
$cshowList :: [ListThingPrincipalsResponse] -> ShowS
show :: ListThingPrincipalsResponse -> String
$cshow :: ListThingPrincipalsResponse -> String
showsPrec :: Int -> ListThingPrincipalsResponse -> ShowS
$cshowsPrec :: Int -> ListThingPrincipalsResponse -> ShowS
Prelude.Show, (forall x.
ListThingPrincipalsResponse -> Rep ListThingPrincipalsResponse x)
-> (forall x.
Rep ListThingPrincipalsResponse x -> ListThingPrincipalsResponse)
-> Generic ListThingPrincipalsResponse
forall x.
Rep ListThingPrincipalsResponse x -> ListThingPrincipalsResponse
forall x.
ListThingPrincipalsResponse -> Rep ListThingPrincipalsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListThingPrincipalsResponse x -> ListThingPrincipalsResponse
$cfrom :: forall x.
ListThingPrincipalsResponse -> Rep ListThingPrincipalsResponse x
Prelude.Generic)
newListThingPrincipalsResponse ::
Prelude.Int ->
ListThingPrincipalsResponse
newListThingPrincipalsResponse :: Int -> ListThingPrincipalsResponse
newListThingPrincipalsResponse Int
pHttpStatus_ =
ListThingPrincipalsResponse' :: Maybe [Text] -> Maybe Text -> Int -> ListThingPrincipalsResponse
ListThingPrincipalsResponse'
{ $sel:principals:ListThingPrincipalsResponse' :: Maybe [Text]
principals =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListThingPrincipalsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListThingPrincipalsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listThingPrincipalsResponse_principals :: Lens.Lens' ListThingPrincipalsResponse (Prelude.Maybe [Prelude.Text])
listThingPrincipalsResponse_principals :: (Maybe [Text] -> f (Maybe [Text]))
-> ListThingPrincipalsResponse -> f ListThingPrincipalsResponse
listThingPrincipalsResponse_principals = (ListThingPrincipalsResponse -> Maybe [Text])
-> (ListThingPrincipalsResponse
-> Maybe [Text] -> ListThingPrincipalsResponse)
-> Lens' ListThingPrincipalsResponse (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListThingPrincipalsResponse' {Maybe [Text]
principals :: Maybe [Text]
$sel:principals:ListThingPrincipalsResponse' :: ListThingPrincipalsResponse -> Maybe [Text]
principals} -> Maybe [Text]
principals) (\s :: ListThingPrincipalsResponse
s@ListThingPrincipalsResponse' {} Maybe [Text]
a -> ListThingPrincipalsResponse
s {$sel:principals:ListThingPrincipalsResponse' :: Maybe [Text]
principals = Maybe [Text]
a} :: ListThingPrincipalsResponse) ((Maybe [Text] -> f (Maybe [Text]))
-> ListThingPrincipalsResponse -> f ListThingPrincipalsResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ListThingPrincipalsResponse
-> f ListThingPrincipalsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listThingPrincipalsResponse_nextToken :: Lens.Lens' ListThingPrincipalsResponse (Prelude.Maybe Prelude.Text)
listThingPrincipalsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListThingPrincipalsResponse -> f ListThingPrincipalsResponse
listThingPrincipalsResponse_nextToken = (ListThingPrincipalsResponse -> Maybe Text)
-> (ListThingPrincipalsResponse
-> Maybe Text -> ListThingPrincipalsResponse)
-> Lens' ListThingPrincipalsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListThingPrincipalsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListThingPrincipalsResponse' :: ListThingPrincipalsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListThingPrincipalsResponse
s@ListThingPrincipalsResponse' {} Maybe Text
a -> ListThingPrincipalsResponse
s {$sel:nextToken:ListThingPrincipalsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListThingPrincipalsResponse)
listThingPrincipalsResponse_httpStatus :: Lens.Lens' ListThingPrincipalsResponse Prelude.Int
listThingPrincipalsResponse_httpStatus :: (Int -> f Int)
-> ListThingPrincipalsResponse -> f ListThingPrincipalsResponse
listThingPrincipalsResponse_httpStatus = (ListThingPrincipalsResponse -> Int)
-> (ListThingPrincipalsResponse
-> Int -> ListThingPrincipalsResponse)
-> Lens
ListThingPrincipalsResponse ListThingPrincipalsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListThingPrincipalsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListThingPrincipalsResponse' :: ListThingPrincipalsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListThingPrincipalsResponse
s@ListThingPrincipalsResponse' {} Int
a -> ListThingPrincipalsResponse
s {$sel:httpStatus:ListThingPrincipalsResponse' :: Int
httpStatus = Int
a} :: ListThingPrincipalsResponse)
instance Prelude.NFData ListThingPrincipalsResponse