#[non_exhaustive]pub struct Session {
pub name: String,
pub display_name: String,
pub state: State,
pub user_pseudo_id: String,
pub turns: Vec<Turn>,
pub labels: Vec<String>,
pub start_time: Option<Timestamp>,
pub end_time: Option<Timestamp>,
pub is_pinned: bool,
/* private fields */
}Available on crate features
conversational-search-service or session-service only.Expand description
External session proto definition.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringImmutable. Fully qualified name
projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*
display_name: StringOptional. 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.
state: StateThe state of the session.
user_pseudo_id: StringA unique identifier for tracking users.
turns: Vec<Turn>Turns.
labels: Vec<String>Optional. The labels for the session. Can be set as filter in ListSessionsRequest.
start_time: Option<Timestamp>Output only. The time the session started.
end_time: Option<Timestamp>Output only. The time the session finished.
is_pinned: boolOptional. Whether the session is pinned, pinned session will be displayed on the top of the session list.
Implementations§
Source§impl Session
impl Session
pub fn new() -> Self
Sourcepub fn set_display_name<T: Into<String>>(self, v: T) -> Self
pub fn set_display_name<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_user_pseudo_id<T: Into<String>>(self, v: T) -> Self
pub fn set_user_pseudo_id<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_labels<T, V>(self, v: T) -> Self
pub fn set_labels<T, V>(self, v: T) -> Self
Sourcepub fn set_start_time<T>(self, v: T) -> Self
pub fn set_start_time<T>(self, v: T) -> Self
Sets the value of start_time.
§Example
ⓘ
use wkt::Timestamp;
let x = Session::new().set_start_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_start_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_start_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of start_time.
§Example
ⓘ
use wkt::Timestamp;
let x = Session::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
let x = Session::new().set_or_clear_start_time(None::<Timestamp>);Sourcepub fn set_end_time<T>(self, v: T) -> Self
pub fn set_end_time<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_end_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_end_time<T>(self, v: Option<T>) -> Self
Trait Implementations§
impl StructuralPartialEq for Session
Auto Trait Implementations§
impl Freeze for Session
impl RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnwindSafe for Session
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more