{-# 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.ObjectAccessControls.Get
(
ObjectAccessControlsGetResource
, objectAccessControlsGet
, ObjectAccessControlsGet
, oacgBucket
, oacgUserProject
, oacgObject
, oacgEntity
, oacgGeneration
) where
import Network.Google.Prelude
import Network.Google.Storage.Types
type ObjectAccessControlsGetResource =
"storage" :>
"v1" :>
"b" :>
Capture "bucket" Text :>
"o" :>
Capture "object" Text :>
"acl" :>
Capture "entity" Text :>
QueryParam "userProject" Text :>
QueryParam "generation" (Textual Int64) :>
QueryParam "alt" AltJSON :>
Get '[JSON] ObjectAccessControl
data ObjectAccessControlsGet = ObjectAccessControlsGet'
{ _oacgBucket :: !Text
, _oacgUserProject :: !(Maybe Text)
, _oacgObject :: !Text
, _oacgEntity :: !Text
, _oacgGeneration :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
objectAccessControlsGet
:: Text
-> Text
-> Text
-> ObjectAccessControlsGet
objectAccessControlsGet pOacgBucket_ pOacgObject_ pOacgEntity_ =
ObjectAccessControlsGet'
{ _oacgBucket = pOacgBucket_
, _oacgUserProject = Nothing
, _oacgObject = pOacgObject_
, _oacgEntity = pOacgEntity_
, _oacgGeneration = Nothing
}
oacgBucket :: Lens' ObjectAccessControlsGet Text
oacgBucket
= lens _oacgBucket (\ s a -> s{_oacgBucket = a})
oacgUserProject :: Lens' ObjectAccessControlsGet (Maybe Text)
oacgUserProject
= lens _oacgUserProject
(\ s a -> s{_oacgUserProject = a})
oacgObject :: Lens' ObjectAccessControlsGet Text
oacgObject
= lens _oacgObject (\ s a -> s{_oacgObject = a})
oacgEntity :: Lens' ObjectAccessControlsGet Text
oacgEntity
= lens _oacgEntity (\ s a -> s{_oacgEntity = a})
oacgGeneration :: Lens' ObjectAccessControlsGet (Maybe Int64)
oacgGeneration
= lens _oacgGeneration
(\ s a -> s{_oacgGeneration = a})
. mapping _Coerce
instance GoogleRequest ObjectAccessControlsGet where
type Rs ObjectAccessControlsGet = ObjectAccessControl
type Scopes ObjectAccessControlsGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/devstorage.full_control"]
requestClient ObjectAccessControlsGet'{..}
= go _oacgBucket _oacgObject _oacgEntity
_oacgUserProject
_oacgGeneration
(Just AltJSON)
storageService
where go
= buildClient
(Proxy :: Proxy ObjectAccessControlsGetResource)
mempty