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
@@ -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,
@@ -518,12 +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.
524
530
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
525
531
  # Indicates which fields in the provided imported 'document' to update. If
526
- # not set, will by default update all fields.
532
+ # not set, by default updates all fields.
527
533
  # @yield [result, operation] Access the result along with the TransportOperation object
528
534
  # @yieldparam result [::Google::Cloud::DiscoveryEngine::V1::Document]
529
535
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -558,12 +564,13 @@ module Google
558
564
  # Customize the options with defaults
559
565
  call_metadata = @config.rpcs.update_document.metadata.to_h
560
566
 
561
- # 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
562
568
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
563
569
  lib_name: @config.lib_name, lib_version: @config.lib_version,
564
570
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
565
571
  transports_version_send: [:rest]
566
572
 
573
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
567
574
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
568
575
 
569
576
  options.apply_defaults timeout: @config.rpcs.update_document.timeout,
@@ -645,12 +652,13 @@ module Google
645
652
  # Customize the options with defaults
646
653
  call_metadata = @config.rpcs.delete_document.metadata.to_h
647
654
 
648
- # 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
649
656
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
650
657
  lib_name: @config.lib_name, lib_version: @config.lib_version,
651
658
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
652
659
  transports_version_send: [:rest]
653
660
 
661
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
654
662
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
655
663
 
656
664
  options.apply_defaults timeout: @config.rpcs.delete_document.timeout,
@@ -672,7 +680,7 @@ module Google
672
680
  ##
673
681
  # Bulk import of multiple
674
682
  # {::Google::Cloud::DiscoveryEngine::V1::Document Document}s. Request processing
675
- # may be synchronous. Non-existing items will be created.
683
+ # may be synchronous. Non-existing items are created.
676
684
  #
677
685
  # Note: It is possible for a subset of the
678
686
  # {::Google::Cloud::DiscoveryEngine::V1::Document Document}s to be successfully
@@ -824,12 +832,13 @@ module Google
824
832
  # Customize the options with defaults
825
833
  call_metadata = @config.rpcs.import_documents.metadata.to_h
826
834
 
827
- # 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
828
836
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
829
837
  lib_name: @config.lib_name, lib_version: @config.lib_version,
830
838
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
831
839
  transports_version_send: [:rest]
832
840
 
841
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
833
842
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
834
843
 
835
844
  options.apply_defaults timeout: @config.rpcs.import_documents.timeout,
@@ -933,12 +942,13 @@ module Google
933
942
  # Customize the options with defaults
934
943
  call_metadata = @config.rpcs.purge_documents.metadata.to_h
935
944
 
936
- # 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
937
946
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
938
947
  lib_name: @config.lib_name, lib_version: @config.lib_version,
939
948
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
940
949
  transports_version_send: [:rest]
941
950
 
951
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
942
952
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
943
953
 
944
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,
@@ -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
 
@@ -256,12 +259,13 @@ module Google
256
259
  # Customize the options with defaults
257
260
  call_metadata = @config.rpcs.create_engine.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.create_engine.timeout,
@@ -351,12 +355,13 @@ module Google
351
355
  # Customize the options with defaults
352
356
  call_metadata = @config.rpcs.delete_engine.metadata.to_h
353
357
 
354
- # Set x-goog-api-client and x-goog-user-project headers
358
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
355
359
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
356
360
  lib_name: @config.lib_name, lib_version: @config.lib_version,
357
361
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
358
362
  transports_version_send: [:rest]
359
363
 
364
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
360
365
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
361
366
 
362
367
  options.apply_defaults timeout: @config.rpcs.delete_engine.timeout,
@@ -443,12 +448,13 @@ module Google
443
448
  # Customize the options with defaults
444
449
  call_metadata = @config.rpcs.update_engine.metadata.to_h
445
450
 
446
- # Set x-goog-api-client and x-goog-user-project headers
451
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
447
452
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
448
453
  lib_name: @config.lib_name, lib_version: @config.lib_version,
449
454
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
450
455
  transports_version_send: [:rest]
451
456
 
457
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
452
458
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
453
459
 
454
460
  options.apply_defaults timeout: @config.rpcs.update_engine.timeout,
@@ -523,12 +529,13 @@ module Google
523
529
  # Customize the options with defaults
524
530
  call_metadata = @config.rpcs.get_engine.metadata.to_h
525
531
 
526
- # Set x-goog-api-client and x-goog-user-project headers
532
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
527
533
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
528
534
  lib_name: @config.lib_name, lib_version: @config.lib_version,
529
535
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
530
536
  transports_version_send: [:rest]
531
537
 
538
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
532
539
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
533
540
 
534
541
  options.apply_defaults timeout: @config.rpcs.get_engine.timeout,
@@ -614,12 +621,13 @@ module Google
614
621
  # Customize the options with defaults
615
622
  call_metadata = @config.rpcs.list_engines.metadata.to_h
616
623
 
617
- # Set x-goog-api-client and x-goog-user-project headers
624
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
618
625
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
619
626
  lib_name: @config.lib_name, lib_version: @config.lib_version,
620
627
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
621
628
  transports_version_send: [:rest]
622
629
 
630
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
623
631
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
624
632
 
625
633
  options.apply_defaults timeout: @config.rpcs.list_engines.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