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\FirebaseManagement\Resource; 19 20use Google\Service\FirebaseManagement\ListAvailableLocationsResponse; 21 22/** 23 * The "availableLocations" collection of methods. 24 * Typical usage is: 25 * <code> 26 * $firebaseService = new Google\Service\FirebaseManagement(...); 27 * $availableLocations = $firebaseService->availableLocations; 28 * </code> 29 */ 30class ProjectsAvailableLocations extends \Google\Service\Resource 31{ 32 /** 33 * Lists the valid Google Cloud Platform (GCP) resource locations for the 34 * specified Project (including a FirebaseProject). One of these locations can 35 * be selected as the Project's [_default_ GCP resource 36 * location](https://firebase.google.com/docs/projects/locations), which is the 37 * geographical location where the Project's resources, such as Cloud Firestore, 38 * will be provisioned by default. However, if the default GCP resource location 39 * has already been set for the Project, then this setting cannot be changed. 40 * This call checks for any possible [location 41 * restrictions](https://cloud.google.com/resource-manager/docs/organization- 42 * policy/defining-locations) for the specified Project and, thus, might return 43 * a subset of all possible GCP resource locations. To list all GCP resource 44 * locations (regardless of any restrictions), call the endpoint without 45 * specifying a unique project identifier (that is, 46 * `/v1beta1/{parent=projects/-}/listAvailableLocations`). To call 47 * `ListAvailableLocations` with a specified project, a member must be at 48 * minimum a Viewer of the Project. Calls without a specified project do not 49 * require any specific project permissions. 50 * (availableLocations.listProjectsAvailableLocations) 51 * 52 * @param string $parent The FirebaseProject for which to list GCP resource 53 * locations, in the format: projects/PROJECT_IDENTIFIER Refer to the 54 * `FirebaseProject` [`name`](../projects#FirebaseProject.FIELDS.name) field for 55 * details about PROJECT_IDENTIFIER values. If no unique project identifier is 56 * specified (that is, `projects/-`), the returned list does not take into 57 * account org-specific or project-specific location restrictions. 58 * @param array $optParams Optional parameters. 59 * 60 * @opt_param int pageSize The maximum number of locations to return in the 61 * response. The server may return fewer than this value at its discretion. If 62 * no value is specified (or too large a value is specified), then the server 63 * will impose its own limit. This value cannot be negative. 64 * @opt_param string pageToken Token returned from a previous call to 65 * `ListAvailableLocations` indicating where in the list of locations to resume 66 * listing. 67 * @return ListAvailableLocationsResponse 68 */ 69 public function listProjectsAvailableLocations($parent, $optParams = []) 70 { 71 $params = ['parent' => $parent]; 72 $params = array_merge($params, $optParams); 73 return $this->call('list', [$params], ListAvailableLocationsResponse::class); 74 } 75} 76 77// Adding a class alias for backwards compatibility with the previous class name. 78class_alias(ProjectsAvailableLocations::class, 'Google_Service_FirebaseManagement_Resource_ProjectsAvailableLocations'); 79