Skip to content

Commit 05f6595

Browse files
Google APIscopybara-github
authored andcommitted
feat: add a new data sources for QueryData API
PiperOrigin-RevId: 843338117
1 parent b32495a commit 05f6595

3 files changed

Lines changed: 176 additions & 0 deletions

File tree

google/cloud/geminidataanalytics/v1alpha/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ load("@rules_proto//proto:defs.bzl", "proto_library")
2424
proto_library(
2525
name = "geminidataanalytics_proto",
2626
srcs = [
27+
"agent_context.proto",
2728
"context.proto",
2829
"conversation.proto",
2930
"credentials.proto",
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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.geminidataanalytics.v1alpha;
18+
19+
import "google/api/field_behavior.proto";
20+
21+
option csharp_namespace = "Google.Cloud.GeminiDataAnalytics.V1Alpha";
22+
option go_package = "cloud.google.com/go/geminidataanalytics/apiv1alpha/geminidataanalyticspb;geminidataanalyticspb";
23+
option java_multiple_files = true;
24+
option java_outer_classname = "AgentContextProto";
25+
option java_package = "com.google.cloud.geminidataanalytics.v1alpha";
26+
option php_namespace = "Google\\Cloud\\GeminiDataAnalytics\\V1alpha";
27+
option ruby_package = "Google::Cloud::GeminiDataAnalytics::V1alpha";
28+
29+
// Message representing a reference to Agent Context.
30+
message AgentContextReference {
31+
// Required. Context set ID to retrieve.
32+
string context_set_id = 1 [(google.api.field_behavior) = REQUIRED];
33+
}

google/cloud/geminidataanalytics/v1alpha/datasource.proto

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ syntax = "proto3";
1717
package google.cloud.geminidataanalytics.v1alpha;
1818

1919
import "google/api/field_behavior.proto";
20+
import "google/cloud/geminidataanalytics/v1alpha/agent_context.proto";
2021
import "google/cloud/geminidataanalytics/v1alpha/credentials.proto";
2122
import "google/protobuf/struct.proto";
2223

@@ -51,6 +52,15 @@ message DatasourceReferences {
5152

5253
// References to Looker Explores.
5354
LookerExploreReferences looker = 3;
55+
56+
// Reference to an AlloyDB database.
57+
AlloyDbReference alloydb = 8;
58+
59+
// Reference to a Spanner database.
60+
SpannerReference spanner_reference = 9;
61+
62+
// Reference to a CloudSql database.
63+
CloudSqlReference cloud_sql_reference = 10;
5464
}
5565
}
5666

@@ -88,6 +98,129 @@ message StudioDatasourceReference {
8898
string datasource_id = 1 [(google.api.field_behavior) = REQUIRED];
8999
}
90100

101+
// Message representing reference to an AlloyDB database and agent context.
102+
message AlloyDbReference {
103+
// Required. Singular proto that supports specifying which database and tables
104+
// to include.
105+
AlloyDbDatabaseReference database_reference = 1
106+
[(google.api.field_behavior) = REQUIRED];
107+
108+
// Optional. Parameters for retrieving data from Agent Context.
109+
AgentContextReference agent_context_reference = 3
110+
[(google.api.field_behavior) = OPTIONAL];
111+
}
112+
113+
// Message representing a reference to a single AlloyDB database.
114+
message AlloyDbDatabaseReference {
115+
// Required. The project the instance belongs to.
116+
string project_id = 1 [(google.api.field_behavior) = REQUIRED];
117+
118+
// Required. The region of the instance.
119+
string region = 2 [(google.api.field_behavior) = REQUIRED];
120+
121+
// Required. The cluster id.
122+
string cluster_id = 3 [(google.api.field_behavior) = REQUIRED];
123+
124+
// Required. The instance id.
125+
string instance_id = 4 [(google.api.field_behavior) = REQUIRED];
126+
127+
// Required. The database id.
128+
string database_id = 5 [(google.api.field_behavior) = REQUIRED];
129+
130+
// Optional. The table ids. Denotes all tables if unset.
131+
repeated string table_ids = 6 [(google.api.field_behavior) = OPTIONAL];
132+
}
133+
134+
// Message representing reference to a Spanner database and agent context.
135+
message SpannerReference {
136+
// Required. Singular proto that supports specifying which database and tables
137+
// to include.
138+
SpannerDatabaseReference database_reference = 1
139+
[(google.api.field_behavior) = REQUIRED];
140+
141+
// Optional. Parameters for retrieving data from Agent Context.
142+
AgentContextReference agent_context_reference = 2
143+
[(google.api.field_behavior) = OPTIONAL];
144+
}
145+
146+
// Message representing a reference to a single Spanner database.
147+
message SpannerDatabaseReference {
148+
// The database engine.
149+
enum Engine {
150+
// Engine is not specified.
151+
ENGINE_UNSPECIFIED = 0;
152+
153+
// Google SQL
154+
GOOGLE_SQL = 1;
155+
156+
// PostgreSQL
157+
POSTGRESQL = 2;
158+
}
159+
160+
// Required. The engine of the Spanner instance.
161+
Engine engine = 6 [(google.api.field_behavior) = REQUIRED];
162+
163+
// Required. The project the instance belongs to.
164+
string project_id = 1 [(google.api.field_behavior) = REQUIRED];
165+
166+
// Required. The region of the instance.
167+
string region = 2 [(google.api.field_behavior) = REQUIRED];
168+
169+
// Required. The instance id.
170+
string instance_id = 3 [(google.api.field_behavior) = REQUIRED];
171+
172+
// Required. The database id.
173+
string database_id = 4 [(google.api.field_behavior) = REQUIRED];
174+
175+
// Optional. The table ids. Denotes all tables if unset.
176+
repeated string table_ids = 5 [(google.api.field_behavior) = OPTIONAL];
177+
}
178+
179+
// Message representing reference to a CloudSQL database and agent context.
180+
message CloudSqlReference {
181+
// Required. Singular proto that supports specifying which database and tables
182+
// to include.
183+
CloudSqlDatabaseReference database_reference = 1
184+
[(google.api.field_behavior) = REQUIRED];
185+
186+
// Optional. Parameters for retrieving data from Agent Context.
187+
AgentContextReference agent_context_reference = 2
188+
[(google.api.field_behavior) = OPTIONAL];
189+
}
190+
191+
// Message representing a reference to a single CloudSQL database.
192+
message CloudSqlDatabaseReference {
193+
// The database engine.
194+
enum Engine {
195+
// Engine is not specified.
196+
ENGINE_UNSPECIFIED = 0;
197+
198+
// PostgreSQL
199+
POSTGRESQL = 1;
200+
201+
// MySQL
202+
MYSQL = 2;
203+
}
204+
205+
// Required. The engine of the Cloud SQL instance.
206+
Engine engine = 1 [(google.api.field_behavior) = REQUIRED];
207+
208+
// Required. The project the instance belongs to.
209+
string project_id = 2 [(google.api.field_behavior) = REQUIRED];
210+
211+
// Required. The region of the instance.
212+
string region = 3 [(google.api.field_behavior) = REQUIRED];
213+
214+
// Required. The instance id.
215+
string instance_id = 4 [(google.api.field_behavior) = REQUIRED];
216+
217+
// Required. The database id.
218+
string database_id = 5 [(google.api.field_behavior) = REQUIRED];
219+
220+
// Optional. The table ids. Denotes all tables if unset.
221+
repeated string table_ids = 7 [(google.api.field_behavior) = OPTIONAL];
222+
}
223+
91224
// Message representing references to Looker explores.
92225
message LookerExploreReferences {
93226
// Required. References to Looker explores.
@@ -152,6 +285,15 @@ message Datasource {
152285

153286
// A reference to a Looker explore.
154287
LookerExploreReference looker_explore_reference = 4;
288+
289+
// A reference to an AlloyDB database.
290+
AlloyDbReference alloy_db_reference = 12;
291+
292+
// A reference to a Spanner database.
293+
SpannerReference spanner_reference = 13;
294+
295+
// A reference to a CloudSQL database.
296+
CloudSqlReference cloud_sql_reference = 14;
155297
}
156298

157299
// Optional. The schema of the datasource.

0 commit comments

Comments
 (0)