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\Apigee\Resource;
19
20use Google\Service\Apigee\GoogleCloudApigeeV1OptimizedStats;
21
22/**
23 * The "optimizedHostStats" collection of methods.
24 * Typical usage is:
25 *  <code>
26 *   $apigeeService = new Google\Service\Apigee(...);
27 *   $optimizedHostStats = $apigeeService->optimizedHostStats;
28 *  </code>
29 */
30class OrganizationsOptimizedHostStats extends \Google\Service\Resource
31{
32  /**
33   * Similar to GetHostStats except that the response is less verbose.
34   * (optimizedHostStats.get)
35   *
36   * @param string $name Required. Resource name for which the interactive query
37   * will be executed. Use the following format in your request:
38   * `organizations/{organization_id}/optimizedHostStats/{dimensions}` Dimensions
39   * let you view metrics in meaningful groupings, such as `apiproxy`,
40   * `target_host`. The value of dimensions should be a comma-separated list as
41   * shown below: `organizations/{org}/optimizedHostStats/apiproxy,request_verb`
42   * @param array $optParams Optional parameters.
43   *
44   * @opt_param string accuracy No longer used by Apigee. Supported for backwards
45   * compatibility.
46   * @opt_param string envgroupHostname Required. Hostname for which the
47   * interactive query will be executed.
48   * @opt_param string filter Filter that enables you to drill-down on specific
49   * dimension values.
50   * @opt_param string limit Maximum number of result items to return. The default
51   * and maximum value that can be returned is 14400.
52   * @opt_param string offset Offset value. Use `offset` with `limit` to enable
53   * pagination of results. For example, to display results 11-20, set limit to
54   * `10` and offset to `10`.
55   * @opt_param bool realtime No longer used by Apigee. Supported for backwards
56   * compatibility.
57   * @opt_param string select Required. Comma-separated list of metrics. For
58   * example: `sum(message_count),sum(error_count)`
59   * @opt_param string sort Flag that specifies whether the sort order should be
60   * ascending or descending. Valid values include `DESC` and `ASC`.
61   * @opt_param string sortby Comma-separated list of columns used to sort the
62   * final result.
63   * @opt_param string timeRange Required. Time interval for the interactive
64   * query. Time range is specified in GMT as `start~end`. For example:
65   * `04/15/2017 00:00~05/15/2017 23:59`.
66   * @opt_param string timeUnit Granularity of metrics returned. Valid values
67   * include: `second`, `minute`, `hour`, `day`, `week`, or `month`.
68   * @opt_param string topk Top number of results to return. For example, to
69   * return the top 5 results, set `topk=5`.
70   * @opt_param bool tsAscending Flag that specifies whether to list timestamps in
71   * ascending (`true`) or descending (`false`) order. Apigee recommends that you
72   * set this value to `true` if you are using `sortby` with `sort=DESC`.
73   * @opt_param string tzo Timezone offset value.
74   * @return GoogleCloudApigeeV1OptimizedStats
75   */
76  public function get($name, $optParams = [])
77  {
78    $params = ['name' => $name];
79    $params = array_merge($params, $optParams);
80    return $this->call('get', [$params], GoogleCloudApigeeV1OptimizedStats::class);
81  }
82}
83
84// Adding a class alias for backwards compatibility with the previous class name.
85class_alias(OrganizationsOptimizedHostStats::class, 'Google_Service_Apigee_Resource_OrganizationsOptimizedHostStats');
86