google-cloud-discovery_engine-v1 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) 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 +764 -6
  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 +715 -6
  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 +45 -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 +23 -13
  23. data/lib/google/cloud/discovery_engine/v1/document_service/operations.rb +13 -5
  24. data/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb +23 -13
  25. data/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb +28 -5
  26. data/lib/google/cloud/discovery_engine/v1/engine_service/client.rb +13 -5
  27. data/lib/google/cloud/discovery_engine/v1/engine_service/operations.rb +13 -5
  28. data/lib/google/cloud/discovery_engine/v1/engine_service/rest/client.rb +13 -5
  29. data/lib/google/cloud/discovery_engine/v1/engine_service/rest/operations.rb +28 -5
  30. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/client.rb +471 -0
  31. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/credentials.rb +47 -0
  32. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/paths.rb +52 -0
  33. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/client.rb +438 -0
  34. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/service_stub.rb +129 -0
  35. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest.rb +52 -0
  36. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service.rb +55 -0
  37. data/lib/google/cloud/discovery_engine/v1/project_service/client.rb +485 -0
  38. data/lib/google/cloud/discovery_engine/v1/project_service/credentials.rb +47 -0
  39. data/lib/google/cloud/discovery_engine/v1/project_service/operations.rb +809 -0
  40. data/lib/google/cloud/discovery_engine/v1/project_service/paths.rb +47 -0
  41. data/lib/google/cloud/discovery_engine/v1/project_service/rest/client.rb +452 -0
  42. data/lib/google/cloud/discovery_engine/v1/project_service/rest/operations.rb +1114 -0
  43. data/lib/google/cloud/discovery_engine/v1/project_service/rest/service_stub.rb +129 -0
  44. data/lib/google/cloud/discovery_engine/v1/project_service/rest.rb +54 -0
  45. data/lib/google/cloud/discovery_engine/v1/project_service.rb +57 -0
  46. data/lib/google/cloud/discovery_engine/v1/rank_service/client.rb +481 -0
  47. data/lib/google/cloud/discovery_engine/v1/rank_service/credentials.rb +47 -0
  48. data/lib/google/cloud/discovery_engine/v1/rank_service/paths.rb +52 -0
  49. data/lib/google/cloud/discovery_engine/v1/rank_service/rest/client.rb +448 -0
  50. data/lib/google/cloud/discovery_engine/v1/rank_service/rest/service_stub.rb +129 -0
  51. data/lib/google/cloud/discovery_engine/v1/rank_service/rest.rb +52 -0
  52. data/lib/google/cloud/discovery_engine/v1/rank_service.rb +55 -0
  53. data/lib/google/cloud/discovery_engine/v1/recommendation_service/client.rb +24 -19
  54. data/lib/google/cloud/discovery_engine/v1/recommendation_service/paths.rb +66 -0
  55. data/lib/google/cloud/discovery_engine/v1/recommendation_service/rest/client.rb +24 -19
  56. data/lib/google/cloud/discovery_engine/v1/rest.rb +4 -0
  57. data/lib/google/cloud/discovery_engine/v1/schema_service/client.rb +18 -10
  58. data/lib/google/cloud/discovery_engine/v1/schema_service/operations.rb +13 -5
  59. data/lib/google/cloud/discovery_engine/v1/schema_service/rest/client.rb +18 -10
  60. data/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb +28 -5
  61. data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +15 -8
  62. data/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +15 -8
  63. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/client.rb +27 -12
  64. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/operations.rb +13 -5
  65. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/client.rb +27 -12
  66. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/operations.rb +28 -5
  67. data/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb +23 -6
  68. data/lib/google/cloud/discovery_engine/v1/user_event_service/operations.rb +13 -5
  69. data/lib/google/cloud/discovery_engine/v1/user_event_service/paths.rb +21 -0
  70. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb +23 -6
  71. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb +28 -5
  72. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/service_stub.rb +8 -0
  73. data/lib/google/cloud/discovery_engine/v1/version.rb +1 -1
  74. data/lib/google/cloud/discovery_engine/v1.rb +4 -0
  75. data/lib/google/cloud/discoveryengine/v1/answer_pb.rb +69 -0
  76. data/lib/google/cloud/discoveryengine/v1/common_pb.rb +2 -1
  77. data/lib/google/cloud/discoveryengine/v1/control_pb.rb +55 -0
  78. data/lib/google/cloud/discoveryengine/v1/control_service_pb.rb +57 -0
  79. data/lib/google/cloud/discoveryengine/v1/control_service_services_pb.rb +69 -0
  80. data/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb +32 -1
  81. data/lib/google/cloud/discoveryengine/v1/conversational_search_service_services_pb.rb +25 -0
  82. data/lib/google/cloud/discoveryengine/v1/data_store_pb.rb +3 -1
  83. data/lib/google/cloud/discoveryengine/v1/document_processing_config_pb.rb +48 -0
  84. data/lib/google/cloud/discoveryengine/v1/document_service_services_pb.rb +1 -1
  85. data/lib/google/cloud/discoveryengine/v1/engine_pb.rb +1 -1
  86. data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_pb.rb +52 -0
  87. data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_services_pb.rb +45 -0
  88. data/lib/google/cloud/discoveryengine/v1/grounding_pb.rb +46 -0
  89. data/lib/google/cloud/discoveryengine/v1/project_pb.rb +49 -0
  90. data/lib/google/cloud/discoveryengine/v1/project_service_pb.rb +50 -0
  91. data/lib/google/cloud/discoveryengine/v1/project_service_services_pb.rb +51 -0
  92. data/lib/google/cloud/discoveryengine/v1/rank_service_pb.rb +49 -0
  93. data/lib/google/cloud/discoveryengine/v1/rank_service_services_pb.rb +45 -0
  94. data/lib/google/cloud/discoveryengine/v1/session_pb.rb +50 -0
  95. data/lib/google/cloud/discoveryengine/v1/site_search_engine_pb.rb +1 -1
  96. data/lib/google/cloud/discoveryengine/v1/user_event_pb.rb +1 -1
  97. data/lib/google/cloud/discoveryengine/v1/user_event_service_pb.rb +1 -1
  98. data/lib/google/cloud/discoveryengine/v1/user_event_service_services_pb.rb +1 -1
  99. data/proto_docs/google/cloud/discoveryengine/v1/answer.rb +362 -0
  100. data/proto_docs/google/cloud/discoveryengine/v1/common.rb +16 -0
  101. data/proto_docs/google/cloud/discoveryengine/v1/control.rb +207 -0
  102. data/proto_docs/google/cloud/discoveryengine/v1/control_service.rb +126 -0
  103. data/proto_docs/google/cloud/discoveryengine/v1/conversation.rb +2 -2
  104. data/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +485 -0
  105. data/proto_docs/google/cloud/discoveryengine/v1/data_store.rb +3 -0
  106. data/proto_docs/google/cloud/discoveryengine/v1/data_store_service.rb +2 -2
  107. data/proto_docs/google/cloud/discoveryengine/v1/document_processing_config.rb +102 -0
  108. data/proto_docs/google/cloud/discoveryengine/v1/document_service.rb +5 -5
  109. data/proto_docs/google/cloud/discoveryengine/v1/engine.rb +3 -3
  110. data/proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb +144 -0
  111. data/proto_docs/google/cloud/discoveryengine/v1/grounding.rb +79 -0
  112. data/proto_docs/google/cloud/discoveryengine/v1/import_config.rb +4 -4
  113. data/proto_docs/google/cloud/discoveryengine/v1/project.rb +106 -0
  114. data/proto_docs/google/cloud/discoveryengine/v1/project_service.rb +57 -0
  115. data/proto_docs/google/cloud/discoveryengine/v1/rank_service.rb +124 -0
  116. data/proto_docs/google/cloud/discoveryengine/v1/recommendation_service.rb +20 -19
  117. data/proto_docs/google/cloud/discoveryengine/v1/schema_service.rb +5 -5
  118. data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +23 -18
  119. data/proto_docs/google/cloud/discoveryengine/v1/session.rb +88 -0
  120. data/proto_docs/google/cloud/discoveryengine/v1/site_search_engine.rb +3 -0
  121. data/proto_docs/google/cloud/discoveryengine/v1/user_event.rb +24 -3
  122. data/proto_docs/google/cloud/discoveryengine/v1/user_event_service.rb +13 -1
  123. metadata +56 -2
@@ -26,6 +26,9 @@ module Google
26
26
  module DataStoreService
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,
@@ -88,6 +88,51 @@ module Google
88
88
  resource.call(**args)
89
89
  end
90
90
 
91
+ ##
92
+ # Create a fully-qualified DocumentProcessingConfig resource string.
93
+ #
94
+ # @overload document_processing_config_path(project:, location:, data_store:)
95
+ # The resource will be in the following format:
96
+ #
97
+ # `projects/{project}/locations/{location}/dataStores/{data_store}/documentProcessingConfig`
98
+ #
99
+ # @param project [String]
100
+ # @param location [String]
101
+ # @param data_store [String]
102
+ #
103
+ # @overload document_processing_config_path(project:, location:, collection:, data_store:)
104
+ # The resource will be in the following format:
105
+ #
106
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/documentProcessingConfig`
107
+ #
108
+ # @param project [String]
109
+ # @param location [String]
110
+ # @param collection [String]
111
+ # @param data_store [String]
112
+ #
113
+ # @return [::String]
114
+ def document_processing_config_path **args
115
+ resources = {
116
+ "data_store:location:project" => (proc do |project:, location:, data_store:|
117
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
118
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
119
+
120
+ "projects/#{project}/locations/#{location}/dataStores/#{data_store}/documentProcessingConfig"
121
+ end),
122
+ "collection:data_store:location:project" => (proc do |project:, location:, collection:, data_store:|
123
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
124
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
125
+ raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/"
126
+
127
+ "projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}/documentProcessingConfig"
128
+ end)
129
+ }
130
+
131
+ resource = resources[args.keys.sort.join(":")]
132
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
133
+ resource.call(**args)
134
+ end
135
+
91
136
  ##
92
137
  # Create a fully-qualified Schema resource string.
93
138
  #
@@ -34,6 +34,9 @@ module Google
34
34
  # configuration.
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
 
@@ -269,12 +272,13 @@ module Google
269
272
  # Customize the options with defaults
270
273
  call_metadata = @config.rpcs.create_data_store.metadata.to_h
271
274
 
272
- # Set x-goog-api-client and x-goog-user-project headers
275
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
273
276
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
274
277
  lib_name: @config.lib_name, lib_version: @config.lib_version,
275
278
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
276
279
  transports_version_send: [:rest]
277
280
 
281
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
278
282
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
279
283
 
280
284
  options.apply_defaults timeout: @config.rpcs.create_data_store.timeout,
@@ -357,12 +361,13 @@ module Google
357
361
  # Customize the options with defaults
358
362
  call_metadata = @config.rpcs.get_data_store.metadata.to_h
359
363
 
360
- # Set x-goog-api-client and x-goog-user-project headers
364
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
361
365
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
362
366
  lib_name: @config.lib_name, lib_version: @config.lib_version,
363
367
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
364
368
  transports_version_send: [:rest]
365
369
 
370
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
366
371
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
367
372
 
368
373
  options.apply_defaults timeout: @config.rpcs.get_data_store.timeout,
@@ -426,8 +431,8 @@ module Google
426
431
  # must match the call that provided the page token. Otherwise, an
427
432
  # INVALID_ARGUMENT error is returned.
428
433
  # @param filter [::String]
429
- # Filter by solution type. For example: filter =
430
- # 'solution_type:SOLUTION_TYPE_SEARCH'
434
+ # Filter by solution type .
435
+ # For example: `filter = 'solution_type:SOLUTION_TYPE_SEARCH'`
431
436
  # @yield [result, operation] Access the result along with the TransportOperation object
432
437
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::DataStore>]
433
438
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -466,12 +471,13 @@ module Google
466
471
  # Customize the options with defaults
467
472
  call_metadata = @config.rpcs.list_data_stores.metadata.to_h
468
473
 
469
- # Set x-goog-api-client and x-goog-user-project headers
474
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
470
475
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
471
476
  lib_name: @config.lib_name, lib_version: @config.lib_version,
472
477
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
473
478
  transports_version_send: [:rest]
474
479
 
480
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
475
481
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
476
482
 
477
483
  options.apply_defaults timeout: @config.rpcs.list_data_stores.timeout,
@@ -561,12 +567,13 @@ module Google
561
567
  # Customize the options with defaults
562
568
  call_metadata = @config.rpcs.delete_data_store.metadata.to_h
563
569
 
564
- # Set x-goog-api-client and x-goog-user-project headers
570
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
565
571
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
566
572
  lib_name: @config.lib_name, lib_version: @config.lib_version,
567
573
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
568
574
  transports_version_send: [:rest]
569
575
 
576
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
570
577
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
571
578
 
572
579
  options.apply_defaults timeout: @config.rpcs.delete_data_store.timeout,
@@ -654,12 +661,13 @@ module Google
654
661
  # Customize the options with defaults
655
662
  call_metadata = @config.rpcs.update_data_store.metadata.to_h
656
663
 
657
- # Set x-goog-api-client and x-goog-user-project headers
664
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
658
665
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
659
666
  lib_name: @config.lib_name, lib_version: @config.lib_version,
660
667
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
661
668
  transports_version_send: [:rest]
662
669
 
670
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
663
671
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
664
672
 
665
673
  options.apply_defaults timeout: @config.rpcs.update_data_store.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
  # information of the customer's website.
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.get_document.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 = {}
@@ -325,7 +329,7 @@ module Google
325
329
  # @param page_size [::Integer]
326
330
  # Maximum number of {::Google::Cloud::DiscoveryEngine::V1::Document Document}s to
327
331
  # return. If unspecified, defaults to 100. The maximum allowed value is 1000.
328
- # Values above 1000 will be coerced to 1000.
332
+ # Values above 1000 are set to 1000.
329
333
  #
330
334
  # If this field is negative, an `INVALID_ARGUMENT` error is returned.
331
335
  # @param page_token [::String]
@@ -378,10 +382,11 @@ module Google
378
382
  # Customize the options with defaults
379
383
  metadata = @config.rpcs.list_documents.metadata.to_h
380
384
 
381
- # Set x-goog-api-client and x-goog-user-project headers
385
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
382
386
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
383
387
  lib_name: @config.lib_name, lib_version: @config.lib_version,
384
388
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
389
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
385
390
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
386
391
 
387
392
  header_params = {}
@@ -435,7 +440,7 @@ module Google
435
440
  # create.
436
441
  # @param document_id [::String]
437
442
  # Required. The ID to use for the
438
- # {::Google::Cloud::DiscoveryEngine::V1::Document Document}, which will become the
443
+ # {::Google::Cloud::DiscoveryEngine::V1::Document Document}, which becomes the
439
444
  # final component of the
440
445
  # {::Google::Cloud::DiscoveryEngine::V1::Document#name Document.name}.
441
446
  #
@@ -486,10 +491,11 @@ module Google
486
491
  # Customize the options with defaults
487
492
  metadata = @config.rpcs.create_document.metadata.to_h
488
493
 
489
- # Set x-goog-api-client and x-goog-user-project headers
494
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
490
495
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
491
496
  lib_name: @config.lib_name, lib_version: @config.lib_version,
492
497
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
498
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
493
499
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
494
500
 
495
501
  header_params = {}
@@ -546,12 +552,12 @@ module Google
546
552
  # {::Google::Cloud::DiscoveryEngine::V1::UpdateDocumentRequest#allow_missing allow_missing}
547
553
  # is not set, a `NOT_FOUND` error is returned.
548
554
  # @param allow_missing [::Boolean]
549
- # If set to true, and the
555
+ # If set to `true` and the
550
556
  # {::Google::Cloud::DiscoveryEngine::V1::Document Document} is not found, a new
551
- # {::Google::Cloud::DiscoveryEngine::V1::Document Document} will be created.
557
+ # {::Google::Cloud::DiscoveryEngine::V1::Document Document} is be created.
552
558
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
553
559
  # Indicates which fields in the provided imported 'document' to update. If
554
- # not set, will by default update all fields.
560
+ # not set, by default updates all fields.
555
561
  #
556
562
  # @yield [response, operation] Access the result along with the RPC operation
557
563
  # @yieldparam response [::Google::Cloud::DiscoveryEngine::V1::Document]
@@ -587,10 +593,11 @@ module Google
587
593
  # Customize the options with defaults
588
594
  metadata = @config.rpcs.update_document.metadata.to_h
589
595
 
590
- # Set x-goog-api-client and x-goog-user-project headers
596
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
591
597
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
592
598
  lib_name: @config.lib_name, lib_version: @config.lib_version,
593
599
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
600
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
594
601
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
595
602
 
596
603
  header_params = {}
@@ -681,10 +688,11 @@ module Google
681
688
  # Customize the options with defaults
682
689
  metadata = @config.rpcs.delete_document.metadata.to_h
683
690
 
684
- # Set x-goog-api-client and x-goog-user-project headers
691
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
685
692
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
686
693
  lib_name: @config.lib_name, lib_version: @config.lib_version,
687
694
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
695
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
688
696
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
689
697
 
690
698
  header_params = {}
@@ -714,7 +722,7 @@ module Google
714
722
  ##
715
723
  # Bulk import of multiple
716
724
  # {::Google::Cloud::DiscoveryEngine::V1::Document Document}s. Request processing
717
- # may be synchronous. Non-existing items will be created.
725
+ # may be synchronous. Non-existing items are created.
718
726
  #
719
727
  # Note: It is possible for a subset of the
720
728
  # {::Google::Cloud::DiscoveryEngine::V1::Document Document}s to be successfully
@@ -867,10 +875,11 @@ module Google
867
875
  # Customize the options with defaults
868
876
  metadata = @config.rpcs.import_documents.metadata.to_h
869
877
 
870
- # Set x-goog-api-client and x-goog-user-project headers
878
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
871
879
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
872
880
  lib_name: @config.lib_name, lib_version: @config.lib_version,
873
881
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
882
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
874
883
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
875
884
 
876
885
  header_params = {}
@@ -983,10 +992,11 @@ module Google
983
992
  # Customize the options with defaults
984
993
  metadata = @config.rpcs.purge_documents.metadata.to_h
985
994
 
986
- # Set x-goog-api-client and x-goog-user-project headers
995
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
987
996
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
988
997
  lib_name: @config.lib_name, lib_version: @config.lib_version,
989
998
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
999
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
990
1000
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
991
1001
 
992
1002
  header_params = {}
@@ -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,