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\AndroidPublisher\Resource;
19
20use Google\Service\AndroidPublisher\AppEdit;
21
22/**
23 * The "edits" collection of methods.
24 * Typical usage is:
25 *  <code>
26 *   $androidpublisherService = new Google\Service\AndroidPublisher(...);
27 *   $edits = $androidpublisherService->edits;
28 *  </code>
29 */
30class Edits extends \Google\Service\Resource
31{
32  /**
33   * Commits an app edit. (edits.commit)
34   *
35   * @param string $packageName Package name of the app.
36   * @param string $editId Identifier of the edit.
37   * @param array $optParams Optional parameters.
38   *
39   * @opt_param bool changesNotSentForReview Indicates that the changes in this
40   * edit will not be reviewed until they are explicitly sent for review from the
41   * Google Play Console UI. These changes will be added to any other changes that
42   * are not yet sent for review.
43   * @return AppEdit
44   */
45  public function commit($packageName, $editId, $optParams = [])
46  {
47    $params = ['packageName' => $packageName, 'editId' => $editId];
48    $params = array_merge($params, $optParams);
49    return $this->call('commit', [$params], AppEdit::class);
50  }
51  /**
52   * Deletes an app edit. (edits.delete)
53   *
54   * @param string $packageName Package name of the app.
55   * @param string $editId Identifier of the edit.
56   * @param array $optParams Optional parameters.
57   */
58  public function delete($packageName, $editId, $optParams = [])
59  {
60    $params = ['packageName' => $packageName, 'editId' => $editId];
61    $params = array_merge($params, $optParams);
62    return $this->call('delete', [$params]);
63  }
64  /**
65   * Gets an app edit. (edits.get)
66   *
67   * @param string $packageName Package name of the app.
68   * @param string $editId Identifier of the edit.
69   * @param array $optParams Optional parameters.
70   * @return AppEdit
71   */
72  public function get($packageName, $editId, $optParams = [])
73  {
74    $params = ['packageName' => $packageName, 'editId' => $editId];
75    $params = array_merge($params, $optParams);
76    return $this->call('get', [$params], AppEdit::class);
77  }
78  /**
79   * Creates a new edit for an app. (edits.insert)
80   *
81   * @param string $packageName Package name of the app.
82   * @param AppEdit $postBody
83   * @param array $optParams Optional parameters.
84   * @return AppEdit
85   */
86  public function insert($packageName, AppEdit $postBody, $optParams = [])
87  {
88    $params = ['packageName' => $packageName, 'postBody' => $postBody];
89    $params = array_merge($params, $optParams);
90    return $this->call('insert', [$params], AppEdit::class);
91  }
92  /**
93   * Validates an app edit. (edits.validate)
94   *
95   * @param string $packageName Package name of the app.
96   * @param string $editId Identifier of the edit.
97   * @param array $optParams Optional parameters.
98   * @return AppEdit
99   */
100  public function validate($packageName, $editId, $optParams = [])
101  {
102    $params = ['packageName' => $packageName, 'editId' => $editId];
103    $params = array_merge($params, $optParams);
104    return $this->call('validate', [$params], AppEdit::class);
105  }
106}
107
108// Adding a class alias for backwards compatibility with the previous class name.
109class_alias(Edits::class, 'Google_Service_AndroidPublisher_Resource_Edits');
110