{-# 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.AnalyzeEntitySentiment
(
DocumentsAnalyzeEntitySentimentResource
, documentsAnalyzeEntitySentiment
, DocumentsAnalyzeEntitySentiment
, daesXgafv
, daesUploadProtocol
, daesAccessToken
, daesUploadType
, daesPayload
, daesCallback
) where
import Network.Google.Language.Types
import Network.Google.Prelude
type DocumentsAnalyzeEntitySentimentResource =
"v1" :>
"documents:analyzeEntitySentiment" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AnalyzeEntitySentimentRequest :>
Post '[JSON] AnalyzeEntitySentimentResponse
data DocumentsAnalyzeEntitySentiment = DocumentsAnalyzeEntitySentiment'
{ _daesXgafv :: !(Maybe Xgafv)
, _daesUploadProtocol :: !(Maybe Text)
, _daesAccessToken :: !(Maybe Text)
, _daesUploadType :: !(Maybe Text)
, _daesPayload :: !AnalyzeEntitySentimentRequest
, _daesCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
documentsAnalyzeEntitySentiment
:: AnalyzeEntitySentimentRequest
-> DocumentsAnalyzeEntitySentiment
documentsAnalyzeEntitySentiment pDaesPayload_ =
DocumentsAnalyzeEntitySentiment'
{ _daesXgafv = Nothing
, _daesUploadProtocol = Nothing
, _daesAccessToken = Nothing
, _daesUploadType = Nothing
, _daesPayload = pDaesPayload_
, _daesCallback = Nothing
}
daesXgafv :: Lens' DocumentsAnalyzeEntitySentiment (Maybe Xgafv)
daesXgafv
= lens _daesXgafv (\ s a -> s{_daesXgafv = a})
daesUploadProtocol :: Lens' DocumentsAnalyzeEntitySentiment (Maybe Text)
daesUploadProtocol
= lens _daesUploadProtocol
(\ s a -> s{_daesUploadProtocol = a})
daesAccessToken :: Lens' DocumentsAnalyzeEntitySentiment (Maybe Text)
daesAccessToken
= lens _daesAccessToken
(\ s a -> s{_daesAccessToken = a})
daesUploadType :: Lens' DocumentsAnalyzeEntitySentiment (Maybe Text)
daesUploadType
= lens _daesUploadType
(\ s a -> s{_daesUploadType = a})
daesPayload :: Lens' DocumentsAnalyzeEntitySentiment AnalyzeEntitySentimentRequest
daesPayload
= lens _daesPayload (\ s a -> s{_daesPayload = a})
daesCallback :: Lens' DocumentsAnalyzeEntitySentiment (Maybe Text)
daesCallback
= lens _daesCallback (\ s a -> s{_daesCallback = a})
instance GoogleRequest
DocumentsAnalyzeEntitySentiment where
type Rs DocumentsAnalyzeEntitySentiment =
AnalyzeEntitySentimentResponse
type Scopes DocumentsAnalyzeEntitySentiment =
'["https://www.googleapis.com/auth/cloud-language",
"https://www.googleapis.com/auth/cloud-platform"]
requestClient DocumentsAnalyzeEntitySentiment'{..}
= go _daesXgafv _daesUploadProtocol _daesAccessToken
_daesUploadType
_daesCallback
(Just AltJSON)
_daesPayload
languageService
where go
= buildClient
(Proxy ::
Proxy DocumentsAnalyzeEntitySentimentResource)
mempty