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