#[non_exhaustive]pub struct StreamingSynthesisInput {
pub prompt: Option<String>,
pub input_source: Option<InputSource>,
/* private fields */
}Expand description
Input to be synthesized.
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.prompt: Option<String>This is system instruction supported only for controllable voice models.
input_source: Option<InputSource>Implementations§
Source§impl StreamingSynthesisInput
impl StreamingSynthesisInput
Sourcepub fn set_prompt<T>(self, v: T) -> Self
pub fn set_prompt<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_prompt<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_prompt<T>(self, v: Option<T>) -> Self
Sourcepub fn set_input_source<T: Into<Option<InputSource>>>(self, v: T) -> Self
pub fn set_input_source<T: Into<Option<InputSource>>>(self, v: T) -> Self
Sets the value of input_source.
Note that all the setters affecting input_source are mutually
exclusive.
§Example
use google_cloud_texttospeech_v1::model::streaming_synthesis_input::InputSource;
let x = StreamingSynthesisInput::new().set_input_source(Some(InputSource::Text("example".to_string())));Sourcepub fn text(&self) -> Option<&String>
pub fn text(&self) -> Option<&String>
The value of input_source
if it holds a Text, None if the field is not set or
holds a different branch.
Sourcepub fn set_text<T: Into<String>>(self, v: T) -> Self
pub fn set_text<T: Into<String>>(self, v: T) -> Self
Sets the value of input_source
to hold a Text.
Note that all the setters affecting input_source are
mutually exclusive.
§Example
let x = StreamingSynthesisInput::new().set_text("example");
assert!(x.text().is_some());
assert!(x.markup().is_none());
assert!(x.multi_speaker_markup().is_none());Sourcepub fn markup(&self) -> Option<&String>
pub fn markup(&self) -> Option<&String>
The value of input_source
if it holds a Markup, None if the field is not set or
holds a different branch.
Sourcepub fn set_markup<T: Into<String>>(self, v: T) -> Self
pub fn set_markup<T: Into<String>>(self, v: T) -> Self
Sets the value of input_source
to hold a Markup.
Note that all the setters affecting input_source are
mutually exclusive.
§Example
let x = StreamingSynthesisInput::new().set_markup("example");
assert!(x.markup().is_some());
assert!(x.text().is_none());
assert!(x.multi_speaker_markup().is_none());Sourcepub fn multi_speaker_markup(&self) -> Option<&Box<MultiSpeakerMarkup>>
pub fn multi_speaker_markup(&self) -> Option<&Box<MultiSpeakerMarkup>>
The value of input_source
if it holds a MultiSpeakerMarkup, None if the field is not set or
holds a different branch.
Sourcepub fn set_multi_speaker_markup<T: Into<Box<MultiSpeakerMarkup>>>(
self,
v: T,
) -> Self
pub fn set_multi_speaker_markup<T: Into<Box<MultiSpeakerMarkup>>>( self, v: T, ) -> Self
Sets the value of input_source
to hold a MultiSpeakerMarkup.
Note that all the setters affecting input_source are
mutually exclusive.
§Example
use google_cloud_texttospeech_v1::model::MultiSpeakerMarkup;
let x = StreamingSynthesisInput::new().set_multi_speaker_markup(MultiSpeakerMarkup::default()/* use setters */);
assert!(x.multi_speaker_markup().is_some());
assert!(x.text().is_none());
assert!(x.markup().is_none());Trait Implementations§
Source§impl Clone for StreamingSynthesisInput
impl Clone for StreamingSynthesisInput
Source§fn clone(&self) -> StreamingSynthesisInput
fn clone(&self) -> StreamingSynthesisInput
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StreamingSynthesisInput
impl Debug for StreamingSynthesisInput
Source§impl Default for StreamingSynthesisInput
impl Default for StreamingSynthesisInput
Source§fn default() -> StreamingSynthesisInput
fn default() -> StreamingSynthesisInput
Source§impl Message for StreamingSynthesisInput
impl Message for StreamingSynthesisInput
Source§impl PartialEq for StreamingSynthesisInput
impl PartialEq for StreamingSynthesisInput
Source§fn eq(&self, other: &StreamingSynthesisInput) -> bool
fn eq(&self, other: &StreamingSynthesisInput) -> bool
self and other values to be equal, and is used by ==.