Skip to content

Commit f90d09f

Browse files
regen: Regenerate Google.Cloud.GeminiDataAnalytics.V1Beta at API commit b32495a
feat: add a QueryData API for NL2SQL conversion feat: A new message `AgentContextReference` is added feat: A new method `QueryData` is added to service `DataChatService` feat: A new message `QueryDataRequest` is added feat: A new message `GenerationOptions` is added feat: A new message `QueryDataContext` is added feat: A new message `QueryDataResponse` is added feat: A new message `ExecutedQueryResult` is added feat: A new field `alloydb` is added to message `.google.cloud.geminidataanalytics.v1beta.DatasourceReferences` feat: A new field `spanner_reference` is added to message `.google.cloud.geminidataanalytics.v1beta.DatasourceReferences` feat: A new field `cloud_sql_reference` is added to message `.google.cloud.geminidataanalytics.v1beta.DatasourceReferences` feat: A new message `AlloyDbReference` is added feat: A new message `AlloyDbDatabaseReference` is added feat: A new message `SpannerReference` is added feat: A new message `SpannerDatabaseReference` is added feat: A new message `CloudSqlReference` is added feat: A new message `CloudSqlDatabaseReference` is added feat: A new field `alloy_db_reference` is added to message `.google.cloud.geminidataanalytics.v1beta.Datasource` feat: A new field `spanner_reference` is added to message `.google.cloud.geminidataanalytics.v1beta.Datasource` feat: A new field `cloud_sql_reference` is added to message `.google.cloud.geminidataanalytics.v1beta.Datasource` PiperOrigin-RevId: 842905100 Source-Link: googleapis/googleapis@b32495a
1 parent a755462 commit f90d09f

File tree

13 files changed

+5555
-306
lines changed

13 files changed

+5555
-306
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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+
// https://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+
// Generated code. DO NOT EDIT!
16+
17+
namespace GoogleCSharpSnippets
18+
{
19+
// [START geminidataanalytics_v1beta_generated_DataChatService_QueryData_async]
20+
using Google.Api.Gax.ResourceNames;
21+
using Google.Cloud.GeminiDataAnalytics.V1Beta;
22+
using System.Threading.Tasks;
23+
24+
public sealed partial class GeneratedDataChatServiceClientSnippets
25+
{
26+
/// <summary>Snippet for QueryDataAsync</summary>
27+
/// <remarks>
28+
/// This snippet has been automatically generated and should be regarded as a code template only.
29+
/// It will require modifications to work:
30+
/// - It may require correct/in-range values for request initialization.
31+
/// - It may require specifying regional endpoints when creating the service client as shown in
32+
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
33+
/// </remarks>
34+
public async Task QueryDataRequestObjectAsync()
35+
{
36+
// Create client
37+
DataChatServiceClient dataChatServiceClient = await DataChatServiceClient.CreateAsync();
38+
// Initialize request argument(s)
39+
QueryDataRequest request = new QueryDataRequest
40+
{
41+
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
42+
Prompt = "",
43+
Context = new QueryDataContext(),
44+
GenerationOptions = new GenerationOptions(),
45+
};
46+
// Make the request
47+
QueryDataResponse response = await dataChatServiceClient.QueryDataAsync(request);
48+
}
49+
}
50+
// [END geminidataanalytics_v1beta_generated_DataChatService_QueryData_async]
51+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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+
// https://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+
// Generated code. DO NOT EDIT!
16+
17+
namespace GoogleCSharpSnippets
18+
{
19+
// [START geminidataanalytics_v1beta_generated_DataChatService_QueryData_sync]
20+
using Google.Api.Gax.ResourceNames;
21+
using Google.Cloud.GeminiDataAnalytics.V1Beta;
22+
23+
public sealed partial class GeneratedDataChatServiceClientSnippets
24+
{
25+
/// <summary>Snippet for QueryData</summary>
26+
/// <remarks>
27+
/// This snippet has been automatically generated and should be regarded as a code template only.
28+
/// It will require modifications to work:
29+
/// - It may require correct/in-range values for request initialization.
30+
/// - It may require specifying regional endpoints when creating the service client as shown in
31+
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
32+
/// </remarks>
33+
public void QueryDataRequestObject()
34+
{
35+
// Create client
36+
DataChatServiceClient dataChatServiceClient = DataChatServiceClient.Create();
37+
// Initialize request argument(s)
38+
QueryDataRequest request = new QueryDataRequest
39+
{
40+
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
41+
Prompt = "",
42+
Context = new QueryDataContext(),
43+
GenerationOptions = new GenerationOptions(),
44+
};
45+
// Make the request
46+
QueryDataResponse response = dataChatServiceClient.QueryData(request);
47+
}
48+
}
49+
// [END geminidataanalytics_v1beta_generated_DataChatService_QueryData_sync]
50+
}

apis/Google.Cloud.GeminiDataAnalytics.V1Beta/Google.Cloud.GeminiDataAnalytics.V1Beta.GeneratedSnippets/snippet_metadata_google.cloud.geminidataanalytics.v1beta.json

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3890,6 +3890,103 @@
38903890
"type": "SHORT"
38913891
}
38923892
]
3893+
},
3894+
{
3895+
"regionTag": "geminidataanalytics_v1beta_generated_DataChatService_QueryData_sync",
3896+
"title": "QueryDataRequestObject",
3897+
"description": "Snippet for QueryData",
3898+
"file": "DataChatServiceClient.QueryDataRequestObjectSnippet.g.cs",
3899+
"language": "C_SHARP",
3900+
"clientMethod": {
3901+
"shortName": "QueryData",
3902+
"fullName": "Google.Cloud.GeminiDataAnalytics.V1Beta.DataChatServiceClient.QueryData",
3903+
"parameters": [
3904+
{
3905+
"type": "Google.Cloud.GeminiDataAnalytics.V1Beta.QueryDataRequest",
3906+
"name": "request"
3907+
},
3908+
{
3909+
"type": "Google.Api.Gax.Grpc.CallSettings",
3910+
"name": "callSettings"
3911+
}
3912+
],
3913+
"resultType": "Google.Cloud.GeminiDataAnalytics.V1Beta.QueryDataResponse",
3914+
"client": {
3915+
"shortName": "DataChatServiceClient",
3916+
"fullName": "Google.Cloud.GeminiDataAnalytics.V1Beta.DataChatServiceClient"
3917+
},
3918+
"method": {
3919+
"shortName": "QueryData",
3920+
"fullName": "google.cloud.geminidataanalytics.v1beta.DataChatService.QueryData",
3921+
"service": {
3922+
"shortName": "DataChatService",
3923+
"fullName": "google.cloud.geminidataanalytics.v1beta.DataChatService"
3924+
}
3925+
}
3926+
},
3927+
"canonical": true,
3928+
"origin": "API_DEFINITION",
3929+
"segments": [
3930+
{
3931+
"start": 20,
3932+
"end": 48,
3933+
"type": "FULL"
3934+
},
3935+
{
3936+
"start": 35,
3937+
"end": 46,
3938+
"type": "SHORT"
3939+
}
3940+
]
3941+
},
3942+
{
3943+
"regionTag": "geminidataanalytics_v1beta_generated_DataChatService_QueryData_async",
3944+
"title": "QueryDataRequestObjectAsync",
3945+
"description": "Snippet for QueryDataAsync",
3946+
"file": "DataChatServiceClient.QueryDataRequestObjectAsyncSnippet.g.cs",
3947+
"language": "C_SHARP",
3948+
"clientMethod": {
3949+
"shortName": "QueryDataAsync",
3950+
"fullName": "Google.Cloud.GeminiDataAnalytics.V1Beta.DataChatServiceClient.QueryDataAsync",
3951+
"async": true,
3952+
"parameters": [
3953+
{
3954+
"type": "Google.Cloud.GeminiDataAnalytics.V1Beta.QueryDataRequest",
3955+
"name": "request"
3956+
},
3957+
{
3958+
"type": "Google.Api.Gax.Grpc.CallSettings",
3959+
"name": "callSettings"
3960+
}
3961+
],
3962+
"resultType": "System.Threading.Tasks.Task<Google.Cloud.GeminiDataAnalytics.V1Beta.QueryDataResponse>",
3963+
"client": {
3964+
"shortName": "DataChatServiceClient",
3965+
"fullName": "Google.Cloud.GeminiDataAnalytics.V1Beta.DataChatServiceClient"
3966+
},
3967+
"method": {
3968+
"shortName": "QueryData",
3969+
"fullName": "google.cloud.geminidataanalytics.v1beta.DataChatService.QueryData",
3970+
"service": {
3971+
"shortName": "DataChatService",
3972+
"fullName": "google.cloud.geminidataanalytics.v1beta.DataChatService"
3973+
}
3974+
}
3975+
},
3976+
"canonical": true,
3977+
"origin": "API_DEFINITION",
3978+
"segments": [
3979+
{
3980+
"start": 20,
3981+
"end": 49,
3982+
"type": "FULL"
3983+
},
3984+
{
3985+
"start": 36,
3986+
"end": 47,
3987+
"type": "SHORT"
3988+
}
3989+
]
38933990
}
38943991
]
38953992
}

apis/Google.Cloud.GeminiDataAnalytics.V1Beta/Google.Cloud.GeminiDataAnalytics.V1Beta.Snippets/DataChatServiceClientSnippets.g.cs

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -885,5 +885,44 @@ await response.AsRawResponses().ForEachAsync((ListMessagesResponse page) =>
885885
string nextPageToken = singlePage.NextPageToken;
886886
// End snippet
887887
}
888+
889+
/// <summary>Snippet for QueryData</summary>
890+
public void QueryDataRequestObject()
891+
{
892+
// Snippet: QueryData(QueryDataRequest, CallSettings)
893+
// Create client
894+
DataChatServiceClient dataChatServiceClient = DataChatServiceClient.Create();
895+
// Initialize request argument(s)
896+
QueryDataRequest request = new QueryDataRequest
897+
{
898+
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
899+
Prompt = "",
900+
Context = new QueryDataContext(),
901+
GenerationOptions = new GenerationOptions(),
902+
};
903+
// Make the request
904+
QueryDataResponse response = dataChatServiceClient.QueryData(request);
905+
// End snippet
906+
}
907+
908+
/// <summary>Snippet for QueryDataAsync</summary>
909+
public async Task QueryDataRequestObjectAsync()
910+
{
911+
// Snippet: QueryDataAsync(QueryDataRequest, CallSettings)
912+
// Additional: QueryDataAsync(QueryDataRequest, CancellationToken)
913+
// Create client
914+
DataChatServiceClient dataChatServiceClient = await DataChatServiceClient.CreateAsync();
915+
// Initialize request argument(s)
916+
QueryDataRequest request = new QueryDataRequest
917+
{
918+
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
919+
Prompt = "",
920+
Context = new QueryDataContext(),
921+
GenerationOptions = new GenerationOptions(),
922+
};
923+
// Make the request
924+
QueryDataResponse response = await dataChatServiceClient.QueryDataAsync(request);
925+
// End snippet
926+
}
888927
}
889928
}

0 commit comments

Comments
 (0)