{-# 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.CloudFunctions.Projects.Locations.Functions.GenerateDownloadURL
(
ProjectsLocationsFunctionsGenerateDownloadURLResource
, projectsLocationsFunctionsGenerateDownloadURL
, ProjectsLocationsFunctionsGenerateDownloadURL
, plfgduXgafv
, plfgduUploadProtocol
, plfgduAccessToken
, plfgduUploadType
, plfgduPayload
, plfgduName
, plfgduCallback
) where
import Network.Google.CloudFunctions.Types
import Network.Google.Prelude
type ProjectsLocationsFunctionsGenerateDownloadURLResource
=
"v1" :>
CaptureMode "name" "generateDownloadUrl" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] GenerateDownloadURLRequest :>
Post '[JSON] GenerateDownloadURLResponse
data ProjectsLocationsFunctionsGenerateDownloadURL = ProjectsLocationsFunctionsGenerateDownloadURL'
{ _plfgduXgafv :: !(Maybe Xgafv)
, _plfgduUploadProtocol :: !(Maybe Text)
, _plfgduAccessToken :: !(Maybe Text)
, _plfgduUploadType :: !(Maybe Text)
, _plfgduPayload :: !GenerateDownloadURLRequest
, _plfgduName :: !Text
, _plfgduCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsLocationsFunctionsGenerateDownloadURL
:: GenerateDownloadURLRequest
-> Text
-> ProjectsLocationsFunctionsGenerateDownloadURL
projectsLocationsFunctionsGenerateDownloadURL pPlfgduPayload_ pPlfgduName_ =
ProjectsLocationsFunctionsGenerateDownloadURL'
{ _plfgduXgafv = Nothing
, _plfgduUploadProtocol = Nothing
, _plfgduAccessToken = Nothing
, _plfgduUploadType = Nothing
, _plfgduPayload = pPlfgduPayload_
, _plfgduName = pPlfgduName_
, _plfgduCallback = Nothing
}
plfgduXgafv :: Lens' ProjectsLocationsFunctionsGenerateDownloadURL (Maybe Xgafv)
plfgduXgafv
= lens _plfgduXgafv (\ s a -> s{_plfgduXgafv = a})
plfgduUploadProtocol :: Lens' ProjectsLocationsFunctionsGenerateDownloadURL (Maybe Text)
plfgduUploadProtocol
= lens _plfgduUploadProtocol
(\ s a -> s{_plfgduUploadProtocol = a})
plfgduAccessToken :: Lens' ProjectsLocationsFunctionsGenerateDownloadURL (Maybe Text)
plfgduAccessToken
= lens _plfgduAccessToken
(\ s a -> s{_plfgduAccessToken = a})
plfgduUploadType :: Lens' ProjectsLocationsFunctionsGenerateDownloadURL (Maybe Text)
plfgduUploadType
= lens _plfgduUploadType
(\ s a -> s{_plfgduUploadType = a})
plfgduPayload :: Lens' ProjectsLocationsFunctionsGenerateDownloadURL GenerateDownloadURLRequest
plfgduPayload
= lens _plfgduPayload
(\ s a -> s{_plfgduPayload = a})
plfgduName :: Lens' ProjectsLocationsFunctionsGenerateDownloadURL Text
plfgduName
= lens _plfgduName (\ s a -> s{_plfgduName = a})
plfgduCallback :: Lens' ProjectsLocationsFunctionsGenerateDownloadURL (Maybe Text)
plfgduCallback
= lens _plfgduCallback
(\ s a -> s{_plfgduCallback = a})
instance GoogleRequest
ProjectsLocationsFunctionsGenerateDownloadURL where
type Rs ProjectsLocationsFunctionsGenerateDownloadURL
= GenerateDownloadURLResponse
type Scopes
ProjectsLocationsFunctionsGenerateDownloadURL
= '["https://www.googleapis.com/auth/cloud-platform"]
requestClient
ProjectsLocationsFunctionsGenerateDownloadURL'{..}
= go _plfgduName _plfgduXgafv _plfgduUploadProtocol
_plfgduAccessToken
_plfgduUploadType
_plfgduCallback
(Just AltJSON)
_plfgduPayload
cloudFunctionsService
where go
= buildClient
(Proxy ::
Proxy
ProjectsLocationsFunctionsGenerateDownloadURLResource)
mempty