{-# 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.List
(
ObjectAccessControlsListResource
, objectAccessControlsList
, ObjectAccessControlsList
, oaclBucket
, oaclUserProject
, oaclObject
, oaclGeneration
) where
import Network.Google.Prelude
import Network.Google.Storage.Types
type ObjectAccessControlsListResource =
"storage" :>
"v1" :>
"b" :>
Capture "bucket" Text :>
"o" :>
Capture "object" Text :>
"acl" :>
QueryParam "userProject" Text :>
QueryParam "generation" (Textual Int64) :>
QueryParam "alt" AltJSON :>
Get '[JSON] ObjectAccessControls
data ObjectAccessControlsList = ObjectAccessControlsList'
{ _oaclBucket :: !Text
, _oaclUserProject :: !(Maybe Text)
, _oaclObject :: !Text
, _oaclGeneration :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
objectAccessControlsList
:: Text
-> Text
-> ObjectAccessControlsList
objectAccessControlsList pOaclBucket_ pOaclObject_ =
ObjectAccessControlsList'
{ _oaclBucket = pOaclBucket_
, _oaclUserProject = Nothing
, _oaclObject = pOaclObject_
, _oaclGeneration = Nothing
}
oaclBucket :: Lens' ObjectAccessControlsList Text
oaclBucket
= lens _oaclBucket (\ s a -> s{_oaclBucket = a})
oaclUserProject :: Lens' ObjectAccessControlsList (Maybe Text)
oaclUserProject
= lens _oaclUserProject
(\ s a -> s{_oaclUserProject = a})
oaclObject :: Lens' ObjectAccessControlsList Text
oaclObject
= lens _oaclObject (\ s a -> s{_oaclObject = a})
oaclGeneration :: Lens' ObjectAccessControlsList (Maybe Int64)
oaclGeneration
= lens _oaclGeneration
(\ s a -> s{_oaclGeneration = a})
. mapping _Coerce
instance GoogleRequest ObjectAccessControlsList where
type Rs ObjectAccessControlsList =
ObjectAccessControls
type Scopes ObjectAccessControlsList =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/devstorage.full_control"]
requestClient ObjectAccessControlsList'{..}
= go _oaclBucket _oaclObject _oaclUserProject
_oaclGeneration
(Just AltJSON)
storageService
where go
= buildClient
(Proxy :: Proxy ObjectAccessControlsListResource)
mempty