{-# 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-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)
--
-- 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.Lens as Lens
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
(StopMeetingTranscription -> StopMeetingTranscription -> Bool)
-> (StopMeetingTranscription -> StopMeetingTranscription -> Bool)
-> Eq StopMeetingTranscription
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]
(Int -> ReadS StopMeetingTranscription)
-> ReadS [StopMeetingTranscription]
-> ReadPrec StopMeetingTranscription
-> ReadPrec [StopMeetingTranscription]
-> Read 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
(Int -> StopMeetingTranscription -> ShowS)
-> (StopMeetingTranscription -> String)
-> ([StopMeetingTranscription] -> ShowS)
-> Show StopMeetingTranscription
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.
 StopMeetingTranscription -> Rep StopMeetingTranscription x)
-> (forall x.
    Rep StopMeetingTranscription x -> StopMeetingTranscription)
-> Generic StopMeetingTranscription
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' :: Text -> StopMeetingTranscription
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 :: (Text -> f Text)
-> StopMeetingTranscription -> f StopMeetingTranscription
stopMeetingTranscription_meetingId = (StopMeetingTranscription -> Text)
-> (StopMeetingTranscription -> Text -> StopMeetingTranscription)
-> Lens StopMeetingTranscription StopMeetingTranscription Text Text
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 :: StopMeetingTranscription -> Request StopMeetingTranscription
request = Service
-> StopMeetingTranscription -> Request StopMeetingTranscription
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy StopMeetingTranscription
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse StopMeetingTranscription)))
response =
    (Int
 -> ResponseHeaders
 -> ()
 -> Either String (AWSResponse StopMeetingTranscription))
-> Logger
-> Service
-> Proxy StopMeetingTranscription
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse StopMeetingTranscription)))
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 -> StopMeetingTranscriptionResponse
StopMeetingTranscriptionResponse'
            (Int -> StopMeetingTranscriptionResponse)
-> Either String Int
-> Either String StopMeetingTranscriptionResponse
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 StopMeetingTranscription

instance Prelude.NFData StopMeetingTranscription

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

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

instance Core.ToPath StopMeetingTranscription where
  toPath :: StopMeetingTranscription -> ByteString
toPath StopMeetingTranscription' {Text
meetingId :: Text
$sel:meetingId:StopMeetingTranscription' :: StopMeetingTranscription -> 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, ByteString
"/transcription"]

instance Core.ToQuery StopMeetingTranscription where
  toQuery :: StopMeetingTranscription -> QueryString
toQuery =
    QueryString -> StopMeetingTranscription -> QueryString
forall a b. a -> b -> a
Prelude.const ([QueryString] -> QueryString
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
(StopMeetingTranscriptionResponse
 -> StopMeetingTranscriptionResponse -> Bool)
-> (StopMeetingTranscriptionResponse
    -> StopMeetingTranscriptionResponse -> Bool)
-> Eq StopMeetingTranscriptionResponse
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]
(Int -> ReadS StopMeetingTranscriptionResponse)
-> ReadS [StopMeetingTranscriptionResponse]
-> ReadPrec StopMeetingTranscriptionResponse
-> ReadPrec [StopMeetingTranscriptionResponse]
-> Read 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
(Int -> StopMeetingTranscriptionResponse -> ShowS)
-> (StopMeetingTranscriptionResponse -> String)
-> ([StopMeetingTranscriptionResponse] -> ShowS)
-> Show StopMeetingTranscriptionResponse
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.
 StopMeetingTranscriptionResponse
 -> Rep StopMeetingTranscriptionResponse x)
-> (forall x.
    Rep StopMeetingTranscriptionResponse x
    -> StopMeetingTranscriptionResponse)
-> Generic StopMeetingTranscriptionResponse
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' :: Int -> StopMeetingTranscriptionResponse
StopMeetingTranscriptionResponse'
    { $sel:httpStatus:StopMeetingTranscriptionResponse' :: Int
httpStatus =
        Int
pHttpStatus_
    }

-- | The response's http status code.
stopMeetingTranscriptionResponse_httpStatus :: Lens.Lens' StopMeetingTranscriptionResponse Prelude.Int
stopMeetingTranscriptionResponse_httpStatus :: (Int -> f Int)
-> StopMeetingTranscriptionResponse
-> f StopMeetingTranscriptionResponse
stopMeetingTranscriptionResponse_httpStatus = (StopMeetingTranscriptionResponse -> Int)
-> (StopMeetingTranscriptionResponse
    -> Int -> StopMeetingTranscriptionResponse)
-> Lens
     StopMeetingTranscriptionResponse
     StopMeetingTranscriptionResponse
     Int
     Int
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