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\Baremetalsolution\Resource; 19 20use Google\Service\Baremetalsolution\ListVolumesResponse; 21use Google\Service\Baremetalsolution\Operation; 22use Google\Service\Baremetalsolution\Volume; 23 24/** 25 * The "volumes" collection of methods. 26 * Typical usage is: 27 * <code> 28 * $baremetalsolutionService = new Google\Service\Baremetalsolution(...); 29 * $volumes = $baremetalsolutionService->volumes; 30 * </code> 31 */ 32class ProjectsLocationsVolumes extends \Google\Service\Resource 33{ 34 /** 35 * Get details of a single storage volume. (volumes.get) 36 * 37 * @param string $name Required. Name of the resource. 38 * @param array $optParams Optional parameters. 39 * @return Volume 40 */ 41 public function get($name, $optParams = []) 42 { 43 $params = ['name' => $name]; 44 $params = array_merge($params, $optParams); 45 return $this->call('get', [$params], Volume::class); 46 } 47 /** 48 * List storage volumes in a given project and location. 49 * (volumes.listProjectsLocationsVolumes) 50 * 51 * @param string $parent Required. Parent value for ListVolumesRequest. 52 * @param array $optParams Optional parameters. 53 * 54 * @opt_param string filter List filter. 55 * @opt_param int pageSize Requested page size. The server might return fewer 56 * items than requested. If unspecified, server will pick an appropriate 57 * default. 58 * @opt_param string pageToken A token identifying a page of results from the 59 * server. 60 * @return ListVolumesResponse 61 */ 62 public function listProjectsLocationsVolumes($parent, $optParams = []) 63 { 64 $params = ['parent' => $parent]; 65 $params = array_merge($params, $optParams); 66 return $this->call('list', [$params], ListVolumesResponse::class); 67 } 68 /** 69 * Update details of a single storage volume. (volumes.patch) 70 * 71 * @param string $name Output only. The resource name of this `Volume`. Resource 72 * names are schemeless URIs that follow the conventions in 73 * https://cloud.google.com/apis/design/resource_names. Format: 74 * `projects/{project}/locations/{location}/volumes/{volume}` 75 * @param Volume $postBody 76 * @param array $optParams Optional parameters. 77 * 78 * @opt_param string updateMask The list of fields to update. The only currently 79 * supported fields are: `snapshot_auto_delete_behavior` 80 * `snapshot_schedule_policy_name` 'labels' 'requested_size_gib' 81 * 'snapshot_enabled' 'snapshot_reservation_detail.reserved_space_percent' 82 * @return Operation 83 */ 84 public function patch($name, Volume $postBody, $optParams = []) 85 { 86 $params = ['name' => $name, 'postBody' => $postBody]; 87 $params = array_merge($params, $optParams); 88 return $this->call('patch', [$params], Operation::class); 89 } 90} 91 92// Adding a class alias for backwards compatibility with the previous class name. 93class_alias(ProjectsLocationsVolumes::class, 'Google_Service_Baremetalsolution_Resource_ProjectsLocationsVolumes'); 94