google-cloud-ces-v1beta 1.0.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/ces/v1beta/agent_card_pb.rb +3 -1
  3. data/lib/google/cloud/ces/v1beta/agent_pb.rb +3 -1
  4. data/lib/google/cloud/ces/v1beta/agent_service/client.rb +105 -1
  5. data/lib/google/cloud/ces/v1beta/agent_service/paths.rb +54 -11
  6. data/lib/google/cloud/ces/v1beta/agent_service/rest/client.rb +98 -1
  7. data/lib/google/cloud/ces/v1beta/agent_service/rest/service_stub.rb +62 -0
  8. data/lib/google/cloud/ces/v1beta/agent_service_pb.rb +3 -1
  9. data/lib/google/cloud/ces/v1beta/agent_service_services_pb.rb +2 -0
  10. data/lib/google/cloud/ces/v1beta/agent_tool_pb.rb +1 -1
  11. data/lib/google/cloud/ces/v1beta/agent_transfers_pb.rb +1 -1
  12. data/lib/google/cloud/ces/v1beta/app_pb.rb +6 -1
  13. data/lib/google/cloud/ces/v1beta/app_version_pb.rb +1 -1
  14. data/lib/google/cloud/ces/v1beta/assistant_service/client.rb +1023 -0
  15. data/lib/google/cloud/ces/v1beta/assistant_service/credentials.rb +48 -0
  16. data/lib/google/cloud/ces/v1beta/assistant_service/paths.rb +73 -0
  17. data/lib/google/cloud/ces/v1beta/assistant_service/rest/client.rb +946 -0
  18. data/lib/google/cloud/ces/v1beta/assistant_service/rest/service_stub.rb +450 -0
  19. data/lib/google/cloud/ces/v1beta/assistant_service/rest.rb +55 -0
  20. data/lib/google/cloud/ces/v1beta/assistant_service.rb +57 -0
  21. data/lib/google/cloud/ces/v1beta/assistant_service_pb.rb +49 -0
  22. data/lib/google/cloud/ces/v1beta/assistant_service_services_pb.rb +57 -0
  23. data/lib/google/cloud/ces/v1beta/auth_pb.rb +1 -1
  24. data/lib/google/cloud/ces/v1beta/bigquery_export_pb.rb +1 -1
  25. data/lib/google/cloud/ces/v1beta/changelog_pb.rb +1 -1
  26. data/lib/google/cloud/ces/v1beta/client_function_pb.rb +1 -1
  27. data/lib/google/cloud/ces/v1beta/common_pb.rb +4 -1
  28. data/lib/google/cloud/ces/v1beta/connector_tool_pb.rb +1 -1
  29. data/lib/google/cloud/ces/v1beta/connector_toolset_pb.rb +1 -1
  30. data/lib/google/cloud/ces/v1beta/conversation_pb.rb +1 -1
  31. data/lib/google/cloud/ces/v1beta/data_store_pb.rb +1 -1
  32. data/lib/google/cloud/ces/v1beta/data_store_tool_pb.rb +2 -1
  33. data/lib/google/cloud/ces/v1beta/deployment_pb.rb +3 -1
  34. data/lib/google/cloud/ces/v1beta/evaluation_metrics_config_pb.rb +1 -1
  35. data/lib/google/cloud/ces/v1beta/evaluation_pb.rb +2 -1
  36. data/lib/google/cloud/ces/v1beta/evaluation_service/client.rb +2 -2
  37. data/lib/google/cloud/ces/v1beta/evaluation_service/rest/client.rb +2 -2
  38. data/lib/google/cloud/ces/v1beta/evaluation_service_pb.rb +1 -1
  39. data/lib/google/cloud/ces/v1beta/example_pb.rb +1 -1
  40. data/lib/google/cloud/ces/v1beta/fakes_pb.rb +1 -1
  41. data/lib/google/cloud/ces/v1beta/file_context_pb.rb +1 -1
  42. data/lib/google/cloud/ces/v1beta/file_search_tool_pb.rb +1 -1
  43. data/lib/google/cloud/ces/v1beta/google_search_tool_pb.rb +1 -1
  44. data/lib/google/cloud/ces/v1beta/guardrail_pb.rb +4 -1
  45. data/lib/google/cloud/ces/v1beta/mcp_tool_pb.rb +1 -1
  46. data/lib/google/cloud/ces/v1beta/mcp_toolset_pb.rb +1 -1
  47. data/lib/google/cloud/ces/v1beta/mocks_pb.rb +1 -1
  48. data/lib/google/cloud/ces/v1beta/omnichannel_pb.rb +1 -1
  49. data/lib/google/cloud/ces/v1beta/omnichannel_service_pb.rb +1 -1
  50. data/lib/google/cloud/ces/v1beta/open_api_tool_pb.rb +1 -1
  51. data/lib/google/cloud/ces/v1beta/open_api_toolset_pb.rb +1 -1
  52. data/lib/google/cloud/ces/v1beta/python_function_pb.rb +1 -1
  53. data/lib/google/cloud/ces/v1beta/rest.rb +1 -0
  54. data/lib/google/cloud/ces/v1beta/schema_pb.rb +1 -1
  55. data/lib/google/cloud/ces/v1beta/security_settings_pb.rb +1 -1
  56. data/lib/google/cloud/ces/v1beta/session_service/client.rb +333 -0
  57. data/lib/google/cloud/ces/v1beta/session_service/paths.rb +40 -0
  58. data/lib/google/cloud/ces/v1beta/session_service/rest/client.rb +314 -0
  59. data/lib/google/cloud/ces/v1beta/session_service/rest/service_stub.rb +180 -0
  60. data/lib/google/cloud/ces/v1beta/session_service_pb.rb +33 -1
  61. data/lib/google/cloud/ces/v1beta/session_service_services_pb.rb +14 -0
  62. data/lib/google/cloud/ces/v1beta/system_tool_pb.rb +1 -1
  63. data/lib/google/cloud/ces/v1beta/tool_pb.rb +1 -1
  64. data/lib/google/cloud/ces/v1beta/tool_service_pb.rb +1 -1
  65. data/lib/google/cloud/ces/v1beta/toolset_pb.rb +1 -1
  66. data/lib/google/cloud/ces/v1beta/toolset_tool_pb.rb +1 -1
  67. data/lib/google/cloud/ces/v1beta/version.rb +1 -1
  68. data/lib/google/cloud/ces/v1beta/widget_service_pb.rb +1 -1
  69. data/lib/google/cloud/ces/v1beta/widget_tool_pb.rb +1 -1
  70. data/lib/google/cloud/ces/v1beta.rb +1 -0
  71. data/proto_docs/google/api/field_info.rb +88 -0
  72. data/proto_docs/google/cloud/ces/v1beta/agent.rb +18 -2
  73. data/proto_docs/google/cloud/ces/v1beta/agent_card.rb +91 -0
  74. data/proto_docs/google/cloud/ces/v1beta/agent_service.rb +40 -0
  75. data/proto_docs/google/cloud/ces/v1beta/app.rb +113 -4
  76. data/proto_docs/google/cloud/ces/v1beta/app_version.rb +3 -0
  77. data/proto_docs/google/cloud/ces/v1beta/assistant_service.rb +452 -0
  78. data/proto_docs/google/cloud/ces/v1beta/common.rb +44 -0
  79. data/proto_docs/google/cloud/ces/v1beta/conversation.rb +4 -0
  80. data/proto_docs/google/cloud/ces/v1beta/data_store_tool.rb +16 -0
  81. data/proto_docs/google/cloud/ces/v1beta/deployment.rb +43 -2
  82. data/proto_docs/google/cloud/ces/v1beta/evaluation.rb +21 -5
  83. data/proto_docs/google/cloud/ces/v1beta/example.rb +23 -0
  84. data/proto_docs/google/cloud/ces/v1beta/guardrail.rb +88 -6
  85. data/proto_docs/google/cloud/ces/v1beta/session_service.rb +749 -11
  86. data/proto_docs/google/cloud/ces/v1beta/tool.rb +4 -0
  87. data/proto_docs/google/protobuf/timestamp.rb +7 -6
  88. metadata +14 -3
@@ -0,0 +1,946 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/ces/v1beta/assistant_service_pb"
21
+ require "google/cloud/ces/v1beta/assistant_service/rest/service_stub"
22
+ require "google/cloud/location/rest"
23
+
24
+ module Google
25
+ module Cloud
26
+ module Ces
27
+ module V1beta
28
+ module AssistantService
29
+ module Rest
30
+ ##
31
+ # REST client for the AssistantService service.
32
+ #
33
+ # The service that manages assistant-related resources in Customer Engagement
34
+ # Suite (CES). The assistant, Arc, is a conversational agent embedded in CES
35
+ # applications to help users with building their agents.
36
+ #
37
+ class Client
38
+ # @private
39
+ API_VERSION = ""
40
+
41
+ # @private
42
+ DEFAULT_ENDPOINT_TEMPLATE = "ces.$UNIVERSE_DOMAIN$"
43
+
44
+ include Paths
45
+
46
+ # @private
47
+ attr_reader :assistant_service_stub
48
+
49
+ ##
50
+ # Configure the AssistantService Client class.
51
+ #
52
+ # See {::Google::Cloud::Ces::V1beta::AssistantService::Rest::Client::Configuration}
53
+ # for a description of the configuration fields.
54
+ #
55
+ # @example
56
+ #
57
+ # # Modify the configuration for all AssistantService clients
58
+ # ::Google::Cloud::Ces::V1beta::AssistantService::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", "Ces", "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: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
81
+ }
82
+
83
+ default_config.rpcs.chat_ai_assistant.timeout = 300.0
84
+ default_config.rpcs.chat_ai_assistant.retry_policy = {
85
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
86
+ }
87
+
88
+ default_config
89
+ end
90
+ yield @configure if block_given?
91
+ @configure
92
+ end
93
+
94
+ ##
95
+ # Configure the AssistantService Client instance.
96
+ #
97
+ # The configuration is set to the derived mode, meaning that values can be changed,
98
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
99
+ # should be made on {Client.configure}.
100
+ #
101
+ # See {::Google::Cloud::Ces::V1beta::AssistantService::Rest::Client::Configuration}
102
+ # for a description of the configuration fields.
103
+ #
104
+ # @yield [config] Configure the Client client.
105
+ # @yieldparam config [Client::Configuration]
106
+ #
107
+ # @return [Client::Configuration]
108
+ #
109
+ def configure
110
+ yield @config if block_given?
111
+ @config
112
+ end
113
+
114
+ ##
115
+ # The effective universe domain
116
+ #
117
+ # @return [String]
118
+ #
119
+ def universe_domain
120
+ @assistant_service_stub.universe_domain
121
+ end
122
+
123
+ ##
124
+ # Create a new AssistantService REST client object.
125
+ #
126
+ # @example
127
+ #
128
+ # # Create a client using the default configuration
129
+ # client = ::Google::Cloud::Ces::V1beta::AssistantService::Rest::Client.new
130
+ #
131
+ # # Create a client using a custom configuration
132
+ # client = ::Google::Cloud::Ces::V1beta::AssistantService::Rest::Client.new do |config|
133
+ # config.timeout = 10.0
134
+ # end
135
+ #
136
+ # @yield [config] Configure the AssistantService client.
137
+ # @yieldparam config [Client::Configuration]
138
+ #
139
+ def initialize
140
+ # Create the configuration object
141
+ @config = Configuration.new Client.configure
142
+
143
+ # Yield the configuration if needed
144
+ yield @config if block_given?
145
+
146
+ # Create credentials
147
+ credentials = @config.credentials
148
+ # Use self-signed JWT if the endpoint is unchanged from default,
149
+ # but only if the default endpoint does not have a region prefix.
150
+ enable_self_signed_jwt = @config.endpoint.nil? ||
151
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
152
+ !@config.endpoint.split(".").first.include?("-"))
153
+ credentials ||= Credentials.default scope: @config.scope,
154
+ enable_self_signed_jwt: enable_self_signed_jwt
155
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
156
+ credentials = Credentials.new credentials, scope: @config.scope
157
+ end
158
+
159
+ @quota_project_id = @config.quota_project
160
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
161
+
162
+ @assistant_service_stub = ::Google::Cloud::Ces::V1beta::AssistantService::Rest::ServiceStub.new(
163
+ endpoint: @config.endpoint,
164
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
165
+ universe_domain: @config.universe_domain,
166
+ credentials: credentials,
167
+ logger: @config.logger
168
+ )
169
+
170
+ @assistant_service_stub.logger(stub: true)&.info do |entry|
171
+ entry.set_system_name
172
+ entry.set_service
173
+ entry.message = "Created client for #{entry.service}"
174
+ entry.set_credentials_fields credentials
175
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
176
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
177
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
178
+ end
179
+
180
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
181
+ config.credentials = credentials
182
+ config.quota_project = @quota_project_id
183
+ config.endpoint = @assistant_service_stub.endpoint
184
+ config.universe_domain = @assistant_service_stub.universe_domain
185
+ config.bindings_override = @config.bindings_override
186
+ config.logger = @assistant_service_stub.logger if config.respond_to? :logger=
187
+ end
188
+ end
189
+
190
+ ##
191
+ # Get the associated client for mix-in of the Locations.
192
+ #
193
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
194
+ #
195
+ attr_reader :location_client
196
+
197
+ ##
198
+ # The logger used for request/response debug logging.
199
+ #
200
+ # @return [Logger]
201
+ #
202
+ def logger
203
+ @assistant_service_stub.logger
204
+ end
205
+
206
+ # Service calls
207
+
208
+ ##
209
+ # Lists all assistant sessions in the given app.
210
+ #
211
+ # @overload list_assistant_sessions(request, options = nil)
212
+ # Pass arguments to `list_assistant_sessions` via a request object, either of type
213
+ # {::Google::Cloud::Ces::V1beta::ListAssistantSessionsRequest} or an equivalent Hash.
214
+ #
215
+ # @param request [::Google::Cloud::Ces::V1beta::ListAssistantSessionsRequest, ::Hash]
216
+ # A request object representing the call parameters. Required. To specify no
217
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
218
+ # @param options [::Gapic::CallOptions, ::Hash]
219
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
220
+ #
221
+ # @overload list_assistant_sessions(parent: nil, page_size: nil, page_token: nil, filter: nil)
222
+ # Pass arguments to `list_assistant_sessions` via keyword arguments. Note that at
223
+ # least one keyword argument is required. To specify no parameters, or to keep all
224
+ # the default parameter values, pass an empty Hash as a request object (see above).
225
+ #
226
+ # @param parent [::String]
227
+ # Required. The app to list assistant sessions from.
228
+ # Format:
229
+ # `projects/{project}/locations/{location}/apps/{app}`
230
+ # @param page_size [::Integer]
231
+ # Optional. Requested page size. Server may return fewer items than
232
+ # requested. If unspecified, server will pick an appropriate default.
233
+ # @param page_token [::String]
234
+ # Optional. The
235
+ # {::Google::Cloud::Ces::V1beta::ListAssistantSessionsResponse#next_page_token next_page_token}
236
+ # value returned from a previous list
237
+ # {::Google::Cloud::Ces::V1beta::AssistantService::Rest::Client#list_assistant_sessions AssistantService.ListAssistantSessions}
238
+ # call.
239
+ # @param filter [::String]
240
+ # Optional. Filter to be applied when listing the assistant sessions.
241
+ # See https://google.aip.dev/160 for more details.
242
+ # @yield [result, operation] Access the result along with the TransportOperation object
243
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::AssistantSession>]
244
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
245
+ #
246
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::AssistantSession>]
247
+ #
248
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
249
+ #
250
+ # @example Basic example
251
+ # require "google/cloud/ces/v1beta"
252
+ #
253
+ # # Create a client object. The client can be reused for multiple calls.
254
+ # client = Google::Cloud::Ces::V1beta::AssistantService::Rest::Client.new
255
+ #
256
+ # # Create a request. To set request fields, pass in keyword arguments.
257
+ # request = Google::Cloud::Ces::V1beta::ListAssistantSessionsRequest.new
258
+ #
259
+ # # Call the list_assistant_sessions method.
260
+ # result = client.list_assistant_sessions request
261
+ #
262
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
263
+ # # over elements, and API calls will be issued to fetch pages as needed.
264
+ # result.each do |item|
265
+ # # Each element is of type ::Google::Cloud::Ces::V1beta::AssistantSession.
266
+ # p item
267
+ # end
268
+ #
269
+ def list_assistant_sessions request, options = nil
270
+ raise ::ArgumentError, "request must be provided" if request.nil?
271
+
272
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListAssistantSessionsRequest
273
+
274
+ # Converts hash and nil to an options object
275
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
276
+
277
+ # Customize the options with defaults
278
+ call_metadata = @config.rpcs.list_assistant_sessions.metadata.to_h
279
+
280
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
281
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
282
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
283
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
284
+ transports_version_send: [:rest]
285
+
286
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
287
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
288
+
289
+ options.apply_defaults timeout: @config.rpcs.list_assistant_sessions.timeout,
290
+ metadata: call_metadata,
291
+ retry_policy: @config.rpcs.list_assistant_sessions.retry_policy
292
+
293
+ options.apply_defaults timeout: @config.timeout,
294
+ metadata: @config.metadata,
295
+ retry_policy: @config.retry_policy
296
+
297
+ @assistant_service_stub.list_assistant_sessions request, options do |result, operation|
298
+ result = ::Gapic::Rest::PagedEnumerable.new @assistant_service_stub, :list_assistant_sessions, "assistant_sessions", request, result, options
299
+ yield result, operation if block_given?
300
+ throw :response, result
301
+ end
302
+ rescue ::Gapic::Rest::Error => e
303
+ raise ::Google::Cloud::Error.from_error(e)
304
+ end
305
+
306
+ ##
307
+ # Gets details of the specified assistant session.
308
+ #
309
+ # @overload get_assistant_session(request, options = nil)
310
+ # Pass arguments to `get_assistant_session` via a request object, either of type
311
+ # {::Google::Cloud::Ces::V1beta::GetAssistantSessionRequest} or an equivalent Hash.
312
+ #
313
+ # @param request [::Google::Cloud::Ces::V1beta::GetAssistantSessionRequest, ::Hash]
314
+ # A request object representing the call parameters. Required. To specify no
315
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
316
+ # @param options [::Gapic::CallOptions, ::Hash]
317
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
318
+ #
319
+ # @overload get_assistant_session(name: nil)
320
+ # Pass arguments to `get_assistant_session` via keyword arguments. Note that at
321
+ # least one keyword argument is required. To specify no parameters, or to keep all
322
+ # the default parameter values, pass an empty Hash as a request object (see above).
323
+ #
324
+ # @param name [::String]
325
+ # Required. The name of the assistant session to retrieve.
326
+ # Format:
327
+ # `projects/{project}/locations/{location}/apps/{app}/assistantSessions/{assistant_session}`
328
+ # @yield [result, operation] Access the result along with the TransportOperation object
329
+ # @yieldparam result [::Google::Cloud::Ces::V1beta::AssistantSession]
330
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
331
+ #
332
+ # @return [::Google::Cloud::Ces::V1beta::AssistantSession]
333
+ #
334
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
335
+ #
336
+ # @example Basic example
337
+ # require "google/cloud/ces/v1beta"
338
+ #
339
+ # # Create a client object. The client can be reused for multiple calls.
340
+ # client = Google::Cloud::Ces::V1beta::AssistantService::Rest::Client.new
341
+ #
342
+ # # Create a request. To set request fields, pass in keyword arguments.
343
+ # request = Google::Cloud::Ces::V1beta::GetAssistantSessionRequest.new
344
+ #
345
+ # # Call the get_assistant_session method.
346
+ # result = client.get_assistant_session request
347
+ #
348
+ # # The returned object is of type Google::Cloud::Ces::V1beta::AssistantSession.
349
+ # p result
350
+ #
351
+ def get_assistant_session request, options = nil
352
+ raise ::ArgumentError, "request must be provided" if request.nil?
353
+
354
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetAssistantSessionRequest
355
+
356
+ # Converts hash and nil to an options object
357
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
358
+
359
+ # Customize the options with defaults
360
+ call_metadata = @config.rpcs.get_assistant_session.metadata.to_h
361
+
362
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
363
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
364
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
365
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
366
+ transports_version_send: [:rest]
367
+
368
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
369
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
370
+
371
+ options.apply_defaults timeout: @config.rpcs.get_assistant_session.timeout,
372
+ metadata: call_metadata,
373
+ retry_policy: @config.rpcs.get_assistant_session.retry_policy
374
+
375
+ options.apply_defaults timeout: @config.timeout,
376
+ metadata: @config.metadata,
377
+ retry_policy: @config.retry_policy
378
+
379
+ @assistant_service_stub.get_assistant_session request, options do |result, operation|
380
+ yield result, operation if block_given?
381
+ end
382
+ rescue ::Gapic::Rest::Error => e
383
+ raise ::Google::Cloud::Error.from_error(e)
384
+ end
385
+
386
+ ##
387
+ # Creates a new assistant session in the given app.
388
+ #
389
+ # @overload create_assistant_session(request, options = nil)
390
+ # Pass arguments to `create_assistant_session` via a request object, either of type
391
+ # {::Google::Cloud::Ces::V1beta::CreateAssistantSessionRequest} or an equivalent Hash.
392
+ #
393
+ # @param request [::Google::Cloud::Ces::V1beta::CreateAssistantSessionRequest, ::Hash]
394
+ # A request object representing the call parameters. Required. To specify no
395
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
396
+ # @param options [::Gapic::CallOptions, ::Hash]
397
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
398
+ #
399
+ # @overload create_assistant_session(parent: nil, assistant_session_id: nil, assistant_session_messages: nil)
400
+ # Pass arguments to `create_assistant_session` via keyword arguments. Note that at
401
+ # least one keyword argument is required. To specify no parameters, or to keep all
402
+ # the default parameter values, pass an empty Hash as a request object (see above).
403
+ #
404
+ # @param parent [::String]
405
+ # Required. The app to create the assistant session in
406
+ # Format:
407
+ # `projects/{project}/locations/{location}/apps/{app}`
408
+ # @param assistant_session_id [::String]
409
+ # Optional. The ID to use for the assistant session, which will become the
410
+ # final component of the assistant session's resource name. If not provided,
411
+ # a unique ID will be automatically assigned for the assistant session.
412
+ # @param assistant_session_messages [::Array<::Google::Cloud::Ces::V1beta::AssistantMessage, ::Hash>]
413
+ # Optional. The messages to seed the assistant session with.
414
+ # @yield [result, operation] Access the result along with the TransportOperation object
415
+ # @yieldparam result [::Google::Cloud::Ces::V1beta::AssistantSession]
416
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
417
+ #
418
+ # @return [::Google::Cloud::Ces::V1beta::AssistantSession]
419
+ #
420
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
421
+ #
422
+ # @example Basic example
423
+ # require "google/cloud/ces/v1beta"
424
+ #
425
+ # # Create a client object. The client can be reused for multiple calls.
426
+ # client = Google::Cloud::Ces::V1beta::AssistantService::Rest::Client.new
427
+ #
428
+ # # Create a request. To set request fields, pass in keyword arguments.
429
+ # request = Google::Cloud::Ces::V1beta::CreateAssistantSessionRequest.new
430
+ #
431
+ # # Call the create_assistant_session method.
432
+ # result = client.create_assistant_session request
433
+ #
434
+ # # The returned object is of type Google::Cloud::Ces::V1beta::AssistantSession.
435
+ # p result
436
+ #
437
+ def create_assistant_session request, options = nil
438
+ raise ::ArgumentError, "request must be provided" if request.nil?
439
+
440
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateAssistantSessionRequest
441
+
442
+ # Converts hash and nil to an options object
443
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
444
+
445
+ # Customize the options with defaults
446
+ call_metadata = @config.rpcs.create_assistant_session.metadata.to_h
447
+
448
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
449
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
450
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
451
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
452
+ transports_version_send: [:rest]
453
+
454
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
455
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
456
+
457
+ options.apply_defaults timeout: @config.rpcs.create_assistant_session.timeout,
458
+ metadata: call_metadata,
459
+ retry_policy: @config.rpcs.create_assistant_session.retry_policy
460
+
461
+ options.apply_defaults timeout: @config.timeout,
462
+ metadata: @config.metadata,
463
+ retry_policy: @config.retry_policy
464
+
465
+ @assistant_service_stub.create_assistant_session request, options do |result, operation|
466
+ yield result, operation if block_given?
467
+ end
468
+ rescue ::Gapic::Rest::Error => e
469
+ raise ::Google::Cloud::Error.from_error(e)
470
+ end
471
+
472
+ ##
473
+ # Deletes the specified assistant session.
474
+ #
475
+ # @overload delete_assistant_session(request, options = nil)
476
+ # Pass arguments to `delete_assistant_session` via a request object, either of type
477
+ # {::Google::Cloud::Ces::V1beta::DeleteAssistantSessionRequest} or an equivalent Hash.
478
+ #
479
+ # @param request [::Google::Cloud::Ces::V1beta::DeleteAssistantSessionRequest, ::Hash]
480
+ # A request object representing the call parameters. Required. To specify no
481
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
482
+ # @param options [::Gapic::CallOptions, ::Hash]
483
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
484
+ #
485
+ # @overload delete_assistant_session(name: nil)
486
+ # Pass arguments to `delete_assistant_session` via keyword arguments. Note that at
487
+ # least one keyword argument is required. To specify no parameters, or to keep all
488
+ # the default parameter values, pass an empty Hash as a request object (see above).
489
+ #
490
+ # @param name [::String]
491
+ # Required. The name of the assistant session to delete.
492
+ # Format:
493
+ # `projects/{project}/locations/{location}/apps/{app}/assistantSessions/{assistant_session}`
494
+ # @yield [result, operation] Access the result along with the TransportOperation object
495
+ # @yieldparam result [::Google::Protobuf::Empty]
496
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
497
+ #
498
+ # @return [::Google::Protobuf::Empty]
499
+ #
500
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
501
+ #
502
+ # @example Basic example
503
+ # require "google/cloud/ces/v1beta"
504
+ #
505
+ # # Create a client object. The client can be reused for multiple calls.
506
+ # client = Google::Cloud::Ces::V1beta::AssistantService::Rest::Client.new
507
+ #
508
+ # # Create a request. To set request fields, pass in keyword arguments.
509
+ # request = Google::Cloud::Ces::V1beta::DeleteAssistantSessionRequest.new
510
+ #
511
+ # # Call the delete_assistant_session method.
512
+ # result = client.delete_assistant_session request
513
+ #
514
+ # # The returned object is of type Google::Protobuf::Empty.
515
+ # p result
516
+ #
517
+ def delete_assistant_session request, options = nil
518
+ raise ::ArgumentError, "request must be provided" if request.nil?
519
+
520
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteAssistantSessionRequest
521
+
522
+ # Converts hash and nil to an options object
523
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
524
+
525
+ # Customize the options with defaults
526
+ call_metadata = @config.rpcs.delete_assistant_session.metadata.to_h
527
+
528
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
529
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
530
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
531
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
532
+ transports_version_send: [:rest]
533
+
534
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
535
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
536
+
537
+ options.apply_defaults timeout: @config.rpcs.delete_assistant_session.timeout,
538
+ metadata: call_metadata,
539
+ retry_policy: @config.rpcs.delete_assistant_session.retry_policy
540
+
541
+ options.apply_defaults timeout: @config.timeout,
542
+ metadata: @config.metadata,
543
+ retry_policy: @config.retry_policy
544
+
545
+ @assistant_service_stub.delete_assistant_session request, options do |result, operation|
546
+ yield result, operation if block_given?
547
+ end
548
+ rescue ::Gapic::Rest::Error => e
549
+ raise ::Google::Cloud::Error.from_error(e)
550
+ end
551
+
552
+ ##
553
+ # Runs the assistant agent for the specified assistant session.
554
+ #
555
+ # @overload run_assistant(request, options = nil)
556
+ # Pass arguments to `run_assistant` via a request object, either of type
557
+ # {::Google::Cloud::Ces::V1beta::RunAssistantRequest} or an equivalent Hash.
558
+ #
559
+ # @param request [::Google::Cloud::Ces::V1beta::RunAssistantRequest, ::Hash]
560
+ # A request object representing the call parameters. Required. To specify no
561
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
562
+ # @param options [::Gapic::CallOptions, ::Hash]
563
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
564
+ #
565
+ # @overload run_assistant(app: nil, assistant_session: nil, message: nil, interaction_type: nil)
566
+ # Pass arguments to `run_assistant` via keyword arguments. Note that at
567
+ # least one keyword argument is required. To specify no parameters, or to keep all
568
+ # the default parameter values, pass an empty Hash as a request object (see above).
569
+ #
570
+ # @param app [::String]
571
+ # Required. The app to run assistant for.
572
+ # Format:
573
+ # `projects/{project}/locations/{location}/apps/{app}`
574
+ # @param assistant_session [::String]
575
+ # Required. The assistant session to be used to run the assistant.
576
+ # Format:
577
+ # `projects/{project}/locations/{location}/apps/{app}/assistantSessions/{assistant_session}`
578
+ # @param message [::Google::Cloud::Ces::V1beta::AssistantMessage, ::Hash]
579
+ # Required. The message to send to the assistant agent.
580
+ # @param interaction_type [::Google::Cloud::Ces::V1beta::RunAssistantRequest::InteractionType]
581
+ # Optional. Different interaction types for the assistant message.
582
+ # @yield [result, operation] Access the result along with the TransportOperation object
583
+ # @yieldparam result [::Google::Cloud::Ces::V1beta::RunAssistantResponse]
584
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
585
+ #
586
+ # @return [::Google::Cloud::Ces::V1beta::RunAssistantResponse]
587
+ #
588
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
589
+ #
590
+ # @example Basic example
591
+ # require "google/cloud/ces/v1beta"
592
+ #
593
+ # # Create a client object. The client can be reused for multiple calls.
594
+ # client = Google::Cloud::Ces::V1beta::AssistantService::Rest::Client.new
595
+ #
596
+ # # Create a request. To set request fields, pass in keyword arguments.
597
+ # request = Google::Cloud::Ces::V1beta::RunAssistantRequest.new
598
+ #
599
+ # # Call the run_assistant method.
600
+ # result = client.run_assistant request
601
+ #
602
+ # # The returned object is of type Google::Cloud::Ces::V1beta::RunAssistantResponse.
603
+ # p result
604
+ #
605
+ def run_assistant request, options = nil
606
+ raise ::ArgumentError, "request must be provided" if request.nil?
607
+
608
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RunAssistantRequest
609
+
610
+ # Converts hash and nil to an options object
611
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
612
+
613
+ # Customize the options with defaults
614
+ call_metadata = @config.rpcs.run_assistant.metadata.to_h
615
+
616
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
617
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
618
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
619
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
620
+ transports_version_send: [:rest]
621
+
622
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
623
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
624
+
625
+ options.apply_defaults timeout: @config.rpcs.run_assistant.timeout,
626
+ metadata: call_metadata,
627
+ retry_policy: @config.rpcs.run_assistant.retry_policy
628
+
629
+ options.apply_defaults timeout: @config.timeout,
630
+ metadata: @config.metadata,
631
+ retry_policy: @config.retry_policy
632
+
633
+ @assistant_service_stub.run_assistant request, options do |result, operation|
634
+ yield result, operation if block_given?
635
+ end
636
+ rescue ::Gapic::Rest::Error => e
637
+ raise ::Google::Cloud::Error.from_error(e)
638
+ end
639
+
640
+ ##
641
+ # Runs Arc, the AI assistant, for the specified assistant session.
642
+ #
643
+ # @overload chat_ai_assistant(request, options = nil)
644
+ # Pass arguments to `chat_ai_assistant` via a request object, either of type
645
+ # {::Google::Cloud::Ces::V1beta::ChatAiAssistantRequest} or an equivalent Hash.
646
+ #
647
+ # @param request [::Google::Cloud::Ces::V1beta::ChatAiAssistantRequest, ::Hash]
648
+ # A request object representing the call parameters. Required. To specify no
649
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
650
+ # @param options [::Gapic::CallOptions, ::Hash]
651
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
652
+ #
653
+ # @overload chat_ai_assistant(app: nil, assistant_session: nil, message: nil, attached_gcs_uris: nil, context_token: nil)
654
+ # Pass arguments to `chat_ai_assistant` via keyword arguments. Note that at
655
+ # least one keyword argument is required. To specify no parameters, or to keep all
656
+ # the default parameter values, pass an empty Hash as a request object (see above).
657
+ #
658
+ # @param app [::String]
659
+ # Required. The app to run assistant for.
660
+ # Format:
661
+ # `projects/{project}/locations/{location}/apps/{app}`
662
+ # @param assistant_session [::String]
663
+ # Required. The assistant session to be used to run the assistant.
664
+ # Format:
665
+ # `projects/{project}/locations/{location}/apps/{app}/assistantSessions/{assistant_session}`
666
+ # @param message [::String]
667
+ # Required. The message to send to the assistant agent.
668
+ # @param attached_gcs_uris [::Array<::String>]
669
+ # Optional. Cloud Storage URIs for files uploaded by the user during this
670
+ # turn. Example: "gs://cxas-transient-uploads/uuid/prd.pdf"
671
+ # @param context_token [::String]
672
+ # Optional. Opaque onboarding context token returned by
673
+ # {::Google::Cloud::Ces::V1beta::SessionService::Rest::Client#generate_onboarding_suggestions SessionService.GenerateOnboardingSuggestions}.
674
+ # When set and still fresh, the server reuses the onboarding snapshot
675
+ # computed for the zero state instead of recomputing it for the first
676
+ # conversation turn.
677
+ # @yield [result, operation] Access the result along with the TransportOperation object
678
+ # @yieldparam result [::Google::Cloud::Ces::V1beta::ChatAiAssistantResponse]
679
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
680
+ #
681
+ # @return [::Google::Cloud::Ces::V1beta::ChatAiAssistantResponse]
682
+ #
683
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
684
+ #
685
+ # @example Basic example
686
+ # require "google/cloud/ces/v1beta"
687
+ #
688
+ # # Create a client object. The client can be reused for multiple calls.
689
+ # client = Google::Cloud::Ces::V1beta::AssistantService::Rest::Client.new
690
+ #
691
+ # # Create a request. To set request fields, pass in keyword arguments.
692
+ # request = Google::Cloud::Ces::V1beta::ChatAiAssistantRequest.new
693
+ #
694
+ # # Call the chat_ai_assistant method.
695
+ # result = client.chat_ai_assistant request
696
+ #
697
+ # # The returned object is of type Google::Cloud::Ces::V1beta::ChatAiAssistantResponse.
698
+ # p result
699
+ #
700
+ def chat_ai_assistant request, options = nil
701
+ raise ::ArgumentError, "request must be provided" if request.nil?
702
+
703
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ChatAiAssistantRequest
704
+
705
+ # Converts hash and nil to an options object
706
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
707
+
708
+ # Customize the options with defaults
709
+ call_metadata = @config.rpcs.chat_ai_assistant.metadata.to_h
710
+
711
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
712
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
713
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
714
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
715
+ transports_version_send: [:rest]
716
+
717
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
718
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
719
+
720
+ options.apply_defaults timeout: @config.rpcs.chat_ai_assistant.timeout,
721
+ metadata: call_metadata,
722
+ retry_policy: @config.rpcs.chat_ai_assistant.retry_policy
723
+
724
+ options.apply_defaults timeout: @config.timeout,
725
+ metadata: @config.metadata,
726
+ retry_policy: @config.retry_policy
727
+
728
+ @assistant_service_stub.chat_ai_assistant request, options do |result, operation|
729
+ yield result, operation if block_given?
730
+ end
731
+ rescue ::Gapic::Rest::Error => e
732
+ raise ::Google::Cloud::Error.from_error(e)
733
+ end
734
+
735
+ ##
736
+ # Configuration class for the AssistantService REST API.
737
+ #
738
+ # This class represents the configuration for AssistantService REST,
739
+ # providing control over timeouts, retry behavior, logging, transport
740
+ # parameters, and other low-level controls. Certain parameters can also be
741
+ # applied individually to specific RPCs. See
742
+ # {::Google::Cloud::Ces::V1beta::AssistantService::Rest::Client::Configuration::Rpcs}
743
+ # for a list of RPCs that can be configured independently.
744
+ #
745
+ # Configuration can be applied globally to all clients, or to a single client
746
+ # on construction.
747
+ #
748
+ # @example
749
+ #
750
+ # # Modify the global config, setting the timeout for
751
+ # # list_assistant_sessions to 20 seconds,
752
+ # # and all remaining timeouts to 10 seconds.
753
+ # ::Google::Cloud::Ces::V1beta::AssistantService::Rest::Client.configure do |config|
754
+ # config.timeout = 10.0
755
+ # config.rpcs.list_assistant_sessions.timeout = 20.0
756
+ # end
757
+ #
758
+ # # Apply the above configuration only to a new client.
759
+ # client = ::Google::Cloud::Ces::V1beta::AssistantService::Rest::Client.new do |config|
760
+ # config.timeout = 10.0
761
+ # config.rpcs.list_assistant_sessions.timeout = 20.0
762
+ # end
763
+ #
764
+ # @!attribute [rw] endpoint
765
+ # A custom service endpoint, as a hostname or hostname:port. The default is
766
+ # nil, indicating to use the default endpoint in the current universe domain.
767
+ # @return [::String,nil]
768
+ # @!attribute [rw] credentials
769
+ # Credentials to send with calls. You may provide any of the following types:
770
+ # * (`String`) The path to a service account key file in JSON format
771
+ # * (`Hash`) A service account key as a Hash
772
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
773
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
774
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
775
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
776
+ # * (`nil`) indicating no credentials
777
+ #
778
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
779
+ # external source for authentication to Google Cloud, you must validate it before
780
+ # providing it to a Google API client library. Providing an unvalidated credential
781
+ # configuration to Google APIs can compromise the security of your systems and data.
782
+ # For more information, refer to [Validate credential configurations from external
783
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
784
+ # @return [::Object]
785
+ # @!attribute [rw] scope
786
+ # The OAuth scopes
787
+ # @return [::Array<::String>]
788
+ # @!attribute [rw] lib_name
789
+ # The library name as recorded in instrumentation and logging
790
+ # @return [::String]
791
+ # @!attribute [rw] lib_version
792
+ # The library version as recorded in instrumentation and logging
793
+ # @return [::String]
794
+ # @!attribute [rw] timeout
795
+ # The call timeout in seconds.
796
+ # @return [::Numeric]
797
+ # @!attribute [rw] metadata
798
+ # Additional headers to be sent with the call.
799
+ # @return [::Hash{::Symbol=>::String}]
800
+ # @!attribute [rw] retry_policy
801
+ # The retry policy. The value is a hash with the following keys:
802
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
803
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
804
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
805
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
806
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
807
+ # trigger a retry.
808
+ # @return [::Hash]
809
+ # @!attribute [rw] quota_project
810
+ # A separate project against which to charge quota.
811
+ # @return [::String]
812
+ # @!attribute [rw] universe_domain
813
+ # The universe domain within which to make requests. This determines the
814
+ # default endpoint URL. The default value of nil uses the environment
815
+ # universe (usually the default "googleapis.com" universe).
816
+ # @return [::String,nil]
817
+ # @!attribute [rw] logger
818
+ # A custom logger to use for request/response debug logging, or the value
819
+ # `:default` (the default) to construct a default logger, or `nil` to
820
+ # explicitly disable logging.
821
+ # @return [::Logger,:default,nil]
822
+ #
823
+ class Configuration
824
+ extend ::Gapic::Config
825
+
826
+ # @private
827
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
828
+ DEFAULT_ENDPOINT = "ces.googleapis.com"
829
+
830
+ config_attr :endpoint, nil, ::String, nil
831
+ config_attr :credentials, nil do |value|
832
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
833
+ allowed.any? { |klass| klass === value }
834
+ end
835
+ config_attr :scope, nil, ::String, ::Array, nil
836
+ config_attr :lib_name, nil, ::String, nil
837
+ config_attr :lib_version, nil, ::String, nil
838
+ config_attr :timeout, nil, ::Numeric, nil
839
+ config_attr :metadata, nil, ::Hash, nil
840
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
841
+ config_attr :quota_project, nil, ::String, nil
842
+ config_attr :universe_domain, nil, ::String, nil
843
+
844
+ # @private
845
+ # Overrides for http bindings for the RPCs of this service
846
+ # are only used when this service is used as mixin, and only
847
+ # by the host service.
848
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
849
+ config_attr :bindings_override, {}, ::Hash, nil
850
+ config_attr :logger, :default, ::Logger, nil, :default
851
+
852
+ # @private
853
+ def initialize parent_config = nil
854
+ @parent_config = parent_config unless parent_config.nil?
855
+
856
+ yield self if block_given?
857
+ end
858
+
859
+ ##
860
+ # Configurations for individual RPCs
861
+ # @return [Rpcs]
862
+ #
863
+ def rpcs
864
+ @rpcs ||= begin
865
+ parent_rpcs = nil
866
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
867
+ Rpcs.new parent_rpcs
868
+ end
869
+ end
870
+
871
+ ##
872
+ # Configuration RPC class for the AssistantService API.
873
+ #
874
+ # Includes fields providing the configuration for each RPC in this service.
875
+ # Each configuration object is of type `Gapic::Config::Method` and includes
876
+ # the following configuration fields:
877
+ #
878
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
879
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
880
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
881
+ # include the following keys:
882
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
883
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
884
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
885
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
886
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
887
+ # trigger a retry.
888
+ #
889
+ class Rpcs
890
+ ##
891
+ # RPC-specific configuration for `list_assistant_sessions`
892
+ # @return [::Gapic::Config::Method]
893
+ #
894
+ attr_reader :list_assistant_sessions
895
+ ##
896
+ # RPC-specific configuration for `get_assistant_session`
897
+ # @return [::Gapic::Config::Method]
898
+ #
899
+ attr_reader :get_assistant_session
900
+ ##
901
+ # RPC-specific configuration for `create_assistant_session`
902
+ # @return [::Gapic::Config::Method]
903
+ #
904
+ attr_reader :create_assistant_session
905
+ ##
906
+ # RPC-specific configuration for `delete_assistant_session`
907
+ # @return [::Gapic::Config::Method]
908
+ #
909
+ attr_reader :delete_assistant_session
910
+ ##
911
+ # RPC-specific configuration for `run_assistant`
912
+ # @return [::Gapic::Config::Method]
913
+ #
914
+ attr_reader :run_assistant
915
+ ##
916
+ # RPC-specific configuration for `chat_ai_assistant`
917
+ # @return [::Gapic::Config::Method]
918
+ #
919
+ attr_reader :chat_ai_assistant
920
+
921
+ # @private
922
+ def initialize parent_rpcs = nil
923
+ list_assistant_sessions_config = parent_rpcs.list_assistant_sessions if parent_rpcs.respond_to? :list_assistant_sessions
924
+ @list_assistant_sessions = ::Gapic::Config::Method.new list_assistant_sessions_config
925
+ get_assistant_session_config = parent_rpcs.get_assistant_session if parent_rpcs.respond_to? :get_assistant_session
926
+ @get_assistant_session = ::Gapic::Config::Method.new get_assistant_session_config
927
+ create_assistant_session_config = parent_rpcs.create_assistant_session if parent_rpcs.respond_to? :create_assistant_session
928
+ @create_assistant_session = ::Gapic::Config::Method.new create_assistant_session_config
929
+ delete_assistant_session_config = parent_rpcs.delete_assistant_session if parent_rpcs.respond_to? :delete_assistant_session
930
+ @delete_assistant_session = ::Gapic::Config::Method.new delete_assistant_session_config
931
+ run_assistant_config = parent_rpcs.run_assistant if parent_rpcs.respond_to? :run_assistant
932
+ @run_assistant = ::Gapic::Config::Method.new run_assistant_config
933
+ chat_ai_assistant_config = parent_rpcs.chat_ai_assistant if parent_rpcs.respond_to? :chat_ai_assistant
934
+ @chat_ai_assistant = ::Gapic::Config::Method.new chat_ai_assistant_config
935
+
936
+ yield self if block_given?
937
+ end
938
+ end
939
+ end
940
+ end
941
+ end
942
+ end
943
+ end
944
+ end
945
+ end
946
+ end