Skip to content

Commit 7d54940

Browse files
1 parent 8808e74 commit 7d54940

3 files changed

Lines changed: 95 additions & 0 deletions

File tree

src/Directory.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,28 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
390390
'required' => true,
391391
],
392392
],
393+
],'countChromeOsDevices' => [
394+
'path' => 'admin/directory/v1/customer/{customerId}/devices/chromeos:countChromeOsDevices',
395+
'httpMethod' => 'GET',
396+
'parameters' => [
397+
'customerId' => [
398+
'location' => 'path',
399+
'type' => 'string',
400+
'required' => true,
401+
],
402+
'filter' => [
403+
'location' => 'query',
404+
'type' => 'string',
405+
],
406+
'includeChildOrgunits' => [
407+
'location' => 'query',
408+
'type' => 'boolean',
409+
],
410+
'orgUnitPath' => [
411+
'location' => 'query',
412+
'type' => 'string',
413+
],
414+
],
393415
],'issueCommand' => [
394416
'path' => 'admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}:issueCommand',
395417
'httpMethod' => 'POST',
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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;
19+
20+
class CountChromeOsDevicesResponse extends \Google\Model
21+
{
22+
/**
23+
* The total number of devices matching the request.
24+
*
25+
* @var string
26+
*/
27+
public $count;
28+
29+
/**
30+
* The total number of devices matching the request.
31+
*
32+
* @param string $count
33+
*/
34+
public function setCount($count)
35+
{
36+
$this->count = $count;
37+
}
38+
/**
39+
* @return string
40+
*/
41+
public function getCount()
42+
{
43+
return $this->count;
44+
}
45+
}
46+
47+
// Adding a class alias for backwards compatibility with the previous class name.
48+
class_alias(CountChromeOsDevicesResponse::class, 'Google_Service_Directory_CountChromeOsDevicesResponse');

src/Directory/Resource/CustomerDevicesChromeos.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
use Google\Service\Directory\BatchChangeChromeOsDeviceStatusRequest;
2121
use Google\Service\Directory\BatchChangeChromeOsDeviceStatusResponse;
22+
use Google\Service\Directory\CountChromeOsDevicesResponse;
2223
use Google\Service\Directory\DirectoryChromeosdevicesIssueCommandRequest;
2324
use Google\Service\Directory\DirectoryChromeosdevicesIssueCommandResponse;
2425

@@ -51,6 +52,30 @@ public function batchChangeStatus($customerId, BatchChangeChromeOsDeviceStatusRe
5152
$params = array_merge($params, $optParams);
5253
return $this->call('batchChangeStatus', [$params], BatchChangeChromeOsDeviceStatusResponse::class);
5354
}
55+
/**
56+
* Counts ChromeOS devices matching the request. (chromeos.countChromeOsDevices)
57+
*
58+
* @param string $customerId Required. Immutable ID of the Google Workspace
59+
* account.
60+
* @param array $optParams Optional parameters.
61+
*
62+
* @opt_param string filter Optional. Search string in the format given at
63+
* https://developers.google.com/workspace/admin/directory/v1/list-query-
64+
* operators
65+
* @opt_param bool includeChildOrgunits Optional. Return devices from all child
66+
* orgunits, as well as the specified org unit. If this is set to true,
67+
* 'orgUnitPath' must be provided.
68+
* @opt_param string orgUnitPath Optional. The full path of the organizational
69+
* unit (minus the leading `/`) or its unique ID.
70+
* @return CountChromeOsDevicesResponse
71+
* @throws \Google\Service\Exception
72+
*/
73+
public function countChromeOsDevices($customerId, $optParams = [])
74+
{
75+
$params = ['customerId' => $customerId];
76+
$params = array_merge($params, $optParams);
77+
return $this->call('countChromeOsDevices', [$params], CountChromeOsDevicesResponse::class);
78+
}
5479
/**
5580
* Issues a command for the device to execute. (chromeos.issueCommand)
5681
*

0 commit comments

Comments
 (0)