#[non_exhaustive]pub struct CreateRecognizerRequest {
pub recognizer: Option<Recognizer>,
pub validate_only: bool,
pub recognizer_id: String,
pub parent: String,
/* private fields */
}Expand description
Request message for the CreateRecognizer method.
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.recognizer: Option<Recognizer>Required. The Recognizer to create.
validate_only: boolIf set, validate the request and preview the Recognizer, but do not actually create it.
recognizer_id: StringThe ID to use for the Recognizer, which will become the final component of the Recognizer’s resource name.
This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.
parent: StringRequired. The project and location where this Recognizer will be created.
The expected format is projects/{project}/locations/{location}.
Implementations§
Source§impl CreateRecognizerRequest
impl CreateRecognizerRequest
pub fn new() -> Self
Sourcepub fn set_recognizer<T>(self, v: T) -> Selfwhere
T: Into<Recognizer>,
pub fn set_recognizer<T>(self, v: T) -> Selfwhere
T: Into<Recognizer>,
Sets the value of recognizer.
§Example
ⓘ
use google_cloud_speech_v2::model::Recognizer;
let x = CreateRecognizerRequest::new().set_recognizer(Recognizer::default()/* use setters */);Sourcepub fn set_or_clear_recognizer<T>(self, v: Option<T>) -> Selfwhere
T: Into<Recognizer>,
pub fn set_or_clear_recognizer<T>(self, v: Option<T>) -> Selfwhere
T: Into<Recognizer>,
Sets or clears the value of recognizer.
§Example
ⓘ
use google_cloud_speech_v2::model::Recognizer;
let x = CreateRecognizerRequest::new().set_or_clear_recognizer(Some(Recognizer::default()/* use setters */));
let x = CreateRecognizerRequest::new().set_or_clear_recognizer(None::<Recognizer>);Sourcepub fn set_validate_only<T: Into<bool>>(self, v: T) -> Self
pub fn set_validate_only<T: Into<bool>>(self, v: T) -> Self
Sets the value of validate_only.
§Example
ⓘ
let x = CreateRecognizerRequest::new().set_validate_only(true);Sourcepub fn set_recognizer_id<T: Into<String>>(self, v: T) -> Self
pub fn set_recognizer_id<T: Into<String>>(self, v: T) -> Self
Sets the value of recognizer_id.
§Example
ⓘ
let x = CreateRecognizerRequest::new().set_recognizer_id("example");Trait Implementations§
Source§impl Clone for CreateRecognizerRequest
impl Clone for CreateRecognizerRequest
Source§fn clone(&self) -> CreateRecognizerRequest
fn clone(&self) -> CreateRecognizerRequest
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 CreateRecognizerRequest
impl Debug for CreateRecognizerRequest
Source§impl Default for CreateRecognizerRequest
impl Default for CreateRecognizerRequest
Source§fn default() -> CreateRecognizerRequest
fn default() -> CreateRecognizerRequest
Returns the “default value” for a type. Read more
Source§impl Message for CreateRecognizerRequest
impl Message for CreateRecognizerRequest
Source§impl PartialEq for CreateRecognizerRequest
impl PartialEq for CreateRecognizerRequest
impl StructuralPartialEq for CreateRecognizerRequest
Auto Trait Implementations§
impl Freeze for CreateRecognizerRequest
impl RefUnwindSafe for CreateRecognizerRequest
impl Send for CreateRecognizerRequest
impl Sync for CreateRecognizerRequest
impl Unpin for CreateRecognizerRequest
impl UnwindSafe for CreateRecognizerRequest
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