#[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
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(format!("projects/{project_id}/locations/{location_id}/processors/{processor_id}/processorVersions/{processor_version_id}"));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>);Sourcepub fn set_kms_key_name<T: Into<String>>(self, v: T) -> Self
pub fn set_kms_key_name<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_satisfies_pzs<T: Into<bool>>(self, v: T) -> Self
pub fn set_satisfies_pzs<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_satisfies_pzi<T: Into<bool>>(self, v: T) -> Self
pub fn set_satisfies_pzi<T: Into<bool>>(self, v: T) -> Self
Trait Implementations§
impl StructuralPartialEq for Processor
Auto Trait Implementations§
impl Freeze for Processor
impl RefUnwindSafe for Processor
impl Send for Processor
impl Sync for Processor
impl Unpin for Processor
impl UnsafeUnpin for Processor
impl UnwindSafe for Processor
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