[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\Firestore\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Firestore\FirestoreEmpty;
|
---|
| 21 | use Google\Service\Firestore\GoogleFirestoreAdminV1Backup;
|
---|
| 22 | use Google\Service\Firestore\GoogleFirestoreAdminV1ListBackupsResponse;
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * The "backups" collection of methods.
|
---|
| 26 | * Typical usage is:
|
---|
| 27 | * <code>
|
---|
| 28 | * $firestoreService = new Google\Service\Firestore(...);
|
---|
| 29 | * $backups = $firestoreService->projects_locations_backups;
|
---|
| 30 | * </code>
|
---|
| 31 | */
|
---|
| 32 | class ProjectsLocationsBackups extends \Google\Service\Resource
|
---|
| 33 | {
|
---|
| 34 | /**
|
---|
| 35 | * Deletes a backup. (backups.delete)
|
---|
| 36 | *
|
---|
| 37 | * @param string $name Required. Name of the backup to delete. format is
|
---|
| 38 | * `projects/{project}/locations/{location}/backups/{backup}`.
|
---|
| 39 | * @param array $optParams Optional parameters.
|
---|
| 40 | * @return FirestoreEmpty
|
---|
| 41 | * @throws \Google\Service\Exception
|
---|
| 42 | */
|
---|
| 43 | public function delete($name, $optParams = [])
|
---|
| 44 | {
|
---|
| 45 | $params = ['name' => $name];
|
---|
| 46 | $params = array_merge($params, $optParams);
|
---|
| 47 | return $this->call('delete', [$params], FirestoreEmpty::class);
|
---|
| 48 | }
|
---|
| 49 | /**
|
---|
| 50 | * Gets information about a backup. (backups.get)
|
---|
| 51 | *
|
---|
| 52 | * @param string $name Required. Name of the backup to fetch. Format is
|
---|
| 53 | * `projects/{project}/locations/{location}/backups/{backup}`.
|
---|
| 54 | * @param array $optParams Optional parameters.
|
---|
| 55 | * @return GoogleFirestoreAdminV1Backup
|
---|
| 56 | * @throws \Google\Service\Exception
|
---|
| 57 | */
|
---|
| 58 | public function get($name, $optParams = [])
|
---|
| 59 | {
|
---|
| 60 | $params = ['name' => $name];
|
---|
| 61 | $params = array_merge($params, $optParams);
|
---|
| 62 | return $this->call('get', [$params], GoogleFirestoreAdminV1Backup::class);
|
---|
| 63 | }
|
---|
| 64 | /**
|
---|
| 65 | * Lists all the backups. (backups.listProjectsLocationsBackups)
|
---|
| 66 | *
|
---|
| 67 | * @param string $parent Required. The location to list backups from. Format is
|
---|
| 68 | * `projects/{project}/locations/{location}`. Use `{location} = '-'` to list
|
---|
| 69 | * backups from all locations for the given project. This allows listing backups
|
---|
| 70 | * from a single location or from all locations.
|
---|
| 71 | * @param array $optParams Optional parameters.
|
---|
| 72 | *
|
---|
| 73 | * @opt_param string filter An expression that filters the list of returned
|
---|
| 74 | * backups. A filter expression consists of a field name, a comparison operator,
|
---|
| 75 | * and a value for filtering. The value must be a string, a number, or a
|
---|
| 76 | * boolean. The comparison operator must be one of: `<`, `>`, `<=`, `>=`, `!=`,
|
---|
| 77 | * `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case
|
---|
| 78 | * sensitive. The following fields in the Backup are eligible for filtering: *
|
---|
| 79 | * `database_uid` (supports `=` only)
|
---|
| 80 | * @return GoogleFirestoreAdminV1ListBackupsResponse
|
---|
| 81 | * @throws \Google\Service\Exception
|
---|
| 82 | */
|
---|
| 83 | public function listProjectsLocationsBackups($parent, $optParams = [])
|
---|
| 84 | {
|
---|
| 85 | $params = ['parent' => $parent];
|
---|
| 86 | $params = array_merge($params, $optParams);
|
---|
| 87 | return $this->call('list', [$params], GoogleFirestoreAdminV1ListBackupsResponse::class);
|
---|
| 88 | }
|
---|
| 89 | }
|
---|
| 90 |
|
---|
| 91 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 92 | class_alias(ProjectsLocationsBackups::class, 'Google_Service_Firestore_Resource_ProjectsLocationsBackups');
|
---|