{-# 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.Lookup
(
ProjectsLookupResource
, projectsLookup
, ProjectsLookup
, plXgafv
, plUploadProtocol
, plAccessToken
, plUploadType
, plPayload
, plProjectId
, plCallback
) where
import Network.Google.Datastore.Types
import Network.Google.Prelude
type ProjectsLookupResource =
"v1" :>
"projects" :>
CaptureMode "projectId" "lookup" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] LookupRequest :>
Post '[JSON] LookupResponse
data ProjectsLookup = ProjectsLookup'
{ _plXgafv :: !(Maybe Xgafv)
, _plUploadProtocol :: !(Maybe Text)
, _plAccessToken :: !(Maybe Text)
, _plUploadType :: !(Maybe Text)
, _plPayload :: !LookupRequest
, _plProjectId :: !Text
, _plCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsLookup
:: LookupRequest
-> Text
-> ProjectsLookup
projectsLookup pPlPayload_ pPlProjectId_ =
ProjectsLookup'
{ _plXgafv = Nothing
, _plUploadProtocol = Nothing
, _plAccessToken = Nothing
, _plUploadType = Nothing
, _plPayload = pPlPayload_
, _plProjectId = pPlProjectId_
, _plCallback = Nothing
}
plXgafv :: Lens' ProjectsLookup (Maybe Xgafv)
plXgafv = lens _plXgafv (\ s a -> s{_plXgafv = a})
plUploadProtocol :: Lens' ProjectsLookup (Maybe Text)
plUploadProtocol
= lens _plUploadProtocol
(\ s a -> s{_plUploadProtocol = a})
plAccessToken :: Lens' ProjectsLookup (Maybe Text)
plAccessToken
= lens _plAccessToken
(\ s a -> s{_plAccessToken = a})
plUploadType :: Lens' ProjectsLookup (Maybe Text)
plUploadType
= lens _plUploadType (\ s a -> s{_plUploadType = a})
plPayload :: Lens' ProjectsLookup LookupRequest
plPayload
= lens _plPayload (\ s a -> s{_plPayload = a})
plProjectId :: Lens' ProjectsLookup Text
plProjectId
= lens _plProjectId (\ s a -> s{_plProjectId = a})
plCallback :: Lens' ProjectsLookup (Maybe Text)
plCallback
= lens _plCallback (\ s a -> s{_plCallback = a})
instance GoogleRequest ProjectsLookup where
type Rs ProjectsLookup = LookupResponse
type Scopes ProjectsLookup =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/datastore"]
requestClient ProjectsLookup'{..}
= go _plProjectId _plXgafv _plUploadProtocol
_plAccessToken
_plUploadType
_plCallback
(Just AltJSON)
_plPayload
datastoreService
where go
= buildClient (Proxy :: Proxy ProjectsLookupResource)
mempty