google-cloud-gemini_data_analytics-v1beta 1.0.0 → 1.2.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.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +4 -4
  3. data/README.md +5 -6
  4. data/lib/google/cloud/gemini_data_analytics/v1beta/bindings_override.rb +2 -2
  5. data/lib/google/cloud/gemini_data_analytics/v1beta/data_a2_a_service/client.rb +697 -0
  6. data/lib/google/cloud/gemini_data_analytics/v1beta/data_a2_a_service/credentials.rb +47 -0
  7. data/lib/google/cloud/gemini_data_analytics/v1beta/data_a2_a_service/rest/client.rb +643 -0
  8. data/lib/google/cloud/gemini_data_analytics/v1beta/data_a2_a_service/rest/service_stub.rb +283 -0
  9. data/lib/google/cloud/gemini_data_analytics/v1beta/data_a2_a_service/rest.rb +53 -0
  10. data/lib/google/cloud/gemini_data_analytics/v1beta/data_a2_a_service.rb +55 -0
  11. data/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/client.rb +237 -2
  12. data/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/credentials.rb +1 -1
  13. data/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/operations.rb +1 -1
  14. data/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/paths.rb +1 -1
  15. data/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/client.rb +223 -2
  16. data/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/operations.rb +1 -1
  17. data/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/service_stub.rb +124 -1
  18. data/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest.rb +1 -1
  19. data/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service.rb +1 -1
  20. data/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/client.rb +106 -1
  21. data/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/credentials.rb +1 -1
  22. data/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/paths.rb +1 -1
  23. data/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/client.rb +99 -1
  24. data/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/service_stub.rb +63 -1
  25. data/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest.rb +1 -1
  26. data/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service.rb +1 -1
  27. data/lib/google/cloud/gemini_data_analytics/v1beta/rest.rb +3 -2
  28. data/lib/google/cloud/gemini_data_analytics/v1beta/version.rb +1 -1
  29. data/lib/google/cloud/gemini_data_analytics/v1beta.rb +4 -3
  30. data/lib/google/cloud/geminidataanalytics/v1beta/context_pb.rb +2 -1
  31. data/lib/google/cloud/geminidataanalytics/v1beta/conversation_pb.rb +3 -1
  32. data/lib/google/cloud/geminidataanalytics/v1beta/data_a2a_service_pb.rb +64 -0
  33. data/lib/google/cloud/geminidataanalytics/v1beta/data_a2a_service_services_pb.rb +52 -0
  34. data/lib/google/cloud/geminidataanalytics/v1beta/data_agent_pb.rb +2 -1
  35. data/lib/google/cloud/geminidataanalytics/v1beta/data_agent_service_pb.rb +6 -1
  36. data/lib/google/cloud/geminidataanalytics/v1beta/data_agent_service_services_pb.rb +7 -1
  37. data/lib/google/cloud/geminidataanalytics/v1beta/data_chat_service_pb.rb +2 -1
  38. data/lib/google/cloud/geminidataanalytics/v1beta/data_chat_service_services_pb.rb +3 -1
  39. data/lib/google/cloud/geminidataanalytics/v1beta/datasource_pb.rb +5 -1
  40. data/lib/google/cloud/geminidataanalytics/v1beta/usage_pb.rb +21 -0
  41. data/lib/google-cloud-gemini_data_analytics-v1beta.rb +1 -1
  42. data/proto_docs/google/api/client.rb +1 -1
  43. data/proto_docs/google/api/field_behavior.rb +1 -1
  44. data/proto_docs/google/api/field_info.rb +1 -1
  45. data/proto_docs/google/api/launch_stage.rb +1 -1
  46. data/proto_docs/google/api/resource.rb +1 -1
  47. data/proto_docs/google/cloud/geminidataanalytics/v1beta/agent_context.rb +1 -1
  48. data/proto_docs/google/cloud/geminidataanalytics/v1beta/context.rb +83 -2
  49. data/proto_docs/google/cloud/geminidataanalytics/v1beta/conversation.rb +28 -4
  50. data/proto_docs/google/cloud/geminidataanalytics/v1beta/credentials.rb +1 -1
  51. data/proto_docs/google/cloud/geminidataanalytics/v1beta/data_a2a_service.rb +825 -0
  52. data/proto_docs/google/cloud/geminidataanalytics/v1beta/data_agent.rb +52 -1
  53. data/proto_docs/google/cloud/geminidataanalytics/v1beta/data_agent_service.rb +101 -1
  54. data/proto_docs/google/cloud/geminidataanalytics/v1beta/data_analytics_agent.rb +1 -1
  55. data/proto_docs/google/cloud/geminidataanalytics/v1beta/data_chat_service.rb +23 -4
  56. data/proto_docs/google/cloud/geminidataanalytics/v1beta/datasource.rb +108 -18
  57. data/proto_docs/google/cloud/geminidataanalytics/v1beta/usage.rb +38 -0
  58. data/proto_docs/google/iam/v1/iam_policy.rb +1 -1
  59. data/proto_docs/google/iam/v1/options.rb +1 -1
  60. data/proto_docs/google/iam/v1/policy.rb +1 -1
  61. data/proto_docs/google/longrunning/operations.rb +1 -1
  62. data/proto_docs/google/protobuf/any.rb +1 -1
  63. data/proto_docs/google/protobuf/duration.rb +1 -1
  64. data/proto_docs/google/protobuf/empty.rb +1 -1
  65. data/proto_docs/google/protobuf/field_mask.rb +1 -1
  66. data/proto_docs/google/protobuf/struct.rb +1 -1
  67. data/proto_docs/google/protobuf/timestamp.rb +8 -7
  68. data/proto_docs/google/protobuf/wrappers.rb +1 -1
  69. data/proto_docs/google/rpc/status.rb +1 -1
  70. data/proto_docs/google/type/expr.rb +1 -1
  71. metadata +20 -7
@@ -0,0 +1,643 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 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/errors"
20
+ require "google/cloud/geminidataanalytics/v1beta/data_a2a_service_pb"
21
+ require "google/cloud/gemini_data_analytics/v1beta/data_a2_a_service/rest/service_stub"
22
+ require "google/cloud/location/rest"
23
+
24
+ module Google
25
+ module Cloud
26
+ module GeminiDataAnalytics
27
+ module V1beta
28
+ module DataA2AService
29
+ module Rest
30
+ ##
31
+ # REST client for the DataA2AService service.
32
+ #
33
+ # DataA2AService defines the Agent-to-Agent (A2A) protocol service for Gemini
34
+ # Data Analytics.
35
+ #
36
+ class Client
37
+ # @private
38
+ API_VERSION = ""
39
+
40
+ # @private
41
+ DEFAULT_ENDPOINT_TEMPLATE = "geminidataanalytics.$UNIVERSE_DOMAIN$"
42
+
43
+ # @private
44
+ attr_reader :data_a2_a_service_stub
45
+
46
+ ##
47
+ # Configure the DataA2AService Client class.
48
+ #
49
+ # See {::Google::Cloud::GeminiDataAnalytics::V1beta::DataA2AService::Rest::Client::Configuration}
50
+ # for a description of the configuration fields.
51
+ #
52
+ # @example
53
+ #
54
+ # # Modify the configuration for all DataA2AService clients
55
+ # ::Google::Cloud::GeminiDataAnalytics::V1beta::DataA2AService::Rest::Client.configure do |config|
56
+ # config.timeout = 10.0
57
+ # end
58
+ #
59
+ # @yield [config] Configure the Client client.
60
+ # @yieldparam config [Client::Configuration]
61
+ #
62
+ # @return [Client::Configuration]
63
+ #
64
+ def self.configure
65
+ @configure ||= begin
66
+ namespace = ["Google", "Cloud", "GeminiDataAnalytics", "V1beta"]
67
+ parent_config = while namespace.any?
68
+ parent_name = namespace.join "::"
69
+ parent_const = const_get parent_name
70
+ break parent_const.configure if parent_const.respond_to? :configure
71
+ namespace.pop
72
+ end
73
+ default_config = Client::Configuration.new parent_config
74
+
75
+ default_config.timeout = 600.0
76
+ default_config.retry_policy = {
77
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
78
+ }
79
+
80
+ default_config
81
+ end
82
+ yield @configure if block_given?
83
+ @configure
84
+ end
85
+
86
+ ##
87
+ # Configure the DataA2AService Client instance.
88
+ #
89
+ # The configuration is set to the derived mode, meaning that values can be changed,
90
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
91
+ # should be made on {Client.configure}.
92
+ #
93
+ # See {::Google::Cloud::GeminiDataAnalytics::V1beta::DataA2AService::Rest::Client::Configuration}
94
+ # for a description of the configuration fields.
95
+ #
96
+ # @yield [config] Configure the Client client.
97
+ # @yieldparam config [Client::Configuration]
98
+ #
99
+ # @return [Client::Configuration]
100
+ #
101
+ def configure
102
+ yield @config if block_given?
103
+ @config
104
+ end
105
+
106
+ ##
107
+ # The effective universe domain
108
+ #
109
+ # @return [String]
110
+ #
111
+ def universe_domain
112
+ @data_a2_a_service_stub.universe_domain
113
+ end
114
+
115
+ ##
116
+ # Create a new DataA2AService REST client object.
117
+ #
118
+ # @example
119
+ #
120
+ # # Create a client using the default configuration
121
+ # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataA2AService::Rest::Client.new
122
+ #
123
+ # # Create a client using a custom configuration
124
+ # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataA2AService::Rest::Client.new do |config|
125
+ # config.timeout = 10.0
126
+ # end
127
+ #
128
+ # @yield [config] Configure the DataA2AService client.
129
+ # @yieldparam config [Client::Configuration]
130
+ #
131
+ def initialize
132
+ # Create the configuration object
133
+ @config = Configuration.new Client.configure
134
+
135
+ # Yield the configuration if needed
136
+ yield @config if block_given?
137
+
138
+ # Create credentials
139
+ credentials = @config.credentials
140
+ # Use self-signed JWT if the endpoint is unchanged from default,
141
+ # but only if the default endpoint does not have a region prefix.
142
+ enable_self_signed_jwt = @config.endpoint.nil? ||
143
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
144
+ !@config.endpoint.split(".").first.include?("-"))
145
+ credentials ||= Credentials.default scope: @config.scope,
146
+ enable_self_signed_jwt: enable_self_signed_jwt
147
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
148
+ credentials = Credentials.new credentials, scope: @config.scope
149
+ end
150
+
151
+ @quota_project_id = @config.quota_project
152
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
153
+
154
+ @data_a2_a_service_stub = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataA2AService::Rest::ServiceStub.new(
155
+ endpoint: @config.endpoint,
156
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
157
+ universe_domain: @config.universe_domain,
158
+ credentials: credentials,
159
+ logger: @config.logger
160
+ )
161
+
162
+ @data_a2_a_service_stub.logger(stub: true)&.info do |entry|
163
+ entry.set_system_name
164
+ entry.set_service
165
+ entry.message = "Created client for #{entry.service}"
166
+ entry.set_credentials_fields credentials
167
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
168
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
169
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
170
+ end
171
+
172
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
173
+ config.credentials = credentials
174
+ config.quota_project = @quota_project_id
175
+ config.endpoint = @data_a2_a_service_stub.endpoint
176
+ config.universe_domain = @data_a2_a_service_stub.universe_domain
177
+ config.bindings_override = @config.bindings_override
178
+ config.logger = @data_a2_a_service_stub.logger if config.respond_to? :logger=
179
+ end
180
+ end
181
+
182
+ ##
183
+ # Get the associated client for mix-in of the Locations.
184
+ #
185
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
186
+ #
187
+ attr_reader :location_client
188
+
189
+ ##
190
+ # The logger used for request/response debug logging.
191
+ #
192
+ # @return [Logger]
193
+ #
194
+ def logger
195
+ @data_a2_a_service_stub.logger
196
+ end
197
+
198
+ # Service calls
199
+
200
+ ##
201
+ # Send a message to the agent. This is a blocking call that will return the
202
+ # task once it is completed.
203
+ #
204
+ # @overload send_message(request, options = nil)
205
+ # Pass arguments to `send_message` via a request object, either of type
206
+ # {::Google::Cloud::GeminiDataAnalytics::V1beta::SendMessageRequest} or an equivalent Hash.
207
+ #
208
+ # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::SendMessageRequest, ::Hash]
209
+ # A request object representing the call parameters. Required. To specify no
210
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
211
+ # @param options [::Gapic::CallOptions, ::Hash]
212
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
213
+ #
214
+ # @overload send_message(message: nil, configuration: nil, metadata: nil, tenant: nil)
215
+ # Pass arguments to `send_message` via keyword arguments. Note that at
216
+ # least one keyword argument is required. To specify no parameters, or to keep all
217
+ # the default parameter values, pass an empty Hash as a request object (see above).
218
+ #
219
+ # @param message [::Google::Cloud::GeminiDataAnalytics::V1beta::A2AMessage, ::Hash]
220
+ # Required. The message to send to the agent.
221
+ # @param configuration [::Google::Cloud::GeminiDataAnalytics::V1beta::SendMessageConfiguration, ::Hash]
222
+ # Optional. Configuration for the send request.
223
+ # @param metadata [::Google::Protobuf::Struct, ::Hash]
224
+ # Optional. Optional metadata for the request.
225
+ # @param tenant [::String]
226
+ # Optional. Optional tenant, provided as a path parameter.
227
+ # @yield [result, operation] Access the result along with the TransportOperation object
228
+ # @yieldparam result [::Google::Cloud::GeminiDataAnalytics::V1beta::SendMessageResponse]
229
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
230
+ #
231
+ # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::SendMessageResponse]
232
+ #
233
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
234
+ #
235
+ # @example Basic example
236
+ # require "google/cloud/gemini_data_analytics/v1beta"
237
+ #
238
+ # # Create a client object. The client can be reused for multiple calls.
239
+ # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataA2AService::Rest::Client.new
240
+ #
241
+ # # Create a request. To set request fields, pass in keyword arguments.
242
+ # request = Google::Cloud::GeminiDataAnalytics::V1beta::SendMessageRequest.new
243
+ #
244
+ # # Call the send_message method.
245
+ # result = client.send_message request
246
+ #
247
+ # # The returned object is of type Google::Cloud::GeminiDataAnalytics::V1beta::SendMessageResponse.
248
+ # p result
249
+ #
250
+ def send_message request, options = nil
251
+ raise ::ArgumentError, "request must be provided" if request.nil?
252
+
253
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::SendMessageRequest
254
+
255
+ # Converts hash and nil to an options object
256
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
257
+
258
+ # Customize the options with defaults
259
+ call_metadata = @config.rpcs.send_message.metadata.to_h
260
+
261
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
262
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
263
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
264
+ gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION,
265
+ transports_version_send: [:rest]
266
+
267
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
268
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
269
+
270
+ options.apply_defaults timeout: @config.rpcs.send_message.timeout,
271
+ metadata: call_metadata,
272
+ retry_policy: @config.rpcs.send_message.retry_policy
273
+
274
+ options.apply_defaults timeout: @config.timeout,
275
+ metadata: @config.metadata,
276
+ retry_policy: @config.retry_policy
277
+
278
+ @data_a2_a_service_stub.send_message request, options do |result, operation|
279
+ yield result, operation if block_given?
280
+ end
281
+ rescue ::Gapic::Rest::Error => e
282
+ raise ::Google::Cloud::Error.from_error(e)
283
+ end
284
+
285
+ ##
286
+ # SendStreamingMessage is a streaming call that will return a stream of
287
+ # task update events until the Task is in an interrupted or terminal state.
288
+ #
289
+ # @overload send_streaming_message(request, options = nil)
290
+ # Pass arguments to `send_streaming_message` via a request object, either of type
291
+ # {::Google::Cloud::GeminiDataAnalytics::V1beta::SendMessageRequest} or an equivalent Hash.
292
+ #
293
+ # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::SendMessageRequest, ::Hash]
294
+ # A request object representing the call parameters. Required. To specify no
295
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
296
+ # @param options [::Gapic::CallOptions, ::Hash]
297
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
298
+ #
299
+ # @overload send_streaming_message(message: nil, configuration: nil, metadata: nil, tenant: nil)
300
+ # Pass arguments to `send_streaming_message` via keyword arguments. Note that at
301
+ # least one keyword argument is required. To specify no parameters, or to keep all
302
+ # the default parameter values, pass an empty Hash as a request object (see above).
303
+ #
304
+ # @param message [::Google::Cloud::GeminiDataAnalytics::V1beta::A2AMessage, ::Hash]
305
+ # Required. The message to send to the agent.
306
+ # @param configuration [::Google::Cloud::GeminiDataAnalytics::V1beta::SendMessageConfiguration, ::Hash]
307
+ # Optional. Configuration for the send request.
308
+ # @param metadata [::Google::Protobuf::Struct, ::Hash]
309
+ # Optional. Optional metadata for the request.
310
+ # @param tenant [::String]
311
+ # Optional. Optional tenant, provided as a path parameter.
312
+ # @return [::Enumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::StreamResponse>]
313
+ #
314
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
315
+ #
316
+ # @example Basic example
317
+ # require "google/cloud/gemini_data_analytics/v1beta"
318
+ #
319
+ # # Create a client object. The client can be reused for multiple calls.
320
+ # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataA2AService::Rest::Client.new
321
+ #
322
+ # # Create a request. To set request fields, pass in keyword arguments.
323
+ # request = Google::Cloud::GeminiDataAnalytics::V1beta::SendMessageRequest.new
324
+ #
325
+ # # Call the send_streaming_message method to start streaming.
326
+ # output = client.send_streaming_message request
327
+ #
328
+ # # The returned object is a streamed enumerable yielding elements of type
329
+ # # ::Google::Cloud::GeminiDataAnalytics::V1beta::StreamResponse
330
+ # output.each do |current_response|
331
+ # p current_response
332
+ # end
333
+ #
334
+ def send_streaming_message request, options = nil
335
+ raise ::ArgumentError, "request must be provided" if request.nil?
336
+
337
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::SendMessageRequest
338
+
339
+ # Converts hash and nil to an options object
340
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
341
+
342
+ # Customize the options with defaults
343
+ call_metadata = @config.rpcs.send_streaming_message.metadata.to_h
344
+
345
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
346
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
347
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
348
+ gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION,
349
+ transports_version_send: [:rest]
350
+
351
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
352
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
353
+
354
+ options.apply_defaults timeout: @config.rpcs.send_streaming_message.timeout,
355
+ metadata: call_metadata,
356
+ retry_policy: @config.rpcs.send_streaming_message.retry_policy
357
+
358
+ options.apply_defaults timeout: @config.timeout,
359
+ metadata: @config.metadata,
360
+ retry_policy: @config.retry_policy
361
+
362
+ ::Gapic::Rest::ServerStream.new(
363
+ ::Google::Cloud::GeminiDataAnalytics::V1beta::StreamResponse,
364
+ ::Gapic::Rest::ThreadedEnumerator.new do |in_q, out_q|
365
+ @data_a2_a_service_stub.send_streaming_message request, options do |chunk|
366
+ in_q.deq
367
+ out_q.enq chunk
368
+ end
369
+ end
370
+ )
371
+ rescue ::Gapic::Rest::Error => e
372
+ raise ::Google::Cloud::Error.from_error(e)
373
+ end
374
+
375
+ ##
376
+ # GetAgentCard returns the agent card for the agent.
377
+ #
378
+ # @overload get_agent_card(request, options = nil)
379
+ # Pass arguments to `get_agent_card` via a request object, either of type
380
+ # {::Google::Cloud::GeminiDataAnalytics::V1beta::GetAgentCardRequest} or an equivalent Hash.
381
+ #
382
+ # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::GetAgentCardRequest, ::Hash]
383
+ # A request object representing the call parameters. Required. To specify no
384
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
385
+ # @param options [::Gapic::CallOptions, ::Hash]
386
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
387
+ #
388
+ # @overload get_agent_card(tenant: nil)
389
+ # Pass arguments to `get_agent_card` via keyword arguments. Note that at
390
+ # least one keyword argument is required. To specify no parameters, or to keep all
391
+ # the default parameter values, pass an empty Hash as a request object (see above).
392
+ #
393
+ # @param tenant [::String]
394
+ # Optional. Optional tenant, provided as a path parameter.
395
+ # @yield [result, operation] Access the result along with the TransportOperation object
396
+ # @yieldparam result [::Google::Cloud::GeminiDataAnalytics::V1beta::AgentCard]
397
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
398
+ #
399
+ # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::AgentCard]
400
+ #
401
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
402
+ #
403
+ # @example Basic example
404
+ # require "google/cloud/gemini_data_analytics/v1beta"
405
+ #
406
+ # # Create a client object. The client can be reused for multiple calls.
407
+ # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataA2AService::Rest::Client.new
408
+ #
409
+ # # Create a request. To set request fields, pass in keyword arguments.
410
+ # request = Google::Cloud::GeminiDataAnalytics::V1beta::GetAgentCardRequest.new
411
+ #
412
+ # # Call the get_agent_card method.
413
+ # result = client.get_agent_card request
414
+ #
415
+ # # The returned object is of type Google::Cloud::GeminiDataAnalytics::V1beta::AgentCard.
416
+ # p result
417
+ #
418
+ def get_agent_card request, options = nil
419
+ raise ::ArgumentError, "request must be provided" if request.nil?
420
+
421
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::GetAgentCardRequest
422
+
423
+ # Converts hash and nil to an options object
424
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
425
+
426
+ # Customize the options with defaults
427
+ call_metadata = @config.rpcs.get_agent_card.metadata.to_h
428
+
429
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
430
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
431
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
432
+ gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION,
433
+ transports_version_send: [:rest]
434
+
435
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
436
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
437
+
438
+ options.apply_defaults timeout: @config.rpcs.get_agent_card.timeout,
439
+ metadata: call_metadata,
440
+ retry_policy: @config.rpcs.get_agent_card.retry_policy
441
+
442
+ options.apply_defaults timeout: @config.timeout,
443
+ metadata: @config.metadata,
444
+ retry_policy: @config.retry_policy
445
+
446
+ @data_a2_a_service_stub.get_agent_card request, options do |result, operation|
447
+ yield result, operation if block_given?
448
+ end
449
+ rescue ::Gapic::Rest::Error => e
450
+ raise ::Google::Cloud::Error.from_error(e)
451
+ end
452
+
453
+ ##
454
+ # Configuration class for the DataA2AService REST API.
455
+ #
456
+ # This class represents the configuration for DataA2AService REST,
457
+ # providing control over timeouts, retry behavior, logging, transport
458
+ # parameters, and other low-level controls. Certain parameters can also be
459
+ # applied individually to specific RPCs. See
460
+ # {::Google::Cloud::GeminiDataAnalytics::V1beta::DataA2AService::Rest::Client::Configuration::Rpcs}
461
+ # for a list of RPCs that can be configured independently.
462
+ #
463
+ # Configuration can be applied globally to all clients, or to a single client
464
+ # on construction.
465
+ #
466
+ # @example
467
+ #
468
+ # # Modify the global config, setting the timeout for
469
+ # # send_message to 20 seconds,
470
+ # # and all remaining timeouts to 10 seconds.
471
+ # ::Google::Cloud::GeminiDataAnalytics::V1beta::DataA2AService::Rest::Client.configure do |config|
472
+ # config.timeout = 10.0
473
+ # config.rpcs.send_message.timeout = 20.0
474
+ # end
475
+ #
476
+ # # Apply the above configuration only to a new client.
477
+ # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataA2AService::Rest::Client.new do |config|
478
+ # config.timeout = 10.0
479
+ # config.rpcs.send_message.timeout = 20.0
480
+ # end
481
+ #
482
+ # @!attribute [rw] endpoint
483
+ # A custom service endpoint, as a hostname or hostname:port. The default is
484
+ # nil, indicating to use the default endpoint in the current universe domain.
485
+ # @return [::String,nil]
486
+ # @!attribute [rw] credentials
487
+ # Credentials to send with calls. You may provide any of the following types:
488
+ # * (`String`) The path to a service account key file in JSON format
489
+ # * (`Hash`) A service account key as a Hash
490
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
491
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
492
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
493
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
494
+ # * (`nil`) indicating no credentials
495
+ #
496
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
497
+ # external source for authentication to Google Cloud, you must validate it before
498
+ # providing it to a Google API client library. Providing an unvalidated credential
499
+ # configuration to Google APIs can compromise the security of your systems and data.
500
+ # For more information, refer to [Validate credential configurations from external
501
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
502
+ # @return [::Object]
503
+ # @!attribute [rw] scope
504
+ # The OAuth scopes
505
+ # @return [::Array<::String>]
506
+ # @!attribute [rw] lib_name
507
+ # The library name as recorded in instrumentation and logging
508
+ # @return [::String]
509
+ # @!attribute [rw] lib_version
510
+ # The library version as recorded in instrumentation and logging
511
+ # @return [::String]
512
+ # @!attribute [rw] timeout
513
+ # The call timeout in seconds.
514
+ # @return [::Numeric]
515
+ # @!attribute [rw] metadata
516
+ # Additional headers to be sent with the call.
517
+ # @return [::Hash{::Symbol=>::String}]
518
+ # @!attribute [rw] retry_policy
519
+ # The retry policy. The value is a hash with the following keys:
520
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
521
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
522
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
523
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
524
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
525
+ # trigger a retry.
526
+ # @return [::Hash]
527
+ # @!attribute [rw] quota_project
528
+ # A separate project against which to charge quota.
529
+ # @return [::String]
530
+ # @!attribute [rw] universe_domain
531
+ # The universe domain within which to make requests. This determines the
532
+ # default endpoint URL. The default value of nil uses the environment
533
+ # universe (usually the default "googleapis.com" universe).
534
+ # @return [::String,nil]
535
+ # @!attribute [rw] logger
536
+ # A custom logger to use for request/response debug logging, or the value
537
+ # `:default` (the default) to construct a default logger, or `nil` to
538
+ # explicitly disable logging.
539
+ # @return [::Logger,:default,nil]
540
+ #
541
+ class Configuration
542
+ extend ::Gapic::Config
543
+
544
+ # @private
545
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
546
+ DEFAULT_ENDPOINT = "geminidataanalytics.googleapis.com"
547
+
548
+ config_attr :endpoint, nil, ::String, nil
549
+ config_attr :credentials, nil do |value|
550
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
551
+ allowed.any? { |klass| klass === value }
552
+ end
553
+ config_attr :scope, nil, ::String, ::Array, nil
554
+ config_attr :lib_name, nil, ::String, nil
555
+ config_attr :lib_version, nil, ::String, nil
556
+ config_attr :timeout, nil, ::Numeric, nil
557
+ config_attr :metadata, nil, ::Hash, nil
558
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
559
+ config_attr :quota_project, nil, ::String, nil
560
+ config_attr :universe_domain, nil, ::String, nil
561
+
562
+ # @private
563
+ # Overrides for http bindings for the RPCs of this service
564
+ # are only used when this service is used as mixin, and only
565
+ # by the host service.
566
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
567
+ config_attr :bindings_override, {}, ::Hash, nil
568
+ config_attr :logger, :default, ::Logger, nil, :default
569
+
570
+ # @private
571
+ def initialize parent_config = nil
572
+ @parent_config = parent_config unless parent_config.nil?
573
+
574
+ yield self if block_given?
575
+ end
576
+
577
+ ##
578
+ # Configurations for individual RPCs
579
+ # @return [Rpcs]
580
+ #
581
+ def rpcs
582
+ @rpcs ||= begin
583
+ parent_rpcs = nil
584
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
585
+ Rpcs.new parent_rpcs
586
+ end
587
+ end
588
+
589
+ ##
590
+ # Configuration RPC class for the DataA2AService API.
591
+ #
592
+ # Includes fields providing the configuration for each RPC in this service.
593
+ # Each configuration object is of type `Gapic::Config::Method` and includes
594
+ # the following configuration fields:
595
+ #
596
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
597
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
598
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
599
+ # include the following keys:
600
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
601
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
602
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
603
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
604
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
605
+ # trigger a retry.
606
+ #
607
+ class Rpcs
608
+ ##
609
+ # RPC-specific configuration for `send_message`
610
+ # @return [::Gapic::Config::Method]
611
+ #
612
+ attr_reader :send_message
613
+ ##
614
+ # RPC-specific configuration for `send_streaming_message`
615
+ # @return [::Gapic::Config::Method]
616
+ #
617
+ attr_reader :send_streaming_message
618
+ ##
619
+ # RPC-specific configuration for `get_agent_card`
620
+ # @return [::Gapic::Config::Method]
621
+ #
622
+ attr_reader :get_agent_card
623
+
624
+ # @private
625
+ def initialize parent_rpcs = nil
626
+ send_message_config = parent_rpcs.send_message if parent_rpcs.respond_to? :send_message
627
+ @send_message = ::Gapic::Config::Method.new send_message_config
628
+ send_streaming_message_config = parent_rpcs.send_streaming_message if parent_rpcs.respond_to? :send_streaming_message
629
+ @send_streaming_message = ::Gapic::Config::Method.new send_streaming_message_config
630
+ get_agent_card_config = parent_rpcs.get_agent_card if parent_rpcs.respond_to? :get_agent_card
631
+ @get_agent_card = ::Gapic::Config::Method.new get_agent_card_config
632
+
633
+ yield self if block_given?
634
+ end
635
+ end
636
+ end
637
+ end
638
+ end
639
+ end
640
+ end
641
+ end
642
+ end
643
+ end