#[non_exhaustive]pub struct Processor {
pub name: String,
pub type: String,
pub display_name: String,
pub state: State,
pub default_processor_version: String,
pub processor_version_aliases: Vec<ProcessorVersionAlias>,
pub process_endpoint: String,
pub create_time: Option<Timestamp>,
pub kms_key_name: String,
pub satisfies_pzs: bool,
pub satisfies_pzi: bool,
/* private fields */
}Expand description
The first-class citizen for Document AI. Each processor defines how to extract structural information from a document.
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.name: StringOutput only. Immutable. The resource name of the processor.
Format: projects/{project}/locations/{location}/processors/{processor}
type: StringThe processor type, such as: OCR_PROCESSOR, INVOICE_PROCESSOR.
To get a list of processor types, see
FetchProcessorTypes.
display_name: StringThe display name of the processor.
state: StateOutput only. The state of the processor.
default_processor_version: StringThe default processor version.
processor_version_aliases: Vec<ProcessorVersionAlias>Output only. The processor version aliases.
process_endpoint: StringOutput only. Immutable. The http endpoint that can be called to invoke processing.
create_time: Option<Timestamp>Output only. The time the processor was created.
kms_key_name: StringThe KMS key used for encryption and decryption in CMEK scenarios.
satisfies_pzs: boolOutput only. Reserved for future use.
satisfies_pzi: boolOutput only. Reserved for future use.
Implementations§
Source§impl Processor
impl Processor
pub fn new() -> Self
Sourcepub fn set_display_name<T: Into<String>>(self, v: T) -> Self
pub fn set_display_name<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_default_processor_version<T: Into<String>>(self, v: T) -> Self
pub fn set_default_processor_version<T: Into<String>>(self, v: T) -> Self
Sets the value of default_processor_version.
§Example
let x = Processor::new().set_default_processor_version("example");Sourcepub fn set_processor_version_aliases<T, V>(self, v: T) -> Self
pub fn set_processor_version_aliases<T, V>(self, v: T) -> Self
Sets the value of processor_version_aliases.
§Example
use google_cloud_documentai_v1::model::ProcessorVersionAlias;
let x = Processor::new()
.set_processor_version_aliases([
ProcessorVersionAlias::default()/* use setters */,
ProcessorVersionAlias::default()/* use (different) setters */,
]);Sourcepub fn set_process_endpoint<T: Into<String>>(self, v: T) -> Self
pub fn set_process_endpoint<T: Into<String>>(self, v: T) -> Self
Sets the value of process_endpoint.
§Example
let x = Processor::new().set_process_endpoint("example");Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
use wkt::Timestamp;
let x = Processor::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
use wkt::Timestamp;
let x = Processor::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Processor::new().set_or_clear_create_time(None::<Timestamp>);