Skip to content

Commit 0b9c928

Browse files
fix!: [discoveryengine] remove the summarization feature from v1 version (#4273)
* fix!: remove the summarization feature from v1 version PiperOrigin-RevId: 538214109 Source-Link: googleapis/googleapis@f07f71c Source-Link: googleapis/googleapis-gen@3e548ad Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpc2NvdmVyeWVuZ2luZS8uT3dsQm90LnlhbWwiLCJoIjoiM2U1NDhhZDAwOTQxODI2M2NlNTQ0OWUxYTE0ZTg0MDg4NjgyOGEwOSJ9 feat: add discovery engine v1 library for enterprise search PiperOrigin-RevId: 534896621 Source-Link: googleapis/googleapis@5f29cc9 Source-Link: googleapis/googleapis-gen@d908deb Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpc2NvdmVyeWVuZ2luZS8uT3dsQm90LnlhbWwiLCJoIjoiZDkwOGRlYjU1NmU0MGNiOGVlMzk4M2NhMTJmZmI0YTgyNDAxYTNjMSJ9 feat: allow users to specify id field in documents gcs import feat: add LRO API for schema service docs: keep the API doc up-to-date with recent changes PiperOrigin-RevId: 534894398 Source-Link: googleapis/googleapis@eb5ac9d Source-Link: googleapis/googleapis-gen@81e8aa7 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpc2NvdmVyeWVuZ2luZS8uT3dsQm90LnlhbWwiLCJoIjoiODFlOGFhNzZiN2U0MzJhOTVlNjVjMTQwYWIxMWQwYWM3NDgxMDkyYiJ9 fix: fix the field name typo for search service user_labels Note: this might be a breaking change for libraries that already released the previous change. Since it's a beta API, we will make it a minor version bump. PiperOrigin-RevId: 532522130 Source-Link: googleapis/googleapis@11b9e39 Source-Link: googleapis/googleapis-gen@3a58021 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpc2NvdmVyeWVuZ2luZS8uT3dsQm90LnlhbWwiLCJoIjoiM2E1ODAyMWIxODhmZjdlZGUxOTNhN2IzZmU2YWQwZjEzZmYzMGY5YSJ9 feat: enable safe search feature for site search feat: allow users to provide user info in search feat: allow users to provide additional labels in search PiperOrigin-RevId: 530991570 Source-Link: googleapis/googleapis@1392f67 Source-Link: googleapis/googleapis-gen@9d08d41 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpc2NvdmVyeWVuZ2luZS8uT3dsQm90LnlhbWwiLCJoIjoiOWQwOGQ0MWQ3NDdjZGYwNTc3YTI1ZDQzZTkxOTNlNzUxZWU2MTBjNiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Release-As: v0.7.0
1 parent 67ce45e commit 0b9c928

66 files changed

Lines changed: 47751 additions & 63 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/google-cloud-discoveryengine/README.md

Lines changed: 38 additions & 22 deletions
Large diffs are not rendered by default.
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
// Copyright 2022 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
17+
package google.cloud.discoveryengine.v1;
18+
19+
import "google/api/resource.proto";
20+
21+
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1";
22+
option go_package = "cloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb";
23+
option java_multiple_files = true;
24+
option java_outer_classname = "CommonProto";
25+
option java_package = "com.google.cloud.discoveryengine.v1";
26+
option objc_class_prefix = "DISCOVERYENGINE";
27+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1";
28+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1";
29+
option (google.api.resource_definition) = {
30+
type: "discoveryengine.googleapis.com/Branch"
31+
pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}"
32+
pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}"
33+
};
34+
option (google.api.resource_definition) = {
35+
type: "discoveryengine.googleapis.com/DataStore"
36+
pattern: "projects/{project}/locations/{location}/dataStores/{data_store}"
37+
pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}"
38+
};
39+
option (google.api.resource_definition) = {
40+
type: "discoveryengine.googleapis.com/ServingConfig"
41+
pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}"
42+
pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}"
43+
};
44+
45+
// A custom attribute that is not explicitly modeled in a resource, e.g.
46+
// [UserEvent][google.cloud.discoveryengine.v1.UserEvent].
47+
message CustomAttribute {
48+
// The textual values of this custom attribute. For example, `["yellow",
49+
// "green"]` when the key is "color".
50+
//
51+
// Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is
52+
// returned.
53+
//
54+
// Exactly one of
55+
// [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text]
56+
// or
57+
// [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers]
58+
// should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
59+
repeated string text = 1;
60+
61+
// The numerical values of this custom attribute. For example, `[2.3, 15.4]`
62+
// when the key is "lengths_cm".
63+
//
64+
// Exactly one of
65+
// [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text]
66+
// or
67+
// [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers]
68+
// should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
69+
repeated double numbers = 2;
70+
}
71+
72+
// Information of an end user.
73+
message UserInfo {
74+
// Highly recommended for logged-in users. Unique identifier for logged-in
75+
// user, such as a user name. Don't set for anonymous users.
76+
//
77+
// Always use a hashed value for this ID.
78+
//
79+
// Don't set the field to the same fixed ID for different users. This mixes
80+
// the event history of those users together, which results in degraded
81+
// model quality.
82+
//
83+
// The field must be a UTF-8 encoded string with a length limit of 128
84+
// characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
85+
string user_id = 1;
86+
87+
// User agent as included in the HTTP header. Required for getting
88+
// [SearchResponse.sponsored_results][].
89+
//
90+
// The field must be a UTF-8 encoded string with a length limit of 1,000
91+
// characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
92+
//
93+
// This should not be set when using the client side event reporting with
94+
// GTM or JavaScript tag in
95+
// [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1.UserEventService.CollectUserEvent]
96+
// or if
97+
// [UserEvent.direct_user_request][google.cloud.discoveryengine.v1.UserEvent.direct_user_request]
98+
// is set.
99+
string user_agent = 2;
100+
}
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
// Copyright 2022 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
17+
package google.cloud.discoveryengine.v1;
18+
19+
import "google/api/annotations.proto";
20+
import "google/api/client.proto";
21+
import "google/api/field_behavior.proto";
22+
import "google/api/resource.proto";
23+
24+
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1";
25+
option go_package = "cloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb";
26+
option java_multiple_files = true;
27+
option java_outer_classname = "CompletionServiceProto";
28+
option java_package = "com.google.cloud.discoveryengine.v1";
29+
option objc_class_prefix = "DISCOVERYENGINE";
30+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1";
31+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1";
32+
33+
// Service for Auto-Completion.
34+
service CompletionService {
35+
option (google.api.default_host) = "discoveryengine.googleapis.com";
36+
option (google.api.oauth_scopes) =
37+
"https://www.googleapis.com/auth/cloud-platform";
38+
39+
// Completes the specified user input with keyword suggestions.
40+
rpc CompleteQuery(CompleteQueryRequest) returns (CompleteQueryResponse) {
41+
option (google.api.http) = {
42+
get: "/v1/{data_store=projects/*/locations/*/dataStores/*}:completeQuery"
43+
additional_bindings {
44+
get: "/v1/{data_store=projects/*/locations/*/collections/*/dataStores/*}:completeQuery"
45+
}
46+
};
47+
}
48+
}
49+
50+
// Request message for
51+
// [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1.CompletionService.CompleteQuery]
52+
// method.
53+
message CompleteQueryRequest {
54+
// Required. The parent data store resource name for which the completion is
55+
// performed, such as
56+
// `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.
57+
string data_store = 1 [
58+
(google.api.field_behavior) = REQUIRED,
59+
(google.api.resource_reference) = {
60+
type: "discoveryengine.googleapis.com/DataStore"
61+
}
62+
];
63+
64+
// Required. The typeahead input used to fetch suggestions. Maximum length is
65+
// 128 characters.
66+
string query = 2 [(google.api.field_behavior) = REQUIRED];
67+
68+
// Selects data model of query suggestions for serving. Currently supported
69+
// values:
70+
//
71+
// * `document` - Using suggestions generated from user-imported documents.
72+
// * `search-history` - Using suggestions generated from the past history of
73+
// [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search]
74+
// API calls. Do not use it when there is no traffic for Search API.
75+
// * `user-event` - Using suggestions generated from user-imported search
76+
// events.
77+
//
78+
// Default values:
79+
//
80+
// * `document` is the default model for regular dataStores.
81+
// * `search-history` is the default model for
82+
// [IndustryVertical.SITE_SEARCH][google.cloud.discoveryengine.v1.IndustryVertical.SITE_SEARCH]
83+
// dataStores.
84+
string query_model = 3;
85+
86+
// A unique identifier for tracking visitors. For example, this could be
87+
// implemented with an HTTP cookie, which should be able to uniquely identify
88+
// a visitor on a single device. This unique identifier should not change if
89+
// the visitor logs in or out of the website.
90+
//
91+
// This field should NOT have a fixed value such as `unknown_visitor`.
92+
//
93+
// This should be the same identifier as
94+
// [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id]
95+
// and
96+
// [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1.SearchRequest.user_pseudo_id].
97+
//
98+
// The field must be a UTF-8 encoded string with a length limit of 128
99+
// characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
100+
string user_pseudo_id = 4;
101+
}
102+
103+
// Response message for
104+
// [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1.CompletionService.CompleteQuery]
105+
// method.
106+
message CompleteQueryResponse {
107+
// Suggestions as search queries.
108+
message QuerySuggestion {
109+
// The suggestion for the query.
110+
string suggestion = 1;
111+
}
112+
113+
// Results of the matched query suggestions. The result list is ordered and
114+
// the first result is a top suggestion.
115+
repeated QuerySuggestion query_suggestions = 1;
116+
}
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
// Copyright 2022 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
17+
package google.cloud.discoveryengine.v1;
18+
19+
import "google/api/field_behavior.proto";
20+
import "google/api/resource.proto";
21+
import "google/protobuf/struct.proto";
22+
23+
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1";
24+
option go_package = "cloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb";
25+
option java_multiple_files = true;
26+
option java_outer_classname = "DocumentProto";
27+
option java_package = "com.google.cloud.discoveryengine.v1";
28+
option objc_class_prefix = "DISCOVERYENGINE";
29+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1";
30+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1";
31+
32+
// Document captures all raw metadata information of items to be recommended or
33+
// searched.
34+
message Document {
35+
option (google.api.resource) = {
36+
type: "discoveryengine.googleapis.com/Document"
37+
pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}"
38+
pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}"
39+
};
40+
41+
// Unstructured data linked to this document.
42+
message Content {
43+
oneof content {
44+
// The content represented as a stream of bytes. The maximum length is
45+
// 1,000,000 bytes (1 MB / ~0.95 MiB).
46+
//
47+
// Note: As with all `bytes` fields, this field is represented as pure
48+
// binary in Protocol Buffers and base64-encoded string in JSON. For
49+
// example, `abc123!?$*&()'-=@~` should be represented as
50+
// `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See
51+
// https://developers.google.com/protocol-buffers/docs/proto3#json.
52+
bytes raw_bytes = 2;
53+
54+
// The URI of the content. Only Cloud Storage URIs (e.g.
55+
// `gs://bucket-name/path/to/file`) are supported. The maximum file size
56+
// is 100 MB.
57+
string uri = 3;
58+
}
59+
60+
// The MIME type of the content. Supported types:
61+
//
62+
// * `application/pdf` (PDF)
63+
// * `text/html` (HTML)
64+
//
65+
// See https://www.iana.org/assignments/media-types/media-types.xhtml.
66+
string mime_type = 1;
67+
}
68+
69+
// Data representation. One of
70+
// [struct_data][google.cloud.discoveryengine.v1.Document.struct_data] or
71+
// [json_data][google.cloud.discoveryengine.v1.Document.json_data] should be
72+
// provided otherwise an `INVALID_ARGUMENT` error is thrown.
73+
oneof data {
74+
// The structured JSON data for the document. It should conform to the
75+
// registered [Schema.schema][google.cloud.discoveryengine.v1.Schema.schema]
76+
// or an `INVALID_ARGUMENT` error is thrown.
77+
google.protobuf.Struct struct_data = 4;
78+
79+
// The JSON string representation of the document. It should conform to the
80+
// registered [Schema.schema][google.cloud.discoveryengine.v1.Schema.schema]
81+
// or an `INVALID_ARGUMENT` error is thrown.
82+
string json_data = 5;
83+
}
84+
85+
// Immutable. The full resource name of the document.
86+
// Format:
87+
// `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`.
88+
//
89+
// This field must be a UTF-8 encoded string with a length limit of 1024
90+
// characters.
91+
string name = 1 [(google.api.field_behavior) = IMMUTABLE];
92+
93+
// Immutable. The identifier of the document.
94+
//
95+
// Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
96+
// standard with a length limit of 63 characters.
97+
string id = 2 [(google.api.field_behavior) = IMMUTABLE];
98+
99+
// The identifier of the schema located in the same data store.
100+
string schema_id = 3;
101+
102+
// The unstructured data linked to this document. Content must be set if this
103+
// document is under a
104+
// `CONTENT_REQUIRED` data store.
105+
Content content = 10;
106+
107+
// The identifier of the parent document. Currently supports at most two level
108+
// document hierarchy.
109+
//
110+
// Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
111+
// standard with a length limit of 63 characters.
112+
string parent_document_id = 7;
113+
114+
// Output only. This field is OUTPUT_ONLY.
115+
// It contains derived data that are not in the original input document.
116+
google.protobuf.Struct derived_struct_data = 6
117+
[(google.api.field_behavior) = OUTPUT_ONLY];
118+
}

0 commit comments

Comments
 (0)