{-# 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.Update
(
DefaultObjectAccessControlsUpdateResource
, defaultObjectAccessControlsUpdate
, DefaultObjectAccessControlsUpdate
, doacuBucket
, doacuPayload
, doacuUserProject
, doacuEntity
) where
import Network.Google.Prelude
import Network.Google.Storage.Types
type DefaultObjectAccessControlsUpdateResource =
"storage" :>
"v1" :>
"b" :>
Capture "bucket" Text :>
"defaultObjectAcl" :>
Capture "entity" Text :>
QueryParam "userProject" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ObjectAccessControl :>
Put '[JSON] ObjectAccessControl
data DefaultObjectAccessControlsUpdate = DefaultObjectAccessControlsUpdate'
{ _doacuBucket :: !Text
, _doacuPayload :: !ObjectAccessControl
, _doacuUserProject :: !(Maybe Text)
, _doacuEntity :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
defaultObjectAccessControlsUpdate
:: Text
-> ObjectAccessControl
-> Text
-> DefaultObjectAccessControlsUpdate
defaultObjectAccessControlsUpdate pDoacuBucket_ pDoacuPayload_ pDoacuEntity_ =
DefaultObjectAccessControlsUpdate'
{ _doacuBucket = pDoacuBucket_
, _doacuPayload = pDoacuPayload_
, _doacuUserProject = Nothing
, _doacuEntity = pDoacuEntity_
}
doacuBucket :: Lens' DefaultObjectAccessControlsUpdate Text
doacuBucket
= lens _doacuBucket (\ s a -> s{_doacuBucket = a})
doacuPayload :: Lens' DefaultObjectAccessControlsUpdate ObjectAccessControl
doacuPayload
= lens _doacuPayload (\ s a -> s{_doacuPayload = a})
doacuUserProject :: Lens' DefaultObjectAccessControlsUpdate (Maybe Text)
doacuUserProject
= lens _doacuUserProject
(\ s a -> s{_doacuUserProject = a})
doacuEntity :: Lens' DefaultObjectAccessControlsUpdate Text
doacuEntity
= lens _doacuEntity (\ s a -> s{_doacuEntity = a})
instance GoogleRequest
DefaultObjectAccessControlsUpdate where
type Rs DefaultObjectAccessControlsUpdate =
ObjectAccessControl
type Scopes DefaultObjectAccessControlsUpdate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/devstorage.full_control"]
requestClient DefaultObjectAccessControlsUpdate'{..}
= go _doacuBucket _doacuEntity _doacuUserProject
(Just AltJSON)
_doacuPayload
storageService
where go
= buildClient
(Proxy ::
Proxy DefaultObjectAccessControlsUpdateResource)
mempty