{-# 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.Datastore.Projects.Commit
(
ProjectsCommitResource
, projectsCommit
, ProjectsCommit
, pcXgafv
, pcUploadProtocol
, pcAccessToken
, pcUploadType
, pcPayload
, pcProjectId
, pcCallback
) where
import Network.Google.Datastore.Types
import Network.Google.Prelude
type ProjectsCommitResource =
"v1" :>
"projects" :>
CaptureMode "projectId" "commit" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CommitRequest :>
Post '[JSON] CommitResponse
data ProjectsCommit = ProjectsCommit'
{ _pcXgafv :: !(Maybe Xgafv)
, _pcUploadProtocol :: !(Maybe Text)
, _pcAccessToken :: !(Maybe Text)
, _pcUploadType :: !(Maybe Text)
, _pcPayload :: !CommitRequest
, _pcProjectId :: !Text
, _pcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsCommit
:: CommitRequest
-> Text
-> ProjectsCommit
projectsCommit pPcPayload_ pPcProjectId_ =
ProjectsCommit'
{ _pcXgafv = Nothing
, _pcUploadProtocol = Nothing
, _pcAccessToken = Nothing
, _pcUploadType = Nothing
, _pcPayload = pPcPayload_
, _pcProjectId = pPcProjectId_
, _pcCallback = Nothing
}
pcXgafv :: Lens' ProjectsCommit (Maybe Xgafv)
pcXgafv = lens _pcXgafv (\ s a -> s{_pcXgafv = a})
pcUploadProtocol :: Lens' ProjectsCommit (Maybe Text)
pcUploadProtocol
= lens _pcUploadProtocol
(\ s a -> s{_pcUploadProtocol = a})
pcAccessToken :: Lens' ProjectsCommit (Maybe Text)
pcAccessToken
= lens _pcAccessToken
(\ s a -> s{_pcAccessToken = a})
pcUploadType :: Lens' ProjectsCommit (Maybe Text)
pcUploadType
= lens _pcUploadType (\ s a -> s{_pcUploadType = a})
pcPayload :: Lens' ProjectsCommit CommitRequest
pcPayload
= lens _pcPayload (\ s a -> s{_pcPayload = a})
pcProjectId :: Lens' ProjectsCommit Text
pcProjectId
= lens _pcProjectId (\ s a -> s{_pcProjectId = a})
pcCallback :: Lens' ProjectsCommit (Maybe Text)
pcCallback
= lens _pcCallback (\ s a -> s{_pcCallback = a})
instance GoogleRequest ProjectsCommit where
type Rs ProjectsCommit = CommitResponse
type Scopes ProjectsCommit =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/datastore"]
requestClient ProjectsCommit'{..}
= go _pcProjectId _pcXgafv _pcUploadProtocol
_pcAccessToken
_pcUploadType
_pcCallback
(Just AltJSON)
_pcPayload
datastoreService
where go
= buildClient (Proxy :: Proxy ProjectsCommitResource)
mempty