unkai-storage-0.1.0.1: gen/Unkai/Storage/Projects/HmacKeys/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.Projects.HmacKeys.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)
--
-- Retrieves an HMAC key\'s metadata
--
-- /See:/ <https://developers.google.com/storage/docs/json_api/ Cloud Storage JSON API Reference> for @storage.projects.hmacKeys.get@.
module Unkai.Storage.Projects.HmacKeys.Get
( -- * Resource
StorageProjectsHmacKeysGetResource,
-- ** Constructing a Request
StorageProjectsHmacKeysGet (..),
newStorageProjectsHmacKeysGet,
)
where
import Unkai.Prelude qualified as Core
import Unkai.Storage.Types
-- | A resource alias for @storage.projects.hmacKeys.get@ method which the
-- 'StorageProjectsHmacKeysGet' request conforms to.
type StorageProjectsHmacKeysGetResource =
"storage"
Core.:> "v1"
Core.:> "projects"
Core.:> Core.Capture "projectId" Core.Text
Core.:> "hmacKeys"
Core.:> Core.Capture "accessId" Core.Text
Core.:> Core.QueryParam "userProject" Core.Text
Core.:> Core.QueryParam "alt" Core.AltJSON
Core.:> Core.Get '[Core.JSON] HmacKeyMetadata
-- | Retrieves an HMAC key\'s metadata
--
-- /See:/ 'newStorageProjectsHmacKeysGet' smart constructor.
data StorageProjectsHmacKeysGet = StorageProjectsHmacKeysGet
{ -- | Name of the HMAC key.
accessId :: Core.Text,
-- | Project ID owning the service account of the requested key.
projectId :: Core.Text,
-- | The project to be billed for this request.
userProject :: (Core.Maybe Core.Text)
}
deriving stock (Core.Eq, Core.Show, Core.Generic)
-- | Creates a value of 'StorageProjectsHmacKeysGet' with the minimum fields required to make a request.
newStorageProjectsHmacKeysGet ::
-- | Project ID owning the service account of the requested key. See 'projectId'.
Core.Text ->
-- | Name of the HMAC key. See 'accessId'.
Core.Text ->
StorageProjectsHmacKeysGet
newStorageProjectsHmacKeysGet projectId accessId =
StorageProjectsHmacKeysGet
{ accessId = accessId,
projectId = projectId,
userProject = Core.Nothing
}
instance Core.GoogleRequest StorageProjectsHmacKeysGet where
type Rs StorageProjectsHmacKeysGet = HmacKeyMetadata
type
Scopes StorageProjectsHmacKeysGet =
'[ CloudPlatform'FullControl,
CloudPlatform'ReadOnly,
Devstorage'FullControl,
Devstorage'ReadOnly
]
requestClient StorageProjectsHmacKeysGet {..} =
go
projectId
accessId
userProject
(Core.Just Core.AltJSON)
storageService
where
go =
Core.buildClient
(Core.Proxy :: Core.Proxy StorageProjectsHmacKeysGetResource)
Core.mempty