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,914 @@
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/intent_pb"
21
+ require "google/cloud/dialogflow/v2/intents/rest/service_stub"
22
+ require "google/cloud/location/rest"
23
+
24
+ module Google
25
+ module Cloud
26
+ module Dialogflow
27
+ module V2
28
+ module Intents
29
+ module Rest
30
+ ##
31
+ # REST client for the Intents service.
32
+ #
33
+ # Service for managing {::Google::Cloud::Dialogflow::V2::Intent Intents}.
34
+ #
35
+ class Client
36
+ include Paths
37
+
38
+ # @private
39
+ attr_reader :intents_stub
40
+
41
+ ##
42
+ # Configure the Intents Client class.
43
+ #
44
+ # See {::Google::Cloud::Dialogflow::V2::Intents::Rest::Client::Configuration}
45
+ # for a description of the configuration fields.
46
+ #
47
+ # @example
48
+ #
49
+ # # Modify the configuration for all Intents clients
50
+ # ::Google::Cloud::Dialogflow::V2::Intents::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
76
+ end
77
+ yield @configure if block_given?
78
+ @configure
79
+ end
80
+
81
+ ##
82
+ # Configure the Intents Client instance.
83
+ #
84
+ # The configuration is set to the derived mode, meaning that values can be changed,
85
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
86
+ # should be made on {Client.configure}.
87
+ #
88
+ # See {::Google::Cloud::Dialogflow::V2::Intents::Rest::Client::Configuration}
89
+ # for a description of the configuration fields.
90
+ #
91
+ # @yield [config] Configure the Client client.
92
+ # @yieldparam config [Client::Configuration]
93
+ #
94
+ # @return [Client::Configuration]
95
+ #
96
+ def configure
97
+ yield @config if block_given?
98
+ @config
99
+ end
100
+
101
+ ##
102
+ # Create a new Intents REST client object.
103
+ #
104
+ # @example
105
+ #
106
+ # # Create a client using the default configuration
107
+ # client = ::Google::Cloud::Dialogflow::V2::Intents::Rest::Client.new
108
+ #
109
+ # # Create a client using a custom configuration
110
+ # client = ::Google::Cloud::Dialogflow::V2::Intents::Rest::Client.new do |config|
111
+ # config.timeout = 10.0
112
+ # end
113
+ #
114
+ # @yield [config] Configure the Intents client.
115
+ # @yieldparam config [Client::Configuration]
116
+ #
117
+ def initialize
118
+ # Create the configuration object
119
+ @config = Configuration.new Client.configure
120
+
121
+ # Yield the configuration if needed
122
+ yield @config if block_given?
123
+
124
+ # Create credentials
125
+ credentials = @config.credentials
126
+ # Use self-signed JWT if the endpoint is unchanged from default,
127
+ # but only if the default endpoint does not have a region prefix.
128
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
129
+ !@config.endpoint.split(".").first.include?("-")
130
+ credentials ||= Credentials.default scope: @config.scope,
131
+ enable_self_signed_jwt: enable_self_signed_jwt
132
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
133
+ credentials = Credentials.new credentials, scope: @config.scope
134
+ end
135
+
136
+ @quota_project_id = @config.quota_project
137
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
138
+
139
+ @operations_client = ::Google::Cloud::Dialogflow::V2::Intents::Rest::Operations.new do |config|
140
+ config.credentials = credentials
141
+ config.quota_project = @quota_project_id
142
+ config.endpoint = @config.endpoint
143
+ end
144
+
145
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
146
+ config.credentials = credentials
147
+ config.quota_project = @quota_project_id
148
+ config.endpoint = @config.endpoint
149
+ config.bindings_override = @config.bindings_override
150
+ end
151
+
152
+ @intents_stub = ::Google::Cloud::Dialogflow::V2::Intents::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
153
+ end
154
+
155
+ ##
156
+ # Get the associated client for long-running operations.
157
+ #
158
+ # @return [::Google::Cloud::Dialogflow::V2::Intents::Rest::Operations]
159
+ #
160
+ attr_reader :operations_client
161
+
162
+ ##
163
+ # Get the associated client for mix-in of the Locations.
164
+ #
165
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
166
+ #
167
+ attr_reader :location_client
168
+
169
+ # Service calls
170
+
171
+ ##
172
+ # Returns the list of all intents in the specified agent.
173
+ #
174
+ # @overload list_intents(request, options = nil)
175
+ # Pass arguments to `list_intents` via a request object, either of type
176
+ # {::Google::Cloud::Dialogflow::V2::ListIntentsRequest} or an equivalent Hash.
177
+ #
178
+ # @param request [::Google::Cloud::Dialogflow::V2::ListIntentsRequest, ::Hash]
179
+ # A request object representing the call parameters. Required. To specify no
180
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
181
+ # @param options [::Gapic::CallOptions, ::Hash]
182
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
183
+ #
184
+ # @overload list_intents(parent: nil, language_code: nil, intent_view: nil, page_size: nil, page_token: nil)
185
+ # Pass arguments to `list_intents` via keyword arguments. Note that at
186
+ # least one keyword argument is required. To specify no parameters, or to keep all
187
+ # the default parameter values, pass an empty Hash as a request object (see above).
188
+ #
189
+ # @param parent [::String]
190
+ # Required. The agent to list all intents from.
191
+ # Format: `projects/<Project ID>/agent` or `projects/<Project
192
+ # ID>/locations/<Location ID>/agent`.
193
+ #
194
+ # Alternatively, you can specify the environment to list intents for.
195
+ # Format: `projects/<Project ID>/agent/environments/<Environment ID>`
196
+ # or `projects/<Project ID>/locations/<Location
197
+ # ID>/agent/environments/<Environment ID>`.
198
+ # Note: training phrases of the intents will not be returned for non-draft
199
+ # environment.
200
+ # @param language_code [::String]
201
+ # Optional. The language used to access language-specific data.
202
+ # If not specified, the agent's default language is used.
203
+ # For more information, see
204
+ # [Multilingual intent and entity
205
+ # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
206
+ # @param intent_view [::Google::Cloud::Dialogflow::V2::IntentView]
207
+ # Optional. The resource view to apply to the returned intent.
208
+ # @param page_size [::Integer]
209
+ # Optional. The maximum number of items to return in a single page. By
210
+ # default 100 and at most 1000.
211
+ # @param page_token [::String]
212
+ # Optional. The next_page_token value returned from a previous list request.
213
+ # @yield [result, operation] Access the result along with the TransportOperation object
214
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::V2::Intent>]
215
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
216
+ #
217
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::V2::Intent>]
218
+ #
219
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
220
+ def list_intents request, options = nil
221
+ raise ::ArgumentError, "request must be provided" if request.nil?
222
+
223
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::ListIntentsRequest
224
+
225
+ # Converts hash and nil to an options object
226
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
227
+
228
+ # Customize the options with defaults
229
+ call_metadata = @config.rpcs.list_intents.metadata.to_h
230
+
231
+ # Set x-goog-api-client and x-goog-user-project headers
232
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
233
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
234
+ gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
235
+ transports_version_send: [:rest]
236
+
237
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
238
+
239
+ options.apply_defaults timeout: @config.rpcs.list_intents.timeout,
240
+ metadata: call_metadata,
241
+ retry_policy: @config.rpcs.list_intents.retry_policy
242
+
243
+ options.apply_defaults timeout: @config.timeout,
244
+ metadata: @config.metadata,
245
+ retry_policy: @config.retry_policy
246
+
247
+ @intents_stub.list_intents request, options do |result, operation|
248
+ result = ::Gapic::Rest::PagedEnumerable.new @intents_stub, :list_intents, "intents", request, result, options
249
+ yield result, operation if block_given?
250
+ return result
251
+ end
252
+ rescue ::Gapic::Rest::Error => e
253
+ raise ::Google::Cloud::Error.from_error(e)
254
+ end
255
+
256
+ ##
257
+ # Retrieves the specified intent.
258
+ #
259
+ # @overload get_intent(request, options = nil)
260
+ # Pass arguments to `get_intent` via a request object, either of type
261
+ # {::Google::Cloud::Dialogflow::V2::GetIntentRequest} or an equivalent Hash.
262
+ #
263
+ # @param request [::Google::Cloud::Dialogflow::V2::GetIntentRequest, ::Hash]
264
+ # A request object representing the call parameters. Required. To specify no
265
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
266
+ # @param options [::Gapic::CallOptions, ::Hash]
267
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
268
+ #
269
+ # @overload get_intent(name: nil, language_code: nil, intent_view: nil)
270
+ # Pass arguments to `get_intent` via keyword arguments. Note that at
271
+ # least one keyword argument is required. To specify no parameters, or to keep all
272
+ # the default parameter values, pass an empty Hash as a request object (see above).
273
+ #
274
+ # @param name [::String]
275
+ # Required. The name of the intent.
276
+ # Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
277
+ # @param language_code [::String]
278
+ # Optional. The language used to access language-specific data.
279
+ # If not specified, the agent's default language is used.
280
+ # For more information, see
281
+ # [Multilingual intent and entity
282
+ # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
283
+ # @param intent_view [::Google::Cloud::Dialogflow::V2::IntentView]
284
+ # Optional. The resource view to apply to the returned intent.
285
+ # @yield [result, operation] Access the result along with the TransportOperation object
286
+ # @yieldparam result [::Google::Cloud::Dialogflow::V2::Intent]
287
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
288
+ #
289
+ # @return [::Google::Cloud::Dialogflow::V2::Intent]
290
+ #
291
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
292
+ def get_intent request, options = nil
293
+ raise ::ArgumentError, "request must be provided" if request.nil?
294
+
295
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::GetIntentRequest
296
+
297
+ # Converts hash and nil to an options object
298
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
299
+
300
+ # Customize the options with defaults
301
+ call_metadata = @config.rpcs.get_intent.metadata.to_h
302
+
303
+ # Set x-goog-api-client and x-goog-user-project headers
304
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
305
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
306
+ gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
307
+ transports_version_send: [:rest]
308
+
309
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
310
+
311
+ options.apply_defaults timeout: @config.rpcs.get_intent.timeout,
312
+ metadata: call_metadata,
313
+ retry_policy: @config.rpcs.get_intent.retry_policy
314
+
315
+ options.apply_defaults timeout: @config.timeout,
316
+ metadata: @config.metadata,
317
+ retry_policy: @config.retry_policy
318
+
319
+ @intents_stub.get_intent request, options do |result, operation|
320
+ yield result, operation if block_given?
321
+ return result
322
+ end
323
+ rescue ::Gapic::Rest::Error => e
324
+ raise ::Google::Cloud::Error.from_error(e)
325
+ end
326
+
327
+ ##
328
+ # Creates an intent in the specified agent.
329
+ #
330
+ # Note: You should always train an agent prior to sending it queries. See the
331
+ # [training
332
+ # documentation](https://cloud.google.com/dialogflow/es/docs/training).
333
+ #
334
+ # @overload create_intent(request, options = nil)
335
+ # Pass arguments to `create_intent` via a request object, either of type
336
+ # {::Google::Cloud::Dialogflow::V2::CreateIntentRequest} or an equivalent Hash.
337
+ #
338
+ # @param request [::Google::Cloud::Dialogflow::V2::CreateIntentRequest, ::Hash]
339
+ # A request object representing the call parameters. Required. To specify no
340
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
341
+ # @param options [::Gapic::CallOptions, ::Hash]
342
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
343
+ #
344
+ # @overload create_intent(parent: nil, intent: nil, language_code: nil, intent_view: nil)
345
+ # Pass arguments to `create_intent` via keyword arguments. Note that at
346
+ # least one keyword argument is required. To specify no parameters, or to keep all
347
+ # the default parameter values, pass an empty Hash as a request object (see above).
348
+ #
349
+ # @param parent [::String]
350
+ # Required. The agent to create a intent for.
351
+ # Format: `projects/<Project ID>/agent`.
352
+ # @param intent [::Google::Cloud::Dialogflow::V2::Intent, ::Hash]
353
+ # Required. The intent to create.
354
+ # @param language_code [::String]
355
+ # Optional. The language used to access language-specific data.
356
+ # If not specified, the agent's default language is used.
357
+ # For more information, see
358
+ # [Multilingual intent and entity
359
+ # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
360
+ # @param intent_view [::Google::Cloud::Dialogflow::V2::IntentView]
361
+ # Optional. The resource view to apply to the returned intent.
362
+ # @yield [result, operation] Access the result along with the TransportOperation object
363
+ # @yieldparam result [::Google::Cloud::Dialogflow::V2::Intent]
364
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
365
+ #
366
+ # @return [::Google::Cloud::Dialogflow::V2::Intent]
367
+ #
368
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
369
+ def create_intent request, options = nil
370
+ raise ::ArgumentError, "request must be provided" if request.nil?
371
+
372
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::CreateIntentRequest
373
+
374
+ # Converts hash and nil to an options object
375
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
376
+
377
+ # Customize the options with defaults
378
+ call_metadata = @config.rpcs.create_intent.metadata.to_h
379
+
380
+ # Set x-goog-api-client and x-goog-user-project headers
381
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
382
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
383
+ gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
384
+ transports_version_send: [:rest]
385
+
386
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
387
+
388
+ options.apply_defaults timeout: @config.rpcs.create_intent.timeout,
389
+ metadata: call_metadata,
390
+ retry_policy: @config.rpcs.create_intent.retry_policy
391
+
392
+ options.apply_defaults timeout: @config.timeout,
393
+ metadata: @config.metadata,
394
+ retry_policy: @config.retry_policy
395
+
396
+ @intents_stub.create_intent request, options do |result, operation|
397
+ yield result, operation if block_given?
398
+ return result
399
+ end
400
+ rescue ::Gapic::Rest::Error => e
401
+ raise ::Google::Cloud::Error.from_error(e)
402
+ end
403
+
404
+ ##
405
+ # Updates the specified intent.
406
+ #
407
+ # Note: You should always train an agent prior to sending it queries. See the
408
+ # [training
409
+ # documentation](https://cloud.google.com/dialogflow/es/docs/training).
410
+ #
411
+ # @overload update_intent(request, options = nil)
412
+ # Pass arguments to `update_intent` via a request object, either of type
413
+ # {::Google::Cloud::Dialogflow::V2::UpdateIntentRequest} or an equivalent Hash.
414
+ #
415
+ # @param request [::Google::Cloud::Dialogflow::V2::UpdateIntentRequest, ::Hash]
416
+ # A request object representing the call parameters. Required. To specify no
417
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
418
+ # @param options [::Gapic::CallOptions, ::Hash]
419
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
420
+ #
421
+ # @overload update_intent(intent: nil, language_code: nil, update_mask: nil, intent_view: nil)
422
+ # Pass arguments to `update_intent` via keyword arguments. Note that at
423
+ # least one keyword argument is required. To specify no parameters, or to keep all
424
+ # the default parameter values, pass an empty Hash as a request object (see above).
425
+ #
426
+ # @param intent [::Google::Cloud::Dialogflow::V2::Intent, ::Hash]
427
+ # Required. The intent to update.
428
+ # @param language_code [::String]
429
+ # Optional. The language used to access language-specific data.
430
+ # If not specified, the agent's default language is used.
431
+ # For more information, see
432
+ # [Multilingual intent and entity
433
+ # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
434
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
435
+ # Optional. The mask to control which fields get updated.
436
+ # @param intent_view [::Google::Cloud::Dialogflow::V2::IntentView]
437
+ # Optional. The resource view to apply to the returned intent.
438
+ # @yield [result, operation] Access the result along with the TransportOperation object
439
+ # @yieldparam result [::Google::Cloud::Dialogflow::V2::Intent]
440
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
441
+ #
442
+ # @return [::Google::Cloud::Dialogflow::V2::Intent]
443
+ #
444
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
445
+ def update_intent request, options = nil
446
+ raise ::ArgumentError, "request must be provided" if request.nil?
447
+
448
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::UpdateIntentRequest
449
+
450
+ # Converts hash and nil to an options object
451
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
452
+
453
+ # Customize the options with defaults
454
+ call_metadata = @config.rpcs.update_intent.metadata.to_h
455
+
456
+ # Set x-goog-api-client and x-goog-user-project headers
457
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
458
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
459
+ gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
460
+ transports_version_send: [:rest]
461
+
462
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
463
+
464
+ options.apply_defaults timeout: @config.rpcs.update_intent.timeout,
465
+ metadata: call_metadata,
466
+ retry_policy: @config.rpcs.update_intent.retry_policy
467
+
468
+ options.apply_defaults timeout: @config.timeout,
469
+ metadata: @config.metadata,
470
+ retry_policy: @config.retry_policy
471
+
472
+ @intents_stub.update_intent request, options do |result, operation|
473
+ yield result, operation if block_given?
474
+ return result
475
+ end
476
+ rescue ::Gapic::Rest::Error => e
477
+ raise ::Google::Cloud::Error.from_error(e)
478
+ end
479
+
480
+ ##
481
+ # Deletes the specified intent and its direct or indirect followup intents.
482
+ #
483
+ # Note: You should always train an agent prior to sending it queries. See the
484
+ # [training
485
+ # documentation](https://cloud.google.com/dialogflow/es/docs/training).
486
+ #
487
+ # @overload delete_intent(request, options = nil)
488
+ # Pass arguments to `delete_intent` via a request object, either of type
489
+ # {::Google::Cloud::Dialogflow::V2::DeleteIntentRequest} or an equivalent Hash.
490
+ #
491
+ # @param request [::Google::Cloud::Dialogflow::V2::DeleteIntentRequest, ::Hash]
492
+ # A request object representing the call parameters. Required. To specify no
493
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
494
+ # @param options [::Gapic::CallOptions, ::Hash]
495
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
496
+ #
497
+ # @overload delete_intent(name: nil)
498
+ # Pass arguments to `delete_intent` via keyword arguments. Note that at
499
+ # least one keyword argument is required. To specify no parameters, or to keep all
500
+ # the default parameter values, pass an empty Hash as a request object (see above).
501
+ #
502
+ # @param name [::String]
503
+ # Required. The name of the intent to delete. If this intent has direct or
504
+ # indirect followup intents, we also delete them.
505
+ # Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
506
+ # @yield [result, operation] Access the result along with the TransportOperation object
507
+ # @yieldparam result [::Google::Protobuf::Empty]
508
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
509
+ #
510
+ # @return [::Google::Protobuf::Empty]
511
+ #
512
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
513
+ def delete_intent request, options = nil
514
+ raise ::ArgumentError, "request must be provided" if request.nil?
515
+
516
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::DeleteIntentRequest
517
+
518
+ # Converts hash and nil to an options object
519
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
520
+
521
+ # Customize the options with defaults
522
+ call_metadata = @config.rpcs.delete_intent.metadata.to_h
523
+
524
+ # Set x-goog-api-client and x-goog-user-project headers
525
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
526
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
527
+ gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
528
+ transports_version_send: [:rest]
529
+
530
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
531
+
532
+ options.apply_defaults timeout: @config.rpcs.delete_intent.timeout,
533
+ metadata: call_metadata,
534
+ retry_policy: @config.rpcs.delete_intent.retry_policy
535
+
536
+ options.apply_defaults timeout: @config.timeout,
537
+ metadata: @config.metadata,
538
+ retry_policy: @config.retry_policy
539
+
540
+ @intents_stub.delete_intent request, options do |result, operation|
541
+ yield result, operation if block_given?
542
+ return result
543
+ end
544
+ rescue ::Gapic::Rest::Error => e
545
+ raise ::Google::Cloud::Error.from_error(e)
546
+ end
547
+
548
+ ##
549
+ # Updates/Creates multiple intents in the specified agent.
550
+ #
551
+ # This method is a [long-running
552
+ # operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
553
+ # The returned `Operation` type has the following method-specific fields:
554
+ #
555
+ # - `metadata`: An empty [Struct
556
+ # message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
557
+ # - `response`:
558
+ # {::Google::Cloud::Dialogflow::V2::BatchUpdateIntentsResponse BatchUpdateIntentsResponse}
559
+ #
560
+ # Note: You should always train an agent prior to sending it queries. See the
561
+ # [training
562
+ # documentation](https://cloud.google.com/dialogflow/es/docs/training).
563
+ #
564
+ # @overload batch_update_intents(request, options = nil)
565
+ # Pass arguments to `batch_update_intents` via a request object, either of type
566
+ # {::Google::Cloud::Dialogflow::V2::BatchUpdateIntentsRequest} or an equivalent Hash.
567
+ #
568
+ # @param request [::Google::Cloud::Dialogflow::V2::BatchUpdateIntentsRequest, ::Hash]
569
+ # A request object representing the call parameters. Required. To specify no
570
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
571
+ # @param options [::Gapic::CallOptions, ::Hash]
572
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
573
+ #
574
+ # @overload batch_update_intents(parent: nil, intent_batch_uri: nil, intent_batch_inline: nil, language_code: nil, update_mask: nil, intent_view: nil)
575
+ # Pass arguments to `batch_update_intents` via keyword arguments. Note that at
576
+ # least one keyword argument is required. To specify no parameters, or to keep all
577
+ # the default parameter values, pass an empty Hash as a request object (see above).
578
+ #
579
+ # @param parent [::String]
580
+ # Required. The name of the agent to update or create intents in.
581
+ # Format: `projects/<Project ID>/agent`.
582
+ # @param intent_batch_uri [::String]
583
+ # The URI to a Google Cloud Storage file containing intents to update or
584
+ # create. The file format can either be a serialized proto (of IntentBatch
585
+ # type) or JSON object. Note: The URI must start with "gs://".
586
+ # @param intent_batch_inline [::Google::Cloud::Dialogflow::V2::IntentBatch, ::Hash]
587
+ # The collection of intents to update or create.
588
+ # @param language_code [::String]
589
+ # Optional. The language used to access language-specific data.
590
+ # If not specified, the agent's default language is used.
591
+ # For more information, see
592
+ # [Multilingual intent and entity
593
+ # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
594
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
595
+ # Optional. The mask to control which fields get updated.
596
+ # @param intent_view [::Google::Cloud::Dialogflow::V2::IntentView]
597
+ # Optional. The resource view to apply to the returned intent.
598
+ # @yield [result, operation] Access the result along with the TransportOperation object
599
+ # @yieldparam result [::Gapic::Operation]
600
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
601
+ #
602
+ # @return [::Gapic::Operation]
603
+ #
604
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
605
+ def batch_update_intents request, options = nil
606
+ raise ::ArgumentError, "request must be provided" if request.nil?
607
+
608
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::BatchUpdateIntentsRequest
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.batch_update_intents.metadata.to_h
615
+
616
+ # Set x-goog-api-client and x-goog-user-project 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::Dialogflow::V2::VERSION,
620
+ transports_version_send: [:rest]
621
+
622
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
623
+
624
+ options.apply_defaults timeout: @config.rpcs.batch_update_intents.timeout,
625
+ metadata: call_metadata,
626
+ retry_policy: @config.rpcs.batch_update_intents.retry_policy
627
+
628
+ options.apply_defaults timeout: @config.timeout,
629
+ metadata: @config.metadata,
630
+ retry_policy: @config.retry_policy
631
+
632
+ @intents_stub.batch_update_intents request, options do |result, operation|
633
+ result = ::Gapic::Operation.new result, @operations_client, options: options
634
+ yield result, operation if block_given?
635
+ return result
636
+ end
637
+ rescue ::Gapic::Rest::Error => e
638
+ raise ::Google::Cloud::Error.from_error(e)
639
+ end
640
+
641
+ ##
642
+ # Deletes intents in the specified agent.
643
+ #
644
+ # This method is a [long-running
645
+ # operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
646
+ # The returned `Operation` type has the following method-specific fields:
647
+ #
648
+ # - `metadata`: An empty [Struct
649
+ # message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
650
+ # - `response`: An [Empty
651
+ # message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
652
+ #
653
+ # Note: You should always train an agent prior to sending it queries. See the
654
+ # [training
655
+ # documentation](https://cloud.google.com/dialogflow/es/docs/training).
656
+ #
657
+ # @overload batch_delete_intents(request, options = nil)
658
+ # Pass arguments to `batch_delete_intents` via a request object, either of type
659
+ # {::Google::Cloud::Dialogflow::V2::BatchDeleteIntentsRequest} or an equivalent Hash.
660
+ #
661
+ # @param request [::Google::Cloud::Dialogflow::V2::BatchDeleteIntentsRequest, ::Hash]
662
+ # A request object representing the call parameters. Required. To specify no
663
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
664
+ # @param options [::Gapic::CallOptions, ::Hash]
665
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
666
+ #
667
+ # @overload batch_delete_intents(parent: nil, intents: nil)
668
+ # Pass arguments to `batch_delete_intents` via keyword arguments. Note that at
669
+ # least one keyword argument is required. To specify no parameters, or to keep all
670
+ # the default parameter values, pass an empty Hash as a request object (see above).
671
+ #
672
+ # @param parent [::String]
673
+ # Required. The name of the agent to delete all entities types for. Format:
674
+ # `projects/<Project ID>/agent`.
675
+ # @param intents [::Array<::Google::Cloud::Dialogflow::V2::Intent, ::Hash>]
676
+ # Required. The collection of intents to delete. Only intent `name` must be
677
+ # filled in.
678
+ # @yield [result, operation] Access the result along with the TransportOperation object
679
+ # @yieldparam result [::Gapic::Operation]
680
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
681
+ #
682
+ # @return [::Gapic::Operation]
683
+ #
684
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
685
+ def batch_delete_intents request, options = nil
686
+ raise ::ArgumentError, "request must be provided" if request.nil?
687
+
688
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::BatchDeleteIntentsRequest
689
+
690
+ # Converts hash and nil to an options object
691
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
692
+
693
+ # Customize the options with defaults
694
+ call_metadata = @config.rpcs.batch_delete_intents.metadata.to_h
695
+
696
+ # Set x-goog-api-client and x-goog-user-project headers
697
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
698
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
699
+ gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
700
+ transports_version_send: [:rest]
701
+
702
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
703
+
704
+ options.apply_defaults timeout: @config.rpcs.batch_delete_intents.timeout,
705
+ metadata: call_metadata,
706
+ retry_policy: @config.rpcs.batch_delete_intents.retry_policy
707
+
708
+ options.apply_defaults timeout: @config.timeout,
709
+ metadata: @config.metadata,
710
+ retry_policy: @config.retry_policy
711
+
712
+ @intents_stub.batch_delete_intents request, options do |result, operation|
713
+ result = ::Gapic::Operation.new result, @operations_client, options: options
714
+ yield result, operation if block_given?
715
+ return result
716
+ end
717
+ rescue ::Gapic::Rest::Error => e
718
+ raise ::Google::Cloud::Error.from_error(e)
719
+ end
720
+
721
+ ##
722
+ # Configuration class for the Intents REST API.
723
+ #
724
+ # This class represents the configuration for Intents REST,
725
+ # providing control over timeouts, retry behavior, logging, transport
726
+ # parameters, and other low-level controls. Certain parameters can also be
727
+ # applied individually to specific RPCs. See
728
+ # {::Google::Cloud::Dialogflow::V2::Intents::Rest::Client::Configuration::Rpcs}
729
+ # for a list of RPCs that can be configured independently.
730
+ #
731
+ # Configuration can be applied globally to all clients, or to a single client
732
+ # on construction.
733
+ #
734
+ # @example
735
+ #
736
+ # # Modify the global config, setting the timeout for
737
+ # # list_intents to 20 seconds,
738
+ # # and all remaining timeouts to 10 seconds.
739
+ # ::Google::Cloud::Dialogflow::V2::Intents::Rest::Client.configure do |config|
740
+ # config.timeout = 10.0
741
+ # config.rpcs.list_intents.timeout = 20.0
742
+ # end
743
+ #
744
+ # # Apply the above configuration only to a new client.
745
+ # client = ::Google::Cloud::Dialogflow::V2::Intents::Rest::Client.new do |config|
746
+ # config.timeout = 10.0
747
+ # config.rpcs.list_intents.timeout = 20.0
748
+ # end
749
+ #
750
+ # @!attribute [rw] endpoint
751
+ # The hostname or hostname:port of the service endpoint.
752
+ # Defaults to `"dialogflow.googleapis.com"`.
753
+ # @return [::String]
754
+ # @!attribute [rw] credentials
755
+ # Credentials to send with calls. You may provide any of the following types:
756
+ # * (`String`) The path to a service account key file in JSON format
757
+ # * (`Hash`) A service account key as a Hash
758
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
759
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
760
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
761
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
762
+ # * (`nil`) indicating no credentials
763
+ # @return [::Object]
764
+ # @!attribute [rw] scope
765
+ # The OAuth scopes
766
+ # @return [::Array<::String>]
767
+ # @!attribute [rw] lib_name
768
+ # The library name as recorded in instrumentation and logging
769
+ # @return [::String]
770
+ # @!attribute [rw] lib_version
771
+ # The library version as recorded in instrumentation and logging
772
+ # @return [::String]
773
+ # @!attribute [rw] timeout
774
+ # The call timeout in seconds.
775
+ # @return [::Numeric]
776
+ # @!attribute [rw] metadata
777
+ # Additional headers to be sent with the call.
778
+ # @return [::Hash{::Symbol=>::String}]
779
+ # @!attribute [rw] retry_policy
780
+ # The retry policy. The value is a hash with the following keys:
781
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
782
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
783
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
784
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
785
+ # trigger a retry.
786
+ # @return [::Hash]
787
+ # @!attribute [rw] quota_project
788
+ # A separate project against which to charge quota.
789
+ # @return [::String]
790
+ #
791
+ class Configuration
792
+ extend ::Gapic::Config
793
+
794
+ config_attr :endpoint, "dialogflow.googleapis.com", ::String
795
+ config_attr :credentials, nil do |value|
796
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
797
+ allowed.any? { |klass| klass === value }
798
+ end
799
+ config_attr :scope, nil, ::String, ::Array, nil
800
+ config_attr :lib_name, nil, ::String, nil
801
+ config_attr :lib_version, nil, ::String, nil
802
+ config_attr :timeout, nil, ::Numeric, nil
803
+ config_attr :metadata, nil, ::Hash, nil
804
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
805
+ config_attr :quota_project, nil, ::String, nil
806
+
807
+ # @private
808
+ # Overrides for http bindings for the RPCs of this service
809
+ # are only used when this service is used as mixin, and only
810
+ # by the host service.
811
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
812
+ config_attr :bindings_override, {}, ::Hash, nil
813
+
814
+ # @private
815
+ def initialize parent_config = nil
816
+ @parent_config = parent_config unless parent_config.nil?
817
+
818
+ yield self if block_given?
819
+ end
820
+
821
+ ##
822
+ # Configurations for individual RPCs
823
+ # @return [Rpcs]
824
+ #
825
+ def rpcs
826
+ @rpcs ||= begin
827
+ parent_rpcs = nil
828
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
829
+ Rpcs.new parent_rpcs
830
+ end
831
+ end
832
+
833
+ ##
834
+ # Configuration RPC class for the Intents API.
835
+ #
836
+ # Includes fields providing the configuration for each RPC in this service.
837
+ # Each configuration object is of type `Gapic::Config::Method` and includes
838
+ # the following configuration fields:
839
+ #
840
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
841
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
842
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
843
+ # include the following keys:
844
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
845
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
846
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
847
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
848
+ # trigger a retry.
849
+ #
850
+ class Rpcs
851
+ ##
852
+ # RPC-specific configuration for `list_intents`
853
+ # @return [::Gapic::Config::Method]
854
+ #
855
+ attr_reader :list_intents
856
+ ##
857
+ # RPC-specific configuration for `get_intent`
858
+ # @return [::Gapic::Config::Method]
859
+ #
860
+ attr_reader :get_intent
861
+ ##
862
+ # RPC-specific configuration for `create_intent`
863
+ # @return [::Gapic::Config::Method]
864
+ #
865
+ attr_reader :create_intent
866
+ ##
867
+ # RPC-specific configuration for `update_intent`
868
+ # @return [::Gapic::Config::Method]
869
+ #
870
+ attr_reader :update_intent
871
+ ##
872
+ # RPC-specific configuration for `delete_intent`
873
+ # @return [::Gapic::Config::Method]
874
+ #
875
+ attr_reader :delete_intent
876
+ ##
877
+ # RPC-specific configuration for `batch_update_intents`
878
+ # @return [::Gapic::Config::Method]
879
+ #
880
+ attr_reader :batch_update_intents
881
+ ##
882
+ # RPC-specific configuration for `batch_delete_intents`
883
+ # @return [::Gapic::Config::Method]
884
+ #
885
+ attr_reader :batch_delete_intents
886
+
887
+ # @private
888
+ def initialize parent_rpcs = nil
889
+ list_intents_config = parent_rpcs.list_intents if parent_rpcs.respond_to? :list_intents
890
+ @list_intents = ::Gapic::Config::Method.new list_intents_config
891
+ get_intent_config = parent_rpcs.get_intent if parent_rpcs.respond_to? :get_intent
892
+ @get_intent = ::Gapic::Config::Method.new get_intent_config
893
+ create_intent_config = parent_rpcs.create_intent if parent_rpcs.respond_to? :create_intent
894
+ @create_intent = ::Gapic::Config::Method.new create_intent_config
895
+ update_intent_config = parent_rpcs.update_intent if parent_rpcs.respond_to? :update_intent
896
+ @update_intent = ::Gapic::Config::Method.new update_intent_config
897
+ delete_intent_config = parent_rpcs.delete_intent if parent_rpcs.respond_to? :delete_intent
898
+ @delete_intent = ::Gapic::Config::Method.new delete_intent_config
899
+ batch_update_intents_config = parent_rpcs.batch_update_intents if parent_rpcs.respond_to? :batch_update_intents
900
+ @batch_update_intents = ::Gapic::Config::Method.new batch_update_intents_config
901
+ batch_delete_intents_config = parent_rpcs.batch_delete_intents if parent_rpcs.respond_to? :batch_delete_intents
902
+ @batch_delete_intents = ::Gapic::Config::Method.new batch_delete_intents_config
903
+
904
+ yield self if block_given?
905
+ end
906
+ end
907
+ end
908
+ end
909
+ end
910
+ end
911
+ end
912
+ end
913
+ end
914
+ end