{-# 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.DeleteVoiceConnectorTermination
-- 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 termination settings for the specified Amazon Chime Voice
-- Connector.
--
-- If emergency calling is configured for the Amazon Chime Voice Connector,
-- it must be deleted prior to deleting the termination settings.
module Amazonka.Chime.DeleteVoiceConnectorTermination
  ( -- * Creating a Request
    DeleteVoiceConnectorTermination (..),
    newDeleteVoiceConnectorTermination,

    -- * Request Lenses
    deleteVoiceConnectorTermination_voiceConnectorId,

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

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

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

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

instance
  Prelude.Hashable
    DeleteVoiceConnectorTermination

instance
  Prelude.NFData
    DeleteVoiceConnectorTermination

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

instance Core.ToPath DeleteVoiceConnectorTermination where
  toPath :: DeleteVoiceConnectorTermination -> ByteString
toPath DeleteVoiceConnectorTermination' {Text
voiceConnectorId :: Text
$sel:voiceConnectorId:DeleteVoiceConnectorTermination' :: DeleteVoiceConnectorTermination -> 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
"/termination"
      ]

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

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

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

instance
  Prelude.NFData
    DeleteVoiceConnectorTerminationResponse