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\ListGroupMembersResponse;
21
22/**
23 * The "members" collection of methods.
24 * Typical usage is:
25 *  <code>
26 *   $monitoringService = new Google\Service\Monitoring(...);
27 *   $members = $monitoringService->members;
28 *  </code>
29 */
30class ProjectsGroupsMembers extends \Google\Service\Resource
31{
32  /**
33   * Lists the monitored resources that are members of a group.
34   * (members.listProjectsGroupsMembers)
35   *
36   * @param string $name Required. The group whose members are listed. The format
37   * is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]
38   * @param array $optParams Optional parameters.
39   *
40   * @opt_param string filter An optional list filter
41   * (https://cloud.google.com/monitoring/api/learn_more#filtering) describing the
42   * members to be returned. The filter may reference the type, labels, and
43   * metadata of monitored resources that comprise the group. For example, to
44   * return only resources representing Compute Engine VM instances, use this
45   * filter: `resource.type = "gce_instance"`
46   * @opt_param string interval.endTime Required. The end of the time interval.
47   * @opt_param string interval.startTime Optional. The beginning of the time
48   * interval. The default value for the start time is the end time. The start
49   * time must not be later than the end time.
50   * @opt_param int pageSize A positive number that is the maximum number of
51   * results to return.
52   * @opt_param string pageToken If this field is not empty then it must contain
53   * the next_page_token value returned by a previous call to this method. Using
54   * this field causes the method to return additional results from the previous
55   * method call.
56   * @return ListGroupMembersResponse
57   */
58  public function listProjectsGroupsMembers($name, $optParams = [])
59  {
60    $params = ['name' => $name];
61    $params = array_merge($params, $optParams);
62    return $this->call('list', [$params], ListGroupMembersResponse::class);
63  }
64}
65
66// Adding a class alias for backwards compatibility with the previous class name.
67class_alias(ProjectsGroupsMembers::class, 'Google_Service_Monitoring_Resource_ProjectsGroupsMembers');
68