google-cloud-discovery_engine-v1 0.6.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/discovery_engine/v1/completion_service/client.rb +9 -3
  3. data/lib/google/cloud/discovery_engine/v1/completion_service/operations.rb +13 -5
  4. data/lib/google/cloud/discovery_engine/v1/completion_service/rest/client.rb +9 -3
  5. data/lib/google/cloud/discovery_engine/v1/completion_service/rest/operations.rb +28 -5
  6. data/lib/google/cloud/discovery_engine/v1/control_service/client.rb +875 -0
  7. data/lib/google/cloud/discovery_engine/v1/control_service/credentials.rb +47 -0
  8. data/lib/google/cloud/discovery_engine/v1/control_service/paths.rb +167 -0
  9. data/lib/google/cloud/discovery_engine/v1/control_service/rest/client.rb +814 -0
  10. data/lib/google/cloud/discovery_engine/v1/control_service/rest/service_stub.rb +440 -0
  11. data/lib/google/cloud/discovery_engine/v1/control_service/rest.rb +55 -0
  12. data/lib/google/cloud/discovery_engine/v1/control_service.rb +58 -0
  13. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb +769 -7
  14. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/paths.rb +199 -0
  15. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb +720 -7
  16. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/service_stub.rb +520 -0
  17. data/lib/google/cloud/discovery_engine/v1/data_store_service/client.rb +15 -7
  18. data/lib/google/cloud/discovery_engine/v1/data_store_service/operations.rb +13 -5
  19. data/lib/google/cloud/discovery_engine/v1/data_store_service/paths.rb +94 -0
  20. data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/client.rb +15 -7
  21. data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/operations.rb +28 -5
  22. data/lib/google/cloud/discovery_engine/v1/document_service/client.rb +71 -33
  23. data/lib/google/cloud/discovery_engine/v1/document_service/operations.rb +13 -5
  24. data/lib/google/cloud/discovery_engine/v1/document_service/paths.rb +21 -0
  25. data/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb +71 -33
  26. data/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb +28 -5
  27. data/lib/google/cloud/discovery_engine/v1/engine_service/client.rb +13 -5
  28. data/lib/google/cloud/discovery_engine/v1/engine_service/operations.rb +13 -5
  29. data/lib/google/cloud/discovery_engine/v1/engine_service/rest/client.rb +13 -5
  30. data/lib/google/cloud/discovery_engine/v1/engine_service/rest/operations.rb +28 -5
  31. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/client.rb +471 -0
  32. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/credentials.rb +47 -0
  33. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/paths.rb +52 -0
  34. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/client.rb +438 -0
  35. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/service_stub.rb +129 -0
  36. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest.rb +52 -0
  37. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service.rb +55 -0
  38. data/lib/google/cloud/discovery_engine/v1/project_service/client.rb +485 -0
  39. data/lib/google/cloud/discovery_engine/v1/project_service/credentials.rb +47 -0
  40. data/lib/google/cloud/discovery_engine/v1/project_service/operations.rb +809 -0
  41. data/lib/google/cloud/discovery_engine/v1/project_service/paths.rb +47 -0
  42. data/lib/google/cloud/discovery_engine/v1/project_service/rest/client.rb +452 -0
  43. data/lib/google/cloud/discovery_engine/v1/project_service/rest/operations.rb +1114 -0
  44. data/lib/google/cloud/discovery_engine/v1/project_service/rest/service_stub.rb +129 -0
  45. data/lib/google/cloud/discovery_engine/v1/project_service/rest.rb +54 -0
  46. data/lib/google/cloud/discovery_engine/v1/project_service.rb +57 -0
  47. data/lib/google/cloud/discovery_engine/v1/rank_service/client.rb +481 -0
  48. data/lib/google/cloud/discovery_engine/v1/rank_service/credentials.rb +47 -0
  49. data/lib/google/cloud/discovery_engine/v1/rank_service/paths.rb +52 -0
  50. data/lib/google/cloud/discovery_engine/v1/rank_service/rest/client.rb +448 -0
  51. data/lib/google/cloud/discovery_engine/v1/rank_service/rest/service_stub.rb +129 -0
  52. data/lib/google/cloud/discovery_engine/v1/rank_service/rest.rb +52 -0
  53. data/lib/google/cloud/discovery_engine/v1/rank_service.rb +55 -0
  54. data/lib/google/cloud/discovery_engine/v1/recommendation_service/client.rb +558 -0
  55. data/lib/google/cloud/discovery_engine/v1/recommendation_service/credentials.rb +47 -0
  56. data/lib/google/cloud/discovery_engine/v1/recommendation_service/paths.rb +220 -0
  57. data/lib/google/cloud/discovery_engine/v1/recommendation_service/rest/client.rb +525 -0
  58. data/lib/google/cloud/discovery_engine/v1/recommendation_service/rest/service_stub.rb +145 -0
  59. data/lib/google/cloud/discovery_engine/v1/recommendation_service/rest.rb +52 -0
  60. data/lib/google/cloud/discovery_engine/v1/recommendation_service.rb +55 -0
  61. data/lib/google/cloud/discovery_engine/v1/rest.rb +5 -0
  62. data/lib/google/cloud/discovery_engine/v1/schema_service/client.rb +18 -10
  63. data/lib/google/cloud/discovery_engine/v1/schema_service/operations.rb +13 -5
  64. data/lib/google/cloud/discovery_engine/v1/schema_service/rest/client.rb +18 -10
  65. data/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb +28 -5
  66. data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +26 -13
  67. data/lib/google/cloud/discovery_engine/v1/search_service/paths.rb +45 -0
  68. data/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +26 -13
  69. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/client.rb +27 -12
  70. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/operations.rb +13 -5
  71. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/client.rb +27 -12
  72. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/operations.rb +28 -5
  73. data/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb +23 -6
  74. data/lib/google/cloud/discovery_engine/v1/user_event_service/operations.rb +13 -5
  75. data/lib/google/cloud/discovery_engine/v1/user_event_service/paths.rb +21 -0
  76. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb +23 -6
  77. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb +28 -5
  78. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/service_stub.rb +8 -0
  79. data/lib/google/cloud/discovery_engine/v1/version.rb +1 -1
  80. data/lib/google/cloud/discovery_engine/v1.rb +5 -0
  81. data/lib/google/cloud/discoveryengine/v1/answer_pb.rb +69 -0
  82. data/lib/google/cloud/discoveryengine/v1/common_pb.rb +2 -1
  83. data/lib/google/cloud/discoveryengine/v1/control_pb.rb +55 -0
  84. data/lib/google/cloud/discoveryengine/v1/control_service_pb.rb +57 -0
  85. data/lib/google/cloud/discoveryengine/v1/control_service_services_pb.rb +69 -0
  86. data/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb +32 -1
  87. data/lib/google/cloud/discoveryengine/v1/conversational_search_service_services_pb.rb +25 -0
  88. data/lib/google/cloud/discoveryengine/v1/data_store_pb.rb +5 -1
  89. data/lib/google/cloud/discoveryengine/v1/document_pb.rb +3 -1
  90. data/lib/google/cloud/discoveryengine/v1/document_processing_config_pb.rb +48 -0
  91. data/lib/google/cloud/discoveryengine/v1/document_service_pb.rb +3 -1
  92. data/lib/google/cloud/discoveryengine/v1/document_service_services_pb.rb +1 -1
  93. data/lib/google/cloud/discoveryengine/v1/engine_pb.rb +1 -1
  94. data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_pb.rb +52 -0
  95. data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_services_pb.rb +45 -0
  96. data/lib/google/cloud/discoveryengine/v1/grounding_pb.rb +46 -0
  97. data/lib/google/cloud/discoveryengine/v1/import_config_pb.rb +13 -1
  98. data/lib/google/cloud/discoveryengine/v1/project_pb.rb +49 -0
  99. data/lib/google/cloud/discoveryengine/v1/project_service_pb.rb +50 -0
  100. data/lib/google/cloud/discoveryengine/v1/project_service_services_pb.rb +51 -0
  101. data/lib/google/cloud/discoveryengine/v1/purge_config_pb.rb +1 -1
  102. data/lib/google/cloud/discoveryengine/v1/rank_service_pb.rb +49 -0
  103. data/lib/google/cloud/discoveryengine/v1/rank_service_services_pb.rb +45 -0
  104. data/lib/google/cloud/discoveryengine/v1/recommendation_service_pb.rb +55 -0
  105. data/lib/google/cloud/discoveryengine/v1/recommendation_service_services_pb.rb +45 -0
  106. data/lib/google/cloud/discoveryengine/v1/search_service_pb.rb +4 -1
  107. data/lib/google/cloud/discoveryengine/v1/session_pb.rb +50 -0
  108. data/lib/google/cloud/discoveryengine/v1/site_search_engine_pb.rb +1 -1
  109. data/lib/google/cloud/discoveryengine/v1/user_event_pb.rb +1 -1
  110. data/lib/google/cloud/discoveryengine/v1/user_event_service_pb.rb +1 -1
  111. data/lib/google/cloud/discoveryengine/v1/user_event_service_services_pb.rb +1 -1
  112. data/proto_docs/google/api/client.rb +4 -0
  113. data/proto_docs/google/cloud/discoveryengine/v1/answer.rb +362 -0
  114. data/proto_docs/google/cloud/discoveryengine/v1/common.rb +25 -1
  115. data/proto_docs/google/cloud/discoveryengine/v1/control.rb +207 -0
  116. data/proto_docs/google/cloud/discoveryengine/v1/control_service.rb +126 -0
  117. data/proto_docs/google/cloud/discoveryengine/v1/conversation.rb +2 -2
  118. data/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +490 -0
  119. data/proto_docs/google/cloud/discoveryengine/v1/data_store.rb +19 -0
  120. data/proto_docs/google/cloud/discoveryengine/v1/data_store_service.rb +2 -2
  121. data/proto_docs/google/cloud/discoveryengine/v1/document.rb +7 -0
  122. data/proto_docs/google/cloud/discoveryengine/v1/document_processing_config.rb +102 -0
  123. data/proto_docs/google/cloud/discoveryengine/v1/document_service.rb +8 -4
  124. data/proto_docs/google/cloud/discoveryengine/v1/engine.rb +5 -5
  125. data/proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb +144 -0
  126. data/proto_docs/google/cloud/discoveryengine/v1/grounding.rb +79 -0
  127. data/proto_docs/google/cloud/discoveryengine/v1/import_config.rb +313 -24
  128. data/proto_docs/google/cloud/discoveryengine/v1/project.rb +106 -0
  129. data/proto_docs/google/cloud/discoveryengine/v1/project_service.rb +57 -0
  130. data/proto_docs/google/cloud/discoveryengine/v1/purge_config.rb +3 -0
  131. data/proto_docs/google/cloud/discoveryengine/v1/rank_service.rb +124 -0
  132. data/proto_docs/google/cloud/discoveryengine/v1/recommendation_service.rb +229 -0
  133. data/proto_docs/google/cloud/discoveryengine/v1/schema_service.rb +5 -5
  134. data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +150 -37
  135. data/proto_docs/google/cloud/discoveryengine/v1/session.rb +88 -0
  136. data/proto_docs/google/cloud/discoveryengine/v1/site_search_engine.rb +3 -0
  137. data/proto_docs/google/cloud/discoveryengine/v1/user_event.rb +40 -14
  138. data/proto_docs/google/cloud/discoveryengine/v1/user_event_service.rb +13 -1
  139. metadata +66 -2
@@ -26,6 +26,9 @@ module Google
26
26
  module DocumentService
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::V1::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::V1::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::V1::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::V1::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::V1::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,
@@ -126,6 +126,27 @@ module Google
126
126
  resource.call(**args)
127
127
  end
128
128
 
129
+ ##
130
+ # Create a fully-qualified FhirStore resource string.
131
+ #
132
+ # The resource will be in the following format:
133
+ #
134
+ # `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}`
135
+ #
136
+ # @param project [String]
137
+ # @param location [String]
138
+ # @param dataset [String]
139
+ # @param fhir_store [String]
140
+ #
141
+ # @return [::String]
142
+ def fhir_store_path project:, location:, dataset:, fhir_store:
143
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
144
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
145
+ raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/"
146
+
147
+ "projects/#{project}/locations/#{location}/datasets/#{dataset}/fhirStores/#{fhir_store}"
148
+ end
149
+
129
150
  extend self
130
151
  end
131
152
  end
@@ -34,6 +34,9 @@ module Google
34
34
  # information of the customer's website.
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
 
@@ -256,12 +259,13 @@ module Google
256
259
  # Customize the options with defaults
257
260
  call_metadata = @config.rpcs.get_document.metadata.to_h
258
261
 
259
- # 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
260
263
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
261
264
  lib_name: @config.lib_name, lib_version: @config.lib_version,
262
265
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
263
266
  transports_version_send: [:rest]
264
267
 
268
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
265
269
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
266
270
 
267
271
  options.apply_defaults timeout: @config.rpcs.get_document.timeout,
@@ -311,7 +315,7 @@ module Google
311
315
  # @param page_size [::Integer]
312
316
  # Maximum number of {::Google::Cloud::DiscoveryEngine::V1::Document Document}s to
313
317
  # return. If unspecified, defaults to 100. The maximum allowed value is 1000.
314
- # Values above 1000 will be coerced to 1000.
318
+ # Values above 1000 are set to 1000.
315
319
  #
316
320
  # If this field is negative, an `INVALID_ARGUMENT` error is returned.
317
321
  # @param page_token [::String]
@@ -363,12 +367,13 @@ module Google
363
367
  # Customize the options with defaults
364
368
  call_metadata = @config.rpcs.list_documents.metadata.to_h
365
369
 
366
- # Set x-goog-api-client and x-goog-user-project headers
370
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
367
371
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
368
372
  lib_name: @config.lib_name, lib_version: @config.lib_version,
369
373
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
370
374
  transports_version_send: [:rest]
371
375
 
376
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
372
377
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
373
378
 
374
379
  options.apply_defaults timeout: @config.rpcs.list_documents.timeout,
@@ -414,7 +419,7 @@ module Google
414
419
  # create.
415
420
  # @param document_id [::String]
416
421
  # Required. The ID to use for the
417
- # {::Google::Cloud::DiscoveryEngine::V1::Document Document}, which will become the
422
+ # {::Google::Cloud::DiscoveryEngine::V1::Document Document}, which becomes the
418
423
  # final component of the
419
424
  # {::Google::Cloud::DiscoveryEngine::V1::Document#name Document.name}.
420
425
  #
@@ -464,12 +469,13 @@ module Google
464
469
  # Customize the options with defaults
465
470
  call_metadata = @config.rpcs.create_document.metadata.to_h
466
471
 
467
- # Set x-goog-api-client and x-goog-user-project headers
472
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
468
473
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
469
474
  lib_name: @config.lib_name, lib_version: @config.lib_version,
470
475
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
471
476
  transports_version_send: [:rest]
472
477
 
478
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
473
479
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
474
480
 
475
481
  options.apply_defaults timeout: @config.rpcs.create_document.timeout,
@@ -501,7 +507,7 @@ module Google
501
507
  # @param options [::Gapic::CallOptions, ::Hash]
502
508
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
503
509
  #
504
- # @overload update_document(document: nil, allow_missing: nil)
510
+ # @overload update_document(document: nil, allow_missing: nil, update_mask: nil)
505
511
  # Pass arguments to `update_document` via keyword arguments. Note that at
506
512
  # least one keyword argument is required. To specify no parameters, or to keep all
507
513
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -518,9 +524,12 @@ module Google
518
524
  # {::Google::Cloud::DiscoveryEngine::V1::UpdateDocumentRequest#allow_missing allow_missing}
519
525
  # is not set, a `NOT_FOUND` error is returned.
520
526
  # @param allow_missing [::Boolean]
521
- # If set to true, and the
527
+ # If set to `true` and the
522
528
  # {::Google::Cloud::DiscoveryEngine::V1::Document Document} is not found, a new
523
- # {::Google::Cloud::DiscoveryEngine::V1::Document Document} will be created.
529
+ # {::Google::Cloud::DiscoveryEngine::V1::Document Document} is be created.
530
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
531
+ # Indicates which fields in the provided imported 'document' to update. If
532
+ # not set, by default updates all fields.
524
533
  # @yield [result, operation] Access the result along with the TransportOperation object
525
534
  # @yieldparam result [::Google::Cloud::DiscoveryEngine::V1::Document]
526
535
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -555,12 +564,13 @@ module Google
555
564
  # Customize the options with defaults
556
565
  call_metadata = @config.rpcs.update_document.metadata.to_h
557
566
 
558
- # Set x-goog-api-client and x-goog-user-project headers
567
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
559
568
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
560
569
  lib_name: @config.lib_name, lib_version: @config.lib_version,
561
570
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
562
571
  transports_version_send: [:rest]
563
572
 
573
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
564
574
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
565
575
 
566
576
  options.apply_defaults timeout: @config.rpcs.update_document.timeout,
@@ -642,12 +652,13 @@ module Google
642
652
  # Customize the options with defaults
643
653
  call_metadata = @config.rpcs.delete_document.metadata.to_h
644
654
 
645
- # Set x-goog-api-client and x-goog-user-project headers
655
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
646
656
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
647
657
  lib_name: @config.lib_name, lib_version: @config.lib_version,
648
658
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
649
659
  transports_version_send: [:rest]
650
660
 
661
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
651
662
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
652
663
 
653
664
  options.apply_defaults timeout: @config.rpcs.delete_document.timeout,
@@ -669,7 +680,7 @@ module Google
669
680
  ##
670
681
  # Bulk import of multiple
671
682
  # {::Google::Cloud::DiscoveryEngine::V1::Document Document}s. Request processing
672
- # may be synchronous. Non-existing items will be created.
683
+ # may be synchronous. Non-existing items are created.
673
684
  #
674
685
  # Note: It is possible for a subset of the
675
686
  # {::Google::Cloud::DiscoveryEngine::V1::Document Document}s to be successfully
@@ -685,7 +696,7 @@ module Google
685
696
  # @param options [::Gapic::CallOptions, ::Hash]
686
697
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
687
698
  #
688
- # @overload import_documents(inline_source: nil, gcs_source: nil, bigquery_source: nil, parent: nil, error_config: nil, reconciliation_mode: nil, auto_generate_ids: nil, id_field: nil)
699
+ # @overload import_documents(inline_source: nil, gcs_source: nil, bigquery_source: nil, fhir_store_source: nil, spanner_source: nil, cloud_sql_source: nil, firestore_source: nil, bigtable_source: nil, parent: nil, error_config: nil, reconciliation_mode: nil, update_mask: nil, auto_generate_ids: nil, id_field: nil)
689
700
  # Pass arguments to `import_documents` via keyword arguments. Note that at
690
701
  # least one keyword argument is required. To specify no parameters, or to keep all
691
702
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -696,6 +707,16 @@ module Google
696
707
  # Cloud Storage location for the input content.
697
708
  # @param bigquery_source [::Google::Cloud::DiscoveryEngine::V1::BigQuerySource, ::Hash]
698
709
  # BigQuery input source.
710
+ # @param fhir_store_source [::Google::Cloud::DiscoveryEngine::V1::FhirStoreSource, ::Hash]
711
+ # FhirStore input source.
712
+ # @param spanner_source [::Google::Cloud::DiscoveryEngine::V1::SpannerSource, ::Hash]
713
+ # Spanner input source.
714
+ # @param cloud_sql_source [::Google::Cloud::DiscoveryEngine::V1::CloudSqlSource, ::Hash]
715
+ # Cloud SQL input source.
716
+ # @param firestore_source [::Google::Cloud::DiscoveryEngine::V1::FirestoreSource, ::Hash]
717
+ # Firestore input source.
718
+ # @param bigtable_source [::Google::Cloud::DiscoveryEngine::V1::BigtableSource, ::Hash]
719
+ # Cloud Bigtable input source.
699
720
  # @param parent [::String]
700
721
  # Required. The parent branch resource name, such as
701
722
  # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
@@ -706,6 +727,9 @@ module Google
706
727
  # The mode of reconciliation between existing documents and the documents to
707
728
  # be imported. Defaults to
708
729
  # {::Google::Cloud::DiscoveryEngine::V1::ImportDocumentsRequest::ReconciliationMode::INCREMENTAL ReconciliationMode.INCREMENTAL}.
730
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
731
+ # Indicates which fields in the provided imported documents to update. If
732
+ # not set, the default is to update all fields.
709
733
  # @param auto_generate_ids [::Boolean]
710
734
  # Whether to automatically generate IDs for the documents if absent.
711
735
  #
@@ -720,41 +744,53 @@ module Google
720
744
  # {::Google::Cloud::DiscoveryEngine::V1::ImportDocumentsRequest#id_field id_field},
721
745
  # otherwise, documents without IDs fail to be imported.
722
746
  #
723
- # Only set this field when using
724
- # {::Google::Cloud::DiscoveryEngine::V1::GcsSource GcsSource} or
725
- # {::Google::Cloud::DiscoveryEngine::V1::BigQuerySource BigQuerySource}, and when
747
+ # Supported data sources:
748
+ #
749
+ # * {::Google::Cloud::DiscoveryEngine::V1::GcsSource GcsSource}.
726
750
  # {::Google::Cloud::DiscoveryEngine::V1::GcsSource#data_schema GcsSource.data_schema}
727
- # or
751
+ # must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
752
+ # * {::Google::Cloud::DiscoveryEngine::V1::BigQuerySource BigQuerySource}.
728
753
  # {::Google::Cloud::DiscoveryEngine::V1::BigQuerySource#data_schema BigQuerySource.data_schema}
729
- # is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
754
+ # must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
755
+ # * {::Google::Cloud::DiscoveryEngine::V1::SpannerSource SpannerSource}.
756
+ # * {::Google::Cloud::DiscoveryEngine::V1::CloudSqlSource CloudSqlSource}.
757
+ # * {::Google::Cloud::DiscoveryEngine::V1::FirestoreSource FirestoreSource}.
758
+ # * {::Google::Cloud::DiscoveryEngine::V1::BigtableSource BigtableSource}.
730
759
  # @param id_field [::String]
731
- # The field in the Cloud Storage and BigQuery sources that indicates the
732
- # unique IDs of the documents.
760
+ # The field indicates the ID field or column to be used as unique IDs of
761
+ # the documents.
733
762
  #
734
763
  # For {::Google::Cloud::DiscoveryEngine::V1::GcsSource GcsSource} it is the key of
735
764
  # the JSON field. For instance, `my_id` for JSON `{"my_id": "some_uuid"}`.
736
- # For {::Google::Cloud::DiscoveryEngine::V1::BigQuerySource BigQuerySource} it is
737
- # the column name of the BigQuery table where the unique ids are stored.
765
+ # For others, it may be the column name of the table where the unique ids are
766
+ # stored.
738
767
  #
739
- # The values of the JSON field or the BigQuery column are used as the
768
+ # The values of the JSON field or the table column are used as the
740
769
  # {::Google::Cloud::DiscoveryEngine::V1::Document#id Document.id}s. The JSON field
741
- # or the BigQuery column must be of string type, and the values must be set
742
- # as valid strings conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
770
+ # or the table column must be of string type, and the values must be set as
771
+ # valid strings conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
743
772
  # with 1-63 characters. Otherwise, documents without valid IDs fail to be
744
773
  # imported.
745
774
  #
746
- # Only set this field when using
747
- # {::Google::Cloud::DiscoveryEngine::V1::GcsSource GcsSource} or
748
- # {::Google::Cloud::DiscoveryEngine::V1::BigQuerySource BigQuerySource}, and when
749
- # {::Google::Cloud::DiscoveryEngine::V1::GcsSource#data_schema GcsSource.data_schema}
750
- # or
751
- # {::Google::Cloud::DiscoveryEngine::V1::BigQuerySource#data_schema BigQuerySource.data_schema}
752
- # is `custom`. And only set this field when
775
+ # Only set this field when
753
776
  # {::Google::Cloud::DiscoveryEngine::V1::ImportDocumentsRequest#auto_generate_ids auto_generate_ids}
754
777
  # is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown.
755
778
  #
756
779
  # If it is unset, a default value `_id` is used when importing from the
757
780
  # allowed data sources.
781
+ #
782
+ # Supported data sources:
783
+ #
784
+ # * {::Google::Cloud::DiscoveryEngine::V1::GcsSource GcsSource}.
785
+ # {::Google::Cloud::DiscoveryEngine::V1::GcsSource#data_schema GcsSource.data_schema}
786
+ # must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
787
+ # * {::Google::Cloud::DiscoveryEngine::V1::BigQuerySource BigQuerySource}.
788
+ # {::Google::Cloud::DiscoveryEngine::V1::BigQuerySource#data_schema BigQuerySource.data_schema}
789
+ # must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
790
+ # * {::Google::Cloud::DiscoveryEngine::V1::SpannerSource SpannerSource}.
791
+ # * {::Google::Cloud::DiscoveryEngine::V1::CloudSqlSource CloudSqlSource}.
792
+ # * {::Google::Cloud::DiscoveryEngine::V1::FirestoreSource FirestoreSource}.
793
+ # * {::Google::Cloud::DiscoveryEngine::V1::BigtableSource BigtableSource}.
758
794
  # @yield [result, operation] Access the result along with the TransportOperation object
759
795
  # @yieldparam result [::Gapic::Operation]
760
796
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -796,12 +832,13 @@ module Google
796
832
  # Customize the options with defaults
797
833
  call_metadata = @config.rpcs.import_documents.metadata.to_h
798
834
 
799
- # Set x-goog-api-client and x-goog-user-project headers
835
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
800
836
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
801
837
  lib_name: @config.lib_name, lib_version: @config.lib_version,
802
838
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
803
839
  transports_version_send: [:rest]
804
840
 
841
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
805
842
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
806
843
 
807
844
  options.apply_defaults timeout: @config.rpcs.import_documents.timeout,
@@ -905,12 +942,13 @@ module Google
905
942
  # Customize the options with defaults
906
943
  call_metadata = @config.rpcs.purge_documents.metadata.to_h
907
944
 
908
- # Set x-goog-api-client and x-goog-user-project headers
945
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
909
946
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
910
947
  lib_name: @config.lib_name, lib_version: @config.lib_version,
911
948
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
912
949
  transports_version_send: [:rest]
913
950
 
951
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
914
952
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
915
953
 
916
954
  options.apply_defaults timeout: @config.rpcs.purge_documents.timeout,
@@ -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::V1::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::V1::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::V1::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::V1::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,
@@ -1077,7 +1084,23 @@ module Google
1077
1084
  uri_template: "/v1/{name}:cancel",
1078
1085
  body: "*",
1079
1086
  matches: [
1080
- ["name", %r{^operations(?:/.*)?$}, true]
1087
+ ["name", %r{^projects/[^/]+/operations/[^/]+/?$}, false]
1088
+ ]
1089
+ )
1090
+ .with_bindings(
1091
+ uri_method: :post,
1092
+ uri_template: "/v1/{name}:cancel",
1093
+ body: "*",
1094
+ matches: [
1095
+ ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+/?$}, false]
1096
+ ]
1097
+ )
1098
+ .with_bindings(
1099
+ uri_method: :post,
1100
+ uri_template: "/v1/{name}:cancel",
1101
+ body: "*",
1102
+ matches: [
1103
+ ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+/?$}, false]
1081
1104
  ]
1082
1105
  )
1083
1106
  transcoder.transcode request_pb
@@ -32,6 +32,9 @@ module Google
32
32
  # configuration.
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
 
@@ -264,10 +267,11 @@ module Google
264
267
  # Customize the options with defaults
265
268
  metadata = @config.rpcs.create_engine.metadata.to_h
266
269
 
267
- # Set x-goog-api-client and x-goog-user-project headers
270
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
268
271
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
269
272
  lib_name: @config.lib_name, lib_version: @config.lib_version,
270
273
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
274
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
271
275
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
272
276
 
273
277
  header_params = {}
@@ -366,10 +370,11 @@ module Google
366
370
  # Customize the options with defaults
367
371
  metadata = @config.rpcs.delete_engine.metadata.to_h
368
372
 
369
- # Set x-goog-api-client and x-goog-user-project headers
373
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
370
374
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
371
375
  lib_name: @config.lib_name, lib_version: @config.lib_version,
372
376
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
377
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
373
378
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
374
379
 
375
380
  header_params = {}
@@ -465,10 +470,11 @@ module Google
465
470
  # Customize the options with defaults
466
471
  metadata = @config.rpcs.update_engine.metadata.to_h
467
472
 
468
- # Set x-goog-api-client and x-goog-user-project headers
473
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
469
474
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
470
475
  lib_name: @config.lib_name, lib_version: @config.lib_version,
471
476
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
477
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
472
478
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
473
479
 
474
480
  header_params = {}
@@ -552,10 +558,11 @@ module Google
552
558
  # Customize the options with defaults
553
559
  metadata = @config.rpcs.get_engine.metadata.to_h
554
560
 
555
- # Set x-goog-api-client and x-goog-user-project headers
561
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
556
562
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
557
563
  lib_name: @config.lib_name, lib_version: @config.lib_version,
558
564
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
565
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
559
566
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
560
567
 
561
568
  header_params = {}
@@ -650,10 +657,11 @@ module Google
650
657
  # Customize the options with defaults
651
658
  metadata = @config.rpcs.list_engines.metadata.to_h
652
659
 
653
- # Set x-goog-api-client and x-goog-user-project headers
660
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
654
661
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
655
662
  lib_name: @config.lib_name, lib_version: @config.lib_version,
656
663
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
664
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
657
665
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
658
666
 
659
667
  header_params = {}
@@ -26,6 +26,9 @@ module Google
26
26
  module EngineService
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::V1::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::V1::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::V1::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::V1::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::V1::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,