#[non_exhaustive]pub struct SentimentAnalysisResult {
pub query_text_sentiment: Option<Sentiment>,
/* private fields */
}Available on crate features
answer-records or conversations or participants or sessions only.Expand description
The result of sentiment analysis. Sentiment analysis inspects user input and identifies the prevailing subjective opinion, especially to determine a user’s attitude as positive, negative, or neutral. For [DetectIntent][], it needs to be configured in DetectIntentRequest.query_params. For [StreamingDetectIntent][], it needs to be configured in StreamingDetectIntentRequest.query_params. And for Participants.AnalyzeContent and [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent], it needs to be configured in ConversationProfile.human_agent_assistant_config
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.query_text_sentiment: Option<Sentiment>The sentiment analysis result for query_text.
Implementations§
Source§impl SentimentAnalysisResult
impl SentimentAnalysisResult
pub fn new() -> Self
Sourcepub fn set_query_text_sentiment<T>(self, v: T) -> Self
pub fn set_query_text_sentiment<T>(self, v: T) -> Self
Sets the value of query_text_sentiment.
§Example
ⓘ
use google_cloud_dialogflow_v2::model::Sentiment;
let x = SentimentAnalysisResult::new().set_query_text_sentiment(Sentiment::default()/* use setters */);Sourcepub fn set_or_clear_query_text_sentiment<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_query_text_sentiment<T>(self, v: Option<T>) -> Self
Sets or clears the value of query_text_sentiment.
§Example
ⓘ
use google_cloud_dialogflow_v2::model::Sentiment;
let x = SentimentAnalysisResult::new().set_or_clear_query_text_sentiment(Some(Sentiment::default()/* use setters */));
let x = SentimentAnalysisResult::new().set_or_clear_query_text_sentiment(None::<Sentiment>);Trait Implementations§
Source§impl Clone for SentimentAnalysisResult
impl Clone for SentimentAnalysisResult
Source§fn clone(&self) -> SentimentAnalysisResult
fn clone(&self) -> SentimentAnalysisResult
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 SentimentAnalysisResult
impl Debug for SentimentAnalysisResult
Source§impl Default for SentimentAnalysisResult
impl Default for SentimentAnalysisResult
Source§fn default() -> SentimentAnalysisResult
fn default() -> SentimentAnalysisResult
Returns the “default value” for a type. Read more
Source§impl Message for SentimentAnalysisResult
impl Message for SentimentAnalysisResult
Source§impl PartialEq for SentimentAnalysisResult
impl PartialEq for SentimentAnalysisResult
impl StructuralPartialEq for SentimentAnalysisResult
Auto Trait Implementations§
impl Freeze for SentimentAnalysisResult
impl RefUnwindSafe for SentimentAnalysisResult
impl Send for SentimentAnalysisResult
impl Sync for SentimentAnalysisResult
impl Unpin for SentimentAnalysisResult
impl UnwindSafe for SentimentAnalysisResult
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