{-# 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.Vision.Files.AsyncBatchAnnotate
(
FilesAsyncBatchAnnotateResource
, filesAsyncBatchAnnotate
, FilesAsyncBatchAnnotate
, fabaXgafv
, fabaUploadProtocol
, fabaAccessToken
, fabaUploadType
, fabaPayload
, fabaCallback
) where
import Network.Google.Prelude
import Network.Google.Vision.Types
type FilesAsyncBatchAnnotateResource =
"v1p2beta1" :>
"files:asyncBatchAnnotate" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON]
GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest
:> Post '[JSON] Operation
data FilesAsyncBatchAnnotate = FilesAsyncBatchAnnotate'
{ _fabaXgafv :: !(Maybe Xgafv)
, _fabaUploadProtocol :: !(Maybe Text)
, _fabaAccessToken :: !(Maybe Text)
, _fabaUploadType :: !(Maybe Text)
, _fabaPayload :: !GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest
, _fabaCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
filesAsyncBatchAnnotate
:: GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest
-> FilesAsyncBatchAnnotate
filesAsyncBatchAnnotate pFabaPayload_ =
FilesAsyncBatchAnnotate'
{ _fabaXgafv = Nothing
, _fabaUploadProtocol = Nothing
, _fabaAccessToken = Nothing
, _fabaUploadType = Nothing
, _fabaPayload = pFabaPayload_
, _fabaCallback = Nothing
}
fabaXgafv :: Lens' FilesAsyncBatchAnnotate (Maybe Xgafv)
fabaXgafv
= lens _fabaXgafv (\ s a -> s{_fabaXgafv = a})
fabaUploadProtocol :: Lens' FilesAsyncBatchAnnotate (Maybe Text)
fabaUploadProtocol
= lens _fabaUploadProtocol
(\ s a -> s{_fabaUploadProtocol = a})
fabaAccessToken :: Lens' FilesAsyncBatchAnnotate (Maybe Text)
fabaAccessToken
= lens _fabaAccessToken
(\ s a -> s{_fabaAccessToken = a})
fabaUploadType :: Lens' FilesAsyncBatchAnnotate (Maybe Text)
fabaUploadType
= lens _fabaUploadType
(\ s a -> s{_fabaUploadType = a})
fabaPayload :: Lens' FilesAsyncBatchAnnotate GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest
fabaPayload
= lens _fabaPayload (\ s a -> s{_fabaPayload = a})
fabaCallback :: Lens' FilesAsyncBatchAnnotate (Maybe Text)
fabaCallback
= lens _fabaCallback (\ s a -> s{_fabaCallback = a})
instance GoogleRequest FilesAsyncBatchAnnotate where
type Rs FilesAsyncBatchAnnotate = Operation
type Scopes FilesAsyncBatchAnnotate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/cloud-vision"]
requestClient FilesAsyncBatchAnnotate'{..}
= go _fabaXgafv _fabaUploadProtocol _fabaAccessToken
_fabaUploadType
_fabaCallback
(Just AltJSON)
_fabaPayload
visionService
where go
= buildClient
(Proxy :: Proxy FilesAsyncBatchAnnotateResource)
mempty