#[non_exhaustive]pub struct RecognitionResponseMetadata {
pub request_id: String,
pub total_billed_duration: Option<Duration>,
pub prompt: Option<String>,
/* private fields */
}Expand description
Metadata about the recognition request and response.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.request_id: StringGlobal request identifier auto-generated by the API.
total_billed_duration: Option<Duration>When available, billed audio seconds for the corresponding request.
prompt: Option<String>Optional. Output only. Provides the prompt used for the recognition request.
Implementations§
Source§impl RecognitionResponseMetadata
impl RecognitionResponseMetadata
pub fn new() -> Self
Sourcepub fn set_request_id<T: Into<String>>(self, v: T) -> Self
pub fn set_request_id<T: Into<String>>(self, v: T) -> Self
Sets the value of request_id.
§Example
ⓘ
let x = RecognitionResponseMetadata::new().set_request_id("example");Sourcepub fn set_total_billed_duration<T>(self, v: T) -> Self
pub fn set_total_billed_duration<T>(self, v: T) -> Self
Sets the value of total_billed_duration.
§Example
ⓘ
use wkt::Duration;
let x = RecognitionResponseMetadata::new().set_total_billed_duration(Duration::default()/* use setters */);Sourcepub fn set_or_clear_total_billed_duration<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_total_billed_duration<T>(self, v: Option<T>) -> Self
Sets or clears the value of total_billed_duration.
§Example
ⓘ
use wkt::Duration;
let x = RecognitionResponseMetadata::new().set_or_clear_total_billed_duration(Some(Duration::default()/* use setters */));
let x = RecognitionResponseMetadata::new().set_or_clear_total_billed_duration(None::<Duration>);Sourcepub fn set_prompt<T>(self, v: T) -> Self
pub fn set_prompt<T>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for RecognitionResponseMetadata
impl Clone for RecognitionResponseMetadata
Source§fn clone(&self) -> RecognitionResponseMetadata
fn clone(&self) -> RecognitionResponseMetadata
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RecognitionResponseMetadata
impl Debug for RecognitionResponseMetadata
Source§impl Default for RecognitionResponseMetadata
impl Default for RecognitionResponseMetadata
Source§fn default() -> RecognitionResponseMetadata
fn default() -> RecognitionResponseMetadata
Returns the “default value” for a type. Read more
impl StructuralPartialEq for RecognitionResponseMetadata
Auto Trait Implementations§
impl Freeze for RecognitionResponseMetadata
impl RefUnwindSafe for RecognitionResponseMetadata
impl Send for RecognitionResponseMetadata
impl Sync for RecognitionResponseMetadata
impl Unpin for RecognitionResponseMetadata
impl UnwindSafe for RecognitionResponseMetadata
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
Mutably borrows from an owned value. Read more