{-# 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.PinpointSmsVoiceV2.RequestPhoneNumber
(
RequestPhoneNumber (..),
newRequestPhoneNumber,
requestPhoneNumber_clientToken,
requestPhoneNumber_deletionProtectionEnabled,
requestPhoneNumber_optOutListName,
requestPhoneNumber_poolId,
requestPhoneNumber_registrationId,
requestPhoneNumber_tags,
requestPhoneNumber_isoCountryCode,
requestPhoneNumber_messageType,
requestPhoneNumber_numberCapabilities,
requestPhoneNumber_numberType,
RequestPhoneNumberResponse (..),
newRequestPhoneNumberResponse,
requestPhoneNumberResponse_createdTimestamp,
requestPhoneNumberResponse_deletionProtectionEnabled,
requestPhoneNumberResponse_isoCountryCode,
requestPhoneNumberResponse_messageType,
requestPhoneNumberResponse_monthlyLeasingPrice,
requestPhoneNumberResponse_numberCapabilities,
requestPhoneNumberResponse_numberType,
requestPhoneNumberResponse_optOutListName,
requestPhoneNumberResponse_phoneNumber,
requestPhoneNumberResponse_phoneNumberArn,
requestPhoneNumberResponse_phoneNumberId,
requestPhoneNumberResponse_poolId,
requestPhoneNumberResponse_selfManagedOptOutsEnabled,
requestPhoneNumberResponse_status,
requestPhoneNumberResponse_tags,
requestPhoneNumberResponse_twoWayChannelArn,
requestPhoneNumberResponse_twoWayEnabled,
requestPhoneNumberResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.PinpointSmsVoiceV2.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data RequestPhoneNumber = RequestPhoneNumber'
{
RequestPhoneNumber -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
RequestPhoneNumber -> Maybe Bool
deletionProtectionEnabled :: Prelude.Maybe Prelude.Bool,
RequestPhoneNumber -> Maybe Text
optOutListName :: Prelude.Maybe Prelude.Text,
RequestPhoneNumber -> Maybe Text
poolId :: Prelude.Maybe Prelude.Text,
RequestPhoneNumber -> Maybe Text
registrationId :: Prelude.Maybe Prelude.Text,
RequestPhoneNumber -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
RequestPhoneNumber -> Text
isoCountryCode :: Prelude.Text,
RequestPhoneNumber -> MessageType
messageType :: MessageType,
RequestPhoneNumber -> NonEmpty NumberCapability
numberCapabilities :: Prelude.NonEmpty NumberCapability,
RequestPhoneNumber -> RequestableNumberType
numberType :: RequestableNumberType
}
deriving (RequestPhoneNumber -> RequestPhoneNumber -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RequestPhoneNumber -> RequestPhoneNumber -> Bool
$c/= :: RequestPhoneNumber -> RequestPhoneNumber -> Bool
== :: RequestPhoneNumber -> RequestPhoneNumber -> Bool
$c== :: RequestPhoneNumber -> RequestPhoneNumber -> Bool
Prelude.Eq, ReadPrec [RequestPhoneNumber]
ReadPrec RequestPhoneNumber
Int -> ReadS RequestPhoneNumber
ReadS [RequestPhoneNumber]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RequestPhoneNumber]
$creadListPrec :: ReadPrec [RequestPhoneNumber]
readPrec :: ReadPrec RequestPhoneNumber
$creadPrec :: ReadPrec RequestPhoneNumber
readList :: ReadS [RequestPhoneNumber]
$creadList :: ReadS [RequestPhoneNumber]
readsPrec :: Int -> ReadS RequestPhoneNumber
$creadsPrec :: Int -> ReadS RequestPhoneNumber
Prelude.Read, Int -> RequestPhoneNumber -> ShowS
[RequestPhoneNumber] -> ShowS
RequestPhoneNumber -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RequestPhoneNumber] -> ShowS
$cshowList :: [RequestPhoneNumber] -> ShowS
show :: RequestPhoneNumber -> String
$cshow :: RequestPhoneNumber -> String
showsPrec :: Int -> RequestPhoneNumber -> ShowS
$cshowsPrec :: Int -> RequestPhoneNumber -> ShowS
Prelude.Show, forall x. Rep RequestPhoneNumber x -> RequestPhoneNumber
forall x. RequestPhoneNumber -> Rep RequestPhoneNumber x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RequestPhoneNumber x -> RequestPhoneNumber
$cfrom :: forall x. RequestPhoneNumber -> Rep RequestPhoneNumber x
Prelude.Generic)
newRequestPhoneNumber ::
Prelude.Text ->
MessageType ->
Prelude.NonEmpty NumberCapability ->
RequestableNumberType ->
RequestPhoneNumber
newRequestPhoneNumber :: Text
-> MessageType
-> NonEmpty NumberCapability
-> RequestableNumberType
-> RequestPhoneNumber
newRequestPhoneNumber
Text
pIsoCountryCode_
MessageType
pMessageType_
NonEmpty NumberCapability
pNumberCapabilities_
RequestableNumberType
pNumberType_ =
RequestPhoneNumber'
{ $sel:clientToken:RequestPhoneNumber' :: Maybe Text
clientToken = forall a. Maybe a
Prelude.Nothing,
$sel:deletionProtectionEnabled:RequestPhoneNumber' :: Maybe Bool
deletionProtectionEnabled = forall a. Maybe a
Prelude.Nothing,
$sel:optOutListName:RequestPhoneNumber' :: Maybe Text
optOutListName = forall a. Maybe a
Prelude.Nothing,
$sel:poolId:RequestPhoneNumber' :: Maybe Text
poolId = forall a. Maybe a
Prelude.Nothing,
$sel:registrationId:RequestPhoneNumber' :: Maybe Text
registrationId = forall a. Maybe a
Prelude.Nothing,
$sel:tags:RequestPhoneNumber' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
$sel:isoCountryCode:RequestPhoneNumber' :: Text
isoCountryCode = Text
pIsoCountryCode_,
$sel:messageType:RequestPhoneNumber' :: MessageType
messageType = MessageType
pMessageType_,
$sel:numberCapabilities:RequestPhoneNumber' :: NonEmpty NumberCapability
numberCapabilities =
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced forall t b. AReview t b -> b -> t
Lens.# NonEmpty NumberCapability
pNumberCapabilities_,
$sel:numberType:RequestPhoneNumber' :: RequestableNumberType
numberType = RequestableNumberType
pNumberType_
}
requestPhoneNumber_clientToken :: Lens.Lens' RequestPhoneNumber (Prelude.Maybe Prelude.Text)
requestPhoneNumber_clientToken :: Lens' RequestPhoneNumber (Maybe Text)
requestPhoneNumber_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestPhoneNumber' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:RequestPhoneNumber' :: RequestPhoneNumber -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: RequestPhoneNumber
s@RequestPhoneNumber' {} Maybe Text
a -> RequestPhoneNumber
s {$sel:clientToken:RequestPhoneNumber' :: Maybe Text
clientToken = Maybe Text
a} :: RequestPhoneNumber)
requestPhoneNumber_deletionProtectionEnabled :: Lens.Lens' RequestPhoneNumber (Prelude.Maybe Prelude.Bool)
requestPhoneNumber_deletionProtectionEnabled :: Lens' RequestPhoneNumber (Maybe Bool)
requestPhoneNumber_deletionProtectionEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestPhoneNumber' {Maybe Bool
deletionProtectionEnabled :: Maybe Bool
$sel:deletionProtectionEnabled:RequestPhoneNumber' :: RequestPhoneNumber -> Maybe Bool
deletionProtectionEnabled} -> Maybe Bool
deletionProtectionEnabled) (\s :: RequestPhoneNumber
s@RequestPhoneNumber' {} Maybe Bool
a -> RequestPhoneNumber
s {$sel:deletionProtectionEnabled:RequestPhoneNumber' :: Maybe Bool
deletionProtectionEnabled = Maybe Bool
a} :: RequestPhoneNumber)
requestPhoneNumber_optOutListName :: Lens.Lens' RequestPhoneNumber (Prelude.Maybe Prelude.Text)
requestPhoneNumber_optOutListName :: Lens' RequestPhoneNumber (Maybe Text)
requestPhoneNumber_optOutListName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestPhoneNumber' {Maybe Text
optOutListName :: Maybe Text
$sel:optOutListName:RequestPhoneNumber' :: RequestPhoneNumber -> Maybe Text
optOutListName} -> Maybe Text
optOutListName) (\s :: RequestPhoneNumber
s@RequestPhoneNumber' {} Maybe Text
a -> RequestPhoneNumber
s {$sel:optOutListName:RequestPhoneNumber' :: Maybe Text
optOutListName = Maybe Text
a} :: RequestPhoneNumber)
requestPhoneNumber_poolId :: Lens.Lens' RequestPhoneNumber (Prelude.Maybe Prelude.Text)
requestPhoneNumber_poolId :: Lens' RequestPhoneNumber (Maybe Text)
requestPhoneNumber_poolId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestPhoneNumber' {Maybe Text
poolId :: Maybe Text
$sel:poolId:RequestPhoneNumber' :: RequestPhoneNumber -> Maybe Text
poolId} -> Maybe Text
poolId) (\s :: RequestPhoneNumber
s@RequestPhoneNumber' {} Maybe Text
a -> RequestPhoneNumber
s {$sel:poolId:RequestPhoneNumber' :: Maybe Text
poolId = Maybe Text
a} :: RequestPhoneNumber)
requestPhoneNumber_registrationId :: Lens.Lens' RequestPhoneNumber (Prelude.Maybe Prelude.Text)
requestPhoneNumber_registrationId :: Lens' RequestPhoneNumber (Maybe Text)
requestPhoneNumber_registrationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestPhoneNumber' {Maybe Text
registrationId :: Maybe Text
$sel:registrationId:RequestPhoneNumber' :: RequestPhoneNumber -> Maybe Text
registrationId} -> Maybe Text
registrationId) (\s :: RequestPhoneNumber
s@RequestPhoneNumber' {} Maybe Text
a -> RequestPhoneNumber
s {$sel:registrationId:RequestPhoneNumber' :: Maybe Text
registrationId = Maybe Text
a} :: RequestPhoneNumber)
requestPhoneNumber_tags :: Lens.Lens' RequestPhoneNumber (Prelude.Maybe [Tag])
requestPhoneNumber_tags :: Lens' RequestPhoneNumber (Maybe [Tag])
requestPhoneNumber_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestPhoneNumber' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:RequestPhoneNumber' :: RequestPhoneNumber -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: RequestPhoneNumber
s@RequestPhoneNumber' {} Maybe [Tag]
a -> RequestPhoneNumber
s {$sel:tags:RequestPhoneNumber' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: RequestPhoneNumber) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
requestPhoneNumber_isoCountryCode :: Lens.Lens' RequestPhoneNumber Prelude.Text
requestPhoneNumber_isoCountryCode :: Lens' RequestPhoneNumber Text
requestPhoneNumber_isoCountryCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestPhoneNumber' {Text
isoCountryCode :: Text
$sel:isoCountryCode:RequestPhoneNumber' :: RequestPhoneNumber -> Text
isoCountryCode} -> Text
isoCountryCode) (\s :: RequestPhoneNumber
s@RequestPhoneNumber' {} Text
a -> RequestPhoneNumber
s {$sel:isoCountryCode:RequestPhoneNumber' :: Text
isoCountryCode = Text
a} :: RequestPhoneNumber)
requestPhoneNumber_messageType :: Lens.Lens' RequestPhoneNumber MessageType
requestPhoneNumber_messageType :: Lens' RequestPhoneNumber MessageType
requestPhoneNumber_messageType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestPhoneNumber' {MessageType
messageType :: MessageType
$sel:messageType:RequestPhoneNumber' :: RequestPhoneNumber -> MessageType
messageType} -> MessageType
messageType) (\s :: RequestPhoneNumber
s@RequestPhoneNumber' {} MessageType
a -> RequestPhoneNumber
s {$sel:messageType:RequestPhoneNumber' :: MessageType
messageType = MessageType
a} :: RequestPhoneNumber)
requestPhoneNumber_numberCapabilities :: Lens.Lens' RequestPhoneNumber (Prelude.NonEmpty NumberCapability)
requestPhoneNumber_numberCapabilities :: Lens' RequestPhoneNumber (NonEmpty NumberCapability)
requestPhoneNumber_numberCapabilities = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestPhoneNumber' {NonEmpty NumberCapability
numberCapabilities :: NonEmpty NumberCapability
$sel:numberCapabilities:RequestPhoneNumber' :: RequestPhoneNumber -> NonEmpty NumberCapability
numberCapabilities} -> NonEmpty NumberCapability
numberCapabilities) (\s :: RequestPhoneNumber
s@RequestPhoneNumber' {} NonEmpty NumberCapability
a -> RequestPhoneNumber
s {$sel:numberCapabilities:RequestPhoneNumber' :: NonEmpty NumberCapability
numberCapabilities = NonEmpty NumberCapability
a} :: RequestPhoneNumber) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
requestPhoneNumber_numberType :: Lens.Lens' RequestPhoneNumber RequestableNumberType
requestPhoneNumber_numberType :: Lens' RequestPhoneNumber RequestableNumberType
requestPhoneNumber_numberType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestPhoneNumber' {RequestableNumberType
numberType :: RequestableNumberType
$sel:numberType:RequestPhoneNumber' :: RequestPhoneNumber -> RequestableNumberType
numberType} -> RequestableNumberType
numberType) (\s :: RequestPhoneNumber
s@RequestPhoneNumber' {} RequestableNumberType
a -> RequestPhoneNumber
s {$sel:numberType:RequestPhoneNumber' :: RequestableNumberType
numberType = RequestableNumberType
a} :: RequestPhoneNumber)
instance Core.AWSRequest RequestPhoneNumber where
type
AWSResponse RequestPhoneNumber =
RequestPhoneNumberResponse
request :: (Service -> Service)
-> RequestPhoneNumber -> Request RequestPhoneNumber
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy RequestPhoneNumber
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse RequestPhoneNumber)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe POSIX
-> Maybe Bool
-> Maybe Text
-> Maybe MessageType
-> Maybe Text
-> Maybe (NonEmpty NumberCapability)
-> Maybe RequestableNumberType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe NumberStatus
-> Maybe [Tag]
-> Maybe Text
-> Maybe Bool
-> Int
-> RequestPhoneNumberResponse
RequestPhoneNumberResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"CreatedTimestamp")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"DeletionProtectionEnabled")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"IsoCountryCode")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"MessageType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"MonthlyLeasingPrice")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NumberCapabilities")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NumberType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"OptOutListName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"PhoneNumber")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"PhoneNumberArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"PhoneNumberId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"PoolId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"SelfManagedOptOutsEnabled")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Status")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Tags" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"TwoWayChannelArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"TwoWayEnabled")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable RequestPhoneNumber where
hashWithSalt :: Int -> RequestPhoneNumber -> Int
hashWithSalt Int
_salt RequestPhoneNumber' {Maybe Bool
Maybe [Tag]
Maybe Text
NonEmpty NumberCapability
Text
MessageType
RequestableNumberType
numberType :: RequestableNumberType
numberCapabilities :: NonEmpty NumberCapability
messageType :: MessageType
isoCountryCode :: Text
tags :: Maybe [Tag]
registrationId :: Maybe Text
poolId :: Maybe Text
optOutListName :: Maybe Text
deletionProtectionEnabled :: Maybe Bool
clientToken :: Maybe Text
$sel:numberType:RequestPhoneNumber' :: RequestPhoneNumber -> RequestableNumberType
$sel:numberCapabilities:RequestPhoneNumber' :: RequestPhoneNumber -> NonEmpty NumberCapability
$sel:messageType:RequestPhoneNumber' :: RequestPhoneNumber -> MessageType
$sel:isoCountryCode:RequestPhoneNumber' :: RequestPhoneNumber -> Text
$sel:tags:RequestPhoneNumber' :: RequestPhoneNumber -> Maybe [Tag]
$sel:registrationId:RequestPhoneNumber' :: RequestPhoneNumber -> Maybe Text
$sel:poolId:RequestPhoneNumber' :: RequestPhoneNumber -> Maybe Text
$sel:optOutListName:RequestPhoneNumber' :: RequestPhoneNumber -> Maybe Text
$sel:deletionProtectionEnabled:RequestPhoneNumber' :: RequestPhoneNumber -> Maybe Bool
$sel:clientToken:RequestPhoneNumber' :: RequestPhoneNumber -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
deletionProtectionEnabled
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
optOutListName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
poolId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
registrationId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
isoCountryCode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` MessageType
messageType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` NonEmpty NumberCapability
numberCapabilities
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` RequestableNumberType
numberType
instance Prelude.NFData RequestPhoneNumber where
rnf :: RequestPhoneNumber -> ()
rnf RequestPhoneNumber' {Maybe Bool
Maybe [Tag]
Maybe Text
NonEmpty NumberCapability
Text
MessageType
RequestableNumberType
numberType :: RequestableNumberType
numberCapabilities :: NonEmpty NumberCapability
messageType :: MessageType
isoCountryCode :: Text
tags :: Maybe [Tag]
registrationId :: Maybe Text
poolId :: Maybe Text
optOutListName :: Maybe Text
deletionProtectionEnabled :: Maybe Bool
clientToken :: Maybe Text
$sel:numberType:RequestPhoneNumber' :: RequestPhoneNumber -> RequestableNumberType
$sel:numberCapabilities:RequestPhoneNumber' :: RequestPhoneNumber -> NonEmpty NumberCapability
$sel:messageType:RequestPhoneNumber' :: RequestPhoneNumber -> MessageType
$sel:isoCountryCode:RequestPhoneNumber' :: RequestPhoneNumber -> Text
$sel:tags:RequestPhoneNumber' :: RequestPhoneNumber -> Maybe [Tag]
$sel:registrationId:RequestPhoneNumber' :: RequestPhoneNumber -> Maybe Text
$sel:poolId:RequestPhoneNumber' :: RequestPhoneNumber -> Maybe Text
$sel:optOutListName:RequestPhoneNumber' :: RequestPhoneNumber -> Maybe Text
$sel:deletionProtectionEnabled:RequestPhoneNumber' :: RequestPhoneNumber -> Maybe Bool
$sel:clientToken:RequestPhoneNumber' :: RequestPhoneNumber -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
deletionProtectionEnabled
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
optOutListName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
poolId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
registrationId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
isoCountryCode
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf MessageType
messageType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf NonEmpty NumberCapability
numberCapabilities
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf RequestableNumberType
numberType
instance Data.ToHeaders RequestPhoneNumber where
toHeaders :: RequestPhoneNumber -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"PinpointSMSVoiceV2.RequestPhoneNumber" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.0" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON RequestPhoneNumber where
toJSON :: RequestPhoneNumber -> Value
toJSON RequestPhoneNumber' {Maybe Bool
Maybe [Tag]
Maybe Text
NonEmpty NumberCapability
Text
MessageType
RequestableNumberType
numberType :: RequestableNumberType
numberCapabilities :: NonEmpty NumberCapability
messageType :: MessageType
isoCountryCode :: Text
tags :: Maybe [Tag]
registrationId :: Maybe Text
poolId :: Maybe Text
optOutListName :: Maybe Text
deletionProtectionEnabled :: Maybe Bool
clientToken :: Maybe Text
$sel:numberType:RequestPhoneNumber' :: RequestPhoneNumber -> RequestableNumberType
$sel:numberCapabilities:RequestPhoneNumber' :: RequestPhoneNumber -> NonEmpty NumberCapability
$sel:messageType:RequestPhoneNumber' :: RequestPhoneNumber -> MessageType
$sel:isoCountryCode:RequestPhoneNumber' :: RequestPhoneNumber -> Text
$sel:tags:RequestPhoneNumber' :: RequestPhoneNumber -> Maybe [Tag]
$sel:registrationId:RequestPhoneNumber' :: RequestPhoneNumber -> Maybe Text
$sel:poolId:RequestPhoneNumber' :: RequestPhoneNumber -> Maybe Text
$sel:optOutListName:RequestPhoneNumber' :: RequestPhoneNumber -> Maybe Text
$sel:deletionProtectionEnabled:RequestPhoneNumber' :: RequestPhoneNumber -> Maybe Bool
$sel:clientToken:RequestPhoneNumber' :: RequestPhoneNumber -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"ClientToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
clientToken,
(Key
"DeletionProtectionEnabled" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
deletionProtectionEnabled,
(Key
"OptOutListName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
optOutListName,
(Key
"PoolId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
poolId,
(Key
"RegistrationId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
registrationId,
(Key
"Tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
forall a. a -> Maybe a
Prelude.Just
(Key
"IsoCountryCode" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
isoCountryCode),
forall a. a -> Maybe a
Prelude.Just (Key
"MessageType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= MessageType
messageType),
forall a. a -> Maybe a
Prelude.Just
(Key
"NumberCapabilities" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= NonEmpty NumberCapability
numberCapabilities),
forall a. a -> Maybe a
Prelude.Just (Key
"NumberType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= RequestableNumberType
numberType)
]
)
instance Data.ToPath RequestPhoneNumber where
toPath :: RequestPhoneNumber -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery RequestPhoneNumber where
toQuery :: RequestPhoneNumber -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data RequestPhoneNumberResponse = RequestPhoneNumberResponse'
{
RequestPhoneNumberResponse -> Maybe POSIX
createdTimestamp :: Prelude.Maybe Data.POSIX,
RequestPhoneNumberResponse -> Maybe Bool
deletionProtectionEnabled :: Prelude.Maybe Prelude.Bool,
RequestPhoneNumberResponse -> Maybe Text
isoCountryCode :: Prelude.Maybe Prelude.Text,
RequestPhoneNumberResponse -> Maybe MessageType
messageType :: Prelude.Maybe MessageType,
RequestPhoneNumberResponse -> Maybe Text
monthlyLeasingPrice :: Prelude.Maybe Prelude.Text,
RequestPhoneNumberResponse -> Maybe (NonEmpty NumberCapability)
numberCapabilities :: Prelude.Maybe (Prelude.NonEmpty NumberCapability),
RequestPhoneNumberResponse -> Maybe RequestableNumberType
numberType :: Prelude.Maybe RequestableNumberType,
RequestPhoneNumberResponse -> Maybe Text
optOutListName :: Prelude.Maybe Prelude.Text,
RequestPhoneNumberResponse -> Maybe Text
phoneNumber :: Prelude.Maybe Prelude.Text,
RequestPhoneNumberResponse -> Maybe Text
phoneNumberArn :: Prelude.Maybe Prelude.Text,
RequestPhoneNumberResponse -> Maybe Text
phoneNumberId :: Prelude.Maybe Prelude.Text,
RequestPhoneNumberResponse -> Maybe Text
poolId :: Prelude.Maybe Prelude.Text,
RequestPhoneNumberResponse -> Maybe Bool
selfManagedOptOutsEnabled :: Prelude.Maybe Prelude.Bool,
RequestPhoneNumberResponse -> Maybe NumberStatus
status :: Prelude.Maybe NumberStatus,
RequestPhoneNumberResponse -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
RequestPhoneNumberResponse -> Maybe Text
twoWayChannelArn :: Prelude.Maybe Prelude.Text,
RequestPhoneNumberResponse -> Maybe Bool
twoWayEnabled :: Prelude.Maybe Prelude.Bool,
RequestPhoneNumberResponse -> Int
httpStatus :: Prelude.Int
}
deriving (RequestPhoneNumberResponse -> RequestPhoneNumberResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RequestPhoneNumberResponse -> RequestPhoneNumberResponse -> Bool
$c/= :: RequestPhoneNumberResponse -> RequestPhoneNumberResponse -> Bool
== :: RequestPhoneNumberResponse -> RequestPhoneNumberResponse -> Bool
$c== :: RequestPhoneNumberResponse -> RequestPhoneNumberResponse -> Bool
Prelude.Eq, ReadPrec [RequestPhoneNumberResponse]
ReadPrec RequestPhoneNumberResponse
Int -> ReadS RequestPhoneNumberResponse
ReadS [RequestPhoneNumberResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RequestPhoneNumberResponse]
$creadListPrec :: ReadPrec [RequestPhoneNumberResponse]
readPrec :: ReadPrec RequestPhoneNumberResponse
$creadPrec :: ReadPrec RequestPhoneNumberResponse
readList :: ReadS [RequestPhoneNumberResponse]
$creadList :: ReadS [RequestPhoneNumberResponse]
readsPrec :: Int -> ReadS RequestPhoneNumberResponse
$creadsPrec :: Int -> ReadS RequestPhoneNumberResponse
Prelude.Read, Int -> RequestPhoneNumberResponse -> ShowS
[RequestPhoneNumberResponse] -> ShowS
RequestPhoneNumberResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RequestPhoneNumberResponse] -> ShowS
$cshowList :: [RequestPhoneNumberResponse] -> ShowS
show :: RequestPhoneNumberResponse -> String
$cshow :: RequestPhoneNumberResponse -> String
showsPrec :: Int -> RequestPhoneNumberResponse -> ShowS
$cshowsPrec :: Int -> RequestPhoneNumberResponse -> ShowS
Prelude.Show, forall x.
Rep RequestPhoneNumberResponse x -> RequestPhoneNumberResponse
forall x.
RequestPhoneNumberResponse -> Rep RequestPhoneNumberResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RequestPhoneNumberResponse x -> RequestPhoneNumberResponse
$cfrom :: forall x.
RequestPhoneNumberResponse -> Rep RequestPhoneNumberResponse x
Prelude.Generic)
newRequestPhoneNumberResponse ::
Prelude.Int ->
RequestPhoneNumberResponse
newRequestPhoneNumberResponse :: Int -> RequestPhoneNumberResponse
newRequestPhoneNumberResponse Int
pHttpStatus_ =
RequestPhoneNumberResponse'
{ $sel:createdTimestamp:RequestPhoneNumberResponse' :: Maybe POSIX
createdTimestamp =
forall a. Maybe a
Prelude.Nothing,
$sel:deletionProtectionEnabled:RequestPhoneNumberResponse' :: Maybe Bool
deletionProtectionEnabled = forall a. Maybe a
Prelude.Nothing,
$sel:isoCountryCode:RequestPhoneNumberResponse' :: Maybe Text
isoCountryCode = forall a. Maybe a
Prelude.Nothing,
$sel:messageType:RequestPhoneNumberResponse' :: Maybe MessageType
messageType = forall a. Maybe a
Prelude.Nothing,
$sel:monthlyLeasingPrice:RequestPhoneNumberResponse' :: Maybe Text
monthlyLeasingPrice = forall a. Maybe a
Prelude.Nothing,
$sel:numberCapabilities:RequestPhoneNumberResponse' :: Maybe (NonEmpty NumberCapability)
numberCapabilities = forall a. Maybe a
Prelude.Nothing,
$sel:numberType:RequestPhoneNumberResponse' :: Maybe RequestableNumberType
numberType = forall a. Maybe a
Prelude.Nothing,
$sel:optOutListName:RequestPhoneNumberResponse' :: Maybe Text
optOutListName = forall a. Maybe a
Prelude.Nothing,
$sel:phoneNumber:RequestPhoneNumberResponse' :: Maybe Text
phoneNumber = forall a. Maybe a
Prelude.Nothing,
$sel:phoneNumberArn:RequestPhoneNumberResponse' :: Maybe Text
phoneNumberArn = forall a. Maybe a
Prelude.Nothing,
$sel:phoneNumberId:RequestPhoneNumberResponse' :: Maybe Text
phoneNumberId = forall a. Maybe a
Prelude.Nothing,
$sel:poolId:RequestPhoneNumberResponse' :: Maybe Text
poolId = forall a. Maybe a
Prelude.Nothing,
$sel:selfManagedOptOutsEnabled:RequestPhoneNumberResponse' :: Maybe Bool
selfManagedOptOutsEnabled = forall a. Maybe a
Prelude.Nothing,
$sel:status:RequestPhoneNumberResponse' :: Maybe NumberStatus
status = forall a. Maybe a
Prelude.Nothing,
$sel:tags:RequestPhoneNumberResponse' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
$sel:twoWayChannelArn:RequestPhoneNumberResponse' :: Maybe Text
twoWayChannelArn = forall a. Maybe a
Prelude.Nothing,
$sel:twoWayEnabled:RequestPhoneNumberResponse' :: Maybe Bool
twoWayEnabled = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:RequestPhoneNumberResponse' :: Int
httpStatus = Int
pHttpStatus_
}
requestPhoneNumberResponse_createdTimestamp :: Lens.Lens' RequestPhoneNumberResponse (Prelude.Maybe Prelude.UTCTime)
requestPhoneNumberResponse_createdTimestamp :: Lens' RequestPhoneNumberResponse (Maybe UTCTime)
requestPhoneNumberResponse_createdTimestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestPhoneNumberResponse' {Maybe POSIX
createdTimestamp :: Maybe POSIX
$sel:createdTimestamp:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Maybe POSIX
createdTimestamp} -> Maybe POSIX
createdTimestamp) (\s :: RequestPhoneNumberResponse
s@RequestPhoneNumberResponse' {} Maybe POSIX
a -> RequestPhoneNumberResponse
s {$sel:createdTimestamp:RequestPhoneNumberResponse' :: Maybe POSIX
createdTimestamp = Maybe POSIX
a} :: RequestPhoneNumberResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
requestPhoneNumberResponse_deletionProtectionEnabled :: Lens.Lens' RequestPhoneNumberResponse (Prelude.Maybe Prelude.Bool)
requestPhoneNumberResponse_deletionProtectionEnabled :: Lens' RequestPhoneNumberResponse (Maybe Bool)
requestPhoneNumberResponse_deletionProtectionEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestPhoneNumberResponse' {Maybe Bool
deletionProtectionEnabled :: Maybe Bool
$sel:deletionProtectionEnabled:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Maybe Bool
deletionProtectionEnabled} -> Maybe Bool
deletionProtectionEnabled) (\s :: RequestPhoneNumberResponse
s@RequestPhoneNumberResponse' {} Maybe Bool
a -> RequestPhoneNumberResponse
s {$sel:deletionProtectionEnabled:RequestPhoneNumberResponse' :: Maybe Bool
deletionProtectionEnabled = Maybe Bool
a} :: RequestPhoneNumberResponse)
requestPhoneNumberResponse_isoCountryCode :: Lens.Lens' RequestPhoneNumberResponse (Prelude.Maybe Prelude.Text)
requestPhoneNumberResponse_isoCountryCode :: Lens' RequestPhoneNumberResponse (Maybe Text)
requestPhoneNumberResponse_isoCountryCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestPhoneNumberResponse' {Maybe Text
isoCountryCode :: Maybe Text
$sel:isoCountryCode:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Maybe Text
isoCountryCode} -> Maybe Text
isoCountryCode) (\s :: RequestPhoneNumberResponse
s@RequestPhoneNumberResponse' {} Maybe Text
a -> RequestPhoneNumberResponse
s {$sel:isoCountryCode:RequestPhoneNumberResponse' :: Maybe Text
isoCountryCode = Maybe Text
a} :: RequestPhoneNumberResponse)
requestPhoneNumberResponse_messageType :: Lens.Lens' RequestPhoneNumberResponse (Prelude.Maybe MessageType)
requestPhoneNumberResponse_messageType :: Lens' RequestPhoneNumberResponse (Maybe MessageType)
requestPhoneNumberResponse_messageType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestPhoneNumberResponse' {Maybe MessageType
messageType :: Maybe MessageType
$sel:messageType:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Maybe MessageType
messageType} -> Maybe MessageType
messageType) (\s :: RequestPhoneNumberResponse
s@RequestPhoneNumberResponse' {} Maybe MessageType
a -> RequestPhoneNumberResponse
s {$sel:messageType:RequestPhoneNumberResponse' :: Maybe MessageType
messageType = Maybe MessageType
a} :: RequestPhoneNumberResponse)
requestPhoneNumberResponse_monthlyLeasingPrice :: Lens.Lens' RequestPhoneNumberResponse (Prelude.Maybe Prelude.Text)
requestPhoneNumberResponse_monthlyLeasingPrice :: Lens' RequestPhoneNumberResponse (Maybe Text)
requestPhoneNumberResponse_monthlyLeasingPrice = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestPhoneNumberResponse' {Maybe Text
monthlyLeasingPrice :: Maybe Text
$sel:monthlyLeasingPrice:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Maybe Text
monthlyLeasingPrice} -> Maybe Text
monthlyLeasingPrice) (\s :: RequestPhoneNumberResponse
s@RequestPhoneNumberResponse' {} Maybe Text
a -> RequestPhoneNumberResponse
s {$sel:monthlyLeasingPrice:RequestPhoneNumberResponse' :: Maybe Text
monthlyLeasingPrice = Maybe Text
a} :: RequestPhoneNumberResponse)
requestPhoneNumberResponse_numberCapabilities :: Lens.Lens' RequestPhoneNumberResponse (Prelude.Maybe (Prelude.NonEmpty NumberCapability))
requestPhoneNumberResponse_numberCapabilities :: Lens'
RequestPhoneNumberResponse (Maybe (NonEmpty NumberCapability))
requestPhoneNumberResponse_numberCapabilities = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestPhoneNumberResponse' {Maybe (NonEmpty NumberCapability)
numberCapabilities :: Maybe (NonEmpty NumberCapability)
$sel:numberCapabilities:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Maybe (NonEmpty NumberCapability)
numberCapabilities} -> Maybe (NonEmpty NumberCapability)
numberCapabilities) (\s :: RequestPhoneNumberResponse
s@RequestPhoneNumberResponse' {} Maybe (NonEmpty NumberCapability)
a -> RequestPhoneNumberResponse
s {$sel:numberCapabilities:RequestPhoneNumberResponse' :: Maybe (NonEmpty NumberCapability)
numberCapabilities = Maybe (NonEmpty NumberCapability)
a} :: RequestPhoneNumberResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
requestPhoneNumberResponse_numberType :: Lens.Lens' RequestPhoneNumberResponse (Prelude.Maybe RequestableNumberType)
requestPhoneNumberResponse_numberType :: Lens' RequestPhoneNumberResponse (Maybe RequestableNumberType)
requestPhoneNumberResponse_numberType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestPhoneNumberResponse' {Maybe RequestableNumberType
numberType :: Maybe RequestableNumberType
$sel:numberType:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Maybe RequestableNumberType
numberType} -> Maybe RequestableNumberType
numberType) (\s :: RequestPhoneNumberResponse
s@RequestPhoneNumberResponse' {} Maybe RequestableNumberType
a -> RequestPhoneNumberResponse
s {$sel:numberType:RequestPhoneNumberResponse' :: Maybe RequestableNumberType
numberType = Maybe RequestableNumberType
a} :: RequestPhoneNumberResponse)
requestPhoneNumberResponse_optOutListName :: Lens.Lens' RequestPhoneNumberResponse (Prelude.Maybe Prelude.Text)
requestPhoneNumberResponse_optOutListName :: Lens' RequestPhoneNumberResponse (Maybe Text)
requestPhoneNumberResponse_optOutListName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestPhoneNumberResponse' {Maybe Text
optOutListName :: Maybe Text
$sel:optOutListName:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Maybe Text
optOutListName} -> Maybe Text
optOutListName) (\s :: RequestPhoneNumberResponse
s@RequestPhoneNumberResponse' {} Maybe Text
a -> RequestPhoneNumberResponse
s {$sel:optOutListName:RequestPhoneNumberResponse' :: Maybe Text
optOutListName = Maybe Text
a} :: RequestPhoneNumberResponse)
requestPhoneNumberResponse_phoneNumber :: Lens.Lens' RequestPhoneNumberResponse (Prelude.Maybe Prelude.Text)
requestPhoneNumberResponse_phoneNumber :: Lens' RequestPhoneNumberResponse (Maybe Text)
requestPhoneNumberResponse_phoneNumber = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestPhoneNumberResponse' {Maybe Text
phoneNumber :: Maybe Text
$sel:phoneNumber:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Maybe Text
phoneNumber} -> Maybe Text
phoneNumber) (\s :: RequestPhoneNumberResponse
s@RequestPhoneNumberResponse' {} Maybe Text
a -> RequestPhoneNumberResponse
s {$sel:phoneNumber:RequestPhoneNumberResponse' :: Maybe Text
phoneNumber = Maybe Text
a} :: RequestPhoneNumberResponse)
requestPhoneNumberResponse_phoneNumberArn :: Lens.Lens' RequestPhoneNumberResponse (Prelude.Maybe Prelude.Text)
requestPhoneNumberResponse_phoneNumberArn :: Lens' RequestPhoneNumberResponse (Maybe Text)
requestPhoneNumberResponse_phoneNumberArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestPhoneNumberResponse' {Maybe Text
phoneNumberArn :: Maybe Text
$sel:phoneNumberArn:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Maybe Text
phoneNumberArn} -> Maybe Text
phoneNumberArn) (\s :: RequestPhoneNumberResponse
s@RequestPhoneNumberResponse' {} Maybe Text
a -> RequestPhoneNumberResponse
s {$sel:phoneNumberArn:RequestPhoneNumberResponse' :: Maybe Text
phoneNumberArn = Maybe Text
a} :: RequestPhoneNumberResponse)
requestPhoneNumberResponse_phoneNumberId :: Lens.Lens' RequestPhoneNumberResponse (Prelude.Maybe Prelude.Text)
requestPhoneNumberResponse_phoneNumberId :: Lens' RequestPhoneNumberResponse (Maybe Text)
requestPhoneNumberResponse_phoneNumberId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestPhoneNumberResponse' {Maybe Text
phoneNumberId :: Maybe Text
$sel:phoneNumberId:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Maybe Text
phoneNumberId} -> Maybe Text
phoneNumberId) (\s :: RequestPhoneNumberResponse
s@RequestPhoneNumberResponse' {} Maybe Text
a -> RequestPhoneNumberResponse
s {$sel:phoneNumberId:RequestPhoneNumberResponse' :: Maybe Text
phoneNumberId = Maybe Text
a} :: RequestPhoneNumberResponse)
requestPhoneNumberResponse_poolId :: Lens.Lens' RequestPhoneNumberResponse (Prelude.Maybe Prelude.Text)
requestPhoneNumberResponse_poolId :: Lens' RequestPhoneNumberResponse (Maybe Text)
requestPhoneNumberResponse_poolId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestPhoneNumberResponse' {Maybe Text
poolId :: Maybe Text
$sel:poolId:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Maybe Text
poolId} -> Maybe Text
poolId) (\s :: RequestPhoneNumberResponse
s@RequestPhoneNumberResponse' {} Maybe Text
a -> RequestPhoneNumberResponse
s {$sel:poolId:RequestPhoneNumberResponse' :: Maybe Text
poolId = Maybe Text
a} :: RequestPhoneNumberResponse)
requestPhoneNumberResponse_selfManagedOptOutsEnabled :: Lens.Lens' RequestPhoneNumberResponse (Prelude.Maybe Prelude.Bool)
requestPhoneNumberResponse_selfManagedOptOutsEnabled :: Lens' RequestPhoneNumberResponse (Maybe Bool)
requestPhoneNumberResponse_selfManagedOptOutsEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestPhoneNumberResponse' {Maybe Bool
selfManagedOptOutsEnabled :: Maybe Bool
$sel:selfManagedOptOutsEnabled:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Maybe Bool
selfManagedOptOutsEnabled} -> Maybe Bool
selfManagedOptOutsEnabled) (\s :: RequestPhoneNumberResponse
s@RequestPhoneNumberResponse' {} Maybe Bool
a -> RequestPhoneNumberResponse
s {$sel:selfManagedOptOutsEnabled:RequestPhoneNumberResponse' :: Maybe Bool
selfManagedOptOutsEnabled = Maybe Bool
a} :: RequestPhoneNumberResponse)
requestPhoneNumberResponse_status :: Lens.Lens' RequestPhoneNumberResponse (Prelude.Maybe NumberStatus)
requestPhoneNumberResponse_status :: Lens' RequestPhoneNumberResponse (Maybe NumberStatus)
requestPhoneNumberResponse_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestPhoneNumberResponse' {Maybe NumberStatus
status :: Maybe NumberStatus
$sel:status:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Maybe NumberStatus
status} -> Maybe NumberStatus
status) (\s :: RequestPhoneNumberResponse
s@RequestPhoneNumberResponse' {} Maybe NumberStatus
a -> RequestPhoneNumberResponse
s {$sel:status:RequestPhoneNumberResponse' :: Maybe NumberStatus
status = Maybe NumberStatus
a} :: RequestPhoneNumberResponse)
requestPhoneNumberResponse_tags :: Lens.Lens' RequestPhoneNumberResponse (Prelude.Maybe [Tag])
requestPhoneNumberResponse_tags :: Lens' RequestPhoneNumberResponse (Maybe [Tag])
requestPhoneNumberResponse_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestPhoneNumberResponse' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: RequestPhoneNumberResponse
s@RequestPhoneNumberResponse' {} Maybe [Tag]
a -> RequestPhoneNumberResponse
s {$sel:tags:RequestPhoneNumberResponse' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: RequestPhoneNumberResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
requestPhoneNumberResponse_twoWayChannelArn :: Lens.Lens' RequestPhoneNumberResponse (Prelude.Maybe Prelude.Text)
requestPhoneNumberResponse_twoWayChannelArn :: Lens' RequestPhoneNumberResponse (Maybe Text)
requestPhoneNumberResponse_twoWayChannelArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestPhoneNumberResponse' {Maybe Text
twoWayChannelArn :: Maybe Text
$sel:twoWayChannelArn:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Maybe Text
twoWayChannelArn} -> Maybe Text
twoWayChannelArn) (\s :: RequestPhoneNumberResponse
s@RequestPhoneNumberResponse' {} Maybe Text
a -> RequestPhoneNumberResponse
s {$sel:twoWayChannelArn:RequestPhoneNumberResponse' :: Maybe Text
twoWayChannelArn = Maybe Text
a} :: RequestPhoneNumberResponse)
requestPhoneNumberResponse_twoWayEnabled :: Lens.Lens' RequestPhoneNumberResponse (Prelude.Maybe Prelude.Bool)
requestPhoneNumberResponse_twoWayEnabled :: Lens' RequestPhoneNumberResponse (Maybe Bool)
requestPhoneNumberResponse_twoWayEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestPhoneNumberResponse' {Maybe Bool
twoWayEnabled :: Maybe Bool
$sel:twoWayEnabled:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Maybe Bool
twoWayEnabled} -> Maybe Bool
twoWayEnabled) (\s :: RequestPhoneNumberResponse
s@RequestPhoneNumberResponse' {} Maybe Bool
a -> RequestPhoneNumberResponse
s {$sel:twoWayEnabled:RequestPhoneNumberResponse' :: Maybe Bool
twoWayEnabled = Maybe Bool
a} :: RequestPhoneNumberResponse)
requestPhoneNumberResponse_httpStatus :: Lens.Lens' RequestPhoneNumberResponse Prelude.Int
requestPhoneNumberResponse_httpStatus :: Lens' RequestPhoneNumberResponse Int
requestPhoneNumberResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestPhoneNumberResponse' {Int
httpStatus :: Int
$sel:httpStatus:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: RequestPhoneNumberResponse
s@RequestPhoneNumberResponse' {} Int
a -> RequestPhoneNumberResponse
s {$sel:httpStatus:RequestPhoneNumberResponse' :: Int
httpStatus = Int
a} :: RequestPhoneNumberResponse)
instance Prelude.NFData RequestPhoneNumberResponse where
rnf :: RequestPhoneNumberResponse -> ()
rnf RequestPhoneNumberResponse' {Int
Maybe Bool
Maybe [Tag]
Maybe (NonEmpty NumberCapability)
Maybe Text
Maybe POSIX
Maybe MessageType
Maybe NumberStatus
Maybe RequestableNumberType
httpStatus :: Int
twoWayEnabled :: Maybe Bool
twoWayChannelArn :: Maybe Text
tags :: Maybe [Tag]
status :: Maybe NumberStatus
selfManagedOptOutsEnabled :: Maybe Bool
poolId :: Maybe Text
phoneNumberId :: Maybe Text
phoneNumberArn :: Maybe Text
phoneNumber :: Maybe Text
optOutListName :: Maybe Text
numberType :: Maybe RequestableNumberType
numberCapabilities :: Maybe (NonEmpty NumberCapability)
monthlyLeasingPrice :: Maybe Text
messageType :: Maybe MessageType
isoCountryCode :: Maybe Text
deletionProtectionEnabled :: Maybe Bool
createdTimestamp :: Maybe POSIX
$sel:httpStatus:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Int
$sel:twoWayEnabled:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Maybe Bool
$sel:twoWayChannelArn:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Maybe Text
$sel:tags:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Maybe [Tag]
$sel:status:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Maybe NumberStatus
$sel:selfManagedOptOutsEnabled:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Maybe Bool
$sel:poolId:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Maybe Text
$sel:phoneNumberId:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Maybe Text
$sel:phoneNumberArn:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Maybe Text
$sel:phoneNumber:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Maybe Text
$sel:optOutListName:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Maybe Text
$sel:numberType:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Maybe RequestableNumberType
$sel:numberCapabilities:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Maybe (NonEmpty NumberCapability)
$sel:monthlyLeasingPrice:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Maybe Text
$sel:messageType:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Maybe MessageType
$sel:isoCountryCode:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Maybe Text
$sel:deletionProtectionEnabled:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Maybe Bool
$sel:createdTimestamp:RequestPhoneNumberResponse' :: RequestPhoneNumberResponse -> Maybe POSIX
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
createdTimestamp
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
deletionProtectionEnabled
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
isoCountryCode
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MessageType
messageType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
monthlyLeasingPrice
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty NumberCapability)
numberCapabilities
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RequestableNumberType
numberType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
optOutListName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
phoneNumber
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
phoneNumberArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
phoneNumberId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
poolId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
selfManagedOptOutsEnabled
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe NumberStatus
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
twoWayChannelArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
twoWayEnabled
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus