-
Notifications
You must be signed in to change notification settings - Fork 598
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: [discoveryengine] add v1alpha public library for discoveryengine (
#4735) * feat: add v1alpha public library for discoveryengine PiperOrigin-RevId: 572280880 Source-Link: googleapis/googleapis@f5cacaf Source-Link: googleapis/googleapis-gen@036171b Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpc2NvdmVyeWVuZ2luZS8uT3dsQm90LnlhbWwiLCJoIjoiMDM2MTcxYjY4ZGU1ODI5ZjVjZmE5Mjk0OTQ4NGNmY2I3ZjAwYWYyOCJ9 * 🦉 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>
- Loading branch information
1 parent
2b3356a
commit 969c8b4
Showing
82 changed files
with
88,216 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
155 changes: 155 additions & 0 deletions
155
...ges/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1alpha/common.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,155 @@ | ||
// Copyright 2022 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
syntax = "proto3"; | ||
|
||
package google.cloud.discoveryengine.v1alpha; | ||
|
||
import "google/api/resource.proto"; | ||
|
||
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha"; | ||
option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb"; | ||
option java_multiple_files = true; | ||
option java_outer_classname = "CommonProto"; | ||
option java_package = "com.google.cloud.discoveryengine.v1alpha"; | ||
option objc_class_prefix = "DISCOVERYENGINE"; | ||
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha"; | ||
option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha"; | ||
option (google.api.resource_definition) = { | ||
type: "discoveryengine.googleapis.com/Branch" | ||
pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}" | ||
pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}" | ||
}; | ||
option (google.api.resource_definition) = { | ||
type: "discoveryengine.googleapis.com/DataStore" | ||
pattern: "projects/{project}/locations/{location}/dataStores/{data_store}" | ||
pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}" | ||
}; | ||
option (google.api.resource_definition) = { | ||
type: "discoveryengine.googleapis.com/ServingConfig" | ||
pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}" | ||
pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}" | ||
pattern: "projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}" | ||
}; | ||
option (google.api.resource_definition) = { | ||
type: "discoveryengine.googleapis.com/SiteSearchEngine", | ||
pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine" | ||
pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine" | ||
}; | ||
|
||
// The type of solution. | ||
enum SolutionType { | ||
// Default value. | ||
SOLUTION_TYPE_UNSPECIFIED = 0; | ||
|
||
// Used for Recommendations AI. | ||
SOLUTION_TYPE_RECOMMENDATION = 1; | ||
|
||
// Used for Discovery Search. | ||
SOLUTION_TYPE_SEARCH = 2; | ||
|
||
// Used for use cases related to the Generative AI agent. | ||
SOLUTION_TYPE_CHAT = 3; | ||
} | ||
|
||
// A floating point interval. | ||
message Interval { | ||
// The lower bound of the interval. If neither of the min fields are | ||
// set, then the lower bound is negative infinity. | ||
// | ||
// This field must be not larger than max. | ||
// Otherwise, an `INVALID_ARGUMENT` error is returned. | ||
oneof min { | ||
// Inclusive lower bound. | ||
double minimum = 1; | ||
|
||
// Exclusive lower bound. | ||
double exclusive_minimum = 2; | ||
} | ||
|
||
// The upper bound of the interval. If neither of the max fields are | ||
// set, then the upper bound is positive infinity. | ||
// | ||
// This field must be not smaller than min. | ||
// Otherwise, an `INVALID_ARGUMENT` error is returned. | ||
oneof max { | ||
// Inclusive upper bound. | ||
double maximum = 3; | ||
|
||
// Exclusive upper bound. | ||
double exclusive_maximum = 4; | ||
} | ||
} | ||
|
||
// A custom attribute that is not explicitly modeled in a resource, e.g. | ||
// [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent]. | ||
message CustomAttribute { | ||
// The textual values of this custom attribute. For example, `["yellow", | ||
// "green"]` when the key is "color". | ||
// | ||
// Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is | ||
// returned. | ||
// | ||
// Exactly one of | ||
// [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text] | ||
// or | ||
// [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers] | ||
// should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. | ||
repeated string text = 1; | ||
|
||
// The numerical values of this custom attribute. For example, `[2.3, 15.4]` | ||
// when the key is "lengths_cm". | ||
// | ||
// Exactly one of | ||
// [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text] | ||
// or | ||
// [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers] | ||
// should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. | ||
repeated double numbers = 2; | ||
} | ||
|
||
// Information of an end user. | ||
message UserInfo { | ||
// Highly recommended for logged-in users. Unique identifier for logged-in | ||
// user, such as a user name. Don't set for anonymous users. | ||
// | ||
// Always use a hashed value for this ID. | ||
// | ||
// Don't set the field to the same fixed ID for different users. This mixes | ||
// the event history of those users together, which results in degraded | ||
// model quality. | ||
// | ||
// The field must be a UTF-8 encoded string with a length limit of 128 | ||
// characters. Otherwise, an `INVALID_ARGUMENT` error is returned. | ||
string user_id = 1; | ||
|
||
// User agent as included in the HTTP header. | ||
// | ||
// The field must be a UTF-8 encoded string with a length limit of 1,000 | ||
// characters. Otherwise, an `INVALID_ARGUMENT` error is returned. | ||
// | ||
// This should not be set when using the client side event reporting with | ||
// GTM or JavaScript tag in | ||
// [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1alpha.UserEventService.CollectUserEvent] | ||
// or if | ||
// [UserEvent.direct_user_request][google.cloud.discoveryengine.v1alpha.UserEvent.direct_user_request] | ||
// is set. | ||
string user_agent = 2; | ||
} | ||
|
||
// Double list. | ||
message DoubleList { | ||
// Double values. | ||
repeated double values = 1; | ||
} |
134 changes: 134 additions & 0 deletions
134
...loud-discoveryengine/protos/google/cloud/discoveryengine/v1alpha/completion_service.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
// Copyright 2022 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
syntax = "proto3"; | ||
|
||
package google.cloud.discoveryengine.v1alpha; | ||
|
||
import "google/api/annotations.proto"; | ||
import "google/api/client.proto"; | ||
import "google/api/field_behavior.proto"; | ||
import "google/api/resource.proto"; | ||
|
||
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha"; | ||
option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb"; | ||
option java_multiple_files = true; | ||
option java_outer_classname = "CompletionServiceProto"; | ||
option java_package = "com.google.cloud.discoveryengine.v1alpha"; | ||
option objc_class_prefix = "DISCOVERYENGINE"; | ||
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha"; | ||
option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha"; | ||
|
||
// Service for Auto-Completion. | ||
service CompletionService { | ||
option (google.api.default_host) = "discoveryengine.googleapis.com"; | ||
option (google.api.oauth_scopes) = | ||
"https://www.googleapis.com/auth/cloud-platform"; | ||
|
||
// Completes the specified user input with keyword suggestions. | ||
rpc CompleteQuery(CompleteQueryRequest) returns (CompleteQueryResponse) { | ||
option (google.api.http) = { | ||
get: "/v1alpha/{data_store=projects/*/locations/*/dataStores/*}:completeQuery" | ||
additional_bindings { | ||
get: "/v1alpha/{data_store=projects/*/locations/*/collections/*/dataStores/*}:completeQuery" | ||
} | ||
}; | ||
} | ||
} | ||
|
||
// Request message for | ||
// [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery] | ||
// method. | ||
message CompleteQueryRequest { | ||
// Required. The parent data store resource name for which the completion is | ||
// performed, such as | ||
// `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. | ||
string data_store = 1 [ | ||
(google.api.field_behavior) = REQUIRED, | ||
(google.api.resource_reference) = { | ||
type: "discoveryengine.googleapis.com/DataStore" | ||
} | ||
]; | ||
|
||
// Required. The typeahead input used to fetch suggestions. Maximum length is | ||
// 128 characters. | ||
string query = 2 [(google.api.field_behavior) = REQUIRED]; | ||
|
||
// Selects data model of query suggestions for serving. Currently supported | ||
// values: | ||
// | ||
// * `document` - Using suggestions generated from user-imported documents. | ||
// * `search-history` - Using suggestions generated from the past history of | ||
// [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search] | ||
// API calls. Do not use it when there is no traffic for Search API. | ||
// * `user-event` - Using suggestions generated from user-imported search | ||
// events. | ||
// * `document-completable` - Using suggestions taken directly from | ||
// user-imported document fields marked as completable. | ||
// | ||
// Default values: | ||
// | ||
// * `document` is the default model for regular dataStores. | ||
// * `search-history` is the default model for site search dataStores. | ||
string query_model = 3; | ||
|
||
// A unique identifier for tracking visitors. For example, this could be | ||
// implemented with an HTTP cookie, which should be able to uniquely identify | ||
// a visitor on a single device. This unique identifier should not change if | ||
// the visitor logs in or out of the website. | ||
// | ||
// This field should NOT have a fixed value such as `unknown_visitor`. | ||
// | ||
// This should be the same identifier as | ||
// [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id] | ||
// and | ||
// [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1alpha.SearchRequest.user_pseudo_id]. | ||
// | ||
// The field must be a UTF-8 encoded string with a length limit of 128 | ||
// characters. Otherwise, an `INVALID_ARGUMENT` error is returned. | ||
string user_pseudo_id = 4; | ||
|
||
// Indicates if tail suggestions should be returned if there are no | ||
// suggestions that match the full query. Even if set to true, if there are | ||
// suggestions that match the full query, those are returned and no | ||
// tail suggestions are returned. | ||
bool include_tail_suggestions = 5; | ||
} | ||
|
||
// Response message for | ||
// [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery] | ||
// method. | ||
message CompleteQueryResponse { | ||
// Suggestions as search queries. | ||
message QuerySuggestion { | ||
// The suggestion for the query. | ||
string suggestion = 1; | ||
|
||
// The unique document field paths that serve as the source of this | ||
// suggestion if it was generated from completable fields. | ||
// | ||
// This field is only populated for the document-completable model. | ||
repeated string completable_field_paths = 2; | ||
} | ||
|
||
// Results of the matched query suggestions. The result list is ordered and | ||
// the first result is a top suggestion. | ||
repeated QuerySuggestion query_suggestions = 1; | ||
|
||
// True if the returned suggestions are all tail suggestions. | ||
// | ||
// For tail matching to be triggered, include_tail_suggestions in the request | ||
// must be true and there must be no suggestions that match the full query. | ||
bool tail_match_triggered = 2; | ||
} |
Oops, something went wrong.