{-# 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.AlexaBusiness.DeleteConferenceProvider
-- 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 a conference provider.
module Amazonka.AlexaBusiness.DeleteConferenceProvider
  ( -- * Creating a Request
    DeleteConferenceProvider (..),
    newDeleteConferenceProvider,

    -- * Request Lenses
    deleteConferenceProvider_conferenceProviderArn,

    -- * Destructuring the Response
    DeleteConferenceProviderResponse (..),
    newDeleteConferenceProviderResponse,

    -- * Response Lenses
    deleteConferenceProviderResponse_httpStatus,
  )
where

import Amazonka.AlexaBusiness.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:/ 'newDeleteConferenceProvider' smart constructor.
data DeleteConferenceProvider = DeleteConferenceProvider'
  { -- | The ARN of the conference provider.
    DeleteConferenceProvider -> Text
conferenceProviderArn :: Prelude.Text
  }
  deriving (DeleteConferenceProvider -> DeleteConferenceProvider -> Bool
(DeleteConferenceProvider -> DeleteConferenceProvider -> Bool)
-> (DeleteConferenceProvider -> DeleteConferenceProvider -> Bool)
-> Eq DeleteConferenceProvider
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteConferenceProvider -> DeleteConferenceProvider -> Bool
$c/= :: DeleteConferenceProvider -> DeleteConferenceProvider -> Bool
== :: DeleteConferenceProvider -> DeleteConferenceProvider -> Bool
$c== :: DeleteConferenceProvider -> DeleteConferenceProvider -> Bool
Prelude.Eq, ReadPrec [DeleteConferenceProvider]
ReadPrec DeleteConferenceProvider
Int -> ReadS DeleteConferenceProvider
ReadS [DeleteConferenceProvider]
(Int -> ReadS DeleteConferenceProvider)
-> ReadS [DeleteConferenceProvider]
-> ReadPrec DeleteConferenceProvider
-> ReadPrec [DeleteConferenceProvider]
-> Read DeleteConferenceProvider
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteConferenceProvider]
$creadListPrec :: ReadPrec [DeleteConferenceProvider]
readPrec :: ReadPrec DeleteConferenceProvider
$creadPrec :: ReadPrec DeleteConferenceProvider
readList :: ReadS [DeleteConferenceProvider]
$creadList :: ReadS [DeleteConferenceProvider]
readsPrec :: Int -> ReadS DeleteConferenceProvider
$creadsPrec :: Int -> ReadS DeleteConferenceProvider
Prelude.Read, Int -> DeleteConferenceProvider -> ShowS
[DeleteConferenceProvider] -> ShowS
DeleteConferenceProvider -> String
(Int -> DeleteConferenceProvider -> ShowS)
-> (DeleteConferenceProvider -> String)
-> ([DeleteConferenceProvider] -> ShowS)
-> Show DeleteConferenceProvider
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteConferenceProvider] -> ShowS
$cshowList :: [DeleteConferenceProvider] -> ShowS
show :: DeleteConferenceProvider -> String
$cshow :: DeleteConferenceProvider -> String
showsPrec :: Int -> DeleteConferenceProvider -> ShowS
$cshowsPrec :: Int -> DeleteConferenceProvider -> ShowS
Prelude.Show, (forall x.
 DeleteConferenceProvider -> Rep DeleteConferenceProvider x)
-> (forall x.
    Rep DeleteConferenceProvider x -> DeleteConferenceProvider)
-> Generic DeleteConferenceProvider
forall x.
Rep DeleteConferenceProvider x -> DeleteConferenceProvider
forall x.
DeleteConferenceProvider -> Rep DeleteConferenceProvider x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteConferenceProvider x -> DeleteConferenceProvider
$cfrom :: forall x.
DeleteConferenceProvider -> Rep DeleteConferenceProvider x
Prelude.Generic)

-- |
-- Create a value of 'DeleteConferenceProvider' 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:
--
-- 'conferenceProviderArn', 'deleteConferenceProvider_conferenceProviderArn' - The ARN of the conference provider.
newDeleteConferenceProvider ::
  -- | 'conferenceProviderArn'
  Prelude.Text ->
  DeleteConferenceProvider
newDeleteConferenceProvider :: Text -> DeleteConferenceProvider
newDeleteConferenceProvider Text
pConferenceProviderArn_ =
  DeleteConferenceProvider' :: Text -> DeleteConferenceProvider
DeleteConferenceProvider'
    { $sel:conferenceProviderArn:DeleteConferenceProvider' :: Text
conferenceProviderArn =
        Text
pConferenceProviderArn_
    }

-- | The ARN of the conference provider.
deleteConferenceProvider_conferenceProviderArn :: Lens.Lens' DeleteConferenceProvider Prelude.Text
deleteConferenceProvider_conferenceProviderArn :: (Text -> f Text)
-> DeleteConferenceProvider -> f DeleteConferenceProvider
deleteConferenceProvider_conferenceProviderArn = (DeleteConferenceProvider -> Text)
-> (DeleteConferenceProvider -> Text -> DeleteConferenceProvider)
-> Lens DeleteConferenceProvider DeleteConferenceProvider Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteConferenceProvider' {Text
conferenceProviderArn :: Text
$sel:conferenceProviderArn:DeleteConferenceProvider' :: DeleteConferenceProvider -> Text
conferenceProviderArn} -> Text
conferenceProviderArn) (\s :: DeleteConferenceProvider
s@DeleteConferenceProvider' {} Text
a -> DeleteConferenceProvider
s {$sel:conferenceProviderArn:DeleteConferenceProvider' :: Text
conferenceProviderArn = Text
a} :: DeleteConferenceProvider)

instance Core.AWSRequest DeleteConferenceProvider where
  type
    AWSResponse DeleteConferenceProvider =
      DeleteConferenceProviderResponse
  request :: DeleteConferenceProvider -> Request DeleteConferenceProvider
request = Service
-> DeleteConferenceProvider -> Request DeleteConferenceProvider
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DeleteConferenceProvider
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteConferenceProvider)))
response =
    (Int
 -> ResponseHeaders
 -> ()
 -> Either String (AWSResponse DeleteConferenceProvider))
-> Logger
-> Service
-> Proxy DeleteConferenceProvider
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteConferenceProvider)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Int -> DeleteConferenceProviderResponse
DeleteConferenceProviderResponse'
            (Int -> DeleteConferenceProviderResponse)
-> Either String Int
-> Either String DeleteConferenceProviderResponse
forall (f :: * -> *) a b. Functor 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 DeleteConferenceProvider

instance Prelude.NFData DeleteConferenceProvider

instance Core.ToHeaders DeleteConferenceProvider where
  toHeaders :: DeleteConferenceProvider -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DeleteConferenceProvider -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AlexaForBusiness.DeleteConferenceProvider" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON DeleteConferenceProvider where
  toJSON :: DeleteConferenceProvider -> Value
toJSON DeleteConferenceProvider' {Text
conferenceProviderArn :: Text
$sel:conferenceProviderArn:DeleteConferenceProvider' :: DeleteConferenceProvider -> 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
"ConferenceProviderArn"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
conferenceProviderArn
              )
          ]
      )

instance Core.ToPath DeleteConferenceProvider where
  toPath :: DeleteConferenceProvider -> ByteString
toPath = ByteString -> DeleteConferenceProvider -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

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

-- |
-- Create a value of 'DeleteConferenceProviderResponse' 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:
--
-- 'httpStatus', 'deleteConferenceProviderResponse_httpStatus' - The response's http status code.
newDeleteConferenceProviderResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DeleteConferenceProviderResponse
newDeleteConferenceProviderResponse :: Int -> DeleteConferenceProviderResponse
newDeleteConferenceProviderResponse Int
pHttpStatus_ =
  DeleteConferenceProviderResponse' :: Int -> DeleteConferenceProviderResponse
DeleteConferenceProviderResponse'
    { $sel:httpStatus:DeleteConferenceProviderResponse' :: Int
httpStatus =
        Int
pHttpStatus_
    }

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

instance
  Prelude.NFData
    DeleteConferenceProviderResponse