packages feed

unkai-storage-0.1.0.1: gen/Unkai/Storage/RapidCaches/Disable.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.RapidCaches.Disable
-- 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)
--
-- Disables a Rapid Cache instance.
--
-- /See:/ <https://developers.google.com/storage/docs/json_api/ Cloud Storage JSON API Reference> for @storage.rapidCaches.disable@.
module Unkai.Storage.RapidCaches.Disable
  ( -- * Resource
    StorageRapidCachesDisableResource,

    -- ** Constructing a Request
    StorageRapidCachesDisable (..),
    newStorageRapidCachesDisable,
  )
where

import Unkai.Prelude qualified as Core
import Unkai.Storage.Types

-- | A resource alias for @storage.rapidCaches.disable@ method which the
-- 'StorageRapidCachesDisable' request conforms to.
type StorageRapidCachesDisableResource =
  "storage"
    Core.:> "v1"
    Core.:> "b"
    Core.:> Core.Capture "bucket" Core.Text
    Core.:> "rapidCaches"
    Core.:> Core.Capture "rapidCacheId" Core.Text
    Core.:> "disable"
    Core.:> Core.QueryParam "alt" Core.AltJSON
    Core.:> Core.Post '[Core.JSON] GoogleLongrunningOperation

-- | Disables a Rapid Cache instance.
--
-- /See:/ 'newStorageRapidCachesDisable' smart constructor.
data StorageRapidCachesDisable = StorageRapidCachesDisable
  { -- | Name of the parent bucket.
    bucket :: Core.Text,
    -- | The ID of the requested Rapid Cache instance.
    rapidCacheId :: Core.Text
  }
  deriving stock (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'StorageRapidCachesDisable' with the minimum fields required to make a request.
newStorageRapidCachesDisable ::
  -- |  Name of the parent bucket. See 'bucket'.
  Core.Text ->
  -- |  The ID of the requested Rapid Cache instance. See 'rapidCacheId'.
  Core.Text ->
  StorageRapidCachesDisable
newStorageRapidCachesDisable bucket rapidCacheId =
  StorageRapidCachesDisable
    { bucket = bucket,
      rapidCacheId = rapidCacheId
    }

instance Core.GoogleRequest StorageRapidCachesDisable where
  type Rs StorageRapidCachesDisable = GoogleLongrunningOperation
  type
    Scopes StorageRapidCachesDisable =
      '[ CloudPlatform'FullControl,
         Devstorage'FullControl,
         Devstorage'ReadWrite
       ]
  requestClient StorageRapidCachesDisable {..} =
    go bucket rapidCacheId (Core.Just Core.AltJSON) storageService
    where
      go =
        Core.buildClient
          (Core.Proxy :: Core.Proxy StorageRapidCachesDisableResource)
          Core.mempty