[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\CloudRedis\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\CloudRedis\Backup;
|
---|
| 21 | use Google\Service\CloudRedis\ExportBackupRequest;
|
---|
| 22 | use Google\Service\CloudRedis\ListBackupsResponse;
|
---|
| 23 | use Google\Service\CloudRedis\Operation;
|
---|
| 24 |
|
---|
| 25 | /**
|
---|
| 26 | * The "backups" collection of methods.
|
---|
| 27 | * Typical usage is:
|
---|
| 28 | * <code>
|
---|
| 29 | * $redisService = new Google\Service\CloudRedis(...);
|
---|
| 30 | * $backups = $redisService->projects_locations_backupCollections_backups;
|
---|
| 31 | * </code>
|
---|
| 32 | */
|
---|
| 33 | class ProjectsLocationsBackupCollectionsBackups extends \Google\Service\Resource
|
---|
| 34 | {
|
---|
| 35 | /**
|
---|
| 36 | * Deletes a specific backup. (backups.delete)
|
---|
| 37 | *
|
---|
| 38 | * @param string $name Required. Redis backup resource name using the form: `pro
|
---|
| 39 | * jects/{project_id}/locations/{location_id}/backupCollections/{backup_collecti
|
---|
| 40 | * on_id}/backups/{backup_id}`
|
---|
| 41 | * @param array $optParams Optional parameters.
|
---|
| 42 | *
|
---|
| 43 | * @opt_param string requestId Optional. Idempotent request UUID.
|
---|
| 44 | * @return Operation
|
---|
| 45 | * @throws \Google\Service\Exception
|
---|
| 46 | */
|
---|
| 47 | public function delete($name, $optParams = [])
|
---|
| 48 | {
|
---|
| 49 | $params = ['name' => $name];
|
---|
| 50 | $params = array_merge($params, $optParams);
|
---|
| 51 | return $this->call('delete', [$params], Operation::class);
|
---|
| 52 | }
|
---|
| 53 | /**
|
---|
| 54 | * Exports a specific backup to a customer target Cloud Storage URI.
|
---|
| 55 | * (backups.export)
|
---|
| 56 | *
|
---|
| 57 | * @param string $name Required. Redis backup resource name using the form: `pro
|
---|
| 58 | * jects/{project_id}/locations/{location_id}/backupCollections/{backup_collecti
|
---|
| 59 | * on_id}/backups/{backup_id}`
|
---|
| 60 | * @param ExportBackupRequest $postBody
|
---|
| 61 | * @param array $optParams Optional parameters.
|
---|
| 62 | * @return Operation
|
---|
| 63 | * @throws \Google\Service\Exception
|
---|
| 64 | */
|
---|
| 65 | public function export($name, ExportBackupRequest $postBody, $optParams = [])
|
---|
| 66 | {
|
---|
| 67 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 68 | $params = array_merge($params, $optParams);
|
---|
| 69 | return $this->call('export', [$params], Operation::class);
|
---|
| 70 | }
|
---|
| 71 | /**
|
---|
| 72 | * Gets the details of a specific backup. (backups.get)
|
---|
| 73 | *
|
---|
| 74 | * @param string $name Required. Redis backup resource name using the form: `pro
|
---|
| 75 | * jects/{project_id}/locations/{location_id}/backupCollections/{backup_collecti
|
---|
| 76 | * on_id}/backups/{backup_id}`
|
---|
| 77 | * @param array $optParams Optional parameters.
|
---|
| 78 | * @return Backup
|
---|
| 79 | * @throws \Google\Service\Exception
|
---|
| 80 | */
|
---|
| 81 | public function get($name, $optParams = [])
|
---|
| 82 | {
|
---|
| 83 | $params = ['name' => $name];
|
---|
| 84 | $params = array_merge($params, $optParams);
|
---|
| 85 | return $this->call('get', [$params], Backup::class);
|
---|
| 86 | }
|
---|
| 87 | /**
|
---|
| 88 | * Lists all backups owned by a backup collection.
|
---|
| 89 | * (backups.listProjectsLocationsBackupCollectionsBackups)
|
---|
| 90 | *
|
---|
| 91 | * @param string $parent Required. The resource name of the backupCollection
|
---|
| 92 | * using the form: `projects/{project_id}/locations/{location_id}/backupCollecti
|
---|
| 93 | * ons/{backup_collection_id}`
|
---|
| 94 | * @param array $optParams Optional parameters.
|
---|
| 95 | *
|
---|
| 96 | * @opt_param int pageSize Optional. The maximum number of items to return. If
|
---|
| 97 | * not specified, a default value of 1000 will be used by the service.
|
---|
| 98 | * Regardless of the page_size value, the response may include a partial list
|
---|
| 99 | * and a caller should only rely on response's `next_page_token` to determine if
|
---|
| 100 | * there are more clusters left to be queried.
|
---|
| 101 | * @opt_param string pageToken Optional. The `next_page_token` value returned
|
---|
| 102 | * from a previous [ListBackupCollections] request, if any.
|
---|
| 103 | * @return ListBackupsResponse
|
---|
| 104 | * @throws \Google\Service\Exception
|
---|
| 105 | */
|
---|
| 106 | public function listProjectsLocationsBackupCollectionsBackups($parent, $optParams = [])
|
---|
| 107 | {
|
---|
| 108 | $params = ['parent' => $parent];
|
---|
| 109 | $params = array_merge($params, $optParams);
|
---|
| 110 | return $this->call('list', [$params], ListBackupsResponse::class);
|
---|
| 111 | }
|
---|
| 112 | }
|
---|
| 113 |
|
---|
| 114 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 115 | class_alias(ProjectsLocationsBackupCollectionsBackups::class, 'Google_Service_CloudRedis_Resource_ProjectsLocationsBackupCollectionsBackups');
|
---|