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\Spanner\Resource;
19
20use Google\Service\Spanner\InstanceConfig;
21use Google\Service\Spanner\ListInstanceConfigsResponse;
22
23/**
24 * The "instanceConfigs" collection of methods.
25 * Typical usage is:
26 *  <code>
27 *   $spannerService = new Google\Service\Spanner(...);
28 *   $instanceConfigs = $spannerService->instanceConfigs;
29 *  </code>
30 */
31class ProjectsInstanceConfigs extends \Google\Service\Resource
32{
33  /**
34   * Gets information about a particular instance configuration.
35   * (instanceConfigs.get)
36   *
37   * @param string $name Required. The name of the requested instance
38   * configuration. Values are of the form `projects//instanceConfigs/`.
39   * @param array $optParams Optional parameters.
40   * @return InstanceConfig
41   */
42  public function get($name, $optParams = [])
43  {
44    $params = ['name' => $name];
45    $params = array_merge($params, $optParams);
46    return $this->call('get', [$params], InstanceConfig::class);
47  }
48  /**
49   * Lists the supported instance configurations for a given project.
50   * (instanceConfigs.listProjectsInstanceConfigs)
51   *
52   * @param string $parent Required. The name of the project for which a list of
53   * supported instance configurations is requested. Values are of the form
54   * `projects/`.
55   * @param array $optParams Optional parameters.
56   *
57   * @opt_param int pageSize Number of instance configurations to be returned in
58   * the response. If 0 or less, defaults to the server's maximum allowed page
59   * size.
60   * @opt_param string pageToken If non-empty, `page_token` should contain a
61   * next_page_token from a previous ListInstanceConfigsResponse.
62   * @return ListInstanceConfigsResponse
63   */
64  public function listProjectsInstanceConfigs($parent, $optParams = [])
65  {
66    $params = ['parent' => $parent];
67    $params = array_merge($params, $optParams);
68    return $this->call('list', [$params], ListInstanceConfigsResponse::class);
69  }
70}
71
72// Adding a class alias for backwards compatibility with the previous class name.
73class_alias(ProjectsInstanceConfigs::class, 'Google_Service_Spanner_Resource_ProjectsInstanceConfigs');
74