123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210 |
- syntax = "proto3";
- package google.cloud.retail.v2;
- import "google/api/annotations.proto";
- import "google/api/client.proto";
- import "google/api/field_behavior.proto";
- import "google/api/resource.proto";
- import "google/cloud/retail/v2/common.proto";
- import "google/cloud/retail/v2/import_config.proto";
- import "google/longrunning/operations.proto";
- option csharp_namespace = "Google.Cloud.Retail.V2";
- option go_package = "google.golang.org/genproto/googleapis/cloud/retail/v2;retail";
- option java_multiple_files = true;
- option java_outer_classname = "CompletionServiceProto";
- option java_package = "com.google.cloud.retail.v2";
- option objc_class_prefix = "RETAIL";
- option php_namespace = "Google\\Cloud\\Retail\\V2";
- option ruby_package = "Google::Cloud::Retail::V2";
- service CompletionService {
- option (google.api.default_host) = "retail.googleapis.com";
- option (google.api.oauth_scopes) =
- "https://www.googleapis.com/auth/cloud-platform";
-
-
-
-
- rpc CompleteQuery(CompleteQueryRequest) returns (CompleteQueryResponse) {
- option (google.api.http) = {
- get: "/v2/{catalog=projects/*/locations/*/catalogs/*}:completeQuery"
- };
- }
-
-
-
-
-
-
-
-
-
- rpc ImportCompletionData(ImportCompletionDataRequest)
- returns (google.longrunning.Operation) {
- option (google.api.http) = {
- post: "/v2/{parent=projects/*/locations/*/catalogs/*}/completionData:import"
- body: "*"
- };
- option (google.longrunning.operation_info) = {
- response_type: "google.cloud.retail.v2.ImportCompletionDataResponse"
- metadata_type: "google.cloud.retail.v2.ImportMetadata"
- };
- }
- }
- message CompleteQueryRequest {
-
-
-
-
- string catalog = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = { type: "retail.googleapis.com/Catalog" }
- ];
-
-
-
- string query = 2 [(google.api.field_behavior) = REQUIRED];
-
-
-
-
-
-
-
- string visitor_id = 7;
-
-
-
-
-
-
-
-
-
- repeated string language_codes = 3;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- string device_type = 4;
-
-
-
-
-
-
-
-
-
-
-
-
-
- string dataset = 6;
-
-
-
-
-
-
- int32 max_suggestions = 5;
- }
- message CompleteQueryResponse {
-
- message CompletionResult {
-
- string suggestion = 1;
-
-
-
-
-
-
-
-
-
- map<string, CustomAttribute> attributes = 2;
- }
-
- message RecentSearchResult {
-
- string recent_search = 1;
- }
-
-
- repeated CompletionResult completion_results = 1;
-
-
-
-
- string attribution_token = 2;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- repeated RecentSearchResult recent_search_results = 3;
- }
|