#[non_exhaustive]pub struct SuggestSmartRepliesRequest {
pub parent: String,
pub current_text_input: Option<TextInput>,
pub latest_message: String,
pub context_size: i32,
/* private fields */
}participants only.Expand description
The request message for Participants.SuggestSmartReplies.
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.parent: StringRequired. The name of the participant to fetch suggestion for.
Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.
current_text_input: Option<TextInput>The current natural language text segment to compile suggestion for. This provides a way for user to get follow up smart reply suggestion after a smart reply selection, without sending a text message.
latest_message: StringThe name of the latest conversation message to compile suggestion for. If empty, it will be the latest message of the conversation.
Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/messages/<Message ID>.
context_size: i32Max number of messages prior to and including [latest_message] to use as context when compiling the suggestion. By default 20 and at most 50.
Implementations§
Source§impl SuggestSmartRepliesRequest
impl SuggestSmartRepliesRequest
pub fn new() -> Self
Sourcepub fn set_parent<T: Into<String>>(self, v: T) -> Self
pub fn set_parent<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_current_text_input<T>(self, v: T) -> Self
pub fn set_current_text_input<T>(self, v: T) -> Self
Sets the value of current_text_input.
§Example
use google_cloud_dialogflow_v2::model::TextInput;
let x = SuggestSmartRepliesRequest::new().set_current_text_input(TextInput::default()/* use setters */);Sourcepub fn set_or_clear_current_text_input<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_current_text_input<T>(self, v: Option<T>) -> Self
Sets or clears the value of current_text_input.
§Example
use google_cloud_dialogflow_v2::model::TextInput;
let x = SuggestSmartRepliesRequest::new().set_or_clear_current_text_input(Some(TextInput::default()/* use setters */));
let x = SuggestSmartRepliesRequest::new().set_or_clear_current_text_input(None::<TextInput>);Sourcepub fn set_latest_message<T: Into<String>>(self, v: T) -> Self
pub fn set_latest_message<T: Into<String>>(self, v: T) -> Self
Sets the value of latest_message.
§Example
let x = SuggestSmartRepliesRequest::new().set_latest_message("example");Sourcepub fn set_context_size<T: Into<i32>>(self, v: T) -> Self
pub fn set_context_size<T: Into<i32>>(self, v: T) -> Self
Sets the value of context_size.
§Example
let x = SuggestSmartRepliesRequest::new().set_context_size(42);Trait Implementations§
Source§impl Clone for SuggestSmartRepliesRequest
impl Clone for SuggestSmartRepliesRequest
Source§fn clone(&self) -> SuggestSmartRepliesRequest
fn clone(&self) -> SuggestSmartRepliesRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more