{-# 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.Language.Documents.AnnotateText
(
DocumentsAnnotateTextResource
, documentsAnnotateText
, DocumentsAnnotateText
, datXgafv
, datUploadProtocol
, datAccessToken
, datUploadType
, datPayload
, datCallback
) where
import Network.Google.Language.Types
import Network.Google.Prelude
type DocumentsAnnotateTextResource =
"v1" :>
"documents:annotateText" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AnnotateTextRequest :>
Post '[JSON] AnnotateTextResponse
data DocumentsAnnotateText = DocumentsAnnotateText'
{ _datXgafv :: !(Maybe Xgafv)
, _datUploadProtocol :: !(Maybe Text)
, _datAccessToken :: !(Maybe Text)
, _datUploadType :: !(Maybe Text)
, _datPayload :: !AnnotateTextRequest
, _datCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
documentsAnnotateText
:: AnnotateTextRequest
-> DocumentsAnnotateText
documentsAnnotateText pDatPayload_ =
DocumentsAnnotateText'
{ _datXgafv = Nothing
, _datUploadProtocol = Nothing
, _datAccessToken = Nothing
, _datUploadType = Nothing
, _datPayload = pDatPayload_
, _datCallback = Nothing
}
datXgafv :: Lens' DocumentsAnnotateText (Maybe Xgafv)
datXgafv = lens _datXgafv (\ s a -> s{_datXgafv = a})
datUploadProtocol :: Lens' DocumentsAnnotateText (Maybe Text)
datUploadProtocol
= lens _datUploadProtocol
(\ s a -> s{_datUploadProtocol = a})
datAccessToken :: Lens' DocumentsAnnotateText (Maybe Text)
datAccessToken
= lens _datAccessToken
(\ s a -> s{_datAccessToken = a})
datUploadType :: Lens' DocumentsAnnotateText (Maybe Text)
datUploadType
= lens _datUploadType
(\ s a -> s{_datUploadType = a})
datPayload :: Lens' DocumentsAnnotateText AnnotateTextRequest
datPayload
= lens _datPayload (\ s a -> s{_datPayload = a})
datCallback :: Lens' DocumentsAnnotateText (Maybe Text)
datCallback
= lens _datCallback (\ s a -> s{_datCallback = a})
instance GoogleRequest DocumentsAnnotateText where
type Rs DocumentsAnnotateText = AnnotateTextResponse
type Scopes DocumentsAnnotateText =
'["https://www.googleapis.com/auth/cloud-language",
"https://www.googleapis.com/auth/cloud-platform"]
requestClient DocumentsAnnotateText'{..}
= go _datXgafv _datUploadProtocol _datAccessToken
_datUploadType
_datCallback
(Just AltJSON)
_datPayload
languageService
where go
= buildClient
(Proxy :: Proxy DocumentsAnnotateTextResource)
mempty