{-# 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.BackendBuckets.Update
(
BackendBucketsUpdateResource
, backendBucketsUpdate
, BackendBucketsUpdate
, bbuRequestId
, bbuBackendBucket
, bbuProject
, bbuPayload
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type BackendBucketsUpdateResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"backendBuckets" :>
Capture "backendBucket" Text :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] BackendBucket :>
Put '[JSON] Operation
data BackendBucketsUpdate = BackendBucketsUpdate'
{ _bbuRequestId :: !(Maybe Text)
, _bbuBackendBucket :: !Text
, _bbuProject :: !Text
, _bbuPayload :: !BackendBucket
} deriving (Eq,Show,Data,Typeable,Generic)
backendBucketsUpdate
:: Text
-> Text
-> BackendBucket
-> BackendBucketsUpdate
backendBucketsUpdate pBbuBackendBucket_ pBbuProject_ pBbuPayload_ =
BackendBucketsUpdate'
{ _bbuRequestId = Nothing
, _bbuBackendBucket = pBbuBackendBucket_
, _bbuProject = pBbuProject_
, _bbuPayload = pBbuPayload_
}
bbuRequestId :: Lens' BackendBucketsUpdate (Maybe Text)
bbuRequestId
= lens _bbuRequestId (\ s a -> s{_bbuRequestId = a})
bbuBackendBucket :: Lens' BackendBucketsUpdate Text
bbuBackendBucket
= lens _bbuBackendBucket
(\ s a -> s{_bbuBackendBucket = a})
bbuProject :: Lens' BackendBucketsUpdate Text
bbuProject
= lens _bbuProject (\ s a -> s{_bbuProject = a})
bbuPayload :: Lens' BackendBucketsUpdate BackendBucket
bbuPayload
= lens _bbuPayload (\ s a -> s{_bbuPayload = a})
instance GoogleRequest BackendBucketsUpdate where
type Rs BackendBucketsUpdate = Operation
type Scopes BackendBucketsUpdate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient BackendBucketsUpdate'{..}
= go _bbuProject _bbuBackendBucket _bbuRequestId
(Just AltJSON)
_bbuPayload
computeService
where go
= buildClient
(Proxy :: Proxy BackendBucketsUpdateResource)
mempty