{-# 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.AnalyzeEntities
(
DocumentsAnalyzeEntitiesResource
, documentsAnalyzeEntities
, DocumentsAnalyzeEntities
, daeXgafv
, daeUploadProtocol
, daeAccessToken
, daeUploadType
, daePayload
, daeCallback
) where
import Network.Google.Language.Types
import Network.Google.Prelude
type DocumentsAnalyzeEntitiesResource =
"v1" :>
"documents:analyzeEntities" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AnalyzeEntitiesRequest :>
Post '[JSON] AnalyzeEntitiesResponse
data DocumentsAnalyzeEntities = DocumentsAnalyzeEntities'
{ _daeXgafv :: !(Maybe Xgafv)
, _daeUploadProtocol :: !(Maybe Text)
, _daeAccessToken :: !(Maybe Text)
, _daeUploadType :: !(Maybe Text)
, _daePayload :: !AnalyzeEntitiesRequest
, _daeCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
documentsAnalyzeEntities
:: AnalyzeEntitiesRequest
-> DocumentsAnalyzeEntities
documentsAnalyzeEntities pDaePayload_ =
DocumentsAnalyzeEntities'
{ _daeXgafv = Nothing
, _daeUploadProtocol = Nothing
, _daeAccessToken = Nothing
, _daeUploadType = Nothing
, _daePayload = pDaePayload_
, _daeCallback = Nothing
}
daeXgafv :: Lens' DocumentsAnalyzeEntities (Maybe Xgafv)
daeXgafv = lens _daeXgafv (\ s a -> s{_daeXgafv = a})
daeUploadProtocol :: Lens' DocumentsAnalyzeEntities (Maybe Text)
daeUploadProtocol
= lens _daeUploadProtocol
(\ s a -> s{_daeUploadProtocol = a})
daeAccessToken :: Lens' DocumentsAnalyzeEntities (Maybe Text)
daeAccessToken
= lens _daeAccessToken
(\ s a -> s{_daeAccessToken = a})
daeUploadType :: Lens' DocumentsAnalyzeEntities (Maybe Text)
daeUploadType
= lens _daeUploadType
(\ s a -> s{_daeUploadType = a})
daePayload :: Lens' DocumentsAnalyzeEntities AnalyzeEntitiesRequest
daePayload
= lens _daePayload (\ s a -> s{_daePayload = a})
daeCallback :: Lens' DocumentsAnalyzeEntities (Maybe Text)
daeCallback
= lens _daeCallback (\ s a -> s{_daeCallback = a})
instance GoogleRequest DocumentsAnalyzeEntities where
type Rs DocumentsAnalyzeEntities =
AnalyzeEntitiesResponse
type Scopes DocumentsAnalyzeEntities =
'["https://www.googleapis.com/auth/cloud-language",
"https://www.googleapis.com/auth/cloud-platform"]
requestClient DocumentsAnalyzeEntities'{..}
= go _daeXgafv _daeUploadProtocol _daeAccessToken
_daeUploadType
_daeCallback
(Just AltJSON)
_daePayload
languageService
where go
= buildClient
(Proxy :: Proxy DocumentsAnalyzeEntitiesResource)
mempty