{-# 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.AllocateIds
(
ProjectsAllocateIdsResource
, projectsAllocateIds
, ProjectsAllocateIds
, paiXgafv
, paiUploadProtocol
, paiAccessToken
, paiUploadType
, paiPayload
, paiProjectId
, paiCallback
) where
import Network.Google.Datastore.Types
import Network.Google.Prelude
type ProjectsAllocateIdsResource =
"v1" :>
"projects" :>
CaptureMode "projectId" "allocateIds" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AllocateIdsRequest :>
Post '[JSON] AllocateIdsResponse
data ProjectsAllocateIds = ProjectsAllocateIds'
{ _paiXgafv :: !(Maybe Xgafv)
, _paiUploadProtocol :: !(Maybe Text)
, _paiAccessToken :: !(Maybe Text)
, _paiUploadType :: !(Maybe Text)
, _paiPayload :: !AllocateIdsRequest
, _paiProjectId :: !Text
, _paiCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsAllocateIds
:: AllocateIdsRequest
-> Text
-> ProjectsAllocateIds
projectsAllocateIds pPaiPayload_ pPaiProjectId_ =
ProjectsAllocateIds'
{ _paiXgafv = Nothing
, _paiUploadProtocol = Nothing
, _paiAccessToken = Nothing
, _paiUploadType = Nothing
, _paiPayload = pPaiPayload_
, _paiProjectId = pPaiProjectId_
, _paiCallback = Nothing
}
paiXgafv :: Lens' ProjectsAllocateIds (Maybe Xgafv)
paiXgafv = lens _paiXgafv (\ s a -> s{_paiXgafv = a})
paiUploadProtocol :: Lens' ProjectsAllocateIds (Maybe Text)
paiUploadProtocol
= lens _paiUploadProtocol
(\ s a -> s{_paiUploadProtocol = a})
paiAccessToken :: Lens' ProjectsAllocateIds (Maybe Text)
paiAccessToken
= lens _paiAccessToken
(\ s a -> s{_paiAccessToken = a})
paiUploadType :: Lens' ProjectsAllocateIds (Maybe Text)
paiUploadType
= lens _paiUploadType
(\ s a -> s{_paiUploadType = a})
paiPayload :: Lens' ProjectsAllocateIds AllocateIdsRequest
paiPayload
= lens _paiPayload (\ s a -> s{_paiPayload = a})
paiProjectId :: Lens' ProjectsAllocateIds Text
paiProjectId
= lens _paiProjectId (\ s a -> s{_paiProjectId = a})
paiCallback :: Lens' ProjectsAllocateIds (Maybe Text)
paiCallback
= lens _paiCallback (\ s a -> s{_paiCallback = a})
instance GoogleRequest ProjectsAllocateIds where
type Rs ProjectsAllocateIds = AllocateIdsResponse
type Scopes ProjectsAllocateIds =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/datastore"]
requestClient ProjectsAllocateIds'{..}
= go _paiProjectId _paiXgafv _paiUploadProtocol
_paiAccessToken
_paiUploadType
_paiCallback
(Just AltJSON)
_paiPayload
datastoreService
where go
= buildClient
(Proxy :: Proxy ProjectsAllocateIdsResource)
mempty