[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\FirebaseManagement\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\FirebaseManagement\FinalizeDefaultLocationRequest;
|
---|
| 21 | use Google\Service\FirebaseManagement\Operation;
|
---|
| 22 |
|
---|
| 23 | /**
|
---|
| 24 | * The "defaultLocation" collection of methods.
|
---|
| 25 | * Typical usage is:
|
---|
| 26 | * <code>
|
---|
| 27 | * $firebaseService = new Google\Service\FirebaseManagement(...);
|
---|
| 28 | * $defaultLocation = $firebaseService->projects_defaultLocation;
|
---|
| 29 | * </code>
|
---|
| 30 | */
|
---|
| 31 | class ProjectsDefaultLocation extends \Google\Service\Resource
|
---|
| 32 | {
|
---|
| 33 | /**
|
---|
| 34 | * **DECOMMISSIONED.** **If called, this endpoint will return a 404 error.**
|
---|
| 35 | * _Instead, use the applicable resource-specific REST API to set the location
|
---|
| 36 | * for each resource used in your Project._ Sets the ["location for default
|
---|
| 37 | * Google Cloud
|
---|
| 38 | * resources"](https://firebase.google.com/docs/projects/locations#default-
|
---|
| 39 | * cloud-location) for the specified FirebaseProject. This method creates a
|
---|
| 40 | * Google App Engine application with a [default Cloud Storage bucket](https://c
|
---|
| 41 | * loud.google.com/appengine/docs/standard/python/googlecloudstorageclient/setti
|
---|
| 42 | * ng-up-cloud-storage#activating_a_cloud_storage_bucket), located in the
|
---|
| 43 | * specified [`locationId`](#body.request_body.FIELDS.location_id). This
|
---|
| 44 | * location must be one of the available [App Engine
|
---|
| 45 | * locations](https://cloud.google.com/about/locations#region). After the
|
---|
| 46 | * location for default Google Cloud resources is finalized, or if it was
|
---|
| 47 | * already set, it cannot be changed. The location for default Google Cloud
|
---|
| 48 | * resources for the specified `FirebaseProject` might already be set because
|
---|
| 49 | * either the underlying Google Cloud `Project` already has an App Engine
|
---|
| 50 | * application or `FinalizeDefaultLocation` was previously called with a
|
---|
| 51 | * specified `locationId`. The result of this call is an
|
---|
| 52 | * [`Operation`](../../v1beta1/operations), which can be used to track the
|
---|
| 53 | * provisioning process. The
|
---|
| 54 | * [`response`](../../v1beta1/operations#Operation.FIELDS.response) type of the
|
---|
| 55 | * `Operation` is google.protobuf.Empty. The `Operation` can be polled by its
|
---|
| 56 | * `name` using GetOperation until `done` is true. When `done` is true, the
|
---|
| 57 | * `Operation` has either succeeded or failed. If the `Operation` has succeeded,
|
---|
| 58 | * its [`response`](../../v1beta1/operations#Operation.FIELDS.response) will be
|
---|
| 59 | * set to a google.protobuf.Empty; if the `Operation` has failed, its `error`
|
---|
| 60 | * will be set to a google.rpc.Status. The `Operation` is automatically deleted
|
---|
| 61 | * after completion, so there is no need to call DeleteOperation. All fields
|
---|
| 62 | * listed in the [request body](#request-body) are required. To call
|
---|
| 63 | * `FinalizeDefaultLocation`, a member must be an Owner of the Project.
|
---|
| 64 | * (defaultLocation.finalize)
|
---|
| 65 | *
|
---|
| 66 | * @param string $parent The resource name of the FirebaseProject for which the
|
---|
| 67 | * ["location for default Google Cloud
|
---|
| 68 | * resources"](https://firebase.google.com/docs/projects/locations#default-
|
---|
| 69 | * cloud-location) will be set, in the format: projects/PROJECT_IDENTIFIER Refer
|
---|
| 70 | * to the `FirebaseProject` [`name`](../projects#FirebaseProject.FIELDS.name)
|
---|
| 71 | * field for details about PROJECT_IDENTIFIER values.
|
---|
| 72 | * @param FinalizeDefaultLocationRequest $postBody
|
---|
| 73 | * @param array $optParams Optional parameters.
|
---|
| 74 | * @return Operation
|
---|
| 75 | * @throws \Google\Service\Exception
|
---|
| 76 | */
|
---|
| 77 | public function finalize($parent, FinalizeDefaultLocationRequest $postBody, $optParams = [])
|
---|
| 78 | {
|
---|
| 79 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 80 | $params = array_merge($params, $optParams);
|
---|
| 81 | return $this->call('finalize', [$params], Operation::class);
|
---|
| 82 | }
|
---|
| 83 | }
|
---|
| 84 |
|
---|
| 85 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 86 | class_alias(ProjectsDefaultLocation::class, 'Google_Service_FirebaseManagement_Resource_ProjectsDefaultLocation');
|
---|