#[non_exhaustive]pub struct UtteranceBotResponseBuilder { /* private fields */ }Expand description
A builder for UtteranceBotResponse.
Implementations§
source§impl UtteranceBotResponseBuilder
impl UtteranceBotResponseBuilder
sourcepub fn content(self, input: impl Into<String>) -> Self
pub fn content(self, input: impl Into<String>) -> Self
The text of the response to the utterance from the bot.
sourcepub fn set_content(self, input: Option<String>) -> Self
pub fn set_content(self, input: Option<String>) -> Self
The text of the response to the utterance from the bot.
sourcepub fn get_content(&self) -> &Option<String>
pub fn get_content(&self) -> &Option<String>
The text of the response to the utterance from the bot.
sourcepub fn content_type(self, input: UtteranceContentType) -> Self
pub fn content_type(self, input: UtteranceContentType) -> Self
The type of the response. The following values are possible:
-
PlainText– A plain text string. -
CustomPayload– A response string that you can customize to include data or metadata for your application. -
SSML– A string that includes Speech Synthesis Markup Language to customize the audio response. -
ImageResponseCard– An image with buttons that the customer can select. See ImageResponseCard for more information.
sourcepub fn set_content_type(self, input: Option<UtteranceContentType>) -> Self
pub fn set_content_type(self, input: Option<UtteranceContentType>) -> Self
The type of the response. The following values are possible:
-
PlainText– A plain text string. -
CustomPayload– A response string that you can customize to include data or metadata for your application. -
SSML– A string that includes Speech Synthesis Markup Language to customize the audio response. -
ImageResponseCard– An image with buttons that the customer can select. See ImageResponseCard for more information.
sourcepub fn get_content_type(&self) -> &Option<UtteranceContentType>
pub fn get_content_type(&self) -> &Option<UtteranceContentType>
The type of the response. The following values are possible:
-
PlainText– A plain text string. -
CustomPayload– A response string that you can customize to include data or metadata for your application. -
SSML– A string that includes Speech Synthesis Markup Language to customize the audio response. -
ImageResponseCard– An image with buttons that the customer can select. See ImageResponseCard for more information.
sourcepub fn image_response_card(self, input: ImageResponseCard) -> Self
pub fn image_response_card(self, input: ImageResponseCard) -> Self
A card that is shown to the user by a messaging platform. You define the contents of the card, the card is displayed by the platform.
When you use a response card, the response from the user is constrained to the text associated with a button on the card.
sourcepub fn set_image_response_card(self, input: Option<ImageResponseCard>) -> Self
pub fn set_image_response_card(self, input: Option<ImageResponseCard>) -> Self
A card that is shown to the user by a messaging platform. You define the contents of the card, the card is displayed by the platform.
When you use a response card, the response from the user is constrained to the text associated with a button on the card.
sourcepub fn get_image_response_card(&self) -> &Option<ImageResponseCard>
pub fn get_image_response_card(&self) -> &Option<ImageResponseCard>
A card that is shown to the user by a messaging platform. You define the contents of the card, the card is displayed by the platform.
When you use a response card, the response from the user is constrained to the text associated with a button on the card.
sourcepub fn build(self) -> UtteranceBotResponse
pub fn build(self) -> UtteranceBotResponse
Consumes the builder and constructs a UtteranceBotResponse.
Trait Implementations§
source§impl Clone for UtteranceBotResponseBuilder
impl Clone for UtteranceBotResponseBuilder
source§fn clone(&self) -> UtteranceBotResponseBuilder
fn clone(&self) -> UtteranceBotResponseBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for UtteranceBotResponseBuilder
impl Debug for UtteranceBotResponseBuilder
source§impl Default for UtteranceBotResponseBuilder
impl Default for UtteranceBotResponseBuilder
source§fn default() -> UtteranceBotResponseBuilder
fn default() -> UtteranceBotResponseBuilder
impl StructuralPartialEq for UtteranceBotResponseBuilder
Auto Trait Implementations§
impl Freeze for UtteranceBotResponseBuilder
impl RefUnwindSafe for UtteranceBotResponseBuilder
impl Send for UtteranceBotResponseBuilder
impl Sync for UtteranceBotResponseBuilder
impl Unpin for UtteranceBotResponseBuilder
impl UnwindSafe for UtteranceBotResponseBuilder
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more