[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\AddTargetingRequest;
|
---|
| 21 | use Google\Service\AndroidPublisher\AddTargetingResponse;
|
---|
| 22 | use Google\Service\AndroidPublisher\AppRecoveryAction;
|
---|
| 23 | use Google\Service\AndroidPublisher\CancelAppRecoveryRequest;
|
---|
| 24 | use Google\Service\AndroidPublisher\CancelAppRecoveryResponse;
|
---|
| 25 | use Google\Service\AndroidPublisher\CreateDraftAppRecoveryRequest;
|
---|
| 26 | use Google\Service\AndroidPublisher\DeployAppRecoveryRequest;
|
---|
| 27 | use Google\Service\AndroidPublisher\DeployAppRecoveryResponse;
|
---|
| 28 | use Google\Service\AndroidPublisher\ListAppRecoveriesResponse;
|
---|
| 29 |
|
---|
| 30 | /**
|
---|
| 31 | * The "apprecovery" collection of methods.
|
---|
| 32 | * Typical usage is:
|
---|
| 33 | * <code>
|
---|
| 34 | * $androidpublisherService = new Google\Service\AndroidPublisher(...);
|
---|
| 35 | * $apprecovery = $androidpublisherService->apprecovery;
|
---|
| 36 | * </code>
|
---|
| 37 | */
|
---|
| 38 | class Apprecovery extends \Google\Service\Resource
|
---|
| 39 | {
|
---|
| 40 | /**
|
---|
| 41 | * Incrementally update targeting for a recovery action. Note that only the
|
---|
| 42 | * criteria selected during the creation of recovery action can be expanded.
|
---|
| 43 | * (apprecovery.addTargeting)
|
---|
| 44 | *
|
---|
| 45 | * @param string $packageName Required. Package name of the app for which
|
---|
| 46 | * recovery action is to be updated.
|
---|
| 47 | * @param string $appRecoveryId Required. ID corresponding to the app recovery
|
---|
| 48 | * action.
|
---|
| 49 | * @param AddTargetingRequest $postBody
|
---|
| 50 | * @param array $optParams Optional parameters.
|
---|
| 51 | * @return AddTargetingResponse
|
---|
| 52 | * @throws \Google\Service\Exception
|
---|
| 53 | */
|
---|
| 54 | public function addTargeting($packageName, $appRecoveryId, AddTargetingRequest $postBody, $optParams = [])
|
---|
| 55 | {
|
---|
| 56 | $params = ['packageName' => $packageName, 'appRecoveryId' => $appRecoveryId, 'postBody' => $postBody];
|
---|
| 57 | $params = array_merge($params, $optParams);
|
---|
| 58 | return $this->call('addTargeting', [$params], AddTargetingResponse::class);
|
---|
| 59 | }
|
---|
| 60 | /**
|
---|
| 61 | * Cancel an already executing app recovery action. Note that this action
|
---|
| 62 | * changes status of the recovery action to CANCELED. (apprecovery.cancel)
|
---|
| 63 | *
|
---|
| 64 | * @param string $packageName Required. Package name of the app for which
|
---|
| 65 | * recovery action cancellation is requested.
|
---|
| 66 | * @param string $appRecoveryId Required. ID corresponding to the app recovery
|
---|
| 67 | * action.
|
---|
| 68 | * @param CancelAppRecoveryRequest $postBody
|
---|
| 69 | * @param array $optParams Optional parameters.
|
---|
| 70 | * @return CancelAppRecoveryResponse
|
---|
| 71 | * @throws \Google\Service\Exception
|
---|
| 72 | */
|
---|
| 73 | public function cancel($packageName, $appRecoveryId, CancelAppRecoveryRequest $postBody, $optParams = [])
|
---|
| 74 | {
|
---|
| 75 | $params = ['packageName' => $packageName, 'appRecoveryId' => $appRecoveryId, 'postBody' => $postBody];
|
---|
| 76 | $params = array_merge($params, $optParams);
|
---|
| 77 | return $this->call('cancel', [$params], CancelAppRecoveryResponse::class);
|
---|
| 78 | }
|
---|
| 79 | /**
|
---|
| 80 | * Create an app recovery action with recovery status as DRAFT. Note that this
|
---|
| 81 | * action does not execute the recovery action. (apprecovery.create)
|
---|
| 82 | *
|
---|
| 83 | * @param string $packageName Required. Package name of the app on which
|
---|
| 84 | * recovery action is performed.
|
---|
| 85 | * @param CreateDraftAppRecoveryRequest $postBody
|
---|
| 86 | * @param array $optParams Optional parameters.
|
---|
| 87 | * @return AppRecoveryAction
|
---|
| 88 | * @throws \Google\Service\Exception
|
---|
| 89 | */
|
---|
| 90 | public function create($packageName, CreateDraftAppRecoveryRequest $postBody, $optParams = [])
|
---|
| 91 | {
|
---|
| 92 | $params = ['packageName' => $packageName, 'postBody' => $postBody];
|
---|
| 93 | $params = array_merge($params, $optParams);
|
---|
| 94 | return $this->call('create', [$params], AppRecoveryAction::class);
|
---|
| 95 | }
|
---|
| 96 | /**
|
---|
| 97 | * Deploy an already created app recovery action with recovery status DRAFT.
|
---|
| 98 | * Note that this action activates the recovery action for all targeted users
|
---|
| 99 | * and changes its status to ACTIVE. (apprecovery.deploy)
|
---|
| 100 | *
|
---|
| 101 | * @param string $packageName Required. Package name of the app for which
|
---|
| 102 | * recovery action is deployed.
|
---|
| 103 | * @param string $appRecoveryId Required. ID corresponding to the app recovery
|
---|
| 104 | * action to deploy.
|
---|
| 105 | * @param DeployAppRecoveryRequest $postBody
|
---|
| 106 | * @param array $optParams Optional parameters.
|
---|
| 107 | * @return DeployAppRecoveryResponse
|
---|
| 108 | * @throws \Google\Service\Exception
|
---|
| 109 | */
|
---|
| 110 | public function deploy($packageName, $appRecoveryId, DeployAppRecoveryRequest $postBody, $optParams = [])
|
---|
| 111 | {
|
---|
| 112 | $params = ['packageName' => $packageName, 'appRecoveryId' => $appRecoveryId, 'postBody' => $postBody];
|
---|
| 113 | $params = array_merge($params, $optParams);
|
---|
| 114 | return $this->call('deploy', [$params], DeployAppRecoveryResponse::class);
|
---|
| 115 | }
|
---|
| 116 | /**
|
---|
| 117 | * List all app recovery action resources associated with a particular package
|
---|
| 118 | * name and app version. (apprecovery.listApprecovery)
|
---|
| 119 | *
|
---|
| 120 | * @param string $packageName Required. Package name of the app for which list
|
---|
| 121 | * of recovery actions is requested.
|
---|
| 122 | * @param array $optParams Optional parameters.
|
---|
| 123 | *
|
---|
| 124 | * @opt_param string versionCode Required. Version code targeted by the list of
|
---|
| 125 | * recovery actions.
|
---|
| 126 | * @return ListAppRecoveriesResponse
|
---|
| 127 | * @throws \Google\Service\Exception
|
---|
| 128 | */
|
---|
| 129 | public function listApprecovery($packageName, $optParams = [])
|
---|
| 130 | {
|
---|
| 131 | $params = ['packageName' => $packageName];
|
---|
| 132 | $params = array_merge($params, $optParams);
|
---|
| 133 | return $this->call('list', [$params], ListAppRecoveriesResponse::class);
|
---|
| 134 | }
|
---|
| 135 | }
|
---|
| 136 |
|
---|
| 137 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 138 | class_alias(Apprecovery::class, 'Google_Service_AndroidPublisher_Resource_Apprecovery');
|
---|