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