{-# 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.AlexaBusiness.SearchAddressBooks
(
SearchAddressBooks (..),
newSearchAddressBooks,
searchAddressBooks_filters,
searchAddressBooks_sortCriteria,
searchAddressBooks_nextToken,
searchAddressBooks_maxResults,
SearchAddressBooksResponse (..),
newSearchAddressBooksResponse,
searchAddressBooksResponse_nextToken,
searchAddressBooksResponse_addressBooks,
searchAddressBooksResponse_totalCount,
searchAddressBooksResponse_httpStatus,
)
where
import Amazonka.AlexaBusiness.Types
import qualified Amazonka.Core as Core
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 SearchAddressBooks = SearchAddressBooks'
{
SearchAddressBooks -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
SearchAddressBooks -> Maybe [Sort]
sortCriteria :: Prelude.Maybe [Sort],
SearchAddressBooks -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
SearchAddressBooks -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
}
deriving (SearchAddressBooks -> SearchAddressBooks -> Bool
(SearchAddressBooks -> SearchAddressBooks -> Bool)
-> (SearchAddressBooks -> SearchAddressBooks -> Bool)
-> Eq SearchAddressBooks
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SearchAddressBooks -> SearchAddressBooks -> Bool
$c/= :: SearchAddressBooks -> SearchAddressBooks -> Bool
== :: SearchAddressBooks -> SearchAddressBooks -> Bool
$c== :: SearchAddressBooks -> SearchAddressBooks -> Bool
Prelude.Eq, ReadPrec [SearchAddressBooks]
ReadPrec SearchAddressBooks
Int -> ReadS SearchAddressBooks
ReadS [SearchAddressBooks]
(Int -> ReadS SearchAddressBooks)
-> ReadS [SearchAddressBooks]
-> ReadPrec SearchAddressBooks
-> ReadPrec [SearchAddressBooks]
-> Read SearchAddressBooks
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SearchAddressBooks]
$creadListPrec :: ReadPrec [SearchAddressBooks]
readPrec :: ReadPrec SearchAddressBooks
$creadPrec :: ReadPrec SearchAddressBooks
readList :: ReadS [SearchAddressBooks]
$creadList :: ReadS [SearchAddressBooks]
readsPrec :: Int -> ReadS SearchAddressBooks
$creadsPrec :: Int -> ReadS SearchAddressBooks
Prelude.Read, Int -> SearchAddressBooks -> ShowS
[SearchAddressBooks] -> ShowS
SearchAddressBooks -> String
(Int -> SearchAddressBooks -> ShowS)
-> (SearchAddressBooks -> String)
-> ([SearchAddressBooks] -> ShowS)
-> Show SearchAddressBooks
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SearchAddressBooks] -> ShowS
$cshowList :: [SearchAddressBooks] -> ShowS
show :: SearchAddressBooks -> String
$cshow :: SearchAddressBooks -> String
showsPrec :: Int -> SearchAddressBooks -> ShowS
$cshowsPrec :: Int -> SearchAddressBooks -> ShowS
Prelude.Show, (forall x. SearchAddressBooks -> Rep SearchAddressBooks x)
-> (forall x. Rep SearchAddressBooks x -> SearchAddressBooks)
-> Generic SearchAddressBooks
forall x. Rep SearchAddressBooks x -> SearchAddressBooks
forall x. SearchAddressBooks -> Rep SearchAddressBooks x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SearchAddressBooks x -> SearchAddressBooks
$cfrom :: forall x. SearchAddressBooks -> Rep SearchAddressBooks x
Prelude.Generic)
newSearchAddressBooks ::
SearchAddressBooks
newSearchAddressBooks :: SearchAddressBooks
newSearchAddressBooks =
SearchAddressBooks' :: Maybe [Filter]
-> Maybe [Sort]
-> Maybe Text
-> Maybe Natural
-> SearchAddressBooks
SearchAddressBooks'
{ $sel:filters:SearchAddressBooks' :: Maybe [Filter]
filters = Maybe [Filter]
forall a. Maybe a
Prelude.Nothing,
$sel:sortCriteria:SearchAddressBooks' :: Maybe [Sort]
sortCriteria = Maybe [Sort]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:SearchAddressBooks' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:SearchAddressBooks' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
searchAddressBooks_filters :: Lens.Lens' SearchAddressBooks (Prelude.Maybe [Filter])
searchAddressBooks_filters :: (Maybe [Filter] -> f (Maybe [Filter]))
-> SearchAddressBooks -> f SearchAddressBooks
searchAddressBooks_filters = (SearchAddressBooks -> Maybe [Filter])
-> (SearchAddressBooks -> Maybe [Filter] -> SearchAddressBooks)
-> Lens
SearchAddressBooks
SearchAddressBooks
(Maybe [Filter])
(Maybe [Filter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchAddressBooks' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:SearchAddressBooks' :: SearchAddressBooks -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: SearchAddressBooks
s@SearchAddressBooks' {} Maybe [Filter]
a -> SearchAddressBooks
s {$sel:filters:SearchAddressBooks' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: SearchAddressBooks) ((Maybe [Filter] -> f (Maybe [Filter]))
-> SearchAddressBooks -> f SearchAddressBooks)
-> ((Maybe [Filter] -> f (Maybe [Filter]))
-> Maybe [Filter] -> f (Maybe [Filter]))
-> (Maybe [Filter] -> f (Maybe [Filter]))
-> SearchAddressBooks
-> f SearchAddressBooks
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Filter] [Filter] [Filter] [Filter]
-> Iso
(Maybe [Filter]) (Maybe [Filter]) (Maybe [Filter]) (Maybe [Filter])
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 [Filter] [Filter] [Filter] [Filter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
searchAddressBooks_sortCriteria :: Lens.Lens' SearchAddressBooks (Prelude.Maybe [Sort])
searchAddressBooks_sortCriteria :: (Maybe [Sort] -> f (Maybe [Sort]))
-> SearchAddressBooks -> f SearchAddressBooks
searchAddressBooks_sortCriteria = (SearchAddressBooks -> Maybe [Sort])
-> (SearchAddressBooks -> Maybe [Sort] -> SearchAddressBooks)
-> Lens
SearchAddressBooks SearchAddressBooks (Maybe [Sort]) (Maybe [Sort])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchAddressBooks' {Maybe [Sort]
sortCriteria :: Maybe [Sort]
$sel:sortCriteria:SearchAddressBooks' :: SearchAddressBooks -> Maybe [Sort]
sortCriteria} -> Maybe [Sort]
sortCriteria) (\s :: SearchAddressBooks
s@SearchAddressBooks' {} Maybe [Sort]
a -> SearchAddressBooks
s {$sel:sortCriteria:SearchAddressBooks' :: Maybe [Sort]
sortCriteria = Maybe [Sort]
a} :: SearchAddressBooks) ((Maybe [Sort] -> f (Maybe [Sort]))
-> SearchAddressBooks -> f SearchAddressBooks)
-> ((Maybe [Sort] -> f (Maybe [Sort]))
-> Maybe [Sort] -> f (Maybe [Sort]))
-> (Maybe [Sort] -> f (Maybe [Sort]))
-> SearchAddressBooks
-> f SearchAddressBooks
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Sort] [Sort] [Sort] [Sort]
-> Iso (Maybe [Sort]) (Maybe [Sort]) (Maybe [Sort]) (Maybe [Sort])
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 [Sort] [Sort] [Sort] [Sort]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
searchAddressBooks_nextToken :: Lens.Lens' SearchAddressBooks (Prelude.Maybe Prelude.Text)
searchAddressBooks_nextToken :: (Maybe Text -> f (Maybe Text))
-> SearchAddressBooks -> f SearchAddressBooks
searchAddressBooks_nextToken = (SearchAddressBooks -> Maybe Text)
-> (SearchAddressBooks -> Maybe Text -> SearchAddressBooks)
-> Lens
SearchAddressBooks SearchAddressBooks (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchAddressBooks' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:SearchAddressBooks' :: SearchAddressBooks -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: SearchAddressBooks
s@SearchAddressBooks' {} Maybe Text
a -> SearchAddressBooks
s {$sel:nextToken:SearchAddressBooks' :: Maybe Text
nextToken = Maybe Text
a} :: SearchAddressBooks)
searchAddressBooks_maxResults :: Lens.Lens' SearchAddressBooks (Prelude.Maybe Prelude.Natural)
searchAddressBooks_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> SearchAddressBooks -> f SearchAddressBooks
searchAddressBooks_maxResults = (SearchAddressBooks -> Maybe Natural)
-> (SearchAddressBooks -> Maybe Natural -> SearchAddressBooks)
-> Lens
SearchAddressBooks
SearchAddressBooks
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchAddressBooks' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:SearchAddressBooks' :: SearchAddressBooks -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: SearchAddressBooks
s@SearchAddressBooks' {} Maybe Natural
a -> SearchAddressBooks
s {$sel:maxResults:SearchAddressBooks' :: Maybe Natural
maxResults = Maybe Natural
a} :: SearchAddressBooks)
instance Core.AWSRequest SearchAddressBooks where
type
AWSResponse SearchAddressBooks =
SearchAddressBooksResponse
request :: SearchAddressBooks -> Request SearchAddressBooks
request = Service -> SearchAddressBooks -> Request SearchAddressBooks
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy SearchAddressBooks
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SearchAddressBooks)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse SearchAddressBooks))
-> Logger
-> Service
-> Proxy SearchAddressBooks
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SearchAddressBooks)))
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 [AddressBookData]
-> Maybe Int
-> Int
-> SearchAddressBooksResponse
SearchAddressBooksResponse'
(Maybe Text
-> Maybe [AddressBookData]
-> Maybe Int
-> Int
-> SearchAddressBooksResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe [AddressBookData]
-> Maybe Int -> Int -> SearchAddressBooksResponse)
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 [AddressBookData]
-> Maybe Int -> Int -> SearchAddressBooksResponse)
-> Either String (Maybe [AddressBookData])
-> Either String (Maybe Int -> Int -> SearchAddressBooksResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [AddressBookData]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"AddressBooks" Either String (Maybe (Maybe [AddressBookData]))
-> Maybe [AddressBookData]
-> Either String (Maybe [AddressBookData])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [AddressBookData]
forall a. Monoid a => a
Prelude.mempty)
Either String (Maybe Int -> Int -> SearchAddressBooksResponse)
-> Either String (Maybe Int)
-> Either String (Int -> SearchAddressBooksResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Int)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TotalCount")
Either String (Int -> SearchAddressBooksResponse)
-> Either String Int -> Either String SearchAddressBooksResponse
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 SearchAddressBooks
instance Prelude.NFData SearchAddressBooks
instance Core.ToHeaders SearchAddressBooks where
toHeaders :: SearchAddressBooks -> ResponseHeaders
toHeaders =
ResponseHeaders -> SearchAddressBooks -> 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
"AlexaForBusiness.SearchAddressBooks" ::
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 SearchAddressBooks where
toJSON :: SearchAddressBooks -> Value
toJSON SearchAddressBooks' {Maybe Natural
Maybe [Filter]
Maybe [Sort]
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
sortCriteria :: Maybe [Sort]
filters :: Maybe [Filter]
$sel:maxResults:SearchAddressBooks' :: SearchAddressBooks -> Maybe Natural
$sel:nextToken:SearchAddressBooks' :: SearchAddressBooks -> Maybe Text
$sel:sortCriteria:SearchAddressBooks' :: SearchAddressBooks -> Maybe [Sort]
$sel:filters:SearchAddressBooks' :: SearchAddressBooks -> Maybe [Filter]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Filters" Text -> [Filter] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Filter] -> Pair) -> Maybe [Filter] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Filter]
filters,
(Text
"SortCriteria" Text -> [Sort] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Sort] -> Pair) -> Maybe [Sort] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Sort]
sortCriteria,
(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 -> 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 SearchAddressBooks where
toPath :: SearchAddressBooks -> ByteString
toPath = ByteString -> SearchAddressBooks -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery SearchAddressBooks where
toQuery :: SearchAddressBooks -> QueryString
toQuery = QueryString -> SearchAddressBooks -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data SearchAddressBooksResponse = SearchAddressBooksResponse'
{
SearchAddressBooksResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
SearchAddressBooksResponse -> Maybe [AddressBookData]
addressBooks :: Prelude.Maybe [AddressBookData],
SearchAddressBooksResponse -> Maybe Int
totalCount :: Prelude.Maybe Prelude.Int,
SearchAddressBooksResponse -> Int
httpStatus :: Prelude.Int
}
deriving (SearchAddressBooksResponse -> SearchAddressBooksResponse -> Bool
(SearchAddressBooksResponse -> SearchAddressBooksResponse -> Bool)
-> (SearchAddressBooksResponse
-> SearchAddressBooksResponse -> Bool)
-> Eq SearchAddressBooksResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SearchAddressBooksResponse -> SearchAddressBooksResponse -> Bool
$c/= :: SearchAddressBooksResponse -> SearchAddressBooksResponse -> Bool
== :: SearchAddressBooksResponse -> SearchAddressBooksResponse -> Bool
$c== :: SearchAddressBooksResponse -> SearchAddressBooksResponse -> Bool
Prelude.Eq, ReadPrec [SearchAddressBooksResponse]
ReadPrec SearchAddressBooksResponse
Int -> ReadS SearchAddressBooksResponse
ReadS [SearchAddressBooksResponse]
(Int -> ReadS SearchAddressBooksResponse)
-> ReadS [SearchAddressBooksResponse]
-> ReadPrec SearchAddressBooksResponse
-> ReadPrec [SearchAddressBooksResponse]
-> Read SearchAddressBooksResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SearchAddressBooksResponse]
$creadListPrec :: ReadPrec [SearchAddressBooksResponse]
readPrec :: ReadPrec SearchAddressBooksResponse
$creadPrec :: ReadPrec SearchAddressBooksResponse
readList :: ReadS [SearchAddressBooksResponse]
$creadList :: ReadS [SearchAddressBooksResponse]
readsPrec :: Int -> ReadS SearchAddressBooksResponse
$creadsPrec :: Int -> ReadS SearchAddressBooksResponse
Prelude.Read, Int -> SearchAddressBooksResponse -> ShowS
[SearchAddressBooksResponse] -> ShowS
SearchAddressBooksResponse -> String
(Int -> SearchAddressBooksResponse -> ShowS)
-> (SearchAddressBooksResponse -> String)
-> ([SearchAddressBooksResponse] -> ShowS)
-> Show SearchAddressBooksResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SearchAddressBooksResponse] -> ShowS
$cshowList :: [SearchAddressBooksResponse] -> ShowS
show :: SearchAddressBooksResponse -> String
$cshow :: SearchAddressBooksResponse -> String
showsPrec :: Int -> SearchAddressBooksResponse -> ShowS
$cshowsPrec :: Int -> SearchAddressBooksResponse -> ShowS
Prelude.Show, (forall x.
SearchAddressBooksResponse -> Rep SearchAddressBooksResponse x)
-> (forall x.
Rep SearchAddressBooksResponse x -> SearchAddressBooksResponse)
-> Generic SearchAddressBooksResponse
forall x.
Rep SearchAddressBooksResponse x -> SearchAddressBooksResponse
forall x.
SearchAddressBooksResponse -> Rep SearchAddressBooksResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SearchAddressBooksResponse x -> SearchAddressBooksResponse
$cfrom :: forall x.
SearchAddressBooksResponse -> Rep SearchAddressBooksResponse x
Prelude.Generic)
newSearchAddressBooksResponse ::
Prelude.Int ->
SearchAddressBooksResponse
newSearchAddressBooksResponse :: Int -> SearchAddressBooksResponse
newSearchAddressBooksResponse Int
pHttpStatus_ =
SearchAddressBooksResponse' :: Maybe Text
-> Maybe [AddressBookData]
-> Maybe Int
-> Int
-> SearchAddressBooksResponse
SearchAddressBooksResponse'
{ $sel:nextToken:SearchAddressBooksResponse' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:addressBooks:SearchAddressBooksResponse' :: Maybe [AddressBookData]
addressBooks = Maybe [AddressBookData]
forall a. Maybe a
Prelude.Nothing,
$sel:totalCount:SearchAddressBooksResponse' :: Maybe Int
totalCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:SearchAddressBooksResponse' :: Int
httpStatus = Int
pHttpStatus_
}
searchAddressBooksResponse_nextToken :: Lens.Lens' SearchAddressBooksResponse (Prelude.Maybe Prelude.Text)
searchAddressBooksResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> SearchAddressBooksResponse -> f SearchAddressBooksResponse
searchAddressBooksResponse_nextToken = (SearchAddressBooksResponse -> Maybe Text)
-> (SearchAddressBooksResponse
-> Maybe Text -> SearchAddressBooksResponse)
-> Lens
SearchAddressBooksResponse
SearchAddressBooksResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchAddressBooksResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:SearchAddressBooksResponse' :: SearchAddressBooksResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: SearchAddressBooksResponse
s@SearchAddressBooksResponse' {} Maybe Text
a -> SearchAddressBooksResponse
s {$sel:nextToken:SearchAddressBooksResponse' :: Maybe Text
nextToken = Maybe Text
a} :: SearchAddressBooksResponse)
searchAddressBooksResponse_addressBooks :: Lens.Lens' SearchAddressBooksResponse (Prelude.Maybe [AddressBookData])
searchAddressBooksResponse_addressBooks :: (Maybe [AddressBookData] -> f (Maybe [AddressBookData]))
-> SearchAddressBooksResponse -> f SearchAddressBooksResponse
searchAddressBooksResponse_addressBooks = (SearchAddressBooksResponse -> Maybe [AddressBookData])
-> (SearchAddressBooksResponse
-> Maybe [AddressBookData] -> SearchAddressBooksResponse)
-> Lens
SearchAddressBooksResponse
SearchAddressBooksResponse
(Maybe [AddressBookData])
(Maybe [AddressBookData])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchAddressBooksResponse' {Maybe [AddressBookData]
addressBooks :: Maybe [AddressBookData]
$sel:addressBooks:SearchAddressBooksResponse' :: SearchAddressBooksResponse -> Maybe [AddressBookData]
addressBooks} -> Maybe [AddressBookData]
addressBooks) (\s :: SearchAddressBooksResponse
s@SearchAddressBooksResponse' {} Maybe [AddressBookData]
a -> SearchAddressBooksResponse
s {$sel:addressBooks:SearchAddressBooksResponse' :: Maybe [AddressBookData]
addressBooks = Maybe [AddressBookData]
a} :: SearchAddressBooksResponse) ((Maybe [AddressBookData] -> f (Maybe [AddressBookData]))
-> SearchAddressBooksResponse -> f SearchAddressBooksResponse)
-> ((Maybe [AddressBookData] -> f (Maybe [AddressBookData]))
-> Maybe [AddressBookData] -> f (Maybe [AddressBookData]))
-> (Maybe [AddressBookData] -> f (Maybe [AddressBookData]))
-> SearchAddressBooksResponse
-> f SearchAddressBooksResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[AddressBookData]
[AddressBookData]
[AddressBookData]
[AddressBookData]
-> Iso
(Maybe [AddressBookData])
(Maybe [AddressBookData])
(Maybe [AddressBookData])
(Maybe [AddressBookData])
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
[AddressBookData]
[AddressBookData]
[AddressBookData]
[AddressBookData]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
searchAddressBooksResponse_totalCount :: Lens.Lens' SearchAddressBooksResponse (Prelude.Maybe Prelude.Int)
searchAddressBooksResponse_totalCount :: (Maybe Int -> f (Maybe Int))
-> SearchAddressBooksResponse -> f SearchAddressBooksResponse
searchAddressBooksResponse_totalCount = (SearchAddressBooksResponse -> Maybe Int)
-> (SearchAddressBooksResponse
-> Maybe Int -> SearchAddressBooksResponse)
-> Lens
SearchAddressBooksResponse
SearchAddressBooksResponse
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchAddressBooksResponse' {Maybe Int
totalCount :: Maybe Int
$sel:totalCount:SearchAddressBooksResponse' :: SearchAddressBooksResponse -> Maybe Int
totalCount} -> Maybe Int
totalCount) (\s :: SearchAddressBooksResponse
s@SearchAddressBooksResponse' {} Maybe Int
a -> SearchAddressBooksResponse
s {$sel:totalCount:SearchAddressBooksResponse' :: Maybe Int
totalCount = Maybe Int
a} :: SearchAddressBooksResponse)
searchAddressBooksResponse_httpStatus :: Lens.Lens' SearchAddressBooksResponse Prelude.Int
searchAddressBooksResponse_httpStatus :: (Int -> f Int)
-> SearchAddressBooksResponse -> f SearchAddressBooksResponse
searchAddressBooksResponse_httpStatus = (SearchAddressBooksResponse -> Int)
-> (SearchAddressBooksResponse
-> Int -> SearchAddressBooksResponse)
-> Lens
SearchAddressBooksResponse SearchAddressBooksResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchAddressBooksResponse' {Int
httpStatus :: Int
$sel:httpStatus:SearchAddressBooksResponse' :: SearchAddressBooksResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: SearchAddressBooksResponse
s@SearchAddressBooksResponse' {} Int
a -> SearchAddressBooksResponse
s {$sel:httpStatus:SearchAddressBooksResponse' :: Int
httpStatus = Int
a} :: SearchAddressBooksResponse)
instance Prelude.NFData SearchAddressBooksResponse