[e3d4e0a] | 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\VMwareEngine\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\VMwareEngine\ListSubnetsResponse;
|
---|
| 21 | use Google\Service\VMwareEngine\Operation;
|
---|
| 22 | use Google\Service\VMwareEngine\Subnet;
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * The "subnets" collection of methods.
|
---|
| 26 | * Typical usage is:
|
---|
| 27 | * <code>
|
---|
| 28 | * $vmwareengineService = new Google\Service\VMwareEngine(...);
|
---|
| 29 | * $subnets = $vmwareengineService->projects_locations_privateClouds_subnets;
|
---|
| 30 | * </code>
|
---|
| 31 | */
|
---|
| 32 | class ProjectsLocationsPrivateCloudsSubnets extends \Google\Service\Resource
|
---|
| 33 | {
|
---|
| 34 | /**
|
---|
| 35 | * Gets details of a single subnet. (subnets.get)
|
---|
| 36 | *
|
---|
| 37 | * @param string $name Required. The resource name of the subnet to retrieve.
|
---|
| 38 | * Resource names are schemeless URIs that follow the conventions in
|
---|
| 39 | * https://cloud.google.com/apis/design/resource_names. For example:
|
---|
| 40 | * `projects/my-project/locations/us-central1-a/privateClouds/my-
|
---|
| 41 | * cloud/subnets/my-subnet`
|
---|
| 42 | * @param array $optParams Optional parameters.
|
---|
| 43 | * @return Subnet
|
---|
| 44 | * @throws \Google\Service\Exception
|
---|
| 45 | */
|
---|
| 46 | public function get($name, $optParams = [])
|
---|
| 47 | {
|
---|
| 48 | $params = ['name' => $name];
|
---|
| 49 | $params = array_merge($params, $optParams);
|
---|
| 50 | return $this->call('get', [$params], Subnet::class);
|
---|
| 51 | }
|
---|
| 52 | /**
|
---|
| 53 | * Lists subnets in a given private cloud.
|
---|
| 54 | * (subnets.listProjectsLocationsPrivateCloudsSubnets)
|
---|
| 55 | *
|
---|
| 56 | * @param string $parent Required. The resource name of the private cloud to be
|
---|
| 57 | * queried for subnets. Resource names are schemeless URIs that follow the
|
---|
| 58 | * conventions in https://cloud.google.com/apis/design/resource_names. For
|
---|
| 59 | * example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
|
---|
| 60 | * @param array $optParams Optional parameters.
|
---|
| 61 | *
|
---|
| 62 | * @opt_param int pageSize The maximum number of subnets to return in one page.
|
---|
| 63 | * The service may return fewer than this value. The maximum value is coerced to
|
---|
| 64 | * 1000. The default value of this field is 500.
|
---|
| 65 | * @opt_param string pageToken A page token, received from a previous
|
---|
| 66 | * `ListSubnetsRequest` call. Provide this to retrieve the subsequent page. When
|
---|
| 67 | * paginating, all other parameters provided to `ListSubnetsRequest` must match
|
---|
| 68 | * the call that provided the page token.
|
---|
| 69 | * @return ListSubnetsResponse
|
---|
| 70 | * @throws \Google\Service\Exception
|
---|
| 71 | */
|
---|
| 72 | public function listProjectsLocationsPrivateCloudsSubnets($parent, $optParams = [])
|
---|
| 73 | {
|
---|
| 74 | $params = ['parent' => $parent];
|
---|
| 75 | $params = array_merge($params, $optParams);
|
---|
| 76 | return $this->call('list', [$params], ListSubnetsResponse::class);
|
---|
| 77 | }
|
---|
| 78 | /**
|
---|
| 79 | * Updates the parameters of a single subnet. Only fields specified in
|
---|
| 80 | * `update_mask` are applied. *Note*: This API is synchronous and always returns
|
---|
| 81 | * a successful `google.longrunning.Operation` (LRO). The returned LRO will only
|
---|
| 82 | * have `done` and `response` fields. (subnets.patch)
|
---|
| 83 | *
|
---|
| 84 | * @param string $name Output only. Identifier. The resource name of this
|
---|
| 85 | * subnet. Resource names are schemeless URIs that follow the conventions in
|
---|
| 86 | * https://cloud.google.com/apis/design/resource_names. For example:
|
---|
| 87 | * `projects/my-project/locations/us-central1-a/privateClouds/my-
|
---|
| 88 | * cloud/subnets/my-subnet`
|
---|
| 89 | * @param Subnet $postBody
|
---|
| 90 | * @param array $optParams Optional parameters.
|
---|
| 91 | *
|
---|
| 92 | * @opt_param string updateMask Required. Field mask is used to specify the
|
---|
| 93 | * fields to be overwritten in the `Subnet` resource by the update. The fields
|
---|
| 94 | * specified in the `update_mask` are relative to the resource, not the full
|
---|
| 95 | * request. A field will be overwritten if it is in the mask. If the user does
|
---|
| 96 | * not provide a mask then all fields will be overwritten.
|
---|
| 97 | * @return Operation
|
---|
| 98 | * @throws \Google\Service\Exception
|
---|
| 99 | */
|
---|
| 100 | public function patch($name, Subnet $postBody, $optParams = [])
|
---|
| 101 | {
|
---|
| 102 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 103 | $params = array_merge($params, $optParams);
|
---|
| 104 | return $this->call('patch', [$params], Operation::class);
|
---|
| 105 | }
|
---|
| 106 | }
|
---|
| 107 |
|
---|
| 108 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 109 | class_alias(ProjectsLocationsPrivateCloudsSubnets::class, 'Google_Service_VMwareEngine_Resource_ProjectsLocationsPrivateCloudsSubnets');
|
---|