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 |
|
---|
18 | namespace Google\Service\BusinessProfilePerformance\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\BusinessProfilePerformance\FetchMultiDailyMetricsTimeSeriesResponse;
|
---|
21 | use Google\Service\BusinessProfilePerformance\GetDailyMetricsTimeSeriesResponse;
|
---|
22 |
|
---|
23 | /**
|
---|
24 | * The "locations" collection of methods.
|
---|
25 | * Typical usage is:
|
---|
26 | * <code>
|
---|
27 | * $businessprofileperformanceService = new Google\Service\BusinessProfilePerformance(...);
|
---|
28 | * $locations = $businessprofileperformanceService->locations;
|
---|
29 | * </code>
|
---|
30 | */
|
---|
31 | class Locations extends \Google\Service\Resource
|
---|
32 | {
|
---|
33 | /**
|
---|
34 | * (locations.fetchMultiDailyMetricsTimeSeries)
|
---|
35 | *
|
---|
36 | * @param string $location Required. The location for which the time series
|
---|
37 | * should be fetched. Format: locations/{location_id} where location_id is an
|
---|
38 | * unobfuscated listing id.
|
---|
39 | * @param array $optParams Optional parameters.
|
---|
40 | *
|
---|
41 | * @opt_param string dailyMetrics Required. The metrics to retrieve time series
|
---|
42 | * for.
|
---|
43 | * @opt_param int dailyRange.endDate.day Day of a month. Must be from 1 to 31
|
---|
44 | * and valid for the year and month, or 0 to specify a year by itself or a year
|
---|
45 | * and month where the day isn't significant.
|
---|
46 | * @opt_param int dailyRange.endDate.month Month of a year. Must be from 1 to
|
---|
47 | * 12, or 0 to specify a year without a month and day.
|
---|
48 | * @opt_param int dailyRange.endDate.year Year of the date. Must be from 1 to
|
---|
49 | * 9999, or 0 to specify a date without a year.
|
---|
50 | * @opt_param int dailyRange.startDate.day Day of a month. Must be from 1 to 31
|
---|
51 | * and valid for the year and month, or 0 to specify a year by itself or a year
|
---|
52 | * and month where the day isn't significant.
|
---|
53 | * @opt_param int dailyRange.startDate.month Month of a year. Must be from 1 to
|
---|
54 | * 12, or 0 to specify a year without a month and day.
|
---|
55 | * @opt_param int dailyRange.startDate.year Year of the date. Must be from 1 to
|
---|
56 | * 9999, or 0 to specify a date without a year.
|
---|
57 | * @return FetchMultiDailyMetricsTimeSeriesResponse
|
---|
58 | * @throws \Google\Service\Exception
|
---|
59 | */
|
---|
60 | public function fetchMultiDailyMetricsTimeSeries($location, $optParams = [])
|
---|
61 | {
|
---|
62 | $params = ['location' => $location];
|
---|
63 | $params = array_merge($params, $optParams);
|
---|
64 | return $this->call('fetchMultiDailyMetricsTimeSeries', [$params], FetchMultiDailyMetricsTimeSeriesResponse::class);
|
---|
65 | }
|
---|
66 | /**
|
---|
67 | * (locations.getDailyMetricsTimeSeries)
|
---|
68 | *
|
---|
69 | * @param string $name Required. The location for which the time series should
|
---|
70 | * be fetched. Format: locations/{location_id} where location_id is an
|
---|
71 | * unobfuscated listing id.
|
---|
72 | * @param array $optParams Optional parameters.
|
---|
73 | *
|
---|
74 | * @opt_param string dailyMetric Required. The metric to retrieve time series.
|
---|
75 | * @opt_param int dailyRange.endDate.day Day of a month. Must be from 1 to 31
|
---|
76 | * and valid for the year and month, or 0 to specify a year by itself or a year
|
---|
77 | * and month where the day isn't significant.
|
---|
78 | * @opt_param int dailyRange.endDate.month Month of a year. Must be from 1 to
|
---|
79 | * 12, or 0 to specify a year without a month and day.
|
---|
80 | * @opt_param int dailyRange.endDate.year Year of the date. Must be from 1 to
|
---|
81 | * 9999, or 0 to specify a date without a year.
|
---|
82 | * @opt_param int dailyRange.startDate.day Day of a month. Must be from 1 to 31
|
---|
83 | * and valid for the year and month, or 0 to specify a year by itself or a year
|
---|
84 | * and month where the day isn't significant.
|
---|
85 | * @opt_param int dailyRange.startDate.month Month of a year. Must be from 1 to
|
---|
86 | * 12, or 0 to specify a year without a month and day.
|
---|
87 | * @opt_param int dailyRange.startDate.year Year of the date. Must be from 1 to
|
---|
88 | * 9999, or 0 to specify a date without a year.
|
---|
89 | * @opt_param string dailySubEntityType.dayOfWeek Represents the day of the
|
---|
90 | * week. Eg: MONDAY. Currently supported DailyMetrics = NONE.
|
---|
91 | * @opt_param int dailySubEntityType.timeOfDay.hours Hours of a day in 24 hour
|
---|
92 | * format. Must be greater than or equal to 0 and typically must be less than or
|
---|
93 | * equal to 23. An API may choose to allow the value "24:00:00" for scenarios
|
---|
94 | * like business closing time.
|
---|
95 | * @opt_param int dailySubEntityType.timeOfDay.minutes Minutes of an hour. Must
|
---|
96 | * be greater than or equal to 0 and less than or equal to 59.
|
---|
97 | * @opt_param int dailySubEntityType.timeOfDay.nanos Fractions of seconds, in
|
---|
98 | * nanoseconds. Must be greater than or equal to 0 and less than or equal to
|
---|
99 | * 999,999,999.
|
---|
100 | * @opt_param int dailySubEntityType.timeOfDay.seconds Seconds of a minute. Must
|
---|
101 | * be greater than or equal to 0 and typically must be less than or equal to 59.
|
---|
102 | * An API may allow the value 60 if it allows leap-seconds.
|
---|
103 | * @return GetDailyMetricsTimeSeriesResponse
|
---|
104 | * @throws \Google\Service\Exception
|
---|
105 | */
|
---|
106 | public function getDailyMetricsTimeSeries($name, $optParams = [])
|
---|
107 | {
|
---|
108 | $params = ['name' => $name];
|
---|
109 | $params = array_merge($params, $optParams);
|
---|
110 | return $this->call('getDailyMetricsTimeSeries', [$params], GetDailyMetricsTimeSeriesResponse::class);
|
---|
111 | }
|
---|
112 | }
|
---|
113 |
|
---|
114 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
115 | class_alias(Locations::class, 'Google_Service_BusinessProfilePerformance_Resource_Locations');
|
---|