{-# 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.Compute.Projects.SetUsageExportBucket
(
ProjectsSetUsageExportBucketResource
, projectsSetUsageExportBucket
, ProjectsSetUsageExportBucket
, psuebRequestId
, psuebProject
, psuebPayload
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type ProjectsSetUsageExportBucketResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"setUsageExportBucket" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] UsageExportLocation :>
Post '[JSON] Operation
data ProjectsSetUsageExportBucket = ProjectsSetUsageExportBucket'
{ _psuebRequestId :: !(Maybe Text)
, _psuebProject :: !Text
, _psuebPayload :: !UsageExportLocation
} deriving (Eq,Show,Data,Typeable,Generic)
projectsSetUsageExportBucket
:: Text
-> UsageExportLocation
-> ProjectsSetUsageExportBucket
projectsSetUsageExportBucket pPsuebProject_ pPsuebPayload_ =
ProjectsSetUsageExportBucket'
{ _psuebRequestId = Nothing
, _psuebProject = pPsuebProject_
, _psuebPayload = pPsuebPayload_
}
psuebRequestId :: Lens' ProjectsSetUsageExportBucket (Maybe Text)
psuebRequestId
= lens _psuebRequestId
(\ s a -> s{_psuebRequestId = a})
psuebProject :: Lens' ProjectsSetUsageExportBucket Text
psuebProject
= lens _psuebProject (\ s a -> s{_psuebProject = a})
psuebPayload :: Lens' ProjectsSetUsageExportBucket UsageExportLocation
psuebPayload
= lens _psuebPayload (\ s a -> s{_psuebPayload = a})
instance GoogleRequest ProjectsSetUsageExportBucket
where
type Rs ProjectsSetUsageExportBucket = Operation
type Scopes ProjectsSetUsageExportBucket =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/devstorage.full_control",
"https://www.googleapis.com/auth/devstorage.read_only",
"https://www.googleapis.com/auth/devstorage.read_write"]
requestClient ProjectsSetUsageExportBucket'{..}
= go _psuebProject _psuebRequestId (Just AltJSON)
_psuebPayload
computeService
where go
= buildClient
(Proxy :: Proxy ProjectsSetUsageExportBucketResource)
mempty