1// Copyright 2022 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 15syntax = "proto3"; 16 17package google.cloud.datacatalog.v1; 18 19import "google/api/field_behavior.proto"; 20 21option cc_enable_arenas = true; 22option csharp_namespace = "Google.Cloud.DataCatalog.V1"; 23option go_package = "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb"; 24option java_multiple_files = true; 25option java_outer_classname = "BigQueryProto"; 26option java_package = "com.google.cloud.datacatalog.v1"; 27option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; 28option ruby_package = "Google::Cloud::DataCatalog::V1"; 29 30// Specification for the BigQuery connection. 31message BigQueryConnectionSpec { 32 // The type of the BigQuery connection. 33 enum ConnectionType { 34 // Unspecified type. 35 CONNECTION_TYPE_UNSPECIFIED = 0; 36 37 // Cloud SQL connection. 38 CLOUD_SQL = 1; 39 } 40 41 // The type of the BigQuery connection. 42 ConnectionType connection_type = 1; 43 44 oneof connection_spec { 45 // Specification for the BigQuery connection to a Cloud SQL instance. 46 CloudSqlBigQueryConnectionSpec cloud_sql = 2; 47 } 48 49 // True if there are credentials attached to the BigQuery connection; false 50 // otherwise. 51 bool has_credential = 3; 52} 53 54// Specification for the BigQuery connection to a Cloud SQL instance. 55message CloudSqlBigQueryConnectionSpec { 56 // Supported Cloud SQL database types. 57 enum DatabaseType { 58 // Unspecified database type. 59 DATABASE_TYPE_UNSPECIFIED = 0; 60 61 // Cloud SQL for PostgreSQL. 62 POSTGRES = 1; 63 64 // Cloud SQL for MySQL. 65 MYSQL = 2; 66 } 67 68 // Cloud SQL instance ID in the format of `project:location:instance`. 69 string instance_id = 1; 70 71 // Database name. 72 string database = 2; 73 74 // Type of the Cloud SQL database. 75 DatabaseType type = 3; 76} 77 78// Fields specific for BigQuery routines. 79message BigQueryRoutineSpec { 80 // Paths of the imported libraries. 81 repeated string imported_libraries = 1; 82} 83