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.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +154 -8
  5. data/lib/google/cloud/gemini_data_analytics/v1beta/bindings_override.rb +75 -0
  6. data/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/client.rb +1286 -0
  7. data/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/credentials.rb +47 -0
  8. data/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/operations.rb +813 -0
  9. data/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/paths.rb +69 -0
  10. data/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/client.rb +1212 -0
  11. data/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/operations.rb +914 -0
  12. data/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/service_stub.rb +573 -0
  13. data/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest.rb +54 -0
  14. data/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service.rb +56 -0
  15. data/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/client.rb +928 -0
  16. data/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/credentials.rb +47 -0
  17. data/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/paths.rb +102 -0
  18. data/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/client.rb +877 -0
  19. data/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/service_stub.rb +382 -0
  20. data/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest.rb +55 -0
  21. data/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service.rb +57 -0
  22. data/lib/google/cloud/gemini_data_analytics/v1beta/rest.rb +39 -0
  23. data/lib/google/cloud/gemini_data_analytics/v1beta/version.rb +7 -2
  24. data/lib/google/cloud/gemini_data_analytics/v1beta.rb +46 -0
  25. data/lib/google/cloud/geminidataanalytics/v1beta/context_pb.rb +54 -0
  26. data/lib/google/cloud/geminidataanalytics/v1beta/conversation_pb.rb +52 -0
  27. data/lib/google/cloud/geminidataanalytics/v1beta/credentials_pb.rb +47 -0
  28. data/lib/google/cloud/geminidataanalytics/v1beta/data_agent_pb.rb +49 -0
  29. data/lib/google/cloud/geminidataanalytics/v1beta/data_agent_service_pb.rb +67 -0
  30. data/lib/google/cloud/geminidataanalytics/v1beta/data_agent_service_services_pb.rb +60 -0
  31. data/lib/google/cloud/geminidataanalytics/v1beta/data_analytics_agent_pb.rb +46 -0
  32. data/lib/google/cloud/geminidataanalytics/v1beta/data_chat_service_pb.rb +85 -0
  33. data/lib/google/cloud/geminidataanalytics/v1beta/data_chat_service_services_pb.rb +57 -0
  34. data/lib/google/cloud/geminidataanalytics/v1beta/datasource_pb.rb +58 -0
  35. data/lib/google-cloud-gemini_data_analytics-v1beta.rb +21 -0
  36. data/proto_docs/README.md +4 -0
  37. data/proto_docs/google/api/client.rb +473 -0
  38. data/proto_docs/google/api/field_behavior.rb +85 -0
  39. data/proto_docs/google/api/field_info.rb +88 -0
  40. data/proto_docs/google/api/launch_stage.rb +71 -0
  41. data/proto_docs/google/api/resource.rb +227 -0
  42. data/proto_docs/google/cloud/geminidataanalytics/v1beta/context.rb +136 -0
  43. data/proto_docs/google/cloud/geminidataanalytics/v1beta/conversation.rb +144 -0
  44. data/proto_docs/google/cloud/geminidataanalytics/v1beta/credentials.rb +74 -0
  45. data/proto_docs/google/cloud/geminidataanalytics/v1beta/data_agent.rb +90 -0
  46. data/proto_docs/google/cloud/geminidataanalytics/v1beta/data_agent_service.rb +267 -0
  47. data/proto_docs/google/cloud/geminidataanalytics/v1beta/data_analytics_agent.rb +46 -0
  48. data/proto_docs/google/cloud/geminidataanalytics/v1beta/data_chat_service.rb +576 -0
  49. data/proto_docs/google/cloud/geminidataanalytics/v1beta/datasource.rb +280 -0
  50. data/proto_docs/google/iam/v1/iam_policy.rb +87 -0
  51. data/proto_docs/google/iam/v1/options.rb +50 -0
  52. data/proto_docs/google/iam/v1/policy.rb +426 -0
  53. data/proto_docs/google/longrunning/operations.rb +173 -0
  54. data/proto_docs/google/protobuf/any.rb +145 -0
  55. data/proto_docs/google/protobuf/duration.rb +98 -0
  56. data/proto_docs/google/protobuf/empty.rb +34 -0
  57. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  58. data/proto_docs/google/protobuf/struct.rb +108 -0
  59. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  60. data/proto_docs/google/rpc/status.rb +48 -0
  61. data/proto_docs/google/type/expr.rb +75 -0
  62. metadata +123 -9
@@ -0,0 +1,928 @@
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/errors"
20
+ require "google/cloud/geminidataanalytics/v1beta/data_chat_service_pb"
21
+ require "google/cloud/location"
22
+
23
+ module Google
24
+ module Cloud
25
+ module GeminiDataAnalytics
26
+ module V1beta
27
+ module DataChatService
28
+ ##
29
+ # Client for the DataChatService service.
30
+ #
31
+ # Service to ask a natural language question on top of BigQuery
32
+ # and Looker Studio datasources to get back streamed responses of various kinds
33
+ # to help provide a rich conversational answer.
34
+ #
35
+ class Client
36
+ # @private
37
+ API_VERSION = ""
38
+
39
+ # @private
40
+ DEFAULT_ENDPOINT_TEMPLATE = "geminidataanalytics.$UNIVERSE_DOMAIN$"
41
+
42
+ include Paths
43
+
44
+ # @private
45
+ attr_reader :data_chat_service_stub
46
+
47
+ ##
48
+ # Configure the DataChatService Client class.
49
+ #
50
+ # See {::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client::Configuration}
51
+ # for a description of the configuration fields.
52
+ #
53
+ # @example
54
+ #
55
+ # # Modify the configuration for all DataChatService clients
56
+ # ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.configure do |config|
57
+ # config.timeout = 10.0
58
+ # end
59
+ #
60
+ # @yield [config] Configure the Client client.
61
+ # @yieldparam config [Client::Configuration]
62
+ #
63
+ # @return [Client::Configuration]
64
+ #
65
+ def self.configure
66
+ @configure ||= begin
67
+ namespace = ["Google", "Cloud", "GeminiDataAnalytics", "V1beta"]
68
+ parent_config = while namespace.any?
69
+ parent_name = namespace.join "::"
70
+ parent_const = const_get parent_name
71
+ break parent_const.configure if parent_const.respond_to? :configure
72
+ namespace.pop
73
+ end
74
+ default_config = Client::Configuration.new parent_config
75
+
76
+ default_config.timeout = 60.0
77
+ default_config.retry_policy = {
78
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
79
+ }
80
+
81
+ default_config
82
+ end
83
+ yield @configure if block_given?
84
+ @configure
85
+ end
86
+
87
+ ##
88
+ # Configure the DataChatService Client instance.
89
+ #
90
+ # The configuration is set to the derived mode, meaning that values can be changed,
91
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
92
+ # should be made on {Client.configure}.
93
+ #
94
+ # See {::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client::Configuration}
95
+ # for a description of the configuration fields.
96
+ #
97
+ # @yield [config] Configure the Client client.
98
+ # @yieldparam config [Client::Configuration]
99
+ #
100
+ # @return [Client::Configuration]
101
+ #
102
+ def configure
103
+ yield @config if block_given?
104
+ @config
105
+ end
106
+
107
+ ##
108
+ # The effective universe domain
109
+ #
110
+ # @return [String]
111
+ #
112
+ def universe_domain
113
+ @data_chat_service_stub.universe_domain
114
+ end
115
+
116
+ ##
117
+ # Create a new DataChatService client object.
118
+ #
119
+ # @example
120
+ #
121
+ # # Create a client using the default configuration
122
+ # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new
123
+ #
124
+ # # Create a client using a custom configuration
125
+ # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new do |config|
126
+ # config.timeout = 10.0
127
+ # end
128
+ #
129
+ # @yield [config] Configure the DataChatService client.
130
+ # @yieldparam config [Client::Configuration]
131
+ #
132
+ def initialize
133
+ # These require statements are intentionally placed here to initialize
134
+ # the gRPC module only when it's required.
135
+ # See https://github.com/googleapis/toolkit/issues/446
136
+ require "gapic/grpc"
137
+ require "google/cloud/geminidataanalytics/v1beta/data_chat_service_services_pb"
138
+
139
+ # Create the configuration object
140
+ @config = Configuration.new Client.configure
141
+
142
+ # Yield the configuration if needed
143
+ yield @config if block_given?
144
+
145
+ # Create credentials
146
+ credentials = @config.credentials
147
+ # Use self-signed JWT if the endpoint is unchanged from default,
148
+ # but only if the default endpoint does not have a region prefix.
149
+ enable_self_signed_jwt = @config.endpoint.nil? ||
150
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
151
+ !@config.endpoint.split(".").first.include?("-"))
152
+ credentials ||= Credentials.default scope: @config.scope,
153
+ enable_self_signed_jwt: enable_self_signed_jwt
154
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
155
+ credentials = Credentials.new credentials, scope: @config.scope
156
+ end
157
+ @quota_project_id = @config.quota_project
158
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
159
+
160
+ @data_chat_service_stub = ::Gapic::ServiceStub.new(
161
+ ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Stub,
162
+ credentials: credentials,
163
+ endpoint: @config.endpoint,
164
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
165
+ universe_domain: @config.universe_domain,
166
+ channel_args: @config.channel_args,
167
+ interceptors: @config.interceptors,
168
+ channel_pool_config: @config.channel_pool,
169
+ logger: @config.logger
170
+ )
171
+
172
+ @data_chat_service_stub.stub_logger&.info do |entry|
173
+ entry.set_system_name
174
+ entry.set_service
175
+ entry.message = "Created client for #{entry.service}"
176
+ entry.set_credentials_fields credentials
177
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
178
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
179
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
180
+ end
181
+
182
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
183
+ config.credentials = credentials
184
+ config.quota_project = @quota_project_id
185
+ config.endpoint = @data_chat_service_stub.endpoint
186
+ config.universe_domain = @data_chat_service_stub.universe_domain
187
+ config.logger = @data_chat_service_stub.logger if config.respond_to? :logger=
188
+ end
189
+ end
190
+
191
+ ##
192
+ # Get the associated client for mix-in of the Locations.
193
+ #
194
+ # @return [Google::Cloud::Location::Locations::Client]
195
+ #
196
+ attr_reader :location_client
197
+
198
+ ##
199
+ # The logger used for request/response debug logging.
200
+ #
201
+ # @return [Logger]
202
+ #
203
+ def logger
204
+ @data_chat_service_stub.logger
205
+ end
206
+
207
+ # Service calls
208
+
209
+ ##
210
+ # Answers a data question by generating a stream of
211
+ # [Message][google.cloud.geminidataanalytics.v1alpha.Message] objects.
212
+ #
213
+ # @overload chat(request, options = nil)
214
+ # Pass arguments to `chat` via a request object, either of type
215
+ # {::Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest} or an equivalent Hash.
216
+ #
217
+ # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest, ::Hash]
218
+ # A request object representing the call parameters. Required. To specify no
219
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
220
+ # @param options [::Gapic::CallOptions, ::Hash]
221
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
222
+ #
223
+ # @overload chat(inline_context: nil, conversation_reference: nil, data_agent_context: nil, project: nil, parent: nil, messages: nil)
224
+ # Pass arguments to `chat` via keyword arguments. Note that at
225
+ # least one keyword argument is required. To specify no parameters, or to keep all
226
+ # the default parameter values, pass an empty Hash as a request object (see above).
227
+ #
228
+ # @param inline_context [::Google::Cloud::GeminiDataAnalytics::V1beta::Context, ::Hash]
229
+ # Optional. Inline context for the chat request. Use this to chat
230
+ # statelessly (without managed conversation persistence and without an
231
+ # Agent) by passing all context inline.
232
+ #
233
+ # Note: The following parameters are mutually exclusive: `inline_context`, `conversation_reference`, `data_agent_context`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.
234
+ # @param conversation_reference [::Google::Cloud::GeminiDataAnalytics::V1beta::ConversationReference, ::Hash]
235
+ # Optional. Reference to a persisted conversation and agent context.
236
+ # Use this to chat with an Agent using managed conversation persistence.
237
+ #
238
+ # Note: The following parameters are mutually exclusive: `conversation_reference`, `inline_context`, `data_agent_context`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.
239
+ # @param data_agent_context [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentContext, ::Hash]
240
+ # Optional. Context for the chat request. Use this to chat with an Agent
241
+ # statelessly, without managed conversation persistence.
242
+ #
243
+ # Note: The following parameters are mutually exclusive: `data_agent_context`, `inline_context`, `conversation_reference`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.
244
+ # @param project [::String]
245
+ # Optional. The Google Cloud project to be used for quota and billing.
246
+ # @param parent [::String]
247
+ # Required. The parent value for chat request.
248
+ # Pattern: `projects/{project}/locations/{location}`
249
+ # @param messages [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::Message, ::Hash>]
250
+ # Required. Content of current conversation.
251
+ #
252
+ # @yield [response, operation] Access the result along with the RPC operation
253
+ # @yieldparam response [::Enumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::Message>]
254
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
255
+ #
256
+ # @return [::Enumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::Message>]
257
+ #
258
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
259
+ #
260
+ # @example Basic example
261
+ # require "google/cloud/gemini_data_analytics/v1beta"
262
+ #
263
+ # # Create a client object. The client can be reused for multiple calls.
264
+ # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new
265
+ #
266
+ # # Create a request. To set request fields, pass in keyword arguments.
267
+ # request = Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest.new
268
+ #
269
+ # # Call the chat method to start streaming.
270
+ # output = client.chat request
271
+ #
272
+ # # The returned object is a streamed enumerable yielding elements of type
273
+ # # ::Google::Cloud::GeminiDataAnalytics::V1beta::Message
274
+ # output.each do |current_response|
275
+ # p current_response
276
+ # end
277
+ #
278
+ def chat request, options = nil
279
+ raise ::ArgumentError, "request must be provided" if request.nil?
280
+
281
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest
282
+
283
+ # Converts hash and nil to an options object
284
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
285
+
286
+ # Customize the options with defaults
287
+ metadata = @config.rpcs.chat.metadata.to_h
288
+
289
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
290
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
291
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
292
+ gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION
293
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
294
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
295
+
296
+ header_params = {}
297
+ if request.parent
298
+ header_params["parent"] = request.parent
299
+ end
300
+
301
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
302
+ metadata[:"x-goog-request-params"] ||= request_params_header
303
+
304
+ options.apply_defaults timeout: @config.rpcs.chat.timeout,
305
+ metadata: metadata,
306
+ retry_policy: @config.rpcs.chat.retry_policy
307
+
308
+ options.apply_defaults timeout: @config.timeout,
309
+ metadata: @config.metadata,
310
+ retry_policy: @config.retry_policy
311
+
312
+ @data_chat_service_stub.call_rpc :chat, request, options: options do |response, operation|
313
+ yield response, operation if block_given?
314
+ end
315
+ rescue ::GRPC::BadStatus => e
316
+ raise ::Google::Cloud::Error.from_error(e)
317
+ end
318
+
319
+ ##
320
+ # Creates a new conversation to persist the conversation history. Each
321
+ # conversation will have multiple messages associated with it.
322
+ #
323
+ # @overload create_conversation(request, options = nil)
324
+ # Pass arguments to `create_conversation` via a request object, either of type
325
+ # {::Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest} or an equivalent Hash.
326
+ #
327
+ # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest, ::Hash]
328
+ # A request object representing the call parameters. Required. To specify no
329
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
330
+ # @param options [::Gapic::CallOptions, ::Hash]
331
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
332
+ #
333
+ # @overload create_conversation(parent: nil, conversation_id: nil, conversation: nil, request_id: nil)
334
+ # Pass arguments to `create_conversation` via keyword arguments. Note that at
335
+ # least one keyword argument is required. To specify no parameters, or to keep all
336
+ # the default parameter values, pass an empty Hash as a request object (see above).
337
+ #
338
+ # @param parent [::String]
339
+ # Required. Parent value for CreateConversationRequest.
340
+ # Format: `projects/{project}/locations/{location}`
341
+ # @param conversation_id [::String]
342
+ # Optional. The conversation id of the conversation to create.
343
+ # Must be unique within the parent.
344
+ # The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
345
+ # If not provided, the server will auto-generate a value for the id.
346
+ # @param conversation [::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation, ::Hash]
347
+ # Required. The conversation to create.
348
+ # @param request_id [::String]
349
+ # Optional. An optional request ID to identify requests. Specify a unique
350
+ # request ID so that if you must retry your request, the server will know to
351
+ # ignore the request if it has already been completed. The server will
352
+ # guarantee that for at least 60 minutes since the first request.
353
+ #
354
+ # @yield [response, operation] Access the result along with the RPC operation
355
+ # @yieldparam response [::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation]
356
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
357
+ #
358
+ # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation]
359
+ #
360
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
361
+ #
362
+ # @example Basic example
363
+ # require "google/cloud/gemini_data_analytics/v1beta"
364
+ #
365
+ # # Create a client object. The client can be reused for multiple calls.
366
+ # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new
367
+ #
368
+ # # Create a request. To set request fields, pass in keyword arguments.
369
+ # request = Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest.new
370
+ #
371
+ # # Call the create_conversation method.
372
+ # result = client.create_conversation request
373
+ #
374
+ # # The returned object is of type Google::Cloud::GeminiDataAnalytics::V1beta::Conversation.
375
+ # p result
376
+ #
377
+ def create_conversation request, options = nil
378
+ raise ::ArgumentError, "request must be provided" if request.nil?
379
+
380
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest
381
+
382
+ # Converts hash and nil to an options object
383
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
384
+
385
+ # Customize the options with defaults
386
+ metadata = @config.rpcs.create_conversation.metadata.to_h
387
+
388
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
389
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
390
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
391
+ gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION
392
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
393
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
394
+
395
+ header_params = {}
396
+ if request.parent
397
+ header_params["parent"] = request.parent
398
+ end
399
+
400
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
401
+ metadata[:"x-goog-request-params"] ||= request_params_header
402
+
403
+ options.apply_defaults timeout: @config.rpcs.create_conversation.timeout,
404
+ metadata: metadata,
405
+ retry_policy: @config.rpcs.create_conversation.retry_policy
406
+
407
+ options.apply_defaults timeout: @config.timeout,
408
+ metadata: @config.metadata,
409
+ retry_policy: @config.retry_policy
410
+
411
+ @data_chat_service_stub.call_rpc :create_conversation, request, options: options do |response, operation|
412
+ yield response, operation if block_given?
413
+ end
414
+ rescue ::GRPC::BadStatus => e
415
+ raise ::Google::Cloud::Error.from_error(e)
416
+ end
417
+
418
+ ##
419
+ # Gets details of a single conversation by using conversation id and parent.
420
+ #
421
+ # @overload get_conversation(request, options = nil)
422
+ # Pass arguments to `get_conversation` via a request object, either of type
423
+ # {::Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest} or an equivalent Hash.
424
+ #
425
+ # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest, ::Hash]
426
+ # A request object representing the call parameters. Required. To specify no
427
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
428
+ # @param options [::Gapic::CallOptions, ::Hash]
429
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
430
+ #
431
+ # @overload get_conversation(name: nil)
432
+ # Pass arguments to `get_conversation` via keyword arguments. Note that at
433
+ # least one keyword argument is required. To specify no parameters, or to keep all
434
+ # the default parameter values, pass an empty Hash as a request object (see above).
435
+ #
436
+ # @param name [::String]
437
+ # Required. Name of the resource.
438
+ # Format:
439
+ # `projects/{project}/locations/{location}/conversations/{conversation}`
440
+ #
441
+ # @yield [response, operation] Access the result along with the RPC operation
442
+ # @yieldparam response [::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation]
443
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
444
+ #
445
+ # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation]
446
+ #
447
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
448
+ #
449
+ # @example Basic example
450
+ # require "google/cloud/gemini_data_analytics/v1beta"
451
+ #
452
+ # # Create a client object. The client can be reused for multiple calls.
453
+ # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new
454
+ #
455
+ # # Create a request. To set request fields, pass in keyword arguments.
456
+ # request = Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest.new
457
+ #
458
+ # # Call the get_conversation method.
459
+ # result = client.get_conversation request
460
+ #
461
+ # # The returned object is of type Google::Cloud::GeminiDataAnalytics::V1beta::Conversation.
462
+ # p result
463
+ #
464
+ def get_conversation request, options = nil
465
+ raise ::ArgumentError, "request must be provided" if request.nil?
466
+
467
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest
468
+
469
+ # Converts hash and nil to an options object
470
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
471
+
472
+ # Customize the options with defaults
473
+ metadata = @config.rpcs.get_conversation.metadata.to_h
474
+
475
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
476
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
477
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
478
+ gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION
479
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
480
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
481
+
482
+ header_params = {}
483
+ if request.name
484
+ header_params["name"] = request.name
485
+ end
486
+
487
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
488
+ metadata[:"x-goog-request-params"] ||= request_params_header
489
+
490
+ options.apply_defaults timeout: @config.rpcs.get_conversation.timeout,
491
+ metadata: metadata,
492
+ retry_policy: @config.rpcs.get_conversation.retry_policy
493
+
494
+ options.apply_defaults timeout: @config.timeout,
495
+ metadata: @config.metadata,
496
+ retry_policy: @config.retry_policy
497
+
498
+ @data_chat_service_stub.call_rpc :get_conversation, request, options: options do |response, operation|
499
+ yield response, operation if block_given?
500
+ end
501
+ rescue ::GRPC::BadStatus => e
502
+ raise ::Google::Cloud::Error.from_error(e)
503
+ end
504
+
505
+ ##
506
+ # Lists all conversations for a given parent.
507
+ #
508
+ # @overload list_conversations(request, options = nil)
509
+ # Pass arguments to `list_conversations` via a request object, either of type
510
+ # {::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest} or an equivalent Hash.
511
+ #
512
+ # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest, ::Hash]
513
+ # A request object representing the call parameters. Required. To specify no
514
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
515
+ # @param options [::Gapic::CallOptions, ::Hash]
516
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
517
+ #
518
+ # @overload list_conversations(parent: nil, page_size: nil, page_token: nil, filter: nil)
519
+ # Pass arguments to `list_conversations` via keyword arguments. Note that at
520
+ # least one keyword argument is required. To specify no parameters, or to keep all
521
+ # the default parameter values, pass an empty Hash as a request object (see above).
522
+ #
523
+ # @param parent [::String]
524
+ # Required. Parent value for ListConversationsRequest.
525
+ # Format: `projects/{project}/locations/{location}`
526
+ # @param page_size [::Integer]
527
+ # Optional. Requested page size. Server may return fewer items than
528
+ # requested. The max page size is 100. All larger page sizes will be coerced
529
+ # to 100. If unspecified, server will pick 50 as an approperiate default.
530
+ # @param page_token [::String]
531
+ # Optional. A token identifying a page of results the server should return.
532
+ # @param filter [::String]
533
+ # Optional. Returned conversations will match criteria specified within the
534
+ # filter. ListConversations allows filtering by:
535
+ # * agent_id
536
+ # * labels
537
+ #
538
+ # @yield [response, operation] Access the result along with the RPC operation
539
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation>]
540
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
541
+ #
542
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation>]
543
+ #
544
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
545
+ #
546
+ # @example Basic example
547
+ # require "google/cloud/gemini_data_analytics/v1beta"
548
+ #
549
+ # # Create a client object. The client can be reused for multiple calls.
550
+ # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new
551
+ #
552
+ # # Create a request. To set request fields, pass in keyword arguments.
553
+ # request = Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest.new
554
+ #
555
+ # # Call the list_conversations method.
556
+ # result = client.list_conversations request
557
+ #
558
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
559
+ # # over elements, and API calls will be issued to fetch pages as needed.
560
+ # result.each do |item|
561
+ # # Each element is of type ::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation.
562
+ # p item
563
+ # end
564
+ #
565
+ def list_conversations request, options = nil
566
+ raise ::ArgumentError, "request must be provided" if request.nil?
567
+
568
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest
569
+
570
+ # Converts hash and nil to an options object
571
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
572
+
573
+ # Customize the options with defaults
574
+ metadata = @config.rpcs.list_conversations.metadata.to_h
575
+
576
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
577
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
578
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
579
+ gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION
580
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
581
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
582
+
583
+ header_params = {}
584
+ if request.parent
585
+ header_params["parent"] = request.parent
586
+ end
587
+
588
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
589
+ metadata[:"x-goog-request-params"] ||= request_params_header
590
+
591
+ options.apply_defaults timeout: @config.rpcs.list_conversations.timeout,
592
+ metadata: metadata,
593
+ retry_policy: @config.rpcs.list_conversations.retry_policy
594
+
595
+ options.apply_defaults timeout: @config.timeout,
596
+ metadata: @config.metadata,
597
+ retry_policy: @config.retry_policy
598
+
599
+ @data_chat_service_stub.call_rpc :list_conversations, request, options: options do |response, operation|
600
+ response = ::Gapic::PagedEnumerable.new @data_chat_service_stub, :list_conversations, request, response, operation, options
601
+ yield response, operation if block_given?
602
+ throw :response, response
603
+ end
604
+ rescue ::GRPC::BadStatus => e
605
+ raise ::Google::Cloud::Error.from_error(e)
606
+ end
607
+
608
+ ##
609
+ # Lists all messages for a given conversation.
610
+ #
611
+ # @overload list_messages(request, options = nil)
612
+ # Pass arguments to `list_messages` via a request object, either of type
613
+ # {::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest} or an equivalent Hash.
614
+ #
615
+ # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest, ::Hash]
616
+ # A request object representing the call parameters. Required. To specify no
617
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
618
+ # @param options [::Gapic::CallOptions, ::Hash]
619
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
620
+ #
621
+ # @overload list_messages(parent: nil, page_size: nil, page_token: nil, filter: nil)
622
+ # Pass arguments to `list_messages` via keyword arguments. Note that at
623
+ # least one keyword argument is required. To specify no parameters, or to keep all
624
+ # the default parameter values, pass an empty Hash as a request object (see above).
625
+ #
626
+ # @param parent [::String]
627
+ # Required. The conversation to list messages under.
628
+ # Format:
629
+ # `projects/{project}/locations/{location}/conversations/{conversation_id}`
630
+ # @param page_size [::Integer]
631
+ # Optional. Requested page size. Server may return fewer items than
632
+ # requested. The max page size is 100. All larger page sizes will be coerced
633
+ # to 100. If unspecified, server will pick 50 as an approperiate default.
634
+ # @param page_token [::String]
635
+ # Optional. A token identifying a page of results the server should return.
636
+ # @param filter [::String]
637
+ # Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for
638
+ # syntax.
639
+ #
640
+ # ListMessages allows filtering by:
641
+ # * create_time (e.g., `createTime > "2025-01-28T06:51:56-08:00"`)
642
+ # * update_time
643
+ #
644
+ # @yield [response, operation] Access the result along with the RPC operation
645
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::StorageMessage>]
646
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
647
+ #
648
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::StorageMessage>]
649
+ #
650
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
651
+ #
652
+ # @example Basic example
653
+ # require "google/cloud/gemini_data_analytics/v1beta"
654
+ #
655
+ # # Create a client object. The client can be reused for multiple calls.
656
+ # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new
657
+ #
658
+ # # Create a request. To set request fields, pass in keyword arguments.
659
+ # request = Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest.new
660
+ #
661
+ # # Call the list_messages method.
662
+ # result = client.list_messages request
663
+ #
664
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
665
+ # # over elements, and API calls will be issued to fetch pages as needed.
666
+ # result.each do |item|
667
+ # # Each element is of type ::Google::Cloud::GeminiDataAnalytics::V1beta::StorageMessage.
668
+ # p item
669
+ # end
670
+ #
671
+ def list_messages request, options = nil
672
+ raise ::ArgumentError, "request must be provided" if request.nil?
673
+
674
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest
675
+
676
+ # Converts hash and nil to an options object
677
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
678
+
679
+ # Customize the options with defaults
680
+ metadata = @config.rpcs.list_messages.metadata.to_h
681
+
682
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
683
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
684
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
685
+ gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION
686
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
687
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
688
+
689
+ header_params = {}
690
+ if request.parent
691
+ header_params["parent"] = request.parent
692
+ end
693
+
694
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
695
+ metadata[:"x-goog-request-params"] ||= request_params_header
696
+
697
+ options.apply_defaults timeout: @config.rpcs.list_messages.timeout,
698
+ metadata: metadata,
699
+ retry_policy: @config.rpcs.list_messages.retry_policy
700
+
701
+ options.apply_defaults timeout: @config.timeout,
702
+ metadata: @config.metadata,
703
+ retry_policy: @config.retry_policy
704
+
705
+ @data_chat_service_stub.call_rpc :list_messages, request, options: options do |response, operation|
706
+ response = ::Gapic::PagedEnumerable.new @data_chat_service_stub, :list_messages, request, response, operation, options
707
+ yield response, operation if block_given?
708
+ throw :response, response
709
+ end
710
+ rescue ::GRPC::BadStatus => e
711
+ raise ::Google::Cloud::Error.from_error(e)
712
+ end
713
+
714
+ ##
715
+ # Configuration class for the DataChatService API.
716
+ #
717
+ # This class represents the configuration for DataChatService,
718
+ # providing control over timeouts, retry behavior, logging, transport
719
+ # parameters, and other low-level controls. Certain parameters can also be
720
+ # applied individually to specific RPCs. See
721
+ # {::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client::Configuration::Rpcs}
722
+ # for a list of RPCs that can be configured independently.
723
+ #
724
+ # Configuration can be applied globally to all clients, or to a single client
725
+ # on construction.
726
+ #
727
+ # @example
728
+ #
729
+ # # Modify the global config, setting the timeout for
730
+ # # chat to 20 seconds,
731
+ # # and all remaining timeouts to 10 seconds.
732
+ # ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.configure do |config|
733
+ # config.timeout = 10.0
734
+ # config.rpcs.chat.timeout = 20.0
735
+ # end
736
+ #
737
+ # # Apply the above configuration only to a new client.
738
+ # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new do |config|
739
+ # config.timeout = 10.0
740
+ # config.rpcs.chat.timeout = 20.0
741
+ # end
742
+ #
743
+ # @!attribute [rw] endpoint
744
+ # A custom service endpoint, as a hostname or hostname:port. The default is
745
+ # nil, indicating to use the default endpoint in the current universe domain.
746
+ # @return [::String,nil]
747
+ # @!attribute [rw] credentials
748
+ # Credentials to send with calls. You may provide any of the following types:
749
+ # * (`String`) The path to a service account key file in JSON format
750
+ # * (`Hash`) A service account key as a Hash
751
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
752
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
753
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
754
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
755
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
756
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
757
+ # * (`nil`) indicating no credentials
758
+ #
759
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
760
+ # external source for authentication to Google Cloud, you must validate it before
761
+ # providing it to a Google API client library. Providing an unvalidated credential
762
+ # configuration to Google APIs can compromise the security of your systems and data.
763
+ # For more information, refer to [Validate credential configurations from external
764
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
765
+ # @return [::Object]
766
+ # @!attribute [rw] scope
767
+ # The OAuth scopes
768
+ # @return [::Array<::String>]
769
+ # @!attribute [rw] lib_name
770
+ # The library name as recorded in instrumentation and logging
771
+ # @return [::String]
772
+ # @!attribute [rw] lib_version
773
+ # The library version as recorded in instrumentation and logging
774
+ # @return [::String]
775
+ # @!attribute [rw] channel_args
776
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
777
+ # `GRPC::Core::Channel` object is provided as the credential.
778
+ # @return [::Hash]
779
+ # @!attribute [rw] interceptors
780
+ # An array of interceptors that are run before calls are executed.
781
+ # @return [::Array<::GRPC::ClientInterceptor>]
782
+ # @!attribute [rw] timeout
783
+ # The call timeout in seconds.
784
+ # @return [::Numeric]
785
+ # @!attribute [rw] metadata
786
+ # Additional gRPC headers to be sent with the call.
787
+ # @return [::Hash{::Symbol=>::String}]
788
+ # @!attribute [rw] retry_policy
789
+ # The retry policy. The value is a hash with the following keys:
790
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
791
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
792
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
793
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
794
+ # trigger a retry.
795
+ # @return [::Hash]
796
+ # @!attribute [rw] quota_project
797
+ # A separate project against which to charge quota.
798
+ # @return [::String]
799
+ # @!attribute [rw] universe_domain
800
+ # The universe domain within which to make requests. This determines the
801
+ # default endpoint URL. The default value of nil uses the environment
802
+ # universe (usually the default "googleapis.com" universe).
803
+ # @return [::String,nil]
804
+ # @!attribute [rw] logger
805
+ # A custom logger to use for request/response debug logging, or the value
806
+ # `:default` (the default) to construct a default logger, or `nil` to
807
+ # explicitly disable logging.
808
+ # @return [::Logger,:default,nil]
809
+ #
810
+ class Configuration
811
+ extend ::Gapic::Config
812
+
813
+ # @private
814
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
815
+ DEFAULT_ENDPOINT = "geminidataanalytics.googleapis.com"
816
+
817
+ config_attr :endpoint, nil, ::String, nil
818
+ config_attr :credentials, nil do |value|
819
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
820
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
821
+ allowed.any? { |klass| klass === value }
822
+ end
823
+ config_attr :scope, nil, ::String, ::Array, nil
824
+ config_attr :lib_name, nil, ::String, nil
825
+ config_attr :lib_version, nil, ::String, nil
826
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
827
+ config_attr :interceptors, nil, ::Array, nil
828
+ config_attr :timeout, nil, ::Numeric, nil
829
+ config_attr :metadata, nil, ::Hash, nil
830
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
831
+ config_attr :quota_project, nil, ::String, nil
832
+ config_attr :universe_domain, nil, ::String, nil
833
+ config_attr :logger, :default, ::Logger, nil, :default
834
+
835
+ # @private
836
+ def initialize parent_config = nil
837
+ @parent_config = parent_config unless parent_config.nil?
838
+
839
+ yield self if block_given?
840
+ end
841
+
842
+ ##
843
+ # Configurations for individual RPCs
844
+ # @return [Rpcs]
845
+ #
846
+ def rpcs
847
+ @rpcs ||= begin
848
+ parent_rpcs = nil
849
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
850
+ Rpcs.new parent_rpcs
851
+ end
852
+ end
853
+
854
+ ##
855
+ # Configuration for the channel pool
856
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
857
+ #
858
+ def channel_pool
859
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
860
+ end
861
+
862
+ ##
863
+ # Configuration RPC class for the DataChatService API.
864
+ #
865
+ # Includes fields providing the configuration for each RPC in this service.
866
+ # Each configuration object is of type `Gapic::Config::Method` and includes
867
+ # the following configuration fields:
868
+ #
869
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
870
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
871
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
872
+ # include the following keys:
873
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
874
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
875
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
876
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
877
+ # trigger a retry.
878
+ #
879
+ class Rpcs
880
+ ##
881
+ # RPC-specific configuration for `chat`
882
+ # @return [::Gapic::Config::Method]
883
+ #
884
+ attr_reader :chat
885
+ ##
886
+ # RPC-specific configuration for `create_conversation`
887
+ # @return [::Gapic::Config::Method]
888
+ #
889
+ attr_reader :create_conversation
890
+ ##
891
+ # RPC-specific configuration for `get_conversation`
892
+ # @return [::Gapic::Config::Method]
893
+ #
894
+ attr_reader :get_conversation
895
+ ##
896
+ # RPC-specific configuration for `list_conversations`
897
+ # @return [::Gapic::Config::Method]
898
+ #
899
+ attr_reader :list_conversations
900
+ ##
901
+ # RPC-specific configuration for `list_messages`
902
+ # @return [::Gapic::Config::Method]
903
+ #
904
+ attr_reader :list_messages
905
+
906
+ # @private
907
+ def initialize parent_rpcs = nil
908
+ chat_config = parent_rpcs.chat if parent_rpcs.respond_to? :chat
909
+ @chat = ::Gapic::Config::Method.new chat_config
910
+ create_conversation_config = parent_rpcs.create_conversation if parent_rpcs.respond_to? :create_conversation
911
+ @create_conversation = ::Gapic::Config::Method.new create_conversation_config
912
+ get_conversation_config = parent_rpcs.get_conversation if parent_rpcs.respond_to? :get_conversation
913
+ @get_conversation = ::Gapic::Config::Method.new get_conversation_config
914
+ list_conversations_config = parent_rpcs.list_conversations if parent_rpcs.respond_to? :list_conversations
915
+ @list_conversations = ::Gapic::Config::Method.new list_conversations_config
916
+ list_messages_config = parent_rpcs.list_messages if parent_rpcs.respond_to? :list_messages
917
+ @list_messages = ::Gapic::Config::Method.new list_messages_config
918
+
919
+ yield self if block_given?
920
+ end
921
+ end
922
+ end
923
+ end
924
+ end
925
+ end
926
+ end
927
+ end
928
+ end