* $migrationcenterService = new Google\Service\MigrationCenterAPI(...); * $locations = $migrationcenterService->projects_locations; * */ class ProjectsLocations extends \Google\Service\Resource { /** * Gets information about a location. (locations.get) * * @param string $name Resource name for the location. * @param array $optParams Optional parameters. * @return Location * @throws \Google\Service\Exception */ public function get($name, $optParams = []) { $params = ['name' => $name]; $params = array_merge($params, $optParams); return $this->call('get', [$params], Location::class); } /** * Gets the details of regional settings. (locations.getSettings) * * @param string $name Required. Name of the resource. * @param array $optParams Optional parameters. * @return Settings * @throws \Google\Service\Exception */ public function getSettings($name, $optParams = []) { $params = ['name' => $name]; $params = array_merge($params, $optParams); return $this->call('getSettings', [$params], Settings::class); } /** * Lists information about the supported locations for this service. * (locations.listProjectsLocations) * * @param string $name The resource that owns the locations collection, if * applicable. * @param array $optParams Optional parameters. * * @opt_param string filter A filter to narrow down results to a preferred * subset. The filtering language accepts strings like `"displayName=tokyo"`, * and is documented in more detail in [AIP-160](https://google.aip.dev/160). * @opt_param int pageSize The maximum number of results to return. If not set, * the service selects a default. * @opt_param string pageToken A page token received from the `next_page_token` * field in the response. Send that page token to receive the subsequent page. * @return ListLocationsResponse * @throws \Google\Service\Exception */ public function listProjectsLocations($name, $optParams = []) { $params = ['name' => $name]; $params = array_merge($params, $optParams); return $this->call('list', [$params], ListLocationsResponse::class); } /** * Updates the regional-level project settings. (locations.updateSettings) * * @param string $name Output only. The name of the resource. * @param Settings $postBody * @param array $optParams Optional parameters. * * @opt_param string requestId Optional. An optional request ID to identify * requests. Specify a unique request ID so that if you must retry your request, * the server will know to ignore the request if it has already been completed. * The server will guarantee that for at least 60 minutes since the first * request. For example, consider a situation where you make an initial request * and the request times out. If you make the request again with the same * request ID, the server can check if original operation with the same request * ID was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. The request ID must * be a valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). * @opt_param string updateMask Required. Field mask is used to specify the * fields to be overwritten in the `Settings` resource by the update. The values * specified in the `update_mask` field are relative to the resource, not the * full request. A field will be overwritten if it is in the mask. A single * * value in the mask lets you to overwrite all fields. * @return Operation * @throws \Google\Service\Exception */ public function updateSettings($name, Settings $postBody, $optParams = []) { $params = ['name' => $name, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('updateSettings', [$params], Operation::class); } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(ProjectsLocations::class, 'Google_Service_MigrationCenterAPI_Resource_ProjectsLocations');