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