#[non_exhaustive]pub struct ConversationMessage {
pub create_time: Option<Timestamp>,
pub message: Option<Message>,
/* private fields */
}Available on crate feature
conversational-search-service only.Expand description
Defines a conversation message.
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.create_time: Option<Timestamp>Output only. Message creation timestamp.
message: Option<Message>Implementations§
Source§impl ConversationMessage
impl ConversationMessage
pub fn new() -> Self
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
ⓘ
use wkt::Timestamp;
let x = ConversationMessage::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
ⓘ
use wkt::Timestamp;
let x = ConversationMessage::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = ConversationMessage::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_message<T: Into<Option<Message>>>(self, v: T) -> Self
pub fn set_message<T: Into<Option<Message>>>(self, v: T) -> Self
Sets the value of message.
Note that all the setters affecting message are mutually
exclusive.
§Example
ⓘ
use google_cloud_discoveryengine_v1::model::TextInput;
let x = ConversationMessage::new().set_message(Some(
google_cloud_discoveryengine_v1::model::conversation_message::Message::UserInput(TextInput::default().into())));Sourcepub fn user_input(&self) -> Option<&Box<TextInput>>
pub fn user_input(&self) -> Option<&Box<TextInput>>
The value of message
if it holds a UserInput, None if the field is not set or
holds a different branch.
Sourcepub fn set_user_input<T: Into<Box<TextInput>>>(self, v: T) -> Self
pub fn set_user_input<T: Into<Box<TextInput>>>(self, v: T) -> Self
Sets the value of message
to hold a UserInput.
Note that all the setters affecting message are
mutually exclusive.
§Example
ⓘ
use google_cloud_discoveryengine_v1::model::TextInput;
let x = ConversationMessage::new().set_user_input(TextInput::default()/* use setters */);
assert!(x.user_input().is_some());
assert!(x.reply().is_none());Sourcepub fn reply(&self) -> Option<&Box<Reply>>
pub fn reply(&self) -> Option<&Box<Reply>>
The value of message
if it holds a Reply, None if the field is not set or
holds a different branch.
Sourcepub fn set_reply<T: Into<Box<Reply>>>(self, v: T) -> Self
pub fn set_reply<T: Into<Box<Reply>>>(self, v: T) -> Self
Sets the value of message
to hold a Reply.
Note that all the setters affecting message are
mutually exclusive.
§Example
ⓘ
use google_cloud_discoveryengine_v1::model::Reply;
let x = ConversationMessage::new().set_reply(Reply::default()/* use setters */);
assert!(x.reply().is_some());
assert!(x.user_input().is_none());Trait Implementations§
Source§impl Clone for ConversationMessage
impl Clone for ConversationMessage
Source§fn clone(&self) -> ConversationMessage
fn clone(&self) -> ConversationMessage
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 ConversationMessage
impl Debug for ConversationMessage
Source§impl Default for ConversationMessage
impl Default for ConversationMessage
Source§fn default() -> ConversationMessage
fn default() -> ConversationMessage
Returns the “default value” for a type. Read more
Source§impl Message for ConversationMessage
impl Message for ConversationMessage
Source§impl PartialEq for ConversationMessage
impl PartialEq for ConversationMessage
impl StructuralPartialEq for ConversationMessage
Auto Trait Implementations§
impl Freeze for ConversationMessage
impl RefUnwindSafe for ConversationMessage
impl Send for ConversationMessage
impl Sync for ConversationMessage
impl Unpin for ConversationMessage
impl UnwindSafe for ConversationMessage
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