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.
- checksums.yaml +4 -4
- data/lib/google/cloud/discovery_engine/v1/completion_service/client.rb +9 -3
- data/lib/google/cloud/discovery_engine/v1/completion_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/completion_service/rest/client.rb +9 -3
- data/lib/google/cloud/discovery_engine/v1/completion_service/rest/operations.rb +28 -5
- data/lib/google/cloud/discovery_engine/v1/control_service/client.rb +875 -0
- data/lib/google/cloud/discovery_engine/v1/control_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/control_service/paths.rb +167 -0
- data/lib/google/cloud/discovery_engine/v1/control_service/rest/client.rb +814 -0
- data/lib/google/cloud/discovery_engine/v1/control_service/rest/service_stub.rb +440 -0
- data/lib/google/cloud/discovery_engine/v1/control_service/rest.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1/control_service.rb +58 -0
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb +764 -6
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/paths.rb +199 -0
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb +715 -6
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/service_stub.rb +520 -0
- data/lib/google/cloud/discovery_engine/v1/data_store_service/client.rb +15 -7
- data/lib/google/cloud/discovery_engine/v1/data_store_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/data_store_service/paths.rb +45 -0
- data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/client.rb +15 -7
- data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/operations.rb +28 -5
- data/lib/google/cloud/discovery_engine/v1/document_service/client.rb +23 -13
- data/lib/google/cloud/discovery_engine/v1/document_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb +23 -13
- data/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb +28 -5
- data/lib/google/cloud/discovery_engine/v1/engine_service/client.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/engine_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/engine_service/rest/client.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/engine_service/rest/operations.rb +28 -5
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/client.rb +471 -0
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/paths.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/client.rb +438 -0
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/service_stub.rb +129 -0
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/client.rb +485 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/operations.rb +809 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/paths.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/rest/client.rb +452 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/rest/operations.rb +1114 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/rest/service_stub.rb +129 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/rest.rb +54 -0
- data/lib/google/cloud/discovery_engine/v1/project_service.rb +57 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service/client.rb +481 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service/paths.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service/rest/client.rb +448 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service/rest/service_stub.rb +129 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service/rest.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1/recommendation_service/client.rb +24 -19
- data/lib/google/cloud/discovery_engine/v1/recommendation_service/paths.rb +66 -0
- data/lib/google/cloud/discovery_engine/v1/recommendation_service/rest/client.rb +24 -19
- data/lib/google/cloud/discovery_engine/v1/rest.rb +4 -0
- data/lib/google/cloud/discovery_engine/v1/schema_service/client.rb +18 -10
- data/lib/google/cloud/discovery_engine/v1/schema_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/schema_service/rest/client.rb +18 -10
- data/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb +28 -5
- data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +15 -8
- data/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +15 -8
- data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/client.rb +27 -12
- data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/client.rb +27 -12
- data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/operations.rb +28 -5
- data/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb +23 -6
- data/lib/google/cloud/discovery_engine/v1/user_event_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/user_event_service/paths.rb +21 -0
- data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb +23 -6
- data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb +28 -5
- data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/service_stub.rb +8 -0
- data/lib/google/cloud/discovery_engine/v1/version.rb +1 -1
- data/lib/google/cloud/discovery_engine/v1.rb +4 -0
- data/lib/google/cloud/discoveryengine/v1/answer_pb.rb +69 -0
- data/lib/google/cloud/discoveryengine/v1/common_pb.rb +2 -1
- data/lib/google/cloud/discoveryengine/v1/control_pb.rb +55 -0
- data/lib/google/cloud/discoveryengine/v1/control_service_pb.rb +57 -0
- data/lib/google/cloud/discoveryengine/v1/control_service_services_pb.rb +69 -0
- data/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb +32 -1
- data/lib/google/cloud/discoveryengine/v1/conversational_search_service_services_pb.rb +25 -0
- data/lib/google/cloud/discoveryengine/v1/data_store_pb.rb +3 -1
- data/lib/google/cloud/discoveryengine/v1/document_processing_config_pb.rb +48 -0
- data/lib/google/cloud/discoveryengine/v1/document_service_services_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/engine_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_pb.rb +52 -0
- data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_services_pb.rb +45 -0
- data/lib/google/cloud/discoveryengine/v1/grounding_pb.rb +46 -0
- data/lib/google/cloud/discoveryengine/v1/project_pb.rb +49 -0
- data/lib/google/cloud/discoveryengine/v1/project_service_pb.rb +50 -0
- data/lib/google/cloud/discoveryengine/v1/project_service_services_pb.rb +51 -0
- data/lib/google/cloud/discoveryengine/v1/rank_service_pb.rb +49 -0
- data/lib/google/cloud/discoveryengine/v1/rank_service_services_pb.rb +45 -0
- data/lib/google/cloud/discoveryengine/v1/session_pb.rb +50 -0
- data/lib/google/cloud/discoveryengine/v1/site_search_engine_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/user_event_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/user_event_service_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/user_event_service_services_pb.rb +1 -1
- data/proto_docs/google/cloud/discoveryengine/v1/answer.rb +362 -0
- data/proto_docs/google/cloud/discoveryengine/v1/common.rb +16 -0
- data/proto_docs/google/cloud/discoveryengine/v1/control.rb +207 -0
- data/proto_docs/google/cloud/discoveryengine/v1/control_service.rb +126 -0
- data/proto_docs/google/cloud/discoveryengine/v1/conversation.rb +2 -2
- data/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +485 -0
- data/proto_docs/google/cloud/discoveryengine/v1/data_store.rb +3 -0
- data/proto_docs/google/cloud/discoveryengine/v1/data_store_service.rb +2 -2
- data/proto_docs/google/cloud/discoveryengine/v1/document_processing_config.rb +102 -0
- data/proto_docs/google/cloud/discoveryengine/v1/document_service.rb +5 -5
- data/proto_docs/google/cloud/discoveryengine/v1/engine.rb +3 -3
- data/proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb +144 -0
- data/proto_docs/google/cloud/discoveryengine/v1/grounding.rb +79 -0
- data/proto_docs/google/cloud/discoveryengine/v1/import_config.rb +4 -4
- data/proto_docs/google/cloud/discoveryengine/v1/project.rb +106 -0
- data/proto_docs/google/cloud/discoveryengine/v1/project_service.rb +57 -0
- data/proto_docs/google/cloud/discoveryengine/v1/rank_service.rb +124 -0
- data/proto_docs/google/cloud/discoveryengine/v1/recommendation_service.rb +20 -19
- data/proto_docs/google/cloud/discoveryengine/v1/schema_service.rb +5 -5
- data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +23 -18
- data/proto_docs/google/cloud/discoveryengine/v1/session.rb +88 -0
- data/proto_docs/google/cloud/discoveryengine/v1/site_search_engine.rb +3 -0
- data/proto_docs/google/cloud/discoveryengine/v1/user_event.rb +24 -3
- data/proto_docs/google/cloud/discoveryengine/v1/user_event_service.rb +13 -1
- metadata +56 -2
@@ -31,6 +31,9 @@ module Google
|
|
31
31
|
# Service for making recommendations.
|
32
32
|
#
|
33
33
|
class Client
|
34
|
+
# @private
|
35
|
+
API_VERSION = ""
|
36
|
+
|
34
37
|
# @private
|
35
38
|
DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
|
36
39
|
|
@@ -204,7 +207,7 @@ module Google
|
|
204
207
|
# `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*`
|
205
208
|
#
|
206
209
|
# One default serving config is created along with your recommendation engine
|
207
|
-
# creation. The engine ID
|
210
|
+
# creation. The engine ID is used as the ID of the default serving
|
208
211
|
# config. For example, for Engine
|
209
212
|
# `projects/*/locations/global/collections/*/engines/my-engine`, you can use
|
210
213
|
# `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine`
|
@@ -230,9 +233,9 @@ module Google
|
|
230
233
|
# unset.
|
231
234
|
# @param page_size [::Integer]
|
232
235
|
# Maximum number of results to return. Set this property
|
233
|
-
# to the number of recommendation results needed. If zero, the service
|
234
|
-
#
|
235
|
-
# above 100
|
236
|
+
# to the number of recommendation results needed. If zero, the service
|
237
|
+
# chooses a reasonable default. The maximum allowed value is 100. Values
|
238
|
+
# above 100 are set to 100.
|
236
239
|
# @param filter [::String]
|
237
240
|
# Filter for restricting recommendation results with a length limit of 5,000
|
238
241
|
# characters. Currently, only filter expressions on the `filter_tags`
|
@@ -252,18 +255,18 @@ module Google
|
|
252
255
|
# * (available: true) AND
|
253
256
|
# (launguage: ANY("en", "es")) OR (categories: ANY("Movie"))
|
254
257
|
#
|
255
|
-
# If your filter blocks all results, the API
|
258
|
+
# If your filter blocks all results, the API returns generic
|
256
259
|
# (unfiltered) popular Documents. If you only want results strictly matching
|
257
|
-
# the filters, set `strictFiltering` to
|
260
|
+
# the filters, set `strictFiltering` to `true` in
|
258
261
|
# {::Google::Cloud::DiscoveryEngine::V1::RecommendRequest#params RecommendRequest.params}
|
259
262
|
# to receive empty results instead.
|
260
263
|
#
|
261
|
-
# Note that the API
|
264
|
+
# Note that the API never returns
|
262
265
|
# {::Google::Cloud::DiscoveryEngine::V1::Document Document}s with `storageStatus`
|
263
|
-
#
|
266
|
+
# as `EXPIRED` or `DELETED` regardless of filter choices.
|
264
267
|
# @param validate_only [::Boolean]
|
265
|
-
# Use validate only mode for this recommendation query. If set to true
|
266
|
-
# fake model
|
268
|
+
# Use validate only mode for this recommendation query. If set to `true`, a
|
269
|
+
# fake model is used that returns arbitrary Document IDs.
|
267
270
|
# Note that the validate only mode should only be used for testing the API,
|
268
271
|
# or if the model is not ready.
|
269
272
|
# @param params [::Hash{::String => ::Google::Protobuf::Value, ::Hash}]
|
@@ -271,16 +274,17 @@ module Google
|
|
271
274
|
#
|
272
275
|
# Allowed values:
|
273
276
|
#
|
274
|
-
# * `returnDocument`: Boolean. If set to true
|
275
|
-
# object
|
277
|
+
# * `returnDocument`: Boolean. If set to `true`, the associated Document
|
278
|
+
# object is returned in
|
276
279
|
# {::Google::Cloud::DiscoveryEngine::V1::RecommendResponse::RecommendationResult#document RecommendResponse.RecommendationResult.document}.
|
277
|
-
# * `returnScore`: Boolean. If set to true, the recommendation
|
278
|
-
# corresponding to each returned Document
|
280
|
+
# * `returnScore`: Boolean. If set to true, the recommendation score
|
281
|
+
# corresponding to each returned Document is set in
|
279
282
|
# {::Google::Cloud::DiscoveryEngine::V1::RecommendResponse::RecommendationResult#metadata RecommendResponse.RecommendationResult.metadata}.
|
280
|
-
# The given
|
281
|
-
#
|
282
|
-
# * `strictFiltering`: Boolean. True by default. If set to false
|
283
|
-
#
|
283
|
+
# The given score indicates the probability of a Document conversion given
|
284
|
+
# the user's context and history.
|
285
|
+
# * `strictFiltering`: Boolean. True by default. If set to `false`, the
|
286
|
+
# service
|
287
|
+
# returns generic (unfiltered) popular Documents instead of empty if
|
284
288
|
# your filter blocks all recommendation results.
|
285
289
|
# * `diversityLevel`: String. Default empty. If set to be non-empty, then
|
286
290
|
# it needs to be one of:
|
@@ -347,10 +351,11 @@ module Google
|
|
347
351
|
# Customize the options with defaults
|
348
352
|
metadata = @config.rpcs.recommend.metadata.to_h
|
349
353
|
|
350
|
-
# Set x-goog-api-client
|
354
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
351
355
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
352
356
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
353
357
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
|
358
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
354
359
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
355
360
|
|
356
361
|
header_params = {}
|
@@ -24,6 +24,51 @@ module Google
|
|
24
24
|
module RecommendationService
|
25
25
|
# Path helper methods for the RecommendationService API.
|
26
26
|
module Paths
|
27
|
+
##
|
28
|
+
# Create a fully-qualified DataStore resource string.
|
29
|
+
#
|
30
|
+
# @overload data_store_path(project:, location:, data_store:)
|
31
|
+
# The resource will be in the following format:
|
32
|
+
#
|
33
|
+
# `projects/{project}/locations/{location}/dataStores/{data_store}`
|
34
|
+
#
|
35
|
+
# @param project [String]
|
36
|
+
# @param location [String]
|
37
|
+
# @param data_store [String]
|
38
|
+
#
|
39
|
+
# @overload data_store_path(project:, location:, collection:, data_store:)
|
40
|
+
# The resource will be in the following format:
|
41
|
+
#
|
42
|
+
# `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
|
43
|
+
#
|
44
|
+
# @param project [String]
|
45
|
+
# @param location [String]
|
46
|
+
# @param collection [String]
|
47
|
+
# @param data_store [String]
|
48
|
+
#
|
49
|
+
# @return [::String]
|
50
|
+
def data_store_path **args
|
51
|
+
resources = {
|
52
|
+
"data_store:location:project" => (proc do |project:, location:, data_store:|
|
53
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
54
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
55
|
+
|
56
|
+
"projects/#{project}/locations/#{location}/dataStores/#{data_store}"
|
57
|
+
end),
|
58
|
+
"collection:data_store:location:project" => (proc do |project:, location:, collection:, data_store:|
|
59
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
60
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
61
|
+
raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/"
|
62
|
+
|
63
|
+
"projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}"
|
64
|
+
end)
|
65
|
+
}
|
66
|
+
|
67
|
+
resource = resources[args.keys.sort.join(":")]
|
68
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
69
|
+
resource.call(**args)
|
70
|
+
end
|
71
|
+
|
27
72
|
##
|
28
73
|
# Create a fully-qualified Document resource string.
|
29
74
|
#
|
@@ -77,6 +122,27 @@ module Google
|
|
77
122
|
resource.call(**args)
|
78
123
|
end
|
79
124
|
|
125
|
+
##
|
126
|
+
# Create a fully-qualified Engine resource string.
|
127
|
+
#
|
128
|
+
# The resource will be in the following format:
|
129
|
+
#
|
130
|
+
# `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
|
131
|
+
#
|
132
|
+
# @param project [String]
|
133
|
+
# @param location [String]
|
134
|
+
# @param collection [String]
|
135
|
+
# @param engine [String]
|
136
|
+
#
|
137
|
+
# @return [::String]
|
138
|
+
def engine_path project:, location:, collection:, engine:
|
139
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
140
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
141
|
+
raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/"
|
142
|
+
|
143
|
+
"projects/#{project}/locations/#{location}/collections/#{collection}/engines/#{engine}"
|
144
|
+
end
|
145
|
+
|
80
146
|
##
|
81
147
|
# Create a fully-qualified ServingConfig resource string.
|
82
148
|
#
|
@@ -33,6 +33,9 @@ module Google
|
|
33
33
|
# Service for making recommendations.
|
34
34
|
#
|
35
35
|
class Client
|
36
|
+
# @private
|
37
|
+
API_VERSION = ""
|
38
|
+
|
36
39
|
# @private
|
37
40
|
DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
|
38
41
|
|
@@ -197,7 +200,7 @@ module Google
|
|
197
200
|
# `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*`
|
198
201
|
#
|
199
202
|
# One default serving config is created along with your recommendation engine
|
200
|
-
# creation. The engine ID
|
203
|
+
# creation. The engine ID is used as the ID of the default serving
|
201
204
|
# config. For example, for Engine
|
202
205
|
# `projects/*/locations/global/collections/*/engines/my-engine`, you can use
|
203
206
|
# `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine`
|
@@ -223,9 +226,9 @@ module Google
|
|
223
226
|
# unset.
|
224
227
|
# @param page_size [::Integer]
|
225
228
|
# Maximum number of results to return. Set this property
|
226
|
-
# to the number of recommendation results needed. If zero, the service
|
227
|
-
#
|
228
|
-
# above 100
|
229
|
+
# to the number of recommendation results needed. If zero, the service
|
230
|
+
# chooses a reasonable default. The maximum allowed value is 100. Values
|
231
|
+
# above 100 are set to 100.
|
229
232
|
# @param filter [::String]
|
230
233
|
# Filter for restricting recommendation results with a length limit of 5,000
|
231
234
|
# characters. Currently, only filter expressions on the `filter_tags`
|
@@ -245,18 +248,18 @@ module Google
|
|
245
248
|
# * (available: true) AND
|
246
249
|
# (launguage: ANY("en", "es")) OR (categories: ANY("Movie"))
|
247
250
|
#
|
248
|
-
# If your filter blocks all results, the API
|
251
|
+
# If your filter blocks all results, the API returns generic
|
249
252
|
# (unfiltered) popular Documents. If you only want results strictly matching
|
250
|
-
# the filters, set `strictFiltering` to
|
253
|
+
# the filters, set `strictFiltering` to `true` in
|
251
254
|
# {::Google::Cloud::DiscoveryEngine::V1::RecommendRequest#params RecommendRequest.params}
|
252
255
|
# to receive empty results instead.
|
253
256
|
#
|
254
|
-
# Note that the API
|
257
|
+
# Note that the API never returns
|
255
258
|
# {::Google::Cloud::DiscoveryEngine::V1::Document Document}s with `storageStatus`
|
256
|
-
#
|
259
|
+
# as `EXPIRED` or `DELETED` regardless of filter choices.
|
257
260
|
# @param validate_only [::Boolean]
|
258
|
-
# Use validate only mode for this recommendation query. If set to true
|
259
|
-
# fake model
|
261
|
+
# Use validate only mode for this recommendation query. If set to `true`, a
|
262
|
+
# fake model is used that returns arbitrary Document IDs.
|
260
263
|
# Note that the validate only mode should only be used for testing the API,
|
261
264
|
# or if the model is not ready.
|
262
265
|
# @param params [::Hash{::String => ::Google::Protobuf::Value, ::Hash}]
|
@@ -264,16 +267,17 @@ module Google
|
|
264
267
|
#
|
265
268
|
# Allowed values:
|
266
269
|
#
|
267
|
-
# * `returnDocument`: Boolean. If set to true
|
268
|
-
# object
|
270
|
+
# * `returnDocument`: Boolean. If set to `true`, the associated Document
|
271
|
+
# object is returned in
|
269
272
|
# {::Google::Cloud::DiscoveryEngine::V1::RecommendResponse::RecommendationResult#document RecommendResponse.RecommendationResult.document}.
|
270
|
-
# * `returnScore`: Boolean. If set to true, the recommendation
|
271
|
-
# corresponding to each returned Document
|
273
|
+
# * `returnScore`: Boolean. If set to true, the recommendation score
|
274
|
+
# corresponding to each returned Document is set in
|
272
275
|
# {::Google::Cloud::DiscoveryEngine::V1::RecommendResponse::RecommendationResult#metadata RecommendResponse.RecommendationResult.metadata}.
|
273
|
-
# The given
|
274
|
-
#
|
275
|
-
# * `strictFiltering`: Boolean. True by default. If set to false
|
276
|
-
#
|
276
|
+
# The given score indicates the probability of a Document conversion given
|
277
|
+
# the user's context and history.
|
278
|
+
# * `strictFiltering`: Boolean. True by default. If set to `false`, the
|
279
|
+
# service
|
280
|
+
# returns generic (unfiltered) popular Documents instead of empty if
|
277
281
|
# your filter blocks all recommendation results.
|
278
282
|
# * `diversityLevel`: String. Default empty. If set to be non-empty, then
|
279
283
|
# it needs to be one of:
|
@@ -339,12 +343,13 @@ module Google
|
|
339
343
|
# Customize the options with defaults
|
340
344
|
call_metadata = @config.rpcs.recommend.metadata.to_h
|
341
345
|
|
342
|
-
# Set x-goog-api-client
|
346
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
343
347
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
344
348
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
345
349
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
|
346
350
|
transports_version_send: [:rest]
|
347
351
|
|
352
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
348
353
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
349
354
|
|
350
355
|
options.apply_defaults timeout: @config.rpcs.recommend.timeout,
|
@@ -17,11 +17,15 @@
|
|
17
17
|
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
18
|
|
19
19
|
require "google/cloud/discovery_engine/v1/completion_service/rest"
|
20
|
+
require "google/cloud/discovery_engine/v1/control_service/rest"
|
20
21
|
require "google/cloud/discovery_engine/v1/search_service/rest"
|
21
22
|
require "google/cloud/discovery_engine/v1/conversational_search_service/rest"
|
22
23
|
require "google/cloud/discovery_engine/v1/data_store_service/rest"
|
23
24
|
require "google/cloud/discovery_engine/v1/document_service/rest"
|
24
25
|
require "google/cloud/discovery_engine/v1/engine_service/rest"
|
26
|
+
require "google/cloud/discovery_engine/v1/grounded_generation_service/rest"
|
27
|
+
require "google/cloud/discovery_engine/v1/project_service/rest"
|
28
|
+
require "google/cloud/discovery_engine/v1/rank_service/rest"
|
25
29
|
require "google/cloud/discovery_engine/v1/recommendation_service/rest"
|
26
30
|
require "google/cloud/discovery_engine/v1/schema_service/rest"
|
27
31
|
require "google/cloud/discovery_engine/v1/site_search_engine_service/rest"
|
@@ -31,6 +31,9 @@ module Google
|
|
31
31
|
# Service for managing {::Google::Cloud::DiscoveryEngine::V1::Schema Schema}s.
|
32
32
|
#
|
33
33
|
class Client
|
34
|
+
# @private
|
35
|
+
API_VERSION = ""
|
36
|
+
|
34
37
|
# @private
|
35
38
|
DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
|
36
39
|
|
@@ -250,10 +253,11 @@ module Google
|
|
250
253
|
# Customize the options with defaults
|
251
254
|
metadata = @config.rpcs.get_schema.metadata.to_h
|
252
255
|
|
253
|
-
# Set x-goog-api-client
|
256
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
254
257
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
255
258
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
256
259
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
|
260
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
257
261
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
258
262
|
|
259
263
|
header_params = {}
|
@@ -306,9 +310,9 @@ module Google
|
|
306
310
|
# return. The service may return fewer than this value.
|
307
311
|
#
|
308
312
|
# If unspecified, at most 100
|
309
|
-
# {::Google::Cloud::DiscoveryEngine::V1::Schema Schema}s
|
313
|
+
# {::Google::Cloud::DiscoveryEngine::V1::Schema Schema}s are returned.
|
310
314
|
#
|
311
|
-
# The maximum value is 1000; values above 1000
|
315
|
+
# The maximum value is 1000; values above 1000 are set to 1000.
|
312
316
|
# @param page_token [::String]
|
313
317
|
# A page token, received from a previous
|
314
318
|
# {::Google::Cloud::DiscoveryEngine::V1::SchemaService::Client#list_schemas SchemaService.ListSchemas}
|
@@ -356,10 +360,11 @@ module Google
|
|
356
360
|
# Customize the options with defaults
|
357
361
|
metadata = @config.rpcs.list_schemas.metadata.to_h
|
358
362
|
|
359
|
-
# Set x-goog-api-client
|
363
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
360
364
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
361
365
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
362
366
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
|
367
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
363
368
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
364
369
|
|
365
370
|
header_params = {}
|
@@ -412,8 +417,8 @@ module Google
|
|
412
417
|
# Required. The {::Google::Cloud::DiscoveryEngine::V1::Schema Schema} to create.
|
413
418
|
# @param schema_id [::String]
|
414
419
|
# Required. The ID to use for the
|
415
|
-
# {::Google::Cloud::DiscoveryEngine::V1::Schema Schema}, which
|
416
|
-
#
|
420
|
+
# {::Google::Cloud::DiscoveryEngine::V1::Schema Schema}, which becomes the final
|
421
|
+
# component of the
|
417
422
|
# {::Google::Cloud::DiscoveryEngine::V1::Schema#name Schema.name}.
|
418
423
|
#
|
419
424
|
# This field should conform to
|
@@ -461,10 +466,11 @@ module Google
|
|
461
466
|
# Customize the options with defaults
|
462
467
|
metadata = @config.rpcs.create_schema.metadata.to_h
|
463
468
|
|
464
|
-
# Set x-goog-api-client
|
469
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
465
470
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
466
471
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
467
472
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
|
473
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
468
474
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
469
475
|
|
470
476
|
header_params = {}
|
@@ -514,7 +520,7 @@ module Google
|
|
514
520
|
# Required. The {::Google::Cloud::DiscoveryEngine::V1::Schema Schema} to update.
|
515
521
|
# @param allow_missing [::Boolean]
|
516
522
|
# If set to true, and the {::Google::Cloud::DiscoveryEngine::V1::Schema Schema} is
|
517
|
-
# not found, a new {::Google::Cloud::DiscoveryEngine::V1::Schema Schema}
|
523
|
+
# not found, a new {::Google::Cloud::DiscoveryEngine::V1::Schema Schema} is
|
518
524
|
# created. In this situation, `update_mask` is ignored.
|
519
525
|
#
|
520
526
|
# @yield [response, operation] Access the result along with the RPC operation
|
@@ -558,10 +564,11 @@ module Google
|
|
558
564
|
# Customize the options with defaults
|
559
565
|
metadata = @config.rpcs.update_schema.metadata.to_h
|
560
566
|
|
561
|
-
# Set x-goog-api-client
|
567
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
562
568
|
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
|
571
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
565
572
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
566
573
|
|
567
574
|
header_params = {}
|
@@ -652,10 +659,11 @@ module Google
|
|
652
659
|
# Customize the options with defaults
|
653
660
|
metadata = @config.rpcs.delete_schema.metadata.to_h
|
654
661
|
|
655
|
-
# Set x-goog-api-client
|
662
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
656
663
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
657
664
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
658
665
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
|
666
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
659
667
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
660
668
|
|
661
669
|
header_params = {}
|
@@ -26,6 +26,9 @@ module Google
|
|
26
26
|
module SchemaService
|
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
|
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
|
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
|
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
|
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
|
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,
|
@@ -33,6 +33,9 @@ module Google
|
|
33
33
|
# Service for managing {::Google::Cloud::DiscoveryEngine::V1::Schema Schema}s.
|
34
34
|
#
|
35
35
|
class Client
|
36
|
+
# @private
|
37
|
+
API_VERSION = ""
|
38
|
+
|
36
39
|
# @private
|
37
40
|
DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
|
38
41
|
|
@@ -242,12 +245,13 @@ module Google
|
|
242
245
|
# Customize the options with defaults
|
243
246
|
call_metadata = @config.rpcs.get_schema.metadata.to_h
|
244
247
|
|
245
|
-
# Set x-goog-api-client
|
248
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
246
249
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
247
250
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
248
251
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
|
249
252
|
transports_version_send: [:rest]
|
250
253
|
|
254
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
251
255
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
252
256
|
|
253
257
|
options.apply_defaults timeout: @config.rpcs.get_schema.timeout,
|
@@ -292,9 +296,9 @@ module Google
|
|
292
296
|
# return. The service may return fewer than this value.
|
293
297
|
#
|
294
298
|
# If unspecified, at most 100
|
295
|
-
# {::Google::Cloud::DiscoveryEngine::V1::Schema Schema}s
|
299
|
+
# {::Google::Cloud::DiscoveryEngine::V1::Schema Schema}s are returned.
|
296
300
|
#
|
297
|
-
# The maximum value is 1000; values above 1000
|
301
|
+
# The maximum value is 1000; values above 1000 are set to 1000.
|
298
302
|
# @param page_token [::String]
|
299
303
|
# A page token, received from a previous
|
300
304
|
# {::Google::Cloud::DiscoveryEngine::V1::SchemaService::Rest::Client#list_schemas SchemaService.ListSchemas}
|
@@ -341,12 +345,13 @@ module Google
|
|
341
345
|
# Customize the options with defaults
|
342
346
|
call_metadata = @config.rpcs.list_schemas.metadata.to_h
|
343
347
|
|
344
|
-
# Set x-goog-api-client
|
348
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
345
349
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
346
350
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
347
351
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
|
348
352
|
transports_version_send: [:rest]
|
349
353
|
|
354
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
350
355
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
351
356
|
|
352
357
|
options.apply_defaults timeout: @config.rpcs.list_schemas.timeout,
|
@@ -391,8 +396,8 @@ module Google
|
|
391
396
|
# Required. The {::Google::Cloud::DiscoveryEngine::V1::Schema Schema} to create.
|
392
397
|
# @param schema_id [::String]
|
393
398
|
# Required. The ID to use for the
|
394
|
-
# {::Google::Cloud::DiscoveryEngine::V1::Schema Schema}, which
|
395
|
-
#
|
399
|
+
# {::Google::Cloud::DiscoveryEngine::V1::Schema Schema}, which becomes the final
|
400
|
+
# component of the
|
396
401
|
# {::Google::Cloud::DiscoveryEngine::V1::Schema#name Schema.name}.
|
397
402
|
#
|
398
403
|
# This field should conform to
|
@@ -439,12 +444,13 @@ module Google
|
|
439
444
|
# Customize the options with defaults
|
440
445
|
call_metadata = @config.rpcs.create_schema.metadata.to_h
|
441
446
|
|
442
|
-
# Set x-goog-api-client
|
447
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
443
448
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
444
449
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
445
450
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
|
446
451
|
transports_version_send: [:rest]
|
447
452
|
|
453
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
448
454
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
449
455
|
|
450
456
|
options.apply_defaults timeout: @config.rpcs.create_schema.timeout,
|
@@ -486,7 +492,7 @@ module Google
|
|
486
492
|
# Required. The {::Google::Cloud::DiscoveryEngine::V1::Schema Schema} to update.
|
487
493
|
# @param allow_missing [::Boolean]
|
488
494
|
# If set to true, and the {::Google::Cloud::DiscoveryEngine::V1::Schema Schema} is
|
489
|
-
# not found, a new {::Google::Cloud::DiscoveryEngine::V1::Schema Schema}
|
495
|
+
# not found, a new {::Google::Cloud::DiscoveryEngine::V1::Schema Schema} is
|
490
496
|
# created. In this situation, `update_mask` is ignored.
|
491
497
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
492
498
|
# @yieldparam result [::Gapic::Operation]
|
@@ -529,12 +535,13 @@ module Google
|
|
529
535
|
# Customize the options with defaults
|
530
536
|
call_metadata = @config.rpcs.update_schema.metadata.to_h
|
531
537
|
|
532
|
-
# Set x-goog-api-client
|
538
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
533
539
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
534
540
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
535
541
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
|
536
542
|
transports_version_send: [:rest]
|
537
543
|
|
544
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
538
545
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
539
546
|
|
540
547
|
options.apply_defaults timeout: @config.rpcs.update_schema.timeout,
|
@@ -616,12 +623,13 @@ module Google
|
|
616
623
|
# Customize the options with defaults
|
617
624
|
call_metadata = @config.rpcs.delete_schema.metadata.to_h
|
618
625
|
|
619
|
-
# Set x-goog-api-client
|
626
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
620
627
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
621
628
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
622
629
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
|
623
630
|
transports_version_send: [:rest]
|
624
631
|
|
632
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
625
633
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
626
634
|
|
627
635
|
options.apply_defaults timeout: @config.rpcs.delete_schema.timeout,
|