{-# 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.DeleteVoiceConnectorStreamingConfiguration
-- 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 streaming configuration for the specified Amazon Chime Voice
-- Connector.
module Amazonka.Chime.DeleteVoiceConnectorStreamingConfiguration
  ( -- * Creating a Request
    DeleteVoiceConnectorStreamingConfiguration (..),
    newDeleteVoiceConnectorStreamingConfiguration,

    -- * Request Lenses
    deleteVoiceConnectorStreamingConfiguration_voiceConnectorId,

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

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

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

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

instance
  Prelude.Hashable
    DeleteVoiceConnectorStreamingConfiguration

instance
  Prelude.NFData
    DeleteVoiceConnectorStreamingConfiguration

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

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

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

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

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

instance
  Prelude.NFData
    DeleteVoiceConnectorStreamingConfigurationResponse