{-# 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.Get
(
DefaultObjectAccessControlsGetResource
, defaultObjectAccessControlsGet
, DefaultObjectAccessControlsGet
, doacgBucket
, doacgUserProject
, doacgEntity
) where
import Network.Google.Prelude
import Network.Google.Storage.Types
type DefaultObjectAccessControlsGetResource =
"storage" :>
"v1" :>
"b" :>
Capture "bucket" Text :>
"defaultObjectAcl" :>
Capture "entity" Text :>
QueryParam "userProject" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] ObjectAccessControl
data DefaultObjectAccessControlsGet = DefaultObjectAccessControlsGet'
{ _doacgBucket :: !Text
, _doacgUserProject :: !(Maybe Text)
, _doacgEntity :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
defaultObjectAccessControlsGet
:: Text
-> Text
-> DefaultObjectAccessControlsGet
defaultObjectAccessControlsGet pDoacgBucket_ pDoacgEntity_ =
DefaultObjectAccessControlsGet'
{ _doacgBucket = pDoacgBucket_
, _doacgUserProject = Nothing
, _doacgEntity = pDoacgEntity_
}
doacgBucket :: Lens' DefaultObjectAccessControlsGet Text
doacgBucket
= lens _doacgBucket (\ s a -> s{_doacgBucket = a})
doacgUserProject :: Lens' DefaultObjectAccessControlsGet (Maybe Text)
doacgUserProject
= lens _doacgUserProject
(\ s a -> s{_doacgUserProject = a})
doacgEntity :: Lens' DefaultObjectAccessControlsGet Text
doacgEntity
= lens _doacgEntity (\ s a -> s{_doacgEntity = a})
instance GoogleRequest DefaultObjectAccessControlsGet
where
type Rs DefaultObjectAccessControlsGet =
ObjectAccessControl
type Scopes DefaultObjectAccessControlsGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/devstorage.full_control"]
requestClient DefaultObjectAccessControlsGet'{..}
= go _doacgBucket _doacgEntity _doacgUserProject
(Just AltJSON)
storageService
where go
= buildClient
(Proxy ::
Proxy DefaultObjectAccessControlsGetResource)
mempty