google-cloud-discovery_engine-v1 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/discovery_engine/v1/completion_service/rest/operations.rb +14 -0
  3. data/lib/google/cloud/discovery_engine/v1/data_store_service/client.rb +10 -1
  4. data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/client.rb +10 -1
  5. data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/operations.rb +14 -0
  6. data/lib/google/cloud/discovery_engine/v1/document_service/client.rb +109 -1
  7. data/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb +102 -1
  8. data/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb +14 -0
  9. data/lib/google/cloud/discovery_engine/v1/document_service/rest/service_stub.rb +66 -0
  10. data/lib/google/cloud/discovery_engine/v1/engine_service/rest/operations.rb +14 -0
  11. data/lib/google/cloud/discovery_engine/v1/project_service/rest/operations.rb +14 -0
  12. data/lib/google/cloud/discovery_engine/v1/recommendation_service/client.rb +2 -1
  13. data/lib/google/cloud/discovery_engine/v1/recommendation_service/rest/client.rb +2 -1
  14. data/lib/google/cloud/discovery_engine/v1/rest.rb +1 -0
  15. data/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb +14 -0
  16. data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +6 -3
  17. data/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +6 -3
  18. data/lib/google/cloud/discovery_engine/v1/search_tuning_service/client.rb +571 -0
  19. data/lib/google/cloud/discovery_engine/v1/search_tuning_service/credentials.rb +47 -0
  20. data/lib/google/cloud/discovery_engine/v1/search_tuning_service/operations.rb +809 -0
  21. data/lib/google/cloud/discovery_engine/v1/search_tuning_service/paths.rb +78 -0
  22. data/lib/google/cloud/discovery_engine/v1/search_tuning_service/rest/client.rb +531 -0
  23. data/lib/google/cloud/discovery_engine/v1/search_tuning_service/rest/operations.rb +1128 -0
  24. data/lib/google/cloud/discovery_engine/v1/search_tuning_service/rest/service_stub.rb +188 -0
  25. data/lib/google/cloud/discovery_engine/v1/search_tuning_service/rest.rb +53 -0
  26. data/lib/google/cloud/discovery_engine/v1/search_tuning_service.rb +56 -0
  27. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/operations.rb +14 -0
  28. data/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb +139 -0
  29. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb +132 -0
  30. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb +14 -0
  31. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/service_stub.rb +68 -0
  32. data/lib/google/cloud/discovery_engine/v1/version.rb +1 -1
  33. data/lib/google/cloud/discovery_engine/v1.rb +1 -0
  34. data/lib/google/cloud/discoveryengine/v1/answer_pb.rb +2 -1
  35. data/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb +1 -1
  36. data/lib/google/cloud/discoveryengine/v1/custom_tuning_model_pb.rb +48 -0
  37. data/lib/google/cloud/discoveryengine/v1/data_store_service_pb.rb +1 -1
  38. data/lib/google/cloud/discoveryengine/v1/document_pb.rb +4 -1
  39. data/lib/google/cloud/discoveryengine/v1/document_service_pb.rb +10 -1
  40. data/lib/google/cloud/discoveryengine/v1/document_service_services_pb.rb +4 -0
  41. data/lib/google/cloud/discoveryengine/v1/import_config_pb.rb +1 -1
  42. data/lib/google/cloud/discoveryengine/v1/purge_config_pb.rb +8 -1
  43. data/lib/google/cloud/discoveryengine/v1/search_service_pb.rb +1 -1
  44. data/lib/google/cloud/discoveryengine/v1/search_tuning_service_pb.rb +61 -0
  45. data/lib/google/cloud/discoveryengine/v1/search_tuning_service_services_pb.rb +47 -0
  46. data/lib/google/cloud/discoveryengine/v1/user_event_pb.rb +1 -1
  47. data/lib/google/cloud/discoveryengine/v1/user_event_service_pb.rb +2 -1
  48. data/lib/google/cloud/discoveryengine/v1/user_event_service_services_pb.rb +5 -0
  49. data/proto_docs/google/api/client.rb +17 -0
  50. data/proto_docs/google/cloud/discoveryengine/v1/answer.rb +50 -5
  51. data/proto_docs/google/cloud/discoveryengine/v1/control.rb +6 -4
  52. data/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +9 -9
  53. data/proto_docs/google/cloud/discoveryengine/v1/custom_tuning_model.rb +94 -0
  54. data/proto_docs/google/cloud/discoveryengine/v1/data_store_service.rb +10 -0
  55. data/proto_docs/google/cloud/discoveryengine/v1/document.rb +22 -0
  56. data/proto_docs/google/cloud/discoveryengine/v1/document_processing_config.rb +2 -0
  57. data/proto_docs/google/cloud/discoveryengine/v1/document_service.rb +101 -0
  58. data/proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb +2 -1
  59. data/proto_docs/google/cloud/discoveryengine/v1/import_config.rb +13 -7
  60. data/proto_docs/google/cloud/discoveryengine/v1/purge_config.rb +115 -0
  61. data/proto_docs/google/cloud/discoveryengine/v1/recommendation_service.rb +2 -1
  62. data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +40 -16
  63. data/proto_docs/google/cloud/discoveryengine/v1/search_tuning_service.rb +172 -0
  64. data/proto_docs/google/cloud/discoveryengine/v1/user_event.rb +4 -0
  65. metadata +16 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6e151cc9756d3d0563b4bbcedb4b0c8d5d3491fd0f6301e586513bba64fec5b8
4
- data.tar.gz: d23caad5060c3839a0ed0d2645e8554ef778fbcc0909d7c70045213b6e2d31df
3
+ metadata.gz: 889efe23187a055bc64300772cf5115163be340ee593c14cd2b80b315c9fb74c
4
+ data.tar.gz: c63e73f558b7ca55fe00a6f32f00c415248524cf4612aeeb097a4e14fbcc5842
5
5
  SHA512:
6
- metadata.gz: 3210c28392749e32f5442df864bb4e798e19de09b6c702ba1dffe75e36a42b42b282b9ac6a6ba00c458fea2a366ceff8f7287e73354b0d971b13fffd4bcafcc0
7
- data.tar.gz: 6b001d7924dbe4cb645d5586a31af6d235c92076d067845babc56cbff1ac3577c1208ed9651ed0e40b0e108101b7e60bfe2d4e0248d927652c813109094a66e8
6
+ metadata.gz: 5f64b0e41f4a50f07658adab128dbbb821cbc9f4c32522fa231be28804147b3b2411c0b16135a425740ec927180e93dd6ba609f5d466d9d682f34085c56a7de7
7
+ data.tar.gz: b6142d1c66b468490311df8f44ecf4bf7f3272fb562a289e65cb41dabcb6312ccdae1215fc0a933ef4c4912ef49c8182e0a10cb3451452e1f9924f69838ab5c7
@@ -911,6 +911,13 @@ module Google
911
911
  ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/?$}, false]
912
912
  ]
913
913
  )
914
+ .with_bindings(
915
+ uri_method: :get,
916
+ uri_template: "/v1/{name}/operations",
917
+ matches: [
918
+ ["name", %r{^projects/[^/]+/locations/[^/]+/identity_mapping_stores/[^/]+/?$}, false]
919
+ ]
920
+ )
914
921
  .with_bindings(
915
922
  uri_method: :get,
916
923
  uri_template: "/v1/{name}/operations",
@@ -1030,6 +1037,13 @@ module Google
1030
1037
  ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/operations/[^/]+/?$}, false]
1031
1038
  ]
1032
1039
  )
1040
+ .with_bindings(
1041
+ uri_method: :get,
1042
+ uri_template: "/v1/{name}",
1043
+ matches: [
1044
+ ["name", %r{^projects/[^/]+/locations/[^/]+/identity_mapping_stores/[^/]+/operations/[^/]+/?$}, false]
1045
+ ]
1046
+ )
1033
1047
  .with_bindings(
1034
1048
  uri_method: :get,
1035
1049
  uri_template: "/v1/{name}",
@@ -212,7 +212,7 @@ module Google
212
212
  # @param options [::Gapic::CallOptions, ::Hash]
213
213
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
214
214
  #
215
- # @overload create_data_store(parent: nil, data_store: nil, data_store_id: nil, create_advanced_site_search: nil)
215
+ # @overload create_data_store(parent: nil, data_store: nil, data_store_id: nil, create_advanced_site_search: nil, skip_default_schema_creation: nil)
216
216
  # Pass arguments to `create_data_store` via keyword arguments. Note that at
217
217
  # least one keyword argument is required. To specify no parameters, or to keep all
218
218
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -238,6 +238,15 @@ module Google
238
238
  # If the data store is not configured as site
239
239
  # search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will
240
240
  # be ignored.
241
+ # @param skip_default_schema_creation [::Boolean]
242
+ # A boolean flag indicating whether to skip the default schema creation for
243
+ # the data store. Only enable this flag if you are certain that the default
244
+ # schema is incompatible with your use case.
245
+ #
246
+ # If set to true, you must manually create a schema for the data store before
247
+ # any documents can be ingested.
248
+ #
249
+ # This flag cannot be specified if `data_store.starting_schema` is specified.
241
250
  #
242
251
  # @yield [response, operation] Access the result along with the RPC operation
243
252
  # @yieldparam response [::Gapic::Operation]
@@ -205,7 +205,7 @@ module Google
205
205
  # @param options [::Gapic::CallOptions, ::Hash]
206
206
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
207
207
  #
208
- # @overload create_data_store(parent: nil, data_store: nil, data_store_id: nil, create_advanced_site_search: nil)
208
+ # @overload create_data_store(parent: nil, data_store: nil, data_store_id: nil, create_advanced_site_search: nil, skip_default_schema_creation: nil)
209
209
  # Pass arguments to `create_data_store` via keyword arguments. Note that at
210
210
  # least one keyword argument is required. To specify no parameters, or to keep all
211
211
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -231,6 +231,15 @@ module Google
231
231
  # If the data store is not configured as site
232
232
  # search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will
233
233
  # be ignored.
234
+ # @param skip_default_schema_creation [::Boolean]
235
+ # A boolean flag indicating whether to skip the default schema creation for
236
+ # the data store. Only enable this flag if you are certain that the default
237
+ # schema is incompatible with your use case.
238
+ #
239
+ # If set to true, you must manually create a schema for the data store before
240
+ # any documents can be ingested.
241
+ #
242
+ # This flag cannot be specified if `data_store.starting_schema` is specified.
234
243
  # @yield [result, operation] Access the result along with the TransportOperation object
235
244
  # @yieldparam result [::Gapic::Operation]
236
245
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -911,6 +911,13 @@ module Google
911
911
  ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/?$}, false]
912
912
  ]
913
913
  )
914
+ .with_bindings(
915
+ uri_method: :get,
916
+ uri_template: "/v1/{name}/operations",
917
+ matches: [
918
+ ["name", %r{^projects/[^/]+/locations/[^/]+/identity_mapping_stores/[^/]+/?$}, false]
919
+ ]
920
+ )
914
921
  .with_bindings(
915
922
  uri_method: :get,
916
923
  uri_template: "/v1/{name}/operations",
@@ -1030,6 +1037,13 @@ module Google
1030
1037
  ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/operations/[^/]+/?$}, false]
1031
1038
  ]
1032
1039
  )
1040
+ .with_bindings(
1041
+ uri_method: :get,
1042
+ uri_template: "/v1/{name}",
1043
+ matches: [
1044
+ ["name", %r{^projects/[^/]+/locations/[^/]+/identity_mapping_stores/[^/]+/operations/[^/]+/?$}, false]
1045
+ ]
1046
+ )
1033
1047
  .with_bindings(
1034
1048
  uri_method: :get,
1035
1049
  uri_template: "/v1/{name}",
@@ -937,11 +937,18 @@ module Google
937
937
  # @param options [::Gapic::CallOptions, ::Hash]
938
938
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
939
939
  #
940
- # @overload purge_documents(parent: nil, filter: nil, force: nil)
940
+ # @overload purge_documents(gcs_source: nil, inline_source: nil, parent: nil, filter: nil, error_config: nil, force: nil)
941
941
  # Pass arguments to `purge_documents` via keyword arguments. Note that at
942
942
  # least one keyword argument is required. To specify no parameters, or to keep all
943
943
  # the default parameter values, pass an empty Hash as a request object (see above).
944
944
  #
945
+ # @param gcs_source [::Google::Cloud::DiscoveryEngine::V1::GcsSource, ::Hash]
946
+ # Cloud Storage location for the input content.
947
+ # Supported `data_schema`:
948
+ # * `document_id`: One valid
949
+ # {::Google::Cloud::DiscoveryEngine::V1::Document#id Document.id} per line.
950
+ # @param inline_source [::Google::Cloud::DiscoveryEngine::V1::PurgeDocumentsRequest::InlineSource, ::Hash]
951
+ # Inline source for the input content for purge.
945
952
  # @param parent [::String]
946
953
  # Required. The parent resource name, such as
947
954
  # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
@@ -949,6 +956,8 @@ module Google
949
956
  # Required. Filter matching documents to purge. Only currently supported
950
957
  # value is
951
958
  # `*` (all items).
959
+ # @param error_config [::Google::Cloud::DiscoveryEngine::V1::PurgeErrorConfig, ::Hash]
960
+ # The desired location of errors incurred during the purge.
952
961
  # @param force [::Boolean]
953
962
  # Actually performs the purge. If `force` is set to false, return the
954
963
  # expected purge count without deleting any documents.
@@ -1026,6 +1035,98 @@ module Google
1026
1035
  raise ::Google::Cloud::Error.from_error(e)
1027
1036
  end
1028
1037
 
1038
+ ##
1039
+ # Gets index freshness metadata for
1040
+ # {::Google::Cloud::DiscoveryEngine::V1::Document Document}s. Supported for
1041
+ # website search only.
1042
+ #
1043
+ # @overload batch_get_documents_metadata(request, options = nil)
1044
+ # Pass arguments to `batch_get_documents_metadata` via a request object, either of type
1045
+ # {::Google::Cloud::DiscoveryEngine::V1::BatchGetDocumentsMetadataRequest} or an equivalent Hash.
1046
+ #
1047
+ # @param request [::Google::Cloud::DiscoveryEngine::V1::BatchGetDocumentsMetadataRequest, ::Hash]
1048
+ # A request object representing the call parameters. Required. To specify no
1049
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1050
+ # @param options [::Gapic::CallOptions, ::Hash]
1051
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1052
+ #
1053
+ # @overload batch_get_documents_metadata(parent: nil, matcher: nil)
1054
+ # Pass arguments to `batch_get_documents_metadata` via keyword arguments. Note that at
1055
+ # least one keyword argument is required. To specify no parameters, or to keep all
1056
+ # the default parameter values, pass an empty Hash as a request object (see above).
1057
+ #
1058
+ # @param parent [::String]
1059
+ # Required. The parent branch resource name, such as
1060
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
1061
+ # @param matcher [::Google::Cloud::DiscoveryEngine::V1::BatchGetDocumentsMetadataRequest::Matcher, ::Hash]
1062
+ # Required. Matcher for the
1063
+ # {::Google::Cloud::DiscoveryEngine::V1::Document Document}s.
1064
+ #
1065
+ # @yield [response, operation] Access the result along with the RPC operation
1066
+ # @yieldparam response [::Google::Cloud::DiscoveryEngine::V1::BatchGetDocumentsMetadataResponse]
1067
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1068
+ #
1069
+ # @return [::Google::Cloud::DiscoveryEngine::V1::BatchGetDocumentsMetadataResponse]
1070
+ #
1071
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1072
+ #
1073
+ # @example Basic example
1074
+ # require "google/cloud/discovery_engine/v1"
1075
+ #
1076
+ # # Create a client object. The client can be reused for multiple calls.
1077
+ # client = Google::Cloud::DiscoveryEngine::V1::DocumentService::Client.new
1078
+ #
1079
+ # # Create a request. To set request fields, pass in keyword arguments.
1080
+ # request = Google::Cloud::DiscoveryEngine::V1::BatchGetDocumentsMetadataRequest.new
1081
+ #
1082
+ # # Call the batch_get_documents_metadata method.
1083
+ # result = client.batch_get_documents_metadata request
1084
+ #
1085
+ # # The returned object is of type Google::Cloud::DiscoveryEngine::V1::BatchGetDocumentsMetadataResponse.
1086
+ # p result
1087
+ #
1088
+ def batch_get_documents_metadata request, options = nil
1089
+ raise ::ArgumentError, "request must be provided" if request.nil?
1090
+
1091
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::BatchGetDocumentsMetadataRequest
1092
+
1093
+ # Converts hash and nil to an options object
1094
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1095
+
1096
+ # Customize the options with defaults
1097
+ metadata = @config.rpcs.batch_get_documents_metadata.metadata.to_h
1098
+
1099
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1100
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1101
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1102
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
1103
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1104
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1105
+
1106
+ header_params = {}
1107
+ if request.parent
1108
+ header_params["parent"] = request.parent
1109
+ end
1110
+
1111
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1112
+ metadata[:"x-goog-request-params"] ||= request_params_header
1113
+
1114
+ options.apply_defaults timeout: @config.rpcs.batch_get_documents_metadata.timeout,
1115
+ metadata: metadata,
1116
+ retry_policy: @config.rpcs.batch_get_documents_metadata.retry_policy
1117
+
1118
+ options.apply_defaults timeout: @config.timeout,
1119
+ metadata: @config.metadata,
1120
+ retry_policy: @config.retry_policy
1121
+
1122
+ @document_service_stub.call_rpc :batch_get_documents_metadata, request, options: options do |response, operation|
1123
+ yield response, operation if block_given?
1124
+ return response
1125
+ end
1126
+ rescue ::GRPC::BadStatus => e
1127
+ raise ::Google::Cloud::Error.from_error(e)
1128
+ end
1129
+
1029
1130
  ##
1030
1131
  # Configuration class for the DocumentService API.
1031
1132
  #
@@ -1214,6 +1315,11 @@ module Google
1214
1315
  # @return [::Gapic::Config::Method]
1215
1316
  #
1216
1317
  attr_reader :purge_documents
1318
+ ##
1319
+ # RPC-specific configuration for `batch_get_documents_metadata`
1320
+ # @return [::Gapic::Config::Method]
1321
+ #
1322
+ attr_reader :batch_get_documents_metadata
1217
1323
 
1218
1324
  # @private
1219
1325
  def initialize parent_rpcs = nil
@@ -1231,6 +1337,8 @@ module Google
1231
1337
  @import_documents = ::Gapic::Config::Method.new import_documents_config
1232
1338
  purge_documents_config = parent_rpcs.purge_documents if parent_rpcs.respond_to? :purge_documents
1233
1339
  @purge_documents = ::Gapic::Config::Method.new purge_documents_config
1340
+ batch_get_documents_metadata_config = parent_rpcs.batch_get_documents_metadata if parent_rpcs.respond_to? :batch_get_documents_metadata
1341
+ @batch_get_documents_metadata = ::Gapic::Config::Method.new batch_get_documents_metadata_config
1234
1342
 
1235
1343
  yield self if block_given?
1236
1344
  end
@@ -888,11 +888,18 @@ module Google
888
888
  # @param options [::Gapic::CallOptions, ::Hash]
889
889
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
890
890
  #
891
- # @overload purge_documents(parent: nil, filter: nil, force: nil)
891
+ # @overload purge_documents(gcs_source: nil, inline_source: nil, parent: nil, filter: nil, error_config: nil, force: nil)
892
892
  # Pass arguments to `purge_documents` via keyword arguments. Note that at
893
893
  # least one keyword argument is required. To specify no parameters, or to keep all
894
894
  # the default parameter values, pass an empty Hash as a request object (see above).
895
895
  #
896
+ # @param gcs_source [::Google::Cloud::DiscoveryEngine::V1::GcsSource, ::Hash]
897
+ # Cloud Storage location for the input content.
898
+ # Supported `data_schema`:
899
+ # * `document_id`: One valid
900
+ # {::Google::Cloud::DiscoveryEngine::V1::Document#id Document.id} per line.
901
+ # @param inline_source [::Google::Cloud::DiscoveryEngine::V1::PurgeDocumentsRequest::InlineSource, ::Hash]
902
+ # Inline source for the input content for purge.
896
903
  # @param parent [::String]
897
904
  # Required. The parent resource name, such as
898
905
  # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
@@ -900,6 +907,8 @@ module Google
900
907
  # Required. Filter matching documents to purge. Only currently supported
901
908
  # value is
902
909
  # `*` (all items).
910
+ # @param error_config [::Google::Cloud::DiscoveryEngine::V1::PurgeErrorConfig, ::Hash]
911
+ # The desired location of errors incurred during the purge.
903
912
  # @param force [::Boolean]
904
913
  # Actually performs the purge. If `force` is set to false, return the
905
914
  # expected purge count without deleting any documents.
@@ -970,6 +979,91 @@ module Google
970
979
  raise ::Google::Cloud::Error.from_error(e)
971
980
  end
972
981
 
982
+ ##
983
+ # Gets index freshness metadata for
984
+ # {::Google::Cloud::DiscoveryEngine::V1::Document Document}s. Supported for
985
+ # website search only.
986
+ #
987
+ # @overload batch_get_documents_metadata(request, options = nil)
988
+ # Pass arguments to `batch_get_documents_metadata` via a request object, either of type
989
+ # {::Google::Cloud::DiscoveryEngine::V1::BatchGetDocumentsMetadataRequest} or an equivalent Hash.
990
+ #
991
+ # @param request [::Google::Cloud::DiscoveryEngine::V1::BatchGetDocumentsMetadataRequest, ::Hash]
992
+ # A request object representing the call parameters. Required. To specify no
993
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
994
+ # @param options [::Gapic::CallOptions, ::Hash]
995
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
996
+ #
997
+ # @overload batch_get_documents_metadata(parent: nil, matcher: nil)
998
+ # Pass arguments to `batch_get_documents_metadata` via keyword arguments. Note that at
999
+ # least one keyword argument is required. To specify no parameters, or to keep all
1000
+ # the default parameter values, pass an empty Hash as a request object (see above).
1001
+ #
1002
+ # @param parent [::String]
1003
+ # Required. The parent branch resource name, such as
1004
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
1005
+ # @param matcher [::Google::Cloud::DiscoveryEngine::V1::BatchGetDocumentsMetadataRequest::Matcher, ::Hash]
1006
+ # Required. Matcher for the
1007
+ # {::Google::Cloud::DiscoveryEngine::V1::Document Document}s.
1008
+ # @yield [result, operation] Access the result along with the TransportOperation object
1009
+ # @yieldparam result [::Google::Cloud::DiscoveryEngine::V1::BatchGetDocumentsMetadataResponse]
1010
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1011
+ #
1012
+ # @return [::Google::Cloud::DiscoveryEngine::V1::BatchGetDocumentsMetadataResponse]
1013
+ #
1014
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1015
+ #
1016
+ # @example Basic example
1017
+ # require "google/cloud/discovery_engine/v1"
1018
+ #
1019
+ # # Create a client object. The client can be reused for multiple calls.
1020
+ # client = Google::Cloud::DiscoveryEngine::V1::DocumentService::Rest::Client.new
1021
+ #
1022
+ # # Create a request. To set request fields, pass in keyword arguments.
1023
+ # request = Google::Cloud::DiscoveryEngine::V1::BatchGetDocumentsMetadataRequest.new
1024
+ #
1025
+ # # Call the batch_get_documents_metadata method.
1026
+ # result = client.batch_get_documents_metadata request
1027
+ #
1028
+ # # The returned object is of type Google::Cloud::DiscoveryEngine::V1::BatchGetDocumentsMetadataResponse.
1029
+ # p result
1030
+ #
1031
+ def batch_get_documents_metadata request, options = nil
1032
+ raise ::ArgumentError, "request must be provided" if request.nil?
1033
+
1034
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::BatchGetDocumentsMetadataRequest
1035
+
1036
+ # Converts hash and nil to an options object
1037
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1038
+
1039
+ # Customize the options with defaults
1040
+ call_metadata = @config.rpcs.batch_get_documents_metadata.metadata.to_h
1041
+
1042
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1043
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1044
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1045
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
1046
+ transports_version_send: [:rest]
1047
+
1048
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1049
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1050
+
1051
+ options.apply_defaults timeout: @config.rpcs.batch_get_documents_metadata.timeout,
1052
+ metadata: call_metadata,
1053
+ retry_policy: @config.rpcs.batch_get_documents_metadata.retry_policy
1054
+
1055
+ options.apply_defaults timeout: @config.timeout,
1056
+ metadata: @config.metadata,
1057
+ retry_policy: @config.retry_policy
1058
+
1059
+ @document_service_stub.batch_get_documents_metadata request, options do |result, operation|
1060
+ yield result, operation if block_given?
1061
+ return result
1062
+ end
1063
+ rescue ::Gapic::Rest::Error => e
1064
+ raise ::Google::Cloud::Error.from_error(e)
1065
+ end
1066
+
973
1067
  ##
974
1068
  # Configuration class for the DocumentService REST API.
975
1069
  #
@@ -1138,6 +1232,11 @@ module Google
1138
1232
  # @return [::Gapic::Config::Method]
1139
1233
  #
1140
1234
  attr_reader :purge_documents
1235
+ ##
1236
+ # RPC-specific configuration for `batch_get_documents_metadata`
1237
+ # @return [::Gapic::Config::Method]
1238
+ #
1239
+ attr_reader :batch_get_documents_metadata
1141
1240
 
1142
1241
  # @private
1143
1242
  def initialize parent_rpcs = nil
@@ -1155,6 +1254,8 @@ module Google
1155
1254
  @import_documents = ::Gapic::Config::Method.new import_documents_config
1156
1255
  purge_documents_config = parent_rpcs.purge_documents if parent_rpcs.respond_to? :purge_documents
1157
1256
  @purge_documents = ::Gapic::Config::Method.new purge_documents_config
1257
+ batch_get_documents_metadata_config = parent_rpcs.batch_get_documents_metadata if parent_rpcs.respond_to? :batch_get_documents_metadata
1258
+ @batch_get_documents_metadata = ::Gapic::Config::Method.new batch_get_documents_metadata_config
1158
1259
 
1159
1260
  yield self if block_given?
1160
1261
  end
@@ -911,6 +911,13 @@ module Google
911
911
  ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/?$}, false]
912
912
  ]
913
913
  )
914
+ .with_bindings(
915
+ uri_method: :get,
916
+ uri_template: "/v1/{name}/operations",
917
+ matches: [
918
+ ["name", %r{^projects/[^/]+/locations/[^/]+/identity_mapping_stores/[^/]+/?$}, false]
919
+ ]
920
+ )
914
921
  .with_bindings(
915
922
  uri_method: :get,
916
923
  uri_template: "/v1/{name}/operations",
@@ -1030,6 +1037,13 @@ module Google
1030
1037
  ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/operations/[^/]+/?$}, false]
1031
1038
  ]
1032
1039
  )
1040
+ .with_bindings(
1041
+ uri_method: :get,
1042
+ uri_template: "/v1/{name}",
1043
+ matches: [
1044
+ ["name", %r{^projects/[^/]+/locations/[^/]+/identity_mapping_stores/[^/]+/operations/[^/]+/?$}, false]
1045
+ ]
1046
+ )
1033
1047
  .with_bindings(
1034
1048
  uri_method: :get,
1035
1049
  uri_template: "/v1/{name}",
@@ -327,6 +327,44 @@ module Google
327
327
  result
328
328
  end
329
329
 
330
+ ##
331
+ # Baseline implementation for the batch_get_documents_metadata REST call
332
+ #
333
+ # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::BatchGetDocumentsMetadataRequest]
334
+ # A request object representing the call parameters. Required.
335
+ # @param options [::Gapic::CallOptions]
336
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
337
+ #
338
+ # @yield [result, operation] Access the result along with the TransportOperation object
339
+ # @yieldparam result [::Google::Cloud::DiscoveryEngine::V1::BatchGetDocumentsMetadataResponse]
340
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
341
+ #
342
+ # @return [::Google::Cloud::DiscoveryEngine::V1::BatchGetDocumentsMetadataResponse]
343
+ # A result object deserialized from the server's reply
344
+ def batch_get_documents_metadata request_pb, options = nil
345
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
346
+
347
+ verb, uri, query_string_params, body = ServiceStub.transcode_batch_get_documents_metadata_request request_pb
348
+ query_string_params = if query_string_params.any?
349
+ query_string_params.to_h { |p| p.split "=", 2 }
350
+ else
351
+ {}
352
+ end
353
+
354
+ response = @client_stub.make_http_request(
355
+ verb,
356
+ uri: uri,
357
+ body: body || "",
358
+ params: query_string_params,
359
+ options: options
360
+ )
361
+ operation = ::Gapic::Rest::TransportOperation.new response
362
+ result = ::Google::Cloud::DiscoveryEngine::V1::BatchGetDocumentsMetadataResponse.decode_json response.body, ignore_unknown_fields: true
363
+
364
+ yield result, operation if block_given?
365
+ result
366
+ end
367
+
330
368
  ##
331
369
  # @private
332
370
  #
@@ -530,6 +568,34 @@ module Google
530
568
  )
531
569
  transcoder.transcode request_pb
532
570
  end
571
+
572
+ ##
573
+ # @private
574
+ #
575
+ # GRPC transcoding helper method for the batch_get_documents_metadata REST call
576
+ #
577
+ # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::BatchGetDocumentsMetadataRequest]
578
+ # A request object representing the call parameters. Required.
579
+ # @return [Array(String, [String, nil], Hash{String => String})]
580
+ # Uri, Body, Query string parameters
581
+ def self.transcode_batch_get_documents_metadata_request request_pb
582
+ transcoder = Gapic::Rest::GrpcTranscoder.new
583
+ .with_bindings(
584
+ uri_method: :get,
585
+ uri_template: "/v1/{parent}/batchGetDocumentsMetadata",
586
+ matches: [
587
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/?$}, false]
588
+ ]
589
+ )
590
+ .with_bindings(
591
+ uri_method: :get,
592
+ uri_template: "/v1/{parent}/batchGetDocumentsMetadata",
593
+ matches: [
594
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/?$}, false]
595
+ ]
596
+ )
597
+ transcoder.transcode request_pb
598
+ end
533
599
  end
534
600
  end
535
601
  end
@@ -911,6 +911,13 @@ module Google
911
911
  ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/?$}, false]
912
912
  ]
913
913
  )
914
+ .with_bindings(
915
+ uri_method: :get,
916
+ uri_template: "/v1/{name}/operations",
917
+ matches: [
918
+ ["name", %r{^projects/[^/]+/locations/[^/]+/identity_mapping_stores/[^/]+/?$}, false]
919
+ ]
920
+ )
914
921
  .with_bindings(
915
922
  uri_method: :get,
916
923
  uri_template: "/v1/{name}/operations",
@@ -1030,6 +1037,13 @@ module Google
1030
1037
  ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/operations/[^/]+/?$}, false]
1031
1038
  ]
1032
1039
  )
1040
+ .with_bindings(
1041
+ uri_method: :get,
1042
+ uri_template: "/v1/{name}",
1043
+ matches: [
1044
+ ["name", %r{^projects/[^/]+/locations/[^/]+/identity_mapping_stores/[^/]+/operations/[^/]+/?$}, false]
1045
+ ]
1046
+ )
1033
1047
  .with_bindings(
1034
1048
  uri_method: :get,
1035
1049
  uri_template: "/v1/{name}",
@@ -911,6 +911,13 @@ module Google
911
911
  ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/?$}, false]
912
912
  ]
913
913
  )
914
+ .with_bindings(
915
+ uri_method: :get,
916
+ uri_template: "/v1/{name}/operations",
917
+ matches: [
918
+ ["name", %r{^projects/[^/]+/locations/[^/]+/identity_mapping_stores/[^/]+/?$}, false]
919
+ ]
920
+ )
914
921
  .with_bindings(
915
922
  uri_method: :get,
916
923
  uri_template: "/v1/{name}/operations",
@@ -1030,6 +1037,13 @@ module Google
1030
1037
  ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/operations/[^/]+/?$}, false]
1031
1038
  ]
1032
1039
  )
1040
+ .with_bindings(
1041
+ uri_method: :get,
1042
+ uri_template: "/v1/{name}",
1043
+ matches: [
1044
+ ["name", %r{^projects/[^/]+/locations/[^/]+/identity_mapping_stores/[^/]+/operations/[^/]+/?$}, false]
1045
+ ]
1046
+ )
1033
1047
  .with_bindings(
1034
1048
  uri_method: :get,
1035
1049
  uri_template: "/v1/{name}",
@@ -202,7 +202,8 @@ module Google
202
202
  # the default parameter values, pass an empty Hash as a request object (see above).
203
203
  #
204
204
  # @param serving_config [::String]
205
- # Required. Full resource name of a [ServingConfig][]:
205
+ # Required. Full resource name of a
206
+ # [ServingConfig][google.cloud.discoveryengine.v1.ServingConfig]:
206
207
  # `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or
207
208
  # `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*`
208
209
  #
@@ -195,7 +195,8 @@ module Google
195
195
  # the default parameter values, pass an empty Hash as a request object (see above).
196
196
  #
197
197
  # @param serving_config [::String]
198
- # Required. Full resource name of a [ServingConfig][]:
198
+ # Required. Full resource name of a
199
+ # [ServingConfig][google.cloud.discoveryengine.v1.ServingConfig]:
199
200
  # `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or
200
201
  # `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*`
201
202
  #
@@ -28,6 +28,7 @@ require "google/cloud/discovery_engine/v1/project_service/rest"
28
28
  require "google/cloud/discovery_engine/v1/rank_service/rest"
29
29
  require "google/cloud/discovery_engine/v1/recommendation_service/rest"
30
30
  require "google/cloud/discovery_engine/v1/schema_service/rest"
31
+ require "google/cloud/discovery_engine/v1/search_tuning_service/rest"
31
32
  require "google/cloud/discovery_engine/v1/site_search_engine_service/rest"
32
33
  require "google/cloud/discovery_engine/v1/user_event_service/rest"
33
34
  require "google/cloud/discovery_engine/v1/version"