{-# 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.DeleteVoiceConnectorProxy
-- 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)
--
-- Deletes the proxy configuration from the specified Amazon Chime Voice
-- Connector.
module Amazonka.Chime.DeleteVoiceConnectorProxy
  ( -- * Creating a Request
    DeleteVoiceConnectorProxy (..),
    newDeleteVoiceConnectorProxy,

    -- * Request Lenses
    deleteVoiceConnectorProxy_voiceConnectorId,

    -- * Destructuring the Response
    DeleteVoiceConnectorProxyResponse (..),
    newDeleteVoiceConnectorProxyResponse,
  )
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:/ 'newDeleteVoiceConnectorProxy' smart constructor.
data DeleteVoiceConnectorProxy = DeleteVoiceConnectorProxy'
  { -- | The Amazon Chime Voice Connector ID.
    DeleteVoiceConnectorProxy -> Text
voiceConnectorId :: Prelude.Text
  }
  deriving (DeleteVoiceConnectorProxy -> DeleteVoiceConnectorProxy -> Bool
(DeleteVoiceConnectorProxy -> DeleteVoiceConnectorProxy -> Bool)
-> (DeleteVoiceConnectorProxy -> DeleteVoiceConnectorProxy -> Bool)
-> Eq DeleteVoiceConnectorProxy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteVoiceConnectorProxy -> DeleteVoiceConnectorProxy -> Bool
$c/= :: DeleteVoiceConnectorProxy -> DeleteVoiceConnectorProxy -> Bool
== :: DeleteVoiceConnectorProxy -> DeleteVoiceConnectorProxy -> Bool
$c== :: DeleteVoiceConnectorProxy -> DeleteVoiceConnectorProxy -> Bool
Prelude.Eq, ReadPrec [DeleteVoiceConnectorProxy]
ReadPrec DeleteVoiceConnectorProxy
Int -> ReadS DeleteVoiceConnectorProxy
ReadS [DeleteVoiceConnectorProxy]
(Int -> ReadS DeleteVoiceConnectorProxy)
-> ReadS [DeleteVoiceConnectorProxy]
-> ReadPrec DeleteVoiceConnectorProxy
-> ReadPrec [DeleteVoiceConnectorProxy]
-> Read DeleteVoiceConnectorProxy
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteVoiceConnectorProxy]
$creadListPrec :: ReadPrec [DeleteVoiceConnectorProxy]
readPrec :: ReadPrec DeleteVoiceConnectorProxy
$creadPrec :: ReadPrec DeleteVoiceConnectorProxy
readList :: ReadS [DeleteVoiceConnectorProxy]
$creadList :: ReadS [DeleteVoiceConnectorProxy]
readsPrec :: Int -> ReadS DeleteVoiceConnectorProxy
$creadsPrec :: Int -> ReadS DeleteVoiceConnectorProxy
Prelude.Read, Int -> DeleteVoiceConnectorProxy -> ShowS
[DeleteVoiceConnectorProxy] -> ShowS
DeleteVoiceConnectorProxy -> String
(Int -> DeleteVoiceConnectorProxy -> ShowS)
-> (DeleteVoiceConnectorProxy -> String)
-> ([DeleteVoiceConnectorProxy] -> ShowS)
-> Show DeleteVoiceConnectorProxy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteVoiceConnectorProxy] -> ShowS
$cshowList :: [DeleteVoiceConnectorProxy] -> ShowS
show :: DeleteVoiceConnectorProxy -> String
$cshow :: DeleteVoiceConnectorProxy -> String
showsPrec :: Int -> DeleteVoiceConnectorProxy -> ShowS
$cshowsPrec :: Int -> DeleteVoiceConnectorProxy -> ShowS
Prelude.Show, (forall x.
 DeleteVoiceConnectorProxy -> Rep DeleteVoiceConnectorProxy x)
-> (forall x.
    Rep DeleteVoiceConnectorProxy x -> DeleteVoiceConnectorProxy)
-> Generic DeleteVoiceConnectorProxy
forall x.
Rep DeleteVoiceConnectorProxy x -> DeleteVoiceConnectorProxy
forall x.
DeleteVoiceConnectorProxy -> Rep DeleteVoiceConnectorProxy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteVoiceConnectorProxy x -> DeleteVoiceConnectorProxy
$cfrom :: forall x.
DeleteVoiceConnectorProxy -> Rep DeleteVoiceConnectorProxy x
Prelude.Generic)

-- |
-- Create a value of 'DeleteVoiceConnectorProxy' 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:
--
-- 'voiceConnectorId', 'deleteVoiceConnectorProxy_voiceConnectorId' - The Amazon Chime Voice Connector ID.
newDeleteVoiceConnectorProxy ::
  -- | 'voiceConnectorId'
  Prelude.Text ->
  DeleteVoiceConnectorProxy
newDeleteVoiceConnectorProxy :: Text -> DeleteVoiceConnectorProxy
newDeleteVoiceConnectorProxy Text
pVoiceConnectorId_ =
  DeleteVoiceConnectorProxy' :: Text -> DeleteVoiceConnectorProxy
DeleteVoiceConnectorProxy'
    { $sel:voiceConnectorId:DeleteVoiceConnectorProxy' :: Text
voiceConnectorId =
        Text
pVoiceConnectorId_
    }

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

instance Core.AWSRequest DeleteVoiceConnectorProxy where
  type
    AWSResponse DeleteVoiceConnectorProxy =
      DeleteVoiceConnectorProxyResponse
  request :: DeleteVoiceConnectorProxy -> Request DeleteVoiceConnectorProxy
request = Service
-> DeleteVoiceConnectorProxy -> Request DeleteVoiceConnectorProxy
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
  response :: Logger
-> Service
-> Proxy DeleteVoiceConnectorProxy
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteVoiceConnectorProxy)))
response =
    AWSResponse DeleteVoiceConnectorProxy
-> Logger
-> Service
-> Proxy DeleteVoiceConnectorProxy
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteVoiceConnectorProxy)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
      AWSResponse DeleteVoiceConnectorProxy
DeleteVoiceConnectorProxyResponse
DeleteVoiceConnectorProxyResponse'

instance Prelude.Hashable DeleteVoiceConnectorProxy

instance Prelude.NFData DeleteVoiceConnectorProxy

instance Core.ToHeaders DeleteVoiceConnectorProxy where
  toHeaders :: DeleteVoiceConnectorProxy -> [Header]
toHeaders = [Header] -> DeleteVoiceConnectorProxy -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty

instance Core.ToPath DeleteVoiceConnectorProxy where
  toPath :: DeleteVoiceConnectorProxy -> ByteString
toPath DeleteVoiceConnectorProxy' {Text
voiceConnectorId :: Text
$sel:voiceConnectorId:DeleteVoiceConnectorProxy' :: DeleteVoiceConnectorProxy -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/voice-connectors/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
voiceConnectorId,
        ByteString
"/programmable-numbers/proxy"
      ]

instance Core.ToQuery DeleteVoiceConnectorProxy where
  toQuery :: DeleteVoiceConnectorProxy -> QueryString
toQuery = QueryString -> DeleteVoiceConnectorProxy -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newDeleteVoiceConnectorProxyResponse' smart constructor.
data DeleteVoiceConnectorProxyResponse = DeleteVoiceConnectorProxyResponse'
  {
  }
  deriving (DeleteVoiceConnectorProxyResponse
-> DeleteVoiceConnectorProxyResponse -> Bool
(DeleteVoiceConnectorProxyResponse
 -> DeleteVoiceConnectorProxyResponse -> Bool)
-> (DeleteVoiceConnectorProxyResponse
    -> DeleteVoiceConnectorProxyResponse -> Bool)
-> Eq DeleteVoiceConnectorProxyResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteVoiceConnectorProxyResponse
-> DeleteVoiceConnectorProxyResponse -> Bool
$c/= :: DeleteVoiceConnectorProxyResponse
-> DeleteVoiceConnectorProxyResponse -> Bool
== :: DeleteVoiceConnectorProxyResponse
-> DeleteVoiceConnectorProxyResponse -> Bool
$c== :: DeleteVoiceConnectorProxyResponse
-> DeleteVoiceConnectorProxyResponse -> Bool
Prelude.Eq, ReadPrec [DeleteVoiceConnectorProxyResponse]
ReadPrec DeleteVoiceConnectorProxyResponse
Int -> ReadS DeleteVoiceConnectorProxyResponse
ReadS [DeleteVoiceConnectorProxyResponse]
(Int -> ReadS DeleteVoiceConnectorProxyResponse)
-> ReadS [DeleteVoiceConnectorProxyResponse]
-> ReadPrec DeleteVoiceConnectorProxyResponse
-> ReadPrec [DeleteVoiceConnectorProxyResponse]
-> Read DeleteVoiceConnectorProxyResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteVoiceConnectorProxyResponse]
$creadListPrec :: ReadPrec [DeleteVoiceConnectorProxyResponse]
readPrec :: ReadPrec DeleteVoiceConnectorProxyResponse
$creadPrec :: ReadPrec DeleteVoiceConnectorProxyResponse
readList :: ReadS [DeleteVoiceConnectorProxyResponse]
$creadList :: ReadS [DeleteVoiceConnectorProxyResponse]
readsPrec :: Int -> ReadS DeleteVoiceConnectorProxyResponse
$creadsPrec :: Int -> ReadS DeleteVoiceConnectorProxyResponse
Prelude.Read, Int -> DeleteVoiceConnectorProxyResponse -> ShowS
[DeleteVoiceConnectorProxyResponse] -> ShowS
DeleteVoiceConnectorProxyResponse -> String
(Int -> DeleteVoiceConnectorProxyResponse -> ShowS)
-> (DeleteVoiceConnectorProxyResponse -> String)
-> ([DeleteVoiceConnectorProxyResponse] -> ShowS)
-> Show DeleteVoiceConnectorProxyResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteVoiceConnectorProxyResponse] -> ShowS
$cshowList :: [DeleteVoiceConnectorProxyResponse] -> ShowS
show :: DeleteVoiceConnectorProxyResponse -> String
$cshow :: DeleteVoiceConnectorProxyResponse -> String
showsPrec :: Int -> DeleteVoiceConnectorProxyResponse -> ShowS
$cshowsPrec :: Int -> DeleteVoiceConnectorProxyResponse -> ShowS
Prelude.Show, (forall x.
 DeleteVoiceConnectorProxyResponse
 -> Rep DeleteVoiceConnectorProxyResponse x)
-> (forall x.
    Rep DeleteVoiceConnectorProxyResponse x
    -> DeleteVoiceConnectorProxyResponse)
-> Generic DeleteVoiceConnectorProxyResponse
forall x.
Rep DeleteVoiceConnectorProxyResponse x
-> DeleteVoiceConnectorProxyResponse
forall x.
DeleteVoiceConnectorProxyResponse
-> Rep DeleteVoiceConnectorProxyResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteVoiceConnectorProxyResponse x
-> DeleteVoiceConnectorProxyResponse
$cfrom :: forall x.
DeleteVoiceConnectorProxyResponse
-> Rep DeleteVoiceConnectorProxyResponse x
Prelude.Generic)

-- |
-- Create a value of 'DeleteVoiceConnectorProxyResponse' 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.
newDeleteVoiceConnectorProxyResponse ::
  DeleteVoiceConnectorProxyResponse
newDeleteVoiceConnectorProxyResponse :: DeleteVoiceConnectorProxyResponse
newDeleteVoiceConnectorProxyResponse =
  DeleteVoiceConnectorProxyResponse
DeleteVoiceConnectorProxyResponse'

instance
  Prelude.NFData
    DeleteVoiceConnectorProxyResponse