[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\Baremetalsolution\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Baremetalsolution\EvictVolumeRequest;
|
---|
| 21 | use Google\Service\Baremetalsolution\ListVolumesResponse;
|
---|
| 22 | use Google\Service\Baremetalsolution\Operation;
|
---|
| 23 | use Google\Service\Baremetalsolution\RenameVolumeRequest;
|
---|
| 24 | use Google\Service\Baremetalsolution\ResizeVolumeRequest;
|
---|
| 25 | use Google\Service\Baremetalsolution\Volume;
|
---|
| 26 |
|
---|
| 27 | /**
|
---|
| 28 | * The "volumes" collection of methods.
|
---|
| 29 | * Typical usage is:
|
---|
| 30 | * <code>
|
---|
| 31 | * $baremetalsolutionService = new Google\Service\Baremetalsolution(...);
|
---|
| 32 | * $volumes = $baremetalsolutionService->projects_locations_volumes;
|
---|
| 33 | * </code>
|
---|
| 34 | */
|
---|
| 35 | class ProjectsLocationsVolumes extends \Google\Service\Resource
|
---|
| 36 | {
|
---|
| 37 | /**
|
---|
| 38 | * Skips volume's cooloff and deletes it now. Volume must be in cooloff state.
|
---|
| 39 | * (volumes.evict)
|
---|
| 40 | *
|
---|
| 41 | * @param string $name Required. The name of the Volume.
|
---|
| 42 | * @param EvictVolumeRequest $postBody
|
---|
| 43 | * @param array $optParams Optional parameters.
|
---|
| 44 | * @return Operation
|
---|
| 45 | * @throws \Google\Service\Exception
|
---|
| 46 | */
|
---|
| 47 | public function evict($name, EvictVolumeRequest $postBody, $optParams = [])
|
---|
| 48 | {
|
---|
| 49 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 50 | $params = array_merge($params, $optParams);
|
---|
| 51 | return $this->call('evict', [$params], Operation::class);
|
---|
| 52 | }
|
---|
| 53 | /**
|
---|
| 54 | * Get details of a single storage volume. (volumes.get)
|
---|
| 55 | *
|
---|
| 56 | * @param string $name Required. Name of the resource.
|
---|
| 57 | * @param array $optParams Optional parameters.
|
---|
| 58 | * @return Volume
|
---|
| 59 | * @throws \Google\Service\Exception
|
---|
| 60 | */
|
---|
| 61 | public function get($name, $optParams = [])
|
---|
| 62 | {
|
---|
| 63 | $params = ['name' => $name];
|
---|
| 64 | $params = array_merge($params, $optParams);
|
---|
| 65 | return $this->call('get', [$params], Volume::class);
|
---|
| 66 | }
|
---|
| 67 | /**
|
---|
| 68 | * List storage volumes in a given project and location.
|
---|
| 69 | * (volumes.listProjectsLocationsVolumes)
|
---|
| 70 | *
|
---|
| 71 | * @param string $parent Required. Parent value for ListVolumesRequest.
|
---|
| 72 | * @param array $optParams Optional parameters.
|
---|
| 73 | *
|
---|
| 74 | * @opt_param string filter List filter.
|
---|
| 75 | * @opt_param int pageSize Requested page size. The server might return fewer
|
---|
| 76 | * items than requested. If unspecified, server will pick an appropriate
|
---|
| 77 | * default.
|
---|
| 78 | * @opt_param string pageToken A token identifying a page of results from the
|
---|
| 79 | * server.
|
---|
| 80 | * @return ListVolumesResponse
|
---|
| 81 | * @throws \Google\Service\Exception
|
---|
| 82 | */
|
---|
| 83 | public function listProjectsLocationsVolumes($parent, $optParams = [])
|
---|
| 84 | {
|
---|
| 85 | $params = ['parent' => $parent];
|
---|
| 86 | $params = array_merge($params, $optParams);
|
---|
| 87 | return $this->call('list', [$params], ListVolumesResponse::class);
|
---|
| 88 | }
|
---|
| 89 | /**
|
---|
| 90 | * Update details of a single storage volume. (volumes.patch)
|
---|
| 91 | *
|
---|
| 92 | * @param string $name Output only. The resource name of this `Volume`. Resource
|
---|
| 93 | * names are schemeless URIs that follow the conventions in
|
---|
| 94 | * https://cloud.google.com/apis/design/resource_names. Format:
|
---|
| 95 | * `projects/{project}/locations/{location}/volumes/{volume}`
|
---|
| 96 | * @param Volume $postBody
|
---|
| 97 | * @param array $optParams Optional parameters.
|
---|
| 98 | *
|
---|
| 99 | * @opt_param string updateMask The list of fields to update. The only currently
|
---|
| 100 | * supported fields are: 'labels'
|
---|
| 101 | * @return Operation
|
---|
| 102 | * @throws \Google\Service\Exception
|
---|
| 103 | */
|
---|
| 104 | public function patch($name, Volume $postBody, $optParams = [])
|
---|
| 105 | {
|
---|
| 106 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 107 | $params = array_merge($params, $optParams);
|
---|
| 108 | return $this->call('patch', [$params], Operation::class);
|
---|
| 109 | }
|
---|
| 110 | /**
|
---|
| 111 | * RenameVolume sets a new name for a volume. Use with caution, previous names
|
---|
| 112 | * become immediately invalidated. (volumes.rename)
|
---|
| 113 | *
|
---|
| 114 | * @param string $name Required. The `name` field is used to identify the
|
---|
| 115 | * volume. Format: projects/{project}/locations/{location}/volumes/{volume}
|
---|
| 116 | * @param RenameVolumeRequest $postBody
|
---|
| 117 | * @param array $optParams Optional parameters.
|
---|
| 118 | * @return Volume
|
---|
| 119 | * @throws \Google\Service\Exception
|
---|
| 120 | */
|
---|
| 121 | public function rename($name, RenameVolumeRequest $postBody, $optParams = [])
|
---|
| 122 | {
|
---|
| 123 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 124 | $params = array_merge($params, $optParams);
|
---|
| 125 | return $this->call('rename', [$params], Volume::class);
|
---|
| 126 | }
|
---|
| 127 | /**
|
---|
| 128 | * Emergency Volume resize. (volumes.resize)
|
---|
| 129 | *
|
---|
| 130 | * @param string $volume Required. Volume to resize.
|
---|
| 131 | * @param ResizeVolumeRequest $postBody
|
---|
| 132 | * @param array $optParams Optional parameters.
|
---|
| 133 | * @return Operation
|
---|
| 134 | * @throws \Google\Service\Exception
|
---|
| 135 | */
|
---|
| 136 | public function resize($volume, ResizeVolumeRequest $postBody, $optParams = [])
|
---|
| 137 | {
|
---|
| 138 | $params = ['volume' => $volume, 'postBody' => $postBody];
|
---|
| 139 | $params = array_merge($params, $optParams);
|
---|
| 140 | return $this->call('resize', [$params], Operation::class);
|
---|
| 141 | }
|
---|
| 142 | }
|
---|
| 143 |
|
---|
| 144 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 145 | class_alias(ProjectsLocationsVolumes::class, 'Google_Service_Baremetalsolution_Resource_ProjectsLocationsVolumes');
|
---|