Struct google_api_proto::google::actions::sdk::v2::conversation::Prompt
source · pub struct Prompt {
pub append: bool,
pub override: bool,
pub first_simple: Option<Simple>,
pub content: Option<Content>,
pub last_simple: Option<Simple>,
pub suggestions: Vec<Suggestion>,
pub link: Option<Link>,
pub canvas: Option<Canvas>,
}
Expand description
Represent a response to a user.
Fields§
§append: bool
Optional. Mode for how this messages should be merged with previously defined messages. “false” will clear all previously defined messages (first and last simple, content, suggestions link and canvas) and add messages defined in this prompt. “true” will add messages defined in this prompt to messages defined in previous responses. Setting this field to “true” will also enable appending to some fields inside Simple prompts, the Suggestion prompt and the Canvas prompt (part of the Content prompt). The Content and Link messages will always be overwritten if defined in the prompt. Default value is “false”.
override: bool
Optional. Mode for how this messages should be merged with previously defined messages. “true” clears all previously defined messages (first and last simple, content, suggestions link and canvas) and adds messages defined in this prompt. “false” adds messages defined in this prompt to messages defined in previous responses. Leaving this field to “false” also enables appending to some fields inside Simple prompts, the Suggestions prompt, and the Canvas prompt (part of the Content prompt). The Content and Link messages are always overwritten if defined in the prompt. Default value is “false”.
first_simple: Option<Simple>
Optional. The first voice and text-only response.
content: Option<Content>
Optional. A content like a card, list or media to display to the user.
last_simple: Option<Simple>
Optional. The last voice and text-only response.
suggestions: Vec<Suggestion>
Optional. Suggestions to be displayed to the user which will always appear at the end of the response. If the “override” field in the containing prompt is “false”, the titles defined in this field will be added to titles defined in any previously defined suggestions prompts and duplicate values will be removed.
link: Option<Link>
Optional. An additional suggestion chip that can link out to the associated app
or site.
The chip will be rendered with the title “Open
canvas: Option<Canvas>
Optional. Represents a Interactive Canvas response to be sent to the user.
Trait Implementations§
source§impl Message for Prompt
impl Message for Prompt
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for Prompt
impl PartialEq for Prompt
impl StructuralPartialEq for Prompt
Auto Trait Implementations§
impl Freeze for Prompt
impl RefUnwindSafe for Prompt
impl Send for Prompt
impl Sync for Prompt
impl Unpin for Prompt
impl UnwindSafe for Prompt
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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