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\Directory\Resource; 19 20use Google\Service\Directory\MobileDevice; 21use Google\Service\Directory\MobileDeviceAction; 22use Google\Service\Directory\MobileDevices as MobileDevicesModel; 23 24/** 25 * The "mobiledevices" collection of methods. 26 * Typical usage is: 27 * <code> 28 * $adminService = new Google\Service\Directory(...); 29 * $mobiledevices = $adminService->mobiledevices; 30 * </code> 31 */ 32class Mobiledevices extends \Google\Service\Resource 33{ 34 /** 35 * Takes an action that affects a mobile device. For example, remotely wiping a 36 * device. (mobiledevices.action) 37 * 38 * @param string $customerId The unique ID for the customer's Google Workspace 39 * account. As an account administrator, you can also use the `my_customer` 40 * alias to represent your account's `customerId`. The `customerId` is also 41 * returned as part of the [Users resource](/admin- 42 * sdk/directory/v1/reference/users). 43 * @param string $resourceId The unique ID the API service uses to identify the 44 * mobile device. 45 * @param MobileDeviceAction $postBody 46 * @param array $optParams Optional parameters. 47 */ 48 public function action($customerId, $resourceId, MobileDeviceAction $postBody, $optParams = []) 49 { 50 $params = ['customerId' => $customerId, 'resourceId' => $resourceId, 'postBody' => $postBody]; 51 $params = array_merge($params, $optParams); 52 return $this->call('action', [$params]); 53 } 54 /** 55 * Removes a mobile device. (mobiledevices.delete) 56 * 57 * @param string $customerId The unique ID for the customer's Google Workspace 58 * account. As an account administrator, you can also use the `my_customer` 59 * alias to represent your account's `customerId`. The `customerId` is also 60 * returned as part of the [Users resource](/admin- 61 * sdk/directory/v1/reference/users). 62 * @param string $resourceId The unique ID the API service uses to identify the 63 * mobile device. 64 * @param array $optParams Optional parameters. 65 */ 66 public function delete($customerId, $resourceId, $optParams = []) 67 { 68 $params = ['customerId' => $customerId, 'resourceId' => $resourceId]; 69 $params = array_merge($params, $optParams); 70 return $this->call('delete', [$params]); 71 } 72 /** 73 * Retrieves a mobile device's properties. (mobiledevices.get) 74 * 75 * @param string $customerId The unique ID for the customer's Google Workspace 76 * account. As an account administrator, you can also use the `my_customer` 77 * alias to represent your account's `customerId`. The `customerId` is also 78 * returned as part of the [Users resource](/admin- 79 * sdk/directory/v1/reference/users). 80 * @param string $resourceId The unique ID the API service uses to identify the 81 * mobile device. 82 * @param array $optParams Optional parameters. 83 * 84 * @opt_param string projection Restrict information returned to a set of 85 * selected fields. 86 * @return MobileDevice 87 */ 88 public function get($customerId, $resourceId, $optParams = []) 89 { 90 $params = ['customerId' => $customerId, 'resourceId' => $resourceId]; 91 $params = array_merge($params, $optParams); 92 return $this->call('get', [$params], MobileDevice::class); 93 } 94 /** 95 * Retrieves a paginated list of all user-owned mobile devices for an account. 96 * To retrieve a list that includes company-owned devices, use the Cloud 97 * Identity [Devices API](https://cloud.google.com/identity/docs/concepts 98 * /overview-devices) instead. (mobiledevices.listMobiledevices) 99 * 100 * @param string $customerId The unique ID for the customer's Google Workspace 101 * account. As an account administrator, you can also use the `my_customer` 102 * alias to represent your account's `customerId`. The `customerId` is also 103 * returned as part of the [Users resource](/admin- 104 * sdk/directory/v1/reference/users). 105 * @param array $optParams Optional parameters. 106 * 107 * @opt_param int maxResults Maximum number of results to return. Max allowed 108 * value is 100. 109 * @opt_param string orderBy Device property to use for sorting results. 110 * @opt_param string pageToken Token to specify next page in the list 111 * @opt_param string projection Restrict information returned to a set of 112 * selected fields. 113 * @opt_param string query Search string in the format given at 114 * https://developers.google.com/admin-sdk/directory/v1/search-operators 115 * @opt_param string sortOrder Whether to return results in ascending or 116 * descending order. Must be used with the `orderBy` parameter. 117 * @return MobileDevicesModel 118 */ 119 public function listMobiledevices($customerId, $optParams = []) 120 { 121 $params = ['customerId' => $customerId]; 122 $params = array_merge($params, $optParams); 123 return $this->call('list', [$params], MobileDevicesModel::class); 124 } 125} 126 127// Adding a class alias for backwards compatibility with the previous class name. 128class_alias(Mobiledevices::class, 'Google_Service_Directory_Resource_Mobiledevices'); 129