google-cloud-dialogflow-cx-v3 0.13.0 → 0.15.0

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