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\ImagesDeleteAllResponse;
21use Google\Service\AndroidPublisher\ImagesListResponse;
22use Google\Service\AndroidPublisher\ImagesUploadResponse;
23
24/**
25 * The "images" collection of methods.
26 * Typical usage is:
27 *  <code>
28 *   $androidpublisherService = new Google\Service\AndroidPublisher(...);
29 *   $images = $androidpublisherService->images;
30 *  </code>
31 */
32class EditsImages extends \Google\Service\Resource
33{
34  /**
35   * Deletes the image (specified by id) from the edit. (images.delete)
36   *
37   * @param string $packageName Package name of the app.
38   * @param string $editId Identifier of the edit.
39   * @param string $language Language localization code (a BCP-47 language tag;
40   * for example, "de-AT" for Austrian German).
41   * @param string $imageType Type of the Image.
42   * @param string $imageId Unique identifier an image within the set of images
43   * attached to this edit.
44   * @param array $optParams Optional parameters.
45   */
46  public function delete($packageName, $editId, $language, $imageType, $imageId, $optParams = [])
47  {
48    $params = ['packageName' => $packageName, 'editId' => $editId, 'language' => $language, 'imageType' => $imageType, 'imageId' => $imageId];
49    $params = array_merge($params, $optParams);
50    return $this->call('delete', [$params]);
51  }
52  /**
53   * Deletes all images for the specified language and image type. Returns an
54   * empty response if no images are found. (images.deleteall)
55   *
56   * @param string $packageName Package name of the app.
57   * @param string $editId Identifier of the edit.
58   * @param string $language Language localization code (a BCP-47 language tag;
59   * for example, "de-AT" for Austrian German). Providing a language that is not
60   * supported by the App is a no-op.
61   * @param string $imageType Type of the Image. Providing an image type that
62   * refers to no images is a no-op.
63   * @param array $optParams Optional parameters.
64   * @return ImagesDeleteAllResponse
65   */
66  public function deleteall($packageName, $editId, $language, $imageType, $optParams = [])
67  {
68    $params = ['packageName' => $packageName, 'editId' => $editId, 'language' => $language, 'imageType' => $imageType];
69    $params = array_merge($params, $optParams);
70    return $this->call('deleteall', [$params], ImagesDeleteAllResponse::class);
71  }
72  /**
73   * Lists all images. The response may be empty. (images.listEditsImages)
74   *
75   * @param string $packageName Package name of the app.
76   * @param string $editId Identifier of the edit.
77   * @param string $language Language localization code (a BCP-47 language tag;
78   * for example, "de-AT" for Austrian German). There must be a store listing for
79   * the specified language.
80   * @param string $imageType Type of the Image. Providing an image type that
81   * refers to no images will return an empty response.
82   * @param array $optParams Optional parameters.
83   * @return ImagesListResponse
84   */
85  public function listEditsImages($packageName, $editId, $language, $imageType, $optParams = [])
86  {
87    $params = ['packageName' => $packageName, 'editId' => $editId, 'language' => $language, 'imageType' => $imageType];
88    $params = array_merge($params, $optParams);
89    return $this->call('list', [$params], ImagesListResponse::class);
90  }
91  /**
92   * Uploads an image of the specified language and image type, and adds to the
93   * edit. (images.upload)
94   *
95   * @param string $packageName Package name of the app.
96   * @param string $editId Identifier of the edit.
97   * @param string $language Language localization code (a BCP-47 language tag;
98   * for example, "de-AT" for Austrian German). Providing a language that is not
99   * supported by the App is a no-op.
100   * @param string $imageType Type of the Image.
101   * @param array $optParams Optional parameters.
102   * @return ImagesUploadResponse
103   */
104  public function upload($packageName, $editId, $language, $imageType, $optParams = [])
105  {
106    $params = ['packageName' => $packageName, 'editId' => $editId, 'language' => $language, 'imageType' => $imageType];
107    $params = array_merge($params, $optParams);
108    return $this->call('upload', [$params], ImagesUploadResponse::class);
109  }
110}
111
112// Adding a class alias for backwards compatibility with the previous class name.
113class_alias(EditsImages::class, 'Google_Service_AndroidPublisher_Resource_EditsImages');
114