#[non_exhaustive]pub struct Message {
pub name: String,
pub content: String,
pub language_code: String,
pub participant: String,
pub participant_role: Role,
pub create_time: Option<Timestamp>,
pub send_time: Option<Timestamp>,
pub message_annotation: Option<MessageAnnotation>,
pub sentiment_analysis: Option<SentimentAnalysisResult>,
/* private fields */
}conversations or participants only.Expand description
Represents a message posted into a conversation.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringOptional. The unique identifier of the message.
Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/messages/<Message ID>.
content: StringRequired. The message content.
language_code: StringOptional. The message language. This should be a BCP-47 language tag. Example: “en-US”.
participant: StringOutput only. The participant that sends this message.
participant_role: RoleOutput only. The role of the participant.
create_time: Option<Timestamp>Output only. The time when the message was created in Contact Center AI.
send_time: Option<Timestamp>Optional. The time when the message was sent. For voice messages, this is the time when an utterance started.
message_annotation: Option<MessageAnnotation>Output only. The annotation for the message.
sentiment_analysis: Option<SentimentAnalysisResult>Output only. The sentiment analysis result for the message.
Implementations§
Source§impl Message
impl Message
Sourcepub fn set_content<T: Into<String>>(self, v: T) -> Self
pub fn set_content<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_language_code<T: Into<String>>(self, v: T) -> Self
pub fn set_language_code<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_participant<T: Into<String>>(self, v: T) -> Self
pub fn set_participant<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_participant_role<T: Into<Role>>(self, v: T) -> Self
pub fn set_participant_role<T: Into<Role>>(self, v: T) -> Self
Sets the value of participant_role.
§Example
use google_cloud_dialogflow_v2::model::participant::Role;
let x0 = Message::new().set_participant_role(Role::HumanAgent);
let x1 = Message::new().set_participant_role(Role::AutomatedAgent);
let x2 = Message::new().set_participant_role(Role::EndUser);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 = Message::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 = Message::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Message::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_send_time<T>(self, v: T) -> Self
pub fn set_send_time<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_send_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_send_time<T>(self, v: Option<T>) -> Self
Sourcepub fn set_message_annotation<T>(self, v: T) -> Selfwhere
T: Into<MessageAnnotation>,
pub fn set_message_annotation<T>(self, v: T) -> Selfwhere
T: Into<MessageAnnotation>,
Sets the value of message_annotation.
§Example
use google_cloud_dialogflow_v2::model::MessageAnnotation;
let x = Message::new().set_message_annotation(MessageAnnotation::default()/* use setters */);Sourcepub fn set_or_clear_message_annotation<T>(self, v: Option<T>) -> Selfwhere
T: Into<MessageAnnotation>,
pub fn set_or_clear_message_annotation<T>(self, v: Option<T>) -> Selfwhere
T: Into<MessageAnnotation>,
Sets or clears the value of message_annotation.
§Example
use google_cloud_dialogflow_v2::model::MessageAnnotation;
let x = Message::new().set_or_clear_message_annotation(Some(MessageAnnotation::default()/* use setters */));
let x = Message::new().set_or_clear_message_annotation(None::<MessageAnnotation>);Sourcepub fn set_sentiment_analysis<T>(self, v: T) -> Selfwhere
T: Into<SentimentAnalysisResult>,
pub fn set_sentiment_analysis<T>(self, v: T) -> Selfwhere
T: Into<SentimentAnalysisResult>,
Sets the value of sentiment_analysis.
§Example
use google_cloud_dialogflow_v2::model::SentimentAnalysisResult;
let x = Message::new().set_sentiment_analysis(SentimentAnalysisResult::default()/* use setters */);Sourcepub fn set_or_clear_sentiment_analysis<T>(self, v: Option<T>) -> Selfwhere
T: Into<SentimentAnalysisResult>,
pub fn set_or_clear_sentiment_analysis<T>(self, v: Option<T>) -> Selfwhere
T: Into<SentimentAnalysisResult>,
Sets or clears the value of sentiment_analysis.
§Example
use google_cloud_dialogflow_v2::model::SentimentAnalysisResult;
let x = Message::new().set_or_clear_sentiment_analysis(Some(SentimentAnalysisResult::default()/* use setters */));
let x = Message::new().set_or_clear_sentiment_analysis(None::<SentimentAnalysisResult>);Trait Implementations§
impl StructuralPartialEq for Message
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnsafeUnpin for Message
impl UnwindSafe for Message
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request