{-# 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.Get
-- 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)
--
-- Gets the specified matter.
--
-- /See:/ <https://developers.google.com/vault Google Vault API Reference> for @vault.matters.get@.
module Gogol.Vault.Matters.Get
  ( -- * Resource
    VaultMattersGetResource,

    -- ** Constructing a Request
    VaultMattersGet (..),
    newVaultMattersGet,
  )
where

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

-- | A resource alias for @vault.matters.get@ method which the
-- 'VaultMattersGet' request conforms to.
type VaultMattersGetResource =
  "v1"
    Core.:> "matters"
    Core.:> Core.Capture "matterId" 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 "view" MattersGetView
    Core.:> Core.QueryParam "alt" Core.AltJSON
    Core.:> Core.Get '[Core.JSON] Matter

-- | Gets the specified matter.
--
-- /See:/ 'newVaultMattersGet' smart constructor.
data VaultMattersGet = VaultMattersGet
  { -- | V1 error format.
    VaultMattersGet -> Maybe Xgafv
xgafv :: (Core.Maybe Xgafv),
    -- | OAuth access token.
    VaultMattersGet -> Maybe Text
accessToken :: (Core.Maybe Core.Text),
    -- | JSONP
    VaultMattersGet -> Maybe Text
callback :: (Core.Maybe Core.Text),
    -- | The matter ID.
    VaultMattersGet -> Text
matterId :: Core.Text,
    -- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
    VaultMattersGet -> Maybe Text
uploadType :: (Core.Maybe Core.Text),
    -- | Upload protocol for media (e.g. \"raw\", \"multipart\").
    VaultMattersGet -> Maybe Text
uploadProtocol :: (Core.Maybe Core.Text),
    -- | Specifies how much information about the matter to return in the response.
    VaultMattersGet -> Maybe MattersGetView
view :: (Core.Maybe MattersGetView)
  }
  deriving (VaultMattersGet -> VaultMattersGet -> Bool
(VaultMattersGet -> VaultMattersGet -> Bool)
-> (VaultMattersGet -> VaultMattersGet -> Bool)
-> Eq VaultMattersGet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: VaultMattersGet -> VaultMattersGet -> Bool
== :: VaultMattersGet -> VaultMattersGet -> Bool
$c/= :: VaultMattersGet -> VaultMattersGet -> Bool
/= :: VaultMattersGet -> VaultMattersGet -> Bool
Core.Eq, Int -> VaultMattersGet -> ShowS
[VaultMattersGet] -> ShowS
VaultMattersGet -> String
(Int -> VaultMattersGet -> ShowS)
-> (VaultMattersGet -> String)
-> ([VaultMattersGet] -> ShowS)
-> Show VaultMattersGet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> VaultMattersGet -> ShowS
showsPrec :: Int -> VaultMattersGet -> ShowS
$cshow :: VaultMattersGet -> String
show :: VaultMattersGet -> String
$cshowList :: [VaultMattersGet] -> ShowS
showList :: [VaultMattersGet] -> ShowS
Core.Show, (forall x. VaultMattersGet -> Rep VaultMattersGet x)
-> (forall x. Rep VaultMattersGet x -> VaultMattersGet)
-> Generic VaultMattersGet
forall x. Rep VaultMattersGet x -> VaultMattersGet
forall x. VaultMattersGet -> Rep VaultMattersGet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. VaultMattersGet -> Rep VaultMattersGet x
from :: forall x. VaultMattersGet -> Rep VaultMattersGet x
$cto :: forall x. Rep VaultMattersGet x -> VaultMattersGet
to :: forall x. Rep VaultMattersGet x -> VaultMattersGet
Core.Generic)

-- | Creates a value of 'VaultMattersGet' with the minimum fields required to make a request.
newVaultMattersGet ::
  -- |  The matter ID. See 'matterId'.
  Core.Text ->
  VaultMattersGet
newVaultMattersGet :: Text -> VaultMattersGet
newVaultMattersGet Text
matterId =
  VaultMattersGet
    { 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,
      uploadType :: Maybe Text
uploadType = Maybe Text
forall a. Maybe a
Core.Nothing,
      uploadProtocol :: Maybe Text
uploadProtocol = Maybe Text
forall a. Maybe a
Core.Nothing,
      view :: Maybe MattersGetView
view = Maybe MattersGetView
forall a. Maybe a
Core.Nothing
    }

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