{-# 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.ReserveIds
(
ProjectsReserveIdsResource
, projectsReserveIds
, ProjectsReserveIds
, priXgafv
, priUploadProtocol
, priAccessToken
, priUploadType
, priPayload
, priProjectId
, priCallback
) where
import Network.Google.Datastore.Types
import Network.Google.Prelude
type ProjectsReserveIdsResource =
"v1" :>
"projects" :>
CaptureMode "projectId" "reserveIds" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ReserveIdsRequest :>
Post '[JSON] ReserveIdsResponse
data ProjectsReserveIds = ProjectsReserveIds'
{ _priXgafv :: !(Maybe Xgafv)
, _priUploadProtocol :: !(Maybe Text)
, _priAccessToken :: !(Maybe Text)
, _priUploadType :: !(Maybe Text)
, _priPayload :: !ReserveIdsRequest
, _priProjectId :: !Text
, _priCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsReserveIds
:: ReserveIdsRequest
-> Text
-> ProjectsReserveIds
projectsReserveIds pPriPayload_ pPriProjectId_ =
ProjectsReserveIds'
{ _priXgafv = Nothing
, _priUploadProtocol = Nothing
, _priAccessToken = Nothing
, _priUploadType = Nothing
, _priPayload = pPriPayload_
, _priProjectId = pPriProjectId_
, _priCallback = Nothing
}
priXgafv :: Lens' ProjectsReserveIds (Maybe Xgafv)
priXgafv = lens _priXgafv (\ s a -> s{_priXgafv = a})
priUploadProtocol :: Lens' ProjectsReserveIds (Maybe Text)
priUploadProtocol
= lens _priUploadProtocol
(\ s a -> s{_priUploadProtocol = a})
priAccessToken :: Lens' ProjectsReserveIds (Maybe Text)
priAccessToken
= lens _priAccessToken
(\ s a -> s{_priAccessToken = a})
priUploadType :: Lens' ProjectsReserveIds (Maybe Text)
priUploadType
= lens _priUploadType
(\ s a -> s{_priUploadType = a})
priPayload :: Lens' ProjectsReserveIds ReserveIdsRequest
priPayload
= lens _priPayload (\ s a -> s{_priPayload = a})
priProjectId :: Lens' ProjectsReserveIds Text
priProjectId
= lens _priProjectId (\ s a -> s{_priProjectId = a})
priCallback :: Lens' ProjectsReserveIds (Maybe Text)
priCallback
= lens _priCallback (\ s a -> s{_priCallback = a})
instance GoogleRequest ProjectsReserveIds where
type Rs ProjectsReserveIds = ReserveIdsResponse
type Scopes ProjectsReserveIds =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/datastore"]
requestClient ProjectsReserveIds'{..}
= go _priProjectId _priXgafv _priUploadProtocol
_priAccessToken
_priUploadType
_priCallback
(Just AltJSON)
_priPayload
datastoreService
where go
= buildClient
(Proxy :: Proxy ProjectsReserveIdsResource)
mempty