{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.PinpointSmsVoiceV2.RequestPhoneNumber
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Request an origination phone number for use in your account. For more
-- information on phone number request see
-- <https://docs.aws.amazon.com/pinpoint/latest/userguide/settings-sms-request-number.html Requesting a number>
-- in the /Amazon Pinpoint User Guide/.
module Amazonka.PinpointSmsVoiceV2.RequestPhoneNumber
  ( -- * Creating a Request
    RequestPhoneNumber (..),
    newRequestPhoneNumber,

    -- * Request Lenses
    requestPhoneNumber_clientToken,
    requestPhoneNumber_deletionProtectionEnabled,
    requestPhoneNumber_optOutListName,
    requestPhoneNumber_poolId,
    requestPhoneNumber_registrationId,
    requestPhoneNumber_tags,
    requestPhoneNumber_isoCountryCode,
    requestPhoneNumber_messageType,
    requestPhoneNumber_numberCapabilities,
    requestPhoneNumber_numberType,

    -- * Destructuring the Response
    RequestPhoneNumberResponse (..),
    newRequestPhoneNumberResponse,

    -- * Response Lenses
    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

-- | /See:/ 'newRequestPhoneNumber' smart constructor.
data RequestPhoneNumber = RequestPhoneNumber'
  { -- | Unique, case-sensitive identifier that you provide to ensure the
    -- idempotency of the request. If you don\'t specify a client token, a
    -- randomly generated token is used for the request to ensure idempotency.
    RequestPhoneNumber -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
    -- | By default this is set to false. When set to true the phone number
    -- can\'t be deleted.
    RequestPhoneNumber -> Maybe Bool
deletionProtectionEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The name of the OptOutList to associate with the phone number. You can
    -- use the OutOutListName or OptPutListArn.
    RequestPhoneNumber -> Maybe Text
optOutListName :: Prelude.Maybe Prelude.Text,
    -- | The pool to associated with the phone number. You can use the PoolId or
    -- PoolArn.
    RequestPhoneNumber -> Maybe Text
poolId :: Prelude.Maybe Prelude.Text,
    -- | Use this field to attach your phone number for an external registration
    -- process.
    RequestPhoneNumber -> Maybe Text
registrationId :: Prelude.Maybe Prelude.Text,
    -- | An array of tags (key and value pairs) associate with the requested
    -- phone number.
    RequestPhoneNumber -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The two-character code, in ISO 3166-1 alpha-2 format, for the country or
    -- region.
    RequestPhoneNumber -> Text
isoCountryCode :: Prelude.Text,
    -- | The type of message. Valid values are TRANSACTIONAL for messages that
    -- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t
    -- critical or time-sensitive.
    RequestPhoneNumber -> MessageType
messageType :: MessageType,
    -- | Indicates if the phone number will be used for text messages, voice
    -- messages, or both.
    RequestPhoneNumber -> NonEmpty NumberCapability
numberCapabilities :: Prelude.NonEmpty NumberCapability,
    -- | The type of phone number to request.
    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)

-- |
-- Create a value of 'RequestPhoneNumber' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'clientToken', 'requestPhoneNumber_clientToken' - Unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request. If you don\'t specify a client token, a
-- randomly generated token is used for the request to ensure idempotency.
--
-- 'deletionProtectionEnabled', 'requestPhoneNumber_deletionProtectionEnabled' - By default this is set to false. When set to true the phone number
-- can\'t be deleted.
--
-- 'optOutListName', 'requestPhoneNumber_optOutListName' - The name of the OptOutList to associate with the phone number. You can
-- use the OutOutListName or OptPutListArn.
--
-- 'poolId', 'requestPhoneNumber_poolId' - The pool to associated with the phone number. You can use the PoolId or
-- PoolArn.
--
-- 'registrationId', 'requestPhoneNumber_registrationId' - Use this field to attach your phone number for an external registration
-- process.
--
-- 'tags', 'requestPhoneNumber_tags' - An array of tags (key and value pairs) associate with the requested
-- phone number.
--
-- 'isoCountryCode', 'requestPhoneNumber_isoCountryCode' - The two-character code, in ISO 3166-1 alpha-2 format, for the country or
-- region.
--
-- 'messageType', 'requestPhoneNumber_messageType' - The type of message. Valid values are TRANSACTIONAL for messages that
-- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t
-- critical or time-sensitive.
--
-- 'numberCapabilities', 'requestPhoneNumber_numberCapabilities' - Indicates if the phone number will be used for text messages, voice
-- messages, or both.
--
-- 'numberType', 'requestPhoneNumber_numberType' - The type of phone number to request.
newRequestPhoneNumber ::
  -- | 'isoCountryCode'
  Prelude.Text ->
  -- | 'messageType'
  MessageType ->
  -- | 'numberCapabilities'
  Prelude.NonEmpty NumberCapability ->
  -- | 'numberType'
  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_
      }

-- | Unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request. If you don\'t specify a client token, a
-- randomly generated token is used for the request to ensure idempotency.
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)

-- | By default this is set to false. When set to true the phone number
-- can\'t be deleted.
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)

-- | The name of the OptOutList to associate with the phone number. You can
-- use the OutOutListName or OptPutListArn.
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)

-- | The pool to associated with the phone number. You can use the PoolId or
-- PoolArn.
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)

-- | Use this field to attach your phone number for an external registration
-- process.
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)

-- | An array of tags (key and value pairs) associate with the requested
-- phone number.
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

-- | The two-character code, in ISO 3166-1 alpha-2 format, for the country or
-- region.
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)

-- | The type of message. Valid values are TRANSACTIONAL for messages that
-- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t
-- critical or time-sensitive.
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)

-- | Indicates if the phone number will be used for text messages, voice
-- messages, or both.
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

-- | The type of phone number to request.
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

-- | /See:/ 'newRequestPhoneNumberResponse' smart constructor.
data RequestPhoneNumberResponse = RequestPhoneNumberResponse'
  { -- | The time when the phone number was created, in
    -- <https://www.epochconverter.com/ UNIX epoch time> format.
    RequestPhoneNumberResponse -> Maybe POSIX
createdTimestamp :: Prelude.Maybe Data.POSIX,
    -- | By default this is set to false. When set to true the phone number
    -- can\'t be deleted.
    RequestPhoneNumberResponse -> Maybe Bool
deletionProtectionEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The two-character code, in ISO 3166-1 alpha-2 format, for the country or
    -- region.
    RequestPhoneNumberResponse -> Maybe Text
isoCountryCode :: Prelude.Maybe Prelude.Text,
    -- | The type of message. Valid values are TRANSACTIONAL for messages that
    -- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t
    -- critical or time-sensitive.
    RequestPhoneNumberResponse -> Maybe MessageType
messageType :: Prelude.Maybe MessageType,
    -- | The monthly price, in US dollars, to lease the phone number.
    RequestPhoneNumberResponse -> Maybe Text
monthlyLeasingPrice :: Prelude.Maybe Prelude.Text,
    -- | Indicates if the phone number will be used for text messages, voice
    -- messages or both.
    RequestPhoneNumberResponse -> Maybe (NonEmpty NumberCapability)
numberCapabilities :: Prelude.Maybe (Prelude.NonEmpty NumberCapability),
    -- | The type of number that was released.
    RequestPhoneNumberResponse -> Maybe RequestableNumberType
numberType :: Prelude.Maybe RequestableNumberType,
    -- | The name of the OptOutList that is associated with the requested phone
    -- number.
    RequestPhoneNumberResponse -> Maybe Text
optOutListName :: Prelude.Maybe Prelude.Text,
    -- | The new phone number that was requested.
    RequestPhoneNumberResponse -> Maybe Text
phoneNumber :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the requested phone number.
    RequestPhoneNumberResponse -> Maybe Text
phoneNumberArn :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier of the new phone number.
    RequestPhoneNumberResponse -> Maybe Text
phoneNumberId :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier of the pool associated with the phone number
    RequestPhoneNumberResponse -> Maybe Text
poolId :: Prelude.Maybe Prelude.Text,
    -- | By default this is set to false. When an end recipient sends a message
    -- that begins with HELP or STOP to one of your dedicated numbers, Amazon
    -- Pinpoint automatically replies with a customizable message and adds the
    -- end recipient to the OptOutList. When set to true you\'re responsible
    -- for responding to HELP and STOP requests. You\'re also responsible for
    -- tracking and honoring opt-out requests.
    RequestPhoneNumberResponse -> Maybe Bool
selfManagedOptOutsEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The current status of the request.
    RequestPhoneNumberResponse -> Maybe NumberStatus
status :: Prelude.Maybe NumberStatus,
    -- | An array of key and value pair tags that are associated with the phone
    -- number.
    RequestPhoneNumberResponse -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The ARN used to identify the two way channel.
    RequestPhoneNumberResponse -> Maybe Text
twoWayChannelArn :: Prelude.Maybe Prelude.Text,
    -- | By default this is set to false. When set to true you can receive
    -- incoming text messages from your end recipients.
    RequestPhoneNumberResponse -> Maybe Bool
twoWayEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The response's http status code.
    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)

-- |
-- Create a value of 'RequestPhoneNumberResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'createdTimestamp', 'requestPhoneNumberResponse_createdTimestamp' - The time when the phone number was created, in
-- <https://www.epochconverter.com/ UNIX epoch time> format.
--
-- 'deletionProtectionEnabled', 'requestPhoneNumberResponse_deletionProtectionEnabled' - By default this is set to false. When set to true the phone number
-- can\'t be deleted.
--
-- 'isoCountryCode', 'requestPhoneNumberResponse_isoCountryCode' - The two-character code, in ISO 3166-1 alpha-2 format, for the country or
-- region.
--
-- 'messageType', 'requestPhoneNumberResponse_messageType' - The type of message. Valid values are TRANSACTIONAL for messages that
-- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t
-- critical or time-sensitive.
--
-- 'monthlyLeasingPrice', 'requestPhoneNumberResponse_monthlyLeasingPrice' - The monthly price, in US dollars, to lease the phone number.
--
-- 'numberCapabilities', 'requestPhoneNumberResponse_numberCapabilities' - Indicates if the phone number will be used for text messages, voice
-- messages or both.
--
-- 'numberType', 'requestPhoneNumberResponse_numberType' - The type of number that was released.
--
-- 'optOutListName', 'requestPhoneNumberResponse_optOutListName' - The name of the OptOutList that is associated with the requested phone
-- number.
--
-- 'phoneNumber', 'requestPhoneNumberResponse_phoneNumber' - The new phone number that was requested.
--
-- 'phoneNumberArn', 'requestPhoneNumberResponse_phoneNumberArn' - The Amazon Resource Name (ARN) of the requested phone number.
--
-- 'phoneNumberId', 'requestPhoneNumberResponse_phoneNumberId' - The unique identifier of the new phone number.
--
-- 'poolId', 'requestPhoneNumberResponse_poolId' - The unique identifier of the pool associated with the phone number
--
-- 'selfManagedOptOutsEnabled', 'requestPhoneNumberResponse_selfManagedOptOutsEnabled' - By default this is set to false. When an end recipient sends a message
-- that begins with HELP or STOP to one of your dedicated numbers, Amazon
-- Pinpoint automatically replies with a customizable message and adds the
-- end recipient to the OptOutList. When set to true you\'re responsible
-- for responding to HELP and STOP requests. You\'re also responsible for
-- tracking and honoring opt-out requests.
--
-- 'status', 'requestPhoneNumberResponse_status' - The current status of the request.
--
-- 'tags', 'requestPhoneNumberResponse_tags' - An array of key and value pair tags that are associated with the phone
-- number.
--
-- 'twoWayChannelArn', 'requestPhoneNumberResponse_twoWayChannelArn' - The ARN used to identify the two way channel.
--
-- 'twoWayEnabled', 'requestPhoneNumberResponse_twoWayEnabled' - By default this is set to false. When set to true you can receive
-- incoming text messages from your end recipients.
--
-- 'httpStatus', 'requestPhoneNumberResponse_httpStatus' - The response's http status code.
newRequestPhoneNumberResponse ::
  -- | 'httpStatus'
  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_
    }

-- | The time when the phone number was created, in
-- <https://www.epochconverter.com/ UNIX epoch time> format.
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

-- | By default this is set to false. When set to true the phone number
-- can\'t be deleted.
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)

-- | The two-character code, in ISO 3166-1 alpha-2 format, for the country or
-- region.
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)

-- | The type of message. Valid values are TRANSACTIONAL for messages that
-- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t
-- critical or time-sensitive.
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)

-- | The monthly price, in US dollars, to lease the phone number.
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)

-- | Indicates if the phone number will be used for text messages, voice
-- messages or both.
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

-- | The type of number that was released.
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)

-- | The name of the OptOutList that is associated with the requested phone
-- number.
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)

-- | The new phone number that was requested.
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)

-- | The Amazon Resource Name (ARN) of the requested phone number.
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)

-- | The unique identifier of the new phone number.
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)

-- | The unique identifier of the pool associated with the phone number
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)

-- | By default this is set to false. When an end recipient sends a message
-- that begins with HELP or STOP to one of your dedicated numbers, Amazon
-- Pinpoint automatically replies with a customizable message and adds the
-- end recipient to the OptOutList. When set to true you\'re responsible
-- for responding to HELP and STOP requests. You\'re also responsible for
-- tracking and honoring opt-out requests.
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)

-- | The current status of the request.
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)

-- | An array of key and value pair tags that are associated with the phone
-- number.
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

-- | The ARN used to identify the two way channel.
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)

-- | By default this is set to false. When set to true you can receive
-- incoming text messages from your end recipients.
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)

-- | The response's http status code.
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