source: vendor/google/apiclient-services/src/SmartDeviceManagement/Resource/EnterprisesDevices.php@ e3d4e0a

Last change on this file since e3d4e0a was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 9 days ago

Upload project files

  • Property mode set to 100644
File size: 3.5 KB
Line 
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\SmartDeviceManagement\Resource;
19
20use Google\Service\SmartDeviceManagement\GoogleHomeEnterpriseSdmV1Device;
21use Google\Service\SmartDeviceManagement\GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandRequest;
22use Google\Service\SmartDeviceManagement\GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandResponse;
23use Google\Service\SmartDeviceManagement\GoogleHomeEnterpriseSdmV1ListDevicesResponse;
24
25/**
26 * The "devices" collection of methods.
27 * Typical usage is:
28 * <code>
29 * $smartdevicemanagementService = new Google\Service\SmartDeviceManagement(...);
30 * $devices = $smartdevicemanagementService->enterprises_devices;
31 * </code>
32 */
33class EnterprisesDevices extends \Google\Service\Resource
34{
35 /**
36 * Executes a command to device managed by the enterprise.
37 * (devices.executeCommand)
38 *
39 * @param string $name The name of the device requested. For example:
40 * "enterprises/XYZ/devices/123"
41 * @param GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandRequest $postBody
42 * @param array $optParams Optional parameters.
43 * @return GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandResponse
44 * @throws \Google\Service\Exception
45 */
46 public function executeCommand($name, GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandRequest $postBody, $optParams = [])
47 {
48 $params = ['name' => $name, 'postBody' => $postBody];
49 $params = array_merge($params, $optParams);
50 return $this->call('executeCommand', [$params], GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandResponse::class);
51 }
52 /**
53 * Gets a device managed by the enterprise. (devices.get)
54 *
55 * @param string $name The name of the device requested. For example:
56 * "enterprises/XYZ/devices/123"
57 * @param array $optParams Optional parameters.
58 * @return GoogleHomeEnterpriseSdmV1Device
59 * @throws \Google\Service\Exception
60 */
61 public function get($name, $optParams = [])
62 {
63 $params = ['name' => $name];
64 $params = array_merge($params, $optParams);
65 return $this->call('get', [$params], GoogleHomeEnterpriseSdmV1Device::class);
66 }
67 /**
68 * Lists devices managed by the enterprise. (devices.listEnterprisesDevices)
69 *
70 * @param string $parent The parent enterprise to list devices under. E.g.
71 * "enterprises/XYZ".
72 * @param array $optParams Optional parameters.
73 *
74 * @opt_param string filter Optional filter to list devices. Filters can be done
75 * on: Device custom name (substring match): 'customName=wing'
76 * @return GoogleHomeEnterpriseSdmV1ListDevicesResponse
77 * @throws \Google\Service\Exception
78 */
79 public function listEnterprisesDevices($parent, $optParams = [])
80 {
81 $params = ['parent' => $parent];
82 $params = array_merge($params, $optParams);
83 return $this->call('list', [$params], GoogleHomeEnterpriseSdmV1ListDevicesResponse::class);
84 }
85}
86
87// Adding a class alias for backwards compatibility with the previous class name.
88class_alias(EnterprisesDevices::class, 'Google_Service_SmartDeviceManagement_Resource_EnterprisesDevices');
Note: See TracBrowser for help on using the repository browser.