{-# 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.Patch
(
BackendBucketsPatchResource
, backendBucketsPatch
, BackendBucketsPatch
, bbpRequestId
, bbpBackendBucket
, bbpProject
, bbpPayload
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type BackendBucketsPatchResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"backendBuckets" :>
Capture "backendBucket" Text :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] BackendBucket :>
Patch '[JSON] Operation
data BackendBucketsPatch = BackendBucketsPatch'
{ _bbpRequestId :: !(Maybe Text)
, _bbpBackendBucket :: !Text
, _bbpProject :: !Text
, _bbpPayload :: !BackendBucket
} deriving (Eq,Show,Data,Typeable,Generic)
backendBucketsPatch
:: Text
-> Text
-> BackendBucket
-> BackendBucketsPatch
backendBucketsPatch pBbpBackendBucket_ pBbpProject_ pBbpPayload_ =
BackendBucketsPatch'
{ _bbpRequestId = Nothing
, _bbpBackendBucket = pBbpBackendBucket_
, _bbpProject = pBbpProject_
, _bbpPayload = pBbpPayload_
}
bbpRequestId :: Lens' BackendBucketsPatch (Maybe Text)
bbpRequestId
= lens _bbpRequestId (\ s a -> s{_bbpRequestId = a})
bbpBackendBucket :: Lens' BackendBucketsPatch Text
bbpBackendBucket
= lens _bbpBackendBucket
(\ s a -> s{_bbpBackendBucket = a})
bbpProject :: Lens' BackendBucketsPatch Text
bbpProject
= lens _bbpProject (\ s a -> s{_bbpProject = a})
bbpPayload :: Lens' BackendBucketsPatch BackendBucket
bbpPayload
= lens _bbpPayload (\ s a -> s{_bbpPayload = a})
instance GoogleRequest BackendBucketsPatch where
type Rs BackendBucketsPatch = Operation
type Scopes BackendBucketsPatch =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient BackendBucketsPatch'{..}
= go _bbpProject _bbpBackendBucket _bbpRequestId
(Just AltJSON)
_bbpPayload
computeService
where go
= buildClient
(Proxy :: Proxy BackendBucketsPatchResource)
mempty