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\AndroidProvisioningPartner\Resource; 19 20use Google\Service\AndroidProvisioningPartner\AndroiddeviceprovisioningEmpty; 21use Google\Service\AndroidProvisioningPartner\CustomerApplyConfigurationRequest; 22use Google\Service\AndroidProvisioningPartner\CustomerListDevicesResponse; 23use Google\Service\AndroidProvisioningPartner\CustomerRemoveConfigurationRequest; 24use Google\Service\AndroidProvisioningPartner\CustomerUnclaimDeviceRequest; 25use Google\Service\AndroidProvisioningPartner\Device; 26 27/** 28 * The "devices" collection of methods. 29 * Typical usage is: 30 * <code> 31 * $androiddeviceprovisioningService = new Google\Service\AndroidProvisioningPartner(...); 32 * $devices = $androiddeviceprovisioningService->devices; 33 * </code> 34 */ 35class CustomersDevices extends \Google\Service\Resource 36{ 37 /** 38 * Applies a Configuration to the device to register the device for zero-touch 39 * enrollment. After applying a configuration to a device, the device 40 * automatically provisions itself on first boot, or next factory reset. 41 * (devices.applyConfiguration) 42 * 43 * @param string $parent Required. The customer managing the device. An API 44 * resource name in the format `customers/[CUSTOMER_ID]`. 45 * @param CustomerApplyConfigurationRequest $postBody 46 * @param array $optParams Optional parameters. 47 * @return AndroiddeviceprovisioningEmpty 48 */ 49 public function applyConfiguration($parent, CustomerApplyConfigurationRequest $postBody, $optParams = []) 50 { 51 $params = ['parent' => $parent, 'postBody' => $postBody]; 52 $params = array_merge($params, $optParams); 53 return $this->call('applyConfiguration', [$params], AndroiddeviceprovisioningEmpty::class); 54 } 55 /** 56 * Gets the details of a device. (devices.get) 57 * 58 * @param string $name Required. The device to get. An API resource name in the 59 * format `customers/[CUSTOMER_ID]/devices/[DEVICE_ID]`. 60 * @param array $optParams Optional parameters. 61 * @return Device 62 */ 63 public function get($name, $optParams = []) 64 { 65 $params = ['name' => $name]; 66 $params = array_merge($params, $optParams); 67 return $this->call('get', [$params], Device::class); 68 } 69 /** 70 * Lists a customer's devices. (devices.listCustomersDevices) 71 * 72 * @param string $parent Required. The customer managing the devices. An API 73 * resource name in the format `customers/[CUSTOMER_ID]`. 74 * @param array $optParams Optional parameters. 75 * 76 * @opt_param string pageSize The maximum number of devices to show in a page of 77 * results. Must be between 1 and 100 inclusive. 78 * @opt_param string pageToken A token specifying which result page to return. 79 * @return CustomerListDevicesResponse 80 */ 81 public function listCustomersDevices($parent, $optParams = []) 82 { 83 $params = ['parent' => $parent]; 84 $params = array_merge($params, $optParams); 85 return $this->call('list', [$params], CustomerListDevicesResponse::class); 86 } 87 /** 88 * Removes a configuration from device. (devices.removeConfiguration) 89 * 90 * @param string $parent Required. The customer managing the device in the 91 * format `customers/[CUSTOMER_ID]`. 92 * @param CustomerRemoveConfigurationRequest $postBody 93 * @param array $optParams Optional parameters. 94 * @return AndroiddeviceprovisioningEmpty 95 */ 96 public function removeConfiguration($parent, CustomerRemoveConfigurationRequest $postBody, $optParams = []) 97 { 98 $params = ['parent' => $parent, 'postBody' => $postBody]; 99 $params = array_merge($params, $optParams); 100 return $this->call('removeConfiguration', [$params], AndroiddeviceprovisioningEmpty::class); 101 } 102 /** 103 * Unclaims a device from a customer and removes it from zero-touch enrollment. 104 * After removing a device, a customer must contact their reseller to register 105 * the device into zero-touch enrollment again. (devices.unclaim) 106 * 107 * @param string $parent Required. The customer managing the device. An API 108 * resource name in the format `customers/[CUSTOMER_ID]`. 109 * @param CustomerUnclaimDeviceRequest $postBody 110 * @param array $optParams Optional parameters. 111 * @return AndroiddeviceprovisioningEmpty 112 */ 113 public function unclaim($parent, CustomerUnclaimDeviceRequest $postBody, $optParams = []) 114 { 115 $params = ['parent' => $parent, 'postBody' => $postBody]; 116 $params = array_merge($params, $optParams); 117 return $this->call('unclaim', [$params], AndroiddeviceprovisioningEmpty::class); 118 } 119} 120 121// Adding a class alias for backwards compatibility with the previous class name. 122class_alias(CustomersDevices::class, 'Google_Service_AndroidProvisioningPartner_Resource_CustomersDevices'); 123