{-# 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.ClassifyText
(
DocumentsClassifyTextResource
, documentsClassifyText
, DocumentsClassifyText
, dctXgafv
, dctUploadProtocol
, dctAccessToken
, dctUploadType
, dctPayload
, dctCallback
) where
import Network.Google.Language.Types
import Network.Google.Prelude
type DocumentsClassifyTextResource =
"v1" :>
"documents:classifyText" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ClassifyTextRequest :>
Post '[JSON] ClassifyTextResponse
data DocumentsClassifyText = DocumentsClassifyText'
{ _dctXgafv :: !(Maybe Xgafv)
, _dctUploadProtocol :: !(Maybe Text)
, _dctAccessToken :: !(Maybe Text)
, _dctUploadType :: !(Maybe Text)
, _dctPayload :: !ClassifyTextRequest
, _dctCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
documentsClassifyText
:: ClassifyTextRequest
-> DocumentsClassifyText
documentsClassifyText pDctPayload_ =
DocumentsClassifyText'
{ _dctXgafv = Nothing
, _dctUploadProtocol = Nothing
, _dctAccessToken = Nothing
, _dctUploadType = Nothing
, _dctPayload = pDctPayload_
, _dctCallback = Nothing
}
dctXgafv :: Lens' DocumentsClassifyText (Maybe Xgafv)
dctXgafv = lens _dctXgafv (\ s a -> s{_dctXgafv = a})
dctUploadProtocol :: Lens' DocumentsClassifyText (Maybe Text)
dctUploadProtocol
= lens _dctUploadProtocol
(\ s a -> s{_dctUploadProtocol = a})
dctAccessToken :: Lens' DocumentsClassifyText (Maybe Text)
dctAccessToken
= lens _dctAccessToken
(\ s a -> s{_dctAccessToken = a})
dctUploadType :: Lens' DocumentsClassifyText (Maybe Text)
dctUploadType
= lens _dctUploadType
(\ s a -> s{_dctUploadType = a})
dctPayload :: Lens' DocumentsClassifyText ClassifyTextRequest
dctPayload
= lens _dctPayload (\ s a -> s{_dctPayload = a})
dctCallback :: Lens' DocumentsClassifyText (Maybe Text)
dctCallback
= lens _dctCallback (\ s a -> s{_dctCallback = a})
instance GoogleRequest DocumentsClassifyText where
type Rs DocumentsClassifyText = ClassifyTextResponse
type Scopes DocumentsClassifyText =
'["https://www.googleapis.com/auth/cloud-language",
"https://www.googleapis.com/auth/cloud-platform"]
requestClient DocumentsClassifyText'{..}
= go _dctXgafv _dctUploadProtocol _dctAccessToken
_dctUploadType
_dctCallback
(Just AltJSON)
_dctPayload
languageService
where go
= buildClient
(Proxy :: Proxy DocumentsClassifyTextResource)
mempty