[e3d4e0a] | 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\AndroidPublisher\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\AndroidPublisher\DeviceTierConfig;
|
---|
| 21 | use Google\Service\AndroidPublisher\ListDeviceTierConfigsResponse;
|
---|
| 22 |
|
---|
| 23 | /**
|
---|
| 24 | * The "deviceTierConfigs" collection of methods.
|
---|
| 25 | * Typical usage is:
|
---|
| 26 | * <code>
|
---|
| 27 | * $androidpublisherService = new Google\Service\AndroidPublisher(...);
|
---|
| 28 | * $deviceTierConfigs = $androidpublisherService->applications_deviceTierConfigs;
|
---|
| 29 | * </code>
|
---|
| 30 | */
|
---|
| 31 | class ApplicationsDeviceTierConfigs extends \Google\Service\Resource
|
---|
| 32 | {
|
---|
| 33 | /**
|
---|
| 34 | * Creates a new device tier config for an app. (deviceTierConfigs.create)
|
---|
| 35 | *
|
---|
| 36 | * @param string $packageName Package name of the app.
|
---|
| 37 | * @param DeviceTierConfig $postBody
|
---|
| 38 | * @param array $optParams Optional parameters.
|
---|
| 39 | *
|
---|
| 40 | * @opt_param bool allowUnknownDevices Whether the service should accept device
|
---|
| 41 | * IDs that are unknown to Play's device catalog.
|
---|
| 42 | * @return DeviceTierConfig
|
---|
| 43 | * @throws \Google\Service\Exception
|
---|
| 44 | */
|
---|
| 45 | public function create($packageName, DeviceTierConfig $postBody, $optParams = [])
|
---|
| 46 | {
|
---|
| 47 | $params = ['packageName' => $packageName, 'postBody' => $postBody];
|
---|
| 48 | $params = array_merge($params, $optParams);
|
---|
| 49 | return $this->call('create', [$params], DeviceTierConfig::class);
|
---|
| 50 | }
|
---|
| 51 | /**
|
---|
| 52 | * Returns a particular device tier config. (deviceTierConfigs.get)
|
---|
| 53 | *
|
---|
| 54 | * @param string $packageName Package name of the app.
|
---|
| 55 | * @param string $deviceTierConfigId Required. Id of an existing device tier
|
---|
| 56 | * config.
|
---|
| 57 | * @param array $optParams Optional parameters.
|
---|
| 58 | * @return DeviceTierConfig
|
---|
| 59 | * @throws \Google\Service\Exception
|
---|
| 60 | */
|
---|
| 61 | public function get($packageName, $deviceTierConfigId, $optParams = [])
|
---|
| 62 | {
|
---|
| 63 | $params = ['packageName' => $packageName, 'deviceTierConfigId' => $deviceTierConfigId];
|
---|
| 64 | $params = array_merge($params, $optParams);
|
---|
| 65 | return $this->call('get', [$params], DeviceTierConfig::class);
|
---|
| 66 | }
|
---|
| 67 | /**
|
---|
| 68 | * Returns created device tier configs, ordered by descending creation time.
|
---|
| 69 | * (deviceTierConfigs.listApplicationsDeviceTierConfigs)
|
---|
| 70 | *
|
---|
| 71 | * @param string $packageName Package name of the app.
|
---|
| 72 | * @param array $optParams Optional parameters.
|
---|
| 73 | *
|
---|
| 74 | * @opt_param int pageSize The maximum number of device tier configs to return.
|
---|
| 75 | * The service may return fewer than this value. If unspecified, at most 10
|
---|
| 76 | * device tier configs will be returned. The maximum value for this field is
|
---|
| 77 | * 100; values above 100 will be coerced to 100. Device tier configs will be
|
---|
| 78 | * ordered by descending creation time.
|
---|
| 79 | * @opt_param string pageToken A page token, received from a previous
|
---|
| 80 | * `ListDeviceTierConfigs` call. Provide this to retrieve the subsequent page.
|
---|
| 81 | * @return ListDeviceTierConfigsResponse
|
---|
| 82 | * @throws \Google\Service\Exception
|
---|
| 83 | */
|
---|
| 84 | public function listApplicationsDeviceTierConfigs($packageName, $optParams = [])
|
---|
| 85 | {
|
---|
| 86 | $params = ['packageName' => $packageName];
|
---|
| 87 | $params = array_merge($params, $optParams);
|
---|
| 88 | return $this->call('list', [$params], ListDeviceTierConfigsResponse::class);
|
---|
| 89 | }
|
---|
| 90 | }
|
---|
| 91 |
|
---|
| 92 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 93 | class_alias(ApplicationsDeviceTierConfigs::class, 'Google_Service_AndroidPublisher_Resource_ApplicationsDeviceTierConfigs');
|
---|