{-# 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.DeleteVoiceConnectorEmergencyCallingConfiguration
-- 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 emergency calling configuration details from the specified
-- Amazon Chime Voice Connector.
module Amazonka.Chime.DeleteVoiceConnectorEmergencyCallingConfiguration
  ( -- * Creating a Request
    DeleteVoiceConnectorEmergencyCallingConfiguration (..),
    newDeleteVoiceConnectorEmergencyCallingConfiguration,

    -- * Request Lenses
    deleteVoiceConnectorEmergencyCallingConfiguration_voiceConnectorId,

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

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

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

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

instance
  Prelude.Hashable
    DeleteVoiceConnectorEmergencyCallingConfiguration

instance
  Prelude.NFData
    DeleteVoiceConnectorEmergencyCallingConfiguration

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

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

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

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

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

instance
  Prelude.NFData
    DeleteVoiceConnectorEmergencyCallingConfigurationResponse