[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\Compute\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Compute\InstanceSettings as InstanceSettingsModel;
|
---|
| 21 | use Google\Service\Compute\Operation;
|
---|
| 22 |
|
---|
| 23 | /**
|
---|
| 24 | * The "instanceSettings" collection of methods.
|
---|
| 25 | * Typical usage is:
|
---|
| 26 | * <code>
|
---|
| 27 | * $computeService = new Google\Service\Compute(...);
|
---|
| 28 | * $instanceSettings = $computeService->instanceSettings;
|
---|
| 29 | * </code>
|
---|
| 30 | */
|
---|
| 31 | class InstanceSettings extends \Google\Service\Resource
|
---|
| 32 | {
|
---|
| 33 | /**
|
---|
| 34 | * Get Instance settings. (instanceSettings.get)
|
---|
| 35 | *
|
---|
| 36 | * @param string $project Project ID for this request.
|
---|
| 37 | * @param string $zone Name of the zone for this request.
|
---|
| 38 | * @param array $optParams Optional parameters.
|
---|
| 39 | * @return InstanceSettingsModel
|
---|
| 40 | * @throws \Google\Service\Exception
|
---|
| 41 | */
|
---|
| 42 | public function get($project, $zone, $optParams = [])
|
---|
| 43 | {
|
---|
| 44 | $params = ['project' => $project, 'zone' => $zone];
|
---|
| 45 | $params = array_merge($params, $optParams);
|
---|
| 46 | return $this->call('get', [$params], InstanceSettingsModel::class);
|
---|
| 47 | }
|
---|
| 48 | /**
|
---|
| 49 | * Patch Instance settings (instanceSettings.patch)
|
---|
| 50 | *
|
---|
| 51 | * @param string $project Project ID for this request.
|
---|
| 52 | * @param string $zone The zone scoping this request. It should conform to
|
---|
| 53 | * RFC1035.
|
---|
| 54 | * @param InstanceSettingsModel $postBody
|
---|
| 55 | * @param array $optParams Optional parameters.
|
---|
| 56 | *
|
---|
| 57 | * @opt_param string requestId An optional request ID to identify requests.
|
---|
| 58 | * Specify a unique request ID so that if you must retry your request, the
|
---|
| 59 | * server will know to ignore the request if it has already been completed. For
|
---|
| 60 | * example, consider a situation where you make an initial request and the
|
---|
| 61 | * request times out. If you make the request again with the same request ID,
|
---|
| 62 | * the server can check if original operation with the same request ID was
|
---|
| 63 | * received, and if so, will ignore the second request. This prevents clients
|
---|
| 64 | * from accidentally creating duplicate commitments. The request ID must be a
|
---|
| 65 | * valid UUID with the exception that zero UUID is not supported (
|
---|
| 66 | * 00000000-0000-0000-0000-000000000000).
|
---|
| 67 | * @opt_param string updateMask update_mask indicates fields to be updated as
|
---|
| 68 | * part of this request.
|
---|
| 69 | * @return Operation
|
---|
| 70 | * @throws \Google\Service\Exception
|
---|
| 71 | */
|
---|
| 72 | public function patch($project, $zone, InstanceSettingsModel $postBody, $optParams = [])
|
---|
| 73 | {
|
---|
| 74 | $params = ['project' => $project, 'zone' => $zone, 'postBody' => $postBody];
|
---|
| 75 | $params = array_merge($params, $optParams);
|
---|
| 76 | return $this->call('patch', [$params], Operation::class);
|
---|
| 77 | }
|
---|
| 78 | }
|
---|
| 79 |
|
---|
| 80 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 81 | class_alias(InstanceSettings::class, 'Google_Service_Compute_Resource_InstanceSettings');
|
---|