{-# 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.ChimeSdkMeetings.DeleteMeeting
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- 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.ChimeSdkMeetings.DeleteMeeting
  ( -- * Creating a Request
    DeleteMeeting (..),
    newDeleteMeeting,

    -- * Request Lenses
    deleteMeeting_meetingId,

    -- * Destructuring the Response
    DeleteMeetingResponse (..),
    newDeleteMeetingResponse,
  )
where

import Amazonka.ChimeSdkMeetings.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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. 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' {$sel:meetingId:DeleteMeeting' :: Text
meetingId = Text
pMeetingId_}

-- | The Amazon Chime SDK meeting ID.
deleteMeeting_meetingId :: Lens.Lens' DeleteMeeting Prelude.Text
deleteMeeting_meetingId :: Lens' DeleteMeeting Text
deleteMeeting_meetingId = 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 :: (Service -> Service) -> DeleteMeeting -> Request DeleteMeeting
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.delete (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteMeeting
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteMeeting)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull DeleteMeetingResponse
DeleteMeetingResponse'

instance Prelude.Hashable DeleteMeeting where
  hashWithSalt :: Int -> DeleteMeeting -> Int
hashWithSalt Int
_salt DeleteMeeting' {Text
meetingId :: Text
$sel:meetingId:DeleteMeeting' :: DeleteMeeting -> Text
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
meetingId

instance Prelude.NFData DeleteMeeting where
  rnf :: DeleteMeeting -> ()
rnf DeleteMeeting' {Text
meetingId :: Text
$sel:meetingId:DeleteMeeting' :: DeleteMeeting -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
meetingId

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

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

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

-- | /See:/ 'newDeleteMeetingResponse' smart constructor.
data DeleteMeetingResponse = DeleteMeetingResponse'
  {
  }
  deriving (DeleteMeetingResponse -> DeleteMeetingResponse -> Bool
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]
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
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. 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 where
  rnf :: DeleteMeetingResponse -> ()
rnf DeleteMeetingResponse
_ = ()