{-# 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.DeleteMeeting
-- 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 specified Amazon Chime SDK meeting. The operation deletes
-- all attendees, disconnects all clients, and prevents new clients from
-- joining the meeting. For more information about the Amazon Chime SDK,
-- see
-- <https://docs.aws.amazon.com/chime/latest/dg/meetings-sdk.html Using the Amazon Chime SDK>
-- in the /Amazon Chime Developer Guide/.
module Amazonka.Chime.DeleteMeeting
  ( -- * Creating a Request
    DeleteMeeting (..),
    newDeleteMeeting,

    -- * Request Lenses
    deleteMeeting_meetingId,

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

-- |
-- Create a value of 'DeleteMeeting' 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:
--
-- 'meetingId', 'deleteMeeting_meetingId' - The Amazon Chime SDK meeting ID.
newDeleteMeeting ::
  -- | 'meetingId'
  Prelude.Text ->
  DeleteMeeting
newDeleteMeeting :: Text -> DeleteMeeting
newDeleteMeeting Text
pMeetingId_ =
  DeleteMeeting' :: Text -> DeleteMeeting
DeleteMeeting' {$sel:meetingId:DeleteMeeting' :: Text
meetingId = Text
pMeetingId_}

-- | The Amazon Chime SDK meeting ID.
deleteMeeting_meetingId :: Lens.Lens' DeleteMeeting Prelude.Text
deleteMeeting_meetingId :: (Text -> f Text) -> DeleteMeeting -> f DeleteMeeting
deleteMeeting_meetingId = (DeleteMeeting -> Text)
-> (DeleteMeeting -> Text -> DeleteMeeting)
-> Lens DeleteMeeting DeleteMeeting Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteMeeting' {Text
meetingId :: Text
$sel:meetingId:DeleteMeeting' :: DeleteMeeting -> Text
meetingId} -> Text
meetingId) (\s :: DeleteMeeting
s@DeleteMeeting' {} Text
a -> DeleteMeeting
s {$sel:meetingId:DeleteMeeting' :: Text
meetingId = Text
a} :: DeleteMeeting)

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

instance Prelude.Hashable DeleteMeeting

instance Prelude.NFData DeleteMeeting

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

instance Core.ToPath DeleteMeeting where
  toPath :: DeleteMeeting -> ByteString
toPath DeleteMeeting' {Text
meetingId :: Text
$sel:meetingId:DeleteMeeting' :: DeleteMeeting -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"/meetings/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
meetingId]

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

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

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

instance Prelude.NFData DeleteMeetingResponse