source: vendor/google/apiclient-services/src/CloudIdentity/Resource/DevicesDeviceUsers.php

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

Upload project files

  • Property mode set to 100644
File size: 12.6 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\CloudIdentity\Resource;
19
20use Google\Service\CloudIdentity\GoogleAppsCloudidentityDevicesV1ApproveDeviceUserRequest;
21use Google\Service\CloudIdentity\GoogleAppsCloudidentityDevicesV1BlockDeviceUserRequest;
22use Google\Service\CloudIdentity\GoogleAppsCloudidentityDevicesV1CancelWipeDeviceUserRequest;
23use Google\Service\CloudIdentity\GoogleAppsCloudidentityDevicesV1DeviceUser;
24use Google\Service\CloudIdentity\GoogleAppsCloudidentityDevicesV1ListDeviceUsersResponse;
25use Google\Service\CloudIdentity\GoogleAppsCloudidentityDevicesV1LookupSelfDeviceUsersResponse;
26use Google\Service\CloudIdentity\GoogleAppsCloudidentityDevicesV1WipeDeviceUserRequest;
27use Google\Service\CloudIdentity\Operation;
28
29/**
30 * The "deviceUsers" collection of methods.
31 * Typical usage is:
32 * <code>
33 * $cloudidentityService = new Google\Service\CloudIdentity(...);
34 * $deviceUsers = $cloudidentityService->devices_deviceUsers;
35 * </code>
36 */
37class DevicesDeviceUsers extends \Google\Service\Resource
38{
39 /**
40 * Approves device to access user data. (deviceUsers.approve)
41 *
42 * @param string $name Required. [Resource
43 * name](https://cloud.google.com/apis/design/resource_names) of the Device in
44 * format: `devices/{device}/deviceUsers/{device_user}`, where device is the
45 * unique ID assigned to the Device, and device_user is the unique ID assigned
46 * to the User.
47 * @param GoogleAppsCloudidentityDevicesV1ApproveDeviceUserRequest $postBody
48 * @param array $optParams Optional parameters.
49 * @return Operation
50 * @throws \Google\Service\Exception
51 */
52 public function approve($name, GoogleAppsCloudidentityDevicesV1ApproveDeviceUserRequest $postBody, $optParams = [])
53 {
54 $params = ['name' => $name, 'postBody' => $postBody];
55 $params = array_merge($params, $optParams);
56 return $this->call('approve', [$params], Operation::class);
57 }
58 /**
59 * Blocks device from accessing user data (deviceUsers.block)
60 *
61 * @param string $name Required. [Resource
62 * name](https://cloud.google.com/apis/design/resource_names) of the Device in
63 * format: `devices/{device}/deviceUsers/{device_user}`, where device is the
64 * unique ID assigned to the Device, and device_user is the unique ID assigned
65 * to the User.
66 * @param GoogleAppsCloudidentityDevicesV1BlockDeviceUserRequest $postBody
67 * @param array $optParams Optional parameters.
68 * @return Operation
69 * @throws \Google\Service\Exception
70 */
71 public function block($name, GoogleAppsCloudidentityDevicesV1BlockDeviceUserRequest $postBody, $optParams = [])
72 {
73 $params = ['name' => $name, 'postBody' => $postBody];
74 $params = array_merge($params, $optParams);
75 return $this->call('block', [$params], Operation::class);
76 }
77 /**
78 * Cancels an unfinished user account wipe. This operation can be used to cancel
79 * device wipe in the gap between the wipe operation returning success and the
80 * device being wiped. (deviceUsers.cancelWipe)
81 *
82 * @param string $name Required. [Resource
83 * name](https://cloud.google.com/apis/design/resource_names) of the Device in
84 * format: `devices/{device}/deviceUsers/{device_user}`, where device is the
85 * unique ID assigned to the Device, and device_user is the unique ID assigned
86 * to the User.
87 * @param GoogleAppsCloudidentityDevicesV1CancelWipeDeviceUserRequest $postBody
88 * @param array $optParams Optional parameters.
89 * @return Operation
90 * @throws \Google\Service\Exception
91 */
92 public function cancelWipe($name, GoogleAppsCloudidentityDevicesV1CancelWipeDeviceUserRequest $postBody, $optParams = [])
93 {
94 $params = ['name' => $name, 'postBody' => $postBody];
95 $params = array_merge($params, $optParams);
96 return $this->call('cancelWipe', [$params], Operation::class);
97 }
98 /**
99 * Deletes the specified DeviceUser. This also revokes the user's access to
100 * device data. (deviceUsers.delete)
101 *
102 * @param string $name Required. [Resource
103 * name](https://cloud.google.com/apis/design/resource_names) of the Device in
104 * format: `devices/{device}/deviceUsers/{device_user}`, where device is the
105 * unique ID assigned to the Device, and device_user is the unique ID assigned
106 * to the User.
107 * @param array $optParams Optional parameters.
108 *
109 * @opt_param string customer Optional. [Resource
110 * name](https://cloud.google.com/apis/design/resource_names) of the customer.
111 * If you're using this API for your own organization, use
112 * `customers/my_customer` If you're using this API to manage another
113 * organization, use `customers/{customer}`, where customer is the customer to
114 * whom the device belongs.
115 * @return Operation
116 * @throws \Google\Service\Exception
117 */
118 public function delete($name, $optParams = [])
119 {
120 $params = ['name' => $name];
121 $params = array_merge($params, $optParams);
122 return $this->call('delete', [$params], Operation::class);
123 }
124 /**
125 * Retrieves the specified DeviceUser (deviceUsers.get)
126 *
127 * @param string $name Required. [Resource
128 * name](https://cloud.google.com/apis/design/resource_names) of the Device in
129 * format: `devices/{device}/deviceUsers/{device_user}`, where device is the
130 * unique ID assigned to the Device, and device_user is the unique ID assigned
131 * to the User.
132 * @param array $optParams Optional parameters.
133 *
134 * @opt_param string customer Optional. [Resource
135 * name](https://cloud.google.com/apis/design/resource_names) of the customer.
136 * If you're using this API for your own organization, use
137 * `customers/my_customer` If you're using this API to manage another
138 * organization, use `customers/{customer}`, where customer is the customer to
139 * whom the device belongs.
140 * @return GoogleAppsCloudidentityDevicesV1DeviceUser
141 * @throws \Google\Service\Exception
142 */
143 public function get($name, $optParams = [])
144 {
145 $params = ['name' => $name];
146 $params = array_merge($params, $optParams);
147 return $this->call('get', [$params], GoogleAppsCloudidentityDevicesV1DeviceUser::class);
148 }
149 /**
150 * Lists/Searches DeviceUsers. (deviceUsers.listDevicesDeviceUsers)
151 *
152 * @param string $parent Required. To list all DeviceUsers, set this to
153 * "devices/-". To list all DeviceUsers owned by a device, set this to the
154 * resource name of the device. Format: devices/{device}
155 * @param array $optParams Optional parameters.
156 *
157 * @opt_param string customer Optional. [Resource
158 * name](https://cloud.google.com/apis/design/resource_names) of the customer.
159 * If you're using this API for your own organization, use
160 * `customers/my_customer` If you're using this API to manage another
161 * organization, use `customers/{customer}`, where customer is the customer to
162 * whom the device belongs.
163 * @opt_param string filter Optional. Additional restrictions when fetching list
164 * of devices. For a list of search fields, refer to [Mobile device search
165 * fields](https://developers.google.com/admin-sdk/directory/v1/search-
166 * operators). Multiple search fields are separated by the space character.
167 * @opt_param string orderBy Optional. Order specification for devices in the
168 * response.
169 * @opt_param int pageSize Optional. The maximum number of DeviceUsers to
170 * return. If unspecified, at most 5 DeviceUsers will be returned. The maximum
171 * value is 20; values above 20 will be coerced to 20.
172 * @opt_param string pageToken Optional. A page token, received from a previous
173 * `ListDeviceUsers` call. Provide this to retrieve the subsequent page. When
174 * paginating, all other parameters provided to `ListBooks` must match the call
175 * that provided the page token.
176 * @return GoogleAppsCloudidentityDevicesV1ListDeviceUsersResponse
177 * @throws \Google\Service\Exception
178 */
179 public function listDevicesDeviceUsers($parent, $optParams = [])
180 {
181 $params = ['parent' => $parent];
182 $params = array_merge($params, $optParams);
183 return $this->call('list', [$params], GoogleAppsCloudidentityDevicesV1ListDeviceUsersResponse::class);
184 }
185 /**
186 * Looks up resource names of the DeviceUsers associated with the caller's
187 * credentials, as well as the properties provided in the request. This method
188 * must be called with end-user credentials with the scope:
189 * https://www.googleapis.com/auth/cloud-identity.devices.lookup If multiple
190 * properties are provided, only DeviceUsers having all of these properties are
191 * considered as matches - i.e. the query behaves like an AND. Different
192 * platforms require different amounts of information from the caller to ensure
193 * that the DeviceUser is uniquely identified. - iOS: No properties need to be
194 * passed, the caller's credentials are sufficient to identify the corresponding
195 * DeviceUser. - Android: Specifying the 'android_id' field is required. -
196 * Desktop: Specifying the 'raw_resource_id' field is required.
197 * (deviceUsers.lookup)
198 *
199 * @param string $parent Must be set to "devices/-/deviceUsers" to search across
200 * all DeviceUser belonging to the user.
201 * @param array $optParams Optional parameters.
202 *
203 * @opt_param string androidId Android Id returned by [Settings.Secure#ANDROID_I
204 * D](https://developer.android.com/reference/android/provider/Settings.Secure.h
205 * tml#ANDROID_ID).
206 * @opt_param int pageSize The maximum number of DeviceUsers to return. If
207 * unspecified, at most 20 DeviceUsers will be returned. The maximum value is
208 * 20; values above 20 will be coerced to 20.
209 * @opt_param string pageToken A page token, received from a previous
210 * `LookupDeviceUsers` call. Provide this to retrieve the subsequent page. When
211 * paginating, all other parameters provided to `LookupDeviceUsers` must match
212 * the call that provided the page token.
213 * @opt_param string rawResourceId Raw Resource Id used by Google Endpoint
214 * Verification. If the user is enrolled into Google Endpoint Verification, this
215 * id will be saved as the 'device_resource_id' field in the following platform
216 * dependent files. * macOS: ~/.secureConnect/context_aware_config.json *
217 * Windows: %USERPROFILE%\AppData\Local\Google\Endpoint
218 * Verification\accounts.json * Linux:
219 * ~/.secureConnect/context_aware_config.json
220 * @opt_param string userId The user whose DeviceUser's resource name will be
221 * fetched. Must be set to 'me' to fetch the DeviceUser's resource name for the
222 * calling user.
223 * @return GoogleAppsCloudidentityDevicesV1LookupSelfDeviceUsersResponse
224 * @throws \Google\Service\Exception
225 */
226 public function lookup($parent, $optParams = [])
227 {
228 $params = ['parent' => $parent];
229 $params = array_merge($params, $optParams);
230 return $this->call('lookup', [$params], GoogleAppsCloudidentityDevicesV1LookupSelfDeviceUsersResponse::class);
231 }
232 /**
233 * Wipes the user's account on a device. Other data on the device that is not
234 * associated with the user's work account is not affected. For example, if a
235 * Gmail app is installed on a device that is used for personal and work
236 * purposes, and the user is logged in to the Gmail app with their personal
237 * account as well as their work account, wiping the "deviceUser" by their work
238 * administrator will not affect their personal account within Gmail or other
239 * apps such as Photos. (deviceUsers.wipe)
240 *
241 * @param string $name Required. [Resource
242 * name](https://cloud.google.com/apis/design/resource_names) of the Device in
243 * format: `devices/{device}/deviceUsers/{device_user}`, where device is the
244 * unique ID assigned to the Device, and device_user is the unique ID assigned
245 * to the User.
246 * @param GoogleAppsCloudidentityDevicesV1WipeDeviceUserRequest $postBody
247 * @param array $optParams Optional parameters.
248 * @return Operation
249 * @throws \Google\Service\Exception
250 */
251 public function wipe($name, GoogleAppsCloudidentityDevicesV1WipeDeviceUserRequest $postBody, $optParams = [])
252 {
253 $params = ['name' => $name, 'postBody' => $postBody];
254 $params = array_merge($params, $optParams);
255 return $this->call('wipe', [$params], Operation::class);
256 }
257}
258
259// Adding a class alias for backwards compatibility with the previous class name.
260class_alias(DevicesDeviceUsers::class, 'Google_Service_CloudIdentity_Resource_DevicesDeviceUsers');
Note: See TracBrowser for help on using the repository browser.