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\CloudIot\Resource;
19
20use Google\Service\CloudIot\ListDeviceConfigVersionsResponse;
21
22/**
23 * The "configVersions" collection of methods.
24 * Typical usage is:
25 *  <code>
26 *   $cloudiotService = new Google\Service\CloudIot(...);
27 *   $configVersions = $cloudiotService->configVersions;
28 *  </code>
29 */
30class ProjectsLocationsRegistriesDevicesConfigVersions extends \Google\Service\Resource
31{
32  /**
33   * Lists the last few versions of the device configuration in descending order
34   * (i.e.: newest first).
35   * (configVersions.listProjectsLocationsRegistriesDevicesConfigVersions)
36   *
37   * @param string $name Required. The name of the device. For example,
38   * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
39   * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
40   * @param array $optParams Optional parameters.
41   *
42   * @opt_param int numVersions The number of versions to list. Versions are
43   * listed in decreasing order of the version number. The maximum number of
44   * versions retained is 10. If this value is zero, it will return all the
45   * versions available.
46   * @return ListDeviceConfigVersionsResponse
47   */
48  public function listProjectsLocationsRegistriesDevicesConfigVersions($name, $optParams = [])
49  {
50    $params = ['name' => $name];
51    $params = array_merge($params, $optParams);
52    return $this->call('list', [$params], ListDeviceConfigVersionsResponse::class);
53  }
54}
55
56// Adding a class alias for backwards compatibility with the previous class name.
57class_alias(ProjectsLocationsRegistriesDevicesConfigVersions::class, 'Google_Service_CloudIot_Resource_ProjectsLocationsRegistriesDevicesConfigVersions');
58