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\VersionHistory\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\VersionHistory\ListVersionsResponse;
|
---|
21 |
|
---|
22 | /**
|
---|
23 | * The "versions" collection of methods.
|
---|
24 | * Typical usage is:
|
---|
25 | * <code>
|
---|
26 | * $versionhistoryService = new Google\Service\VersionHistory(...);
|
---|
27 | * $versions = $versionhistoryService->platforms_channels_versions;
|
---|
28 | * </code>
|
---|
29 | */
|
---|
30 | class PlatformsChannelsVersions extends \Google\Service\Resource
|
---|
31 | {
|
---|
32 | /**
|
---|
33 | * Returns list of version for the given platform/channel.
|
---|
34 | * (versions.listPlatformsChannelsVersions)
|
---|
35 | *
|
---|
36 | * @param string $parent Required. The channel, which owns this collection of
|
---|
37 | * versions. Format: {product}/platforms/{platform}/channels/{channel}
|
---|
38 | * @param array $optParams Optional parameters.
|
---|
39 | *
|
---|
40 | * @opt_param string filter Optional. Filter string. Format is a comma separated
|
---|
41 | * list of All comma separated filter clauses are conjoined with a logical
|
---|
42 | * "and". Valid field_names are "version", "name", "platform", and "channel".
|
---|
43 | * Valid operators are "<", "<=", "=", ">=", and ">". Channel comparison is done
|
---|
44 | * by distance from stable. Ex) stable < beta, beta < dev, canary < canary_asan.
|
---|
45 | * Version comparison is done numerically. If version is not entirely written,
|
---|
46 | * the version will be appended with 0 in missing fields. Ex) version > 80
|
---|
47 | * becoms version > 80.0.0.0 Name and platform are filtered by string
|
---|
48 | * comparison. Ex) "...?filter=channel<=beta, version >= 80 Ex)
|
---|
49 | * "...?filter=version > 80, version < 81
|
---|
50 | * @opt_param string orderBy Optional. Ordering string. Valid order_by strings
|
---|
51 | * are "version", "name", "platform", and "channel". Optionally, you can append
|
---|
52 | * " desc" or " asc" to specify the sorting order. Multiple order_by strings can
|
---|
53 | * be used in a comma separated list. Ordering by channel will sort by distance
|
---|
54 | * from the stable channel (not alphabetically). A list of channels sorted in
|
---|
55 | * this order is: stable, beta, dev, canary, and canary_asan. Sorting by name
|
---|
56 | * may cause unexpected behaviour as it is a naive string sort. For example,
|
---|
57 | * 1.0.0.8 will be before 1.0.0.10 in descending order. If order_by is not
|
---|
58 | * specified the response will be sorted by version in descending order. Ex)
|
---|
59 | * "...?order_by=version asc" Ex) "...?order_by=platform desc, channel, version"
|
---|
60 | * @opt_param int pageSize Optional. Optional limit on the number of versions to
|
---|
61 | * include in the response. If unspecified, the server will pick an appropriate
|
---|
62 | * default.
|
---|
63 | * @opt_param string pageToken Optional. A page token, received from a previous
|
---|
64 | * `ListVersions` call. Provide this to retrieve the subsequent page.
|
---|
65 | * @return ListVersionsResponse
|
---|
66 | * @throws \Google\Service\Exception
|
---|
67 | */
|
---|
68 | public function listPlatformsChannelsVersions($parent, $optParams = [])
|
---|
69 | {
|
---|
70 | $params = ['parent' => $parent];
|
---|
71 | $params = array_merge($params, $optParams);
|
---|
72 | return $this->call('list', [$params], ListVersionsResponse::class);
|
---|
73 | }
|
---|
74 | }
|
---|
75 |
|
---|
76 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
77 | class_alias(PlatformsChannelsVersions::class, 'Google_Service_VersionHistory_Resource_PlatformsChannelsVersions');
|
---|