source: vendor/google/apiclient-services/src/Firestore/Resource/ProjectsDatabasesBackupSchedules.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 9 days ago

Upload project files

  • Property mode set to 100644
File size: 4.8 KB
Line 
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\Firestore\Resource;
19
20use Google\Service\Firestore\FirestoreEmpty;
21use Google\Service\Firestore\GoogleFirestoreAdminV1BackupSchedule;
22use Google\Service\Firestore\GoogleFirestoreAdminV1ListBackupSchedulesResponse;
23
24/**
25 * The "backupSchedules" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $firestoreService = new Google\Service\Firestore(...);
29 * $backupSchedules = $firestoreService->projects_databases_backupSchedules;
30 * </code>
31 */
32class ProjectsDatabasesBackupSchedules extends \Google\Service\Resource
33{
34 /**
35 * Creates a backup schedule on a database. At most two backup schedules can be
36 * configured on a database, one daily backup schedule and one weekly backup
37 * schedule. (backupSchedules.create)
38 *
39 * @param string $parent Required. The parent database. Format
40 * `projects/{project}/databases/{database}`
41 * @param GoogleFirestoreAdminV1BackupSchedule $postBody
42 * @param array $optParams Optional parameters.
43 * @return GoogleFirestoreAdminV1BackupSchedule
44 * @throws \Google\Service\Exception
45 */
46 public function create($parent, GoogleFirestoreAdminV1BackupSchedule $postBody, $optParams = [])
47 {
48 $params = ['parent' => $parent, 'postBody' => $postBody];
49 $params = array_merge($params, $optParams);
50 return $this->call('create', [$params], GoogleFirestoreAdminV1BackupSchedule::class);
51 }
52 /**
53 * Deletes a backup schedule. (backupSchedules.delete)
54 *
55 * @param string $name Required. The name of the backup schedule. Format
56 * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}`
57 * @param array $optParams Optional parameters.
58 * @return FirestoreEmpty
59 * @throws \Google\Service\Exception
60 */
61 public function delete($name, $optParams = [])
62 {
63 $params = ['name' => $name];
64 $params = array_merge($params, $optParams);
65 return $this->call('delete', [$params], FirestoreEmpty::class);
66 }
67 /**
68 * Gets information about a backup schedule. (backupSchedules.get)
69 *
70 * @param string $name Required. The name of the backup schedule. Format
71 * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}`
72 * @param array $optParams Optional parameters.
73 * @return GoogleFirestoreAdminV1BackupSchedule
74 * @throws \Google\Service\Exception
75 */
76 public function get($name, $optParams = [])
77 {
78 $params = ['name' => $name];
79 $params = array_merge($params, $optParams);
80 return $this->call('get', [$params], GoogleFirestoreAdminV1BackupSchedule::class);
81 }
82 /**
83 * List backup schedules. (backupSchedules.listProjectsDatabasesBackupSchedules)
84 *
85 * @param string $parent Required. The parent database. Format is
86 * `projects/{project}/databases/{database}`.
87 * @param array $optParams Optional parameters.
88 * @return GoogleFirestoreAdminV1ListBackupSchedulesResponse
89 * @throws \Google\Service\Exception
90 */
91 public function listProjectsDatabasesBackupSchedules($parent, $optParams = [])
92 {
93 $params = ['parent' => $parent];
94 $params = array_merge($params, $optParams);
95 return $this->call('list', [$params], GoogleFirestoreAdminV1ListBackupSchedulesResponse::class);
96 }
97 /**
98 * Updates a backup schedule. (backupSchedules.patch)
99 *
100 * @param string $name Output only. The unique backup schedule identifier across
101 * all locations and databases for the given project. This will be auto-
102 * assigned. Format is
103 * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}`
104 * @param GoogleFirestoreAdminV1BackupSchedule $postBody
105 * @param array $optParams Optional parameters.
106 *
107 * @opt_param string updateMask The list of fields to be updated.
108 * @return GoogleFirestoreAdminV1BackupSchedule
109 * @throws \Google\Service\Exception
110 */
111 public function patch($name, GoogleFirestoreAdminV1BackupSchedule $postBody, $optParams = [])
112 {
113 $params = ['name' => $name, 'postBody' => $postBody];
114 $params = array_merge($params, $optParams);
115 return $this->call('patch', [$params], GoogleFirestoreAdminV1BackupSchedule::class);
116 }
117}
118
119// Adding a class alias for backwards compatibility with the previous class name.
120class_alias(ProjectsDatabasesBackupSchedules::class, 'Google_Service_Firestore_Resource_ProjectsDatabasesBackupSchedules');
Note: See TracBrowser for help on using the repository browser.