{-# 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.Storage.BucketAccessControls.Update
(
BucketAccessControlsUpdateResource
, bucketAccessControlsUpdate
, BucketAccessControlsUpdate
, bacuBucket
, bacuPayload
, bacuUserProject
, bacuEntity
) where
import Network.Google.Prelude
import Network.Google.Storage.Types
type BucketAccessControlsUpdateResource =
"storage" :>
"v1" :>
"b" :>
Capture "bucket" Text :>
"acl" :>
Capture "entity" Text :>
QueryParam "userProject" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] BucketAccessControl :>
Put '[JSON] BucketAccessControl
data BucketAccessControlsUpdate = BucketAccessControlsUpdate'
{ _bacuBucket :: !Text
, _bacuPayload :: !BucketAccessControl
, _bacuUserProject :: !(Maybe Text)
, _bacuEntity :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
bucketAccessControlsUpdate
:: Text
-> BucketAccessControl
-> Text
-> BucketAccessControlsUpdate
bucketAccessControlsUpdate pBacuBucket_ pBacuPayload_ pBacuEntity_ =
BucketAccessControlsUpdate'
{ _bacuBucket = pBacuBucket_
, _bacuPayload = pBacuPayload_
, _bacuUserProject = Nothing
, _bacuEntity = pBacuEntity_
}
bacuBucket :: Lens' BucketAccessControlsUpdate Text
bacuBucket
= lens _bacuBucket (\ s a -> s{_bacuBucket = a})
bacuPayload :: Lens' BucketAccessControlsUpdate BucketAccessControl
bacuPayload
= lens _bacuPayload (\ s a -> s{_bacuPayload = a})
bacuUserProject :: Lens' BucketAccessControlsUpdate (Maybe Text)
bacuUserProject
= lens _bacuUserProject
(\ s a -> s{_bacuUserProject = a})
bacuEntity :: Lens' BucketAccessControlsUpdate Text
bacuEntity
= lens _bacuEntity (\ s a -> s{_bacuEntity = a})
instance GoogleRequest BucketAccessControlsUpdate
where
type Rs BucketAccessControlsUpdate =
BucketAccessControl
type Scopes BucketAccessControlsUpdate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/devstorage.full_control"]
requestClient BucketAccessControlsUpdate'{..}
= go _bacuBucket _bacuEntity _bacuUserProject
(Just AltJSON)
_bacuPayload
storageService
where go
= buildClient
(Proxy :: Proxy BucketAccessControlsUpdateResource)
mempty