google-cloud-discovery_engine-v1 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/discovery_engine/v1/completion_service/client.rb +23 -3
- data/lib/google/cloud/discovery_engine/v1/completion_service/rest/client.rb +23 -3
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb +959 -0
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/paths.rb +176 -0
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb +797 -0
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/service_stub.rb +450 -0
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1/document_service/client.rb +23 -8
- data/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb +23 -8
- data/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb +42 -0
- data/lib/google/cloud/discovery_engine/v1/rest.rb +2 -1
- data/lib/google/cloud/discovery_engine/v1/schema_service/client.rb +14 -0
- data/lib/google/cloud/discovery_engine/v1/schema_service/rest/client.rb +14 -0
- data/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb +42 -0
- data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +45 -9
- data/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +47 -12
- data/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb +19 -5
- data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb +19 -5
- data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb +42 -0
- data/lib/google/cloud/discovery_engine/v1/version.rb +1 -1
- data/lib/google/cloud/discovery_engine/v1.rb +2 -1
- data/lib/google/cloud/discoveryengine/v1/common_pb.rb +2 -1
- data/lib/google/cloud/discoveryengine/v1/completion_service_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/conversation_pb.rb +54 -0
- data/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb +61 -0
- data/lib/google/cloud/discoveryengine/v1/conversational_search_service_services_pb.rb +67 -0
- data/lib/google/cloud/discoveryengine/v1/import_config_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/search_service_pb.rb +13 -1
- data/lib/google/cloud/discoveryengine/v1/user_event_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/user_event_service_services_pb.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +14 -0
- data/proto_docs/google/cloud/discoveryengine/v1/common.rb +19 -2
- data/proto_docs/google/cloud/discoveryengine/v1/completion_service.rb +15 -2
- data/proto_docs/google/cloud/discoveryengine/v1/conversation.rb +113 -0
- data/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +206 -0
- data/proto_docs/google/cloud/discoveryengine/v1/document.rb +8 -5
- data/proto_docs/google/cloud/discoveryengine/v1/document_service.rb +4 -3
- data/proto_docs/google/cloud/discoveryengine/v1/import_config.rb +23 -19
- data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +455 -19
- data/proto_docs/google/cloud/discoveryengine/v1/user_event.rb +44 -32
- data/proto_docs/google/cloud/discoveryengine/v1/user_event_service.rb +1 -1
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- metadata +36 -3
@@ -44,13 +44,14 @@ module Google
|
|
44
44
|
# API calls. Do not use it when there is no traffic for Search API.
|
45
45
|
# * `user-event` - Using suggestions generated from user-imported search
|
46
46
|
# events.
|
47
|
+
# * `document-completable` - Using suggestions taken directly from
|
48
|
+
# user-imported document fields marked as completable.
|
47
49
|
#
|
48
50
|
# Default values:
|
49
51
|
#
|
50
52
|
# * `document` is the default model for regular dataStores.
|
51
53
|
# * `search-history` is the default model for
|
52
|
-
# [IndustryVertical.SITE_SEARCH][
|
53
|
-
# dataStores.
|
54
|
+
# [IndustryVertical.SITE_SEARCH][] dataStores.
|
54
55
|
# @!attribute [rw] user_pseudo_id
|
55
56
|
# @return [::String]
|
56
57
|
# A unique identifier for tracking visitors. For example, this could be
|
@@ -67,6 +68,12 @@ module Google
|
|
67
68
|
#
|
68
69
|
# The field must be a UTF-8 encoded string with a length limit of 128
|
69
70
|
# characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
71
|
+
# @!attribute [rw] include_tail_suggestions
|
72
|
+
# @return [::Boolean]
|
73
|
+
# Indicates if tail suggestions should be returned if there are no
|
74
|
+
# suggestions that match the full query. Even if set to true, if there are
|
75
|
+
# suggestions that match the full query, those are returned and no
|
76
|
+
# tail suggestions are returned.
|
70
77
|
class CompleteQueryRequest
|
71
78
|
include ::Google::Protobuf::MessageExts
|
72
79
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -79,6 +86,12 @@ module Google
|
|
79
86
|
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::CompleteQueryResponse::QuerySuggestion>]
|
80
87
|
# Results of the matched query suggestions. The result list is ordered and
|
81
88
|
# the first result is a top suggestion.
|
89
|
+
# @!attribute [rw] tail_match_triggered
|
90
|
+
# @return [::Boolean]
|
91
|
+
# True if the returned suggestions are all tail suggestions.
|
92
|
+
#
|
93
|
+
# For tail matching to be triggered, include_tail_suggestions in the request
|
94
|
+
# must be true and there must be no suggestions that match the full query.
|
82
95
|
class CompleteQueryResponse
|
83
96
|
include ::Google::Protobuf::MessageExts
|
84
97
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -0,0 +1,113 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 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 conversation proto definition.
|
25
|
+
# @!attribute [rw] name
|
26
|
+
# @return [::String]
|
27
|
+
# Immutable. Fully qualified name
|
28
|
+
# `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*`
|
29
|
+
# @!attribute [rw] state
|
30
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::Conversation::State]
|
31
|
+
# The state of the Conversation.
|
32
|
+
# @!attribute [rw] user_pseudo_id
|
33
|
+
# @return [::String]
|
34
|
+
# A unique identifier for tracking users.
|
35
|
+
# @!attribute [rw] messages
|
36
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::ConversationMessage>]
|
37
|
+
# Conversation messages.
|
38
|
+
# @!attribute [r] start_time
|
39
|
+
# @return [::Google::Protobuf::Timestamp]
|
40
|
+
# Output only. The time the conversation started.
|
41
|
+
# @!attribute [r] end_time
|
42
|
+
# @return [::Google::Protobuf::Timestamp]
|
43
|
+
# Output only. The time the conversation finished.
|
44
|
+
class Conversation
|
45
|
+
include ::Google::Protobuf::MessageExts
|
46
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
47
|
+
|
48
|
+
# Enumeration of the state of the conversation.
|
49
|
+
module State
|
50
|
+
# Unknown.
|
51
|
+
STATE_UNSPECIFIED = 0
|
52
|
+
|
53
|
+
# Conversation is currently open.
|
54
|
+
IN_PROGRESS = 1
|
55
|
+
|
56
|
+
# Conversation has been completed.
|
57
|
+
COMPLETED = 2
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
# Defines a reply message to user.
|
62
|
+
# @!attribute [rw] summary
|
63
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary]
|
64
|
+
# Summary based on search results.
|
65
|
+
class Reply
|
66
|
+
include ::Google::Protobuf::MessageExts
|
67
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
68
|
+
end
|
69
|
+
|
70
|
+
# Defines context of the conversation
|
71
|
+
# @!attribute [rw] context_documents
|
72
|
+
# @return [::Array<::String>]
|
73
|
+
# The current list of documents the user is seeing.
|
74
|
+
# It contains the document resource references.
|
75
|
+
# @!attribute [rw] active_document
|
76
|
+
# @return [::String]
|
77
|
+
# The current active document the user opened.
|
78
|
+
# It contains the document resource reference.
|
79
|
+
class ConversationContext
|
80
|
+
include ::Google::Protobuf::MessageExts
|
81
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
82
|
+
end
|
83
|
+
|
84
|
+
# Defines text input.
|
85
|
+
# @!attribute [rw] input
|
86
|
+
# @return [::String]
|
87
|
+
# Text input.
|
88
|
+
# @!attribute [rw] context
|
89
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::ConversationContext]
|
90
|
+
# Conversation context of the input.
|
91
|
+
class TextInput
|
92
|
+
include ::Google::Protobuf::MessageExts
|
93
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
94
|
+
end
|
95
|
+
|
96
|
+
# Defines a conversation message.
|
97
|
+
# @!attribute [rw] user_input
|
98
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::TextInput]
|
99
|
+
# User text input.
|
100
|
+
# @!attribute [rw] reply
|
101
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::Reply]
|
102
|
+
# Search reply.
|
103
|
+
# @!attribute [r] create_time
|
104
|
+
# @return [::Google::Protobuf::Timestamp]
|
105
|
+
# Output only. Message creation timestamp.
|
106
|
+
class ConversationMessage
|
107
|
+
include ::Google::Protobuf::MessageExts
|
108
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
@@ -0,0 +1,206 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 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
|
+
# Request message for
|
25
|
+
# {::Google::Cloud::DiscoveryEngine::V1::ConversationalSearchService::Client#converse_conversation ConversationalSearchService.ConverseConversation}
|
26
|
+
# method.
|
27
|
+
# @!attribute [rw] name
|
28
|
+
# @return [::String]
|
29
|
+
# Required. The resource name of the Conversation to get. Format:
|
30
|
+
# `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`.
|
31
|
+
# Use
|
32
|
+
# `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-`
|
33
|
+
# to activate auto session mode, which automatically creates a new
|
34
|
+
# conversation inside a ConverseConversation session.
|
35
|
+
# @!attribute [rw] query
|
36
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::TextInput]
|
37
|
+
# Required. Current user input.
|
38
|
+
# @!attribute [rw] serving_config
|
39
|
+
# @return [::String]
|
40
|
+
# The resource name of the Serving Config to use. Format:
|
41
|
+
# `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}`
|
42
|
+
# If this is not set, the default serving config will be used.
|
43
|
+
# @!attribute [rw] conversation
|
44
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::Conversation]
|
45
|
+
# The conversation to be used by auto session only. The name field will be
|
46
|
+
# ignored as we automatically assign new name for the conversation in auto
|
47
|
+
# session.
|
48
|
+
# @!attribute [rw] safe_search
|
49
|
+
# @return [::Boolean]
|
50
|
+
# Whether to turn on safe search.
|
51
|
+
# @!attribute [rw] user_labels
|
52
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
53
|
+
# The user labels applied to a resource must meet the following requirements:
|
54
|
+
#
|
55
|
+
# * Each resource can have multiple labels, up to a maximum of 64.
|
56
|
+
# * Each label must be a key-value pair.
|
57
|
+
# * Keys have a minimum length of 1 character and a maximum length of 63
|
58
|
+
# characters and cannot be empty. Values can be empty and have a maximum
|
59
|
+
# length of 63 characters.
|
60
|
+
# * Keys and values can contain only lowercase letters, numeric characters,
|
61
|
+
# underscores, and dashes. All characters must use UTF-8 encoding, and
|
62
|
+
# international characters are allowed.
|
63
|
+
# * The key portion of a label must be unique. However, you can use the same
|
64
|
+
# key with multiple resources.
|
65
|
+
# * Keys must start with a lowercase letter or international character.
|
66
|
+
#
|
67
|
+
# See [Google Cloud
|
68
|
+
# Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
|
69
|
+
# for more details.
|
70
|
+
# @!attribute [rw] summary_spec
|
71
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec]
|
72
|
+
# A specification for configuring the summary returned in the response.
|
73
|
+
class ConverseConversationRequest
|
74
|
+
include ::Google::Protobuf::MessageExts
|
75
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
76
|
+
|
77
|
+
# @!attribute [rw] key
|
78
|
+
# @return [::String]
|
79
|
+
# @!attribute [rw] value
|
80
|
+
# @return [::String]
|
81
|
+
class UserLabelsEntry
|
82
|
+
include ::Google::Protobuf::MessageExts
|
83
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
# Response message for
|
88
|
+
# {::Google::Cloud::DiscoveryEngine::V1::ConversationalSearchService::Client#converse_conversation ConversationalSearchService.ConverseConversation}
|
89
|
+
# method.
|
90
|
+
# @!attribute [rw] reply
|
91
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::Reply]
|
92
|
+
# Answer to the current query.
|
93
|
+
# @!attribute [rw] conversation
|
94
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::Conversation]
|
95
|
+
# Updated conversation including the answer.
|
96
|
+
# @!attribute [rw] search_results
|
97
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult>]
|
98
|
+
# Search Results.
|
99
|
+
class ConverseConversationResponse
|
100
|
+
include ::Google::Protobuf::MessageExts
|
101
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
102
|
+
end
|
103
|
+
|
104
|
+
# Request for CreateConversation method.
|
105
|
+
# @!attribute [rw] parent
|
106
|
+
# @return [::String]
|
107
|
+
# Required. Full resource name of parent data store. Format:
|
108
|
+
# `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
|
109
|
+
# @!attribute [rw] conversation
|
110
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::Conversation]
|
111
|
+
# Required. The conversation to create.
|
112
|
+
class CreateConversationRequest
|
113
|
+
include ::Google::Protobuf::MessageExts
|
114
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
115
|
+
end
|
116
|
+
|
117
|
+
# Request for UpdateConversation method.
|
118
|
+
# @!attribute [rw] conversation
|
119
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::Conversation]
|
120
|
+
# Required. The Conversation to update.
|
121
|
+
# @!attribute [rw] update_mask
|
122
|
+
# @return [::Google::Protobuf::FieldMask]
|
123
|
+
# Indicates which fields in the provided
|
124
|
+
# {::Google::Cloud::DiscoveryEngine::V1::Conversation Conversation} to update. The
|
125
|
+
# following are NOT supported:
|
126
|
+
#
|
127
|
+
# * [conversation.name][]
|
128
|
+
#
|
129
|
+
# If not set or empty, all supported fields are updated.
|
130
|
+
class UpdateConversationRequest
|
131
|
+
include ::Google::Protobuf::MessageExts
|
132
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
133
|
+
end
|
134
|
+
|
135
|
+
# Request for DeleteConversation method.
|
136
|
+
# @!attribute [rw] name
|
137
|
+
# @return [::String]
|
138
|
+
# Required. The resource name of the Conversation to delete. Format:
|
139
|
+
# `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`
|
140
|
+
class DeleteConversationRequest
|
141
|
+
include ::Google::Protobuf::MessageExts
|
142
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
143
|
+
end
|
144
|
+
|
145
|
+
# Request for GetConversation method.
|
146
|
+
# @!attribute [rw] name
|
147
|
+
# @return [::String]
|
148
|
+
# Required. The resource name of the Conversation to get. Format:
|
149
|
+
# `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`
|
150
|
+
class GetConversationRequest
|
151
|
+
include ::Google::Protobuf::MessageExts
|
152
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
153
|
+
end
|
154
|
+
|
155
|
+
# Request for ListConversations method.
|
156
|
+
# @!attribute [rw] parent
|
157
|
+
# @return [::String]
|
158
|
+
# Required. The data store resource name. Format:
|
159
|
+
# `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
|
160
|
+
# @!attribute [rw] page_size
|
161
|
+
# @return [::Integer]
|
162
|
+
# Maximum number of results to return. If unspecified, defaults
|
163
|
+
# to 50. Max allowed value is 1000.
|
164
|
+
# @!attribute [rw] page_token
|
165
|
+
# @return [::String]
|
166
|
+
# A page token, received from a previous `ListConversations` call.
|
167
|
+
# Provide this to retrieve the subsequent page.
|
168
|
+
# @!attribute [rw] filter
|
169
|
+
# @return [::String]
|
170
|
+
# A filter to apply on the list results. The supported features are:
|
171
|
+
# user_pseudo_id, state.
|
172
|
+
#
|
173
|
+
# Example:
|
174
|
+
# "user_pseudo_id = some_id"
|
175
|
+
# @!attribute [rw] order_by
|
176
|
+
# @return [::String]
|
177
|
+
# A comma-separated list of fields to order by, sorted in ascending order.
|
178
|
+
# Use "desc" after a field name for descending.
|
179
|
+
# Supported fields:
|
180
|
+
# * `update_time`
|
181
|
+
# * `create_time`
|
182
|
+
# * `conversation_name`
|
183
|
+
#
|
184
|
+
# Example:
|
185
|
+
# "update_time desc"
|
186
|
+
# "create_time"
|
187
|
+
class ListConversationsRequest
|
188
|
+
include ::Google::Protobuf::MessageExts
|
189
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
190
|
+
end
|
191
|
+
|
192
|
+
# Response for ListConversations method.
|
193
|
+
# @!attribute [rw] conversations
|
194
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::Conversation>]
|
195
|
+
# All the Conversations for a given data store.
|
196
|
+
# @!attribute [rw] next_page_token
|
197
|
+
# @return [::String]
|
198
|
+
# Pagination token, if not returned indicates the last page.
|
199
|
+
class ListConversationsResponse
|
200
|
+
include ::Google::Protobuf::MessageExts
|
201
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
202
|
+
end
|
203
|
+
end
|
204
|
+
end
|
205
|
+
end
|
206
|
+
end
|
@@ -26,13 +26,13 @@ module Google
|
|
26
26
|
# @!attribute [rw] struct_data
|
27
27
|
# @return [::Google::Protobuf::Struct]
|
28
28
|
# The structured JSON data for the document. It should conform to the
|
29
|
-
# registered
|
30
|
-
#
|
29
|
+
# registered {::Google::Cloud::DiscoveryEngine::V1::Schema Schema} or an
|
30
|
+
# `INVALID_ARGUMENT` error is thrown.
|
31
31
|
# @!attribute [rw] json_data
|
32
32
|
# @return [::String]
|
33
33
|
# The JSON string representation of the document. It should conform to the
|
34
|
-
# registered
|
35
|
-
#
|
34
|
+
# registered {::Google::Cloud::DiscoveryEngine::V1::Schema Schema} or an
|
35
|
+
# `INVALID_ARGUMENT` error is thrown.
|
36
36
|
# @!attribute [rw] name
|
37
37
|
# @return [::String]
|
38
38
|
# Immutable. The full resource name of the document.
|
@@ -90,8 +90,11 @@ module Google
|
|
90
90
|
# @return [::String]
|
91
91
|
# The MIME type of the content. Supported types:
|
92
92
|
#
|
93
|
-
# * `application/pdf` (PDF)
|
93
|
+
# * `application/pdf` (PDF, only native PDFs are supported for now)
|
94
94
|
# * `text/html` (HTML)
|
95
|
+
# * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX)
|
96
|
+
# * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX)
|
97
|
+
# * `text/plain` (TXT)
|
95
98
|
#
|
96
99
|
# See https://www.iana.org/assignments/media-types/media-types.xhtml.
|
97
100
|
class Content
|
@@ -51,9 +51,10 @@ module Google
|
|
51
51
|
# Use `default_branch` as the branch ID, to list documents under the default
|
52
52
|
# branch.
|
53
53
|
#
|
54
|
-
# If the caller does not have permission to list
|
55
|
-
#
|
56
|
-
# `PERMISSION_DENIED`
|
54
|
+
# If the caller does not have permission to list
|
55
|
+
# {::Google::Cloud::DiscoveryEngine::V1::Document Document}s under this branch,
|
56
|
+
# regardless of whether or not this branch exists, a `PERMISSION_DENIED`
|
57
|
+
# error is returned.
|
57
58
|
# @!attribute [rw] page_size
|
58
59
|
# @return [::Integer]
|
59
60
|
# Maximum number of {::Google::Cloud::DiscoveryEngine::V1::Document Document}s to
|
@@ -43,11 +43,15 @@ module Google
|
|
43
43
|
# document must
|
44
44
|
# have a valid {::Google::Cloud::DiscoveryEngine::V1::Document#id Document.id}.
|
45
45
|
# * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by
|
46
|
-
# `input_uris`
|
46
|
+
# `input_uris` becomes a document, with the ID set to the first 128
|
47
47
|
# bits of SHA256(URI) encoded as a hex string.
|
48
48
|
# * `custom`: One custom data JSON per row in arbitrary format that conforms
|
49
|
-
# the defined {::Google::Cloud::DiscoveryEngine::V1::Schema Schema} of the
|
50
|
-
# store. This can only be used by
|
49
|
+
# to the defined {::Google::Cloud::DiscoveryEngine::V1::Schema Schema} of the
|
50
|
+
# data store. This can only be used by Gen App Builder.
|
51
|
+
# * `csv`: A CSV file with header conforming to the defined
|
52
|
+
# {::Google::Cloud::DiscoveryEngine::V1::Schema Schema} of the
|
53
|
+
# data store. Each entry after the header is imported as a Document.
|
54
|
+
# This can only be used by Gen App Builder.
|
51
55
|
#
|
52
56
|
# Supported values for user even imports:
|
53
57
|
#
|
@@ -98,9 +102,9 @@ module Google
|
|
98
102
|
# {::Google::Cloud::DiscoveryEngine::V1::Document#json_data Document.json_data}
|
99
103
|
# or
|
100
104
|
# {::Google::Cloud::DiscoveryEngine::V1::Document#struct_data Document.struct_data}.
|
101
|
-
# * `custom`: One custom data per row in arbitrary format that conforms
|
102
|
-
# defined {::Google::Cloud::DiscoveryEngine::V1::Schema Schema} of the data
|
103
|
-
# store. This can only be used by
|
105
|
+
# * `custom`: One custom data per row in arbitrary format that conforms to
|
106
|
+
# the defined {::Google::Cloud::DiscoveryEngine::V1::Schema Schema} of the data
|
107
|
+
# store. This can only be used by Gen App Builder.
|
104
108
|
class BigQuerySource
|
105
109
|
include ::Google::Protobuf::MessageExts
|
106
110
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -110,7 +114,7 @@ module Google
|
|
110
114
|
# @!attribute [rw] gcs_prefix
|
111
115
|
# @return [::String]
|
112
116
|
# Cloud Storage prefix for import errors. This must be an empty,
|
113
|
-
# existing Cloud Storage directory. Import errors
|
117
|
+
# existing Cloud Storage directory. Import errors are written to
|
114
118
|
# sharded files in this directory, one per line, as a JSON-encoded
|
115
119
|
# `google.rpc.Status` message.
|
116
120
|
class ImportErrorConfig
|
@@ -121,13 +125,13 @@ module Google
|
|
121
125
|
# Request message for the ImportUserEvents request.
|
122
126
|
# @!attribute [rw] inline_source
|
123
127
|
# @return [::Google::Cloud::DiscoveryEngine::V1::ImportUserEventsRequest::InlineSource]
|
124
|
-
#
|
128
|
+
# The Inline source for the input content for UserEvents.
|
125
129
|
# @!attribute [rw] gcs_source
|
126
130
|
# @return [::Google::Cloud::DiscoveryEngine::V1::GcsSource]
|
127
|
-
#
|
131
|
+
# Cloud Storage location for the input content.
|
128
132
|
# @!attribute [rw] bigquery_source
|
129
133
|
# @return [::Google::Cloud::DiscoveryEngine::V1::BigQuerySource]
|
130
|
-
#
|
134
|
+
# BigQuery input source.
|
131
135
|
# @!attribute [rw] parent
|
132
136
|
# @return [::String]
|
133
137
|
# Required. Parent DataStore resource name, of the form
|
@@ -172,7 +176,7 @@ module Google
|
|
172
176
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
173
177
|
end
|
174
178
|
|
175
|
-
# Metadata related to the progress of the Import operation. This
|
179
|
+
# Metadata related to the progress of the Import operation. This is
|
176
180
|
# returned by the google.longrunning.Operation.metadata field.
|
177
181
|
# @!attribute [rw] create_time
|
178
182
|
# @return [::Google::Protobuf::Timestamp]
|
@@ -192,8 +196,8 @@ module Google
|
|
192
196
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
193
197
|
end
|
194
198
|
|
195
|
-
# Metadata related to the progress of the ImportDocuments operation. This
|
196
|
-
#
|
199
|
+
# Metadata related to the progress of the ImportDocuments operation. This is
|
200
|
+
# returned by the google.longrunning.Operation.metadata field.
|
197
201
|
# @!attribute [rw] create_time
|
198
202
|
# @return [::Google::Protobuf::Timestamp]
|
199
203
|
# Operation create time.
|
@@ -248,7 +252,7 @@ module Google
|
|
248
252
|
# `false`, {::Google::Cloud::DiscoveryEngine::V1::Document#id Document.id}s have
|
249
253
|
# to be specified using
|
250
254
|
# {::Google::Cloud::DiscoveryEngine::V1::ImportDocumentsRequest#id_field id_field},
|
251
|
-
#
|
255
|
+
# otherwise, documents without IDs fail to be imported.
|
252
256
|
#
|
253
257
|
# Only set this field when using
|
254
258
|
# {::Google::Cloud::DiscoveryEngine::V1::GcsSource GcsSource} or
|
@@ -256,7 +260,7 @@ module Google
|
|
256
260
|
# {::Google::Cloud::DiscoveryEngine::V1::GcsSource#data_schema GcsSource.data_schema}
|
257
261
|
# or
|
258
262
|
# {::Google::Cloud::DiscoveryEngine::V1::BigQuerySource#data_schema BigQuerySource.data_schema}
|
259
|
-
# is `custom`. Otherwise, an INVALID_ARGUMENT error is thrown.
|
263
|
+
# is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
|
260
264
|
# @!attribute [rw] id_field
|
261
265
|
# @return [::String]
|
262
266
|
# The field in the Cloud Storage and BigQuery sources that indicates the
|
@@ -267,12 +271,12 @@ module Google
|
|
267
271
|
# For {::Google::Cloud::DiscoveryEngine::V1::BigQuerySource BigQuerySource} it is
|
268
272
|
# the column name of the BigQuery table where the unique ids are stored.
|
269
273
|
#
|
270
|
-
# The values of the JSON field or the BigQuery column
|
274
|
+
# The values of the JSON field or the BigQuery column are used as the
|
271
275
|
# {::Google::Cloud::DiscoveryEngine::V1::Document#id Document.id}s. The JSON field
|
272
276
|
# or the BigQuery column must be of string type, and the values must be set
|
273
277
|
# as valid strings conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
|
274
|
-
# with 1-63 characters. Otherwise, documents without valid IDs
|
275
|
-
#
|
278
|
+
# with 1-63 characters. Otherwise, documents without valid IDs fail to be
|
279
|
+
# imported.
|
276
280
|
#
|
277
281
|
# Only set this field when using
|
278
282
|
# {::Google::Cloud::DiscoveryEngine::V1::GcsSource GcsSource} or
|
@@ -304,7 +308,7 @@ module Google
|
|
304
308
|
# Indicates how imported documents are reconciled with the existing documents
|
305
309
|
# created or imported before.
|
306
310
|
module ReconciliationMode
|
307
|
-
# Defaults to INCREMENTAL
|
311
|
+
# Defaults to `INCREMENTAL`.
|
308
312
|
RECONCILIATION_MODE_UNSPECIFIED = 0
|
309
313
|
|
310
314
|
# Inserts new documents or updates existing documents.
|