{-# 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 #-}
module Amazonka.Chime.StartMeetingTranscription
(
StartMeetingTranscription (..),
newStartMeetingTranscription,
startMeetingTranscription_meetingId,
startMeetingTranscription_transcriptionConfiguration,
StartMeetingTranscriptionResponse (..),
newStartMeetingTranscriptionResponse,
startMeetingTranscriptionResponse_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
data StartMeetingTranscription = StartMeetingTranscription'
{
StartMeetingTranscription -> Text
meetingId :: Prelude.Text,
StartMeetingTranscription -> TranscriptionConfiguration
transcriptionConfiguration :: TranscriptionConfiguration
}
deriving (StartMeetingTranscription -> StartMeetingTranscription -> Bool
(StartMeetingTranscription -> StartMeetingTranscription -> Bool)
-> (StartMeetingTranscription -> StartMeetingTranscription -> Bool)
-> Eq StartMeetingTranscription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartMeetingTranscription -> StartMeetingTranscription -> Bool
$c/= :: StartMeetingTranscription -> StartMeetingTranscription -> Bool
== :: StartMeetingTranscription -> StartMeetingTranscription -> Bool
$c== :: StartMeetingTranscription -> StartMeetingTranscription -> Bool
Prelude.Eq, ReadPrec [StartMeetingTranscription]
ReadPrec StartMeetingTranscription
Int -> ReadS StartMeetingTranscription
ReadS [StartMeetingTranscription]
(Int -> ReadS StartMeetingTranscription)
-> ReadS [StartMeetingTranscription]
-> ReadPrec StartMeetingTranscription
-> ReadPrec [StartMeetingTranscription]
-> Read StartMeetingTranscription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartMeetingTranscription]
$creadListPrec :: ReadPrec [StartMeetingTranscription]
readPrec :: ReadPrec StartMeetingTranscription
$creadPrec :: ReadPrec StartMeetingTranscription
readList :: ReadS [StartMeetingTranscription]
$creadList :: ReadS [StartMeetingTranscription]
readsPrec :: Int -> ReadS StartMeetingTranscription
$creadsPrec :: Int -> ReadS StartMeetingTranscription
Prelude.Read, Int -> StartMeetingTranscription -> ShowS
[StartMeetingTranscription] -> ShowS
StartMeetingTranscription -> String
(Int -> StartMeetingTranscription -> ShowS)
-> (StartMeetingTranscription -> String)
-> ([StartMeetingTranscription] -> ShowS)
-> Show StartMeetingTranscription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartMeetingTranscription] -> ShowS
$cshowList :: [StartMeetingTranscription] -> ShowS
show :: StartMeetingTranscription -> String
$cshow :: StartMeetingTranscription -> String
showsPrec :: Int -> StartMeetingTranscription -> ShowS
$cshowsPrec :: Int -> StartMeetingTranscription -> ShowS
Prelude.Show, (forall x.
StartMeetingTranscription -> Rep StartMeetingTranscription x)
-> (forall x.
Rep StartMeetingTranscription x -> StartMeetingTranscription)
-> Generic StartMeetingTranscription
forall x.
Rep StartMeetingTranscription x -> StartMeetingTranscription
forall x.
StartMeetingTranscription -> Rep StartMeetingTranscription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartMeetingTranscription x -> StartMeetingTranscription
$cfrom :: forall x.
StartMeetingTranscription -> Rep StartMeetingTranscription x
Prelude.Generic)
newStartMeetingTranscription ::
Prelude.Text ->
TranscriptionConfiguration ->
StartMeetingTranscription
newStartMeetingTranscription :: Text -> TranscriptionConfiguration -> StartMeetingTranscription
newStartMeetingTranscription
Text
pMeetingId_
TranscriptionConfiguration
pTranscriptionConfiguration_ =
StartMeetingTranscription' :: Text -> TranscriptionConfiguration -> StartMeetingTranscription
StartMeetingTranscription'
{ $sel:meetingId:StartMeetingTranscription' :: Text
meetingId = Text
pMeetingId_,
$sel:transcriptionConfiguration:StartMeetingTranscription' :: TranscriptionConfiguration
transcriptionConfiguration =
TranscriptionConfiguration
pTranscriptionConfiguration_
}
startMeetingTranscription_meetingId :: Lens.Lens' StartMeetingTranscription Prelude.Text
startMeetingTranscription_meetingId :: (Text -> f Text)
-> StartMeetingTranscription -> f StartMeetingTranscription
startMeetingTranscription_meetingId = (StartMeetingTranscription -> Text)
-> (StartMeetingTranscription -> Text -> StartMeetingTranscription)
-> Lens
StartMeetingTranscription StartMeetingTranscription Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartMeetingTranscription' {Text
meetingId :: Text
$sel:meetingId:StartMeetingTranscription' :: StartMeetingTranscription -> Text
meetingId} -> Text
meetingId) (\s :: StartMeetingTranscription
s@StartMeetingTranscription' {} Text
a -> StartMeetingTranscription
s {$sel:meetingId:StartMeetingTranscription' :: Text
meetingId = Text
a} :: StartMeetingTranscription)
startMeetingTranscription_transcriptionConfiguration :: Lens.Lens' StartMeetingTranscription TranscriptionConfiguration
startMeetingTranscription_transcriptionConfiguration :: (TranscriptionConfiguration -> f TranscriptionConfiguration)
-> StartMeetingTranscription -> f StartMeetingTranscription
startMeetingTranscription_transcriptionConfiguration = (StartMeetingTranscription -> TranscriptionConfiguration)
-> (StartMeetingTranscription
-> TranscriptionConfiguration -> StartMeetingTranscription)
-> Lens
StartMeetingTranscription
StartMeetingTranscription
TranscriptionConfiguration
TranscriptionConfiguration
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartMeetingTranscription' {TranscriptionConfiguration
transcriptionConfiguration :: TranscriptionConfiguration
$sel:transcriptionConfiguration:StartMeetingTranscription' :: StartMeetingTranscription -> TranscriptionConfiguration
transcriptionConfiguration} -> TranscriptionConfiguration
transcriptionConfiguration) (\s :: StartMeetingTranscription
s@StartMeetingTranscription' {} TranscriptionConfiguration
a -> StartMeetingTranscription
s {$sel:transcriptionConfiguration:StartMeetingTranscription' :: TranscriptionConfiguration
transcriptionConfiguration = TranscriptionConfiguration
a} :: StartMeetingTranscription)
instance Core.AWSRequest StartMeetingTranscription where
type
AWSResponse StartMeetingTranscription =
StartMeetingTranscriptionResponse
request :: StartMeetingTranscription -> Request StartMeetingTranscription
request = Service
-> StartMeetingTranscription -> Request StartMeetingTranscription
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy StartMeetingTranscription
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StartMeetingTranscription)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse StartMeetingTranscription))
-> Logger
-> Service
-> Proxy StartMeetingTranscription
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StartMeetingTranscription)))
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 -> StartMeetingTranscriptionResponse
StartMeetingTranscriptionResponse'
(Int -> StartMeetingTranscriptionResponse)
-> Either String Int
-> Either String StartMeetingTranscriptionResponse
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 StartMeetingTranscription
instance Prelude.NFData StartMeetingTranscription
instance Core.ToHeaders StartMeetingTranscription where
toHeaders :: StartMeetingTranscription -> ResponseHeaders
toHeaders = ResponseHeaders -> StartMeetingTranscription -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToJSON StartMeetingTranscription where
toJSON :: StartMeetingTranscription -> Value
toJSON StartMeetingTranscription' {Text
TranscriptionConfiguration
transcriptionConfiguration :: TranscriptionConfiguration
meetingId :: Text
$sel:transcriptionConfiguration:StartMeetingTranscription' :: StartMeetingTranscription -> TranscriptionConfiguration
$sel:meetingId:StartMeetingTranscription' :: StartMeetingTranscription -> 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
"TranscriptionConfiguration"
Text -> TranscriptionConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= TranscriptionConfiguration
transcriptionConfiguration
)
]
)
instance Core.ToPath StartMeetingTranscription where
toPath :: StartMeetingTranscription -> ByteString
toPath StartMeetingTranscription' {Text
TranscriptionConfiguration
transcriptionConfiguration :: TranscriptionConfiguration
meetingId :: Text
$sel:transcriptionConfiguration:StartMeetingTranscription' :: StartMeetingTranscription -> TranscriptionConfiguration
$sel:meetingId:StartMeetingTranscription' :: StartMeetingTranscription -> 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 StartMeetingTranscription where
toQuery :: StartMeetingTranscription -> QueryString
toQuery =
QueryString -> StartMeetingTranscription -> QueryString
forall a b. a -> b -> a
Prelude.const ([QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat [QueryString
"operation=start"])
data StartMeetingTranscriptionResponse = StartMeetingTranscriptionResponse'
{
StartMeetingTranscriptionResponse -> Int
httpStatus :: Prelude.Int
}
deriving (StartMeetingTranscriptionResponse
-> StartMeetingTranscriptionResponse -> Bool
(StartMeetingTranscriptionResponse
-> StartMeetingTranscriptionResponse -> Bool)
-> (StartMeetingTranscriptionResponse
-> StartMeetingTranscriptionResponse -> Bool)
-> Eq StartMeetingTranscriptionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartMeetingTranscriptionResponse
-> StartMeetingTranscriptionResponse -> Bool
$c/= :: StartMeetingTranscriptionResponse
-> StartMeetingTranscriptionResponse -> Bool
== :: StartMeetingTranscriptionResponse
-> StartMeetingTranscriptionResponse -> Bool
$c== :: StartMeetingTranscriptionResponse
-> StartMeetingTranscriptionResponse -> Bool
Prelude.Eq, ReadPrec [StartMeetingTranscriptionResponse]
ReadPrec StartMeetingTranscriptionResponse
Int -> ReadS StartMeetingTranscriptionResponse
ReadS [StartMeetingTranscriptionResponse]
(Int -> ReadS StartMeetingTranscriptionResponse)
-> ReadS [StartMeetingTranscriptionResponse]
-> ReadPrec StartMeetingTranscriptionResponse
-> ReadPrec [StartMeetingTranscriptionResponse]
-> Read StartMeetingTranscriptionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartMeetingTranscriptionResponse]
$creadListPrec :: ReadPrec [StartMeetingTranscriptionResponse]
readPrec :: ReadPrec StartMeetingTranscriptionResponse
$creadPrec :: ReadPrec StartMeetingTranscriptionResponse
readList :: ReadS [StartMeetingTranscriptionResponse]
$creadList :: ReadS [StartMeetingTranscriptionResponse]
readsPrec :: Int -> ReadS StartMeetingTranscriptionResponse
$creadsPrec :: Int -> ReadS StartMeetingTranscriptionResponse
Prelude.Read, Int -> StartMeetingTranscriptionResponse -> ShowS
[StartMeetingTranscriptionResponse] -> ShowS
StartMeetingTranscriptionResponse -> String
(Int -> StartMeetingTranscriptionResponse -> ShowS)
-> (StartMeetingTranscriptionResponse -> String)
-> ([StartMeetingTranscriptionResponse] -> ShowS)
-> Show StartMeetingTranscriptionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartMeetingTranscriptionResponse] -> ShowS
$cshowList :: [StartMeetingTranscriptionResponse] -> ShowS
show :: StartMeetingTranscriptionResponse -> String
$cshow :: StartMeetingTranscriptionResponse -> String
showsPrec :: Int -> StartMeetingTranscriptionResponse -> ShowS
$cshowsPrec :: Int -> StartMeetingTranscriptionResponse -> ShowS
Prelude.Show, (forall x.
StartMeetingTranscriptionResponse
-> Rep StartMeetingTranscriptionResponse x)
-> (forall x.
Rep StartMeetingTranscriptionResponse x
-> StartMeetingTranscriptionResponse)
-> Generic StartMeetingTranscriptionResponse
forall x.
Rep StartMeetingTranscriptionResponse x
-> StartMeetingTranscriptionResponse
forall x.
StartMeetingTranscriptionResponse
-> Rep StartMeetingTranscriptionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartMeetingTranscriptionResponse x
-> StartMeetingTranscriptionResponse
$cfrom :: forall x.
StartMeetingTranscriptionResponse
-> Rep StartMeetingTranscriptionResponse x
Prelude.Generic)
newStartMeetingTranscriptionResponse ::
Prelude.Int ->
StartMeetingTranscriptionResponse
newStartMeetingTranscriptionResponse :: Int -> StartMeetingTranscriptionResponse
newStartMeetingTranscriptionResponse Int
pHttpStatus_ =
StartMeetingTranscriptionResponse' :: Int -> StartMeetingTranscriptionResponse
StartMeetingTranscriptionResponse'
{ $sel:httpStatus:StartMeetingTranscriptionResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
startMeetingTranscriptionResponse_httpStatus :: Lens.Lens' StartMeetingTranscriptionResponse Prelude.Int
startMeetingTranscriptionResponse_httpStatus :: (Int -> f Int)
-> StartMeetingTranscriptionResponse
-> f StartMeetingTranscriptionResponse
startMeetingTranscriptionResponse_httpStatus = (StartMeetingTranscriptionResponse -> Int)
-> (StartMeetingTranscriptionResponse
-> Int -> StartMeetingTranscriptionResponse)
-> Lens
StartMeetingTranscriptionResponse
StartMeetingTranscriptionResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartMeetingTranscriptionResponse' {Int
httpStatus :: Int
$sel:httpStatus:StartMeetingTranscriptionResponse' :: StartMeetingTranscriptionResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: StartMeetingTranscriptionResponse
s@StartMeetingTranscriptionResponse' {} Int
a -> StartMeetingTranscriptionResponse
s {$sel:httpStatus:StartMeetingTranscriptionResponse' :: Int
httpStatus = Int
a} :: StartMeetingTranscriptionResponse)
instance
Prelude.NFData
StartMeetingTranscriptionResponse