#[non_exhaustive]pub struct CreateCustomClassRequest {
pub custom_class: Option<CustomClass>,
pub validate_only: bool,
pub custom_class_id: String,
pub parent: String,
/* private fields */
}Expand description
Request message for the CreateCustomClass 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.custom_class: Option<CustomClass>Required. The CustomClass to create.
validate_only: boolIf set, validate the request and preview the CustomClass, but do not actually create it.
custom_class_id: StringThe ID to use for the CustomClass, which will become the final component of the CustomClass’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 CustomClass will be created.
The expected format is projects/{project}/locations/{location}.
Implementations§
Source§impl CreateCustomClassRequest
impl CreateCustomClassRequest
pub fn new() -> Self
Sourcepub fn set_custom_class<T>(self, v: T) -> Selfwhere
T: Into<CustomClass>,
pub fn set_custom_class<T>(self, v: T) -> Selfwhere
T: Into<CustomClass>,
Sets the value of custom_class.
§Example
ⓘ
use google_cloud_speech_v2::model::CustomClass;
let x = CreateCustomClassRequest::new().set_custom_class(CustomClass::default()/* use setters */);Sourcepub fn set_or_clear_custom_class<T>(self, v: Option<T>) -> Selfwhere
T: Into<CustomClass>,
pub fn set_or_clear_custom_class<T>(self, v: Option<T>) -> Selfwhere
T: Into<CustomClass>,
Sets or clears the value of custom_class.
§Example
ⓘ
use google_cloud_speech_v2::model::CustomClass;
let x = CreateCustomClassRequest::new().set_or_clear_custom_class(Some(CustomClass::default()/* use setters */));
let x = CreateCustomClassRequest::new().set_or_clear_custom_class(None::<CustomClass>);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 = CreateCustomClassRequest::new().set_validate_only(true);Sourcepub fn set_custom_class_id<T: Into<String>>(self, v: T) -> Self
pub fn set_custom_class_id<T: Into<String>>(self, v: T) -> Self
Sets the value of custom_class_id.
§Example
ⓘ
let x = CreateCustomClassRequest::new().set_custom_class_id("example");Trait Implementations§
Source§impl Clone for CreateCustomClassRequest
impl Clone for CreateCustomClassRequest
Source§fn clone(&self) -> CreateCustomClassRequest
fn clone(&self) -> CreateCustomClassRequest
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 CreateCustomClassRequest
impl Debug for CreateCustomClassRequest
Source§impl Default for CreateCustomClassRequest
impl Default for CreateCustomClassRequest
Source§fn default() -> CreateCustomClassRequest
fn default() -> CreateCustomClassRequest
Returns the “default value” for a type. Read more
Source§impl Message for CreateCustomClassRequest
impl Message for CreateCustomClassRequest
Source§impl PartialEq for CreateCustomClassRequest
impl PartialEq for CreateCustomClassRequest
impl StructuralPartialEq for CreateCustomClassRequest
Auto Trait Implementations§
impl Freeze for CreateCustomClassRequest
impl RefUnwindSafe for CreateCustomClassRequest
impl Send for CreateCustomClassRequest
impl Sync for CreateCustomClassRequest
impl Unpin for CreateCustomClassRequest
impl UnwindSafe for CreateCustomClassRequest
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