{-# 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.Chat.Spaces.Get -- Copyright : (c) 2015-2025 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay -- Toni Cebrián -- Stability : auto-generated -- Portability : non-portable (GHC extensions) -- -- Returns details about a space. For an example, see . Supports the following types of : - - You can authenticate and authorize this method with administrator privileges by setting the @use_admin_access@ field in the request. -- -- /See:/ for @chat.spaces.get@. module Gogol.Chat.Spaces.Get ( -- * Resource ChatSpacesGetResource, -- ** Constructing a Request ChatSpacesGet (..), newChatSpacesGet, ) where import Gogol.Chat.Types import Gogol.Prelude qualified as Core -- | A resource alias for @chat.spaces.get@ method which the -- 'ChatSpacesGet' request conforms to. type ChatSpacesGetResource = "v1" Core.:> Core.Capture "name" 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 "useAdminAccess" Core.Bool Core.:> Core.QueryParam "alt" Core.AltJSON Core.:> Core.Get '[Core.JSON] Space -- | Returns details about a space. For an example, see . Supports the following types of : - - You can authenticate and authorize this method with administrator privileges by setting the @use_admin_access@ field in the request. -- -- /See:/ 'newChatSpacesGet' smart constructor. data ChatSpacesGet = ChatSpacesGet { -- | V1 error format. xgafv :: (Core.Maybe Xgafv), -- | OAuth access token. accessToken :: (Core.Maybe Core.Text), -- | JSONP callback :: (Core.Maybe Core.Text), -- | Required. Resource name of the space, in the form @spaces\/{space}@. Format: @spaces\/{space}@ name :: Core.Text, -- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). uploadType :: (Core.Maybe Core.Text), -- | Upload protocol for media (e.g. \"raw\", \"multipart\"). uploadProtocol :: (Core.Maybe Core.Text), -- | Optional. When @true@, the method runs using the user\'s Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the . Requires the @chat.admin.spaces@ or @chat.admin.spaces.readonly@ . useAdminAccess :: (Core.Maybe Core.Bool) } deriving (Core.Eq, Core.Show, Core.Generic) -- | Creates a value of 'ChatSpacesGet' with the minimum fields required to make a request. newChatSpacesGet :: -- | Required. Resource name of the space, in the form @spaces\/{space}@. Format: @spaces\/{space}@ See 'name'. Core.Text -> ChatSpacesGet newChatSpacesGet name = ChatSpacesGet { xgafv = Core.Nothing, accessToken = Core.Nothing, callback = Core.Nothing, name = name, uploadType = Core.Nothing, uploadProtocol = Core.Nothing, useAdminAccess = Core.Nothing } instance Core.GoogleRequest ChatSpacesGet where type Rs ChatSpacesGet = Space type Scopes ChatSpacesGet = '[ Chat'Admin'Spaces, Chat'Admin'Spaces'Readonly, Chat'App'Spaces, Chat'Bot, Chat'Spaces, Chat'Spaces'Readonly ] requestClient ChatSpacesGet {..} = go name xgafv accessToken callback uploadType uploadProtocol useAdminAccess (Core.Just Core.AltJSON) chatService where go = Core.buildClient (Core.Proxy :: Core.Proxy ChatSpacesGetResource) Core.mempty