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\ExpansionFile;
21use Google\Service\AndroidPublisher\ExpansionFilesUploadResponse;
22
23/**
24 * The "expansionfiles" collection of methods.
25 * Typical usage is:
26 *  <code>
27 *   $androidpublisherService = new Google\Service\AndroidPublisher(...);
28 *   $expansionfiles = $androidpublisherService->expansionfiles;
29 *  </code>
30 */
31class EditsExpansionfiles extends \Google\Service\Resource
32{
33  /**
34   * Fetches the expansion file configuration for the specified APK.
35   * (expansionfiles.get)
36   *
37   * @param string $packageName Package name of the app.
38   * @param string $editId Identifier of the edit.
39   * @param int $apkVersionCode The version code of the APK whose expansion file
40   * configuration is being read or modified.
41   * @param string $expansionFileType The file type of the file configuration
42   * which is being read or modified.
43   * @param array $optParams Optional parameters.
44   * @return ExpansionFile
45   */
46  public function get($packageName, $editId, $apkVersionCode, $expansionFileType, $optParams = [])
47  {
48    $params = ['packageName' => $packageName, 'editId' => $editId, 'apkVersionCode' => $apkVersionCode, 'expansionFileType' => $expansionFileType];
49    $params = array_merge($params, $optParams);
50    return $this->call('get', [$params], ExpansionFile::class);
51  }
52  /**
53   * Patches the APK's expansion file configuration to reference another APK's
54   * expansion file. To add a new expansion file use the Upload method.
55   * (expansionfiles.patch)
56   *
57   * @param string $packageName Package name of the app.
58   * @param string $editId Identifier of the edit.
59   * @param int $apkVersionCode The version code of the APK whose expansion file
60   * configuration is being read or modified.
61   * @param string $expansionFileType The file type of the expansion file
62   * configuration which is being updated.
63   * @param ExpansionFile $postBody
64   * @param array $optParams Optional parameters.
65   * @return ExpansionFile
66   */
67  public function patch($packageName, $editId, $apkVersionCode, $expansionFileType, ExpansionFile $postBody, $optParams = [])
68  {
69    $params = ['packageName' => $packageName, 'editId' => $editId, 'apkVersionCode' => $apkVersionCode, 'expansionFileType' => $expansionFileType, 'postBody' => $postBody];
70    $params = array_merge($params, $optParams);
71    return $this->call('patch', [$params], ExpansionFile::class);
72  }
73  /**
74   * Updates the APK's expansion file configuration to reference another APK's
75   * expansion file. To add a new expansion file use the Upload method.
76   * (expansionfiles.update)
77   *
78   * @param string $packageName Package name of the app.
79   * @param string $editId Identifier of the edit.
80   * @param int $apkVersionCode The version code of the APK whose expansion file
81   * configuration is being read or modified.
82   * @param string $expansionFileType The file type of the file configuration
83   * which is being read or modified.
84   * @param ExpansionFile $postBody
85   * @param array $optParams Optional parameters.
86   * @return ExpansionFile
87   */
88  public function update($packageName, $editId, $apkVersionCode, $expansionFileType, ExpansionFile $postBody, $optParams = [])
89  {
90    $params = ['packageName' => $packageName, 'editId' => $editId, 'apkVersionCode' => $apkVersionCode, 'expansionFileType' => $expansionFileType, 'postBody' => $postBody];
91    $params = array_merge($params, $optParams);
92    return $this->call('update', [$params], ExpansionFile::class);
93  }
94  /**
95   * Uploads a new expansion file and attaches to the specified APK.
96   * (expansionfiles.upload)
97   *
98   * @param string $packageName Package name of the app.
99   * @param string $editId Identifier of the edit.
100   * @param int $apkVersionCode The version code of the APK whose expansion file
101   * configuration is being read or modified.
102   * @param string $expansionFileType The file type of the expansion file
103   * configuration which is being updated.
104   * @param array $optParams Optional parameters.
105   * @return ExpansionFilesUploadResponse
106   */
107  public function upload($packageName, $editId, $apkVersionCode, $expansionFileType, $optParams = [])
108  {
109    $params = ['packageName' => $packageName, 'editId' => $editId, 'apkVersionCode' => $apkVersionCode, 'expansionFileType' => $expansionFileType];
110    $params = array_merge($params, $optParams);
111    return $this->call('upload', [$params], ExpansionFilesUploadResponse::class);
112  }
113}
114
115// Adding a class alias for backwards compatibility with the previous class name.
116class_alias(EditsExpansionfiles::class, 'Google_Service_AndroidPublisher_Resource_EditsExpansionfiles');
117