{-# 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.Holds.Accounts.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)
--
-- Removes an account from a hold.
--
-- /See:/ <https://developers.google.com/vault Google Vault API Reference> for @vault.matters.holds.accounts.delete@.
module Gogol.Vault.Matters.Holds.Accounts.Delete
  ( -- * Resource
    VaultMattersHoldsAccountsDeleteResource,

    -- ** Constructing a Request
    VaultMattersHoldsAccountsDelete (..),
    newVaultMattersHoldsAccountsDelete,
  )
where

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

-- | A resource alias for @vault.matters.holds.accounts.delete@ method which the
-- 'VaultMattersHoldsAccountsDelete' request conforms to.
type VaultMattersHoldsAccountsDeleteResource =
  "v1"
    Core.:> "matters"
    Core.:> Core.Capture "matterId" Core.Text
    Core.:> "holds"
    Core.:> Core.Capture "holdId" Core.Text
    Core.:> "accounts"
    Core.:> Core.Capture "accountId" 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

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

-- | Creates a value of 'VaultMattersHoldsAccountsDelete' with the minimum fields required to make a request.
newVaultMattersHoldsAccountsDelete ::
  -- |  The ID of the account to remove from the hold. See 'accountId'.
  Core.Text ->
  -- |  The hold ID. See 'holdId'.
  Core.Text ->
  -- |  The matter ID. See 'matterId'.
  Core.Text ->
  VaultMattersHoldsAccountsDelete
newVaultMattersHoldsAccountsDelete :: Text -> Text -> Text -> VaultMattersHoldsAccountsDelete
newVaultMattersHoldsAccountsDelete Text
accountId Text
holdId Text
matterId =
  VaultMattersHoldsAccountsDelete
    { xgafv :: Maybe Xgafv
xgafv = Maybe Xgafv
forall a. Maybe a
Core.Nothing,
      accessToken :: Maybe Text
accessToken = Maybe Text
forall a. Maybe a
Core.Nothing,
      accountId :: Text
accountId = Text
accountId,
      callback :: Maybe Text
callback = Maybe Text
forall a. Maybe a
Core.Nothing,
      holdId :: Text
holdId = Text
holdId,
      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 VaultMattersHoldsAccountsDelete where
  type Rs VaultMattersHoldsAccountsDelete = Empty
  type
    Scopes VaultMattersHoldsAccountsDelete =
      '[Ediscovery'FullControl]
  requestClient :: VaultMattersHoldsAccountsDelete
-> GClient (Rs VaultMattersHoldsAccountsDelete)
requestClient VaultMattersHoldsAccountsDelete {Maybe Text
Maybe Xgafv
Text
xgafv :: VaultMattersHoldsAccountsDelete -> Maybe Xgafv
accessToken :: VaultMattersHoldsAccountsDelete -> Maybe Text
accountId :: VaultMattersHoldsAccountsDelete -> Text
callback :: VaultMattersHoldsAccountsDelete -> Maybe Text
holdId :: VaultMattersHoldsAccountsDelete -> Text
matterId :: VaultMattersHoldsAccountsDelete -> Text
uploadType :: VaultMattersHoldsAccountsDelete -> Maybe Text
uploadProtocol :: VaultMattersHoldsAccountsDelete -> Maybe Text
xgafv :: Maybe Xgafv
accessToken :: Maybe Text
accountId :: Text
callback :: Maybe Text
holdId :: Text
matterId :: Text
uploadType :: Maybe Text
uploadProtocol :: Maybe Text
..} =
    Text
-> Text
-> Text
-> Maybe Xgafv
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AltJSON
-> ServiceConfig
-> GClient Empty
go
      Text
matterId
      Text
holdId
      Text
accountId
      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 VaultMattersHoldsAccountsDeleteResource
go =
        Proxy VaultMattersHoldsAccountsDeleteResource
-> Request -> Fn VaultMattersHoldsAccountsDeleteResource
forall {k} (fn :: k).
GoogleClient fn =>
Proxy fn -> Request -> Fn fn
Core.buildClient
          (Proxy VaultMattersHoldsAccountsDeleteResource
forall {k} (t :: k). Proxy t
Core.Proxy :: Core.Proxy VaultMattersHoldsAccountsDeleteResource)
          Request
forall a. Monoid a => a
Core.mempty