source: vendor/google/apiclient-services/src/SQLAdmin/Resource/BackupRuns.php

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

Upload project files

  • Property mode set to 100644
File size: 4.3 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\SQLAdmin\Resource;
19
20use Google\Service\SQLAdmin\BackupRun;
21use Google\Service\SQLAdmin\BackupRunsListResponse;
22use Google\Service\SQLAdmin\Operation;
23
24/**
25 * The "backupRuns" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $sqladminService = new Google\Service\SQLAdmin(...);
29 * $backupRuns = $sqladminService->backupRuns;
30 * </code>
31 */
32class BackupRuns extends \Google\Service\Resource
33{
34 /**
35 * Deletes the backup taken by a backup run. (backupRuns.delete)
36 *
37 * @param string $project Project ID of the project that contains the instance.
38 * @param string $instance Cloud SQL instance ID. This does not include the
39 * project ID.
40 * @param string $id The ID of the backup run to delete. To find a backup run
41 * ID, use the [list](https://cloud.google.com/sql/docs/mysql/admin-
42 * api/rest/v1/backupRuns/list) method.
43 * @param array $optParams Optional parameters.
44 * @return Operation
45 * @throws \Google\Service\Exception
46 */
47 public function delete($project, $instance, $id, $optParams = [])
48 {
49 $params = ['project' => $project, 'instance' => $instance, 'id' => $id];
50 $params = array_merge($params, $optParams);
51 return $this->call('delete', [$params], Operation::class);
52 }
53 /**
54 * Retrieves a resource containing information about a backup run.
55 * (backupRuns.get)
56 *
57 * @param string $project Project ID of the project that contains the instance.
58 * @param string $instance Cloud SQL instance ID. This does not include the
59 * project ID.
60 * @param string $id The ID of this backup run.
61 * @param array $optParams Optional parameters.
62 * @return BackupRun
63 * @throws \Google\Service\Exception
64 */
65 public function get($project, $instance, $id, $optParams = [])
66 {
67 $params = ['project' => $project, 'instance' => $instance, 'id' => $id];
68 $params = array_merge($params, $optParams);
69 return $this->call('get', [$params], BackupRun::class);
70 }
71 /**
72 * Creates a new backup run on demand. (backupRuns.insert)
73 *
74 * @param string $project Project ID of the project that contains the instance.
75 * @param string $instance Cloud SQL instance ID. This does not include the
76 * project ID.
77 * @param BackupRun $postBody
78 * @param array $optParams Optional parameters.
79 * @return Operation
80 * @throws \Google\Service\Exception
81 */
82 public function insert($project, $instance, BackupRun $postBody, $optParams = [])
83 {
84 $params = ['project' => $project, 'instance' => $instance, 'postBody' => $postBody];
85 $params = array_merge($params, $optParams);
86 return $this->call('insert', [$params], Operation::class);
87 }
88 /**
89 * Lists all backup runs associated with the project or a given instance and
90 * configuration in the reverse chronological order of the backup initiation
91 * time. (backupRuns.listBackupRuns)
92 *
93 * @param string $project Project ID of the project that contains the instance.
94 * @param string $instance Cloud SQL instance ID, or "-" for all instances. This
95 * does not include the project ID.
96 * @param array $optParams Optional parameters.
97 *
98 * @opt_param int maxResults Maximum number of backup runs per response.
99 * @opt_param string pageToken A previously-returned page token representing
100 * part of the larger set of results to view.
101 * @return BackupRunsListResponse
102 * @throws \Google\Service\Exception
103 */
104 public function listBackupRuns($project, $instance, $optParams = [])
105 {
106 $params = ['project' => $project, 'instance' => $instance];
107 $params = array_merge($params, $optParams);
108 return $this->call('list', [$params], BackupRunsListResponse::class);
109 }
110}
111
112// Adding a class alias for backwards compatibility with the previous class name.
113class_alias(BackupRuns::class, 'Google_Service_SQLAdmin_Resource_BackupRuns');
Note: See TracBrowser for help on using the repository browser.