source: vendor/google/apiclient-services/src/AndroidEnterprise/Resource/Installs.php@ f9c482b

Last change on this file since f9c482b was f9c482b, checked in by Vlado 222039 <vlado.popovski@…>, 9 days ago

Upload new project files

  • Property mode set to 100644
File size: 4.7 KB
Line 
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\AndroidEnterprise\Resource;
19
20use Google\Service\AndroidEnterprise\Install;
21use Google\Service\AndroidEnterprise\InstallsListResponse;
22
23/**
24 * The "installs" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $androidenterpriseService = new Google\Service\AndroidEnterprise(...);
28 * $installs = $androidenterpriseService->installs;
29 * </code>
30 */
31class Installs extends \Google\Service\Resource
32{
33 /**
34 * Requests to remove an app from a device. A call to get or list will still
35 * show the app as installed on the device until it is actually removed. A
36 * successful response indicates that a removal request has been sent to the
37 * device. The call will be considered successful even if the app is not present
38 * on the device (e.g. it was never installed, or was removed by the user).
39 * (installs.delete)
40 *
41 * @param string $enterpriseId The ID of the enterprise.
42 * @param string $userId The ID of the user.
43 * @param string $deviceId The Android ID of the device.
44 * @param string $installId The ID of the product represented by the install,
45 * e.g. "app:com.google.android.gm".
46 * @param array $optParams Optional parameters.
47 * @throws \Google\Service\Exception
48 */
49 public function delete($enterpriseId, $userId, $deviceId, $installId, $optParams = [])
50 {
51 $params = ['enterpriseId' => $enterpriseId, 'userId' => $userId, 'deviceId' => $deviceId, 'installId' => $installId];
52 $params = array_merge($params, $optParams);
53 return $this->call('delete', [$params]);
54 }
55 /**
56 * Retrieves details of an installation of an app on a device. (installs.get)
57 *
58 * @param string $enterpriseId The ID of the enterprise.
59 * @param string $userId The ID of the user.
60 * @param string $deviceId The Android ID of the device.
61 * @param string $installId The ID of the product represented by the install,
62 * e.g. "app:com.google.android.gm".
63 * @param array $optParams Optional parameters.
64 * @return Install
65 * @throws \Google\Service\Exception
66 */
67 public function get($enterpriseId, $userId, $deviceId, $installId, $optParams = [])
68 {
69 $params = ['enterpriseId' => $enterpriseId, 'userId' => $userId, 'deviceId' => $deviceId, 'installId' => $installId];
70 $params = array_merge($params, $optParams);
71 return $this->call('get', [$params], Install::class);
72 }
73 /**
74 * Retrieves the details of all apps installed on the specified device.
75 * (installs.listInstalls)
76 *
77 * @param string $enterpriseId The ID of the enterprise.
78 * @param string $userId The ID of the user.
79 * @param string $deviceId The Android ID of the device.
80 * @param array $optParams Optional parameters.
81 * @return InstallsListResponse
82 * @throws \Google\Service\Exception
83 */
84 public function listInstalls($enterpriseId, $userId, $deviceId, $optParams = [])
85 {
86 $params = ['enterpriseId' => $enterpriseId, 'userId' => $userId, 'deviceId' => $deviceId];
87 $params = array_merge($params, $optParams);
88 return $this->call('list', [$params], InstallsListResponse::class);
89 }
90 /**
91 * Requests to install the latest version of an app to a device. If the app is
92 * already installed, then it is updated to the latest version if necessary.
93 * (installs.update)
94 *
95 * @param string $enterpriseId The ID of the enterprise.
96 * @param string $userId The ID of the user.
97 * @param string $deviceId The Android ID of the device.
98 * @param string $installId The ID of the product represented by the install,
99 * e.g. "app:com.google.android.gm".
100 * @param Install $postBody
101 * @param array $optParams Optional parameters.
102 * @return Install
103 * @throws \Google\Service\Exception
104 */
105 public function update($enterpriseId, $userId, $deviceId, $installId, Install $postBody, $optParams = [])
106 {
107 $params = ['enterpriseId' => $enterpriseId, 'userId' => $userId, 'deviceId' => $deviceId, 'installId' => $installId, 'postBody' => $postBody];
108 $params = array_merge($params, $optParams);
109 return $this->call('update', [$params], Install::class);
110 }
111}
112
113// Adding a class alias for backwards compatibility with the previous class name.
114class_alias(Installs::class, 'Google_Service_AndroidEnterprise_Resource_Installs');
Note: See TracBrowser for help on using the repository browser.