{-# 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.BucketAccessControls.Get
(
BucketAccessControlsGetResource
, bucketAccessControlsGet
, BucketAccessControlsGet
, bacgBucket
, bacgUserProject
, bacgEntity
) where
import Network.Google.Prelude
import Network.Google.Storage.Types
type BucketAccessControlsGetResource =
"storage" :>
"v1" :>
"b" :>
Capture "bucket" Text :>
"acl" :>
Capture "entity" Text :>
QueryParam "userProject" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] BucketAccessControl
data BucketAccessControlsGet = BucketAccessControlsGet'
{ _bacgBucket :: !Text
, _bacgUserProject :: !(Maybe Text)
, _bacgEntity :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
bucketAccessControlsGet
:: Text
-> Text
-> BucketAccessControlsGet
bucketAccessControlsGet pBacgBucket_ pBacgEntity_ =
BucketAccessControlsGet'
{ _bacgBucket = pBacgBucket_
, _bacgUserProject = Nothing
, _bacgEntity = pBacgEntity_
}
bacgBucket :: Lens' BucketAccessControlsGet Text
bacgBucket
= lens _bacgBucket (\ s a -> s{_bacgBucket = a})
bacgUserProject :: Lens' BucketAccessControlsGet (Maybe Text)
bacgUserProject
= lens _bacgUserProject
(\ s a -> s{_bacgUserProject = a})
bacgEntity :: Lens' BucketAccessControlsGet Text
bacgEntity
= lens _bacgEntity (\ s a -> s{_bacgEntity = a})
instance GoogleRequest BucketAccessControlsGet where
type Rs BucketAccessControlsGet = BucketAccessControl
type Scopes BucketAccessControlsGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/devstorage.full_control"]
requestClient BucketAccessControlsGet'{..}
= go _bacgBucket _bacgEntity _bacgUserProject
(Just AltJSON)
storageService
where go
= buildClient
(Proxy :: Proxy BucketAccessControlsGetResource)
mempty