#[non_exhaustive]pub struct UpdateCustomClassRequest {
pub custom_class: Option<CustomClass>,
pub update_mask: Option<FieldMask>,
pub validate_only: bool,
/* private fields */
}Expand description
Request message for the UpdateCustomClass 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 update.
The CustomClass’s name field is used to identify the CustomClass to
update. Format:
projects/{project}/locations/{location}/customClasses/{custom_class}.
update_mask: Option<FieldMask>The list of fields to be updated. If empty, all fields are considered for update.
validate_only: boolIf set, validate the request and preview the updated CustomClass, but do not actually update it.
Implementations§
Source§impl UpdateCustomClassRequest
impl UpdateCustomClassRequest
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 = UpdateCustomClassRequest::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 = UpdateCustomClassRequest::new().set_or_clear_custom_class(Some(CustomClass::default()/* use setters */));
let x = UpdateCustomClassRequest::new().set_or_clear_custom_class(None::<CustomClass>);Sourcepub fn set_update_mask<T>(self, v: T) -> Self
pub fn set_update_mask<T>(self, v: T) -> Self
Sets the value of update_mask.
§Example
ⓘ
use wkt::FieldMask;
let x = UpdateCustomClassRequest::new().set_update_mask(FieldMask::default()/* use setters */);Sourcepub fn set_or_clear_update_mask<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_mask<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_mask.
§Example
ⓘ
use wkt::FieldMask;
let x = UpdateCustomClassRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
let x = UpdateCustomClassRequest::new().set_or_clear_update_mask(None::<FieldMask>);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 = UpdateCustomClassRequest::new().set_validate_only(true);Trait Implementations§
Source§impl Clone for UpdateCustomClassRequest
impl Clone for UpdateCustomClassRequest
Source§fn clone(&self) -> UpdateCustomClassRequest
fn clone(&self) -> UpdateCustomClassRequest
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 UpdateCustomClassRequest
impl Debug for UpdateCustomClassRequest
Source§impl Default for UpdateCustomClassRequest
impl Default for UpdateCustomClassRequest
Source§fn default() -> UpdateCustomClassRequest
fn default() -> UpdateCustomClassRequest
Returns the “default value” for a type. Read more
Source§impl Message for UpdateCustomClassRequest
impl Message for UpdateCustomClassRequest
Source§impl PartialEq for UpdateCustomClassRequest
impl PartialEq for UpdateCustomClassRequest
impl StructuralPartialEq for UpdateCustomClassRequest
Auto Trait Implementations§
impl Freeze for UpdateCustomClassRequest
impl RefUnwindSafe for UpdateCustomClassRequest
impl Send for UpdateCustomClassRequest
impl Sync for UpdateCustomClassRequest
impl Unpin for UpdateCustomClassRequest
impl UnwindSafe for UpdateCustomClassRequest
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