#[non_exhaustive]pub struct Conversation {
pub name: String,
pub state: State,
pub user_pseudo_id: String,
pub messages: Vec<ConversationMessage>,
pub start_time: Option<Timestamp>,
pub end_time: Option<Timestamp>,
/* private fields */
}Available on crate feature
conversational-search-service only.Expand description
External conversation 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}/dataStore/*/conversations/*
or
projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*.
state: StateThe state of the Conversation.
user_pseudo_id: StringA unique identifier for tracking users.
messages: Vec<ConversationMessage>Conversation messages.
start_time: Option<Timestamp>Output only. The time the conversation started.
end_time: Option<Timestamp>Output only. The time the conversation finished.
Implementations§
Source§impl Conversation
impl Conversation
pub fn new() -> 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
Sets the value of user_pseudo_id.
§Example
ⓘ
let x = Conversation::new().set_user_pseudo_id("example");Sourcepub fn set_messages<T, V>(self, v: T) -> Self
pub fn set_messages<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 = Conversation::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 = Conversation::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
let x = Conversation::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§
Source§impl Clone for Conversation
impl Clone for Conversation
Source§fn clone(&self) -> Conversation
fn clone(&self) -> Conversation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Conversation
impl Debug for Conversation
Source§impl Default for Conversation
impl Default for Conversation
Source§fn default() -> Conversation
fn default() -> Conversation
Returns the “default value” for a type. Read more
Source§impl Message for Conversation
impl Message for Conversation
Source§impl PartialEq for Conversation
impl PartialEq for Conversation
impl StructuralPartialEq for Conversation
Auto Trait Implementations§
impl Freeze for Conversation
impl RefUnwindSafe for Conversation
impl Send for Conversation
impl Sync for Conversation
impl Unpin for Conversation
impl UnwindSafe for Conversation
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