{-# 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.Monitoring.Projects.Groups.Create -- 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) -- -- Creates a new group. -- -- /See:/ for @monitoring.projects.groups.create@. module Gogol.Monitoring.Projects.Groups.Create ( -- * Resource MonitoringProjectsGroupsCreateResource, -- ** Constructing a Request MonitoringProjectsGroupsCreate (..), newMonitoringProjectsGroupsCreate, ) where import Gogol.Monitoring.Types import Gogol.Prelude qualified as Core -- | A resource alias for @monitoring.projects.groups.create@ method which the -- 'MonitoringProjectsGroupsCreate' request conforms to. type MonitoringProjectsGroupsCreateResource = "v3" Core.:> Core.Capture "name" Core.Text Core.:> "groups" 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 "validateOnly" Core.Bool Core.:> Core.QueryParam "alt" Core.AltJSON Core.:> Core.ReqBody '[Core.JSON] Group Core.:> Core.Post '[Core.JSON] Group -- | Creates a new group. -- -- /See:/ 'newMonitoringProjectsGroupsCreate' smart constructor. data MonitoringProjectsGroupsCreate = MonitoringProjectsGroupsCreate { -- | V1 error format. xgafv :: (Core.Maybe Xgafv), -- | OAuth access token. accessToken :: (Core.Maybe Core.Text), -- | JSONP callback :: (Core.Maybe Core.Text), -- | Required. The project (https:\/\/cloud.google.com\/monitoring\/api\/v3#project/name) in which to create the group. The format is: projects\/[PROJECT/ID/OR/NUMBER] name :: Core.Text, -- | Multipart request metadata. payload :: Group, -- | 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), -- | If true, validate this request but do not create the group. validateOnly :: (Core.Maybe Core.Bool) } deriving (Core.Eq, Core.Show, Core.Generic) -- | Creates a value of 'MonitoringProjectsGroupsCreate' with the minimum fields required to make a request. newMonitoringProjectsGroupsCreate :: -- | Required. The project (https:\/\/cloud.google.com\/monitoring\/api\/v3#project/name) in which to create the group. The format is: projects\/[PROJECT/ID/OR/NUMBER] See 'name'. Core.Text -> -- | Multipart request metadata. See 'payload'. Group -> MonitoringProjectsGroupsCreate newMonitoringProjectsGroupsCreate name payload = MonitoringProjectsGroupsCreate { xgafv = Core.Nothing, accessToken = Core.Nothing, callback = Core.Nothing, name = name, payload = payload, uploadType = Core.Nothing, uploadProtocol = Core.Nothing, validateOnly = Core.Nothing } instance Core.GoogleRequest MonitoringProjectsGroupsCreate where type Rs MonitoringProjectsGroupsCreate = Group type Scopes MonitoringProjectsGroupsCreate = '[CloudPlatform'FullControl, Monitoring'FullControl] requestClient MonitoringProjectsGroupsCreate {..} = go name xgafv accessToken callback uploadType uploadProtocol validateOnly (Core.Just Core.AltJSON) payload monitoringService where go = Core.buildClient (Core.Proxy :: Core.Proxy MonitoringProjectsGroupsCreateResource) Core.mempty