{-# 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.FireStore.Projects.Databases.Documents.RunQuery
(
ProjectsDatabasesDocumentsRunQueryResource
, projectsDatabasesDocumentsRunQuery
, ProjectsDatabasesDocumentsRunQuery
, pddrqParent
, pddrqXgafv
, pddrqUploadProtocol
, pddrqAccessToken
, pddrqUploadType
, pddrqPayload
, pddrqCallback
) where
import Network.Google.FireStore.Types
import Network.Google.Prelude
type ProjectsDatabasesDocumentsRunQueryResource =
"v1" :>
CaptureMode "parent" "runQuery" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] RunQueryRequest :>
Post '[JSON] RunQueryResponse
data ProjectsDatabasesDocumentsRunQuery = ProjectsDatabasesDocumentsRunQuery'
{ _pddrqParent :: !Text
, _pddrqXgafv :: !(Maybe Xgafv)
, _pddrqUploadProtocol :: !(Maybe Text)
, _pddrqAccessToken :: !(Maybe Text)
, _pddrqUploadType :: !(Maybe Text)
, _pddrqPayload :: !RunQueryRequest
, _pddrqCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsDatabasesDocumentsRunQuery
:: Text
-> RunQueryRequest
-> ProjectsDatabasesDocumentsRunQuery
projectsDatabasesDocumentsRunQuery pPddrqParent_ pPddrqPayload_ =
ProjectsDatabasesDocumentsRunQuery'
{ _pddrqParent = pPddrqParent_
, _pddrqXgafv = Nothing
, _pddrqUploadProtocol = Nothing
, _pddrqAccessToken = Nothing
, _pddrqUploadType = Nothing
, _pddrqPayload = pPddrqPayload_
, _pddrqCallback = Nothing
}
pddrqParent :: Lens' ProjectsDatabasesDocumentsRunQuery Text
pddrqParent
= lens _pddrqParent (\ s a -> s{_pddrqParent = a})
pddrqXgafv :: Lens' ProjectsDatabasesDocumentsRunQuery (Maybe Xgafv)
pddrqXgafv
= lens _pddrqXgafv (\ s a -> s{_pddrqXgafv = a})
pddrqUploadProtocol :: Lens' ProjectsDatabasesDocumentsRunQuery (Maybe Text)
pddrqUploadProtocol
= lens _pddrqUploadProtocol
(\ s a -> s{_pddrqUploadProtocol = a})
pddrqAccessToken :: Lens' ProjectsDatabasesDocumentsRunQuery (Maybe Text)
pddrqAccessToken
= lens _pddrqAccessToken
(\ s a -> s{_pddrqAccessToken = a})
pddrqUploadType :: Lens' ProjectsDatabasesDocumentsRunQuery (Maybe Text)
pddrqUploadType
= lens _pddrqUploadType
(\ s a -> s{_pddrqUploadType = a})
pddrqPayload :: Lens' ProjectsDatabasesDocumentsRunQuery RunQueryRequest
pddrqPayload
= lens _pddrqPayload (\ s a -> s{_pddrqPayload = a})
pddrqCallback :: Lens' ProjectsDatabasesDocumentsRunQuery (Maybe Text)
pddrqCallback
= lens _pddrqCallback
(\ s a -> s{_pddrqCallback = a})
instance GoogleRequest
ProjectsDatabasesDocumentsRunQuery where
type Rs ProjectsDatabasesDocumentsRunQuery =
RunQueryResponse
type Scopes ProjectsDatabasesDocumentsRunQuery =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/datastore"]
requestClient ProjectsDatabasesDocumentsRunQuery'{..}
= go _pddrqParent _pddrqXgafv _pddrqUploadProtocol
_pddrqAccessToken
_pddrqUploadType
_pddrqCallback
(Just AltJSON)
_pddrqPayload
fireStoreService
where go
= buildClient
(Proxy ::
Proxy ProjectsDatabasesDocumentsRunQueryResource)
mempty