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