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
@@ -0,0 +1,124 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2024 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module DiscoveryEngine
|
23
|
+
module V1
|
24
|
+
# Record message for
|
25
|
+
# {::Google::Cloud::DiscoveryEngine::V1::RankService::Client#rank RankService.Rank} method.
|
26
|
+
# @!attribute [rw] id
|
27
|
+
# @return [::String]
|
28
|
+
# The unique ID to represent the record.
|
29
|
+
# @!attribute [rw] title
|
30
|
+
# @return [::String]
|
31
|
+
# The title of the record. Empty by default.
|
32
|
+
# At least one of
|
33
|
+
# {::Google::Cloud::DiscoveryEngine::V1::RankingRecord#title title} or
|
34
|
+
# {::Google::Cloud::DiscoveryEngine::V1::RankingRecord#content content} should be
|
35
|
+
# set otherwise an INVALID_ARGUMENT error is thrown.
|
36
|
+
# @!attribute [rw] content
|
37
|
+
# @return [::String]
|
38
|
+
# The content of the record. Empty by default.
|
39
|
+
# At least one of
|
40
|
+
# {::Google::Cloud::DiscoveryEngine::V1::RankingRecord#title title} or
|
41
|
+
# {::Google::Cloud::DiscoveryEngine::V1::RankingRecord#content content} should be
|
42
|
+
# set otherwise an INVALID_ARGUMENT error is thrown.
|
43
|
+
# @!attribute [rw] score
|
44
|
+
# @return [::Float]
|
45
|
+
# The score of this record based on the given query and selected model.
|
46
|
+
class RankingRecord
|
47
|
+
include ::Google::Protobuf::MessageExts
|
48
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
49
|
+
end
|
50
|
+
|
51
|
+
# Request message for
|
52
|
+
# {::Google::Cloud::DiscoveryEngine::V1::RankService::Client#rank RankService.Rank} method.
|
53
|
+
# @!attribute [rw] ranking_config
|
54
|
+
# @return [::String]
|
55
|
+
# Required. The resource name of the rank service config, such as
|
56
|
+
# `projects/{project_num}/locations/{location_id}/rankingConfigs/default_ranking_config`.
|
57
|
+
# @!attribute [rw] model
|
58
|
+
# @return [::String]
|
59
|
+
# The identifier of the model to use. It is one of:
|
60
|
+
#
|
61
|
+
# * `semantic-ranker-512@latest`: Semantic ranking model with maxiumn input
|
62
|
+
# token size 512.
|
63
|
+
#
|
64
|
+
# It is set to `semantic-ranker-512@latest` by default if unspecified.
|
65
|
+
# @!attribute [rw] top_n
|
66
|
+
# @return [::Integer]
|
67
|
+
# The number of results to return. If this is unset or no bigger than zero,
|
68
|
+
# returns all results.
|
69
|
+
# @!attribute [rw] query
|
70
|
+
# @return [::String]
|
71
|
+
# The query to use.
|
72
|
+
# @!attribute [rw] records
|
73
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::RankingRecord>]
|
74
|
+
# Required. A list of records to rank. At most 200 records to rank.
|
75
|
+
# @!attribute [rw] ignore_record_details_in_response
|
76
|
+
# @return [::Boolean]
|
77
|
+
# If true, the response will contain only record ID and score. By default, it
|
78
|
+
# is false, the response will contain record details.
|
79
|
+
# @!attribute [rw] user_labels
|
80
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
81
|
+
# The user labels applied to a resource must meet the following requirements:
|
82
|
+
#
|
83
|
+
# * Each resource can have multiple labels, up to a maximum of 64.
|
84
|
+
# * Each label must be a key-value pair.
|
85
|
+
# * Keys have a minimum length of 1 character and a maximum length of 63
|
86
|
+
# characters and cannot be empty. Values can be empty and have a maximum
|
87
|
+
# length of 63 characters.
|
88
|
+
# * Keys and values can contain only lowercase letters, numeric characters,
|
89
|
+
# underscores, and dashes. All characters must use UTF-8 encoding, and
|
90
|
+
# international characters are allowed.
|
91
|
+
# * The key portion of a label must be unique. However, you can use the same
|
92
|
+
# key with multiple resources.
|
93
|
+
# * Keys must start with a lowercase letter or international character.
|
94
|
+
#
|
95
|
+
# See [Google Cloud
|
96
|
+
# Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
|
97
|
+
# for more details.
|
98
|
+
class RankRequest
|
99
|
+
include ::Google::Protobuf::MessageExts
|
100
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
101
|
+
|
102
|
+
# @!attribute [rw] key
|
103
|
+
# @return [::String]
|
104
|
+
# @!attribute [rw] value
|
105
|
+
# @return [::String]
|
106
|
+
class UserLabelsEntry
|
107
|
+
include ::Google::Protobuf::MessageExts
|
108
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
# Response message for
|
113
|
+
# {::Google::Cloud::DiscoveryEngine::V1::RankService::Client#rank RankService.Rank} method.
|
114
|
+
# @!attribute [rw] records
|
115
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::RankingRecord>]
|
116
|
+
# A list of records sorted by descending score.
|
117
|
+
class RankResponse
|
118
|
+
include ::Google::Protobuf::MessageExts
|
119
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
@@ -29,7 +29,7 @@ module Google
|
|
29
29
|
# `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*`
|
30
30
|
#
|
31
31
|
# One default serving config is created along with your recommendation engine
|
32
|
-
# creation. The engine ID
|
32
|
+
# creation. The engine ID is used as the ID of the default serving
|
33
33
|
# config. For example, for Engine
|
34
34
|
# `projects/*/locations/global/collections/*/engines/my-engine`, you can use
|
35
35
|
# `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine`
|
@@ -57,9 +57,9 @@ module Google
|
|
57
57
|
# @!attribute [rw] page_size
|
58
58
|
# @return [::Integer]
|
59
59
|
# Maximum number of results to return. Set this property
|
60
|
-
# to the number of recommendation results needed. If zero, the service
|
61
|
-
#
|
62
|
-
# above 100
|
60
|
+
# to the number of recommendation results needed. If zero, the service
|
61
|
+
# chooses a reasonable default. The maximum allowed value is 100. Values
|
62
|
+
# above 100 are set to 100.
|
63
63
|
# @!attribute [rw] filter
|
64
64
|
# @return [::String]
|
65
65
|
# Filter for restricting recommendation results with a length limit of 5,000
|
@@ -80,19 +80,19 @@ module Google
|
|
80
80
|
# * (available: true) AND
|
81
81
|
# (launguage: ANY("en", "es")) OR (categories: ANY("Movie"))
|
82
82
|
#
|
83
|
-
# If your filter blocks all results, the API
|
83
|
+
# If your filter blocks all results, the API returns generic
|
84
84
|
# (unfiltered) popular Documents. If you only want results strictly matching
|
85
|
-
# the filters, set `strictFiltering` to
|
85
|
+
# the filters, set `strictFiltering` to `true` in
|
86
86
|
# {::Google::Cloud::DiscoveryEngine::V1::RecommendRequest#params RecommendRequest.params}
|
87
87
|
# to receive empty results instead.
|
88
88
|
#
|
89
|
-
# Note that the API
|
89
|
+
# Note that the API never returns
|
90
90
|
# {::Google::Cloud::DiscoveryEngine::V1::Document Document}s with `storageStatus`
|
91
|
-
#
|
91
|
+
# as `EXPIRED` or `DELETED` regardless of filter choices.
|
92
92
|
# @!attribute [rw] validate_only
|
93
93
|
# @return [::Boolean]
|
94
|
-
# Use validate only mode for this recommendation query. If set to true
|
95
|
-
# fake model
|
94
|
+
# Use validate only mode for this recommendation query. If set to `true`, a
|
95
|
+
# fake model is used that returns arbitrary Document IDs.
|
96
96
|
# Note that the validate only mode should only be used for testing the API,
|
97
97
|
# or if the model is not ready.
|
98
98
|
# @!attribute [rw] params
|
@@ -101,16 +101,17 @@ module Google
|
|
101
101
|
#
|
102
102
|
# Allowed values:
|
103
103
|
#
|
104
|
-
# * `returnDocument`: Boolean. If set to true
|
105
|
-
# object
|
104
|
+
# * `returnDocument`: Boolean. If set to `true`, the associated Document
|
105
|
+
# object is returned in
|
106
106
|
# {::Google::Cloud::DiscoveryEngine::V1::RecommendResponse::RecommendationResult#document RecommendResponse.RecommendationResult.document}.
|
107
|
-
# * `returnScore`: Boolean. If set to true, the recommendation
|
108
|
-
# corresponding to each returned Document
|
107
|
+
# * `returnScore`: Boolean. If set to true, the recommendation score
|
108
|
+
# corresponding to each returned Document is set in
|
109
109
|
# {::Google::Cloud::DiscoveryEngine::V1::RecommendResponse::RecommendationResult#metadata RecommendResponse.RecommendationResult.metadata}.
|
110
|
-
# The given
|
111
|
-
#
|
112
|
-
# * `strictFiltering`: Boolean. True by default. If set to false
|
113
|
-
#
|
110
|
+
# The given score indicates the probability of a Document conversion given
|
111
|
+
# the user's context and history.
|
112
|
+
# * `strictFiltering`: Boolean. True by default. If set to `false`, the
|
113
|
+
# service
|
114
|
+
# returns generic (unfiltered) popular Documents instead of empty if
|
114
115
|
# your filter blocks all recommendation results.
|
115
116
|
# * `diversityLevel`: String. Default empty. If set to be non-empty, then
|
116
117
|
# it needs to be one of:
|
@@ -201,7 +202,7 @@ module Google
|
|
201
202
|
# {::Google::Cloud::DiscoveryEngine::V1::RecommendRequest#params RecommendRequest.params}.
|
202
203
|
# @!attribute [rw] metadata
|
203
204
|
# @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}]
|
204
|
-
# Additional Document metadata
|
205
|
+
# Additional Document metadata or annotations.
|
205
206
|
#
|
206
207
|
# Possible values:
|
207
208
|
#
|
@@ -46,9 +46,9 @@ module Google
|
|
46
46
|
# return. The service may return fewer than this value.
|
47
47
|
#
|
48
48
|
# If unspecified, at most 100
|
49
|
-
# {::Google::Cloud::DiscoveryEngine::V1::Schema Schema}s
|
49
|
+
# {::Google::Cloud::DiscoveryEngine::V1::Schema Schema}s are returned.
|
50
50
|
#
|
51
|
-
# The maximum value is 1000; values above 1000
|
51
|
+
# The maximum value is 1000; values above 1000 are set to 1000.
|
52
52
|
# @!attribute [rw] page_token
|
53
53
|
# @return [::String]
|
54
54
|
# A page token, received from a previous
|
@@ -93,8 +93,8 @@ module Google
|
|
93
93
|
# @!attribute [rw] schema_id
|
94
94
|
# @return [::String]
|
95
95
|
# Required. The ID to use for the
|
96
|
-
# {::Google::Cloud::DiscoveryEngine::V1::Schema Schema}, which
|
97
|
-
#
|
96
|
+
# {::Google::Cloud::DiscoveryEngine::V1::Schema Schema}, which becomes the final
|
97
|
+
# component of the
|
98
98
|
# {::Google::Cloud::DiscoveryEngine::V1::Schema#name Schema.name}.
|
99
99
|
#
|
100
100
|
# This field should conform to
|
@@ -114,7 +114,7 @@ module Google
|
|
114
114
|
# @!attribute [rw] allow_missing
|
115
115
|
# @return [::Boolean]
|
116
116
|
# If set to true, and the {::Google::Cloud::DiscoveryEngine::V1::Schema Schema} is
|
117
|
-
# not found, a new {::Google::Cloud::DiscoveryEngine::V1::Schema Schema}
|
117
|
+
# not found, a new {::Google::Cloud::DiscoveryEngine::V1::Schema Schema} is
|
118
118
|
# created. In this situation, `update_mask` is ignored.
|
119
119
|
class UpdateSchemaRequest
|
120
120
|
include ::Google::Protobuf::MessageExts
|
@@ -78,7 +78,10 @@ module Google
|
|
78
78
|
# If this field is negative, an `INVALID_ARGUMENT` is returned.
|
79
79
|
# @!attribute [rw] data_store_specs
|
80
80
|
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DataStoreSpec>]
|
81
|
-
#
|
81
|
+
# Specs defining dataStores to filter on in a search call and configurations
|
82
|
+
# for those dataStores. This is only considered for engines with multiple
|
83
|
+
# dataStores use case. For single dataStore within an engine, they should
|
84
|
+
# use the specs at the top level.
|
82
85
|
# @!attribute [rw] filter
|
83
86
|
# @return [::String]
|
84
87
|
# The filter syntax consists of an expression language for constructing a
|
@@ -115,7 +118,9 @@ module Google
|
|
115
118
|
# The order in which documents are returned. Documents can be ordered by
|
116
119
|
# a field in an {::Google::Cloud::DiscoveryEngine::V1::Document Document} object.
|
117
120
|
# Leave it unset if ordered by relevance. `order_by` expression is
|
118
|
-
# case-sensitive.
|
121
|
+
# case-sensitive.
|
122
|
+
#
|
123
|
+
# For more information on ordering for retail search, see
|
119
124
|
# [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
|
120
125
|
#
|
121
126
|
# If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
@@ -135,7 +140,7 @@ module Google
|
|
135
140
|
# @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::BoostSpec]
|
136
141
|
# Boost specification to boost certain documents.
|
137
142
|
# For more information on boosting, see
|
138
|
-
# [Boosting](https://cloud.google.com/
|
143
|
+
# [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
|
139
144
|
# @!attribute [rw] params
|
140
145
|
# @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}]
|
141
146
|
# Additional search parameters.
|
@@ -144,8 +149,7 @@ module Google
|
|
144
149
|
#
|
145
150
|
# * `user_country_code`: string. Default empty. If set to non-empty, results
|
146
151
|
# are restricted or boosted based on the location provided.
|
147
|
-
#
|
148
|
-
# user_country_code: "au"
|
152
|
+
# For example, `user_country_code: "au"`
|
149
153
|
#
|
150
154
|
# For available codes see [Country
|
151
155
|
# Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
|
@@ -153,8 +157,7 @@ module Google
|
|
153
157
|
# * `search_type`: double. Default empty. Enables non-webpage searching
|
154
158
|
# depending on the value. The only valid non-default value is 1,
|
155
159
|
# which enables image searching.
|
156
|
-
#
|
157
|
-
# search_type: 1
|
160
|
+
# For example, `search_type: 1`
|
158
161
|
# @!attribute [rw] query_expansion_spec
|
159
162
|
# @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::QueryExpansionSpec]
|
160
163
|
# The query expansion specification that specifies the conditions under which
|
@@ -219,7 +222,9 @@ module Google
|
|
219
222
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
220
223
|
end
|
221
224
|
|
222
|
-
# A struct to define data stores to filter on in a search call
|
225
|
+
# A struct to define data stores to filter on in a search call and
|
226
|
+
# configurations for those data stores. A maximum of 1 DataStoreSpec per
|
227
|
+
# data_store is allowed. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
223
228
|
# @!attribute [rw] data_store
|
224
229
|
# @return [::String]
|
225
230
|
# Required. Full resource name of
|
@@ -236,7 +241,7 @@ module Google
|
|
236
241
|
# Required. The facet key specification.
|
237
242
|
# @!attribute [rw] limit
|
238
243
|
# @return [::Integer]
|
239
|
-
# Maximum
|
244
|
+
# Maximum facet values that are returned for this facet. If
|
240
245
|
# unspecified, defaults to 20. The maximum allowed value is 300. Values
|
241
246
|
# above 300 are coerced to 300.
|
242
247
|
#
|
@@ -333,7 +338,7 @@ module Google
|
|
333
338
|
# Only supported on textual fields. Maximum is 10.
|
334
339
|
# @!attribute [rw] contains
|
335
340
|
# @return [::Array<::String>]
|
336
|
-
# Only get facet values that
|
341
|
+
# Only get facet values that contain the given strings. For example,
|
337
342
|
# suppose "category" has three values "Action > 2022",
|
338
343
|
# "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the
|
339
344
|
# "category" facet only contains "Action > 2022" and "Sci-Fi > 2022".
|
@@ -453,8 +458,8 @@ module Google
|
|
453
458
|
# The specification for query spell correction.
|
454
459
|
# @!attribute [rw] mode
|
455
460
|
# @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SpellCorrectionSpec::Mode]
|
456
|
-
# The mode under which spell correction
|
457
|
-
#
|
461
|
+
# The mode under which spell correction
|
462
|
+
# replaces the original search query. Defaults to
|
458
463
|
# {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SpellCorrectionSpec::Mode::AUTO Mode.AUTO}.
|
459
464
|
class SpellCorrectionSpec
|
460
465
|
include ::Google::Protobuf::MessageExts
|
@@ -467,10 +472,10 @@ module Google
|
|
467
472
|
# {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SpellCorrectionSpec::Mode::AUTO Mode.AUTO}.
|
468
473
|
MODE_UNSPECIFIED = 0
|
469
474
|
|
470
|
-
# Search API
|
471
|
-
#
|
475
|
+
# Search API tries to find a spelling suggestion. If a suggestion is
|
476
|
+
# found, it is put in the
|
472
477
|
# {::Google::Cloud::DiscoveryEngine::V1::SearchResponse#corrected_query SearchResponse.corrected_query}.
|
473
|
-
# The
|
478
|
+
# The spelling suggestion won't be used as the search query.
|
474
479
|
SUGGESTION_ONLY = 1
|
475
480
|
|
476
481
|
# Automatic spell correction built by the Search API. Search will
|
@@ -769,7 +774,7 @@ module Google
|
|
769
774
|
# @!attribute [rw] document
|
770
775
|
# @return [::Google::Cloud::DiscoveryEngine::V1::Document]
|
771
776
|
# The document data snippet in the search response. Only fields that are
|
772
|
-
# marked as retrievable are populated.
|
777
|
+
# marked as `retrievable` are populated.
|
773
778
|
class SearchResult
|
774
779
|
include ::Google::Protobuf::MessageExts
|
775
780
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -778,7 +783,7 @@ module Google
|
|
778
783
|
# A facet result.
|
779
784
|
# @!attribute [rw] key
|
780
785
|
# @return [::String]
|
781
|
-
# The key for this facet.
|
786
|
+
# The key for this facet. For example, `"colors"` or `"price"`. It matches
|
782
787
|
# {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::FacetSpec::FacetKey#key SearchRequest.FacetSpec.FacetKey.key}.
|
783
788
|
# @!attribute [rw] values
|
784
789
|
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Facet::FacetValue>]
|
@@ -808,7 +813,7 @@ module Google
|
|
808
813
|
end
|
809
814
|
end
|
810
815
|
|
811
|
-
# Summary of the top N search
|
816
|
+
# Summary of the top N search results specified by the summary spec.
|
812
817
|
# @!attribute [rw] summary_text
|
813
818
|
# @return [::String]
|
814
819
|
# The summary content.
|
@@ -0,0 +1,88 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2024 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module DiscoveryEngine
|
23
|
+
module V1
|
24
|
+
# External session proto definition.
|
25
|
+
# @!attribute [rw] name
|
26
|
+
# @return [::String]
|
27
|
+
# Immutable. Fully qualified name
|
28
|
+
# `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`
|
29
|
+
# @!attribute [rw] state
|
30
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::Session::State]
|
31
|
+
# The state of the session.
|
32
|
+
# @!attribute [rw] user_pseudo_id
|
33
|
+
# @return [::String]
|
34
|
+
# A unique identifier for tracking users.
|
35
|
+
# @!attribute [rw] turns
|
36
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::Session::Turn>]
|
37
|
+
# Turns.
|
38
|
+
# @!attribute [r] start_time
|
39
|
+
# @return [::Google::Protobuf::Timestamp]
|
40
|
+
# Output only. The time the session started.
|
41
|
+
# @!attribute [r] end_time
|
42
|
+
# @return [::Google::Protobuf::Timestamp]
|
43
|
+
# Output only. The time the session finished.
|
44
|
+
class Session
|
45
|
+
include ::Google::Protobuf::MessageExts
|
46
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
47
|
+
|
48
|
+
# Represents a turn, including a query from the user and a
|
49
|
+
# answer from service.
|
50
|
+
# @!attribute [rw] query
|
51
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::Query]
|
52
|
+
# The user query.
|
53
|
+
# @!attribute [rw] answer
|
54
|
+
# @return [::String]
|
55
|
+
# The resource name of the answer to the user query.
|
56
|
+
#
|
57
|
+
# Only set if the answer generation (/answer API call) happened in this
|
58
|
+
# turn.
|
59
|
+
class Turn
|
60
|
+
include ::Google::Protobuf::MessageExts
|
61
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
62
|
+
end
|
63
|
+
|
64
|
+
# Enumeration of the state of the session.
|
65
|
+
module State
|
66
|
+
# State is unspecified.
|
67
|
+
STATE_UNSPECIFIED = 0
|
68
|
+
|
69
|
+
# The session is currently open.
|
70
|
+
IN_PROGRESS = 1
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
# Defines a user inputed query.
|
75
|
+
# @!attribute [rw] text
|
76
|
+
# @return [::String]
|
77
|
+
# Plain text.
|
78
|
+
# @!attribute [rw] query_id
|
79
|
+
# @return [::String]
|
80
|
+
# Unique Id for the query.
|
81
|
+
class Query
|
82
|
+
include ::Google::Protobuf::MessageExts
|
83
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
@@ -57,6 +57,9 @@ module Google
|
|
57
57
|
# @!attribute [r] generated_uri_pattern
|
58
58
|
# @return [::String]
|
59
59
|
# Output only. This is system-generated based on the provided_uri_pattern.
|
60
|
+
# @!attribute [r] root_domain_uri
|
61
|
+
# @return [::String]
|
62
|
+
# Output only. Root domain of the provided_uri_pattern.
|
60
63
|
# @!attribute [r] site_verification_info
|
61
64
|
# @return [::Google::Cloud::DiscoveryEngine::V1::SiteVerificationInfo]
|
62
65
|
# Output only. Site ownership and validity verification status.
|
@@ -22,7 +22,7 @@ module Google
|
|
22
22
|
module DiscoveryEngine
|
23
23
|
module V1
|
24
24
|
# UserEvent captures all metadata information Discovery Engine API needs to
|
25
|
-
# know about how end users interact with
|
25
|
+
# know about how end users interact with your website.
|
26
26
|
# @!attribute [rw] event_type
|
27
27
|
# @return [::String]
|
28
28
|
# Required. User event type. Allowed values are:
|
@@ -63,6 +63,27 @@ module Google
|
|
63
63
|
# Analytics [Client
|
64
64
|
# ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId)
|
65
65
|
# for this field.
|
66
|
+
# @!attribute [rw] engine
|
67
|
+
# @return [::String]
|
68
|
+
# The {::Google::Cloud::DiscoveryEngine::V1::Engine Engine} resource name, in the
|
69
|
+
# form of
|
70
|
+
# `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.
|
71
|
+
#
|
72
|
+
# Optional. Only required for
|
73
|
+
# {::Google::Cloud::DiscoveryEngine::V1::Engine Engine} produced user events. For
|
74
|
+
# example, user events from blended search.
|
75
|
+
# @!attribute [rw] data_store
|
76
|
+
# @return [::String]
|
77
|
+
# The {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore} resource full
|
78
|
+
# name, of the form
|
79
|
+
# `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
|
80
|
+
#
|
81
|
+
# Optional. Only required for user events whose data store can't by
|
82
|
+
# determined by
|
83
|
+
# {::Google::Cloud::DiscoveryEngine::V1::UserEvent#engine UserEvent.engine} or
|
84
|
+
# {::Google::Cloud::DiscoveryEngine::V1::UserEvent#documents UserEvent.documents}.
|
85
|
+
# If data store is set in the parent of write/import/collect user event
|
86
|
+
# requests, this field can be omitted.
|
66
87
|
# @!attribute [rw] event_time
|
67
88
|
# @return [::Google::Protobuf::Timestamp]
|
68
89
|
# Only required for
|
@@ -187,7 +208,7 @@ module Google
|
|
187
208
|
# @return [::Array<::String>]
|
188
209
|
# A list of identifiers for the independent experiment groups this user event
|
189
210
|
# belongs to. This is used to distinguish between user events associated with
|
190
|
-
# different experiment setups
|
211
|
+
# different experiment setups.
|
191
212
|
# @!attribute [rw] promotion_ids
|
192
213
|
# @return [::Array<::String>]
|
193
214
|
# The promotion IDs if this is an event associated with promotions.
|
@@ -415,7 +436,7 @@ module Google
|
|
415
436
|
# @return [::Integer]
|
416
437
|
# Quantity of the Document associated with the user event. Defaults to 1.
|
417
438
|
#
|
418
|
-
# For example, this field
|
439
|
+
# For example, this field is 2 if two quantities of the same Document
|
419
440
|
# are involved in a `add-to-cart` event.
|
420
441
|
#
|
421
442
|
# Required for events of the following event types:
|
@@ -24,11 +24,23 @@ module Google
|
|
24
24
|
# Request message for WriteUserEvent method.
|
25
25
|
# @!attribute [rw] parent
|
26
26
|
# @return [::String]
|
27
|
-
# Required. The parent
|
27
|
+
# Required. The parent resource name.
|
28
|
+
# If the write user event action is applied in
|
29
|
+
# {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore} level, the format
|
30
|
+
# is:
|
28
31
|
# `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
|
32
|
+
# If the write user event action is applied in [Location][] level, for
|
33
|
+
# example, the event with
|
34
|
+
# {::Google::Cloud::DiscoveryEngine::V1::Document Document} across multiple
|
35
|
+
# {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore}, the format is:
|
36
|
+
# `projects/{project}/locations/{location}`.
|
29
37
|
# @!attribute [rw] user_event
|
30
38
|
# @return [::Google::Cloud::DiscoveryEngine::V1::UserEvent]
|
31
39
|
# Required. User event to write.
|
40
|
+
# @!attribute [rw] write_async
|
41
|
+
# @return [::Boolean]
|
42
|
+
# If set to true, the user event is written asynchronously after
|
43
|
+
# validation, and the API responds without waiting for the write.
|
32
44
|
class WriteUserEventRequest
|
33
45
|
include ::Google::Protobuf::MessageExts
|
34
46
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|