unkai-storage-0.1.0.1: gen/Unkai/Storage/BucketAccessControls/Get.hs
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE ImportQualifiedPost #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- |
-- Module : Unkai.Storage.BucketAccessControls.Get
-- Copyright : (c) 2015-2025 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
-- Maintainer : Nadeem Bitar <nadeem@gmail.com>
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns the ACL entry for the specified entity on the specified bucket.
--
-- /See:/ <https://developers.google.com/storage/docs/json_api/ Cloud Storage JSON API Reference> for @storage.bucketAccessControls.get@.
module Unkai.Storage.BucketAccessControls.Get
( -- * Resource
StorageBucketAccessControlsGetResource,
-- ** Constructing a Request
StorageBucketAccessControlsGet (..),
newStorageBucketAccessControlsGet,
)
where
import Unkai.Prelude qualified as Core
import Unkai.Storage.Types
-- | A resource alias for @storage.bucketAccessControls.get@ method which the
-- 'StorageBucketAccessControlsGet' request conforms to.
type StorageBucketAccessControlsGetResource =
"storage"
Core.:> "v1"
Core.:> "b"
Core.:> Core.Capture "bucket" Core.Text
Core.:> "acl"
Core.:> Core.Capture "entity" Core.Text
Core.:> Core.QueryParam "userProject" Core.Text
Core.:> Core.QueryParam "alt" Core.AltJSON
Core.:> Core.Get '[Core.JSON] BucketAccessControl
-- | Returns the ACL entry for the specified entity on the specified bucket.
--
-- /See:/ 'newStorageBucketAccessControlsGet' smart constructor.
data StorageBucketAccessControlsGet = StorageBucketAccessControlsGet
{ -- | Name of a bucket.
bucket :: Core.Text,
-- | The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
entity :: Core.Text,
-- | The project to be billed for this request. Required for Requester Pays buckets.
userProject :: (Core.Maybe Core.Text)
}
deriving stock (Core.Eq, Core.Show, Core.Generic)
-- | Creates a value of 'StorageBucketAccessControlsGet' with the minimum fields required to make a request.
newStorageBucketAccessControlsGet ::
-- | Name of a bucket. See 'bucket'.
Core.Text ->
-- | The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. See 'entity'.
Core.Text ->
StorageBucketAccessControlsGet
newStorageBucketAccessControlsGet bucket entity =
StorageBucketAccessControlsGet
{ bucket = bucket,
entity = entity,
userProject = Core.Nothing
}
instance Core.GoogleRequest StorageBucketAccessControlsGet where
type Rs StorageBucketAccessControlsGet = BucketAccessControl
type
Scopes StorageBucketAccessControlsGet =
'[CloudPlatform'FullControl, Devstorage'FullControl]
requestClient StorageBucketAccessControlsGet {..} =
go
bucket
entity
userProject
(Core.Just Core.AltJSON)
storageService
where
go =
Core.buildClient
(Core.Proxy :: Core.Proxy StorageBucketAccessControlsGetResource)
Core.mempty