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