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