[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\OracleDatabase\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\OracleDatabase\AutonomousDatabase;
|
---|
| 21 | use Google\Service\OracleDatabase\GenerateAutonomousDatabaseWalletRequest;
|
---|
| 22 | use Google\Service\OracleDatabase\GenerateAutonomousDatabaseWalletResponse;
|
---|
| 23 | use Google\Service\OracleDatabase\ListAutonomousDatabasesResponse;
|
---|
| 24 | use Google\Service\OracleDatabase\Operation;
|
---|
| 25 | use Google\Service\OracleDatabase\RestoreAutonomousDatabaseRequest;
|
---|
| 26 |
|
---|
| 27 | /**
|
---|
| 28 | * The "autonomousDatabases" collection of methods.
|
---|
| 29 | * Typical usage is:
|
---|
| 30 | * <code>
|
---|
| 31 | * $oracledatabaseService = new Google\Service\OracleDatabase(...);
|
---|
| 32 | * $autonomousDatabases = $oracledatabaseService->projects_locations_autonomousDatabases;
|
---|
| 33 | * </code>
|
---|
| 34 | */
|
---|
| 35 | class ProjectsLocationsAutonomousDatabases extends \Google\Service\Resource
|
---|
| 36 | {
|
---|
| 37 | /**
|
---|
| 38 | * Creates a new Autonomous Database in a given project and location.
|
---|
| 39 | * (autonomousDatabases.create)
|
---|
| 40 | *
|
---|
| 41 | * @param string $parent Required. The name of the parent in the following
|
---|
| 42 | * format: projects/{project}/locations/{location}.
|
---|
| 43 | * @param AutonomousDatabase $postBody
|
---|
| 44 | * @param array $optParams Optional parameters.
|
---|
| 45 | *
|
---|
| 46 | * @opt_param string autonomousDatabaseId Required. The ID of the Autonomous
|
---|
| 47 | * Database to create. This value is restricted to
|
---|
| 48 | * (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of 63 characters in
|
---|
| 49 | * length. The value must start with a letter and end with a letter or a number.
|
---|
| 50 | * @opt_param string requestId Optional. An optional ID to identify the request.
|
---|
| 51 | * This value is used to identify duplicate requests. If you make a request with
|
---|
| 52 | * the same request ID and the original request is still in progress or
|
---|
| 53 | * completed, the server ignores the second request. This prevents clients from
|
---|
| 54 | * accidentally creating duplicate commitments. The request ID must be a valid
|
---|
| 55 | * UUID with the exception that zero UUID is not supported
|
---|
| 56 | * (00000000-0000-0000-0000-000000000000).
|
---|
| 57 | * @return Operation
|
---|
| 58 | * @throws \Google\Service\Exception
|
---|
| 59 | */
|
---|
| 60 | public function create($parent, AutonomousDatabase $postBody, $optParams = [])
|
---|
| 61 | {
|
---|
| 62 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 63 | $params = array_merge($params, $optParams);
|
---|
| 64 | return $this->call('create', [$params], Operation::class);
|
---|
| 65 | }
|
---|
| 66 | /**
|
---|
| 67 | * Deletes a single Autonomous Database. (autonomousDatabases.delete)
|
---|
| 68 | *
|
---|
| 69 | * @param string $name Required. The name of the resource in the following
|
---|
| 70 | * format: projects/{project}/locations/{location}/autonomousDatabases/{autonomo
|
---|
| 71 | * us_database}.
|
---|
| 72 | * @param array $optParams Optional parameters.
|
---|
| 73 | *
|
---|
| 74 | * @opt_param string requestId Optional. An optional ID to identify the request.
|
---|
| 75 | * This value is used to identify duplicate requests. If you make a request with
|
---|
| 76 | * the same request ID and the original request is still in progress or
|
---|
| 77 | * completed, the server ignores the second request. This prevents clients from
|
---|
| 78 | * accidentally creating duplicate commitments. The request ID must be a valid
|
---|
| 79 | * UUID with the exception that zero UUID is not supported
|
---|
| 80 | * (00000000-0000-0000-0000-000000000000).
|
---|
| 81 | * @return Operation
|
---|
| 82 | * @throws \Google\Service\Exception
|
---|
| 83 | */
|
---|
| 84 | public function delete($name, $optParams = [])
|
---|
| 85 | {
|
---|
| 86 | $params = ['name' => $name];
|
---|
| 87 | $params = array_merge($params, $optParams);
|
---|
| 88 | return $this->call('delete', [$params], Operation::class);
|
---|
| 89 | }
|
---|
| 90 | /**
|
---|
| 91 | * Generates a wallet for an Autonomous Database.
|
---|
| 92 | * (autonomousDatabases.generateWallet)
|
---|
| 93 | *
|
---|
| 94 | * @param string $name Required. The name of the Autonomous Database in the
|
---|
| 95 | * following format: projects/{project}/locations/{location}/autonomousDatabases
|
---|
| 96 | * /{autonomous_database}.
|
---|
| 97 | * @param GenerateAutonomousDatabaseWalletRequest $postBody
|
---|
| 98 | * @param array $optParams Optional parameters.
|
---|
| 99 | * @return GenerateAutonomousDatabaseWalletResponse
|
---|
| 100 | * @throws \Google\Service\Exception
|
---|
| 101 | */
|
---|
| 102 | public function generateWallet($name, GenerateAutonomousDatabaseWalletRequest $postBody, $optParams = [])
|
---|
| 103 | {
|
---|
| 104 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 105 | $params = array_merge($params, $optParams);
|
---|
| 106 | return $this->call('generateWallet', [$params], GenerateAutonomousDatabaseWalletResponse::class);
|
---|
| 107 | }
|
---|
| 108 | /**
|
---|
| 109 | * Gets the details of a single Autonomous Database. (autonomousDatabases.get)
|
---|
| 110 | *
|
---|
| 111 | * @param string $name Required. The name of the Autonomous Database in the
|
---|
| 112 | * following format: projects/{project}/locations/{location}/autonomousDatabases
|
---|
| 113 | * /{autonomous_database}.
|
---|
| 114 | * @param array $optParams Optional parameters.
|
---|
| 115 | * @return AutonomousDatabase
|
---|
| 116 | * @throws \Google\Service\Exception
|
---|
| 117 | */
|
---|
| 118 | public function get($name, $optParams = [])
|
---|
| 119 | {
|
---|
| 120 | $params = ['name' => $name];
|
---|
| 121 | $params = array_merge($params, $optParams);
|
---|
| 122 | return $this->call('get', [$params], AutonomousDatabase::class);
|
---|
| 123 | }
|
---|
| 124 | /**
|
---|
| 125 | * Lists the Autonomous Databases in a given project and location.
|
---|
| 126 | * (autonomousDatabases.listProjectsLocationsAutonomousDatabases)
|
---|
| 127 | *
|
---|
| 128 | * @param string $parent Required. The parent value for the Autonomous Database
|
---|
| 129 | * in the following format: projects/{project}/locations/{location}.
|
---|
| 130 | * @param array $optParams Optional parameters.
|
---|
| 131 | *
|
---|
| 132 | * @opt_param string filter Optional. An expression for filtering the results of
|
---|
| 133 | * the request.
|
---|
| 134 | * @opt_param string orderBy Optional. An expression for ordering the results of
|
---|
| 135 | * the request.
|
---|
| 136 | * @opt_param int pageSize Optional. The maximum number of items to return. If
|
---|
| 137 | * unspecified, at most 50 Autonomous Database will be returned. The maximum
|
---|
| 138 | * value is 1000; values above 1000 will be coerced to 1000.
|
---|
| 139 | * @opt_param string pageToken Optional. A token identifying a page of results
|
---|
| 140 | * the server should return.
|
---|
| 141 | * @return ListAutonomousDatabasesResponse
|
---|
| 142 | * @throws \Google\Service\Exception
|
---|
| 143 | */
|
---|
| 144 | public function listProjectsLocationsAutonomousDatabases($parent, $optParams = [])
|
---|
| 145 | {
|
---|
| 146 | $params = ['parent' => $parent];
|
---|
| 147 | $params = array_merge($params, $optParams);
|
---|
| 148 | return $this->call('list', [$params], ListAutonomousDatabasesResponse::class);
|
---|
| 149 | }
|
---|
| 150 | /**
|
---|
| 151 | * Restores a single Autonomous Database. (autonomousDatabases.restore)
|
---|
| 152 | *
|
---|
| 153 | * @param string $name Required. The name of the Autonomous Database in the
|
---|
| 154 | * following format: projects/{project}/locations/{location}/autonomousDatabases
|
---|
| 155 | * /{autonomous_database}.
|
---|
| 156 | * @param RestoreAutonomousDatabaseRequest $postBody
|
---|
| 157 | * @param array $optParams Optional parameters.
|
---|
| 158 | * @return Operation
|
---|
| 159 | * @throws \Google\Service\Exception
|
---|
| 160 | */
|
---|
| 161 | public function restore($name, RestoreAutonomousDatabaseRequest $postBody, $optParams = [])
|
---|
| 162 | {
|
---|
| 163 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 164 | $params = array_merge($params, $optParams);
|
---|
| 165 | return $this->call('restore', [$params], Operation::class);
|
---|
| 166 | }
|
---|
| 167 | }
|
---|
| 168 |
|
---|
| 169 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 170 | class_alias(ProjectsLocationsAutonomousDatabases::class, 'Google_Service_OracleDatabase_Resource_ProjectsLocationsAutonomousDatabases');
|
---|