{-# 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.AnalyzeSyntax
(
DocumentsAnalyzeSyntaxResource
, documentsAnalyzeSyntax
, DocumentsAnalyzeSyntax
, dXgafv
, dUploadProtocol
, dAccessToken
, dUploadType
, dPayload
, dCallback
) where
import Network.Google.Language.Types
import Network.Google.Prelude
type DocumentsAnalyzeSyntaxResource =
"v1" :>
"documents:analyzeSyntax" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AnalyzeSyntaxRequest :>
Post '[JSON] AnalyzeSyntaxResponse
data DocumentsAnalyzeSyntax = DocumentsAnalyzeSyntax'
{ _dXgafv :: !(Maybe Xgafv)
, _dUploadProtocol :: !(Maybe Text)
, _dAccessToken :: !(Maybe Text)
, _dUploadType :: !(Maybe Text)
, _dPayload :: !AnalyzeSyntaxRequest
, _dCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
documentsAnalyzeSyntax
:: AnalyzeSyntaxRequest
-> DocumentsAnalyzeSyntax
documentsAnalyzeSyntax pDPayload_ =
DocumentsAnalyzeSyntax'
{ _dXgafv = Nothing
, _dUploadProtocol = Nothing
, _dAccessToken = Nothing
, _dUploadType = Nothing
, _dPayload = pDPayload_
, _dCallback = Nothing
}
dXgafv :: Lens' DocumentsAnalyzeSyntax (Maybe Xgafv)
dXgafv = lens _dXgafv (\ s a -> s{_dXgafv = a})
dUploadProtocol :: Lens' DocumentsAnalyzeSyntax (Maybe Text)
dUploadProtocol
= lens _dUploadProtocol
(\ s a -> s{_dUploadProtocol = a})
dAccessToken :: Lens' DocumentsAnalyzeSyntax (Maybe Text)
dAccessToken
= lens _dAccessToken (\ s a -> s{_dAccessToken = a})
dUploadType :: Lens' DocumentsAnalyzeSyntax (Maybe Text)
dUploadType
= lens _dUploadType (\ s a -> s{_dUploadType = a})
dPayload :: Lens' DocumentsAnalyzeSyntax AnalyzeSyntaxRequest
dPayload = lens _dPayload (\ s a -> s{_dPayload = a})
dCallback :: Lens' DocumentsAnalyzeSyntax (Maybe Text)
dCallback
= lens _dCallback (\ s a -> s{_dCallback = a})
instance GoogleRequest DocumentsAnalyzeSyntax where
type Rs DocumentsAnalyzeSyntax =
AnalyzeSyntaxResponse
type Scopes DocumentsAnalyzeSyntax =
'["https://www.googleapis.com/auth/cloud-language",
"https://www.googleapis.com/auth/cloud-platform"]
requestClient DocumentsAnalyzeSyntax'{..}
= go _dXgafv _dUploadProtocol _dAccessToken
_dUploadType
_dCallback
(Just AltJSON)
_dPayload
languageService
where go
= buildClient
(Proxy :: Proxy DocumentsAnalyzeSyntaxResource)
mempty