{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Resource.Speech.Speech.Longrunningrecognize
(
SpeechLongrunningrecognizeResource
, speechLongrunningrecognize
, SpeechLongrunningrecognize
, slXgafv
, slUploadProtocol
, slAccessToken
, slUploadType
, slPayload
, slCallback
) where
import Network.Google.Prelude
import Network.Google.Speech.Types
type SpeechLongrunningrecognizeResource =
"v1p1beta1" :>
"speech:longrunningrecognize" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] LongRunningRecognizeRequest :>
Post '[JSON] Operation
data SpeechLongrunningrecognize = SpeechLongrunningrecognize'
{ _slXgafv :: !(Maybe Xgafv)
, _slUploadProtocol :: !(Maybe Text)
, _slAccessToken :: !(Maybe Text)
, _slUploadType :: !(Maybe Text)
, _slPayload :: !LongRunningRecognizeRequest
, _slCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
speechLongrunningrecognize
:: LongRunningRecognizeRequest
-> SpeechLongrunningrecognize
speechLongrunningrecognize pSlPayload_ =
SpeechLongrunningrecognize'
{ _slXgafv = Nothing
, _slUploadProtocol = Nothing
, _slAccessToken = Nothing
, _slUploadType = Nothing
, _slPayload = pSlPayload_
, _slCallback = Nothing
}
slXgafv :: Lens' SpeechLongrunningrecognize (Maybe Xgafv)
slXgafv = lens _slXgafv (\ s a -> s{_slXgafv = a})
slUploadProtocol :: Lens' SpeechLongrunningrecognize (Maybe Text)
slUploadProtocol
= lens _slUploadProtocol
(\ s a -> s{_slUploadProtocol = a})
slAccessToken :: Lens' SpeechLongrunningrecognize (Maybe Text)
slAccessToken
= lens _slAccessToken
(\ s a -> s{_slAccessToken = a})
slUploadType :: Lens' SpeechLongrunningrecognize (Maybe Text)
slUploadType
= lens _slUploadType (\ s a -> s{_slUploadType = a})
slPayload :: Lens' SpeechLongrunningrecognize LongRunningRecognizeRequest
slPayload
= lens _slPayload (\ s a -> s{_slPayload = a})
slCallback :: Lens' SpeechLongrunningrecognize (Maybe Text)
slCallback
= lens _slCallback (\ s a -> s{_slCallback = a})
instance GoogleRequest SpeechLongrunningrecognize
where
type Rs SpeechLongrunningrecognize = Operation
type Scopes SpeechLongrunningrecognize =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient SpeechLongrunningrecognize'{..}
= go _slXgafv _slUploadProtocol _slAccessToken
_slUploadType
_slCallback
(Just AltJSON)
_slPayload
speechService
where go
= buildClient
(Proxy :: Proxy SpeechLongrunningrecognizeResource)
mempty