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\Clouderrorreporting\Resource;
19
20use Google\Service\Clouderrorreporting\ListGroupStatsResponse;
21
22/**
23 * The "groupStats" collection of methods.
24 * Typical usage is:
25 *  <code>
26 *   $clouderrorreportingService = new Google\Service\Clouderrorreporting(...);
27 *   $groupStats = $clouderrorreportingService->groupStats;
28 *  </code>
29 */
30class ProjectsGroupStats extends \Google\Service\Resource
31{
32  /**
33   * Lists the specified groups. (groupStats.listProjectsGroupStats)
34   *
35   * @param string $projectName Required. The resource name of the Google Cloud
36   * Platform project. Written as `projects/{projectID}` or
37   * `projects/{projectNumber}`, where `{projectID}` and `{projectNumber}` can be
38   * found in the [Google Cloud
39   * Console](https://support.google.com/cloud/answer/6158840). Examples:
40   * `projects/my-project-123`, `projects/5551234`.
41   * @param array $optParams Optional parameters.
42   *
43   * @opt_param string alignment Optional. The alignment of the timed counts to be
44   * returned. Default is `ALIGNMENT_EQUAL_AT_END`.
45   * @opt_param string alignmentTime Optional. Time where the timed counts shall
46   * be aligned if rounded alignment is chosen. Default is 00:00 UTC.
47   * @opt_param string groupId Optional. List all ErrorGroupStats with these IDs.
48   * @opt_param string order Optional. The sort order in which the results are
49   * returned. Default is `COUNT_DESC`.
50   * @opt_param int pageSize Optional. The maximum number of results to return per
51   * response. Default is 20.
52   * @opt_param string pageToken Optional. A `next_page_token` provided by a
53   * previous response. To view additional results, pass this token along with the
54   * identical query parameters as the first request.
55   * @opt_param string serviceFilter.resourceType Optional. The exact value to
56   * match against [`ServiceContext.resource_type`](/error-
57   * reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type).
58   * @opt_param string serviceFilter.service Optional. The exact value to match
59   * against [`ServiceContext.service`](/error-
60   * reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service).
61   * @opt_param string serviceFilter.version Optional. The exact value to match
62   * against [`ServiceContext.version`](/error-
63   * reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version).
64   * @opt_param string timeRange.period Restricts the query to the specified time
65   * range.
66   * @opt_param string timedCountDuration Optional. The preferred duration for a
67   * single returned `TimedCount`. If not set, no timed counts are returned.
68   * @return ListGroupStatsResponse
69   */
70  public function listProjectsGroupStats($projectName, $optParams = [])
71  {
72    $params = ['projectName' => $projectName];
73    $params = array_merge($params, $optParams);
74    return $this->call('list', [$params], ListGroupStatsResponse::class);
75  }
76}
77
78// Adding a class alias for backwards compatibility with the previous class name.
79class_alias(ProjectsGroupStats::class, 'Google_Service_Clouderrorreporting_Resource_ProjectsGroupStats');
80