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\SasPortalDevice; 21use Google\Service\Sasportal\SasPortalEmpty; 22use Google\Service\Sasportal\SasPortalMoveDeviceRequest; 23use Google\Service\Sasportal\SasPortalOperation; 24use Google\Service\Sasportal\SasPortalSignDeviceRequest; 25use Google\Service\Sasportal\SasPortalUpdateSignedDeviceRequest; 26 27/** 28 * The "devices" collection of methods. 29 * Typical usage is: 30 * <code> 31 * $sasportalService = new Google\Service\Sasportal(...); 32 * $devices = $sasportalService->devices; 33 * </code> 34 */ 35class DeploymentsDevices extends \Google\Service\Resource 36{ 37 /** 38 * Deletes a device. (devices.delete) 39 * 40 * @param string $name Required. The name of the device. 41 * @param array $optParams Optional parameters. 42 * @return SasPortalEmpty 43 */ 44 public function delete($name, $optParams = []) 45 { 46 $params = ['name' => $name]; 47 $params = array_merge($params, $optParams); 48 return $this->call('delete', [$params], SasPortalEmpty::class); 49 } 50 /** 51 * Gets details about a device. (devices.get) 52 * 53 * @param string $name Required. The name of the device. 54 * @param array $optParams Optional parameters. 55 * @return SasPortalDevice 56 */ 57 public function get($name, $optParams = []) 58 { 59 $params = ['name' => $name]; 60 $params = array_merge($params, $optParams); 61 return $this->call('get', [$params], SasPortalDevice::class); 62 } 63 /** 64 * Moves a device under another node or customer. (devices.move) 65 * 66 * @param string $name Required. The name of the device to move. 67 * @param SasPortalMoveDeviceRequest $postBody 68 * @param array $optParams Optional parameters. 69 * @return SasPortalOperation 70 */ 71 public function move($name, SasPortalMoveDeviceRequest $postBody, $optParams = []) 72 { 73 $params = ['name' => $name, 'postBody' => $postBody]; 74 $params = array_merge($params, $optParams); 75 return $this->call('move', [$params], SasPortalOperation::class); 76 } 77 /** 78 * Updates a device. (devices.patch) 79 * 80 * @param string $name Output only. The resource path name. 81 * @param SasPortalDevice $postBody 82 * @param array $optParams Optional parameters. 83 * 84 * @opt_param string updateMask Fields to be updated. 85 * @return SasPortalDevice 86 */ 87 public function patch($name, SasPortalDevice $postBody, $optParams = []) 88 { 89 $params = ['name' => $name, 'postBody' => $postBody]; 90 $params = array_merge($params, $optParams); 91 return $this->call('patch', [$params], SasPortalDevice::class); 92 } 93 /** 94 * Signs a device. (devices.signDevice) 95 * 96 * @param string $name Output only. The resource path name. 97 * @param SasPortalSignDeviceRequest $postBody 98 * @param array $optParams Optional parameters. 99 * @return SasPortalEmpty 100 */ 101 public function signDevice($name, SasPortalSignDeviceRequest $postBody, $optParams = []) 102 { 103 $params = ['name' => $name, 'postBody' => $postBody]; 104 $params = array_merge($params, $optParams); 105 return $this->call('signDevice', [$params], SasPortalEmpty::class); 106 } 107 /** 108 * Updates a signed device. (devices.updateSigned) 109 * 110 * @param string $name Required. The name of the device to update. 111 * @param SasPortalUpdateSignedDeviceRequest $postBody 112 * @param array $optParams Optional parameters. 113 * @return SasPortalDevice 114 */ 115 public function updateSigned($name, SasPortalUpdateSignedDeviceRequest $postBody, $optParams = []) 116 { 117 $params = ['name' => $name, 'postBody' => $postBody]; 118 $params = array_merge($params, $optParams); 119 return $this->call('updateSigned', [$params], SasPortalDevice::class); 120 } 121} 122 123// Adding a class alias for backwards compatibility with the previous class name. 124class_alias(DeploymentsDevices::class, 'Google_Service_Sasportal_Resource_DeploymentsDevices'); 125