google-cloud-gemini_data_analytics-v1beta 0.a → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +122 -0
- data/README.md +154 -8
- data/lib/google/cloud/gemini_data_analytics/v1beta/bindings_override.rb +75 -0
- data/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/client.rb +1286 -0
- data/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/credentials.rb +47 -0
- data/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/operations.rb +813 -0
- data/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/paths.rb +69 -0
- data/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/client.rb +1212 -0
- data/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/operations.rb +914 -0
- data/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/service_stub.rb +573 -0
- data/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest.rb +54 -0
- data/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service.rb +56 -0
- data/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/client.rb +928 -0
- data/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/credentials.rb +47 -0
- data/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/paths.rb +102 -0
- data/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/client.rb +877 -0
- data/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/service_stub.rb +382 -0
- data/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest.rb +55 -0
- data/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service.rb +57 -0
- data/lib/google/cloud/gemini_data_analytics/v1beta/rest.rb +39 -0
- data/lib/google/cloud/gemini_data_analytics/v1beta/version.rb +7 -2
- data/lib/google/cloud/gemini_data_analytics/v1beta.rb +46 -0
- data/lib/google/cloud/geminidataanalytics/v1beta/context_pb.rb +54 -0
- data/lib/google/cloud/geminidataanalytics/v1beta/conversation_pb.rb +52 -0
- data/lib/google/cloud/geminidataanalytics/v1beta/credentials_pb.rb +47 -0
- data/lib/google/cloud/geminidataanalytics/v1beta/data_agent_pb.rb +49 -0
- data/lib/google/cloud/geminidataanalytics/v1beta/data_agent_service_pb.rb +67 -0
- data/lib/google/cloud/geminidataanalytics/v1beta/data_agent_service_services_pb.rb +60 -0
- data/lib/google/cloud/geminidataanalytics/v1beta/data_analytics_agent_pb.rb +46 -0
- data/lib/google/cloud/geminidataanalytics/v1beta/data_chat_service_pb.rb +85 -0
- data/lib/google/cloud/geminidataanalytics/v1beta/data_chat_service_services_pb.rb +57 -0
- data/lib/google/cloud/geminidataanalytics/v1beta/datasource_pb.rb +58 -0
- data/lib/google-cloud-gemini_data_analytics-v1beta.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/client.rb +473 -0
- data/proto_docs/google/api/field_behavior.rb +85 -0
- data/proto_docs/google/api/field_info.rb +88 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/api/resource.rb +227 -0
- data/proto_docs/google/cloud/geminidataanalytics/v1beta/context.rb +136 -0
- data/proto_docs/google/cloud/geminidataanalytics/v1beta/conversation.rb +144 -0
- data/proto_docs/google/cloud/geminidataanalytics/v1beta/credentials.rb +74 -0
- data/proto_docs/google/cloud/geminidataanalytics/v1beta/data_agent.rb +90 -0
- data/proto_docs/google/cloud/geminidataanalytics/v1beta/data_agent_service.rb +267 -0
- data/proto_docs/google/cloud/geminidataanalytics/v1beta/data_analytics_agent.rb +46 -0
- data/proto_docs/google/cloud/geminidataanalytics/v1beta/data_chat_service.rb +576 -0
- data/proto_docs/google/cloud/geminidataanalytics/v1beta/datasource.rb +280 -0
- data/proto_docs/google/iam/v1/iam_policy.rb +87 -0
- data/proto_docs/google/iam/v1/options.rb +50 -0
- data/proto_docs/google/iam/v1/policy.rb +426 -0
- data/proto_docs/google/longrunning/operations.rb +173 -0
- data/proto_docs/google/protobuf/any.rb +145 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +34 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/struct.rb +108 -0
- data/proto_docs/google/protobuf/timestamp.rb +127 -0
- data/proto_docs/google/rpc/status.rb +48 -0
- data/proto_docs/google/type/expr.rb +75 -0
- metadata +123 -9
@@ -0,0 +1,382 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2025 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://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,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/geminidataanalytics/v1beta/data_chat_service_pb"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module GeminiDataAnalytics
|
24
|
+
module V1beta
|
25
|
+
module DataChatService
|
26
|
+
module Rest
|
27
|
+
##
|
28
|
+
# REST service stub for the DataChatService service.
|
29
|
+
# Service stub contains baseline method implementations
|
30
|
+
# including transcoding, making the REST call, and deserialing the response.
|
31
|
+
#
|
32
|
+
class ServiceStub
|
33
|
+
# @private
|
34
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
|
35
|
+
# These require statements are intentionally placed here to initialize
|
36
|
+
# the REST modules only when it's required.
|
37
|
+
require "gapic/rest"
|
38
|
+
|
39
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
40
|
+
endpoint_template: endpoint_template,
|
41
|
+
universe_domain: universe_domain,
|
42
|
+
credentials: credentials,
|
43
|
+
numeric_enums: true,
|
44
|
+
service_name: self.class,
|
45
|
+
raise_faraday_errors: false,
|
46
|
+
logger: logger
|
47
|
+
end
|
48
|
+
|
49
|
+
##
|
50
|
+
# The effective universe domain
|
51
|
+
#
|
52
|
+
# @return [String]
|
53
|
+
#
|
54
|
+
def universe_domain
|
55
|
+
@client_stub.universe_domain
|
56
|
+
end
|
57
|
+
|
58
|
+
##
|
59
|
+
# The effective endpoint
|
60
|
+
#
|
61
|
+
# @return [String]
|
62
|
+
#
|
63
|
+
def endpoint
|
64
|
+
@client_stub.endpoint
|
65
|
+
end
|
66
|
+
|
67
|
+
##
|
68
|
+
# The logger used for request/response debug logging.
|
69
|
+
#
|
70
|
+
# @return [Logger]
|
71
|
+
#
|
72
|
+
def logger stub: false
|
73
|
+
stub ? @client_stub.stub_logger : @client_stub.logger
|
74
|
+
end
|
75
|
+
|
76
|
+
##
|
77
|
+
# Baseline implementation for the chat REST call
|
78
|
+
#
|
79
|
+
# @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest]
|
80
|
+
# A request object representing the call parameters. Required.
|
81
|
+
# @param options [::Gapic::CallOptions]
|
82
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
83
|
+
#
|
84
|
+
# @yieldparam chunk [::String] The chunk of data received during server streaming.
|
85
|
+
#
|
86
|
+
# @return [::Gapic::Rest::TransportOperation]
|
87
|
+
def chat(request_pb, options = nil, &)
|
88
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
89
|
+
|
90
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_chat_request request_pb
|
91
|
+
query_string_params = if query_string_params.any?
|
92
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
93
|
+
else
|
94
|
+
{}
|
95
|
+
end
|
96
|
+
|
97
|
+
response = @client_stub.make_http_request(
|
98
|
+
verb,
|
99
|
+
uri: uri,
|
100
|
+
body: body || "",
|
101
|
+
params: query_string_params,
|
102
|
+
method_name: "chat",
|
103
|
+
options: options,
|
104
|
+
is_server_streaming: true,
|
105
|
+
&
|
106
|
+
)
|
107
|
+
::Gapic::Rest::TransportOperation.new response
|
108
|
+
end
|
109
|
+
|
110
|
+
##
|
111
|
+
# Baseline implementation for the create_conversation REST call
|
112
|
+
#
|
113
|
+
# @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest]
|
114
|
+
# A request object representing the call parameters. Required.
|
115
|
+
# @param options [::Gapic::CallOptions]
|
116
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
117
|
+
#
|
118
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
119
|
+
# @yieldparam result [::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation]
|
120
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
121
|
+
#
|
122
|
+
# @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation]
|
123
|
+
# A result object deserialized from the server's reply
|
124
|
+
def create_conversation request_pb, options = nil
|
125
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
126
|
+
|
127
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_create_conversation_request request_pb
|
128
|
+
query_string_params = if query_string_params.any?
|
129
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
130
|
+
else
|
131
|
+
{}
|
132
|
+
end
|
133
|
+
|
134
|
+
response = @client_stub.make_http_request(
|
135
|
+
verb,
|
136
|
+
uri: uri,
|
137
|
+
body: body || "",
|
138
|
+
params: query_string_params,
|
139
|
+
method_name: "create_conversation",
|
140
|
+
options: options
|
141
|
+
)
|
142
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
143
|
+
result = ::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation.decode_json response.body, ignore_unknown_fields: true
|
144
|
+
catch :response do
|
145
|
+
yield result, operation if block_given?
|
146
|
+
result
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
##
|
151
|
+
# Baseline implementation for the get_conversation REST call
|
152
|
+
#
|
153
|
+
# @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest]
|
154
|
+
# A request object representing the call parameters. Required.
|
155
|
+
# @param options [::Gapic::CallOptions]
|
156
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
157
|
+
#
|
158
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
159
|
+
# @yieldparam result [::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation]
|
160
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
161
|
+
#
|
162
|
+
# @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation]
|
163
|
+
# A result object deserialized from the server's reply
|
164
|
+
def get_conversation request_pb, options = nil
|
165
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
166
|
+
|
167
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_conversation_request request_pb
|
168
|
+
query_string_params = if query_string_params.any?
|
169
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
170
|
+
else
|
171
|
+
{}
|
172
|
+
end
|
173
|
+
|
174
|
+
response = @client_stub.make_http_request(
|
175
|
+
verb,
|
176
|
+
uri: uri,
|
177
|
+
body: body || "",
|
178
|
+
params: query_string_params,
|
179
|
+
method_name: "get_conversation",
|
180
|
+
options: options
|
181
|
+
)
|
182
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
183
|
+
result = ::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation.decode_json response.body, ignore_unknown_fields: true
|
184
|
+
catch :response do
|
185
|
+
yield result, operation if block_given?
|
186
|
+
result
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
190
|
+
##
|
191
|
+
# Baseline implementation for the list_conversations REST call
|
192
|
+
#
|
193
|
+
# @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest]
|
194
|
+
# A request object representing the call parameters. Required.
|
195
|
+
# @param options [::Gapic::CallOptions]
|
196
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
197
|
+
#
|
198
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
199
|
+
# @yieldparam result [::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsResponse]
|
200
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
201
|
+
#
|
202
|
+
# @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsResponse]
|
203
|
+
# A result object deserialized from the server's reply
|
204
|
+
def list_conversations request_pb, options = nil
|
205
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
206
|
+
|
207
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_list_conversations_request request_pb
|
208
|
+
query_string_params = if query_string_params.any?
|
209
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
210
|
+
else
|
211
|
+
{}
|
212
|
+
end
|
213
|
+
|
214
|
+
response = @client_stub.make_http_request(
|
215
|
+
verb,
|
216
|
+
uri: uri,
|
217
|
+
body: body || "",
|
218
|
+
params: query_string_params,
|
219
|
+
method_name: "list_conversations",
|
220
|
+
options: options
|
221
|
+
)
|
222
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
223
|
+
result = ::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsResponse.decode_json response.body, ignore_unknown_fields: true
|
224
|
+
catch :response do
|
225
|
+
yield result, operation if block_given?
|
226
|
+
result
|
227
|
+
end
|
228
|
+
end
|
229
|
+
|
230
|
+
##
|
231
|
+
# Baseline implementation for the list_messages REST call
|
232
|
+
#
|
233
|
+
# @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest]
|
234
|
+
# A request object representing the call parameters. Required.
|
235
|
+
# @param options [::Gapic::CallOptions]
|
236
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
237
|
+
#
|
238
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
239
|
+
# @yieldparam result [::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesResponse]
|
240
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
241
|
+
#
|
242
|
+
# @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesResponse]
|
243
|
+
# A result object deserialized from the server's reply
|
244
|
+
def list_messages request_pb, options = nil
|
245
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
246
|
+
|
247
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_list_messages_request request_pb
|
248
|
+
query_string_params = if query_string_params.any?
|
249
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
250
|
+
else
|
251
|
+
{}
|
252
|
+
end
|
253
|
+
|
254
|
+
response = @client_stub.make_http_request(
|
255
|
+
verb,
|
256
|
+
uri: uri,
|
257
|
+
body: body || "",
|
258
|
+
params: query_string_params,
|
259
|
+
method_name: "list_messages",
|
260
|
+
options: options
|
261
|
+
)
|
262
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
263
|
+
result = ::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesResponse.decode_json response.body, ignore_unknown_fields: true
|
264
|
+
catch :response do
|
265
|
+
yield result, operation if block_given?
|
266
|
+
result
|
267
|
+
end
|
268
|
+
end
|
269
|
+
|
270
|
+
##
|
271
|
+
# @private
|
272
|
+
#
|
273
|
+
# GRPC transcoding helper method for the chat REST call
|
274
|
+
#
|
275
|
+
# @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest]
|
276
|
+
# A request object representing the call parameters. Required.
|
277
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
278
|
+
# Uri, Body, Query string parameters
|
279
|
+
def self.transcode_chat_request request_pb
|
280
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
281
|
+
.with_bindings(
|
282
|
+
uri_method: :post,
|
283
|
+
uri_template: "/v1beta/{parent}:chat",
|
284
|
+
body: "*",
|
285
|
+
matches: [
|
286
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
287
|
+
]
|
288
|
+
)
|
289
|
+
transcoder.transcode request_pb
|
290
|
+
end
|
291
|
+
|
292
|
+
##
|
293
|
+
# @private
|
294
|
+
#
|
295
|
+
# GRPC transcoding helper method for the create_conversation REST call
|
296
|
+
#
|
297
|
+
# @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest]
|
298
|
+
# A request object representing the call parameters. Required.
|
299
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
300
|
+
# Uri, Body, Query string parameters
|
301
|
+
def self.transcode_create_conversation_request request_pb
|
302
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
303
|
+
.with_bindings(
|
304
|
+
uri_method: :post,
|
305
|
+
uri_template: "/v1beta/{parent}/conversations",
|
306
|
+
body: "conversation",
|
307
|
+
matches: [
|
308
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
309
|
+
]
|
310
|
+
)
|
311
|
+
transcoder.transcode request_pb
|
312
|
+
end
|
313
|
+
|
314
|
+
##
|
315
|
+
# @private
|
316
|
+
#
|
317
|
+
# GRPC transcoding helper method for the get_conversation REST call
|
318
|
+
#
|
319
|
+
# @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest]
|
320
|
+
# A request object representing the call parameters. Required.
|
321
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
322
|
+
# Uri, Body, Query string parameters
|
323
|
+
def self.transcode_get_conversation_request request_pb
|
324
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
325
|
+
.with_bindings(
|
326
|
+
uri_method: :get,
|
327
|
+
uri_template: "/v1beta/{name}",
|
328
|
+
matches: [
|
329
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/conversations/[^/]+/?$}, false]
|
330
|
+
]
|
331
|
+
)
|
332
|
+
transcoder.transcode request_pb
|
333
|
+
end
|
334
|
+
|
335
|
+
##
|
336
|
+
# @private
|
337
|
+
#
|
338
|
+
# GRPC transcoding helper method for the list_conversations REST call
|
339
|
+
#
|
340
|
+
# @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest]
|
341
|
+
# A request object representing the call parameters. Required.
|
342
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
343
|
+
# Uri, Body, Query string parameters
|
344
|
+
def self.transcode_list_conversations_request request_pb
|
345
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
346
|
+
.with_bindings(
|
347
|
+
uri_method: :get,
|
348
|
+
uri_template: "/v1beta/{parent}/conversations",
|
349
|
+
matches: [
|
350
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
351
|
+
]
|
352
|
+
)
|
353
|
+
transcoder.transcode request_pb
|
354
|
+
end
|
355
|
+
|
356
|
+
##
|
357
|
+
# @private
|
358
|
+
#
|
359
|
+
# GRPC transcoding helper method for the list_messages REST call
|
360
|
+
#
|
361
|
+
# @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest]
|
362
|
+
# A request object representing the call parameters. Required.
|
363
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
364
|
+
# Uri, Body, Query string parameters
|
365
|
+
def self.transcode_list_messages_request request_pb
|
366
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
367
|
+
.with_bindings(
|
368
|
+
uri_method: :get,
|
369
|
+
uri_template: "/v1beta/{parent}/messages",
|
370
|
+
matches: [
|
371
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/conversations/[^/]+/?$}, false]
|
372
|
+
]
|
373
|
+
)
|
374
|
+
transcoder.transcode request_pb
|
375
|
+
end
|
376
|
+
end
|
377
|
+
end
|
378
|
+
end
|
379
|
+
end
|
380
|
+
end
|
381
|
+
end
|
382
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2025 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://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,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "gapic/rest"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/gemini_data_analytics/v1beta/version"
|
24
|
+
require "google/cloud/gemini_data_analytics/v1beta/bindings_override"
|
25
|
+
|
26
|
+
require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/credentials"
|
27
|
+
require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/paths"
|
28
|
+
require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/client"
|
29
|
+
|
30
|
+
module Google
|
31
|
+
module Cloud
|
32
|
+
module GeminiDataAnalytics
|
33
|
+
module V1beta
|
34
|
+
##
|
35
|
+
# Service to ask a natural language question on top of BigQuery
|
36
|
+
# and Looker Studio datasources to get back streamed responses of various kinds
|
37
|
+
# to help provide a rich conversational answer.
|
38
|
+
#
|
39
|
+
# To load this service and instantiate a REST client:
|
40
|
+
#
|
41
|
+
# require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest"
|
42
|
+
# client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new
|
43
|
+
#
|
44
|
+
module DataChatService
|
45
|
+
# Client for the REST transport
|
46
|
+
module Rest
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
helper_path = ::File.join __dir__, "rest", "helpers.rb"
|
55
|
+
require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2025 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://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,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "gapic/common"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/gemini_data_analytics/v1beta/version"
|
24
|
+
|
25
|
+
require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/credentials"
|
26
|
+
require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/paths"
|
27
|
+
require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/client"
|
28
|
+
require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest"
|
29
|
+
|
30
|
+
module Google
|
31
|
+
module Cloud
|
32
|
+
module GeminiDataAnalytics
|
33
|
+
module V1beta
|
34
|
+
##
|
35
|
+
# Service to ask a natural language question on top of BigQuery
|
36
|
+
# and Looker Studio datasources to get back streamed responses of various kinds
|
37
|
+
# to help provide a rich conversational answer.
|
38
|
+
#
|
39
|
+
# @example Load this service and instantiate a gRPC client
|
40
|
+
#
|
41
|
+
# require "google/cloud/gemini_data_analytics/v1beta/data_chat_service"
|
42
|
+
# client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new
|
43
|
+
#
|
44
|
+
# @example Load this service and instantiate a REST client
|
45
|
+
#
|
46
|
+
# require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest"
|
47
|
+
# client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new
|
48
|
+
#
|
49
|
+
module DataChatService
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
helper_path = ::File.join __dir__, "data_chat_service", "helpers.rb"
|
57
|
+
require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2025 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://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,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest"
|
20
|
+
require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest"
|
21
|
+
require "google/cloud/gemini_data_analytics/v1beta/bindings_override"
|
22
|
+
require "google/cloud/gemini_data_analytics/v1beta/version"
|
23
|
+
|
24
|
+
module Google
|
25
|
+
module Cloud
|
26
|
+
module GeminiDataAnalytics
|
27
|
+
##
|
28
|
+
# To load just the REST part of this package, including all its services, and instantiate a REST client:
|
29
|
+
#
|
30
|
+
# @example
|
31
|
+
#
|
32
|
+
# require "google/cloud/gemini_data_analytics/v1beta/rest"
|
33
|
+
# client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new
|
34
|
+
#
|
35
|
+
module V1beta
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -1,10 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Copyright 2025 Google LLC
|
2
4
|
#
|
3
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
6
|
# you may not use this file except in compliance with the License.
|
5
7
|
# You may obtain a copy of the License at
|
6
8
|
#
|
7
|
-
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
8
10
|
#
|
9
11
|
# Unless required by applicable law or agreed to in writing, software
|
10
12
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
@@ -12,11 +14,14 @@
|
|
12
14
|
# See the License for the specific language governing permissions and
|
13
15
|
# limitations under the License.
|
14
16
|
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
15
20
|
module Google
|
16
21
|
module Cloud
|
17
22
|
module GeminiDataAnalytics
|
18
23
|
module V1beta
|
19
|
-
VERSION = "0.
|
24
|
+
VERSION = "0.1.0"
|
20
25
|
end
|
21
26
|
end
|
22
27
|
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2025 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://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,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/gemini_data_analytics/v1beta/data_agent_service"
|
20
|
+
require "google/cloud/gemini_data_analytics/v1beta/data_chat_service"
|
21
|
+
require "google/cloud/gemini_data_analytics/v1beta/version"
|
22
|
+
|
23
|
+
module Google
|
24
|
+
module Cloud
|
25
|
+
module GeminiDataAnalytics
|
26
|
+
##
|
27
|
+
# API client module.
|
28
|
+
#
|
29
|
+
# @example Load this package, including all its services, and instantiate a gRPC client
|
30
|
+
#
|
31
|
+
# require "google/cloud/gemini_data_analytics/v1beta"
|
32
|
+
# client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new
|
33
|
+
#
|
34
|
+
# @example Load this package, including all its services, and instantiate a REST client
|
35
|
+
#
|
36
|
+
# require "google/cloud/gemini_data_analytics/v1beta"
|
37
|
+
# client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new
|
38
|
+
#
|
39
|
+
module V1beta
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
helper_path = ::File.join __dir__, "v1beta", "_helpers.rb"
|
46
|
+
require "google/cloud/gemini_data_analytics/v1beta/_helpers" if ::File.file? helper_path
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# source: google/cloud/geminidataanalytics/v1beta/context.proto
|
4
|
+
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
7
|
+
require 'google/api/field_behavior_pb'
|
8
|
+
require 'google/cloud/geminidataanalytics/v1beta/datasource_pb'
|
9
|
+
|
10
|
+
|
11
|
+
descriptor_data = "\n5google/cloud/geminidataanalytics/v1beta/context.proto\x12\'google.cloud.geminidataanalytics.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x38google/cloud/geminidataanalytics/v1beta/datasource.proto\"\xb6\x02\n\x07\x43ontext\x12\x1f\n\x12system_instruction\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x61\n\x15\x64\x61tasource_references\x18\x07 \x01(\x0b\x32=.google.cloud.geminidataanalytics.v1beta.DatasourceReferencesB\x03\xe0\x41\x02\x12R\n\x07options\x18\x03 \x01(\x0b\x32<.google.cloud.geminidataanalytics.v1beta.ConversationOptionsB\x03\xe0\x41\x01\x12S\n\x0f\x65xample_queries\x18\x05 \x03(\x0b\x32\x35.google.cloud.geminidataanalytics.v1beta.ExampleQueryB\x03\xe0\x41\x01\"Y\n\x0c\x45xampleQuery\x12\x18\n\tsql_query\x18\x65 \x01(\tB\x03\xe0\x41\x01H\x00\x12&\n\x19natural_language_question\x18\x01 \x01(\tB\x03\xe0\x41\x01\x42\x07\n\x05query\"\xb1\x01\n\x13\x43onversationOptions\x12I\n\x05\x63hart\x18\x01 \x01(\x0b\x32\x35.google.cloud.geminidataanalytics.v1beta.ChartOptionsB\x03\xe0\x41\x01\x12O\n\x08\x61nalysis\x18\x02 \x01(\x0b\x32\x38.google.cloud.geminidataanalytics.v1beta.AnalysisOptionsB\x03\xe0\x41\x01\"\xd6\x02\n\x0c\x43hartOptions\x12V\n\x05image\x18\x01 \x01(\x0b\x32\x42.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptionsB\x03\xe0\x41\x01\x1a\xed\x01\n\x0cImageOptions\x12^\n\x08no_image\x18\x01 \x01(\x0b\x32J.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImageH\x00\x12\\\n\x03svg\x18\x02 \x01(\x0b\x32M.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptionsH\x00\x1a\t\n\x07NoImage\x1a\x0c\n\nSvgOptionsB\x06\n\x04kind\"\x87\x01\n\x0f\x41nalysisOptions\x12T\n\x06python\x18\x01 \x01(\x0b\x32?.google.cloud.geminidataanalytics.v1beta.AnalysisOptions.PythonB\x03\xe0\x41\x01\x1a\x1e\n\x06Python\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x42\x9d\x02\n+com.google.cloud.geminidataanalytics.v1betaB\x0c\x43ontextProtoP\x01Z]cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb;geminidataanalyticspb\xaa\x02\'Google.Cloud.GeminiDataAnalytics.V1Beta\xca\x02\'Google\\Cloud\\GeminiDataAnalytics\\V1beta\xea\x02*Google::Cloud::GeminiDataAnalytics::V1betab\x06proto3"
|
12
|
+
|
13
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
14
|
+
|
15
|
+
begin
|
16
|
+
pool.add_serialized_file(descriptor_data)
|
17
|
+
rescue TypeError
|
18
|
+
# Compatibility code: will be removed in the next major version.
|
19
|
+
require 'google/protobuf/descriptor_pb'
|
20
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
21
|
+
parsed.clear_dependency
|
22
|
+
serialized = parsed.class.encode(parsed)
|
23
|
+
file = pool.add_serialized_file(serialized)
|
24
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
25
|
+
imports = [
|
26
|
+
["google.cloud.geminidataanalytics.v1beta.DatasourceReferences", "google/cloud/geminidataanalytics/v1beta/datasource.proto"],
|
27
|
+
]
|
28
|
+
imports.each do |type_name, expected_filename|
|
29
|
+
import_file = pool.lookup(type_name).file_descriptor
|
30
|
+
if import_file.name != expected_filename
|
31
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
35
|
+
warn "This will become an error in the next major version."
|
36
|
+
end
|
37
|
+
|
38
|
+
module Google
|
39
|
+
module Cloud
|
40
|
+
module GeminiDataAnalytics
|
41
|
+
module V1beta
|
42
|
+
Context = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.Context").msgclass
|
43
|
+
ExampleQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ExampleQuery").msgclass
|
44
|
+
ConversationOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ConversationOptions").msgclass
|
45
|
+
ChartOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ChartOptions").msgclass
|
46
|
+
ChartOptions::ImageOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions").msgclass
|
47
|
+
ChartOptions::ImageOptions::NoImage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage").msgclass
|
48
|
+
ChartOptions::ImageOptions::SvgOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions").msgclass
|
49
|
+
AnalysisOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.AnalysisOptions").msgclass
|
50
|
+
AnalysisOptions::Python = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python").msgclass
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|