{-# 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.ChimeSdkVoice.AssociatePhoneNumbersWithVoiceConnector
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- -- | Undocumented operation.
module Amazonka.ChimeSdkVoice.AssociatePhoneNumbersWithVoiceConnector
  ( -- * Creating a Request
    AssociatePhoneNumbersWithVoiceConnector (..),
    newAssociatePhoneNumbersWithVoiceConnector,

    -- * Request Lenses
    associatePhoneNumbersWithVoiceConnector_forceAssociate,
    associatePhoneNumbersWithVoiceConnector_voiceConnectorId,
    associatePhoneNumbersWithVoiceConnector_e164PhoneNumbers,

    -- * Destructuring the Response
    AssociatePhoneNumbersWithVoiceConnectorResponse (..),
    newAssociatePhoneNumbersWithVoiceConnectorResponse,

    -- * Response Lenses
    associatePhoneNumbersWithVoiceConnectorResponse_phoneNumberErrors,
    associatePhoneNumbersWithVoiceConnectorResponse_httpStatus,
  )
where

import Amazonka.ChimeSdkVoice.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newAssociatePhoneNumbersWithVoiceConnector' smart constructor.
data AssociatePhoneNumbersWithVoiceConnector = AssociatePhoneNumbersWithVoiceConnector'
  { AssociatePhoneNumbersWithVoiceConnector -> Maybe Bool
forceAssociate :: Prelude.Maybe Prelude.Bool,
    AssociatePhoneNumbersWithVoiceConnector -> Text
voiceConnectorId :: Prelude.Text,
    AssociatePhoneNumbersWithVoiceConnector -> [Sensitive Text]
e164PhoneNumbers :: [Data.Sensitive Prelude.Text]
  }
  deriving (AssociatePhoneNumbersWithVoiceConnector
-> AssociatePhoneNumbersWithVoiceConnector -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociatePhoneNumbersWithVoiceConnector
-> AssociatePhoneNumbersWithVoiceConnector -> Bool
$c/= :: AssociatePhoneNumbersWithVoiceConnector
-> AssociatePhoneNumbersWithVoiceConnector -> Bool
== :: AssociatePhoneNumbersWithVoiceConnector
-> AssociatePhoneNumbersWithVoiceConnector -> Bool
$c== :: AssociatePhoneNumbersWithVoiceConnector
-> AssociatePhoneNumbersWithVoiceConnector -> Bool
Prelude.Eq, Int -> AssociatePhoneNumbersWithVoiceConnector -> ShowS
[AssociatePhoneNumbersWithVoiceConnector] -> ShowS
AssociatePhoneNumbersWithVoiceConnector -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociatePhoneNumbersWithVoiceConnector] -> ShowS
$cshowList :: [AssociatePhoneNumbersWithVoiceConnector] -> ShowS
show :: AssociatePhoneNumbersWithVoiceConnector -> String
$cshow :: AssociatePhoneNumbersWithVoiceConnector -> String
showsPrec :: Int -> AssociatePhoneNumbersWithVoiceConnector -> ShowS
$cshowsPrec :: Int -> AssociatePhoneNumbersWithVoiceConnector -> ShowS
Prelude.Show, forall x.
Rep AssociatePhoneNumbersWithVoiceConnector x
-> AssociatePhoneNumbersWithVoiceConnector
forall x.
AssociatePhoneNumbersWithVoiceConnector
-> Rep AssociatePhoneNumbersWithVoiceConnector x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssociatePhoneNumbersWithVoiceConnector x
-> AssociatePhoneNumbersWithVoiceConnector
$cfrom :: forall x.
AssociatePhoneNumbersWithVoiceConnector
-> Rep AssociatePhoneNumbersWithVoiceConnector x
Prelude.Generic)

-- |
-- Create a value of 'AssociatePhoneNumbersWithVoiceConnector' 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:
--
-- 'forceAssociate', 'associatePhoneNumbersWithVoiceConnector_forceAssociate' - Undocumented member.
--
-- 'voiceConnectorId', 'associatePhoneNumbersWithVoiceConnector_voiceConnectorId' - Undocumented member.
--
-- 'e164PhoneNumbers', 'associatePhoneNumbersWithVoiceConnector_e164PhoneNumbers' - Undocumented member.
newAssociatePhoneNumbersWithVoiceConnector ::
  -- | 'voiceConnectorId'
  Prelude.Text ->
  AssociatePhoneNumbersWithVoiceConnector
newAssociatePhoneNumbersWithVoiceConnector :: Text -> AssociatePhoneNumbersWithVoiceConnector
newAssociatePhoneNumbersWithVoiceConnector
  Text
pVoiceConnectorId_ =
    AssociatePhoneNumbersWithVoiceConnector'
      { $sel:forceAssociate:AssociatePhoneNumbersWithVoiceConnector' :: Maybe Bool
forceAssociate =
          forall a. Maybe a
Prelude.Nothing,
        $sel:voiceConnectorId:AssociatePhoneNumbersWithVoiceConnector' :: Text
voiceConnectorId =
          Text
pVoiceConnectorId_,
        $sel:e164PhoneNumbers:AssociatePhoneNumbersWithVoiceConnector' :: [Sensitive Text]
e164PhoneNumbers = forall a. Monoid a => a
Prelude.mempty
      }

-- | Undocumented member.
associatePhoneNumbersWithVoiceConnector_forceAssociate :: Lens.Lens' AssociatePhoneNumbersWithVoiceConnector (Prelude.Maybe Prelude.Bool)
associatePhoneNumbersWithVoiceConnector_forceAssociate :: Lens' AssociatePhoneNumbersWithVoiceConnector (Maybe Bool)
associatePhoneNumbersWithVoiceConnector_forceAssociate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociatePhoneNumbersWithVoiceConnector' {Maybe Bool
forceAssociate :: Maybe Bool
$sel:forceAssociate:AssociatePhoneNumbersWithVoiceConnector' :: AssociatePhoneNumbersWithVoiceConnector -> Maybe Bool
forceAssociate} -> Maybe Bool
forceAssociate) (\s :: AssociatePhoneNumbersWithVoiceConnector
s@AssociatePhoneNumbersWithVoiceConnector' {} Maybe Bool
a -> AssociatePhoneNumbersWithVoiceConnector
s {$sel:forceAssociate:AssociatePhoneNumbersWithVoiceConnector' :: Maybe Bool
forceAssociate = Maybe Bool
a} :: AssociatePhoneNumbersWithVoiceConnector)

-- | Undocumented member.
associatePhoneNumbersWithVoiceConnector_voiceConnectorId :: Lens.Lens' AssociatePhoneNumbersWithVoiceConnector Prelude.Text
associatePhoneNumbersWithVoiceConnector_voiceConnectorId :: Lens' AssociatePhoneNumbersWithVoiceConnector Text
associatePhoneNumbersWithVoiceConnector_voiceConnectorId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociatePhoneNumbersWithVoiceConnector' {Text
voiceConnectorId :: Text
$sel:voiceConnectorId:AssociatePhoneNumbersWithVoiceConnector' :: AssociatePhoneNumbersWithVoiceConnector -> Text
voiceConnectorId} -> Text
voiceConnectorId) (\s :: AssociatePhoneNumbersWithVoiceConnector
s@AssociatePhoneNumbersWithVoiceConnector' {} Text
a -> AssociatePhoneNumbersWithVoiceConnector
s {$sel:voiceConnectorId:AssociatePhoneNumbersWithVoiceConnector' :: Text
voiceConnectorId = Text
a} :: AssociatePhoneNumbersWithVoiceConnector)

-- | Undocumented member.
associatePhoneNumbersWithVoiceConnector_e164PhoneNumbers :: Lens.Lens' AssociatePhoneNumbersWithVoiceConnector [Prelude.Text]
associatePhoneNumbersWithVoiceConnector_e164PhoneNumbers :: Lens' AssociatePhoneNumbersWithVoiceConnector [Text]
associatePhoneNumbersWithVoiceConnector_e164PhoneNumbers = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociatePhoneNumbersWithVoiceConnector' {[Sensitive Text]
e164PhoneNumbers :: [Sensitive Text]
$sel:e164PhoneNumbers:AssociatePhoneNumbersWithVoiceConnector' :: AssociatePhoneNumbersWithVoiceConnector -> [Sensitive Text]
e164PhoneNumbers} -> [Sensitive Text]
e164PhoneNumbers) (\s :: AssociatePhoneNumbersWithVoiceConnector
s@AssociatePhoneNumbersWithVoiceConnector' {} [Sensitive Text]
a -> AssociatePhoneNumbersWithVoiceConnector
s {$sel:e164PhoneNumbers:AssociatePhoneNumbersWithVoiceConnector' :: [Sensitive Text]
e164PhoneNumbers = [Sensitive Text]
a} :: AssociatePhoneNumbersWithVoiceConnector) 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

instance
  Core.AWSRequest
    AssociatePhoneNumbersWithVoiceConnector
  where
  type
    AWSResponse
      AssociatePhoneNumbersWithVoiceConnector =
      AssociatePhoneNumbersWithVoiceConnectorResponse
  request :: (Service -> Service)
-> AssociatePhoneNumbersWithVoiceConnector
-> Request AssociatePhoneNumbersWithVoiceConnector
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 AssociatePhoneNumbersWithVoiceConnector
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse AssociatePhoneNumbersWithVoiceConnector)))
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 [PhoneNumberError]
-> Int -> AssociatePhoneNumbersWithVoiceConnectorResponse
AssociatePhoneNumbersWithVoiceConnectorResponse'
            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
"PhoneNumberErrors"
                            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.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    AssociatePhoneNumbersWithVoiceConnector
  where
  hashWithSalt :: Int -> AssociatePhoneNumbersWithVoiceConnector -> Int
hashWithSalt
    Int
_salt
    AssociatePhoneNumbersWithVoiceConnector' {[Sensitive Text]
Maybe Bool
Text
e164PhoneNumbers :: [Sensitive Text]
voiceConnectorId :: Text
forceAssociate :: Maybe Bool
$sel:e164PhoneNumbers:AssociatePhoneNumbersWithVoiceConnector' :: AssociatePhoneNumbersWithVoiceConnector -> [Sensitive Text]
$sel:voiceConnectorId:AssociatePhoneNumbersWithVoiceConnector' :: AssociatePhoneNumbersWithVoiceConnector -> Text
$sel:forceAssociate:AssociatePhoneNumbersWithVoiceConnector' :: AssociatePhoneNumbersWithVoiceConnector -> Maybe Bool
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
forceAssociate
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
voiceConnectorId
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Sensitive Text]
e164PhoneNumbers

instance
  Prelude.NFData
    AssociatePhoneNumbersWithVoiceConnector
  where
  rnf :: AssociatePhoneNumbersWithVoiceConnector -> ()
rnf AssociatePhoneNumbersWithVoiceConnector' {[Sensitive Text]
Maybe Bool
Text
e164PhoneNumbers :: [Sensitive Text]
voiceConnectorId :: Text
forceAssociate :: Maybe Bool
$sel:e164PhoneNumbers:AssociatePhoneNumbersWithVoiceConnector' :: AssociatePhoneNumbersWithVoiceConnector -> [Sensitive Text]
$sel:voiceConnectorId:AssociatePhoneNumbersWithVoiceConnector' :: AssociatePhoneNumbersWithVoiceConnector -> Text
$sel:forceAssociate:AssociatePhoneNumbersWithVoiceConnector' :: AssociatePhoneNumbersWithVoiceConnector -> Maybe Bool
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
forceAssociate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
voiceConnectorId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [Sensitive Text]
e164PhoneNumbers

instance
  Data.ToHeaders
    AssociatePhoneNumbersWithVoiceConnector
  where
  toHeaders :: AssociatePhoneNumbersWithVoiceConnector -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

instance
  Data.ToJSON
    AssociatePhoneNumbersWithVoiceConnector
  where
  toJSON :: AssociatePhoneNumbersWithVoiceConnector -> Value
toJSON AssociatePhoneNumbersWithVoiceConnector' {[Sensitive Text]
Maybe Bool
Text
e164PhoneNumbers :: [Sensitive Text]
voiceConnectorId :: Text
forceAssociate :: Maybe Bool
$sel:e164PhoneNumbers:AssociatePhoneNumbersWithVoiceConnector' :: AssociatePhoneNumbersWithVoiceConnector -> [Sensitive Text]
$sel:voiceConnectorId:AssociatePhoneNumbersWithVoiceConnector' :: AssociatePhoneNumbersWithVoiceConnector -> Text
$sel:forceAssociate:AssociatePhoneNumbersWithVoiceConnector' :: AssociatePhoneNumbersWithVoiceConnector -> Maybe Bool
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"ForceAssociate" 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
forceAssociate,
            forall a. a -> Maybe a
Prelude.Just
              (Key
"E164PhoneNumbers" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= [Sensitive Text]
e164PhoneNumbers)
          ]
      )

instance
  Data.ToPath
    AssociatePhoneNumbersWithVoiceConnector
  where
  toPath :: AssociatePhoneNumbersWithVoiceConnector -> ByteString
toPath AssociatePhoneNumbersWithVoiceConnector' {[Sensitive Text]
Maybe Bool
Text
e164PhoneNumbers :: [Sensitive Text]
voiceConnectorId :: Text
forceAssociate :: Maybe Bool
$sel:e164PhoneNumbers:AssociatePhoneNumbersWithVoiceConnector' :: AssociatePhoneNumbersWithVoiceConnector -> [Sensitive Text]
$sel:voiceConnectorId:AssociatePhoneNumbersWithVoiceConnector' :: AssociatePhoneNumbersWithVoiceConnector -> Text
$sel:forceAssociate:AssociatePhoneNumbersWithVoiceConnector' :: AssociatePhoneNumbersWithVoiceConnector -> Maybe Bool
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/voice-connectors/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
voiceConnectorId]

instance
  Data.ToQuery
    AssociatePhoneNumbersWithVoiceConnector
  where
  toQuery :: AssociatePhoneNumbersWithVoiceConnector -> QueryString
toQuery =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [QueryString
"operation=associate-phone-numbers"]
      )

-- | /See:/ 'newAssociatePhoneNumbersWithVoiceConnectorResponse' smart constructor.
data AssociatePhoneNumbersWithVoiceConnectorResponse = AssociatePhoneNumbersWithVoiceConnectorResponse'
  { AssociatePhoneNumbersWithVoiceConnectorResponse
-> Maybe [PhoneNumberError]
phoneNumberErrors :: Prelude.Maybe [PhoneNumberError],
    -- | The response's http status code.
    AssociatePhoneNumbersWithVoiceConnectorResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (AssociatePhoneNumbersWithVoiceConnectorResponse
-> AssociatePhoneNumbersWithVoiceConnectorResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociatePhoneNumbersWithVoiceConnectorResponse
-> AssociatePhoneNumbersWithVoiceConnectorResponse -> Bool
$c/= :: AssociatePhoneNumbersWithVoiceConnectorResponse
-> AssociatePhoneNumbersWithVoiceConnectorResponse -> Bool
== :: AssociatePhoneNumbersWithVoiceConnectorResponse
-> AssociatePhoneNumbersWithVoiceConnectorResponse -> Bool
$c== :: AssociatePhoneNumbersWithVoiceConnectorResponse
-> AssociatePhoneNumbersWithVoiceConnectorResponse -> Bool
Prelude.Eq, Int -> AssociatePhoneNumbersWithVoiceConnectorResponse -> ShowS
[AssociatePhoneNumbersWithVoiceConnectorResponse] -> ShowS
AssociatePhoneNumbersWithVoiceConnectorResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociatePhoneNumbersWithVoiceConnectorResponse] -> ShowS
$cshowList :: [AssociatePhoneNumbersWithVoiceConnectorResponse] -> ShowS
show :: AssociatePhoneNumbersWithVoiceConnectorResponse -> String
$cshow :: AssociatePhoneNumbersWithVoiceConnectorResponse -> String
showsPrec :: Int -> AssociatePhoneNumbersWithVoiceConnectorResponse -> ShowS
$cshowsPrec :: Int -> AssociatePhoneNumbersWithVoiceConnectorResponse -> ShowS
Prelude.Show, forall x.
Rep AssociatePhoneNumbersWithVoiceConnectorResponse x
-> AssociatePhoneNumbersWithVoiceConnectorResponse
forall x.
AssociatePhoneNumbersWithVoiceConnectorResponse
-> Rep AssociatePhoneNumbersWithVoiceConnectorResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssociatePhoneNumbersWithVoiceConnectorResponse x
-> AssociatePhoneNumbersWithVoiceConnectorResponse
$cfrom :: forall x.
AssociatePhoneNumbersWithVoiceConnectorResponse
-> Rep AssociatePhoneNumbersWithVoiceConnectorResponse x
Prelude.Generic)

-- |
-- Create a value of 'AssociatePhoneNumbersWithVoiceConnectorResponse' 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:
--
-- 'phoneNumberErrors', 'associatePhoneNumbersWithVoiceConnectorResponse_phoneNumberErrors' - Undocumented member.
--
-- 'httpStatus', 'associatePhoneNumbersWithVoiceConnectorResponse_httpStatus' - The response's http status code.
newAssociatePhoneNumbersWithVoiceConnectorResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  AssociatePhoneNumbersWithVoiceConnectorResponse
newAssociatePhoneNumbersWithVoiceConnectorResponse :: Int -> AssociatePhoneNumbersWithVoiceConnectorResponse
newAssociatePhoneNumbersWithVoiceConnectorResponse
  Int
pHttpStatus_ =
    AssociatePhoneNumbersWithVoiceConnectorResponse'
      { $sel:phoneNumberErrors:AssociatePhoneNumbersWithVoiceConnectorResponse' :: Maybe [PhoneNumberError]
phoneNumberErrors =
          forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:AssociatePhoneNumbersWithVoiceConnectorResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | Undocumented member.
associatePhoneNumbersWithVoiceConnectorResponse_phoneNumberErrors :: Lens.Lens' AssociatePhoneNumbersWithVoiceConnectorResponse (Prelude.Maybe [PhoneNumberError])
associatePhoneNumbersWithVoiceConnectorResponse_phoneNumberErrors :: Lens'
  AssociatePhoneNumbersWithVoiceConnectorResponse
  (Maybe [PhoneNumberError])
associatePhoneNumbersWithVoiceConnectorResponse_phoneNumberErrors = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociatePhoneNumbersWithVoiceConnectorResponse' {Maybe [PhoneNumberError]
phoneNumberErrors :: Maybe [PhoneNumberError]
$sel:phoneNumberErrors:AssociatePhoneNumbersWithVoiceConnectorResponse' :: AssociatePhoneNumbersWithVoiceConnectorResponse
-> Maybe [PhoneNumberError]
phoneNumberErrors} -> Maybe [PhoneNumberError]
phoneNumberErrors) (\s :: AssociatePhoneNumbersWithVoiceConnectorResponse
s@AssociatePhoneNumbersWithVoiceConnectorResponse' {} Maybe [PhoneNumberError]
a -> AssociatePhoneNumbersWithVoiceConnectorResponse
s {$sel:phoneNumberErrors:AssociatePhoneNumbersWithVoiceConnectorResponse' :: Maybe [PhoneNumberError]
phoneNumberErrors = Maybe [PhoneNumberError]
a} :: AssociatePhoneNumbersWithVoiceConnectorResponse) 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 response's http status code.
associatePhoneNumbersWithVoiceConnectorResponse_httpStatus :: Lens.Lens' AssociatePhoneNumbersWithVoiceConnectorResponse Prelude.Int
associatePhoneNumbersWithVoiceConnectorResponse_httpStatus :: Lens' AssociatePhoneNumbersWithVoiceConnectorResponse Int
associatePhoneNumbersWithVoiceConnectorResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociatePhoneNumbersWithVoiceConnectorResponse' {Int
httpStatus :: Int
$sel:httpStatus:AssociatePhoneNumbersWithVoiceConnectorResponse' :: AssociatePhoneNumbersWithVoiceConnectorResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: AssociatePhoneNumbersWithVoiceConnectorResponse
s@AssociatePhoneNumbersWithVoiceConnectorResponse' {} Int
a -> AssociatePhoneNumbersWithVoiceConnectorResponse
s {$sel:httpStatus:AssociatePhoneNumbersWithVoiceConnectorResponse' :: Int
httpStatus = Int
a} :: AssociatePhoneNumbersWithVoiceConnectorResponse)

instance
  Prelude.NFData
    AssociatePhoneNumbersWithVoiceConnectorResponse
  where
  rnf :: AssociatePhoneNumbersWithVoiceConnectorResponse -> ()
rnf
    AssociatePhoneNumbersWithVoiceConnectorResponse' {Int
Maybe [PhoneNumberError]
httpStatus :: Int
phoneNumberErrors :: Maybe [PhoneNumberError]
$sel:httpStatus:AssociatePhoneNumbersWithVoiceConnectorResponse' :: AssociatePhoneNumbersWithVoiceConnectorResponse -> Int
$sel:phoneNumberErrors:AssociatePhoneNumbersWithVoiceConnectorResponse' :: AssociatePhoneNumbersWithVoiceConnectorResponse
-> Maybe [PhoneNumberError]
..} =
      forall a. NFData a => a -> ()
Prelude.rnf Maybe [PhoneNumberError]
phoneNumberErrors
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus