{-# 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.StopMeetingTranscription
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Stops transcription for the specified @meetingId@.
module Amazonka.Chime.StopMeetingTranscription
  ( -- * Creating a Request
    StopMeetingTranscription (..),
    newStopMeetingTranscription,

    -- * Request Lenses
    stopMeetingTranscription_meetingId,

    -- * Destructuring the Response
    StopMeetingTranscriptionResponse (..),
    newStopMeetingTranscriptionResponse,

    -- * Response Lenses
    stopMeetingTranscriptionResponse_httpStatus,
  )
where

import Amazonka.Chime.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:/ 'newStopMeetingTranscription' smart constructor.
data StopMeetingTranscription = StopMeetingTranscription'
  { -- | The unique ID of the meeting for which you stop transcription.
    StopMeetingTranscription -> Text
meetingId :: Prelude.Text
  }
  deriving (StopMeetingTranscription -> StopMeetingTranscription -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StopMeetingTranscription -> StopMeetingTranscription -> Bool
$c/= :: StopMeetingTranscription -> StopMeetingTranscription -> Bool
== :: StopMeetingTranscription -> StopMeetingTranscription -> Bool
$c== :: StopMeetingTranscription -> StopMeetingTranscription -> Bool
Prelude.Eq, ReadPrec [StopMeetingTranscription]
ReadPrec StopMeetingTranscription
Int -> ReadS StopMeetingTranscription
ReadS [StopMeetingTranscription]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StopMeetingTranscription]
$creadListPrec :: ReadPrec [StopMeetingTranscription]
readPrec :: ReadPrec StopMeetingTranscription
$creadPrec :: ReadPrec StopMeetingTranscription
readList :: ReadS [StopMeetingTranscription]
$creadList :: ReadS [StopMeetingTranscription]
readsPrec :: Int -> ReadS StopMeetingTranscription
$creadsPrec :: Int -> ReadS StopMeetingTranscription
Prelude.Read, Int -> StopMeetingTranscription -> ShowS
[StopMeetingTranscription] -> ShowS
StopMeetingTranscription -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StopMeetingTranscription] -> ShowS
$cshowList :: [StopMeetingTranscription] -> ShowS
show :: StopMeetingTranscription -> String
$cshow :: StopMeetingTranscription -> String
showsPrec :: Int -> StopMeetingTranscription -> ShowS
$cshowsPrec :: Int -> StopMeetingTranscription -> ShowS
Prelude.Show, forall x.
Rep StopMeetingTranscription x -> StopMeetingTranscription
forall x.
StopMeetingTranscription -> Rep StopMeetingTranscription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StopMeetingTranscription x -> StopMeetingTranscription
$cfrom :: forall x.
StopMeetingTranscription -> Rep StopMeetingTranscription x
Prelude.Generic)

-- |
-- Create a value of 'StopMeetingTranscription' 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', 'stopMeetingTranscription_meetingId' - The unique ID of the meeting for which you stop transcription.
newStopMeetingTranscription ::
  -- | 'meetingId'
  Prelude.Text ->
  StopMeetingTranscription
newStopMeetingTranscription :: Text -> StopMeetingTranscription
newStopMeetingTranscription Text
pMeetingId_ =
  StopMeetingTranscription' {$sel:meetingId:StopMeetingTranscription' :: Text
meetingId = Text
pMeetingId_}

-- | The unique ID of the meeting for which you stop transcription.
stopMeetingTranscription_meetingId :: Lens.Lens' StopMeetingTranscription Prelude.Text
stopMeetingTranscription_meetingId :: Lens' StopMeetingTranscription Text
stopMeetingTranscription_meetingId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StopMeetingTranscription' {Text
meetingId :: Text
$sel:meetingId:StopMeetingTranscription' :: StopMeetingTranscription -> Text
meetingId} -> Text
meetingId) (\s :: StopMeetingTranscription
s@StopMeetingTranscription' {} Text
a -> StopMeetingTranscription
s {$sel:meetingId:StopMeetingTranscription' :: Text
meetingId = Text
a} :: StopMeetingTranscription)

instance Core.AWSRequest StopMeetingTranscription where
  type
    AWSResponse StopMeetingTranscription =
      StopMeetingTranscriptionResponse
  request :: (Service -> Service)
-> StopMeetingTranscription -> Request StopMeetingTranscription
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy StopMeetingTranscription
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse StopMeetingTranscription)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Int -> StopMeetingTranscriptionResponse
StopMeetingTranscriptionResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

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

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

instance Data.ToHeaders StopMeetingTranscription where
  toHeaders :: StopMeetingTranscription -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

instance Data.ToJSON StopMeetingTranscription where
  toJSON :: StopMeetingTranscription -> Value
toJSON = forall a b. a -> b -> a
Prelude.const (Object -> Value
Data.Object forall a. Monoid a => a
Prelude.mempty)

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

instance Data.ToQuery StopMeetingTranscription where
  toQuery :: StopMeetingTranscription -> QueryString
toQuery =
    forall a b. a -> b -> a
Prelude.const (forall a. Monoid a => [a] -> a
Prelude.mconcat [QueryString
"operation=stop"])

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

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

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

instance
  Prelude.NFData
    StopMeetingTranscriptionResponse
  where
  rnf :: StopMeetingTranscriptionResponse -> ()
rnf StopMeetingTranscriptionResponse' {Int
httpStatus :: Int
$sel:httpStatus:StopMeetingTranscriptionResponse' :: StopMeetingTranscriptionResponse -> Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus