[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\MigrationCenterAPI\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\MigrationCenterAPI\ListLocationsResponse;
|
---|
| 21 | use Google\Service\MigrationCenterAPI\Location;
|
---|
| 22 | use Google\Service\MigrationCenterAPI\Operation;
|
---|
| 23 | use Google\Service\MigrationCenterAPI\Settings;
|
---|
| 24 |
|
---|
| 25 | /**
|
---|
| 26 | * The "locations" collection of methods.
|
---|
| 27 | * Typical usage is:
|
---|
| 28 | * <code>
|
---|
| 29 | * $migrationcenterService = new Google\Service\MigrationCenterAPI(...);
|
---|
| 30 | * $locations = $migrationcenterService->projects_locations;
|
---|
| 31 | * </code>
|
---|
| 32 | */
|
---|
| 33 | class ProjectsLocations extends \Google\Service\Resource
|
---|
| 34 | {
|
---|
| 35 | /**
|
---|
| 36 | * Gets information about a location. (locations.get)
|
---|
| 37 | *
|
---|
| 38 | * @param string $name Resource name for the location.
|
---|
| 39 | * @param array $optParams Optional parameters.
|
---|
| 40 | * @return Location
|
---|
| 41 | * @throws \Google\Service\Exception
|
---|
| 42 | */
|
---|
| 43 | public function get($name, $optParams = [])
|
---|
| 44 | {
|
---|
| 45 | $params = ['name' => $name];
|
---|
| 46 | $params = array_merge($params, $optParams);
|
---|
| 47 | return $this->call('get', [$params], Location::class);
|
---|
| 48 | }
|
---|
| 49 | /**
|
---|
| 50 | * Gets the details of regional settings. (locations.getSettings)
|
---|
| 51 | *
|
---|
| 52 | * @param string $name Required. Name of the resource.
|
---|
| 53 | * @param array $optParams Optional parameters.
|
---|
| 54 | * @return Settings
|
---|
| 55 | * @throws \Google\Service\Exception
|
---|
| 56 | */
|
---|
| 57 | public function getSettings($name, $optParams = [])
|
---|
| 58 | {
|
---|
| 59 | $params = ['name' => $name];
|
---|
| 60 | $params = array_merge($params, $optParams);
|
---|
| 61 | return $this->call('getSettings', [$params], Settings::class);
|
---|
| 62 | }
|
---|
| 63 | /**
|
---|
| 64 | * Lists information about the supported locations for this service.
|
---|
| 65 | * (locations.listProjectsLocations)
|
---|
| 66 | *
|
---|
| 67 | * @param string $name The resource that owns the locations collection, if
|
---|
| 68 | * applicable.
|
---|
| 69 | * @param array $optParams Optional parameters.
|
---|
| 70 | *
|
---|
| 71 | * @opt_param string filter A filter to narrow down results to a preferred
|
---|
| 72 | * subset. The filtering language accepts strings like `"displayName=tokyo"`,
|
---|
| 73 | * and is documented in more detail in [AIP-160](https://google.aip.dev/160).
|
---|
| 74 | * @opt_param int pageSize The maximum number of results to return. If not set,
|
---|
| 75 | * the service selects a default.
|
---|
| 76 | * @opt_param string pageToken A page token received from the `next_page_token`
|
---|
| 77 | * field in the response. Send that page token to receive the subsequent page.
|
---|
| 78 | * @return ListLocationsResponse
|
---|
| 79 | * @throws \Google\Service\Exception
|
---|
| 80 | */
|
---|
| 81 | public function listProjectsLocations($name, $optParams = [])
|
---|
| 82 | {
|
---|
| 83 | $params = ['name' => $name];
|
---|
| 84 | $params = array_merge($params, $optParams);
|
---|
| 85 | return $this->call('list', [$params], ListLocationsResponse::class);
|
---|
| 86 | }
|
---|
| 87 | /**
|
---|
| 88 | * Updates the regional-level project settings. (locations.updateSettings)
|
---|
| 89 | *
|
---|
| 90 | * @param string $name Output only. The name of the resource.
|
---|
| 91 | * @param Settings $postBody
|
---|
| 92 | * @param array $optParams Optional parameters.
|
---|
| 93 | *
|
---|
| 94 | * @opt_param string requestId Optional. An optional request ID to identify
|
---|
| 95 | * requests. Specify a unique request ID so that if you must retry your request,
|
---|
| 96 | * the server will know to ignore the request if it has already been completed.
|
---|
| 97 | * The server will guarantee that for at least 60 minutes since the first
|
---|
| 98 | * request. For example, consider a situation where you make an initial request
|
---|
| 99 | * and the request times out. If you make the request again with the same
|
---|
| 100 | * request ID, the server can check if original operation with the same request
|
---|
| 101 | * ID was received, and if so, will ignore the second request. This prevents
|
---|
| 102 | * clients from accidentally creating duplicate commitments. The request ID must
|
---|
| 103 | * be a valid UUID with the exception that zero UUID is not supported
|
---|
| 104 | * (00000000-0000-0000-0000-000000000000).
|
---|
| 105 | * @opt_param string updateMask Required. Field mask is used to specify the
|
---|
| 106 | * fields to be overwritten in the `Settings` resource by the update. The values
|
---|
| 107 | * specified in the `update_mask` field are relative to the resource, not the
|
---|
| 108 | * full request. A field will be overwritten if it is in the mask. A single *
|
---|
| 109 | * value in the mask lets you to overwrite all fields.
|
---|
| 110 | * @return Operation
|
---|
| 111 | * @throws \Google\Service\Exception
|
---|
| 112 | */
|
---|
| 113 | public function updateSettings($name, Settings $postBody, $optParams = [])
|
---|
| 114 | {
|
---|
| 115 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 116 | $params = array_merge($params, $optParams);
|
---|
| 117 | return $this->call('updateSettings', [$params], Operation::class);
|
---|
| 118 | }
|
---|
| 119 | }
|
---|
| 120 |
|
---|
| 121 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 122 | class_alias(ProjectsLocations::class, 'Google_Service_MigrationCenterAPI_Resource_ProjectsLocations');
|
---|