{-# 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      : Gogol.Vault.Matters.Exports.Delete
-- Copyright   : (c) 2015-2025 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+gogol@gmail.com>
--               Toni Cebrián <toni@tonicebrian.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Deletes an export.
--
-- /See:/ <https://developers.google.com/vault Google Vault API Reference> for @vault.matters.exports.delete@.
module Gogol.Vault.Matters.Exports.Delete
  ( -- * Resource
    VaultMattersExportsDeleteResource,

    -- ** Constructing a Request
    VaultMattersExportsDelete (..),
    newVaultMattersExportsDelete,
  )
where

import Gogol.Prelude qualified as Core
import Gogol.Vault.Types

-- | A resource alias for @vault.matters.exports.delete@ method which the
-- 'VaultMattersExportsDelete' request conforms to.
type VaultMattersExportsDeleteResource =
  "v1"
    Core.:> "matters"
    Core.:> Core.Capture "matterId" Core.Text
    Core.:> "exports"
    Core.:> Core.Capture "exportId" Core.Text
    Core.:> Core.QueryParam "$.xgafv" Xgafv
    Core.:> Core.QueryParam "access_token" Core.Text
    Core.:> Core.QueryParam "callback" Core.Text
    Core.:> Core.QueryParam "uploadType" Core.Text
    Core.:> Core.QueryParam "upload_protocol" Core.Text
    Core.:> Core.QueryParam "alt" Core.AltJSON
    Core.:> Core.Delete '[Core.JSON] Empty

-- | Deletes an export.
--
-- /See:/ 'newVaultMattersExportsDelete' smart constructor.
data VaultMattersExportsDelete = VaultMattersExportsDelete
  { -- | V1 error format.
    VaultMattersExportsDelete -> Maybe Xgafv
xgafv :: (Core.Maybe Xgafv),
    -- | OAuth access token.
    VaultMattersExportsDelete -> Maybe Text
accessToken :: (Core.Maybe Core.Text),
    -- | JSONP
    VaultMattersExportsDelete -> Maybe Text
callback :: (Core.Maybe Core.Text),
    -- | The export ID.
    VaultMattersExportsDelete -> Text
exportId :: Core.Text,
    -- | The matter ID.
    VaultMattersExportsDelete -> Text
matterId :: Core.Text,
    -- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
    VaultMattersExportsDelete -> Maybe Text
uploadType :: (Core.Maybe Core.Text),
    -- | Upload protocol for media (e.g. \"raw\", \"multipart\").
    VaultMattersExportsDelete -> Maybe Text
uploadProtocol :: (Core.Maybe Core.Text)
  }
  deriving (VaultMattersExportsDelete -> VaultMattersExportsDelete -> Bool
(VaultMattersExportsDelete -> VaultMattersExportsDelete -> Bool)
-> (VaultMattersExportsDelete -> VaultMattersExportsDelete -> Bool)
-> Eq VaultMattersExportsDelete
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: VaultMattersExportsDelete -> VaultMattersExportsDelete -> Bool
== :: VaultMattersExportsDelete -> VaultMattersExportsDelete -> Bool
$c/= :: VaultMattersExportsDelete -> VaultMattersExportsDelete -> Bool
/= :: VaultMattersExportsDelete -> VaultMattersExportsDelete -> Bool
Core.Eq, Int -> VaultMattersExportsDelete -> ShowS
[VaultMattersExportsDelete] -> ShowS
VaultMattersExportsDelete -> String
(Int -> VaultMattersExportsDelete -> ShowS)
-> (VaultMattersExportsDelete -> String)
-> ([VaultMattersExportsDelete] -> ShowS)
-> Show VaultMattersExportsDelete
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> VaultMattersExportsDelete -> ShowS
showsPrec :: Int -> VaultMattersExportsDelete -> ShowS
$cshow :: VaultMattersExportsDelete -> String
show :: VaultMattersExportsDelete -> String
$cshowList :: [VaultMattersExportsDelete] -> ShowS
showList :: [VaultMattersExportsDelete] -> ShowS
Core.Show, (forall x.
 VaultMattersExportsDelete -> Rep VaultMattersExportsDelete x)
-> (forall x.
    Rep VaultMattersExportsDelete x -> VaultMattersExportsDelete)
-> Generic VaultMattersExportsDelete
forall x.
Rep VaultMattersExportsDelete x -> VaultMattersExportsDelete
forall x.
VaultMattersExportsDelete -> Rep VaultMattersExportsDelete x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
VaultMattersExportsDelete -> Rep VaultMattersExportsDelete x
from :: forall x.
VaultMattersExportsDelete -> Rep VaultMattersExportsDelete x
$cto :: forall x.
Rep VaultMattersExportsDelete x -> VaultMattersExportsDelete
to :: forall x.
Rep VaultMattersExportsDelete x -> VaultMattersExportsDelete
Core.Generic)

-- | Creates a value of 'VaultMattersExportsDelete' with the minimum fields required to make a request.
newVaultMattersExportsDelete ::
  -- |  The export ID. See 'exportId'.
  Core.Text ->
  -- |  The matter ID. See 'matterId'.
  Core.Text ->
  VaultMattersExportsDelete
newVaultMattersExportsDelete :: Text -> Text -> VaultMattersExportsDelete
newVaultMattersExportsDelete Text
exportId Text
matterId =
  VaultMattersExportsDelete
    { xgafv :: Maybe Xgafv
xgafv = Maybe Xgafv
forall a. Maybe a
Core.Nothing,
      accessToken :: Maybe Text
accessToken = Maybe Text
forall a. Maybe a
Core.Nothing,
      callback :: Maybe Text
callback = Maybe Text
forall a. Maybe a
Core.Nothing,
      exportId :: Text
exportId = Text
exportId,
      matterId :: Text
matterId = Text
matterId,
      uploadType :: Maybe Text
uploadType = Maybe Text
forall a. Maybe a
Core.Nothing,
      uploadProtocol :: Maybe Text
uploadProtocol = Maybe Text
forall a. Maybe a
Core.Nothing
    }

instance Core.GoogleRequest VaultMattersExportsDelete where
  type Rs VaultMattersExportsDelete = Empty
  type Scopes VaultMattersExportsDelete = '[Ediscovery'FullControl]
  requestClient :: VaultMattersExportsDelete -> GClient (Rs VaultMattersExportsDelete)
requestClient VaultMattersExportsDelete {Maybe Text
Maybe Xgafv
Text
xgafv :: VaultMattersExportsDelete -> Maybe Xgafv
accessToken :: VaultMattersExportsDelete -> Maybe Text
callback :: VaultMattersExportsDelete -> Maybe Text
exportId :: VaultMattersExportsDelete -> Text
matterId :: VaultMattersExportsDelete -> Text
uploadType :: VaultMattersExportsDelete -> Maybe Text
uploadProtocol :: VaultMattersExportsDelete -> Maybe Text
xgafv :: Maybe Xgafv
accessToken :: Maybe Text
callback :: Maybe Text
exportId :: Text
matterId :: Text
uploadType :: Maybe Text
uploadProtocol :: Maybe Text
..} =
    Text
-> Text
-> Maybe Xgafv
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AltJSON
-> ServiceConfig
-> GClient Empty
go
      Text
matterId
      Text
exportId
      Maybe Xgafv
xgafv
      Maybe Text
accessToken
      Maybe Text
callback
      Maybe Text
uploadType
      Maybe Text
uploadProtocol
      (AltJSON -> Maybe AltJSON
forall a. a -> Maybe a
Core.Just AltJSON
Core.AltJSON)
      ServiceConfig
vaultService
    where
      go :: Fn VaultMattersExportsDeleteResource
go =
        Proxy VaultMattersExportsDeleteResource
-> Request -> Fn VaultMattersExportsDeleteResource
forall {k} (fn :: k).
GoogleClient fn =>
Proxy fn -> Request -> Fn fn
Core.buildClient
          (Proxy VaultMattersExportsDeleteResource
forall {k} (t :: k). Proxy t
Core.Proxy :: Core.Proxy VaultMattersExportsDeleteResource)
          Request
forall a. Monoid a => a
Core.mempty