google-cloud-discovery_engine-v1beta 0.10.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (140) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/discovery_engine/v1beta/completion_service/client.rb +9 -3
  3. data/lib/google/cloud/discovery_engine/v1beta/completion_service/operations.rb +13 -5
  4. data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/client.rb +9 -3
  5. data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/operations.rb +21 -6
  6. data/lib/google/cloud/discovery_engine/v1beta/control_service/client.rb +875 -0
  7. data/lib/google/cloud/discovery_engine/v1beta/control_service/credentials.rb +47 -0
  8. data/lib/google/cloud/discovery_engine/v1beta/control_service/paths.rb +167 -0
  9. data/lib/google/cloud/discovery_engine/v1beta/control_service/rest/client.rb +814 -0
  10. data/lib/google/cloud/discovery_engine/v1beta/control_service/rest/service_stub.rb +440 -0
  11. data/lib/google/cloud/discovery_engine/v1beta/control_service/rest.rb +55 -0
  12. data/lib/google/cloud/discovery_engine/v1beta/control_service.rb +58 -0
  13. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/client.rb +764 -6
  14. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/paths.rb +199 -0
  15. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/client.rb +715 -6
  16. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/service_stub.rb +520 -0
  17. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/client.rb +15 -7
  18. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/operations.rb +13 -5
  19. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/client.rb +15 -7
  20. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/operations.rb +21 -6
  21. data/lib/google/cloud/discovery_engine/v1beta/document_service/client.rb +71 -37
  22. data/lib/google/cloud/discovery_engine/v1beta/document_service/operations.rb +13 -5
  23. data/lib/google/cloud/discovery_engine/v1beta/document_service/paths.rb +21 -0
  24. data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/client.rb +71 -37
  25. data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/operations.rb +21 -6
  26. data/lib/google/cloud/discovery_engine/v1beta/engine_service/client.rb +312 -5
  27. data/lib/google/cloud/discovery_engine/v1beta/engine_service/operations.rb +13 -5
  28. data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/client.rb +291 -5
  29. data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/operations.rb +21 -6
  30. data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/service_stub.rb +180 -0
  31. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/client.rb +471 -0
  32. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/credentials.rb +47 -0
  33. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/paths.rb +52 -0
  34. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest/client.rb +438 -0
  35. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest/service_stub.rb +129 -0
  36. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest.rb +52 -0
  37. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service.rb +55 -0
  38. data/lib/google/cloud/discovery_engine/v1beta/project_service/client.rb +485 -0
  39. data/lib/google/cloud/discovery_engine/v1beta/project_service/credentials.rb +47 -0
  40. data/lib/google/cloud/discovery_engine/v1beta/project_service/operations.rb +809 -0
  41. data/lib/google/cloud/discovery_engine/v1beta/project_service/paths.rb +47 -0
  42. data/lib/google/cloud/discovery_engine/v1beta/project_service/rest/client.rb +452 -0
  43. data/lib/google/cloud/discovery_engine/v1beta/project_service/rest/operations.rb +1092 -0
  44. data/lib/google/cloud/discovery_engine/v1beta/project_service/rest/service_stub.rb +129 -0
  45. data/lib/google/cloud/discovery_engine/v1beta/project_service/rest.rb +54 -0
  46. data/lib/google/cloud/discovery_engine/v1beta/project_service.rb +57 -0
  47. data/lib/google/cloud/discovery_engine/v1beta/rank_service/client.rb +481 -0
  48. data/lib/google/cloud/discovery_engine/v1beta/rank_service/credentials.rb +47 -0
  49. data/lib/google/cloud/discovery_engine/v1beta/rank_service/paths.rb +52 -0
  50. data/lib/google/cloud/discovery_engine/v1beta/rank_service/rest/client.rb +448 -0
  51. data/lib/google/cloud/discovery_engine/v1beta/rank_service/rest/service_stub.rb +129 -0
  52. data/lib/google/cloud/discovery_engine/v1beta/rank_service/rest.rb +52 -0
  53. data/lib/google/cloud/discovery_engine/v1beta/rank_service.rb +55 -0
  54. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/client.rb +24 -19
  55. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/paths.rb +66 -0
  56. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/rest/client.rb +24 -19
  57. data/lib/google/cloud/discovery_engine/v1beta/rest.rb +4 -0
  58. data/lib/google/cloud/discovery_engine/v1beta/schema_service/client.rb +18 -10
  59. data/lib/google/cloud/discovery_engine/v1beta/schema_service/operations.rb +13 -5
  60. data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/client.rb +18 -10
  61. data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/operations.rb +21 -6
  62. data/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb +26 -14
  63. data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb +26 -14
  64. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/client.rb +104 -2
  65. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/operations.rb +13 -5
  66. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/client.rb +97 -2
  67. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/operations.rb +21 -6
  68. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/service_stub.rb +59 -0
  69. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/client.rb +9 -3
  70. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/rest/client.rb +9 -3
  71. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/client.rb +27 -12
  72. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/operations.rb +13 -5
  73. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/client.rb +27 -12
  74. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/operations.rb +21 -6
  75. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/client.rb +23 -6
  76. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/operations.rb +13 -5
  77. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/paths.rb +21 -0
  78. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/client.rb +23 -6
  79. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/operations.rb +21 -6
  80. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/service_stub.rb +8 -0
  81. data/lib/google/cloud/discovery_engine/v1beta/version.rb +1 -1
  82. data/lib/google/cloud/discovery_engine/v1beta.rb +4 -0
  83. data/lib/google/cloud/discoveryengine/v1beta/answer_pb.rb +69 -0
  84. data/lib/google/cloud/discoveryengine/v1beta/common_pb.rb +2 -1
  85. data/lib/google/cloud/discoveryengine/v1beta/control_pb.rb +55 -0
  86. data/lib/google/cloud/discoveryengine/v1beta/control_service_pb.rb +57 -0
  87. data/lib/google/cloud/discoveryengine/v1beta/control_service_services_pb.rb +69 -0
  88. data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_pb.rb +32 -1
  89. data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_services_pb.rb +25 -0
  90. data/lib/google/cloud/discoveryengine/v1beta/custom_tuning_model_pb.rb +48 -0
  91. data/lib/google/cloud/discoveryengine/v1beta/document_processing_config_pb.rb +1 -1
  92. data/lib/google/cloud/discoveryengine/v1beta/document_service_pb.rb +3 -1
  93. data/lib/google/cloud/discoveryengine/v1beta/document_service_services_pb.rb +1 -1
  94. data/lib/google/cloud/discoveryengine/v1beta/engine_pb.rb +1 -1
  95. data/lib/google/cloud/discoveryengine/v1beta/engine_service_pb.rb +6 -1
  96. data/lib/google/cloud/discoveryengine/v1beta/engine_service_services_pb.rb +12 -0
  97. data/lib/google/cloud/discoveryengine/v1beta/grounded_generation_service_pb.rb +52 -0
  98. data/lib/google/cloud/discoveryengine/v1beta/grounded_generation_service_services_pb.rb +45 -0
  99. data/lib/google/cloud/discoveryengine/v1beta/grounding_pb.rb +46 -0
  100. data/lib/google/cloud/discoveryengine/v1beta/import_config_pb.rb +13 -1
  101. data/lib/google/cloud/discoveryengine/v1beta/project_pb.rb +49 -0
  102. data/lib/google/cloud/discoveryengine/v1beta/project_service_pb.rb +50 -0
  103. data/lib/google/cloud/discoveryengine/v1beta/project_service_services_pb.rb +51 -0
  104. data/lib/google/cloud/discoveryengine/v1beta/rank_service_pb.rb +49 -0
  105. data/lib/google/cloud/discoveryengine/v1beta/rank_service_services_pb.rb +45 -0
  106. data/lib/google/cloud/discoveryengine/v1beta/search_service_pb.rb +7 -1
  107. data/lib/google/cloud/discoveryengine/v1beta/search_tuning_service_pb.rb +5 -1
  108. data/lib/google/cloud/discoveryengine/v1beta/search_tuning_service_services_pb.rb +2 -0
  109. data/lib/google/cloud/discoveryengine/v1beta/session_pb.rb +50 -0
  110. data/lib/google/cloud/discoveryengine/v1beta/site_search_engine_pb.rb +1 -1
  111. data/lib/google/cloud/discoveryengine/v1beta/user_event_pb.rb +1 -1
  112. data/lib/google/cloud/discoveryengine/v1beta/user_event_service_pb.rb +1 -1
  113. data/lib/google/cloud/discoveryengine/v1beta/user_event_service_services_pb.rb +1 -1
  114. data/proto_docs/google/cloud/discoveryengine/v1beta/answer.rb +362 -0
  115. data/proto_docs/google/cloud/discoveryengine/v1beta/common.rb +25 -1
  116. data/proto_docs/google/cloud/discoveryengine/v1beta/control.rb +209 -0
  117. data/proto_docs/google/cloud/discoveryengine/v1beta/control_service.rb +126 -0
  118. data/proto_docs/google/cloud/discoveryengine/v1beta/conversation.rb +2 -2
  119. data/proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb +491 -0
  120. data/proto_docs/google/cloud/discoveryengine/v1beta/custom_tuning_model.rb +75 -0
  121. data/proto_docs/google/cloud/discoveryengine/v1beta/data_store_service.rb +2 -2
  122. data/proto_docs/google/cloud/discoveryengine/v1beta/document_processing_config.rb +4 -5
  123. data/proto_docs/google/cloud/discoveryengine/v1beta/document_service.rb +9 -6
  124. data/proto_docs/google/cloud/discoveryengine/v1beta/engine.rb +5 -5
  125. data/proto_docs/google/cloud/discoveryengine/v1beta/engine_service.rb +51 -0
  126. data/proto_docs/google/cloud/discoveryengine/v1beta/grounded_generation_service.rb +144 -0
  127. data/proto_docs/google/cloud/discoveryengine/v1beta/grounding.rb +79 -0
  128. data/proto_docs/google/cloud/discoveryengine/v1beta/import_config.rb +312 -26
  129. data/proto_docs/google/cloud/discoveryengine/v1beta/project.rb +106 -0
  130. data/proto_docs/google/cloud/discoveryengine/v1beta/project_service.rb +57 -0
  131. data/proto_docs/google/cloud/discoveryengine/v1beta/rank_service.rb +127 -0
  132. data/proto_docs/google/cloud/discoveryengine/v1beta/recommendation_service.rb +20 -19
  133. data/proto_docs/google/cloud/discoveryengine/v1beta/schema_service.rb +5 -5
  134. data/proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb +181 -43
  135. data/proto_docs/google/cloud/discoveryengine/v1beta/search_tuning_service.rb +47 -1
  136. data/proto_docs/google/cloud/discoveryengine/v1beta/session.rb +88 -0
  137. data/proto_docs/google/cloud/discoveryengine/v1beta/site_search_engine.rb +3 -0
  138. data/proto_docs/google/cloud/discoveryengine/v1beta/user_event.rb +25 -4
  139. data/proto_docs/google/cloud/discoveryengine/v1beta/user_event_service.rb +13 -1
  140. metadata +56 -2
@@ -33,6 +33,9 @@ module Google
33
33
  # Service for search tuning.
34
34
  #
35
35
  class Client
36
+ # @private
37
+ API_VERSION = ""
38
+
36
39
  # @private
37
40
  DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
38
41
 
@@ -195,7 +198,7 @@ module Google
195
198
  # @param options [::Gapic::CallOptions, ::Hash]
196
199
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
197
200
  #
198
- # @overload train_custom_model(gcs_training_input: nil, data_store: nil, model_type: nil, error_config: nil)
201
+ # @overload train_custom_model(gcs_training_input: nil, data_store: nil, model_type: nil, error_config: nil, model_id: nil)
199
202
  # Pass arguments to `train_custom_model` via keyword arguments. Note that at
200
203
  # least one keyword argument is required. To specify no parameters, or to keep all
201
204
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -213,6 +216,8 @@ module Google
213
216
  # @param error_config [::Google::Cloud::DiscoveryEngine::V1beta::ImportErrorConfig, ::Hash]
214
217
  # The desired location of errors incurred during the data ingestion and
215
218
  # training.
219
+ # @param model_id [::String]
220
+ # If not provided, a UUID will be generated.
216
221
  # @yield [result, operation] Access the result along with the TransportOperation object
217
222
  # @yieldparam result [::Gapic::Operation]
218
223
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -254,12 +259,13 @@ module Google
254
259
  # Customize the options with defaults
255
260
  call_metadata = @config.rpcs.train_custom_model.metadata.to_h
256
261
 
257
- # Set x-goog-api-client and x-goog-user-project headers
262
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
258
263
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
259
264
  lib_name: @config.lib_name, lib_version: @config.lib_version,
260
265
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
261
266
  transports_version_send: [:rest]
262
267
 
268
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
263
269
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
264
270
 
265
271
  options.apply_defaults timeout: @config.rpcs.train_custom_model.timeout,
@@ -279,6 +285,88 @@ module Google
279
285
  raise ::Google::Cloud::Error.from_error(e)
280
286
  end
281
287
 
288
+ ##
289
+ # Gets a list of all the custom models.
290
+ #
291
+ # @overload list_custom_models(request, options = nil)
292
+ # Pass arguments to `list_custom_models` via a request object, either of type
293
+ # {::Google::Cloud::DiscoveryEngine::V1beta::ListCustomModelsRequest} or an equivalent Hash.
294
+ #
295
+ # @param request [::Google::Cloud::DiscoveryEngine::V1beta::ListCustomModelsRequest, ::Hash]
296
+ # A request object representing the call parameters. Required. To specify no
297
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
298
+ # @param options [::Gapic::CallOptions, ::Hash]
299
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
300
+ #
301
+ # @overload list_custom_models(data_store: nil)
302
+ # Pass arguments to `list_custom_models` via keyword arguments. Note that at
303
+ # least one keyword argument is required. To specify no parameters, or to keep all
304
+ # the default parameter values, pass an empty Hash as a request object (see above).
305
+ #
306
+ # @param data_store [::String]
307
+ # Required. The resource name of the parent Data Store, such as
308
+ # `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.
309
+ # This field is used to identify the data store where to fetch the models
310
+ # from.
311
+ # @yield [result, operation] Access the result along with the TransportOperation object
312
+ # @yieldparam result [::Google::Cloud::DiscoveryEngine::V1beta::ListCustomModelsResponse]
313
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
314
+ #
315
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::ListCustomModelsResponse]
316
+ #
317
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
318
+ #
319
+ # @example Basic example
320
+ # require "google/cloud/discovery_engine/v1beta"
321
+ #
322
+ # # Create a client object. The client can be reused for multiple calls.
323
+ # client = Google::Cloud::DiscoveryEngine::V1beta::SearchTuningService::Rest::Client.new
324
+ #
325
+ # # Create a request. To set request fields, pass in keyword arguments.
326
+ # request = Google::Cloud::DiscoveryEngine::V1beta::ListCustomModelsRequest.new
327
+ #
328
+ # # Call the list_custom_models method.
329
+ # result = client.list_custom_models request
330
+ #
331
+ # # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::ListCustomModelsResponse.
332
+ # p result
333
+ #
334
+ def list_custom_models request, options = nil
335
+ raise ::ArgumentError, "request must be provided" if request.nil?
336
+
337
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::ListCustomModelsRequest
338
+
339
+ # Converts hash and nil to an options object
340
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
341
+
342
+ # Customize the options with defaults
343
+ call_metadata = @config.rpcs.list_custom_models.metadata.to_h
344
+
345
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
346
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
347
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
348
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
349
+ transports_version_send: [:rest]
350
+
351
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
352
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
353
+
354
+ options.apply_defaults timeout: @config.rpcs.list_custom_models.timeout,
355
+ metadata: call_metadata,
356
+ retry_policy: @config.rpcs.list_custom_models.retry_policy
357
+
358
+ options.apply_defaults timeout: @config.timeout,
359
+ metadata: @config.metadata,
360
+ retry_policy: @config.retry_policy
361
+
362
+ @search_tuning_service_stub.list_custom_models request, options do |result, operation|
363
+ yield result, operation if block_given?
364
+ return result
365
+ end
366
+ rescue ::Gapic::Rest::Error => e
367
+ raise ::Google::Cloud::Error.from_error(e)
368
+ end
369
+
282
370
  ##
283
371
  # Configuration class for the SearchTuningService REST API.
284
372
  #
@@ -417,11 +505,18 @@ module Google
417
505
  # @return [::Gapic::Config::Method]
418
506
  #
419
507
  attr_reader :train_custom_model
508
+ ##
509
+ # RPC-specific configuration for `list_custom_models`
510
+ # @return [::Gapic::Config::Method]
511
+ #
512
+ attr_reader :list_custom_models
420
513
 
421
514
  # @private
422
515
  def initialize parent_rpcs = nil
423
516
  train_custom_model_config = parent_rpcs.train_custom_model if parent_rpcs.respond_to? :train_custom_model
424
517
  @train_custom_model = ::Gapic::Config::Method.new train_custom_model_config
518
+ list_custom_models_config = parent_rpcs.list_custom_models if parent_rpcs.respond_to? :list_custom_models
519
+ @list_custom_models = ::Gapic::Config::Method.new list_custom_models_config
425
520
 
426
521
  yield self if block_given?
427
522
  end
@@ -26,6 +26,9 @@ module Google
26
26
  module Rest
27
27
  # Service that implements Longrunning Operations API.
28
28
  class Operations
29
+ # @private
30
+ API_VERSION = ""
31
+
29
32
  # @private
30
33
  DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
31
34
 
@@ -181,12 +184,13 @@ module Google
181
184
  # Customize the options with defaults
182
185
  call_metadata = @config.rpcs.list_operations.metadata.to_h
183
186
 
184
- # Set x-goog-api-client and x-goog-user-project headers
187
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
185
188
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
186
189
  lib_name: @config.lib_name, lib_version: @config.lib_version,
187
190
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
188
191
  transports_version_send: [:rest]
189
192
 
193
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
190
194
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
191
195
 
192
196
  options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
@@ -269,12 +273,13 @@ module Google
269
273
  # Customize the options with defaults
270
274
  call_metadata = @config.rpcs.get_operation.metadata.to_h
271
275
 
272
- # Set x-goog-api-client and x-goog-user-project headers
276
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
273
277
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
274
278
  lib_name: @config.lib_name, lib_version: @config.lib_version,
275
279
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
276
280
  transports_version_send: [:rest]
277
281
 
282
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
278
283
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
279
284
 
280
285
  options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
@@ -351,12 +356,13 @@ module Google
351
356
  # Customize the options with defaults
352
357
  call_metadata = @config.rpcs.delete_operation.metadata.to_h
353
358
 
354
- # Set x-goog-api-client and x-goog-user-project headers
359
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
355
360
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
356
361
  lib_name: @config.lib_name, lib_version: @config.lib_version,
357
362
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
358
363
  transports_version_send: [:rest]
359
364
 
365
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
360
366
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
361
367
 
362
368
  options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
@@ -438,12 +444,13 @@ module Google
438
444
  # Customize the options with defaults
439
445
  call_metadata = @config.rpcs.cancel_operation.metadata.to_h
440
446
 
441
- # Set x-goog-api-client and x-goog-user-project headers
447
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
442
448
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
443
449
  lib_name: @config.lib_name, lib_version: @config.lib_version,
444
450
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
445
451
  transports_version_send: [:rest]
446
452
 
453
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
447
454
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
448
455
 
449
456
  options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
@@ -1060,10 +1067,18 @@ module Google
1060
1067
  transcoder = Gapic::Rest::GrpcTranscoder.new
1061
1068
  .with_bindings(
1062
1069
  uri_method: :post,
1063
- uri_template: "/v1/{name}:cancel",
1070
+ uri_template: "/v1beta/{name}:cancel",
1064
1071
  body: "*",
1065
1072
  matches: [
1066
- ["name", %r{^operations(?:/.*)?$}, true]
1073
+ ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+/?$}, false]
1074
+ ]
1075
+ )
1076
+ .with_bindings(
1077
+ uri_method: :post,
1078
+ uri_template: "/v1beta/{name}:cancel",
1079
+ body: "*",
1080
+ matches: [
1081
+ ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+/?$}, false]
1067
1082
  ]
1068
1083
  )
1069
1084
  transcoder.transcode request_pb
@@ -99,6 +99,44 @@ module Google
99
99
  result
100
100
  end
101
101
 
102
+ ##
103
+ # Baseline implementation for the list_custom_models REST call
104
+ #
105
+ # @param request_pb [::Google::Cloud::DiscoveryEngine::V1beta::ListCustomModelsRequest]
106
+ # A request object representing the call parameters. Required.
107
+ # @param options [::Gapic::CallOptions]
108
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
109
+ #
110
+ # @yield [result, operation] Access the result along with the TransportOperation object
111
+ # @yieldparam result [::Google::Cloud::DiscoveryEngine::V1beta::ListCustomModelsResponse]
112
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
113
+ #
114
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::ListCustomModelsResponse]
115
+ # A result object deserialized from the server's reply
116
+ def list_custom_models request_pb, options = nil
117
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
118
+
119
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_custom_models_request request_pb
120
+ query_string_params = if query_string_params.any?
121
+ query_string_params.to_h { |p| p.split "=", 2 }
122
+ else
123
+ {}
124
+ end
125
+
126
+ response = @client_stub.make_http_request(
127
+ verb,
128
+ uri: uri,
129
+ body: body || "",
130
+ params: query_string_params,
131
+ options: options
132
+ )
133
+ operation = ::Gapic::Rest::TransportOperation.new response
134
+ result = ::Google::Cloud::DiscoveryEngine::V1beta::ListCustomModelsResponse.decode_json response.body, ignore_unknown_fields: true
135
+
136
+ yield result, operation if block_given?
137
+ result
138
+ end
139
+
102
140
  ##
103
141
  # @private
104
142
  #
@@ -120,6 +158,27 @@ module Google
120
158
  )
121
159
  transcoder.transcode request_pb
122
160
  end
161
+
162
+ ##
163
+ # @private
164
+ #
165
+ # GRPC transcoding helper method for the list_custom_models REST call
166
+ #
167
+ # @param request_pb [::Google::Cloud::DiscoveryEngine::V1beta::ListCustomModelsRequest]
168
+ # A request object representing the call parameters. Required.
169
+ # @return [Array(String, [String, nil], Hash{String => String})]
170
+ # Uri, Body, Query string parameters
171
+ def self.transcode_list_custom_models_request request_pb
172
+ transcoder = Gapic::Rest::GrpcTranscoder.new
173
+ .with_bindings(
174
+ uri_method: :get,
175
+ uri_template: "/v1beta/{data_store}/customModels",
176
+ matches: [
177
+ ["data_store", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/?$}, false]
178
+ ]
179
+ )
180
+ transcoder.transcode request_pb
181
+ end
123
182
  end
124
183
  end
125
184
  end
@@ -32,6 +32,9 @@ module Google
32
32
  # {::Google::Cloud::DiscoveryEngine::V1beta::ServingConfig ServingConfig}.
33
33
  #
34
34
  class Client
35
+ # @private
36
+ API_VERSION = ""
37
+
35
38
  # @private
36
39
  DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
37
40
 
@@ -241,10 +244,11 @@ module Google
241
244
  # Customize the options with defaults
242
245
  metadata = @config.rpcs.update_serving_config.metadata.to_h
243
246
 
244
- # Set x-goog-api-client and x-goog-user-project headers
247
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
245
248
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
246
249
  lib_name: @config.lib_name, lib_version: @config.lib_version,
247
250
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
251
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
248
252
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
249
253
 
250
254
  header_params = {}
@@ -329,10 +333,11 @@ module Google
329
333
  # Customize the options with defaults
330
334
  metadata = @config.rpcs.get_serving_config.metadata.to_h
331
335
 
332
- # Set x-goog-api-client and x-goog-user-project headers
336
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
333
337
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
334
338
  lib_name: @config.lib_name, lib_version: @config.lib_version,
335
339
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
340
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
336
341
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
337
342
 
338
343
  header_params = {}
@@ -426,10 +431,11 @@ module Google
426
431
  # Customize the options with defaults
427
432
  metadata = @config.rpcs.list_serving_configs.metadata.to_h
428
433
 
429
- # Set x-goog-api-client and x-goog-user-project headers
434
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
430
435
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
431
436
  lib_name: @config.lib_name, lib_version: @config.lib_version,
432
437
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
438
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
433
439
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
434
440
 
435
441
  header_params = {}
@@ -34,6 +34,9 @@ module Google
34
34
  # {::Google::Cloud::DiscoveryEngine::V1beta::ServingConfig ServingConfig}.
35
35
  #
36
36
  class Client
37
+ # @private
38
+ API_VERSION = ""
39
+
37
40
  # @private
38
41
  DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
39
42
 
@@ -233,12 +236,13 @@ module Google
233
236
  # Customize the options with defaults
234
237
  call_metadata = @config.rpcs.update_serving_config.metadata.to_h
235
238
 
236
- # Set x-goog-api-client and x-goog-user-project headers
239
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
237
240
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
238
241
  lib_name: @config.lib_name, lib_version: @config.lib_version,
239
242
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
240
243
  transports_version_send: [:rest]
241
244
 
245
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
242
246
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
243
247
 
244
248
  options.apply_defaults timeout: @config.rpcs.update_serving_config.timeout,
@@ -314,12 +318,13 @@ module Google
314
318
  # Customize the options with defaults
315
319
  call_metadata = @config.rpcs.get_serving_config.metadata.to_h
316
320
 
317
- # Set x-goog-api-client and x-goog-user-project headers
321
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
318
322
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
319
323
  lib_name: @config.lib_name, lib_version: @config.lib_version,
320
324
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
321
325
  transports_version_send: [:rest]
322
326
 
327
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
323
328
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
324
329
 
325
330
  options.apply_defaults timeout: @config.rpcs.get_serving_config.timeout,
@@ -404,12 +409,13 @@ module Google
404
409
  # Customize the options with defaults
405
410
  call_metadata = @config.rpcs.list_serving_configs.metadata.to_h
406
411
 
407
- # Set x-goog-api-client and x-goog-user-project headers
412
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
408
413
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
409
414
  lib_name: @config.lib_name, lib_version: @config.lib_version,
410
415
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
411
416
  transports_version_send: [:rest]
412
417
 
418
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
413
419
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
414
420
 
415
421
  options.apply_defaults timeout: @config.rpcs.list_serving_configs.timeout,
@@ -31,6 +31,9 @@ module Google
31
31
  # Service for managing site search related resources.
32
32
  #
33
33
  class Client
34
+ # @private
35
+ API_VERSION = ""
36
+
34
37
  # @private
35
38
  DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
36
39
 
@@ -252,10 +255,11 @@ module Google
252
255
  # Customize the options with defaults
253
256
  metadata = @config.rpcs.get_site_search_engine.metadata.to_h
254
257
 
255
- # Set x-goog-api-client and x-goog-user-project headers
258
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
256
259
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
257
260
  lib_name: @config.lib_name, lib_version: @config.lib_version,
258
261
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
262
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
259
263
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
260
264
 
261
265
  header_params = {}
@@ -349,10 +353,11 @@ module Google
349
353
  # Customize the options with defaults
350
354
  metadata = @config.rpcs.create_target_site.metadata.to_h
351
355
 
352
- # Set x-goog-api-client and x-goog-user-project headers
356
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
353
357
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
354
358
  lib_name: @config.lib_name, lib_version: @config.lib_version,
355
359
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
360
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
356
361
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
357
362
 
358
363
  header_params = {}
@@ -449,10 +454,11 @@ module Google
449
454
  # Customize the options with defaults
450
455
  metadata = @config.rpcs.batch_create_target_sites.metadata.to_h
451
456
 
452
- # Set x-goog-api-client and x-goog-user-project headers
457
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
453
458
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
454
459
  lib_name: @config.lib_name, lib_version: @config.lib_version,
455
460
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
461
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
456
462
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
457
463
 
458
464
  header_params = {}
@@ -545,10 +551,11 @@ module Google
545
551
  # Customize the options with defaults
546
552
  metadata = @config.rpcs.get_target_site.metadata.to_h
547
553
 
548
- # Set x-goog-api-client and x-goog-user-project headers
554
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
549
555
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
550
556
  lib_name: @config.lib_name, lib_version: @config.lib_version,
551
557
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
558
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
552
559
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
553
560
 
554
561
  header_params = {}
@@ -643,10 +650,11 @@ module Google
643
650
  # Customize the options with defaults
644
651
  metadata = @config.rpcs.update_target_site.metadata.to_h
645
652
 
646
- # Set x-goog-api-client and x-goog-user-project headers
653
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
647
654
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
648
655
  lib_name: @config.lib_name, lib_version: @config.lib_version,
649
656
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
657
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
650
658
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
651
659
 
652
660
  header_params = {}
@@ -746,10 +754,11 @@ module Google
746
754
  # Customize the options with defaults
747
755
  metadata = @config.rpcs.delete_target_site.metadata.to_h
748
756
 
749
- # Set x-goog-api-client and x-goog-user-project headers
757
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
750
758
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
751
759
  lib_name: @config.lib_name, lib_version: @config.lib_version,
752
760
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
761
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
753
762
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
754
763
 
755
764
  header_params = {}
@@ -855,10 +864,11 @@ module Google
855
864
  # Customize the options with defaults
856
865
  metadata = @config.rpcs.list_target_sites.metadata.to_h
857
866
 
858
- # Set x-goog-api-client and x-goog-user-project headers
867
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
859
868
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
860
869
  lib_name: @config.lib_name, lib_version: @config.lib_version,
861
870
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
871
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
862
872
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
863
873
 
864
874
  header_params = {}
@@ -951,10 +961,11 @@ module Google
951
961
  # Customize the options with defaults
952
962
  metadata = @config.rpcs.enable_advanced_site_search.metadata.to_h
953
963
 
954
- # Set x-goog-api-client and x-goog-user-project headers
964
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
955
965
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
956
966
  lib_name: @config.lib_name, lib_version: @config.lib_version,
957
967
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
968
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
958
969
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
959
970
 
960
971
  header_params = {}
@@ -1047,10 +1058,11 @@ module Google
1047
1058
  # Customize the options with defaults
1048
1059
  metadata = @config.rpcs.disable_advanced_site_search.metadata.to_h
1049
1060
 
1050
- # Set x-goog-api-client and x-goog-user-project headers
1061
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1051
1062
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1052
1063
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1053
1064
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
1065
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1054
1066
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1055
1067
 
1056
1068
  header_params = {}
@@ -1148,10 +1160,11 @@ module Google
1148
1160
  # Customize the options with defaults
1149
1161
  metadata = @config.rpcs.recrawl_uris.metadata.to_h
1150
1162
 
1151
- # Set x-goog-api-client and x-goog-user-project headers
1163
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1152
1164
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1153
1165
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1154
1166
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
1167
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1155
1168
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1156
1169
 
1157
1170
  header_params = {}
@@ -1244,10 +1257,11 @@ module Google
1244
1257
  # Customize the options with defaults
1245
1258
  metadata = @config.rpcs.batch_verify_target_sites.metadata.to_h
1246
1259
 
1247
- # Set x-goog-api-client and x-goog-user-project headers
1260
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1248
1261
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1249
1262
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1250
1263
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
1264
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1251
1265
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1252
1266
 
1253
1267
  header_params = {}
@@ -1351,10 +1365,11 @@ module Google
1351
1365
  # Customize the options with defaults
1352
1366
  metadata = @config.rpcs.fetch_domain_verification_status.metadata.to_h
1353
1367
 
1354
- # Set x-goog-api-client and x-goog-user-project headers
1368
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1355
1369
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1356
1370
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1357
1371
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
1372
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1358
1373
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1359
1374
 
1360
1375
  header_params = {}
@@ -26,6 +26,9 @@ module Google
26
26
  module SiteSearchEngineService
27
27
  # Service that implements Longrunning Operations API.
28
28
  class Operations
29
+ # @private
30
+ API_VERSION = ""
31
+
29
32
  # @private
30
33
  DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
31
34
 
@@ -191,10 +194,11 @@ module Google
191
194
  # Customize the options with defaults
192
195
  metadata = @config.rpcs.list_operations.metadata.to_h
193
196
 
194
- # Set x-goog-api-client and x-goog-user-project headers
197
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
195
198
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
196
199
  lib_name: @config.lib_name, lib_version: @config.lib_version,
197
200
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
201
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
198
202
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
199
203
 
200
204
  header_params = {}
@@ -287,10 +291,11 @@ module Google
287
291
  # Customize the options with defaults
288
292
  metadata = @config.rpcs.get_operation.metadata.to_h
289
293
 
290
- # Set x-goog-api-client and x-goog-user-project headers
294
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
291
295
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
292
296
  lib_name: @config.lib_name, lib_version: @config.lib_version,
293
297
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
298
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
294
299
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
295
300
 
296
301
  header_params = {}
@@ -376,10 +381,11 @@ module Google
376
381
  # Customize the options with defaults
377
382
  metadata = @config.rpcs.delete_operation.metadata.to_h
378
383
 
379
- # Set x-goog-api-client and x-goog-user-project headers
384
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
380
385
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
381
386
  lib_name: @config.lib_name, lib_version: @config.lib_version,
382
387
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
388
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
383
389
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
384
390
 
385
391
  header_params = {}
@@ -470,10 +476,11 @@ module Google
470
476
  # Customize the options with defaults
471
477
  metadata = @config.rpcs.cancel_operation.metadata.to_h
472
478
 
473
- # Set x-goog-api-client and x-goog-user-project headers
479
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
474
480
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
475
481
  lib_name: @config.lib_name, lib_version: @config.lib_version,
476
482
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
483
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
477
484
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
478
485
 
479
486
  header_params = {}
@@ -574,10 +581,11 @@ module Google
574
581
  # Customize the options with defaults
575
582
  metadata = @config.rpcs.wait_operation.metadata.to_h
576
583
 
577
- # Set x-goog-api-client and x-goog-user-project headers
584
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
578
585
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
579
586
  lib_name: @config.lib_name, lib_version: @config.lib_version,
580
587
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
588
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
581
589
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
582
590
 
583
591
  options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,