{-# 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.Chime.SearchAvailablePhoneNumbers
(
SearchAvailablePhoneNumbers (..),
newSearchAvailablePhoneNumbers,
searchAvailablePhoneNumbers_phoneNumberType,
searchAvailablePhoneNumbers_state,
searchAvailablePhoneNumbers_tollFreePrefix,
searchAvailablePhoneNumbers_country,
searchAvailablePhoneNumbers_nextToken,
searchAvailablePhoneNumbers_city,
searchAvailablePhoneNumbers_areaCode,
searchAvailablePhoneNumbers_maxResults,
SearchAvailablePhoneNumbersResponse (..),
newSearchAvailablePhoneNumbersResponse,
searchAvailablePhoneNumbersResponse_e164PhoneNumbers,
searchAvailablePhoneNumbersResponse_nextToken,
searchAvailablePhoneNumbersResponse_httpStatus,
)
where
import Amazonka.Chime.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 SearchAvailablePhoneNumbers = SearchAvailablePhoneNumbers'
{
SearchAvailablePhoneNumbers -> Maybe PhoneNumberType
phoneNumberType :: Prelude.Maybe PhoneNumberType,
SearchAvailablePhoneNumbers -> Maybe Text
state :: Prelude.Maybe Prelude.Text,
SearchAvailablePhoneNumbers -> Maybe Text
tollFreePrefix :: Prelude.Maybe Prelude.Text,
SearchAvailablePhoneNumbers -> Maybe Text
country :: Prelude.Maybe Prelude.Text,
SearchAvailablePhoneNumbers -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
SearchAvailablePhoneNumbers -> Maybe Text
city :: Prelude.Maybe Prelude.Text,
SearchAvailablePhoneNumbers -> Maybe Text
areaCode :: Prelude.Maybe Prelude.Text,
SearchAvailablePhoneNumbers -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
}
deriving (SearchAvailablePhoneNumbers -> SearchAvailablePhoneNumbers -> Bool
(SearchAvailablePhoneNumbers
-> SearchAvailablePhoneNumbers -> Bool)
-> (SearchAvailablePhoneNumbers
-> SearchAvailablePhoneNumbers -> Bool)
-> Eq SearchAvailablePhoneNumbers
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SearchAvailablePhoneNumbers -> SearchAvailablePhoneNumbers -> Bool
$c/= :: SearchAvailablePhoneNumbers -> SearchAvailablePhoneNumbers -> Bool
== :: SearchAvailablePhoneNumbers -> SearchAvailablePhoneNumbers -> Bool
$c== :: SearchAvailablePhoneNumbers -> SearchAvailablePhoneNumbers -> Bool
Prelude.Eq, ReadPrec [SearchAvailablePhoneNumbers]
ReadPrec SearchAvailablePhoneNumbers
Int -> ReadS SearchAvailablePhoneNumbers
ReadS [SearchAvailablePhoneNumbers]
(Int -> ReadS SearchAvailablePhoneNumbers)
-> ReadS [SearchAvailablePhoneNumbers]
-> ReadPrec SearchAvailablePhoneNumbers
-> ReadPrec [SearchAvailablePhoneNumbers]
-> Read SearchAvailablePhoneNumbers
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SearchAvailablePhoneNumbers]
$creadListPrec :: ReadPrec [SearchAvailablePhoneNumbers]
readPrec :: ReadPrec SearchAvailablePhoneNumbers
$creadPrec :: ReadPrec SearchAvailablePhoneNumbers
readList :: ReadS [SearchAvailablePhoneNumbers]
$creadList :: ReadS [SearchAvailablePhoneNumbers]
readsPrec :: Int -> ReadS SearchAvailablePhoneNumbers
$creadsPrec :: Int -> ReadS SearchAvailablePhoneNumbers
Prelude.Read, Int -> SearchAvailablePhoneNumbers -> ShowS
[SearchAvailablePhoneNumbers] -> ShowS
SearchAvailablePhoneNumbers -> String
(Int -> SearchAvailablePhoneNumbers -> ShowS)
-> (SearchAvailablePhoneNumbers -> String)
-> ([SearchAvailablePhoneNumbers] -> ShowS)
-> Show SearchAvailablePhoneNumbers
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SearchAvailablePhoneNumbers] -> ShowS
$cshowList :: [SearchAvailablePhoneNumbers] -> ShowS
show :: SearchAvailablePhoneNumbers -> String
$cshow :: SearchAvailablePhoneNumbers -> String
showsPrec :: Int -> SearchAvailablePhoneNumbers -> ShowS
$cshowsPrec :: Int -> SearchAvailablePhoneNumbers -> ShowS
Prelude.Show, (forall x.
SearchAvailablePhoneNumbers -> Rep SearchAvailablePhoneNumbers x)
-> (forall x.
Rep SearchAvailablePhoneNumbers x -> SearchAvailablePhoneNumbers)
-> Generic SearchAvailablePhoneNumbers
forall x.
Rep SearchAvailablePhoneNumbers x -> SearchAvailablePhoneNumbers
forall x.
SearchAvailablePhoneNumbers -> Rep SearchAvailablePhoneNumbers x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SearchAvailablePhoneNumbers x -> SearchAvailablePhoneNumbers
$cfrom :: forall x.
SearchAvailablePhoneNumbers -> Rep SearchAvailablePhoneNumbers x
Prelude.Generic)
newSearchAvailablePhoneNumbers ::
SearchAvailablePhoneNumbers
newSearchAvailablePhoneNumbers :: SearchAvailablePhoneNumbers
newSearchAvailablePhoneNumbers =
SearchAvailablePhoneNumbers' :: Maybe PhoneNumberType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> SearchAvailablePhoneNumbers
SearchAvailablePhoneNumbers'
{ $sel:phoneNumberType:SearchAvailablePhoneNumbers' :: Maybe PhoneNumberType
phoneNumberType =
Maybe PhoneNumberType
forall a. Maybe a
Prelude.Nothing,
$sel:state:SearchAvailablePhoneNumbers' :: Maybe Text
state = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tollFreePrefix:SearchAvailablePhoneNumbers' :: Maybe Text
tollFreePrefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:country:SearchAvailablePhoneNumbers' :: Maybe Text
country = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:SearchAvailablePhoneNumbers' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:city:SearchAvailablePhoneNumbers' :: Maybe Text
city = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:areaCode:SearchAvailablePhoneNumbers' :: Maybe Text
areaCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:SearchAvailablePhoneNumbers' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
searchAvailablePhoneNumbers_phoneNumberType :: Lens.Lens' SearchAvailablePhoneNumbers (Prelude.Maybe PhoneNumberType)
searchAvailablePhoneNumbers_phoneNumberType :: (Maybe PhoneNumberType -> f (Maybe PhoneNumberType))
-> SearchAvailablePhoneNumbers -> f SearchAvailablePhoneNumbers
searchAvailablePhoneNumbers_phoneNumberType = (SearchAvailablePhoneNumbers -> Maybe PhoneNumberType)
-> (SearchAvailablePhoneNumbers
-> Maybe PhoneNumberType -> SearchAvailablePhoneNumbers)
-> Lens
SearchAvailablePhoneNumbers
SearchAvailablePhoneNumbers
(Maybe PhoneNumberType)
(Maybe PhoneNumberType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchAvailablePhoneNumbers' {Maybe PhoneNumberType
phoneNumberType :: Maybe PhoneNumberType
$sel:phoneNumberType:SearchAvailablePhoneNumbers' :: SearchAvailablePhoneNumbers -> Maybe PhoneNumberType
phoneNumberType} -> Maybe PhoneNumberType
phoneNumberType) (\s :: SearchAvailablePhoneNumbers
s@SearchAvailablePhoneNumbers' {} Maybe PhoneNumberType
a -> SearchAvailablePhoneNumbers
s {$sel:phoneNumberType:SearchAvailablePhoneNumbers' :: Maybe PhoneNumberType
phoneNumberType = Maybe PhoneNumberType
a} :: SearchAvailablePhoneNumbers)
searchAvailablePhoneNumbers_state :: Lens.Lens' SearchAvailablePhoneNumbers (Prelude.Maybe Prelude.Text)
searchAvailablePhoneNumbers_state :: (Maybe Text -> f (Maybe Text))
-> SearchAvailablePhoneNumbers -> f SearchAvailablePhoneNumbers
searchAvailablePhoneNumbers_state = (SearchAvailablePhoneNumbers -> Maybe Text)
-> (SearchAvailablePhoneNumbers
-> Maybe Text -> SearchAvailablePhoneNumbers)
-> Lens
SearchAvailablePhoneNumbers
SearchAvailablePhoneNumbers
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchAvailablePhoneNumbers' {Maybe Text
state :: Maybe Text
$sel:state:SearchAvailablePhoneNumbers' :: SearchAvailablePhoneNumbers -> Maybe Text
state} -> Maybe Text
state) (\s :: SearchAvailablePhoneNumbers
s@SearchAvailablePhoneNumbers' {} Maybe Text
a -> SearchAvailablePhoneNumbers
s {$sel:state:SearchAvailablePhoneNumbers' :: Maybe Text
state = Maybe Text
a} :: SearchAvailablePhoneNumbers)
searchAvailablePhoneNumbers_tollFreePrefix :: Lens.Lens' SearchAvailablePhoneNumbers (Prelude.Maybe Prelude.Text)
searchAvailablePhoneNumbers_tollFreePrefix :: (Maybe Text -> f (Maybe Text))
-> SearchAvailablePhoneNumbers -> f SearchAvailablePhoneNumbers
searchAvailablePhoneNumbers_tollFreePrefix = (SearchAvailablePhoneNumbers -> Maybe Text)
-> (SearchAvailablePhoneNumbers
-> Maybe Text -> SearchAvailablePhoneNumbers)
-> Lens
SearchAvailablePhoneNumbers
SearchAvailablePhoneNumbers
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchAvailablePhoneNumbers' {Maybe Text
tollFreePrefix :: Maybe Text
$sel:tollFreePrefix:SearchAvailablePhoneNumbers' :: SearchAvailablePhoneNumbers -> Maybe Text
tollFreePrefix} -> Maybe Text
tollFreePrefix) (\s :: SearchAvailablePhoneNumbers
s@SearchAvailablePhoneNumbers' {} Maybe Text
a -> SearchAvailablePhoneNumbers
s {$sel:tollFreePrefix:SearchAvailablePhoneNumbers' :: Maybe Text
tollFreePrefix = Maybe Text
a} :: SearchAvailablePhoneNumbers)
searchAvailablePhoneNumbers_country :: Lens.Lens' SearchAvailablePhoneNumbers (Prelude.Maybe Prelude.Text)
searchAvailablePhoneNumbers_country :: (Maybe Text -> f (Maybe Text))
-> SearchAvailablePhoneNumbers -> f SearchAvailablePhoneNumbers
searchAvailablePhoneNumbers_country = (SearchAvailablePhoneNumbers -> Maybe Text)
-> (SearchAvailablePhoneNumbers
-> Maybe Text -> SearchAvailablePhoneNumbers)
-> Lens
SearchAvailablePhoneNumbers
SearchAvailablePhoneNumbers
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchAvailablePhoneNumbers' {Maybe Text
country :: Maybe Text
$sel:country:SearchAvailablePhoneNumbers' :: SearchAvailablePhoneNumbers -> Maybe Text
country} -> Maybe Text
country) (\s :: SearchAvailablePhoneNumbers
s@SearchAvailablePhoneNumbers' {} Maybe Text
a -> SearchAvailablePhoneNumbers
s {$sel:country:SearchAvailablePhoneNumbers' :: Maybe Text
country = Maybe Text
a} :: SearchAvailablePhoneNumbers)
searchAvailablePhoneNumbers_nextToken :: Lens.Lens' SearchAvailablePhoneNumbers (Prelude.Maybe Prelude.Text)
searchAvailablePhoneNumbers_nextToken :: (Maybe Text -> f (Maybe Text))
-> SearchAvailablePhoneNumbers -> f SearchAvailablePhoneNumbers
searchAvailablePhoneNumbers_nextToken = (SearchAvailablePhoneNumbers -> Maybe Text)
-> (SearchAvailablePhoneNumbers
-> Maybe Text -> SearchAvailablePhoneNumbers)
-> Lens
SearchAvailablePhoneNumbers
SearchAvailablePhoneNumbers
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchAvailablePhoneNumbers' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:SearchAvailablePhoneNumbers' :: SearchAvailablePhoneNumbers -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: SearchAvailablePhoneNumbers
s@SearchAvailablePhoneNumbers' {} Maybe Text
a -> SearchAvailablePhoneNumbers
s {$sel:nextToken:SearchAvailablePhoneNumbers' :: Maybe Text
nextToken = Maybe Text
a} :: SearchAvailablePhoneNumbers)
searchAvailablePhoneNumbers_city :: Lens.Lens' SearchAvailablePhoneNumbers (Prelude.Maybe Prelude.Text)
searchAvailablePhoneNumbers_city :: (Maybe Text -> f (Maybe Text))
-> SearchAvailablePhoneNumbers -> f SearchAvailablePhoneNumbers
searchAvailablePhoneNumbers_city = (SearchAvailablePhoneNumbers -> Maybe Text)
-> (SearchAvailablePhoneNumbers
-> Maybe Text -> SearchAvailablePhoneNumbers)
-> Lens
SearchAvailablePhoneNumbers
SearchAvailablePhoneNumbers
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchAvailablePhoneNumbers' {Maybe Text
city :: Maybe Text
$sel:city:SearchAvailablePhoneNumbers' :: SearchAvailablePhoneNumbers -> Maybe Text
city} -> Maybe Text
city) (\s :: SearchAvailablePhoneNumbers
s@SearchAvailablePhoneNumbers' {} Maybe Text
a -> SearchAvailablePhoneNumbers
s {$sel:city:SearchAvailablePhoneNumbers' :: Maybe Text
city = Maybe Text
a} :: SearchAvailablePhoneNumbers)
searchAvailablePhoneNumbers_areaCode :: Lens.Lens' SearchAvailablePhoneNumbers (Prelude.Maybe Prelude.Text)
searchAvailablePhoneNumbers_areaCode :: (Maybe Text -> f (Maybe Text))
-> SearchAvailablePhoneNumbers -> f SearchAvailablePhoneNumbers
searchAvailablePhoneNumbers_areaCode = (SearchAvailablePhoneNumbers -> Maybe Text)
-> (SearchAvailablePhoneNumbers
-> Maybe Text -> SearchAvailablePhoneNumbers)
-> Lens
SearchAvailablePhoneNumbers
SearchAvailablePhoneNumbers
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchAvailablePhoneNumbers' {Maybe Text
areaCode :: Maybe Text
$sel:areaCode:SearchAvailablePhoneNumbers' :: SearchAvailablePhoneNumbers -> Maybe Text
areaCode} -> Maybe Text
areaCode) (\s :: SearchAvailablePhoneNumbers
s@SearchAvailablePhoneNumbers' {} Maybe Text
a -> SearchAvailablePhoneNumbers
s {$sel:areaCode:SearchAvailablePhoneNumbers' :: Maybe Text
areaCode = Maybe Text
a} :: SearchAvailablePhoneNumbers)
searchAvailablePhoneNumbers_maxResults :: Lens.Lens' SearchAvailablePhoneNumbers (Prelude.Maybe Prelude.Natural)
searchAvailablePhoneNumbers_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> SearchAvailablePhoneNumbers -> f SearchAvailablePhoneNumbers
searchAvailablePhoneNumbers_maxResults = (SearchAvailablePhoneNumbers -> Maybe Natural)
-> (SearchAvailablePhoneNumbers
-> Maybe Natural -> SearchAvailablePhoneNumbers)
-> Lens
SearchAvailablePhoneNumbers
SearchAvailablePhoneNumbers
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchAvailablePhoneNumbers' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:SearchAvailablePhoneNumbers' :: SearchAvailablePhoneNumbers -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: SearchAvailablePhoneNumbers
s@SearchAvailablePhoneNumbers' {} Maybe Natural
a -> SearchAvailablePhoneNumbers
s {$sel:maxResults:SearchAvailablePhoneNumbers' :: Maybe Natural
maxResults = Maybe Natural
a} :: SearchAvailablePhoneNumbers)
instance Core.AWSRequest SearchAvailablePhoneNumbers where
type
AWSResponse SearchAvailablePhoneNumbers =
SearchAvailablePhoneNumbersResponse
request :: SearchAvailablePhoneNumbers -> Request SearchAvailablePhoneNumbers
request = Service
-> SearchAvailablePhoneNumbers
-> Request SearchAvailablePhoneNumbers
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy SearchAvailablePhoneNumbers
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SearchAvailablePhoneNumbers)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse SearchAvailablePhoneNumbers))
-> Logger
-> Service
-> Proxy SearchAvailablePhoneNumbers
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SearchAvailablePhoneNumbers)))
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 [Sensitive Text]
-> Maybe Text -> Int -> SearchAvailablePhoneNumbersResponse
SearchAvailablePhoneNumbersResponse'
(Maybe [Sensitive Text]
-> Maybe Text -> Int -> SearchAvailablePhoneNumbersResponse)
-> Either String (Maybe [Sensitive Text])
-> Either
String (Maybe Text -> Int -> SearchAvailablePhoneNumbersResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Either String (Maybe (Maybe [Sensitive Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"E164PhoneNumbers"
Either String (Maybe (Maybe [Sensitive Text]))
-> Maybe [Sensitive Text] -> Either String (Maybe [Sensitive Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Sensitive Text]
forall a. Monoid a => a
Prelude.mempty
)
Either
String (Maybe Text -> Int -> SearchAvailablePhoneNumbersResponse)
-> Either String (Maybe Text)
-> Either String (Int -> SearchAvailablePhoneNumbersResponse)
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 -> SearchAvailablePhoneNumbersResponse)
-> Either String Int
-> Either String SearchAvailablePhoneNumbersResponse
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 SearchAvailablePhoneNumbers
instance Prelude.NFData SearchAvailablePhoneNumbers
instance Core.ToHeaders SearchAvailablePhoneNumbers where
toHeaders :: SearchAvailablePhoneNumbers -> ResponseHeaders
toHeaders = ResponseHeaders -> SearchAvailablePhoneNumbers -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath SearchAvailablePhoneNumbers where
toPath :: SearchAvailablePhoneNumbers -> ByteString
toPath = ByteString -> SearchAvailablePhoneNumbers -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/search"
instance Core.ToQuery SearchAvailablePhoneNumbers where
toQuery :: SearchAvailablePhoneNumbers -> QueryString
toQuery SearchAvailablePhoneNumbers' {Maybe Natural
Maybe Text
Maybe PhoneNumberType
maxResults :: Maybe Natural
areaCode :: Maybe Text
city :: Maybe Text
nextToken :: Maybe Text
country :: Maybe Text
tollFreePrefix :: Maybe Text
state :: Maybe Text
phoneNumberType :: Maybe PhoneNumberType
$sel:maxResults:SearchAvailablePhoneNumbers' :: SearchAvailablePhoneNumbers -> Maybe Natural
$sel:areaCode:SearchAvailablePhoneNumbers' :: SearchAvailablePhoneNumbers -> Maybe Text
$sel:city:SearchAvailablePhoneNumbers' :: SearchAvailablePhoneNumbers -> Maybe Text
$sel:nextToken:SearchAvailablePhoneNumbers' :: SearchAvailablePhoneNumbers -> Maybe Text
$sel:country:SearchAvailablePhoneNumbers' :: SearchAvailablePhoneNumbers -> Maybe Text
$sel:tollFreePrefix:SearchAvailablePhoneNumbers' :: SearchAvailablePhoneNumbers -> Maybe Text
$sel:state:SearchAvailablePhoneNumbers' :: SearchAvailablePhoneNumbers -> Maybe Text
$sel:phoneNumberType:SearchAvailablePhoneNumbers' :: SearchAvailablePhoneNumbers -> Maybe PhoneNumberType
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"phone-number-type" ByteString -> Maybe PhoneNumberType -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe PhoneNumberType
phoneNumberType,
ByteString
"state" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
state,
ByteString
"toll-free-prefix" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
tollFreePrefix,
ByteString
"country" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
country,
ByteString
"next-token" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
ByteString
"city" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
city,
ByteString
"area-code" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
areaCode,
ByteString
"max-results" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults,
QueryString
"type=phone-numbers"
]
data SearchAvailablePhoneNumbersResponse = SearchAvailablePhoneNumbersResponse'
{
SearchAvailablePhoneNumbersResponse -> Maybe [Sensitive Text]
e164PhoneNumbers :: Prelude.Maybe [Core.Sensitive Prelude.Text],
SearchAvailablePhoneNumbersResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
SearchAvailablePhoneNumbersResponse -> Int
httpStatus :: Prelude.Int
}
deriving (SearchAvailablePhoneNumbersResponse
-> SearchAvailablePhoneNumbersResponse -> Bool
(SearchAvailablePhoneNumbersResponse
-> SearchAvailablePhoneNumbersResponse -> Bool)
-> (SearchAvailablePhoneNumbersResponse
-> SearchAvailablePhoneNumbersResponse -> Bool)
-> Eq SearchAvailablePhoneNumbersResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SearchAvailablePhoneNumbersResponse
-> SearchAvailablePhoneNumbersResponse -> Bool
$c/= :: SearchAvailablePhoneNumbersResponse
-> SearchAvailablePhoneNumbersResponse -> Bool
== :: SearchAvailablePhoneNumbersResponse
-> SearchAvailablePhoneNumbersResponse -> Bool
$c== :: SearchAvailablePhoneNumbersResponse
-> SearchAvailablePhoneNumbersResponse -> Bool
Prelude.Eq, Int -> SearchAvailablePhoneNumbersResponse -> ShowS
[SearchAvailablePhoneNumbersResponse] -> ShowS
SearchAvailablePhoneNumbersResponse -> String
(Int -> SearchAvailablePhoneNumbersResponse -> ShowS)
-> (SearchAvailablePhoneNumbersResponse -> String)
-> ([SearchAvailablePhoneNumbersResponse] -> ShowS)
-> Show SearchAvailablePhoneNumbersResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SearchAvailablePhoneNumbersResponse] -> ShowS
$cshowList :: [SearchAvailablePhoneNumbersResponse] -> ShowS
show :: SearchAvailablePhoneNumbersResponse -> String
$cshow :: SearchAvailablePhoneNumbersResponse -> String
showsPrec :: Int -> SearchAvailablePhoneNumbersResponse -> ShowS
$cshowsPrec :: Int -> SearchAvailablePhoneNumbersResponse -> ShowS
Prelude.Show, (forall x.
SearchAvailablePhoneNumbersResponse
-> Rep SearchAvailablePhoneNumbersResponse x)
-> (forall x.
Rep SearchAvailablePhoneNumbersResponse x
-> SearchAvailablePhoneNumbersResponse)
-> Generic SearchAvailablePhoneNumbersResponse
forall x.
Rep SearchAvailablePhoneNumbersResponse x
-> SearchAvailablePhoneNumbersResponse
forall x.
SearchAvailablePhoneNumbersResponse
-> Rep SearchAvailablePhoneNumbersResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SearchAvailablePhoneNumbersResponse x
-> SearchAvailablePhoneNumbersResponse
$cfrom :: forall x.
SearchAvailablePhoneNumbersResponse
-> Rep SearchAvailablePhoneNumbersResponse x
Prelude.Generic)
newSearchAvailablePhoneNumbersResponse ::
Prelude.Int ->
SearchAvailablePhoneNumbersResponse
newSearchAvailablePhoneNumbersResponse :: Int -> SearchAvailablePhoneNumbersResponse
newSearchAvailablePhoneNumbersResponse Int
pHttpStatus_ =
SearchAvailablePhoneNumbersResponse' :: Maybe [Sensitive Text]
-> Maybe Text -> Int -> SearchAvailablePhoneNumbersResponse
SearchAvailablePhoneNumbersResponse'
{ $sel:e164PhoneNumbers:SearchAvailablePhoneNumbersResponse' :: Maybe [Sensitive Text]
e164PhoneNumbers =
Maybe [Sensitive Text]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:SearchAvailablePhoneNumbersResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:SearchAvailablePhoneNumbersResponse' :: Int
httpStatus = Int
pHttpStatus_
}
searchAvailablePhoneNumbersResponse_e164PhoneNumbers :: Lens.Lens' SearchAvailablePhoneNumbersResponse (Prelude.Maybe [Prelude.Text])
searchAvailablePhoneNumbersResponse_e164PhoneNumbers :: (Maybe [Text] -> f (Maybe [Text]))
-> SearchAvailablePhoneNumbersResponse
-> f SearchAvailablePhoneNumbersResponse
searchAvailablePhoneNumbersResponse_e164PhoneNumbers = (SearchAvailablePhoneNumbersResponse -> Maybe [Sensitive Text])
-> (SearchAvailablePhoneNumbersResponse
-> Maybe [Sensitive Text] -> SearchAvailablePhoneNumbersResponse)
-> Lens
SearchAvailablePhoneNumbersResponse
SearchAvailablePhoneNumbersResponse
(Maybe [Sensitive Text])
(Maybe [Sensitive Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchAvailablePhoneNumbersResponse' {Maybe [Sensitive Text]
e164PhoneNumbers :: Maybe [Sensitive Text]
$sel:e164PhoneNumbers:SearchAvailablePhoneNumbersResponse' :: SearchAvailablePhoneNumbersResponse -> Maybe [Sensitive Text]
e164PhoneNumbers} -> Maybe [Sensitive Text]
e164PhoneNumbers) (\s :: SearchAvailablePhoneNumbersResponse
s@SearchAvailablePhoneNumbersResponse' {} Maybe [Sensitive Text]
a -> SearchAvailablePhoneNumbersResponse
s {$sel:e164PhoneNumbers:SearchAvailablePhoneNumbersResponse' :: Maybe [Sensitive Text]
e164PhoneNumbers = Maybe [Sensitive Text]
a} :: SearchAvailablePhoneNumbersResponse) ((Maybe [Sensitive Text] -> f (Maybe [Sensitive Text]))
-> SearchAvailablePhoneNumbersResponse
-> f SearchAvailablePhoneNumbersResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Sensitive Text] -> f (Maybe [Sensitive Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> SearchAvailablePhoneNumbersResponse
-> f SearchAvailablePhoneNumbersResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Sensitive Text] [Sensitive Text] [Text] [Text]
-> Iso
(Maybe [Sensitive Text])
(Maybe [Sensitive 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 [Sensitive Text] [Sensitive Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
searchAvailablePhoneNumbersResponse_nextToken :: Lens.Lens' SearchAvailablePhoneNumbersResponse (Prelude.Maybe Prelude.Text)
searchAvailablePhoneNumbersResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> SearchAvailablePhoneNumbersResponse
-> f SearchAvailablePhoneNumbersResponse
searchAvailablePhoneNumbersResponse_nextToken = (SearchAvailablePhoneNumbersResponse -> Maybe Text)
-> (SearchAvailablePhoneNumbersResponse
-> Maybe Text -> SearchAvailablePhoneNumbersResponse)
-> Lens
SearchAvailablePhoneNumbersResponse
SearchAvailablePhoneNumbersResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchAvailablePhoneNumbersResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:SearchAvailablePhoneNumbersResponse' :: SearchAvailablePhoneNumbersResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: SearchAvailablePhoneNumbersResponse
s@SearchAvailablePhoneNumbersResponse' {} Maybe Text
a -> SearchAvailablePhoneNumbersResponse
s {$sel:nextToken:SearchAvailablePhoneNumbersResponse' :: Maybe Text
nextToken = Maybe Text
a} :: SearchAvailablePhoneNumbersResponse)
searchAvailablePhoneNumbersResponse_httpStatus :: Lens.Lens' SearchAvailablePhoneNumbersResponse Prelude.Int
searchAvailablePhoneNumbersResponse_httpStatus :: (Int -> f Int)
-> SearchAvailablePhoneNumbersResponse
-> f SearchAvailablePhoneNumbersResponse
searchAvailablePhoneNumbersResponse_httpStatus = (SearchAvailablePhoneNumbersResponse -> Int)
-> (SearchAvailablePhoneNumbersResponse
-> Int -> SearchAvailablePhoneNumbersResponse)
-> Lens
SearchAvailablePhoneNumbersResponse
SearchAvailablePhoneNumbersResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchAvailablePhoneNumbersResponse' {Int
httpStatus :: Int
$sel:httpStatus:SearchAvailablePhoneNumbersResponse' :: SearchAvailablePhoneNumbersResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: SearchAvailablePhoneNumbersResponse
s@SearchAvailablePhoneNumbersResponse' {} Int
a -> SearchAvailablePhoneNumbersResponse
s {$sel:httpStatus:SearchAvailablePhoneNumbersResponse' :: Int
httpStatus = Int
a} :: SearchAvailablePhoneNumbersResponse)
instance
Prelude.NFData
SearchAvailablePhoneNumbersResponse