googleapis/google/cloud/discoveryengine/v1beta/session.proto
Google APIs f054d2af61 feat(discoveryengine): regenerate v1beta proto snapshot for feature parity with v1
Publishes the full v1beta API surface including services and methods present
in v1main but missing from the stale v1beta snapshot (engine_service,
control_service, data_store_service, project_service, site_search_engine_service,
rank_service, grounded_generation_service, search_tuning_service, etc.),
plus v1beta-specific fields like region_code on SearchRequest.

PiperOrigin-RevId: 932931724
2026-06-16 00:57:55 -07:00

154 lines
6 KiB
Protocol Buffer

// Copyright 2026 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.v1beta;
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/discoveryengine/v1beta/answer.proto";
import "google/cloud/discoveryengine/v1beta/assist_answer.proto";
import "google/protobuf/timestamp.proto";
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta";
option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb";
option java_multiple_files = true;
option java_outer_classname = "SessionProto";
option java_package = "com.google.cloud.discoveryengine.v1beta";
option objc_class_prefix = "DISCOVERYENGINE";
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta";
option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta";
// External session proto definition.
message Session {
option (google.api.resource) = {
type: "discoveryengine.googleapis.com/Session"
pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}"
pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}"
pattern: "projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}"
pattern: "projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/collaborativeProjects/{collaborative_project}/sessions/{session}"
plural: "sessions"
singular: "session"
};
// Represents a turn, including a query from the user and a
// answer from service.
message Turn {
// Optional. The user query. May not be set if this turn is merely
// regenerating an answer to a different turn
Query query = 1 [(google.api.field_behavior) = OPTIONAL];
// Optional. The resource name of the answer to the user query.
//
// Only set if the answer generation (/answer API call) happened in this
// turn.
string answer = 2 [
(google.api.field_behavior) = OPTIONAL,
(google.api.resource_reference) = {
type: "discoveryengine.googleapis.com/Answer"
}
];
// Output only. In
// [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetSession]
// API, if
// [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1beta.GetSessionRequest.include_answer_details]
// is set to true, this field will be populated when getting answer query
// session.
Answer detailed_answer = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. In
// [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetSession]
// API, if
// [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1beta.GetSessionRequest.include_answer_details]
// is set to true, this field will be populated when getting assistant
// session.
AssistAnswer detailed_assist_answer = 8
[(google.api.field_behavior) = OUTPUT_ONLY];
// Optional. Represents metadata related to the query config, for example
// LLM model and version used, model parameters (temperature, grounding
// parameters, etc.). The prefix "google." is reserved for Google-developed
// functionality.
map<string, string> query_config = 16
[(google.api.field_behavior) = OPTIONAL];
// Optional. Indicates whether this turn is a live turn.
bool live = 20 [(google.api.field_behavior) = OPTIONAL];
}
// Enumeration of the state of the session.
enum State {
// State is unspecified.
STATE_UNSPECIFIED = 0;
// The session is currently open.
IN_PROGRESS = 1;
}
// Immutable. Fully qualified name
// `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`
string name = 1 [(google.api.field_behavior) = IMMUTABLE];
// Optional. The display name of the session.
//
// This field is used to identify the session in the UI.
// By default, the display name is the first turn query text in the session.
string display_name = 7 [(google.api.field_behavior) = OPTIONAL];
// The state of the session.
State state = 2;
// A unique identifier for tracking users.
string user_pseudo_id = 3;
// Turns.
repeated Turn turns = 4;
// Optional. The labels for the session.
// Can be set as filter in ListSessionsRequest.
repeated string labels = 9 [(google.api.field_behavior) = OPTIONAL];
// Output only. The time the session started.
google.protobuf.Timestamp start_time = 5
[(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The time the session finished.
google.protobuf.Timestamp end_time = 6
[(google.api.field_behavior) = OUTPUT_ONLY];
// Optional. Whether the session is pinned, pinned session will be displayed
// on the top of the session list.
bool is_pinned = 8 [(google.api.field_behavior) = OPTIONAL];
// Output only. Full resource name of an in-progress AsyncAssist operation for
// this session, e.g.
// `projects/*/locations/*/collections/*/engines/*/sessions/*/operations/*`.
// Set when the operation starts and cleared when it finishes.
string pending_async_assist_operation_id = 22
[(google.api.field_behavior) = OUTPUT_ONLY];
}
// Defines a user inputed query.
message Query {
// Query content.
oneof content {
// Plain text.
string text = 2;
}
// Output only. Unique Id for the query.
string query_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
}