{-# 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.Chime.DisassociatePhoneNumbersFromVoiceConnectorGroup
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Disassociates the specified phone numbers from the specified Amazon
-- Chime Voice Connector group.
module Amazonka.Chime.DisassociatePhoneNumbersFromVoiceConnectorGroup
  ( -- * Creating a Request
    DisassociatePhoneNumbersFromVoiceConnectorGroup (..),
    newDisassociatePhoneNumbersFromVoiceConnectorGroup,

    -- * Request Lenses
    disassociatePhoneNumbersFromVoiceConnectorGroup_voiceConnectorGroupId,
    disassociatePhoneNumbersFromVoiceConnectorGroup_e164PhoneNumbers,

    -- * Destructuring the Response
    DisassociatePhoneNumbersFromVoiceConnectorGroupResponse (..),
    newDisassociatePhoneNumbersFromVoiceConnectorGroupResponse,

    -- * Response Lenses
    disassociatePhoneNumbersFromVoiceConnectorGroupResponse_phoneNumberErrors,
    disassociatePhoneNumbersFromVoiceConnectorGroupResponse_httpStatus,
  )
where

import Amazonka.Chime.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newDisassociatePhoneNumbersFromVoiceConnectorGroup' smart constructor.
data DisassociatePhoneNumbersFromVoiceConnectorGroup = DisassociatePhoneNumbersFromVoiceConnectorGroup'
  { -- | The Amazon Chime Voice Connector group ID.
    DisassociatePhoneNumbersFromVoiceConnectorGroup -> Text
voiceConnectorGroupId :: Prelude.Text,
    -- | List of phone numbers, in E.164 format.
    DisassociatePhoneNumbersFromVoiceConnectorGroup -> [Sensitive Text]
e164PhoneNumbers :: [Core.Sensitive Prelude.Text]
  }
  deriving (DisassociatePhoneNumbersFromVoiceConnectorGroup
-> DisassociatePhoneNumbersFromVoiceConnectorGroup -> Bool
(DisassociatePhoneNumbersFromVoiceConnectorGroup
 -> DisassociatePhoneNumbersFromVoiceConnectorGroup -> Bool)
-> (DisassociatePhoneNumbersFromVoiceConnectorGroup
    -> DisassociatePhoneNumbersFromVoiceConnectorGroup -> Bool)
-> Eq DisassociatePhoneNumbersFromVoiceConnectorGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociatePhoneNumbersFromVoiceConnectorGroup
-> DisassociatePhoneNumbersFromVoiceConnectorGroup -> Bool
$c/= :: DisassociatePhoneNumbersFromVoiceConnectorGroup
-> DisassociatePhoneNumbersFromVoiceConnectorGroup -> Bool
== :: DisassociatePhoneNumbersFromVoiceConnectorGroup
-> DisassociatePhoneNumbersFromVoiceConnectorGroup -> Bool
$c== :: DisassociatePhoneNumbersFromVoiceConnectorGroup
-> DisassociatePhoneNumbersFromVoiceConnectorGroup -> Bool
Prelude.Eq, Int -> DisassociatePhoneNumbersFromVoiceConnectorGroup -> ShowS
[DisassociatePhoneNumbersFromVoiceConnectorGroup] -> ShowS
DisassociatePhoneNumbersFromVoiceConnectorGroup -> String
(Int -> DisassociatePhoneNumbersFromVoiceConnectorGroup -> ShowS)
-> (DisassociatePhoneNumbersFromVoiceConnectorGroup -> String)
-> ([DisassociatePhoneNumbersFromVoiceConnectorGroup] -> ShowS)
-> Show DisassociatePhoneNumbersFromVoiceConnectorGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociatePhoneNumbersFromVoiceConnectorGroup] -> ShowS
$cshowList :: [DisassociatePhoneNumbersFromVoiceConnectorGroup] -> ShowS
show :: DisassociatePhoneNumbersFromVoiceConnectorGroup -> String
$cshow :: DisassociatePhoneNumbersFromVoiceConnectorGroup -> String
showsPrec :: Int -> DisassociatePhoneNumbersFromVoiceConnectorGroup -> ShowS
$cshowsPrec :: Int -> DisassociatePhoneNumbersFromVoiceConnectorGroup -> ShowS
Prelude.Show, (forall x.
 DisassociatePhoneNumbersFromVoiceConnectorGroup
 -> Rep DisassociatePhoneNumbersFromVoiceConnectorGroup x)
-> (forall x.
    Rep DisassociatePhoneNumbersFromVoiceConnectorGroup x
    -> DisassociatePhoneNumbersFromVoiceConnectorGroup)
-> Generic DisassociatePhoneNumbersFromVoiceConnectorGroup
forall x.
Rep DisassociatePhoneNumbersFromVoiceConnectorGroup x
-> DisassociatePhoneNumbersFromVoiceConnectorGroup
forall x.
DisassociatePhoneNumbersFromVoiceConnectorGroup
-> Rep DisassociatePhoneNumbersFromVoiceConnectorGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociatePhoneNumbersFromVoiceConnectorGroup x
-> DisassociatePhoneNumbersFromVoiceConnectorGroup
$cfrom :: forall x.
DisassociatePhoneNumbersFromVoiceConnectorGroup
-> Rep DisassociatePhoneNumbersFromVoiceConnectorGroup x
Prelude.Generic)

-- |
-- Create a value of 'DisassociatePhoneNumbersFromVoiceConnectorGroup' 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:
--
-- 'voiceConnectorGroupId', 'disassociatePhoneNumbersFromVoiceConnectorGroup_voiceConnectorGroupId' - The Amazon Chime Voice Connector group ID.
--
-- 'e164PhoneNumbers', 'disassociatePhoneNumbersFromVoiceConnectorGroup_e164PhoneNumbers' - List of phone numbers, in E.164 format.
newDisassociatePhoneNumbersFromVoiceConnectorGroup ::
  -- | 'voiceConnectorGroupId'
  Prelude.Text ->
  DisassociatePhoneNumbersFromVoiceConnectorGroup
newDisassociatePhoneNumbersFromVoiceConnectorGroup :: Text -> DisassociatePhoneNumbersFromVoiceConnectorGroup
newDisassociatePhoneNumbersFromVoiceConnectorGroup
  Text
pVoiceConnectorGroupId_ =
    DisassociatePhoneNumbersFromVoiceConnectorGroup' :: Text
-> [Sensitive Text]
-> DisassociatePhoneNumbersFromVoiceConnectorGroup
DisassociatePhoneNumbersFromVoiceConnectorGroup'
      { $sel:voiceConnectorGroupId:DisassociatePhoneNumbersFromVoiceConnectorGroup' :: Text
voiceConnectorGroupId =
          Text
pVoiceConnectorGroupId_,
        $sel:e164PhoneNumbers:DisassociatePhoneNumbersFromVoiceConnectorGroup' :: [Sensitive Text]
e164PhoneNumbers =
          [Sensitive Text]
forall a. Monoid a => a
Prelude.mempty
      }

-- | The Amazon Chime Voice Connector group ID.
disassociatePhoneNumbersFromVoiceConnectorGroup_voiceConnectorGroupId :: Lens.Lens' DisassociatePhoneNumbersFromVoiceConnectorGroup Prelude.Text
disassociatePhoneNumbersFromVoiceConnectorGroup_voiceConnectorGroupId :: (Text -> f Text)
-> DisassociatePhoneNumbersFromVoiceConnectorGroup
-> f DisassociatePhoneNumbersFromVoiceConnectorGroup
disassociatePhoneNumbersFromVoiceConnectorGroup_voiceConnectorGroupId = (DisassociatePhoneNumbersFromVoiceConnectorGroup -> Text)
-> (DisassociatePhoneNumbersFromVoiceConnectorGroup
    -> Text -> DisassociatePhoneNumbersFromVoiceConnectorGroup)
-> Lens
     DisassociatePhoneNumbersFromVoiceConnectorGroup
     DisassociatePhoneNumbersFromVoiceConnectorGroup
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociatePhoneNumbersFromVoiceConnectorGroup' {Text
voiceConnectorGroupId :: Text
$sel:voiceConnectorGroupId:DisassociatePhoneNumbersFromVoiceConnectorGroup' :: DisassociatePhoneNumbersFromVoiceConnectorGroup -> Text
voiceConnectorGroupId} -> Text
voiceConnectorGroupId) (\s :: DisassociatePhoneNumbersFromVoiceConnectorGroup
s@DisassociatePhoneNumbersFromVoiceConnectorGroup' {} Text
a -> DisassociatePhoneNumbersFromVoiceConnectorGroup
s {$sel:voiceConnectorGroupId:DisassociatePhoneNumbersFromVoiceConnectorGroup' :: Text
voiceConnectorGroupId = Text
a} :: DisassociatePhoneNumbersFromVoiceConnectorGroup)

-- | List of phone numbers, in E.164 format.
disassociatePhoneNumbersFromVoiceConnectorGroup_e164PhoneNumbers :: Lens.Lens' DisassociatePhoneNumbersFromVoiceConnectorGroup [Prelude.Text]
disassociatePhoneNumbersFromVoiceConnectorGroup_e164PhoneNumbers :: ([Text] -> f [Text])
-> DisassociatePhoneNumbersFromVoiceConnectorGroup
-> f DisassociatePhoneNumbersFromVoiceConnectorGroup
disassociatePhoneNumbersFromVoiceConnectorGroup_e164PhoneNumbers = (DisassociatePhoneNumbersFromVoiceConnectorGroup
 -> [Sensitive Text])
-> (DisassociatePhoneNumbersFromVoiceConnectorGroup
    -> [Sensitive Text]
    -> DisassociatePhoneNumbersFromVoiceConnectorGroup)
-> Lens
     DisassociatePhoneNumbersFromVoiceConnectorGroup
     DisassociatePhoneNumbersFromVoiceConnectorGroup
     [Sensitive Text]
     [Sensitive Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociatePhoneNumbersFromVoiceConnectorGroup' {[Sensitive Text]
e164PhoneNumbers :: [Sensitive Text]
$sel:e164PhoneNumbers:DisassociatePhoneNumbersFromVoiceConnectorGroup' :: DisassociatePhoneNumbersFromVoiceConnectorGroup -> [Sensitive Text]
e164PhoneNumbers} -> [Sensitive Text]
e164PhoneNumbers) (\s :: DisassociatePhoneNumbersFromVoiceConnectorGroup
s@DisassociatePhoneNumbersFromVoiceConnectorGroup' {} [Sensitive Text]
a -> DisassociatePhoneNumbersFromVoiceConnectorGroup
s {$sel:e164PhoneNumbers:DisassociatePhoneNumbersFromVoiceConnectorGroup' :: [Sensitive Text]
e164PhoneNumbers = [Sensitive Text]
a} :: DisassociatePhoneNumbersFromVoiceConnectorGroup) (([Sensitive Text] -> f [Sensitive Text])
 -> DisassociatePhoneNumbersFromVoiceConnectorGroup
 -> f DisassociatePhoneNumbersFromVoiceConnectorGroup)
-> (([Text] -> f [Text]) -> [Sensitive Text] -> f [Sensitive Text])
-> ([Text] -> f [Text])
-> DisassociatePhoneNumbersFromVoiceConnectorGroup
-> f DisassociatePhoneNumbersFromVoiceConnectorGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Sensitive Text] -> f [Sensitive Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Core.AWSRequest
    DisassociatePhoneNumbersFromVoiceConnectorGroup
  where
  type
    AWSResponse
      DisassociatePhoneNumbersFromVoiceConnectorGroup =
      DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
  request :: DisassociatePhoneNumbersFromVoiceConnectorGroup
-> Request DisassociatePhoneNumbersFromVoiceConnectorGroup
request = Service
-> DisassociatePhoneNumbersFromVoiceConnectorGroup
-> Request DisassociatePhoneNumbersFromVoiceConnectorGroup
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DisassociatePhoneNumbersFromVoiceConnectorGroup
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse DisassociatePhoneNumbersFromVoiceConnectorGroup)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either
      String
      (AWSResponse DisassociatePhoneNumbersFromVoiceConnectorGroup))
-> Logger
-> Service
-> Proxy DisassociatePhoneNumbersFromVoiceConnectorGroup
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse DisassociatePhoneNumbersFromVoiceConnectorGroup)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [PhoneNumberError]
-> Int -> DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
DisassociatePhoneNumbersFromVoiceConnectorGroupResponse'
            (Maybe [PhoneNumberError]
 -> Int -> DisassociatePhoneNumbersFromVoiceConnectorGroupResponse)
-> Either String (Maybe [PhoneNumberError])
-> Either
     String
     (Int -> DisassociatePhoneNumbersFromVoiceConnectorGroupResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Either String (Maybe (Maybe [PhoneNumberError]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"PhoneNumberErrors"
                            Either String (Maybe (Maybe [PhoneNumberError]))
-> Maybe [PhoneNumberError]
-> Either String (Maybe [PhoneNumberError])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [PhoneNumberError]
forall a. Monoid a => a
Prelude.mempty
                        )
              Either
  String
  (Int -> DisassociatePhoneNumbersFromVoiceConnectorGroupResponse)
-> Either String Int
-> Either
     String DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    DisassociatePhoneNumbersFromVoiceConnectorGroup

instance
  Prelude.NFData
    DisassociatePhoneNumbersFromVoiceConnectorGroup

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

instance
  Core.ToJSON
    DisassociatePhoneNumbersFromVoiceConnectorGroup
  where
  toJSON :: DisassociatePhoneNumbersFromVoiceConnectorGroup -> Value
toJSON
    DisassociatePhoneNumbersFromVoiceConnectorGroup' {[Sensitive Text]
Text
e164PhoneNumbers :: [Sensitive Text]
voiceConnectorGroupId :: Text
$sel:e164PhoneNumbers:DisassociatePhoneNumbersFromVoiceConnectorGroup' :: DisassociatePhoneNumbersFromVoiceConnectorGroup -> [Sensitive Text]
$sel:voiceConnectorGroupId:DisassociatePhoneNumbersFromVoiceConnectorGroup' :: DisassociatePhoneNumbersFromVoiceConnectorGroup -> Text
..} =
      [Pair] -> Value
Core.object
        ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
            [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
                (Text
"E164PhoneNumbers" Text -> [Sensitive Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Sensitive Text]
e164PhoneNumbers)
            ]
        )

instance
  Core.ToPath
    DisassociatePhoneNumbersFromVoiceConnectorGroup
  where
  toPath :: DisassociatePhoneNumbersFromVoiceConnectorGroup -> ByteString
toPath
    DisassociatePhoneNumbersFromVoiceConnectorGroup' {[Sensitive Text]
Text
e164PhoneNumbers :: [Sensitive Text]
voiceConnectorGroupId :: Text
$sel:e164PhoneNumbers:DisassociatePhoneNumbersFromVoiceConnectorGroup' :: DisassociatePhoneNumbersFromVoiceConnectorGroup -> [Sensitive Text]
$sel:voiceConnectorGroupId:DisassociatePhoneNumbersFromVoiceConnectorGroup' :: DisassociatePhoneNumbersFromVoiceConnectorGroup -> Text
..} =
      [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
        [ ByteString
"/voice-connector-groups/",
          Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
voiceConnectorGroupId
        ]

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

-- | /See:/ 'newDisassociatePhoneNumbersFromVoiceConnectorGroupResponse' smart constructor.
data DisassociatePhoneNumbersFromVoiceConnectorGroupResponse = DisassociatePhoneNumbersFromVoiceConnectorGroupResponse'
  { -- | If the action fails for one or more of the phone numbers in the request,
    -- a list of the phone numbers is returned, along with error codes and
    -- error messages.
    DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
-> Maybe [PhoneNumberError]
phoneNumberErrors :: Prelude.Maybe [PhoneNumberError],
    -- | The response's http status code.
    DisassociatePhoneNumbersFromVoiceConnectorGroupResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
-> DisassociatePhoneNumbersFromVoiceConnectorGroupResponse -> Bool
(DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
 -> DisassociatePhoneNumbersFromVoiceConnectorGroupResponse -> Bool)
-> (DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
    -> DisassociatePhoneNumbersFromVoiceConnectorGroupResponse -> Bool)
-> Eq DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
-> DisassociatePhoneNumbersFromVoiceConnectorGroupResponse -> Bool
$c/= :: DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
-> DisassociatePhoneNumbersFromVoiceConnectorGroupResponse -> Bool
== :: DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
-> DisassociatePhoneNumbersFromVoiceConnectorGroupResponse -> Bool
$c== :: DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
-> DisassociatePhoneNumbersFromVoiceConnectorGroupResponse -> Bool
Prelude.Eq, ReadPrec [DisassociatePhoneNumbersFromVoiceConnectorGroupResponse]
ReadPrec DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
Int
-> ReadS DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
ReadS [DisassociatePhoneNumbersFromVoiceConnectorGroupResponse]
(Int
 -> ReadS DisassociatePhoneNumbersFromVoiceConnectorGroupResponse)
-> ReadS [DisassociatePhoneNumbersFromVoiceConnectorGroupResponse]
-> ReadPrec DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
-> ReadPrec
     [DisassociatePhoneNumbersFromVoiceConnectorGroupResponse]
-> Read DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociatePhoneNumbersFromVoiceConnectorGroupResponse]
$creadListPrec :: ReadPrec [DisassociatePhoneNumbersFromVoiceConnectorGroupResponse]
readPrec :: ReadPrec DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
$creadPrec :: ReadPrec DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
readList :: ReadS [DisassociatePhoneNumbersFromVoiceConnectorGroupResponse]
$creadList :: ReadS [DisassociatePhoneNumbersFromVoiceConnectorGroupResponse]
readsPrec :: Int
-> ReadS DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
$creadsPrec :: Int
-> ReadS DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
Prelude.Read, Int
-> DisassociatePhoneNumbersFromVoiceConnectorGroupResponse -> ShowS
[DisassociatePhoneNumbersFromVoiceConnectorGroupResponse] -> ShowS
DisassociatePhoneNumbersFromVoiceConnectorGroupResponse -> String
(Int
 -> DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
 -> ShowS)
-> (DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
    -> String)
-> ([DisassociatePhoneNumbersFromVoiceConnectorGroupResponse]
    -> ShowS)
-> Show DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociatePhoneNumbersFromVoiceConnectorGroupResponse] -> ShowS
$cshowList :: [DisassociatePhoneNumbersFromVoiceConnectorGroupResponse] -> ShowS
show :: DisassociatePhoneNumbersFromVoiceConnectorGroupResponse -> String
$cshow :: DisassociatePhoneNumbersFromVoiceConnectorGroupResponse -> String
showsPrec :: Int
-> DisassociatePhoneNumbersFromVoiceConnectorGroupResponse -> ShowS
$cshowsPrec :: Int
-> DisassociatePhoneNumbersFromVoiceConnectorGroupResponse -> ShowS
Prelude.Show, (forall x.
 DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
 -> Rep DisassociatePhoneNumbersFromVoiceConnectorGroupResponse x)
-> (forall x.
    Rep DisassociatePhoneNumbersFromVoiceConnectorGroupResponse x
    -> DisassociatePhoneNumbersFromVoiceConnectorGroupResponse)
-> Generic DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
forall x.
Rep DisassociatePhoneNumbersFromVoiceConnectorGroupResponse x
-> DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
forall x.
DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
-> Rep DisassociatePhoneNumbersFromVoiceConnectorGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociatePhoneNumbersFromVoiceConnectorGroupResponse x
-> DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
$cfrom :: forall x.
DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
-> Rep DisassociatePhoneNumbersFromVoiceConnectorGroupResponse x
Prelude.Generic)

-- |
-- Create a value of 'DisassociatePhoneNumbersFromVoiceConnectorGroupResponse' 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', 'disassociatePhoneNumbersFromVoiceConnectorGroupResponse_phoneNumberErrors' - If the action fails for one or more of the phone numbers in the request,
-- a list of the phone numbers is returned, along with error codes and
-- error messages.
--
-- 'httpStatus', 'disassociatePhoneNumbersFromVoiceConnectorGroupResponse_httpStatus' - The response's http status code.
newDisassociatePhoneNumbersFromVoiceConnectorGroupResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
newDisassociatePhoneNumbersFromVoiceConnectorGroupResponse :: Int -> DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
newDisassociatePhoneNumbersFromVoiceConnectorGroupResponse
  Int
pHttpStatus_ =
    DisassociatePhoneNumbersFromVoiceConnectorGroupResponse' :: Maybe [PhoneNumberError]
-> Int -> DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
DisassociatePhoneNumbersFromVoiceConnectorGroupResponse'
      { $sel:phoneNumberErrors:DisassociatePhoneNumbersFromVoiceConnectorGroupResponse' :: Maybe [PhoneNumberError]
phoneNumberErrors =
          Maybe [PhoneNumberError]
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DisassociatePhoneNumbersFromVoiceConnectorGroupResponse' :: Int
httpStatus =
          Int
pHttpStatus_
      }

-- | If the action fails for one or more of the phone numbers in the request,
-- a list of the phone numbers is returned, along with error codes and
-- error messages.
disassociatePhoneNumbersFromVoiceConnectorGroupResponse_phoneNumberErrors :: Lens.Lens' DisassociatePhoneNumbersFromVoiceConnectorGroupResponse (Prelude.Maybe [PhoneNumberError])
disassociatePhoneNumbersFromVoiceConnectorGroupResponse_phoneNumberErrors :: (Maybe [PhoneNumberError] -> f (Maybe [PhoneNumberError]))
-> DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
-> f DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
disassociatePhoneNumbersFromVoiceConnectorGroupResponse_phoneNumberErrors = (DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
 -> Maybe [PhoneNumberError])
-> (DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
    -> Maybe [PhoneNumberError]
    -> DisassociatePhoneNumbersFromVoiceConnectorGroupResponse)
-> Lens
     DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
     DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
     (Maybe [PhoneNumberError])
     (Maybe [PhoneNumberError])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociatePhoneNumbersFromVoiceConnectorGroupResponse' {Maybe [PhoneNumberError]
phoneNumberErrors :: Maybe [PhoneNumberError]
$sel:phoneNumberErrors:DisassociatePhoneNumbersFromVoiceConnectorGroupResponse' :: DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
-> Maybe [PhoneNumberError]
phoneNumberErrors} -> Maybe [PhoneNumberError]
phoneNumberErrors) (\s :: DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
s@DisassociatePhoneNumbersFromVoiceConnectorGroupResponse' {} Maybe [PhoneNumberError]
a -> DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
s {$sel:phoneNumberErrors:DisassociatePhoneNumbersFromVoiceConnectorGroupResponse' :: Maybe [PhoneNumberError]
phoneNumberErrors = Maybe [PhoneNumberError]
a} :: DisassociatePhoneNumbersFromVoiceConnectorGroupResponse) ((Maybe [PhoneNumberError] -> f (Maybe [PhoneNumberError]))
 -> DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
 -> f DisassociatePhoneNumbersFromVoiceConnectorGroupResponse)
-> ((Maybe [PhoneNumberError] -> f (Maybe [PhoneNumberError]))
    -> Maybe [PhoneNumberError] -> f (Maybe [PhoneNumberError]))
-> (Maybe [PhoneNumberError] -> f (Maybe [PhoneNumberError]))
-> DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
-> f DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [PhoneNumberError]
  [PhoneNumberError]
  [PhoneNumberError]
  [PhoneNumberError]
-> Iso
     (Maybe [PhoneNumberError])
     (Maybe [PhoneNumberError])
     (Maybe [PhoneNumberError])
     (Maybe [PhoneNumberError])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [PhoneNumberError]
  [PhoneNumberError]
  [PhoneNumberError]
  [PhoneNumberError]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
disassociatePhoneNumbersFromVoiceConnectorGroupResponse_httpStatus :: Lens.Lens' DisassociatePhoneNumbersFromVoiceConnectorGroupResponse Prelude.Int
disassociatePhoneNumbersFromVoiceConnectorGroupResponse_httpStatus :: (Int -> f Int)
-> DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
-> f DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
disassociatePhoneNumbersFromVoiceConnectorGroupResponse_httpStatus = (DisassociatePhoneNumbersFromVoiceConnectorGroupResponse -> Int)
-> (DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
    -> Int -> DisassociatePhoneNumbersFromVoiceConnectorGroupResponse)
-> Lens
     DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
     DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociatePhoneNumbersFromVoiceConnectorGroupResponse' {Int
httpStatus :: Int
$sel:httpStatus:DisassociatePhoneNumbersFromVoiceConnectorGroupResponse' :: DisassociatePhoneNumbersFromVoiceConnectorGroupResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
s@DisassociatePhoneNumbersFromVoiceConnectorGroupResponse' {} Int
a -> DisassociatePhoneNumbersFromVoiceConnectorGroupResponse
s {$sel:httpStatus:DisassociatePhoneNumbersFromVoiceConnectorGroupResponse' :: Int
httpStatus = Int
a} :: DisassociatePhoneNumbersFromVoiceConnectorGroupResponse)

instance
  Prelude.NFData
    DisassociatePhoneNumbersFromVoiceConnectorGroupResponse