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\Container\Resource;
19
20use Google\Service\Container\ListUsableSubnetworksResponse;
21
22/**
23 * The "usableSubnetworks" collection of methods.
24 * Typical usage is:
25 *  <code>
26 *   $containerService = new Google\Service\Container(...);
27 *   $usableSubnetworks = $containerService->usableSubnetworks;
28 *  </code>
29 */
30class ProjectsAggregatedUsableSubnetworks extends \Google\Service\Resource
31{
32  /**
33   * Lists subnetworks that are usable for creating clusters in a project.
34   * (usableSubnetworks.listProjectsAggregatedUsableSubnetworks)
35   *
36   * @param string $parent The parent project where subnetworks are usable.
37   * Specified in the format `projects`.
38   * @param array $optParams Optional parameters.
39   *
40   * @opt_param string filter Filtering currently only supports equality on the
41   * networkProjectId and must be in the form: "networkProjectId=[PROJECTID]",
42   * where `networkProjectId` is the project which owns the listed subnetworks.
43   * This defaults to the parent project ID.
44   * @opt_param int pageSize The max number of results per page that should be
45   * returned. If the number of available results is larger than `page_size`, a
46   * `next_page_token` is returned which can be used to get the next page of
47   * results in subsequent requests. Acceptable values are 0 to 500, inclusive.
48   * (Default: 500)
49   * @opt_param string pageToken Specifies a page token to use. Set this to the
50   * nextPageToken returned by previous list requests to get the next page of
51   * results.
52   * @return ListUsableSubnetworksResponse
53   */
54  public function listProjectsAggregatedUsableSubnetworks($parent, $optParams = [])
55  {
56    $params = ['parent' => $parent];
57    $params = array_merge($params, $optParams);
58    return $this->call('list', [$params], ListUsableSubnetworksResponse::class);
59  }
60}
61
62// Adding a class alias for backwards compatibility with the previous class name.
63class_alias(ProjectsAggregatedUsableSubnetworks::class, 'Google_Service_Container_Resource_ProjectsAggregatedUsableSubnetworks');
64