{-# 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.Patch
(
BucketAccessControlsPatchResource
, bucketAccessControlsPatch
, BucketAccessControlsPatch
, bacpBucket
, bacpPayload
, bacpUserProject
, bacpEntity
) where
import Network.Google.Prelude
import Network.Google.Storage.Types
type BucketAccessControlsPatchResource =
"storage" :>
"v1" :>
"b" :>
Capture "bucket" Text :>
"acl" :>
Capture "entity" Text :>
QueryParam "userProject" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] BucketAccessControl :>
Patch '[JSON] BucketAccessControl
data BucketAccessControlsPatch = BucketAccessControlsPatch'
{ _bacpBucket :: !Text
, _bacpPayload :: !BucketAccessControl
, _bacpUserProject :: !(Maybe Text)
, _bacpEntity :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
bucketAccessControlsPatch
:: Text
-> BucketAccessControl
-> Text
-> BucketAccessControlsPatch
bucketAccessControlsPatch pBacpBucket_ pBacpPayload_ pBacpEntity_ =
BucketAccessControlsPatch'
{ _bacpBucket = pBacpBucket_
, _bacpPayload = pBacpPayload_
, _bacpUserProject = Nothing
, _bacpEntity = pBacpEntity_
}
bacpBucket :: Lens' BucketAccessControlsPatch Text
bacpBucket
= lens _bacpBucket (\ s a -> s{_bacpBucket = a})
bacpPayload :: Lens' BucketAccessControlsPatch BucketAccessControl
bacpPayload
= lens _bacpPayload (\ s a -> s{_bacpPayload = a})
bacpUserProject :: Lens' BucketAccessControlsPatch (Maybe Text)
bacpUserProject
= lens _bacpUserProject
(\ s a -> s{_bacpUserProject = a})
bacpEntity :: Lens' BucketAccessControlsPatch Text
bacpEntity
= lens _bacpEntity (\ s a -> s{_bacpEntity = a})
instance GoogleRequest BucketAccessControlsPatch
where
type Rs BucketAccessControlsPatch =
BucketAccessControl
type Scopes BucketAccessControlsPatch =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/devstorage.full_control"]
requestClient BucketAccessControlsPatch'{..}
= go _bacpBucket _bacpEntity _bacpUserProject
(Just AltJSON)
_bacpPayload
storageService
where go
= buildClient
(Proxy :: Proxy BucketAccessControlsPatchResource)
mempty