source: vendor/google/apiclient-services/src/Monitoring/Resource/ProjectsNotificationChannelDescriptors.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 6 weeks ago

Upload project files

  • Property mode set to 100644
File size: 3.5 KB
Line 
1<?php
2/*
3 * Copyright 2014 Google Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy of
7 * the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17
18namespace Google\Service\Monitoring\Resource;
19
20use Google\Service\Monitoring\ListNotificationChannelDescriptorsResponse;
21use Google\Service\Monitoring\NotificationChannelDescriptor;
22
23/**
24 * The "notificationChannelDescriptors" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $monitoringService = new Google\Service\Monitoring(...);
28 * $notificationChannelDescriptors = $monitoringService->projects_notificationChannelDescriptors;
29 * </code>
30 */
31class ProjectsNotificationChannelDescriptors extends \Google\Service\Resource
32{
33 /**
34 * Gets a single channel descriptor. The descriptor indicates which fields are
35 * expected / permitted for a notification channel of the given type.
36 * (notificationChannelDescriptors.get)
37 *
38 * @param string $name Required. The channel type for which to execute the
39 * request. The format is:
40 * projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[CHANNEL_TYPE]
41 * @param array $optParams Optional parameters.
42 * @return NotificationChannelDescriptor
43 * @throws \Google\Service\Exception
44 */
45 public function get($name, $optParams = [])
46 {
47 $params = ['name' => $name];
48 $params = array_merge($params, $optParams);
49 return $this->call('get', [$params], NotificationChannelDescriptor::class);
50 }
51 /**
52 * Lists the descriptors for supported channel types. The use of descriptors
53 * makes it possible for new channel types to be dynamically added.
54 * (notificationChannelDescriptors.listProjectsNotificationChannelDescriptors)
55 *
56 * @param string $name Required. The REST resource name of the parent from which
57 * to retrieve the notification channel descriptors. The expected syntax is:
58 * projects/[PROJECT_ID_OR_NUMBER] Note that this names
59 * (https://cloud.google.com/monitoring/api/v3#project_name) the parent
60 * container in which to look for the descriptors; to retrieve a single
61 * descriptor by name, use the GetNotificationChannelDescriptor operation,
62 * instead.
63 * @param array $optParams Optional parameters.
64 *
65 * @opt_param int pageSize The maximum number of results to return in a single
66 * response. If not set to a positive number, a reasonable value will be chosen
67 * by the service.
68 * @opt_param string pageToken If non-empty, page_token must contain a value
69 * returned as the next_page_token in a previous response to request the next
70 * set of results.
71 * @return ListNotificationChannelDescriptorsResponse
72 * @throws \Google\Service\Exception
73 */
74 public function listProjectsNotificationChannelDescriptors($name, $optParams = [])
75 {
76 $params = ['name' => $name];
77 $params = array_merge($params, $optParams);
78 return $this->call('list', [$params], ListNotificationChannelDescriptorsResponse::class);
79 }
80}
81
82// Adding a class alias for backwards compatibility with the previous class name.
83class_alias(ProjectsNotificationChannelDescriptors::class, 'Google_Service_Monitoring_Resource_ProjectsNotificationChannelDescriptors');
Note: See TracBrowser for help on using the repository browser.