|
| 1 | +// Copyright 2025 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 | +import "google/cloud/discoveryengine/v1/conversational_search_service.proto"; |
| 24 | +import "google/cloud/discoveryengine/v1/session.proto"; |
| 25 | +import "google/protobuf/empty.proto"; |
| 26 | + |
| 27 | +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1"; |
| 28 | +option go_package = "cloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb"; |
| 29 | +option java_multiple_files = true; |
| 30 | +option java_outer_classname = "SessionServiceProto"; |
| 31 | +option java_package = "com.google.cloud.discoveryengine.v1"; |
| 32 | +option objc_class_prefix = "DISCOVERYENGINE"; |
| 33 | +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1"; |
| 34 | +option ruby_package = "Google::Cloud::DiscoveryEngine::V1"; |
| 35 | + |
| 36 | +// Service for managing Sessions and Session-related resources. |
| 37 | +service SessionService { |
| 38 | + option (google.api.default_host) = "discoveryengine.googleapis.com"; |
| 39 | + option (google.api.oauth_scopes) = |
| 40 | + "https://www.googleapis.com/auth/cloud-platform"; |
| 41 | + |
| 42 | + // Creates a Session. |
| 43 | + // |
| 44 | + // If the [Session][google.cloud.discoveryengine.v1.Session] to create already |
| 45 | + // exists, an ALREADY_EXISTS error is returned. |
| 46 | + rpc CreateSession(CreateSessionRequest) returns (Session) { |
| 47 | + option (google.api.http) = { |
| 48 | + post: "/v1/{parent=projects/*/locations/*/dataStores/*}/sessions" |
| 49 | + body: "session" |
| 50 | + additional_bindings { |
| 51 | + post: "/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/sessions" |
| 52 | + body: "session" |
| 53 | + } |
| 54 | + additional_bindings { |
| 55 | + post: "/v1/{parent=projects/*/locations/*/collections/*/engines/*}/sessions" |
| 56 | + body: "session" |
| 57 | + } |
| 58 | + }; |
| 59 | + option (google.api.method_signature) = "parent,session"; |
| 60 | + } |
| 61 | + |
| 62 | + // Deletes a Session. |
| 63 | + // |
| 64 | + // If the [Session][google.cloud.discoveryengine.v1.Session] to delete does |
| 65 | + // not exist, a NOT_FOUND error is returned. |
| 66 | + rpc DeleteSession(DeleteSessionRequest) returns (google.protobuf.Empty) { |
| 67 | + option (google.api.http) = { |
| 68 | + delete: "/v1/{name=projects/*/locations/*/dataStores/*/sessions/*}" |
| 69 | + additional_bindings { |
| 70 | + delete: "/v1/{name=projects/*/locations/*/collections/*/dataStores/*/sessions/*}" |
| 71 | + } |
| 72 | + additional_bindings { |
| 73 | + delete: "/v1/{name=projects/*/locations/*/collections/*/engines/*/sessions/*}" |
| 74 | + } |
| 75 | + }; |
| 76 | + option (google.api.method_signature) = "name"; |
| 77 | + } |
| 78 | + |
| 79 | + // Updates a Session. |
| 80 | + // |
| 81 | + // [Session][google.cloud.discoveryengine.v1.Session] action type cannot be |
| 82 | + // changed. If the [Session][google.cloud.discoveryengine.v1.Session] to |
| 83 | + // update does not exist, a NOT_FOUND error is returned. |
| 84 | + rpc UpdateSession(UpdateSessionRequest) returns (Session) { |
| 85 | + option (google.api.http) = { |
| 86 | + patch: "/v1/{session.name=projects/*/locations/*/dataStores/*/sessions/*}" |
| 87 | + body: "session" |
| 88 | + additional_bindings { |
| 89 | + patch: "/v1/{session.name=projects/*/locations/*/collections/*/dataStores/*/sessions/*}" |
| 90 | + body: "session" |
| 91 | + } |
| 92 | + additional_bindings { |
| 93 | + patch: "/v1/{session.name=projects/*/locations/*/collections/*/engines/*/sessions/*}" |
| 94 | + body: "session" |
| 95 | + } |
| 96 | + }; |
| 97 | + option (google.api.method_signature) = "session,update_mask"; |
| 98 | + } |
| 99 | + |
| 100 | + // Gets a Session. |
| 101 | + rpc GetSession(GetSessionRequest) returns (Session) { |
| 102 | + option (google.api.http) = { |
| 103 | + get: "/v1/{name=projects/*/locations/*/dataStores/*/sessions/*}" |
| 104 | + additional_bindings { |
| 105 | + get: "/v1/{name=projects/*/locations/*/collections/*/dataStores/*/sessions/*}" |
| 106 | + } |
| 107 | + additional_bindings { |
| 108 | + get: "/v1/{name=projects/*/locations/*/collections/*/engines/*/sessions/*}" |
| 109 | + } |
| 110 | + }; |
| 111 | + option (google.api.method_signature) = "name"; |
| 112 | + } |
| 113 | + |
| 114 | + // Lists all Sessions by their parent |
| 115 | + // [DataStore][google.cloud.discoveryengine.v1.DataStore]. |
| 116 | + rpc ListSessions(ListSessionsRequest) returns (ListSessionsResponse) { |
| 117 | + option (google.api.http) = { |
| 118 | + get: "/v1/{parent=projects/*/locations/*/dataStores/*}/sessions" |
| 119 | + additional_bindings { |
| 120 | + get: "/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/sessions" |
| 121 | + } |
| 122 | + additional_bindings { |
| 123 | + get: "/v1/{parent=projects/*/locations/*/collections/*/engines/*}/sessions" |
| 124 | + } |
| 125 | + }; |
| 126 | + option (google.api.method_signature) = "parent"; |
| 127 | + } |
| 128 | +} |
0 commit comments