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/** 19 * The "installs" collection of methods. 20 * Typical usage is: 21 * <code> 22 * $androidenterpriseService = new Google_Service_AndroidEnterprise(...); 23 * $installs = $androidenterpriseService->installs; 24 * </code> 25 */ 26class Google_Service_AndroidEnterprise_Resource_Installs extends Google_Service_Resource 27{ 28 /** 29 * Requests to remove an app from a device. A call to get or list will still 30 * show the app as installed on the device until it is actually removed. 31 * (installs.delete) 32 * 33 * @param string $enterpriseId The ID of the enterprise. 34 * @param string $userId The ID of the user. 35 * @param string $deviceId The Android ID of the device. 36 * @param string $installId The ID of the product represented by the install, 37 * e.g. "app:com.google.android.gm". 38 * @param array $optParams Optional parameters. 39 */ 40 public function delete($enterpriseId, $userId, $deviceId, $installId, $optParams = array()) 41 { 42 $params = array('enterpriseId' => $enterpriseId, 'userId' => $userId, 'deviceId' => $deviceId, 'installId' => $installId); 43 $params = array_merge($params, $optParams); 44 return $this->call('delete', array($params)); 45 } 46 /** 47 * Retrieves details of an installation of an app on a device. (installs.get) 48 * 49 * @param string $enterpriseId The ID of the enterprise. 50 * @param string $userId The ID of the user. 51 * @param string $deviceId The Android ID of the device. 52 * @param string $installId The ID of the product represented by the install, 53 * e.g. "app:com.google.android.gm". 54 * @param array $optParams Optional parameters. 55 * @return Google_Service_AndroidEnterprise_Install 56 */ 57 public function get($enterpriseId, $userId, $deviceId, $installId, $optParams = array()) 58 { 59 $params = array('enterpriseId' => $enterpriseId, 'userId' => $userId, 'deviceId' => $deviceId, 'installId' => $installId); 60 $params = array_merge($params, $optParams); 61 return $this->call('get', array($params), "Google_Service_AndroidEnterprise_Install"); 62 } 63 /** 64 * Retrieves the details of all apps installed on the specified device. 65 * (installs.listInstalls) 66 * 67 * @param string $enterpriseId The ID of the enterprise. 68 * @param string $userId The ID of the user. 69 * @param string $deviceId The Android ID of the device. 70 * @param array $optParams Optional parameters. 71 * @return Google_Service_AndroidEnterprise_InstallsListResponse 72 */ 73 public function listInstalls($enterpriseId, $userId, $deviceId, $optParams = array()) 74 { 75 $params = array('enterpriseId' => $enterpriseId, 'userId' => $userId, 'deviceId' => $deviceId); 76 $params = array_merge($params, $optParams); 77 return $this->call('list', array($params), "Google_Service_AndroidEnterprise_InstallsListResponse"); 78 } 79 /** 80 * Requests to install the latest version of an app to a device. If the app is 81 * already installed, then it is updated to the latest version if necessary. 82 * This method supports patch semantics. (installs.patch) 83 * 84 * @param string $enterpriseId The ID of the enterprise. 85 * @param string $userId The ID of the user. 86 * @param string $deviceId The Android ID of the device. 87 * @param string $installId The ID of the product represented by the install, 88 * e.g. "app:com.google.android.gm". 89 * @param Google_Service_AndroidEnterprise_Install $postBody 90 * @param array $optParams Optional parameters. 91 * @return Google_Service_AndroidEnterprise_Install 92 */ 93 public function patch($enterpriseId, $userId, $deviceId, $installId, Google_Service_AndroidEnterprise_Install $postBody, $optParams = array()) 94 { 95 $params = array('enterpriseId' => $enterpriseId, 'userId' => $userId, 'deviceId' => $deviceId, 'installId' => $installId, 'postBody' => $postBody); 96 $params = array_merge($params, $optParams); 97 return $this->call('patch', array($params), "Google_Service_AndroidEnterprise_Install"); 98 } 99 /** 100 * Requests to install the latest version of an app to a device. If the app is 101 * already installed, then it is updated to the latest version if necessary. 102 * (installs.update) 103 * 104 * @param string $enterpriseId The ID of the enterprise. 105 * @param string $userId The ID of the user. 106 * @param string $deviceId The Android ID of the device. 107 * @param string $installId The ID of the product represented by the install, 108 * e.g. "app:com.google.android.gm". 109 * @param Google_Service_AndroidEnterprise_Install $postBody 110 * @param array $optParams Optional parameters. 111 * @return Google_Service_AndroidEnterprise_Install 112 */ 113 public function update($enterpriseId, $userId, $deviceId, $installId, Google_Service_AndroidEnterprise_Install $postBody, $optParams = array()) 114 { 115 $params = array('enterpriseId' => $enterpriseId, 'userId' => $userId, 'deviceId' => $deviceId, 'installId' => $installId, 'postBody' => $postBody); 116 $params = array_merge($params, $optParams); 117 return $this->call('update', array($params), "Google_Service_AndroidEnterprise_Install"); 118 } 119} 120