{-# 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.CloudResourceManager.Folders.Search
(
FoldersSearchResource
, foldersSearch
, FoldersSearch
, fsXgafv
, fsUploadProtocol
, fsAccessToken
, fsUploadType
, fsPayload
, fsCallback
) where
import Network.Google.Prelude
import Network.Google.ResourceManager.Types
type FoldersSearchResource =
"v2" :>
"folders:search" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] SearchFoldersRequest :>
Post '[JSON] SearchFoldersResponse
data FoldersSearch = FoldersSearch'
{ _fsXgafv :: !(Maybe Xgafv)
, _fsUploadProtocol :: !(Maybe Text)
, _fsAccessToken :: !(Maybe Text)
, _fsUploadType :: !(Maybe Text)
, _fsPayload :: !SearchFoldersRequest
, _fsCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
foldersSearch
:: SearchFoldersRequest
-> FoldersSearch
foldersSearch pFsPayload_ =
FoldersSearch'
{ _fsXgafv = Nothing
, _fsUploadProtocol = Nothing
, _fsAccessToken = Nothing
, _fsUploadType = Nothing
, _fsPayload = pFsPayload_
, _fsCallback = Nothing
}
fsXgafv :: Lens' FoldersSearch (Maybe Xgafv)
fsXgafv = lens _fsXgafv (\ s a -> s{_fsXgafv = a})
fsUploadProtocol :: Lens' FoldersSearch (Maybe Text)
fsUploadProtocol
= lens _fsUploadProtocol
(\ s a -> s{_fsUploadProtocol = a})
fsAccessToken :: Lens' FoldersSearch (Maybe Text)
fsAccessToken
= lens _fsAccessToken
(\ s a -> s{_fsAccessToken = a})
fsUploadType :: Lens' FoldersSearch (Maybe Text)
fsUploadType
= lens _fsUploadType (\ s a -> s{_fsUploadType = a})
fsPayload :: Lens' FoldersSearch SearchFoldersRequest
fsPayload
= lens _fsPayload (\ s a -> s{_fsPayload = a})
fsCallback :: Lens' FoldersSearch (Maybe Text)
fsCallback
= lens _fsCallback (\ s a -> s{_fsCallback = a})
instance GoogleRequest FoldersSearch where
type Rs FoldersSearch = SearchFoldersResponse
type Scopes FoldersSearch =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/cloud-platform.read-only"]
requestClient FoldersSearch'{..}
= go _fsXgafv _fsUploadProtocol _fsAccessToken
_fsUploadType
_fsCallback
(Just AltJSON)
_fsPayload
resourceManagerService
where go
= buildClient (Proxy :: Proxy FoldersSearchResource)
mempty