google-cloud-dialogflow-v2 0.22.0 → 0.23.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/dialogflow/v2/agents/rest/client.rb +1078 -0
  4. data/lib/google/cloud/dialogflow/v2/agents/rest/operations.rb +813 -0
  5. data/lib/google/cloud/dialogflow/v2/agents/rest/service_stub.rb +652 -0
  6. data/lib/google/cloud/dialogflow/v2/agents/rest.rb +54 -0
  7. data/lib/google/cloud/dialogflow/v2/agents.rb +6 -0
  8. data/lib/google/cloud/dialogflow/v2/answer_records/rest/client.rb +463 -0
  9. data/lib/google/cloud/dialogflow/v2/answer_records/rest/service_stub.rb +182 -0
  10. data/lib/google/cloud/dialogflow/v2/answer_records/rest.rb +54 -0
  11. data/lib/google/cloud/dialogflow/v2/answer_records.rb +6 -0
  12. data/lib/google/cloud/dialogflow/v2/bindings_override.rb +102 -0
  13. data/lib/google/cloud/dialogflow/v2/contexts/rest/client.rb +753 -0
  14. data/lib/google/cloud/dialogflow/v2/contexts/rest/service_stub.rb +536 -0
  15. data/lib/google/cloud/dialogflow/v2/contexts/rest.rb +53 -0
  16. data/lib/google/cloud/dialogflow/v2/contexts.rb +6 -0
  17. data/lib/google/cloud/dialogflow/v2/conversation_datasets/rest/client.rb +714 -0
  18. data/lib/google/cloud/dialogflow/v2/conversation_datasets/rest/operations.rb +813 -0
  19. data/lib/google/cloud/dialogflow/v2/conversation_datasets/rest/service_stub.rb +367 -0
  20. data/lib/google/cloud/dialogflow/v2/conversation_datasets/rest.rb +57 -0
  21. data/lib/google/cloud/dialogflow/v2/conversation_datasets.rb +6 -0
  22. data/lib/google/cloud/dialogflow/v2/conversation_models/rest/client.rb +1010 -0
  23. data/lib/google/cloud/dialogflow/v2/conversation_models/rest/operations.rb +813 -0
  24. data/lib/google/cloud/dialogflow/v2/conversation_models/rest/service_stub.rb +642 -0
  25. data/lib/google/cloud/dialogflow/v2/conversation_models/rest.rb +54 -0
  26. data/lib/google/cloud/dialogflow/v2/conversation_models.rb +6 -0
  27. data/lib/google/cloud/dialogflow/v2/conversation_profiles/rest/client.rb +868 -0
  28. data/lib/google/cloud/dialogflow/v2/conversation_profiles/rest/operations.rb +813 -0
  29. data/lib/google/cloud/dialogflow/v2/conversation_profiles/rest/service_stub.rb +518 -0
  30. data/lib/google/cloud/dialogflow/v2/conversation_profiles/rest.rb +55 -0
  31. data/lib/google/cloud/dialogflow/v2/conversation_profiles.rb +6 -0
  32. data/lib/google/cloud/dialogflow/v2/conversations/rest/client.rb +819 -0
  33. data/lib/google/cloud/dialogflow/v2/conversations/rest/service_stub.rb +450 -0
  34. data/lib/google/cloud/dialogflow/v2/conversations/rest.rb +54 -0
  35. data/lib/google/cloud/dialogflow/v2/conversations.rb +6 -0
  36. data/lib/google/cloud/dialogflow/v2/documents/rest/client.rb +1013 -0
  37. data/lib/google/cloud/dialogflow/v2/documents/rest/operations.rb +813 -0
  38. data/lib/google/cloud/dialogflow/v2/documents/rest/service_stub.rb +631 -0
  39. data/lib/google/cloud/dialogflow/v2/documents/rest.rb +55 -0
  40. data/lib/google/cloud/dialogflow/v2/documents.rb +6 -0
  41. data/lib/google/cloud/dialogflow/v2/entity_types/rest/client.rb +1178 -0
  42. data/lib/google/cloud/dialogflow/v2/entity_types/rest/operations.rb +813 -0
  43. data/lib/google/cloud/dialogflow/v2/entity_types/rest/service_stub.rb +722 -0
  44. data/lib/google/cloud/dialogflow/v2/entity_types/rest.rb +54 -0
  45. data/lib/google/cloud/dialogflow/v2/entity_types.rb +6 -0
  46. data/lib/google/cloud/dialogflow/v2/environments/rest/client.rb +779 -0
  47. data/lib/google/cloud/dialogflow/v2/environments/rest/service_stub.rb +448 -0
  48. data/lib/google/cloud/dialogflow/v2/environments/rest.rb +53 -0
  49. data/lib/google/cloud/dialogflow/v2/environments.rb +6 -0
  50. data/lib/google/cloud/dialogflow/v2/fulfillments/rest/client.rb +444 -0
  51. data/lib/google/cloud/dialogflow/v2/fulfillments/rest/service_stub.rb +182 -0
  52. data/lib/google/cloud/dialogflow/v2/fulfillments/rest.rb +53 -0
  53. data/lib/google/cloud/dialogflow/v2/fulfillments.rb +6 -0
  54. data/lib/google/cloud/dialogflow/v2/intents/rest/client.rb +914 -0
  55. data/lib/google/cloud/dialogflow/v2/intents/rest/operations.rb +813 -0
  56. data/lib/google/cloud/dialogflow/v2/intents/rest/service_stub.rb +532 -0
  57. data/lib/google/cloud/dialogflow/v2/intents/rest.rb +54 -0
  58. data/lib/google/cloud/dialogflow/v2/intents.rb +6 -0
  59. data/lib/google/cloud/dialogflow/v2/knowledge_bases/rest/client.rb +696 -0
  60. data/lib/google/cloud/dialogflow/v2/knowledge_bases/rest/service_stub.rb +419 -0
  61. data/lib/google/cloud/dialogflow/v2/knowledge_bases/rest.rb +54 -0
  62. data/lib/google/cloud/dialogflow/v2/knowledge_bases.rb +6 -0
  63. data/lib/google/cloud/dialogflow/v2/participants/rest/client.rb +955 -0
  64. data/lib/google/cloud/dialogflow/v2/participants/rest/service_stub.rb +588 -0
  65. data/lib/google/cloud/dialogflow/v2/participants/rest.rb +53 -0
  66. data/lib/google/cloud/dialogflow/v2/participants.rb +6 -0
  67. data/lib/google/cloud/dialogflow/v2/rest.rb +54 -0
  68. data/lib/google/cloud/dialogflow/v2/session_entity_types/rest/client.rb +703 -0
  69. data/lib/google/cloud/dialogflow/v2/session_entity_types/rest/service_stub.rb +456 -0
  70. data/lib/google/cloud/dialogflow/v2/session_entity_types/rest.rb +54 -0
  71. data/lib/google/cloud/dialogflow/v2/session_entity_types.rb +6 -0
  72. data/lib/google/cloud/dialogflow/v2/sessions/rest/client.rb +437 -0
  73. data/lib/google/cloud/dialogflow/v2/sessions/rest/service_stub.rb +132 -0
  74. data/lib/google/cloud/dialogflow/v2/sessions/rest.rb +56 -0
  75. data/lib/google/cloud/dialogflow/v2/sessions.rb +6 -0
  76. data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
  77. data/lib/google/cloud/dialogflow/v2/versions/rest/client.rb +686 -0
  78. data/lib/google/cloud/dialogflow/v2/versions/rest/service_stub.rb +382 -0
  79. data/lib/google/cloud/dialogflow/v2/versions/rest.rb +53 -0
  80. data/lib/google/cloud/dialogflow/v2/versions.rb +6 -0
  81. data/lib/google/cloud/dialogflow/v2.rb +5 -0
  82. metadata +66 -5
@@ -0,0 +1,955 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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/dialogflow/v2/participant_pb"
21
+ require "google/cloud/dialogflow/v2/participants/rest/service_stub"
22
+ require "google/cloud/location/rest"
23
+
24
+ module Google
25
+ module Cloud
26
+ module Dialogflow
27
+ module V2
28
+ module Participants
29
+ module Rest
30
+ ##
31
+ # REST client for the Participants service.
32
+ #
33
+ # Service for managing {::Google::Cloud::Dialogflow::V2::Participant Participants}.
34
+ #
35
+ class Client
36
+ include Paths
37
+
38
+ # @private
39
+ attr_reader :participants_stub
40
+
41
+ ##
42
+ # Configure the Participants Client class.
43
+ #
44
+ # See {::Google::Cloud::Dialogflow::V2::Participants::Rest::Client::Configuration}
45
+ # for a description of the configuration fields.
46
+ #
47
+ # @example
48
+ #
49
+ # # Modify the configuration for all Participants clients
50
+ # ::Google::Cloud::Dialogflow::V2::Participants::Rest::Client.configure do |config|
51
+ # config.timeout = 10.0
52
+ # end
53
+ #
54
+ # @yield [config] Configure the Client client.
55
+ # @yieldparam config [Client::Configuration]
56
+ #
57
+ # @return [Client::Configuration]
58
+ #
59
+ def self.configure
60
+ @configure ||= begin
61
+ namespace = ["Google", "Cloud", "Dialogflow", "V2"]
62
+ parent_config = while namespace.any?
63
+ parent_name = namespace.join "::"
64
+ parent_const = const_get parent_name
65
+ break parent_const.configure if parent_const.respond_to? :configure
66
+ namespace.pop
67
+ end
68
+ default_config = Client::Configuration.new parent_config
69
+
70
+ default_config.timeout = 60.0
71
+ default_config.retry_policy = {
72
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
73
+ }
74
+
75
+ default_config.rpcs.analyze_content.timeout = 220.0
76
+ default_config.rpcs.analyze_content.retry_policy = {
77
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
78
+ }
79
+
80
+ default_config
81
+ end
82
+ yield @configure if block_given?
83
+ @configure
84
+ end
85
+
86
+ ##
87
+ # Configure the Participants Client instance.
88
+ #
89
+ # The configuration is set to the derived mode, meaning that values can be changed,
90
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
91
+ # should be made on {Client.configure}.
92
+ #
93
+ # See {::Google::Cloud::Dialogflow::V2::Participants::Rest::Client::Configuration}
94
+ # for a description of the configuration fields.
95
+ #
96
+ # @yield [config] Configure the Client client.
97
+ # @yieldparam config [Client::Configuration]
98
+ #
99
+ # @return [Client::Configuration]
100
+ #
101
+ def configure
102
+ yield @config if block_given?
103
+ @config
104
+ end
105
+
106
+ ##
107
+ # Create a new Participants REST client object.
108
+ #
109
+ # @example
110
+ #
111
+ # # Create a client using the default configuration
112
+ # client = ::Google::Cloud::Dialogflow::V2::Participants::Rest::Client.new
113
+ #
114
+ # # Create a client using a custom configuration
115
+ # client = ::Google::Cloud::Dialogflow::V2::Participants::Rest::Client.new do |config|
116
+ # config.timeout = 10.0
117
+ # end
118
+ #
119
+ # @yield [config] Configure the Participants client.
120
+ # @yieldparam config [Client::Configuration]
121
+ #
122
+ def initialize
123
+ # Create the configuration object
124
+ @config = Configuration.new Client.configure
125
+
126
+ # Yield the configuration if needed
127
+ yield @config if block_given?
128
+
129
+ # Create credentials
130
+ credentials = @config.credentials
131
+ # Use self-signed JWT if the endpoint is unchanged from default,
132
+ # but only if the default endpoint does not have a region prefix.
133
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
134
+ !@config.endpoint.split(".").first.include?("-")
135
+ credentials ||= Credentials.default scope: @config.scope,
136
+ enable_self_signed_jwt: enable_self_signed_jwt
137
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
138
+ credentials = Credentials.new credentials, scope: @config.scope
139
+ end
140
+
141
+ @quota_project_id = @config.quota_project
142
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
143
+
144
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
145
+ config.credentials = credentials
146
+ config.quota_project = @quota_project_id
147
+ config.endpoint = @config.endpoint
148
+ config.bindings_override = @config.bindings_override
149
+ end
150
+
151
+ @participants_stub = ::Google::Cloud::Dialogflow::V2::Participants::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
152
+ end
153
+
154
+ ##
155
+ # Get the associated client for mix-in of the Locations.
156
+ #
157
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
158
+ #
159
+ attr_reader :location_client
160
+
161
+ # Service calls
162
+
163
+ ##
164
+ # Creates a new participant in a conversation.
165
+ #
166
+ # @overload create_participant(request, options = nil)
167
+ # Pass arguments to `create_participant` via a request object, either of type
168
+ # {::Google::Cloud::Dialogflow::V2::CreateParticipantRequest} or an equivalent Hash.
169
+ #
170
+ # @param request [::Google::Cloud::Dialogflow::V2::CreateParticipantRequest, ::Hash]
171
+ # A request object representing the call parameters. Required. To specify no
172
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
173
+ # @param options [::Gapic::CallOptions, ::Hash]
174
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
175
+ #
176
+ # @overload create_participant(parent: nil, participant: nil)
177
+ # Pass arguments to `create_participant` via keyword arguments. Note that at
178
+ # least one keyword argument is required. To specify no parameters, or to keep all
179
+ # the default parameter values, pass an empty Hash as a request object (see above).
180
+ #
181
+ # @param parent [::String]
182
+ # Required. Resource identifier of the conversation adding the participant.
183
+ # Format: `projects/<Project ID>/locations/<Location
184
+ # ID>/conversations/<Conversation ID>`.
185
+ # @param participant [::Google::Cloud::Dialogflow::V2::Participant, ::Hash]
186
+ # Required. The participant to create.
187
+ # @yield [result, operation] Access the result along with the TransportOperation object
188
+ # @yieldparam result [::Google::Cloud::Dialogflow::V2::Participant]
189
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
190
+ #
191
+ # @return [::Google::Cloud::Dialogflow::V2::Participant]
192
+ #
193
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
194
+ def create_participant request, options = nil
195
+ raise ::ArgumentError, "request must be provided" if request.nil?
196
+
197
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::CreateParticipantRequest
198
+
199
+ # Converts hash and nil to an options object
200
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
201
+
202
+ # Customize the options with defaults
203
+ call_metadata = @config.rpcs.create_participant.metadata.to_h
204
+
205
+ # Set x-goog-api-client and x-goog-user-project headers
206
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
207
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
208
+ gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
209
+ transports_version_send: [:rest]
210
+
211
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
212
+
213
+ options.apply_defaults timeout: @config.rpcs.create_participant.timeout,
214
+ metadata: call_metadata,
215
+ retry_policy: @config.rpcs.create_participant.retry_policy
216
+
217
+ options.apply_defaults timeout: @config.timeout,
218
+ metadata: @config.metadata,
219
+ retry_policy: @config.retry_policy
220
+
221
+ @participants_stub.create_participant request, options do |result, operation|
222
+ yield result, operation if block_given?
223
+ return result
224
+ end
225
+ rescue ::Gapic::Rest::Error => e
226
+ raise ::Google::Cloud::Error.from_error(e)
227
+ end
228
+
229
+ ##
230
+ # Retrieves a conversation participant.
231
+ #
232
+ # @overload get_participant(request, options = nil)
233
+ # Pass arguments to `get_participant` via a request object, either of type
234
+ # {::Google::Cloud::Dialogflow::V2::GetParticipantRequest} or an equivalent Hash.
235
+ #
236
+ # @param request [::Google::Cloud::Dialogflow::V2::GetParticipantRequest, ::Hash]
237
+ # A request object representing the call parameters. Required. To specify no
238
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
239
+ # @param options [::Gapic::CallOptions, ::Hash]
240
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
241
+ #
242
+ # @overload get_participant(name: nil)
243
+ # Pass arguments to `get_participant` via keyword arguments. Note that at
244
+ # least one keyword argument is required. To specify no parameters, or to keep all
245
+ # the default parameter values, pass an empty Hash as a request object (see above).
246
+ #
247
+ # @param name [::String]
248
+ # Required. The name of the participant. Format:
249
+ # `projects/<Project ID>/locations/<Location ID>/conversations/<Conversation
250
+ # ID>/participants/<Participant ID>`.
251
+ # @yield [result, operation] Access the result along with the TransportOperation object
252
+ # @yieldparam result [::Google::Cloud::Dialogflow::V2::Participant]
253
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
254
+ #
255
+ # @return [::Google::Cloud::Dialogflow::V2::Participant]
256
+ #
257
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
258
+ def get_participant request, options = nil
259
+ raise ::ArgumentError, "request must be provided" if request.nil?
260
+
261
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::GetParticipantRequest
262
+
263
+ # Converts hash and nil to an options object
264
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
265
+
266
+ # Customize the options with defaults
267
+ call_metadata = @config.rpcs.get_participant.metadata.to_h
268
+
269
+ # Set x-goog-api-client and x-goog-user-project headers
270
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
271
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
272
+ gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
273
+ transports_version_send: [:rest]
274
+
275
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
276
+
277
+ options.apply_defaults timeout: @config.rpcs.get_participant.timeout,
278
+ metadata: call_metadata,
279
+ retry_policy: @config.rpcs.get_participant.retry_policy
280
+
281
+ options.apply_defaults timeout: @config.timeout,
282
+ metadata: @config.metadata,
283
+ retry_policy: @config.retry_policy
284
+
285
+ @participants_stub.get_participant request, options do |result, operation|
286
+ yield result, operation if block_given?
287
+ return result
288
+ end
289
+ rescue ::Gapic::Rest::Error => e
290
+ raise ::Google::Cloud::Error.from_error(e)
291
+ end
292
+
293
+ ##
294
+ # Returns the list of all participants in the specified conversation.
295
+ #
296
+ # @overload list_participants(request, options = nil)
297
+ # Pass arguments to `list_participants` via a request object, either of type
298
+ # {::Google::Cloud::Dialogflow::V2::ListParticipantsRequest} or an equivalent Hash.
299
+ #
300
+ # @param request [::Google::Cloud::Dialogflow::V2::ListParticipantsRequest, ::Hash]
301
+ # A request object representing the call parameters. Required. To specify no
302
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
303
+ # @param options [::Gapic::CallOptions, ::Hash]
304
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
305
+ #
306
+ # @overload list_participants(parent: nil, page_size: nil, page_token: nil)
307
+ # Pass arguments to `list_participants` via keyword arguments. Note that at
308
+ # least one keyword argument is required. To specify no parameters, or to keep all
309
+ # the default parameter values, pass an empty Hash as a request object (see above).
310
+ #
311
+ # @param parent [::String]
312
+ # Required. The conversation to list all participants from.
313
+ # Format: `projects/<Project ID>/locations/<Location
314
+ # ID>/conversations/<Conversation ID>`.
315
+ # @param page_size [::Integer]
316
+ # Optional. The maximum number of items to return in a single page. By
317
+ # default 100 and at most 1000.
318
+ # @param page_token [::String]
319
+ # Optional. The next_page_token value returned from a previous list request.
320
+ # @yield [result, operation] Access the result along with the TransportOperation object
321
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::V2::Participant>]
322
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
323
+ #
324
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::V2::Participant>]
325
+ #
326
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
327
+ def list_participants request, options = nil
328
+ raise ::ArgumentError, "request must be provided" if request.nil?
329
+
330
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::ListParticipantsRequest
331
+
332
+ # Converts hash and nil to an options object
333
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
334
+
335
+ # Customize the options with defaults
336
+ call_metadata = @config.rpcs.list_participants.metadata.to_h
337
+
338
+ # Set x-goog-api-client and x-goog-user-project headers
339
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
340
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
341
+ gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
342
+ transports_version_send: [:rest]
343
+
344
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
345
+
346
+ options.apply_defaults timeout: @config.rpcs.list_participants.timeout,
347
+ metadata: call_metadata,
348
+ retry_policy: @config.rpcs.list_participants.retry_policy
349
+
350
+ options.apply_defaults timeout: @config.timeout,
351
+ metadata: @config.metadata,
352
+ retry_policy: @config.retry_policy
353
+
354
+ @participants_stub.list_participants request, options do |result, operation|
355
+ result = ::Gapic::Rest::PagedEnumerable.new @participants_stub, :list_participants, "participants", request, result, options
356
+ yield result, operation if block_given?
357
+ return result
358
+ end
359
+ rescue ::Gapic::Rest::Error => e
360
+ raise ::Google::Cloud::Error.from_error(e)
361
+ end
362
+
363
+ ##
364
+ # Updates the specified participant.
365
+ #
366
+ # @overload update_participant(request, options = nil)
367
+ # Pass arguments to `update_participant` via a request object, either of type
368
+ # {::Google::Cloud::Dialogflow::V2::UpdateParticipantRequest} or an equivalent Hash.
369
+ #
370
+ # @param request [::Google::Cloud::Dialogflow::V2::UpdateParticipantRequest, ::Hash]
371
+ # A request object representing the call parameters. Required. To specify no
372
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
373
+ # @param options [::Gapic::CallOptions, ::Hash]
374
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
375
+ #
376
+ # @overload update_participant(participant: nil, update_mask: nil)
377
+ # Pass arguments to `update_participant` via keyword arguments. Note that at
378
+ # least one keyword argument is required. To specify no parameters, or to keep all
379
+ # the default parameter values, pass an empty Hash as a request object (see above).
380
+ #
381
+ # @param participant [::Google::Cloud::Dialogflow::V2::Participant, ::Hash]
382
+ # Required. The participant to update.
383
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
384
+ # Required. The mask to specify which fields to update.
385
+ # @yield [result, operation] Access the result along with the TransportOperation object
386
+ # @yieldparam result [::Google::Cloud::Dialogflow::V2::Participant]
387
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
388
+ #
389
+ # @return [::Google::Cloud::Dialogflow::V2::Participant]
390
+ #
391
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
392
+ def update_participant request, options = nil
393
+ raise ::ArgumentError, "request must be provided" if request.nil?
394
+
395
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::UpdateParticipantRequest
396
+
397
+ # Converts hash and nil to an options object
398
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
399
+
400
+ # Customize the options with defaults
401
+ call_metadata = @config.rpcs.update_participant.metadata.to_h
402
+
403
+ # Set x-goog-api-client and x-goog-user-project headers
404
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
405
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
406
+ gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
407
+ transports_version_send: [:rest]
408
+
409
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
410
+
411
+ options.apply_defaults timeout: @config.rpcs.update_participant.timeout,
412
+ metadata: call_metadata,
413
+ retry_policy: @config.rpcs.update_participant.retry_policy
414
+
415
+ options.apply_defaults timeout: @config.timeout,
416
+ metadata: @config.metadata,
417
+ retry_policy: @config.retry_policy
418
+
419
+ @participants_stub.update_participant request, options do |result, operation|
420
+ yield result, operation if block_given?
421
+ return result
422
+ end
423
+ rescue ::Gapic::Rest::Error => e
424
+ raise ::Google::Cloud::Error.from_error(e)
425
+ end
426
+
427
+ ##
428
+ # Adds a text (chat, for example), or audio (phone recording, for example)
429
+ # message from a participant into the conversation.
430
+ #
431
+ # Note: Always use agent versions for production traffic
432
+ # sent to virtual agents. See [Versions and
433
+ # environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).
434
+ #
435
+ # @overload analyze_content(request, options = nil)
436
+ # Pass arguments to `analyze_content` via a request object, either of type
437
+ # {::Google::Cloud::Dialogflow::V2::AnalyzeContentRequest} or an equivalent Hash.
438
+ #
439
+ # @param request [::Google::Cloud::Dialogflow::V2::AnalyzeContentRequest, ::Hash]
440
+ # A request object representing the call parameters. Required. To specify no
441
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
442
+ # @param options [::Gapic::CallOptions, ::Hash]
443
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
444
+ #
445
+ # @overload analyze_content(participant: nil, text_input: nil, event_input: nil, reply_audio_config: nil, query_params: nil, assist_query_params: nil, cx_parameters: nil, request_id: nil)
446
+ # Pass arguments to `analyze_content` via keyword arguments. Note that at
447
+ # least one keyword argument is required. To specify no parameters, or to keep all
448
+ # the default parameter values, pass an empty Hash as a request object (see above).
449
+ #
450
+ # @param participant [::String]
451
+ # Required. The name of the participant this text comes from.
452
+ # Format: `projects/<Project ID>/locations/<Location
453
+ # ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
454
+ # @param text_input [::Google::Cloud::Dialogflow::V2::TextInput, ::Hash]
455
+ # The natural language text to be processed.
456
+ # @param event_input [::Google::Cloud::Dialogflow::V2::EventInput, ::Hash]
457
+ # An input event to send to Dialogflow.
458
+ # @param reply_audio_config [::Google::Cloud::Dialogflow::V2::OutputAudioConfig, ::Hash]
459
+ # Speech synthesis configuration.
460
+ # The speech synthesis settings for a virtual agent that may be configured
461
+ # for the associated conversation profile are not used when calling
462
+ # AnalyzeContent. If this configuration is not supplied, speech synthesis
463
+ # is disabled.
464
+ # @param query_params [::Google::Cloud::Dialogflow::V2::QueryParameters, ::Hash]
465
+ # Parameters for a Dialogflow virtual-agent query.
466
+ # @param assist_query_params [::Google::Cloud::Dialogflow::V2::AssistQueryParameters, ::Hash]
467
+ # Parameters for a human assist query.
468
+ # @param cx_parameters [::Google::Protobuf::Struct, ::Hash]
469
+ # Additional parameters to be put into Dialogflow CX session parameters. To
470
+ # remove a parameter from the session, clients should explicitly set the
471
+ # parameter value to null.
472
+ #
473
+ # Note: this field should only be used if you are connecting to a Dialogflow
474
+ # CX agent.
475
+ # @param request_id [::String]
476
+ # A unique identifier for this request. Restricted to 36 ASCII characters.
477
+ # A random UUID is recommended.
478
+ # This request is only idempotent if a `request_id` is provided.
479
+ # @yield [result, operation] Access the result along with the TransportOperation object
480
+ # @yieldparam result [::Google::Cloud::Dialogflow::V2::AnalyzeContentResponse]
481
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
482
+ #
483
+ # @return [::Google::Cloud::Dialogflow::V2::AnalyzeContentResponse]
484
+ #
485
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
486
+ def analyze_content request, options = nil
487
+ raise ::ArgumentError, "request must be provided" if request.nil?
488
+
489
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::AnalyzeContentRequest
490
+
491
+ # Converts hash and nil to an options object
492
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
493
+
494
+ # Customize the options with defaults
495
+ call_metadata = @config.rpcs.analyze_content.metadata.to_h
496
+
497
+ # Set x-goog-api-client and x-goog-user-project headers
498
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
499
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
500
+ gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
501
+ transports_version_send: [:rest]
502
+
503
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
504
+
505
+ options.apply_defaults timeout: @config.rpcs.analyze_content.timeout,
506
+ metadata: call_metadata,
507
+ retry_policy: @config.rpcs.analyze_content.retry_policy
508
+
509
+ options.apply_defaults timeout: @config.timeout,
510
+ metadata: @config.metadata,
511
+ retry_policy: @config.retry_policy
512
+
513
+ @participants_stub.analyze_content request, options do |result, operation|
514
+ yield result, operation if block_given?
515
+ return result
516
+ end
517
+ rescue ::Gapic::Rest::Error => e
518
+ raise ::Google::Cloud::Error.from_error(e)
519
+ end
520
+
521
+ ##
522
+ # Gets suggested articles for a participant based on specific historical
523
+ # messages.
524
+ #
525
+ # @overload suggest_articles(request, options = nil)
526
+ # Pass arguments to `suggest_articles` via a request object, either of type
527
+ # {::Google::Cloud::Dialogflow::V2::SuggestArticlesRequest} or an equivalent Hash.
528
+ #
529
+ # @param request [::Google::Cloud::Dialogflow::V2::SuggestArticlesRequest, ::Hash]
530
+ # A request object representing the call parameters. Required. To specify no
531
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
532
+ # @param options [::Gapic::CallOptions, ::Hash]
533
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
534
+ #
535
+ # @overload suggest_articles(parent: nil, latest_message: nil, context_size: nil, assist_query_params: nil)
536
+ # Pass arguments to `suggest_articles` via keyword arguments. Note that at
537
+ # least one keyword argument is required. To specify no parameters, or to keep all
538
+ # the default parameter values, pass an empty Hash as a request object (see above).
539
+ #
540
+ # @param parent [::String]
541
+ # Required. The name of the participant to fetch suggestion for.
542
+ # Format: `projects/<Project ID>/locations/<Location
543
+ # ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
544
+ # @param latest_message [::String]
545
+ # Optional. The name of the latest conversation message to compile suggestion
546
+ # for. If empty, it will be the latest message of the conversation.
547
+ #
548
+ # Format: `projects/<Project ID>/locations/<Location
549
+ # ID>/conversations/<Conversation ID>/messages/<Message ID>`.
550
+ # @param context_size [::Integer]
551
+ # Optional. Max number of messages prior to and including
552
+ # {::Google::Cloud::Dialogflow::V2::SuggestArticlesRequest#latest_message latest_message}
553
+ # to use as context when compiling the suggestion. By default 20 and at
554
+ # most 50.
555
+ # @param assist_query_params [::Google::Cloud::Dialogflow::V2::AssistQueryParameters, ::Hash]
556
+ # Parameters for a human assist query.
557
+ # @yield [result, operation] Access the result along with the TransportOperation object
558
+ # @yieldparam result [::Google::Cloud::Dialogflow::V2::SuggestArticlesResponse]
559
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
560
+ #
561
+ # @return [::Google::Cloud::Dialogflow::V2::SuggestArticlesResponse]
562
+ #
563
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
564
+ def suggest_articles request, options = nil
565
+ raise ::ArgumentError, "request must be provided" if request.nil?
566
+
567
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::SuggestArticlesRequest
568
+
569
+ # Converts hash and nil to an options object
570
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
571
+
572
+ # Customize the options with defaults
573
+ call_metadata = @config.rpcs.suggest_articles.metadata.to_h
574
+
575
+ # Set x-goog-api-client and x-goog-user-project headers
576
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
577
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
578
+ gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
579
+ transports_version_send: [:rest]
580
+
581
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
582
+
583
+ options.apply_defaults timeout: @config.rpcs.suggest_articles.timeout,
584
+ metadata: call_metadata,
585
+ retry_policy: @config.rpcs.suggest_articles.retry_policy
586
+
587
+ options.apply_defaults timeout: @config.timeout,
588
+ metadata: @config.metadata,
589
+ retry_policy: @config.retry_policy
590
+
591
+ @participants_stub.suggest_articles request, options do |result, operation|
592
+ yield result, operation if block_given?
593
+ return result
594
+ end
595
+ rescue ::Gapic::Rest::Error => e
596
+ raise ::Google::Cloud::Error.from_error(e)
597
+ end
598
+
599
+ ##
600
+ # Gets suggested faq answers for a participant based on specific historical
601
+ # messages.
602
+ #
603
+ # @overload suggest_faq_answers(request, options = nil)
604
+ # Pass arguments to `suggest_faq_answers` via a request object, either of type
605
+ # {::Google::Cloud::Dialogflow::V2::SuggestFaqAnswersRequest} or an equivalent Hash.
606
+ #
607
+ # @param request [::Google::Cloud::Dialogflow::V2::SuggestFaqAnswersRequest, ::Hash]
608
+ # A request object representing the call parameters. Required. To specify no
609
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
610
+ # @param options [::Gapic::CallOptions, ::Hash]
611
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
612
+ #
613
+ # @overload suggest_faq_answers(parent: nil, latest_message: nil, context_size: nil, assist_query_params: nil)
614
+ # Pass arguments to `suggest_faq_answers` via keyword arguments. Note that at
615
+ # least one keyword argument is required. To specify no parameters, or to keep all
616
+ # the default parameter values, pass an empty Hash as a request object (see above).
617
+ #
618
+ # @param parent [::String]
619
+ # Required. The name of the participant to fetch suggestion for.
620
+ # Format: `projects/<Project ID>/locations/<Location
621
+ # ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
622
+ # @param latest_message [::String]
623
+ # Optional. The name of the latest conversation message to compile suggestion
624
+ # for. If empty, it will be the latest message of the conversation.
625
+ #
626
+ # Format: `projects/<Project ID>/locations/<Location
627
+ # ID>/conversations/<Conversation ID>/messages/<Message ID>`.
628
+ # @param context_size [::Integer]
629
+ # Optional. Max number of messages prior to and including
630
+ # [latest_message] to use as context when compiling the
631
+ # suggestion. By default 20 and at most 50.
632
+ # @param assist_query_params [::Google::Cloud::Dialogflow::V2::AssistQueryParameters, ::Hash]
633
+ # Parameters for a human assist query.
634
+ # @yield [result, operation] Access the result along with the TransportOperation object
635
+ # @yieldparam result [::Google::Cloud::Dialogflow::V2::SuggestFaqAnswersResponse]
636
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
637
+ #
638
+ # @return [::Google::Cloud::Dialogflow::V2::SuggestFaqAnswersResponse]
639
+ #
640
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
641
+ def suggest_faq_answers request, options = nil
642
+ raise ::ArgumentError, "request must be provided" if request.nil?
643
+
644
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::SuggestFaqAnswersRequest
645
+
646
+ # Converts hash and nil to an options object
647
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
648
+
649
+ # Customize the options with defaults
650
+ call_metadata = @config.rpcs.suggest_faq_answers.metadata.to_h
651
+
652
+ # Set x-goog-api-client and x-goog-user-project headers
653
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
654
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
655
+ gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
656
+ transports_version_send: [:rest]
657
+
658
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
659
+
660
+ options.apply_defaults timeout: @config.rpcs.suggest_faq_answers.timeout,
661
+ metadata: call_metadata,
662
+ retry_policy: @config.rpcs.suggest_faq_answers.retry_policy
663
+
664
+ options.apply_defaults timeout: @config.timeout,
665
+ metadata: @config.metadata,
666
+ retry_policy: @config.retry_policy
667
+
668
+ @participants_stub.suggest_faq_answers request, options do |result, operation|
669
+ yield result, operation if block_given?
670
+ return result
671
+ end
672
+ rescue ::Gapic::Rest::Error => e
673
+ raise ::Google::Cloud::Error.from_error(e)
674
+ end
675
+
676
+ ##
677
+ # Gets smart replies for a participant based on specific historical
678
+ # messages.
679
+ #
680
+ # @overload suggest_smart_replies(request, options = nil)
681
+ # Pass arguments to `suggest_smart_replies` via a request object, either of type
682
+ # {::Google::Cloud::Dialogflow::V2::SuggestSmartRepliesRequest} or an equivalent Hash.
683
+ #
684
+ # @param request [::Google::Cloud::Dialogflow::V2::SuggestSmartRepliesRequest, ::Hash]
685
+ # A request object representing the call parameters. Required. To specify no
686
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
687
+ # @param options [::Gapic::CallOptions, ::Hash]
688
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
689
+ #
690
+ # @overload suggest_smart_replies(parent: nil, current_text_input: nil, latest_message: nil, context_size: nil)
691
+ # Pass arguments to `suggest_smart_replies` via keyword arguments. Note that at
692
+ # least one keyword argument is required. To specify no parameters, or to keep all
693
+ # the default parameter values, pass an empty Hash as a request object (see above).
694
+ #
695
+ # @param parent [::String]
696
+ # Required. The name of the participant to fetch suggestion for.
697
+ # Format: `projects/<Project ID>/locations/<Location
698
+ # ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
699
+ # @param current_text_input [::Google::Cloud::Dialogflow::V2::TextInput, ::Hash]
700
+ # The current natural language text segment to compile suggestion
701
+ # for. This provides a way for user to get follow up smart reply suggestion
702
+ # after a smart reply selection, without sending a text message.
703
+ # @param latest_message [::String]
704
+ # The name of the latest conversation message to compile suggestion
705
+ # for. If empty, it will be the latest message of the conversation.
706
+ #
707
+ # Format: `projects/<Project ID>/locations/<Location
708
+ # ID>/conversations/<Conversation ID>/messages/<Message ID>`.
709
+ # @param context_size [::Integer]
710
+ # Max number of messages prior to and including
711
+ # [latest_message] to use as context when compiling the
712
+ # suggestion. By default 20 and at most 50.
713
+ # @yield [result, operation] Access the result along with the TransportOperation object
714
+ # @yieldparam result [::Google::Cloud::Dialogflow::V2::SuggestSmartRepliesResponse]
715
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
716
+ #
717
+ # @return [::Google::Cloud::Dialogflow::V2::SuggestSmartRepliesResponse]
718
+ #
719
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
720
+ def suggest_smart_replies request, options = nil
721
+ raise ::ArgumentError, "request must be provided" if request.nil?
722
+
723
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::SuggestSmartRepliesRequest
724
+
725
+ # Converts hash and nil to an options object
726
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
727
+
728
+ # Customize the options with defaults
729
+ call_metadata = @config.rpcs.suggest_smart_replies.metadata.to_h
730
+
731
+ # Set x-goog-api-client and x-goog-user-project headers
732
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
733
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
734
+ gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
735
+ transports_version_send: [:rest]
736
+
737
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
738
+
739
+ options.apply_defaults timeout: @config.rpcs.suggest_smart_replies.timeout,
740
+ metadata: call_metadata,
741
+ retry_policy: @config.rpcs.suggest_smart_replies.retry_policy
742
+
743
+ options.apply_defaults timeout: @config.timeout,
744
+ metadata: @config.metadata,
745
+ retry_policy: @config.retry_policy
746
+
747
+ @participants_stub.suggest_smart_replies request, options do |result, operation|
748
+ yield result, operation if block_given?
749
+ return result
750
+ end
751
+ rescue ::Gapic::Rest::Error => e
752
+ raise ::Google::Cloud::Error.from_error(e)
753
+ end
754
+
755
+ ##
756
+ # Configuration class for the Participants REST API.
757
+ #
758
+ # This class represents the configuration for Participants REST,
759
+ # providing control over timeouts, retry behavior, logging, transport
760
+ # parameters, and other low-level controls. Certain parameters can also be
761
+ # applied individually to specific RPCs. See
762
+ # {::Google::Cloud::Dialogflow::V2::Participants::Rest::Client::Configuration::Rpcs}
763
+ # for a list of RPCs that can be configured independently.
764
+ #
765
+ # Configuration can be applied globally to all clients, or to a single client
766
+ # on construction.
767
+ #
768
+ # @example
769
+ #
770
+ # # Modify the global config, setting the timeout for
771
+ # # create_participant to 20 seconds,
772
+ # # and all remaining timeouts to 10 seconds.
773
+ # ::Google::Cloud::Dialogflow::V2::Participants::Rest::Client.configure do |config|
774
+ # config.timeout = 10.0
775
+ # config.rpcs.create_participant.timeout = 20.0
776
+ # end
777
+ #
778
+ # # Apply the above configuration only to a new client.
779
+ # client = ::Google::Cloud::Dialogflow::V2::Participants::Rest::Client.new do |config|
780
+ # config.timeout = 10.0
781
+ # config.rpcs.create_participant.timeout = 20.0
782
+ # end
783
+ #
784
+ # @!attribute [rw] endpoint
785
+ # The hostname or hostname:port of the service endpoint.
786
+ # Defaults to `"dialogflow.googleapis.com"`.
787
+ # @return [::String]
788
+ # @!attribute [rw] credentials
789
+ # Credentials to send with calls. You may provide any of the following types:
790
+ # * (`String`) The path to a service account key file in JSON format
791
+ # * (`Hash`) A service account key as a Hash
792
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
793
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
794
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
795
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
796
+ # * (`nil`) indicating no credentials
797
+ # @return [::Object]
798
+ # @!attribute [rw] scope
799
+ # The OAuth scopes
800
+ # @return [::Array<::String>]
801
+ # @!attribute [rw] lib_name
802
+ # The library name as recorded in instrumentation and logging
803
+ # @return [::String]
804
+ # @!attribute [rw] lib_version
805
+ # The library version as recorded in instrumentation and logging
806
+ # @return [::String]
807
+ # @!attribute [rw] timeout
808
+ # The call timeout in seconds.
809
+ # @return [::Numeric]
810
+ # @!attribute [rw] metadata
811
+ # Additional headers to be sent with the call.
812
+ # @return [::Hash{::Symbol=>::String}]
813
+ # @!attribute [rw] retry_policy
814
+ # The retry policy. The value is a hash with the following keys:
815
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
816
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
817
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
818
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
819
+ # trigger a retry.
820
+ # @return [::Hash]
821
+ # @!attribute [rw] quota_project
822
+ # A separate project against which to charge quota.
823
+ # @return [::String]
824
+ #
825
+ class Configuration
826
+ extend ::Gapic::Config
827
+
828
+ config_attr :endpoint, "dialogflow.googleapis.com", ::String
829
+ config_attr :credentials, nil do |value|
830
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
831
+ allowed.any? { |klass| klass === value }
832
+ end
833
+ config_attr :scope, nil, ::String, ::Array, nil
834
+ config_attr :lib_name, nil, ::String, nil
835
+ config_attr :lib_version, nil, ::String, nil
836
+ config_attr :timeout, nil, ::Numeric, nil
837
+ config_attr :metadata, nil, ::Hash, nil
838
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
839
+ config_attr :quota_project, nil, ::String, nil
840
+
841
+ # @private
842
+ # Overrides for http bindings for the RPCs of this service
843
+ # are only used when this service is used as mixin, and only
844
+ # by the host service.
845
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
846
+ config_attr :bindings_override, {}, ::Hash, nil
847
+
848
+ # @private
849
+ def initialize parent_config = nil
850
+ @parent_config = parent_config unless parent_config.nil?
851
+
852
+ yield self if block_given?
853
+ end
854
+
855
+ ##
856
+ # Configurations for individual RPCs
857
+ # @return [Rpcs]
858
+ #
859
+ def rpcs
860
+ @rpcs ||= begin
861
+ parent_rpcs = nil
862
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
863
+ Rpcs.new parent_rpcs
864
+ end
865
+ end
866
+
867
+ ##
868
+ # Configuration RPC class for the Participants API.
869
+ #
870
+ # Includes fields providing the configuration for each RPC in this service.
871
+ # Each configuration object is of type `Gapic::Config::Method` and includes
872
+ # the following configuration fields:
873
+ #
874
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
875
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
876
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
877
+ # include the following keys:
878
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
879
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
880
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
881
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
882
+ # trigger a retry.
883
+ #
884
+ class Rpcs
885
+ ##
886
+ # RPC-specific configuration for `create_participant`
887
+ # @return [::Gapic::Config::Method]
888
+ #
889
+ attr_reader :create_participant
890
+ ##
891
+ # RPC-specific configuration for `get_participant`
892
+ # @return [::Gapic::Config::Method]
893
+ #
894
+ attr_reader :get_participant
895
+ ##
896
+ # RPC-specific configuration for `list_participants`
897
+ # @return [::Gapic::Config::Method]
898
+ #
899
+ attr_reader :list_participants
900
+ ##
901
+ # RPC-specific configuration for `update_participant`
902
+ # @return [::Gapic::Config::Method]
903
+ #
904
+ attr_reader :update_participant
905
+ ##
906
+ # RPC-specific configuration for `analyze_content`
907
+ # @return [::Gapic::Config::Method]
908
+ #
909
+ attr_reader :analyze_content
910
+ ##
911
+ # RPC-specific configuration for `suggest_articles`
912
+ # @return [::Gapic::Config::Method]
913
+ #
914
+ attr_reader :suggest_articles
915
+ ##
916
+ # RPC-specific configuration for `suggest_faq_answers`
917
+ # @return [::Gapic::Config::Method]
918
+ #
919
+ attr_reader :suggest_faq_answers
920
+ ##
921
+ # RPC-specific configuration for `suggest_smart_replies`
922
+ # @return [::Gapic::Config::Method]
923
+ #
924
+ attr_reader :suggest_smart_replies
925
+
926
+ # @private
927
+ def initialize parent_rpcs = nil
928
+ create_participant_config = parent_rpcs.create_participant if parent_rpcs.respond_to? :create_participant
929
+ @create_participant = ::Gapic::Config::Method.new create_participant_config
930
+ get_participant_config = parent_rpcs.get_participant if parent_rpcs.respond_to? :get_participant
931
+ @get_participant = ::Gapic::Config::Method.new get_participant_config
932
+ list_participants_config = parent_rpcs.list_participants if parent_rpcs.respond_to? :list_participants
933
+ @list_participants = ::Gapic::Config::Method.new list_participants_config
934
+ update_participant_config = parent_rpcs.update_participant if parent_rpcs.respond_to? :update_participant
935
+ @update_participant = ::Gapic::Config::Method.new update_participant_config
936
+ analyze_content_config = parent_rpcs.analyze_content if parent_rpcs.respond_to? :analyze_content
937
+ @analyze_content = ::Gapic::Config::Method.new analyze_content_config
938
+ suggest_articles_config = parent_rpcs.suggest_articles if parent_rpcs.respond_to? :suggest_articles
939
+ @suggest_articles = ::Gapic::Config::Method.new suggest_articles_config
940
+ suggest_faq_answers_config = parent_rpcs.suggest_faq_answers if parent_rpcs.respond_to? :suggest_faq_answers
941
+ @suggest_faq_answers = ::Gapic::Config::Method.new suggest_faq_answers_config
942
+ suggest_smart_replies_config = parent_rpcs.suggest_smart_replies if parent_rpcs.respond_to? :suggest_smart_replies
943
+ @suggest_smart_replies = ::Gapic::Config::Method.new suggest_smart_replies_config
944
+
945
+ yield self if block_given?
946
+ end
947
+ end
948
+ end
949
+ end
950
+ end
951
+ end
952
+ end
953
+ end
954
+ end
955
+ end