|
| 1 | +// Copyright 2025 Google LLC |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +syntax = "proto3"; |
| 16 | + |
| 17 | +package google.cloud.alloydb.v1beta; |
| 18 | + |
| 19 | +import "google/api/annotations.proto"; |
| 20 | +import "google/api/client.proto"; |
| 21 | +import "google/api/field_behavior.proto"; |
| 22 | +import "google/api/resource.proto"; |
| 23 | +import "google/cloud/alloydb/v1beta/csql_resources.proto"; |
| 24 | +import "google/cloud/alloydb/v1beta/resources.proto"; |
| 25 | +import "google/cloud/alloydb/v1beta/service.proto"; |
| 26 | +import "google/longrunning/operations.proto"; |
| 27 | + |
| 28 | +option csharp_namespace = "Google.Cloud.AlloyDb.V1Beta"; |
| 29 | +option go_package = "cloud.google.com/go/alloydb/apiv1beta/alloydbpb;alloydbpb"; |
| 30 | +option java_multiple_files = true; |
| 31 | +option java_outer_classname = "CSQLServiceProto"; |
| 32 | +option java_package = "com.google.cloud.alloydb.v1beta"; |
| 33 | +option php_namespace = "Google\\Cloud\\AlloyDb\\V1beta"; |
| 34 | +option ruby_package = "Google::Cloud::AlloyDB::V1beta"; |
| 35 | + |
| 36 | +// Service for interactions with CloudSQL. |
| 37 | +service AlloyDBCSQLAdmin { |
| 38 | + option (google.api.default_host) = "alloydb.googleapis.com"; |
| 39 | + option (google.api.oauth_scopes) = |
| 40 | + "https://www.googleapis.com/auth/cloud-platform"; |
| 41 | + |
| 42 | + // Restores an AlloyDB cluster from a CloudSQL resource. |
| 43 | + rpc RestoreFromCloudSQL(RestoreFromCloudSQLRequest) |
| 44 | + returns (google.longrunning.Operation) { |
| 45 | + option (google.api.http) = { |
| 46 | + post: "/v1beta/{parent=projects/*/locations/*}/clusters:restoreFromCloudSQL" |
| 47 | + body: "*" |
| 48 | + }; |
| 49 | + option (google.api.method_signature) = "parent,cluster_id"; |
| 50 | + option (google.longrunning.operation_info) = { |
| 51 | + response_type: "Cluster" |
| 52 | + metadata_type: "OperationMetadata" |
| 53 | + }; |
| 54 | + } |
| 55 | +} |
| 56 | + |
| 57 | +// Message for registering Restoring from CloudSQL resource. |
| 58 | +message RestoreFromCloudSQLRequest { |
| 59 | + // The source CloudSQL resource to restore from. |
| 60 | + oneof source { |
| 61 | + // Cluster created from CloudSQL backup run. |
| 62 | + CloudSQLBackupRunSource cloudsql_backup_run_source = 101; |
| 63 | + } |
| 64 | + |
| 65 | + // Required. The location of the new cluster. For the required format, see the |
| 66 | + // comment on Cluster.name field. |
| 67 | + string parent = 1 [ |
| 68 | + (google.api.field_behavior) = REQUIRED, |
| 69 | + (google.api.resource_reference) = { |
| 70 | + child_type: "alloydb.googleapis.com/Cluster" |
| 71 | + } |
| 72 | + ]; |
| 73 | + |
| 74 | + // Required. ID of the requesting object. |
| 75 | + string cluster_id = 2 [(google.api.field_behavior) = REQUIRED]; |
| 76 | + |
| 77 | + // Required. The resource being created |
| 78 | + Cluster cluster = 3 [(google.api.field_behavior) = REQUIRED]; |
| 79 | +} |
0 commit comments