source: vendor/google/apiclient-services/src/AndroidManagement/Resource/EnterprisesDevices.php

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

Upload project files

  • Property mode set to 100644
File size: 5.0 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\AndroidManagement\Resource;
19
20use Google\Service\AndroidManagement\AndroidmanagementEmpty;
21use Google\Service\AndroidManagement\Command;
22use Google\Service\AndroidManagement\Device;
23use Google\Service\AndroidManagement\ListDevicesResponse;
24use Google\Service\AndroidManagement\Operation;
25
26/**
27 * The "devices" collection of methods.
28 * Typical usage is:
29 * <code>
30 * $androidmanagementService = new Google\Service\AndroidManagement(...);
31 * $devices = $androidmanagementService->enterprises_devices;
32 * </code>
33 */
34class EnterprisesDevices extends \Google\Service\Resource
35{
36 /**
37 * Deletes a device. This operation wipes the device. Deleted devices do not
38 * show up in enterprises.devices.list calls and a 404 is returned from
39 * enterprises.devices.get. (devices.delete)
40 *
41 * @param string $name The name of the device in the form
42 * enterprises/{enterpriseId}/devices/{deviceId}.
43 * @param array $optParams Optional parameters.
44 *
45 * @opt_param string wipeDataFlags Optional flags that control the device wiping
46 * behavior.
47 * @opt_param string wipeReasonMessage Optional. A short message displayed to
48 * the user before wiping the work profile on personal devices. This has no
49 * effect on company owned devices. The maximum message length is 200
50 * characters.
51 * @return AndroidmanagementEmpty
52 * @throws \Google\Service\Exception
53 */
54 public function delete($name, $optParams = [])
55 {
56 $params = ['name' => $name];
57 $params = array_merge($params, $optParams);
58 return $this->call('delete', [$params], AndroidmanagementEmpty::class);
59 }
60 /**
61 * Gets a device. Deleted devices will respond with a 404 error. (devices.get)
62 *
63 * @param string $name The name of the device in the form
64 * enterprises/{enterpriseId}/devices/{deviceId}.
65 * @param array $optParams Optional parameters.
66 * @return Device
67 * @throws \Google\Service\Exception
68 */
69 public function get($name, $optParams = [])
70 {
71 $params = ['name' => $name];
72 $params = array_merge($params, $optParams);
73 return $this->call('get', [$params], Device::class);
74 }
75 /**
76 * Issues a command to a device. The Operation resource returned contains a
77 * Command in its metadata field. Use the get operation method to get the status
78 * of the command. (devices.issueCommand)
79 *
80 * @param string $name The name of the device in the form
81 * enterprises/{enterpriseId}/devices/{deviceId}.
82 * @param Command $postBody
83 * @param array $optParams Optional parameters.
84 * @return Operation
85 * @throws \Google\Service\Exception
86 */
87 public function issueCommand($name, Command $postBody, $optParams = [])
88 {
89 $params = ['name' => $name, 'postBody' => $postBody];
90 $params = array_merge($params, $optParams);
91 return $this->call('issueCommand', [$params], Operation::class);
92 }
93 /**
94 * Lists devices for a given enterprise. Deleted devices are not returned in the
95 * response. (devices.listEnterprisesDevices)
96 *
97 * @param string $parent The name of the enterprise in the form
98 * enterprises/{enterpriseId}.
99 * @param array $optParams Optional parameters.
100 *
101 * @opt_param int pageSize The requested page size. The actual page size may be
102 * fixed to a min or max value.
103 * @opt_param string pageToken A token identifying a page of results returned by
104 * the server.
105 * @return ListDevicesResponse
106 * @throws \Google\Service\Exception
107 */
108 public function listEnterprisesDevices($parent, $optParams = [])
109 {
110 $params = ['parent' => $parent];
111 $params = array_merge($params, $optParams);
112 return $this->call('list', [$params], ListDevicesResponse::class);
113 }
114 /**
115 * Updates a device. (devices.patch)
116 *
117 * @param string $name The name of the device in the form
118 * enterprises/{enterpriseId}/devices/{deviceId}.
119 * @param Device $postBody
120 * @param array $optParams Optional parameters.
121 *
122 * @opt_param string updateMask The field mask indicating the fields to update.
123 * If not set, all modifiable fields will be modified.
124 * @return Device
125 * @throws \Google\Service\Exception
126 */
127 public function patch($name, Device $postBody, $optParams = [])
128 {
129 $params = ['name' => $name, 'postBody' => $postBody];
130 $params = array_merge($params, $optParams);
131 return $this->call('patch', [$params], Device::class);
132 }
133}
134
135// Adding a class alias for backwards compatibility with the previous class name.
136class_alias(EnterprisesDevices::class, 'Google_Service_AndroidManagement_Resource_EnterprisesDevices');
Note: See TracBrowser for help on using the repository browser.