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\Sasportal\Resource; 19 20use Google\Service\Sasportal\SasPortalCreateSignedDeviceRequest; 21use Google\Service\Sasportal\SasPortalDevice; 22use Google\Service\Sasportal\SasPortalListDevicesResponse; 23 24/** 25 * The "devices" collection of methods. 26 * Typical usage is: 27 * <code> 28 * $sasportalService = new Google\Service\Sasportal(...); 29 * $devices = $sasportalService->devices; 30 * </code> 31 */ 32class CustomersDeploymentsDevices extends \Google\Service\Resource 33{ 34 /** 35 * Creates a device under a node or customer. (devices.create) 36 * 37 * @param string $parent Required. The name of the parent resource. 38 * @param SasPortalDevice $postBody 39 * @param array $optParams Optional parameters. 40 * @return SasPortalDevice 41 */ 42 public function create($parent, SasPortalDevice $postBody, $optParams = []) 43 { 44 $params = ['parent' => $parent, 'postBody' => $postBody]; 45 $params = array_merge($params, $optParams); 46 return $this->call('create', [$params], SasPortalDevice::class); 47 } 48 /** 49 * Creates a signed device under a node or customer. (devices.createSigned) 50 * 51 * @param string $parent Required. The name of the parent resource. 52 * @param SasPortalCreateSignedDeviceRequest $postBody 53 * @param array $optParams Optional parameters. 54 * @return SasPortalDevice 55 */ 56 public function createSigned($parent, SasPortalCreateSignedDeviceRequest $postBody, $optParams = []) 57 { 58 $params = ['parent' => $parent, 'postBody' => $postBody]; 59 $params = array_merge($params, $optParams); 60 return $this->call('createSigned', [$params], SasPortalDevice::class); 61 } 62 /** 63 * Lists devices under a node or customer. 64 * (devices.listCustomersDeploymentsDevices) 65 * 66 * @param string $parent Required. The name of the parent resource. 67 * @param array $optParams Optional parameters. 68 * 69 * @opt_param string filter The filter expression. The filter should have one of 70 * the following formats: "sn=123454" or "display_name=MyDevice". sn corresponds 71 * to serial number of the device. The filter is case insensitive. 72 * @opt_param int pageSize The maximum number of devices to return in the 73 * response. If empty or zero, all devices will be listed. Must be in the range 74 * [0, 1000]. 75 * @opt_param string pageToken A pagination token returned from a previous call 76 * to ListDevices that indicates where this listing should continue from. 77 * @return SasPortalListDevicesResponse 78 */ 79 public function listCustomersDeploymentsDevices($parent, $optParams = []) 80 { 81 $params = ['parent' => $parent]; 82 $params = array_merge($params, $optParams); 83 return $this->call('list', [$params], SasPortalListDevicesResponse::class); 84 } 85} 86 87// Adding a class alias for backwards compatibility with the previous class name. 88class_alias(CustomersDeploymentsDevices::class, 'Google_Service_Sasportal_Resource_CustomersDeploymentsDevices'); 89