#[non_exhaustive]pub struct AudioInputEventBuilder { /* private fields */ }Expand description
A builder for AudioInputEvent.
Implementations§
source§impl AudioInputEventBuilder
impl AudioInputEventBuilder
sourcepub fn audio_chunk(self, input: Blob) -> Self
pub fn audio_chunk(self, input: Blob) -> Self
An encoded stream of audio.
sourcepub fn set_audio_chunk(self, input: Option<Blob>) -> Self
pub fn set_audio_chunk(self, input: Option<Blob>) -> Self
An encoded stream of audio.
sourcepub fn get_audio_chunk(&self) -> &Option<Blob>
pub fn get_audio_chunk(&self) -> &Option<Blob>
An encoded stream of audio.
sourcepub fn content_type(self, input: impl Into<String>) -> Self
pub fn content_type(self, input: impl Into<String>) -> Self
The encoding used for the audio chunk. You must use 8 KHz PCM 16-bit mono-channel little-endian format. The value of the field should be:
audio/lpcm; sample-rate=8000; sample-size-bits=16; channel-count=1; is-big-endian=false
sourcepub fn set_content_type(self, input: Option<String>) -> Self
pub fn set_content_type(self, input: Option<String>) -> Self
The encoding used for the audio chunk. You must use 8 KHz PCM 16-bit mono-channel little-endian format. The value of the field should be:
audio/lpcm; sample-rate=8000; sample-size-bits=16; channel-count=1; is-big-endian=false
sourcepub fn get_content_type(&self) -> &Option<String>
pub fn get_content_type(&self) -> &Option<String>
The encoding used for the audio chunk. You must use 8 KHz PCM 16-bit mono-channel little-endian format. The value of the field should be:
audio/lpcm; sample-rate=8000; sample-size-bits=16; channel-count=1; is-big-endian=false
sourcepub fn event_id(self, input: impl Into<String>) -> Self
pub fn event_id(self, input: impl Into<String>) -> Self
A unique identifier that your application assigns to the event. You can use this to identify events in logs.
sourcepub fn set_event_id(self, input: Option<String>) -> Self
pub fn set_event_id(self, input: Option<String>) -> Self
A unique identifier that your application assigns to the event. You can use this to identify events in logs.
sourcepub fn get_event_id(&self) -> &Option<String>
pub fn get_event_id(&self) -> &Option<String>
A unique identifier that your application assigns to the event. You can use this to identify events in logs.
sourcepub fn client_timestamp_millis(self, input: i64) -> Self
pub fn client_timestamp_millis(self, input: i64) -> Self
A timestamp set by the client of the date and time that the event was sent to Amazon Lex V2.
sourcepub fn set_client_timestamp_millis(self, input: Option<i64>) -> Self
pub fn set_client_timestamp_millis(self, input: Option<i64>) -> Self
A timestamp set by the client of the date and time that the event was sent to Amazon Lex V2.
sourcepub fn get_client_timestamp_millis(&self) -> &Option<i64>
pub fn get_client_timestamp_millis(&self) -> &Option<i64>
A timestamp set by the client of the date and time that the event was sent to Amazon Lex V2.
sourcepub fn build(self) -> Result<AudioInputEvent, BuildError>
pub fn build(self) -> Result<AudioInputEvent, BuildError>
Consumes the builder and constructs a AudioInputEvent.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for AudioInputEventBuilder
impl Clone for AudioInputEventBuilder
source§fn clone(&self) -> AudioInputEventBuilder
fn clone(&self) -> AudioInputEventBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for AudioInputEventBuilder
impl Debug for AudioInputEventBuilder
source§impl Default for AudioInputEventBuilder
impl Default for AudioInputEventBuilder
source§fn default() -> AudioInputEventBuilder
fn default() -> AudioInputEventBuilder
source§impl PartialEq for AudioInputEventBuilder
impl PartialEq for AudioInputEventBuilder
source§fn eq(&self, other: &AudioInputEventBuilder) -> bool
fn eq(&self, other: &AudioInputEventBuilder) -> bool
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for AudioInputEventBuilder
Auto Trait Implementations§
impl Freeze for AudioInputEventBuilder
impl RefUnwindSafe for AudioInputEventBuilder
impl Send for AudioInputEventBuilder
impl Sync for AudioInputEventBuilder
impl Unpin for AudioInputEventBuilder
impl UnwindSafe for AudioInputEventBuilder
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> 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