{-# 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.List
-- 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)
--
-- Lists details about the exports in the specified matter.
--
-- /See:/ <https://developers.google.com/vault Google Vault API Reference> for @vault.matters.exports.list@.
module Gogol.Vault.Matters.Exports.List
  ( -- * Resource
    VaultMattersExportsListResource,

    -- ** Constructing a Request
    VaultMattersExportsList (..),
    newVaultMattersExportsList,
  )
where

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

-- | A resource alias for @vault.matters.exports.list@ method which the
-- 'VaultMattersExportsList' request conforms to.
type VaultMattersExportsListResource =
  "v1"
    Core.:> "matters"
    Core.:> Core.Capture "matterId" Core.Text
    Core.:> "exports"
    Core.:> Core.QueryParam "$.xgafv" Xgafv
    Core.:> Core.QueryParam "access_token" Core.Text
    Core.:> Core.QueryParam "callback" Core.Text
    Core.:> Core.QueryParam "pageSize" Core.Int32
    Core.:> Core.QueryParam "pageToken" Core.Text
    Core.:> Core.QueryParam "uploadType" Core.Text
    Core.:> Core.QueryParam "upload_protocol" Core.Text
    Core.:> Core.QueryParam "alt" Core.AltJSON
    Core.:> Core.Get '[Core.JSON] ListExportsResponse

-- | Lists details about the exports in the specified matter.
--
-- /See:/ 'newVaultMattersExportsList' smart constructor.
data VaultMattersExportsList = VaultMattersExportsList
  { -- | V1 error format.
    VaultMattersExportsList -> Maybe Xgafv
xgafv :: (Core.Maybe Xgafv),
    -- | OAuth access token.
    VaultMattersExportsList -> Maybe Text
accessToken :: (Core.Maybe Core.Text),
    -- | JSONP
    VaultMattersExportsList -> Maybe Text
callback :: (Core.Maybe Core.Text),
    -- | The matter ID.
    VaultMattersExportsList -> Text
matterId :: Core.Text,
    -- | The number of exports to return in the response.
    VaultMattersExportsList -> Maybe Int32
pageSize :: (Core.Maybe Core.Int32),
    -- | The pagination token as returned in the response.
    VaultMattersExportsList -> Maybe Text
pageToken :: (Core.Maybe Core.Text),
    -- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
    VaultMattersExportsList -> Maybe Text
uploadType :: (Core.Maybe Core.Text),
    -- | Upload protocol for media (e.g. \"raw\", \"multipart\").
    VaultMattersExportsList -> Maybe Text
uploadProtocol :: (Core.Maybe Core.Text)
  }
  deriving (VaultMattersExportsList -> VaultMattersExportsList -> Bool
(VaultMattersExportsList -> VaultMattersExportsList -> Bool)
-> (VaultMattersExportsList -> VaultMattersExportsList -> Bool)
-> Eq VaultMattersExportsList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: VaultMattersExportsList -> VaultMattersExportsList -> Bool
== :: VaultMattersExportsList -> VaultMattersExportsList -> Bool
$c/= :: VaultMattersExportsList -> VaultMattersExportsList -> Bool
/= :: VaultMattersExportsList -> VaultMattersExportsList -> Bool
Core.Eq, Int -> VaultMattersExportsList -> ShowS
[VaultMattersExportsList] -> ShowS
VaultMattersExportsList -> String
(Int -> VaultMattersExportsList -> ShowS)
-> (VaultMattersExportsList -> String)
-> ([VaultMattersExportsList] -> ShowS)
-> Show VaultMattersExportsList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> VaultMattersExportsList -> ShowS
showsPrec :: Int -> VaultMattersExportsList -> ShowS
$cshow :: VaultMattersExportsList -> String
show :: VaultMattersExportsList -> String
$cshowList :: [VaultMattersExportsList] -> ShowS
showList :: [VaultMattersExportsList] -> ShowS
Core.Show, (forall x.
 VaultMattersExportsList -> Rep VaultMattersExportsList x)
-> (forall x.
    Rep VaultMattersExportsList x -> VaultMattersExportsList)
-> Generic VaultMattersExportsList
forall x. Rep VaultMattersExportsList x -> VaultMattersExportsList
forall x. VaultMattersExportsList -> Rep VaultMattersExportsList x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. VaultMattersExportsList -> Rep VaultMattersExportsList x
from :: forall x. VaultMattersExportsList -> Rep VaultMattersExportsList x
$cto :: forall x. Rep VaultMattersExportsList x -> VaultMattersExportsList
to :: forall x. Rep VaultMattersExportsList x -> VaultMattersExportsList
Core.Generic)

-- | Creates a value of 'VaultMattersExportsList' with the minimum fields required to make a request.
newVaultMattersExportsList ::
  -- |  The matter ID. See 'matterId'.
  Core.Text ->
  VaultMattersExportsList
newVaultMattersExportsList :: Text -> VaultMattersExportsList
newVaultMattersExportsList Text
matterId =
  VaultMattersExportsList
    { 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,
      matterId :: Text
matterId = Text
matterId,
      pageSize :: Maybe Int32
pageSize = Maybe Int32
forall a. Maybe a
Core.Nothing,
      pageToken :: Maybe Text
pageToken = Maybe Text
forall a. Maybe a
Core.Nothing,
      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 VaultMattersExportsList where
  type Rs VaultMattersExportsList = ListExportsResponse
  type
    Scopes VaultMattersExportsList =
      '[Ediscovery'FullControl, Ediscovery'Readonly]
  requestClient :: VaultMattersExportsList -> GClient (Rs VaultMattersExportsList)
requestClient VaultMattersExportsList {Maybe Int32
Maybe Text
Maybe Xgafv
Text
xgafv :: VaultMattersExportsList -> Maybe Xgafv
accessToken :: VaultMattersExportsList -> Maybe Text
callback :: VaultMattersExportsList -> Maybe Text
matterId :: VaultMattersExportsList -> Text
pageSize :: VaultMattersExportsList -> Maybe Int32
pageToken :: VaultMattersExportsList -> Maybe Text
uploadType :: VaultMattersExportsList -> Maybe Text
uploadProtocol :: VaultMattersExportsList -> Maybe Text
xgafv :: Maybe Xgafv
accessToken :: Maybe Text
callback :: Maybe Text
matterId :: Text
pageSize :: Maybe Int32
pageToken :: Maybe Text
uploadType :: Maybe Text
uploadProtocol :: Maybe Text
..} =
    Text
-> Maybe Xgafv
-> Maybe Text
-> Maybe Text
-> Maybe Int32
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AltJSON
-> ServiceConfig
-> GClient ListExportsResponse
go
      Text
matterId
      Maybe Xgafv
xgafv
      Maybe Text
accessToken
      Maybe Text
callback
      Maybe Int32
pageSize
      Maybe Text
pageToken
      Maybe Text
uploadType
      Maybe Text
uploadProtocol
      (AltJSON -> Maybe AltJSON
forall a. a -> Maybe a
Core.Just AltJSON
Core.AltJSON)
      ServiceConfig
vaultService
    where
      go :: Fn VaultMattersExportsListResource
go =
        Proxy VaultMattersExportsListResource
-> Request -> Fn VaultMattersExportsListResource
forall {k} (fn :: k).
GoogleClient fn =>
Proxy fn -> Request -> Fn fn
Core.buildClient
          (Proxy VaultMattersExportsListResource
forall {k} (t :: k). Proxy t
Core.Proxy :: Core.Proxy VaultMattersExportsListResource)
          Request
forall a. Monoid a => a
Core.mempty