#[non_exhaustive]pub struct TrainProcessorVersionRequest {
pub parent: String,
pub processor_version: Option<ProcessorVersion>,
pub document_schema: Option<DocumentSchema>,
pub input_data: Option<InputData>,
pub base_processor_version: String,
pub processor_flags: Option<ProcessorFlags>,
/* private fields */
}Expand description
Request message for the TrainProcessorVersion method.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.parent: StringRequired. The parent (project, location and processor) to create the new
version for. Format:
projects/{project}/locations/{location}/processors/{processor}.
processor_version: Option<ProcessorVersion>Required. The processor version to be created.
document_schema: Option<DocumentSchema>Optional. The schema the processor version will be trained with.
input_data: Option<InputData>Optional. The input data used to train the ProcessorVersion.
base_processor_version: StringOptional. The processor version to use as a base for training. This
processor version must be a child of parent. Format:
projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}.
processor_flags: Option<ProcessorFlags>Implementations§
Source§impl TrainProcessorVersionRequest
impl TrainProcessorVersionRequest
Sourcepub fn set_parent<T: Into<String>>(self, v: T) -> Self
pub fn set_parent<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_processor_version<T>(self, v: T) -> Selfwhere
T: Into<ProcessorVersion>,
pub fn set_processor_version<T>(self, v: T) -> Selfwhere
T: Into<ProcessorVersion>,
Sets the value of processor_version.
§Example
use google_cloud_documentai_v1::model::ProcessorVersion;
let x = TrainProcessorVersionRequest::new().set_processor_version(ProcessorVersion::default()/* use setters */);Sourcepub fn set_or_clear_processor_version<T>(self, v: Option<T>) -> Selfwhere
T: Into<ProcessorVersion>,
pub fn set_or_clear_processor_version<T>(self, v: Option<T>) -> Selfwhere
T: Into<ProcessorVersion>,
Sets or clears the value of processor_version.
§Example
use google_cloud_documentai_v1::model::ProcessorVersion;
let x = TrainProcessorVersionRequest::new().set_or_clear_processor_version(Some(ProcessorVersion::default()/* use setters */));
let x = TrainProcessorVersionRequest::new().set_or_clear_processor_version(None::<ProcessorVersion>);Sourcepub fn set_document_schema<T>(self, v: T) -> Selfwhere
T: Into<DocumentSchema>,
pub fn set_document_schema<T>(self, v: T) -> Selfwhere
T: Into<DocumentSchema>,
Sets the value of document_schema.
§Example
use google_cloud_documentai_v1::model::DocumentSchema;
let x = TrainProcessorVersionRequest::new().set_document_schema(DocumentSchema::default()/* use setters */);Sourcepub fn set_or_clear_document_schema<T>(self, v: Option<T>) -> Selfwhere
T: Into<DocumentSchema>,
pub fn set_or_clear_document_schema<T>(self, v: Option<T>) -> Selfwhere
T: Into<DocumentSchema>,
Sets or clears the value of document_schema.
§Example
use google_cloud_documentai_v1::model::DocumentSchema;
let x = TrainProcessorVersionRequest::new().set_or_clear_document_schema(Some(DocumentSchema::default()/* use setters */));
let x = TrainProcessorVersionRequest::new().set_or_clear_document_schema(None::<DocumentSchema>);Sourcepub fn set_input_data<T>(self, v: T) -> Self
pub fn set_input_data<T>(self, v: T) -> Self
Sets the value of input_data.
§Example
use google_cloud_documentai_v1::model::train_processor_version_request::InputData;
let x = TrainProcessorVersionRequest::new().set_input_data(InputData::default()/* use setters */);Sourcepub fn set_or_clear_input_data<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_input_data<T>(self, v: Option<T>) -> Self
Sets or clears the value of input_data.
§Example
use google_cloud_documentai_v1::model::train_processor_version_request::InputData;
let x = TrainProcessorVersionRequest::new().set_or_clear_input_data(Some(InputData::default()/* use setters */));
let x = TrainProcessorVersionRequest::new().set_or_clear_input_data(None::<InputData>);Sourcepub fn set_base_processor_version<T: Into<String>>(self, v: T) -> Self
pub fn set_base_processor_version<T: Into<String>>(self, v: T) -> Self
Sets the value of base_processor_version.
§Example
let x = TrainProcessorVersionRequest::new().set_base_processor_version("example");Sourcepub fn set_processor_flags<T: Into<Option<ProcessorFlags>>>(self, v: T) -> Self
pub fn set_processor_flags<T: Into<Option<ProcessorFlags>>>(self, v: T) -> Self
Sets the value of processor_flags.
Note that all the setters affecting processor_flags are mutually
exclusive.
§Example
use google_cloud_documentai_v1::model::train_processor_version_request::CustomDocumentExtractionOptions;
let x = TrainProcessorVersionRequest::new().set_processor_flags(Some(
google_cloud_documentai_v1::model::train_processor_version_request::ProcessorFlags::CustomDocumentExtractionOptions(CustomDocumentExtractionOptions::default().into())));Sourcepub fn custom_document_extraction_options(
&self,
) -> Option<&Box<CustomDocumentExtractionOptions>>
pub fn custom_document_extraction_options( &self, ) -> Option<&Box<CustomDocumentExtractionOptions>>
The value of processor_flags
if it holds a CustomDocumentExtractionOptions, None if the field is not set or
holds a different branch.
Sourcepub fn set_custom_document_extraction_options<T: Into<Box<CustomDocumentExtractionOptions>>>(
self,
v: T,
) -> Self
pub fn set_custom_document_extraction_options<T: Into<Box<CustomDocumentExtractionOptions>>>( self, v: T, ) -> Self
Sets the value of processor_flags
to hold a CustomDocumentExtractionOptions.
Note that all the setters affecting processor_flags are
mutually exclusive.
§Example
use google_cloud_documentai_v1::model::train_processor_version_request::CustomDocumentExtractionOptions;
let x = TrainProcessorVersionRequest::new().set_custom_document_extraction_options(CustomDocumentExtractionOptions::default()/* use setters */);
assert!(x.custom_document_extraction_options().is_some());
assert!(x.foundation_model_tuning_options().is_none());Sourcepub fn foundation_model_tuning_options(
&self,
) -> Option<&Box<FoundationModelTuningOptions>>
pub fn foundation_model_tuning_options( &self, ) -> Option<&Box<FoundationModelTuningOptions>>
The value of processor_flags
if it holds a FoundationModelTuningOptions, None if the field is not set or
holds a different branch.
Sourcepub fn set_foundation_model_tuning_options<T: Into<Box<FoundationModelTuningOptions>>>(
self,
v: T,
) -> Self
pub fn set_foundation_model_tuning_options<T: Into<Box<FoundationModelTuningOptions>>>( self, v: T, ) -> Self
Sets the value of processor_flags
to hold a FoundationModelTuningOptions.
Note that all the setters affecting processor_flags are
mutually exclusive.
§Example
use google_cloud_documentai_v1::model::train_processor_version_request::FoundationModelTuningOptions;
let x = TrainProcessorVersionRequest::new().set_foundation_model_tuning_options(FoundationModelTuningOptions::default()/* use setters */);
assert!(x.foundation_model_tuning_options().is_some());
assert!(x.custom_document_extraction_options().is_none());Trait Implementations§
Source§impl Clone for TrainProcessorVersionRequest
impl Clone for TrainProcessorVersionRequest
Source§fn clone(&self) -> TrainProcessorVersionRequest
fn clone(&self) -> TrainProcessorVersionRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TrainProcessorVersionRequest
impl Debug for TrainProcessorVersionRequest
Source§impl Default for TrainProcessorVersionRequest
impl Default for TrainProcessorVersionRequest
Source§fn default() -> TrainProcessorVersionRequest
fn default() -> TrainProcessorVersionRequest
impl StructuralPartialEq for TrainProcessorVersionRequest
Auto Trait Implementations§
impl Freeze for TrainProcessorVersionRequest
impl RefUnwindSafe for TrainProcessorVersionRequest
impl Send for TrainProcessorVersionRequest
impl Sync for TrainProcessorVersionRequest
impl Unpin for TrainProcessorVersionRequest
impl UnsafeUnpin for TrainProcessorVersionRequest
impl UnwindSafe for TrainProcessorVersionRequest
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request