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\Playdeveloperreporting\Resource;
19
20use Google\Service\Playdeveloperreporting\GooglePlayDeveloperReportingV1beta1ListAnomaliesResponse;
21
22/**
23 * The "anomalies" collection of methods.
24 * Typical usage is:
25 *  <code>
26 *   $playdeveloperreportingService = new Google\Service\Playdeveloperreporting(...);
27 *   $anomalies = $playdeveloperreportingService->anomalies;
28 *  </code>
29 */
30class Anomalies extends \Google\Service\Resource
31{
32  /**
33   * Lists anomalies in any of the datasets. (anomalies.listAnomalies)
34   *
35   * @param string $parent Required. Parent app for which anomalies were detected.
36   * Format: apps/{app}
37   * @param array $optParams Optional parameters.
38   *
39   * @opt_param string filter Filtering criteria for anomalies. For basic filter
40   * guidance, please check: https://google.aip.dev/160. **Supported functions:**
41   * * `activeBetween(startTime, endTime)`: If specified, only list anomalies that
42   * were active in between `startTime` (inclusive) and `endTime` (exclusive).
43   * Both parameters are expected to conform to an RFC-3339 formatted string (e.g.
44   * `2012-04-21T11:30:00-04:00`). UTC offsets are supported. Both `startTime` and
45   * `endTime` accept the special value `UNBOUNDED`, to signify intervals with no
46   * lower or upper bound, respectively. Examples: *
47   * `activeBetween("2021-04-21T11:30:00Z", "2021-07-21T00:00:00Z")` *
48   * `activeBetween(UNBOUNDED, "2021-11-21T00:00:00-04:00")` *
49   * `activeBetween("2021-07-21T00:00:00-04:00", UNBOUNDED)`
50   * @opt_param int pageSize Maximum size of the returned data. If unspecified, at
51   * most 10 anomalies will be returned. The maximum value is 100; values above
52   * 100 will be coerced to 100.
53   * @opt_param string pageToken A page token, received from a previous
54   * `ListErrorReports` call. Provide this to retrieve the subsequent page. When
55   * paginating, all other parameters provided to `ListErrorReports` must match
56   * the call that provided the page token.
57   * @return GooglePlayDeveloperReportingV1beta1ListAnomaliesResponse
58   */
59  public function listAnomalies($parent, $optParams = [])
60  {
61    $params = ['parent' => $parent];
62    $params = array_merge($params, $optParams);
63    return $this->call('list', [$params], GooglePlayDeveloperReportingV1beta1ListAnomaliesResponse::class);
64  }
65}
66
67// Adding a class alias for backwards compatibility with the previous class name.
68class_alias(Anomalies::class, 'Google_Service_Playdeveloperreporting_Resource_Anomalies');
69