{-# 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.DefaultObjectAccessControls.Patch
(
DefaultObjectAccessControlsPatchResource
, defaultObjectAccessControlsPatch
, DefaultObjectAccessControlsPatch
, doacpBucket
, doacpPayload
, doacpUserProject
, doacpEntity
) where
import Network.Google.Prelude
import Network.Google.Storage.Types
type DefaultObjectAccessControlsPatchResource =
"storage" :>
"v1" :>
"b" :>
Capture "bucket" Text :>
"defaultObjectAcl" :>
Capture "entity" Text :>
QueryParam "userProject" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ObjectAccessControl :>
Patch '[JSON] ObjectAccessControl
data DefaultObjectAccessControlsPatch = DefaultObjectAccessControlsPatch'
{ _doacpBucket :: !Text
, _doacpPayload :: !ObjectAccessControl
, _doacpUserProject :: !(Maybe Text)
, _doacpEntity :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
defaultObjectAccessControlsPatch
:: Text
-> ObjectAccessControl
-> Text
-> DefaultObjectAccessControlsPatch
defaultObjectAccessControlsPatch pDoacpBucket_ pDoacpPayload_ pDoacpEntity_ =
DefaultObjectAccessControlsPatch'
{ _doacpBucket = pDoacpBucket_
, _doacpPayload = pDoacpPayload_
, _doacpUserProject = Nothing
, _doacpEntity = pDoacpEntity_
}
doacpBucket :: Lens' DefaultObjectAccessControlsPatch Text
doacpBucket
= lens _doacpBucket (\ s a -> s{_doacpBucket = a})
doacpPayload :: Lens' DefaultObjectAccessControlsPatch ObjectAccessControl
doacpPayload
= lens _doacpPayload (\ s a -> s{_doacpPayload = a})
doacpUserProject :: Lens' DefaultObjectAccessControlsPatch (Maybe Text)
doacpUserProject
= lens _doacpUserProject
(\ s a -> s{_doacpUserProject = a})
doacpEntity :: Lens' DefaultObjectAccessControlsPatch Text
doacpEntity
= lens _doacpEntity (\ s a -> s{_doacpEntity = a})
instance GoogleRequest
DefaultObjectAccessControlsPatch where
type Rs DefaultObjectAccessControlsPatch =
ObjectAccessControl
type Scopes DefaultObjectAccessControlsPatch =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/devstorage.full_control"]
requestClient DefaultObjectAccessControlsPatch'{..}
= go _doacpBucket _doacpEntity _doacpUserProject
(Just AltJSON)
_doacpPayload
storageService
where go
= buildClient
(Proxy ::
Proxy DefaultObjectAccessControlsPatchResource)
mempty