#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DocumentSchema {
#[prost(string, tag = "1")]
pub display_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "3")]
pub entity_types: ::prost::alloc::vec::Vec<document_schema::EntityType>,
#[prost(message, optional, tag = "4")]
pub metadata: ::core::option::Option<document_schema::Metadata>,
}
pub mod document_schema {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EntityType {
#[prost(string, tag = "13")]
pub display_name: ::prost::alloc::string::String,
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub base_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "6")]
pub properties: ::prost::alloc::vec::Vec<entity_type::Property>,
#[prost(oneof = "entity_type::ValueSource", tags = "14")]
pub value_source: ::core::option::Option<entity_type::ValueSource>,
}
pub mod entity_type {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EnumValues {
#[prost(string, repeated, tag = "1")]
pub values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Property {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub display_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub value_type: ::prost::alloc::string::String,
#[prost(enumeration = "property::OccurrenceType", tag = "3")]
pub occurrence_type: i32,
}
pub mod property {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum OccurrenceType {
Unspecified = 0,
OptionalOnce = 1,
OptionalMultiple = 2,
RequiredOnce = 3,
RequiredMultiple = 4,
}
impl OccurrenceType {
pub fn as_str_name(&self) -> &'static str {
match self {
OccurrenceType::Unspecified => "OCCURRENCE_TYPE_UNSPECIFIED",
OccurrenceType::OptionalOnce => "OPTIONAL_ONCE",
OccurrenceType::OptionalMultiple => "OPTIONAL_MULTIPLE",
OccurrenceType::RequiredOnce => "REQUIRED_ONCE",
OccurrenceType::RequiredMultiple => "REQUIRED_MULTIPLE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"OCCURRENCE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"OPTIONAL_ONCE" => Some(Self::OptionalOnce),
"OPTIONAL_MULTIPLE" => Some(Self::OptionalMultiple),
"REQUIRED_ONCE" => Some(Self::RequiredOnce),
"REQUIRED_MULTIPLE" => Some(Self::RequiredMultiple),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ValueSource {
#[prost(message, tag = "14")]
EnumValues(EnumValues),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Metadata {
#[prost(bool, tag = "1")]
pub document_splitter: bool,
#[prost(bool, tag = "2")]
pub document_allow_multiple_labels: bool,
#[prost(bool, tag = "6")]
pub prefixed_naming_on_properties: bool,
#[prost(bool, tag = "7")]
pub skip_naming_validation: bool,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RawDocument {
#[prost(bytes = "bytes", tag = "1")]
pub content: ::prost::bytes::Bytes,
#[prost(string, tag = "2")]
pub mime_type: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub display_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GcsDocument {
#[prost(string, tag = "1")]
pub gcs_uri: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub mime_type: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GcsDocuments {
#[prost(message, repeated, tag = "1")]
pub documents: ::prost::alloc::vec::Vec<GcsDocument>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GcsPrefix {
#[prost(string, tag = "1")]
pub gcs_uri_prefix: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchDocumentsInputConfig {
#[prost(oneof = "batch_documents_input_config::Source", tags = "1, 2")]
pub source: ::core::option::Option<batch_documents_input_config::Source>,
}
pub mod batch_documents_input_config {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Source {
#[prost(message, tag = "1")]
GcsPrefix(super::GcsPrefix),
#[prost(message, tag = "2")]
GcsDocuments(super::GcsDocuments),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DocumentOutputConfig {
#[prost(oneof = "document_output_config::Destination", tags = "1")]
pub destination: ::core::option::Option<document_output_config::Destination>,
}
pub mod document_output_config {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GcsOutputConfig {
#[prost(string, tag = "1")]
pub gcs_uri: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub field_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(message, optional, tag = "3")]
pub sharding_config: ::core::option::Option<gcs_output_config::ShardingConfig>,
}
pub mod gcs_output_config {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ShardingConfig {
#[prost(int32, tag = "1")]
pub pages_per_shard: i32,
#[prost(int32, tag = "2")]
pub pages_overlap: i32,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Destination {
#[prost(message, tag = "1")]
GcsOutputConfig(GcsOutputConfig),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OcrConfig {
#[prost(message, optional, tag = "2")]
pub hints: ::core::option::Option<ocr_config::Hints>,
#[prost(bool, tag = "3")]
pub enable_native_pdf_parsing: bool,
#[prost(bool, tag = "4")]
pub enable_image_quality_scores: bool,
#[prost(string, repeated, tag = "5")]
pub advanced_ocr_options: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(bool, tag = "6")]
pub enable_symbol: bool,
#[deprecated]
#[prost(bool, tag = "8")]
pub compute_style_info: bool,
#[prost(bool, tag = "10")]
pub disable_character_boxes_detection: bool,
#[prost(message, optional, tag = "11")]
pub premium_features: ::core::option::Option<ocr_config::PremiumFeatures>,
}
pub mod ocr_config {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Hints {
#[prost(string, repeated, tag = "1")]
pub language_hints: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PremiumFeatures {
#[prost(bool, tag = "3")]
pub enable_selection_mark_detection: bool,
#[prost(bool, tag = "4")]
pub compute_style_info: bool,
#[prost(bool, tag = "5")]
pub enable_math_ocr: bool,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EvaluationReference {
#[prost(string, tag = "1")]
pub operation: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub evaluation: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub aggregate_metrics: ::core::option::Option<evaluation::Metrics>,
#[prost(message, optional, tag = "5")]
pub aggregate_metrics_exact: ::core::option::Option<evaluation::Metrics>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Evaluation {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "5")]
pub document_counters: ::core::option::Option<evaluation::Counters>,
#[prost(message, optional, tag = "3")]
pub all_entities_metrics: ::core::option::Option<evaluation::MultiConfidenceMetrics>,
#[prost(btree_map = "string, message", tag = "4")]
pub entity_metrics: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
evaluation::MultiConfidenceMetrics,
>,
#[prost(string, tag = "6")]
pub kms_key_name: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub kms_key_version_name: ::prost::alloc::string::String,
}
pub mod evaluation {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Counters {
#[prost(int32, tag = "1")]
pub input_documents_count: i32,
#[prost(int32, tag = "2")]
pub invalid_documents_count: i32,
#[prost(int32, tag = "3")]
pub failed_documents_count: i32,
#[prost(int32, tag = "4")]
pub evaluated_documents_count: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Metrics {
#[prost(float, tag = "1")]
pub precision: f32,
#[prost(float, tag = "2")]
pub recall: f32,
#[prost(float, tag = "3")]
pub f1_score: f32,
#[prost(int32, tag = "4")]
pub predicted_occurrences_count: i32,
#[prost(int32, tag = "5")]
pub ground_truth_occurrences_count: i32,
#[prost(int32, tag = "10")]
pub predicted_document_count: i32,
#[prost(int32, tag = "11")]
pub ground_truth_document_count: i32,
#[prost(int32, tag = "6")]
pub true_positives_count: i32,
#[prost(int32, tag = "7")]
pub false_positives_count: i32,
#[prost(int32, tag = "8")]
pub false_negatives_count: i32,
#[prost(int32, tag = "9")]
pub total_documents_count: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConfidenceLevelMetrics {
#[prost(float, tag = "1")]
pub confidence_level: f32,
#[prost(message, optional, tag = "2")]
pub metrics: ::core::option::Option<Metrics>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MultiConfidenceMetrics {
#[prost(message, repeated, tag = "1")]
pub confidence_level_metrics: ::prost::alloc::vec::Vec<ConfidenceLevelMetrics>,
#[prost(message, repeated, tag = "4")]
pub confidence_level_metrics_exact: ::prost::alloc::vec::Vec<
ConfidenceLevelMetrics,
>,
#[prost(float, tag = "2")]
pub auprc: f32,
#[prost(float, tag = "3")]
pub estimated_calibration_error: f32,
#[prost(float, tag = "5")]
pub auprc_exact: f32,
#[prost(float, tag = "6")]
pub estimated_calibration_error_exact: f32,
#[prost(enumeration = "multi_confidence_metrics::MetricsType", tag = "7")]
pub metrics_type: i32,
}
pub mod multi_confidence_metrics {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum MetricsType {
Unspecified = 0,
Aggregate = 1,
}
impl MetricsType {
pub fn as_str_name(&self) -> &'static str {
match self {
MetricsType::Unspecified => "METRICS_TYPE_UNSPECIFIED",
MetricsType::Aggregate => "AGGREGATE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"METRICS_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"AGGREGATE" => Some(Self::Aggregate),
_ => None,
}
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProcessorVersion {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub display_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "12")]
pub document_schema: ::core::option::Option<DocumentSchema>,
#[prost(enumeration = "processor_version::State", tag = "6")]
pub state: i32,
#[prost(message, optional, tag = "7")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "8")]
pub latest_evaluation: ::core::option::Option<EvaluationReference>,
#[prost(string, tag = "9")]
pub kms_key_name: ::prost::alloc::string::String,
#[prost(string, tag = "10")]
pub kms_key_version_name: ::prost::alloc::string::String,
#[prost(bool, tag = "11")]
pub google_managed: bool,
#[prost(message, optional, tag = "13")]
pub deprecation_info: ::core::option::Option<processor_version::DeprecationInfo>,
#[prost(enumeration = "processor_version::ModelType", tag = "15")]
pub model_type: i32,
}
pub mod processor_version {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeprecationInfo {
#[prost(message, optional, tag = "1")]
pub deprecation_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "2")]
pub replacement_processor_version: ::prost::alloc::string::String,
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
Deployed = 1,
Deploying = 2,
Undeployed = 3,
Undeploying = 4,
Creating = 5,
Deleting = 6,
Failed = 7,
Importing = 8,
}
impl State {
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Deployed => "DEPLOYED",
State::Deploying => "DEPLOYING",
State::Undeployed => "UNDEPLOYED",
State::Undeploying => "UNDEPLOYING",
State::Creating => "CREATING",
State::Deleting => "DELETING",
State::Failed => "FAILED",
State::Importing => "IMPORTING",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"DEPLOYED" => Some(Self::Deployed),
"DEPLOYING" => Some(Self::Deploying),
"UNDEPLOYED" => Some(Self::Undeployed),
"UNDEPLOYING" => Some(Self::Undeploying),
"CREATING" => Some(Self::Creating),
"DELETING" => Some(Self::Deleting),
"FAILED" => Some(Self::Failed),
"IMPORTING" => Some(Self::Importing),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ModelType {
Unspecified = 0,
Generative = 1,
Custom = 2,
}
impl ModelType {
pub fn as_str_name(&self) -> &'static str {
match self {
ModelType::Unspecified => "MODEL_TYPE_UNSPECIFIED",
ModelType::Generative => "MODEL_TYPE_GENERATIVE",
ModelType::Custom => "MODEL_TYPE_CUSTOM",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"MODEL_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"MODEL_TYPE_GENERATIVE" => Some(Self::Generative),
"MODEL_TYPE_CUSTOM" => Some(Self::Custom),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProcessorVersionAlias {
#[prost(string, tag = "1")]
pub alias: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub processor_version: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Processor {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub r#type: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub display_name: ::prost::alloc::string::String,
#[prost(enumeration = "processor::State", tag = "4")]
pub state: i32,
#[prost(string, tag = "9")]
pub default_processor_version: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "10")]
pub processor_version_aliases: ::prost::alloc::vec::Vec<ProcessorVersionAlias>,
#[prost(string, tag = "6")]
pub process_endpoint: ::prost::alloc::string::String,
#[prost(message, optional, tag = "7")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "8")]
pub kms_key_name: ::prost::alloc::string::String,
}
pub mod processor {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
Enabled = 1,
Disabled = 2,
Enabling = 3,
Disabling = 4,
Creating = 5,
Failed = 6,
Deleting = 7,
}
impl State {
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Enabled => "ENABLED",
State::Disabled => "DISABLED",
State::Enabling => "ENABLING",
State::Disabling => "DISABLING",
State::Creating => "CREATING",
State::Failed => "FAILED",
State::Deleting => "DELETING",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"ENABLED" => Some(Self::Enabled),
"DISABLED" => Some(Self::Disabled),
"ENABLING" => Some(Self::Enabling),
"DISABLING" => Some(Self::Disabling),
"CREATING" => Some(Self::Creating),
"FAILED" => Some(Self::Failed),
"DELETING" => Some(Self::Deleting),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProcessorType {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub r#type: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub category: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "4")]
pub available_locations: ::prost::alloc::vec::Vec<processor_type::LocationInfo>,
#[prost(bool, tag = "6")]
pub allow_creation: bool,
#[prost(enumeration = "super::super::super::api::LaunchStage", tag = "8")]
pub launch_stage: i32,
#[prost(string, repeated, tag = "9")]
pub sample_document_uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
pub mod processor_type {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LocationInfo {
#[prost(string, tag = "1")]
pub location_id: ::prost::alloc::string::String,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Barcode {
#[prost(string, tag = "1")]
pub format: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub value_format: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub raw_value: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Vertex {
#[prost(int32, tag = "1")]
pub x: i32,
#[prost(int32, tag = "2")]
pub y: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NormalizedVertex {
#[prost(float, tag = "1")]
pub x: f32,
#[prost(float, tag = "2")]
pub y: f32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BoundingPoly {
#[prost(message, repeated, tag = "1")]
pub vertices: ::prost::alloc::vec::Vec<Vertex>,
#[prost(message, repeated, tag = "2")]
pub normalized_vertices: ::prost::alloc::vec::Vec<NormalizedVertex>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Document {
#[prost(string, tag = "3")]
pub mime_type: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub text: ::prost::alloc::string::String,
#[deprecated]
#[prost(message, repeated, tag = "5")]
pub text_styles: ::prost::alloc::vec::Vec<document::Style>,
#[prost(message, repeated, tag = "6")]
pub pages: ::prost::alloc::vec::Vec<document::Page>,
#[prost(message, repeated, tag = "7")]
pub entities: ::prost::alloc::vec::Vec<document::Entity>,
#[prost(message, repeated, tag = "8")]
pub entity_relations: ::prost::alloc::vec::Vec<document::EntityRelation>,
#[prost(message, repeated, tag = "14")]
pub text_changes: ::prost::alloc::vec::Vec<document::TextChange>,
#[prost(message, optional, tag = "9")]
pub shard_info: ::core::option::Option<document::ShardInfo>,
#[prost(message, optional, tag = "10")]
pub error: ::core::option::Option<super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "13")]
pub revisions: ::prost::alloc::vec::Vec<document::Revision>,
#[prost(oneof = "document::Source", tags = "1, 2")]
pub source: ::core::option::Option<document::Source>,
}
pub mod document {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ShardInfo {
#[prost(int64, tag = "1")]
pub shard_index: i64,
#[prost(int64, tag = "2")]
pub shard_count: i64,
#[prost(int64, tag = "3")]
pub text_offset: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Style {
#[prost(message, optional, tag = "1")]
pub text_anchor: ::core::option::Option<TextAnchor>,
#[prost(message, optional, tag = "2")]
pub color: ::core::option::Option<super::super::super::super::r#type::Color>,
#[prost(message, optional, tag = "3")]
pub background_color: ::core::option::Option<
super::super::super::super::r#type::Color,
>,
#[prost(string, tag = "4")]
pub font_weight: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub text_style: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub text_decoration: ::prost::alloc::string::String,
#[prost(message, optional, tag = "7")]
pub font_size: ::core::option::Option<style::FontSize>,
#[prost(string, tag = "8")]
pub font_family: ::prost::alloc::string::String,
}
pub mod style {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FontSize {
#[prost(float, tag = "1")]
pub size: f32,
#[prost(string, tag = "2")]
pub unit: ::prost::alloc::string::String,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Page {
#[prost(int32, tag = "1")]
pub page_number: i32,
#[prost(message, optional, tag = "13")]
pub image: ::core::option::Option<page::Image>,
#[prost(message, repeated, tag = "14")]
pub transforms: ::prost::alloc::vec::Vec<page::Matrix>,
#[prost(message, optional, tag = "2")]
pub dimension: ::core::option::Option<page::Dimension>,
#[prost(message, optional, tag = "3")]
pub layout: ::core::option::Option<page::Layout>,
#[prost(message, repeated, tag = "4")]
pub detected_languages: ::prost::alloc::vec::Vec<page::DetectedLanguage>,
#[prost(message, repeated, tag = "5")]
pub blocks: ::prost::alloc::vec::Vec<page::Block>,
#[prost(message, repeated, tag = "6")]
pub paragraphs: ::prost::alloc::vec::Vec<page::Paragraph>,
#[prost(message, repeated, tag = "7")]
pub lines: ::prost::alloc::vec::Vec<page::Line>,
#[prost(message, repeated, tag = "8")]
pub tokens: ::prost::alloc::vec::Vec<page::Token>,
#[prost(message, repeated, tag = "9")]
pub visual_elements: ::prost::alloc::vec::Vec<page::VisualElement>,
#[prost(message, repeated, tag = "10")]
pub tables: ::prost::alloc::vec::Vec<page::Table>,
#[prost(message, repeated, tag = "11")]
pub form_fields: ::prost::alloc::vec::Vec<page::FormField>,
#[prost(message, repeated, tag = "12")]
pub symbols: ::prost::alloc::vec::Vec<page::Symbol>,
#[prost(message, repeated, tag = "15")]
pub detected_barcodes: ::prost::alloc::vec::Vec<page::DetectedBarcode>,
#[prost(message, optional, tag = "17")]
pub image_quality_scores: ::core::option::Option<page::ImageQualityScores>,
#[deprecated]
#[prost(message, optional, tag = "16")]
pub provenance: ::core::option::Option<Provenance>,
}
pub mod page {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Dimension {
#[prost(float, tag = "1")]
pub width: f32,
#[prost(float, tag = "2")]
pub height: f32,
#[prost(string, tag = "3")]
pub unit: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Image {
#[prost(bytes = "bytes", tag = "1")]
pub content: ::prost::bytes::Bytes,
#[prost(string, tag = "2")]
pub mime_type: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub width: i32,
#[prost(int32, tag = "4")]
pub height: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Matrix {
#[prost(int32, tag = "1")]
pub rows: i32,
#[prost(int32, tag = "2")]
pub cols: i32,
#[prost(int32, tag = "3")]
pub r#type: i32,
#[prost(bytes = "bytes", tag = "4")]
pub data: ::prost::bytes::Bytes,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Layout {
#[prost(message, optional, tag = "1")]
pub text_anchor: ::core::option::Option<super::TextAnchor>,
#[prost(float, tag = "2")]
pub confidence: f32,
#[prost(message, optional, tag = "3")]
pub bounding_poly: ::core::option::Option<super::super::BoundingPoly>,
#[prost(enumeration = "layout::Orientation", tag = "4")]
pub orientation: i32,
}
pub mod layout {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Orientation {
Unspecified = 0,
PageUp = 1,
PageRight = 2,
PageDown = 3,
PageLeft = 4,
}
impl Orientation {
pub fn as_str_name(&self) -> &'static str {
match self {
Orientation::Unspecified => "ORIENTATION_UNSPECIFIED",
Orientation::PageUp => "PAGE_UP",
Orientation::PageRight => "PAGE_RIGHT",
Orientation::PageDown => "PAGE_DOWN",
Orientation::PageLeft => "PAGE_LEFT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ORIENTATION_UNSPECIFIED" => Some(Self::Unspecified),
"PAGE_UP" => Some(Self::PageUp),
"PAGE_RIGHT" => Some(Self::PageRight),
"PAGE_DOWN" => Some(Self::PageDown),
"PAGE_LEFT" => Some(Self::PageLeft),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Block {
#[prost(message, optional, tag = "1")]
pub layout: ::core::option::Option<Layout>,
#[prost(message, repeated, tag = "2")]
pub detected_languages: ::prost::alloc::vec::Vec<DetectedLanguage>,
#[deprecated]
#[prost(message, optional, tag = "3")]
pub provenance: ::core::option::Option<super::Provenance>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Paragraph {
#[prost(message, optional, tag = "1")]
pub layout: ::core::option::Option<Layout>,
#[prost(message, repeated, tag = "2")]
pub detected_languages: ::prost::alloc::vec::Vec<DetectedLanguage>,
#[deprecated]
#[prost(message, optional, tag = "3")]
pub provenance: ::core::option::Option<super::Provenance>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Line {
#[prost(message, optional, tag = "1")]
pub layout: ::core::option::Option<Layout>,
#[prost(message, repeated, tag = "2")]
pub detected_languages: ::prost::alloc::vec::Vec<DetectedLanguage>,
#[deprecated]
#[prost(message, optional, tag = "3")]
pub provenance: ::core::option::Option<super::Provenance>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Token {
#[prost(message, optional, tag = "1")]
pub layout: ::core::option::Option<Layout>,
#[prost(message, optional, tag = "2")]
pub detected_break: ::core::option::Option<token::DetectedBreak>,
#[prost(message, repeated, tag = "3")]
pub detected_languages: ::prost::alloc::vec::Vec<DetectedLanguage>,
#[deprecated]
#[prost(message, optional, tag = "4")]
pub provenance: ::core::option::Option<super::Provenance>,
#[prost(message, optional, tag = "5")]
pub style_info: ::core::option::Option<token::StyleInfo>,
}
pub mod token {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DetectedBreak {
#[prost(enumeration = "detected_break::Type", tag = "1")]
pub r#type: i32,
}
pub mod detected_break {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
Unspecified = 0,
Space = 1,
WideSpace = 2,
Hyphen = 3,
}
impl Type {
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Unspecified => "TYPE_UNSPECIFIED",
Type::Space => "SPACE",
Type::WideSpace => "WIDE_SPACE",
Type::Hyphen => "HYPHEN",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"SPACE" => Some(Self::Space),
"WIDE_SPACE" => Some(Self::WideSpace),
"HYPHEN" => Some(Self::Hyphen),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StyleInfo {
#[prost(int32, tag = "1")]
pub font_size: i32,
#[prost(double, tag = "2")]
pub pixel_font_size: f64,
#[prost(double, tag = "3")]
pub letter_spacing: f64,
#[prost(string, tag = "4")]
pub font_type: ::prost::alloc::string::String,
#[prost(bool, tag = "5")]
pub bold: bool,
#[prost(bool, tag = "6")]
pub italic: bool,
#[prost(bool, tag = "7")]
pub underlined: bool,
#[prost(bool, tag = "8")]
pub strikeout: bool,
#[prost(bool, tag = "9")]
pub subscript: bool,
#[prost(bool, tag = "10")]
pub superscript: bool,
#[prost(bool, tag = "11")]
pub smallcaps: bool,
#[prost(int32, tag = "12")]
pub font_weight: i32,
#[prost(bool, tag = "13")]
pub handwritten: bool,
#[prost(message, optional, tag = "14")]
pub text_color: ::core::option::Option<
super::super::super::super::super::super::r#type::Color,
>,
#[prost(message, optional, tag = "15")]
pub background_color: ::core::option::Option<
super::super::super::super::super::super::r#type::Color,
>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Symbol {
#[prost(message, optional, tag = "1")]
pub layout: ::core::option::Option<Layout>,
#[prost(message, repeated, tag = "2")]
pub detected_languages: ::prost::alloc::vec::Vec<DetectedLanguage>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VisualElement {
#[prost(message, optional, tag = "1")]
pub layout: ::core::option::Option<Layout>,
#[prost(string, tag = "2")]
pub r#type: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "3")]
pub detected_languages: ::prost::alloc::vec::Vec<DetectedLanguage>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Table {
#[prost(message, optional, tag = "1")]
pub layout: ::core::option::Option<Layout>,
#[prost(message, repeated, tag = "2")]
pub header_rows: ::prost::alloc::vec::Vec<table::TableRow>,
#[prost(message, repeated, tag = "3")]
pub body_rows: ::prost::alloc::vec::Vec<table::TableRow>,
#[prost(message, repeated, tag = "4")]
pub detected_languages: ::prost::alloc::vec::Vec<DetectedLanguage>,
#[deprecated]
#[prost(message, optional, tag = "5")]
pub provenance: ::core::option::Option<super::Provenance>,
}
pub mod table {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TableRow {
#[prost(message, repeated, tag = "1")]
pub cells: ::prost::alloc::vec::Vec<TableCell>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TableCell {
#[prost(message, optional, tag = "1")]
pub layout: ::core::option::Option<super::Layout>,
#[prost(int32, tag = "2")]
pub row_span: i32,
#[prost(int32, tag = "3")]
pub col_span: i32,
#[prost(message, repeated, tag = "4")]
pub detected_languages: ::prost::alloc::vec::Vec<
super::DetectedLanguage,
>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FormField {
#[prost(message, optional, tag = "1")]
pub field_name: ::core::option::Option<Layout>,
#[prost(message, optional, tag = "2")]
pub field_value: ::core::option::Option<Layout>,
#[prost(message, repeated, tag = "3")]
pub name_detected_languages: ::prost::alloc::vec::Vec<DetectedLanguage>,
#[prost(message, repeated, tag = "4")]
pub value_detected_languages: ::prost::alloc::vec::Vec<DetectedLanguage>,
#[prost(string, tag = "5")]
pub value_type: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub corrected_key_text: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub corrected_value_text: ::prost::alloc::string::String,
#[prost(message, optional, tag = "8")]
pub provenance: ::core::option::Option<super::Provenance>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DetectedBarcode {
#[prost(message, optional, tag = "1")]
pub layout: ::core::option::Option<Layout>,
#[prost(message, optional, tag = "2")]
pub barcode: ::core::option::Option<super::super::Barcode>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DetectedLanguage {
#[prost(string, tag = "1")]
pub language_code: ::prost::alloc::string::String,
#[prost(float, tag = "2")]
pub confidence: f32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ImageQualityScores {
#[prost(float, tag = "1")]
pub quality_score: f32,
#[prost(message, repeated, tag = "2")]
pub detected_defects: ::prost::alloc::vec::Vec<
image_quality_scores::DetectedDefect,
>,
}
pub mod image_quality_scores {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DetectedDefect {
#[prost(string, tag = "1")]
pub r#type: ::prost::alloc::string::String,
#[prost(float, tag = "2")]
pub confidence: f32,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Entity {
#[prost(message, optional, tag = "1")]
pub text_anchor: ::core::option::Option<TextAnchor>,
#[prost(string, tag = "2")]
pub r#type: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub mention_text: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub mention_id: ::prost::alloc::string::String,
#[prost(float, tag = "5")]
pub confidence: f32,
#[prost(message, optional, tag = "6")]
pub page_anchor: ::core::option::Option<PageAnchor>,
#[prost(string, tag = "7")]
pub id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "9")]
pub normalized_value: ::core::option::Option<entity::NormalizedValue>,
#[prost(message, repeated, tag = "10")]
pub properties: ::prost::alloc::vec::Vec<Entity>,
#[prost(message, optional, tag = "11")]
pub provenance: ::core::option::Option<Provenance>,
#[prost(bool, tag = "12")]
pub redacted: bool,
}
pub mod entity {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NormalizedValue {
#[prost(string, tag = "1")]
pub text: ::prost::alloc::string::String,
#[prost(
oneof = "normalized_value::StructuredValue",
tags = "2, 3, 4, 5, 6, 7, 8"
)]
pub structured_value: ::core::option::Option<
normalized_value::StructuredValue,
>,
}
pub mod normalized_value {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum StructuredValue {
#[prost(message, tag = "2")]
MoneyValue(super::super::super::super::super::super::r#type::Money),
#[prost(message, tag = "3")]
DateValue(super::super::super::super::super::super::r#type::Date),
#[prost(message, tag = "4")]
DatetimeValue(
super::super::super::super::super::super::r#type::DateTime,
),
#[prost(message, tag = "5")]
AddressValue(
super::super::super::super::super::super::r#type::PostalAddress,
),
#[prost(bool, tag = "6")]
BooleanValue(bool),
#[prost(int32, tag = "7")]
IntegerValue(i32),
#[prost(float, tag = "8")]
FloatValue(f32),
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EntityRelation {
#[prost(string, tag = "1")]
pub subject_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub object_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub relation: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TextAnchor {
#[prost(message, repeated, tag = "1")]
pub text_segments: ::prost::alloc::vec::Vec<text_anchor::TextSegment>,
#[prost(string, tag = "2")]
pub content: ::prost::alloc::string::String,
}
pub mod text_anchor {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TextSegment {
#[prost(int64, tag = "1")]
pub start_index: i64,
#[prost(int64, tag = "2")]
pub end_index: i64,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PageAnchor {
#[prost(message, repeated, tag = "1")]
pub page_refs: ::prost::alloc::vec::Vec<page_anchor::PageRef>,
}
pub mod page_anchor {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PageRef {
#[prost(int64, tag = "1")]
pub page: i64,
#[prost(enumeration = "page_ref::LayoutType", tag = "2")]
pub layout_type: i32,
#[deprecated]
#[prost(string, tag = "3")]
pub layout_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub bounding_poly: ::core::option::Option<super::super::BoundingPoly>,
#[prost(float, tag = "5")]
pub confidence: f32,
}
pub mod page_ref {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum LayoutType {
Unspecified = 0,
Block = 1,
Paragraph = 2,
Line = 3,
Token = 4,
VisualElement = 5,
Table = 6,
FormField = 7,
}
impl LayoutType {
pub fn as_str_name(&self) -> &'static str {
match self {
LayoutType::Unspecified => "LAYOUT_TYPE_UNSPECIFIED",
LayoutType::Block => "BLOCK",
LayoutType::Paragraph => "PARAGRAPH",
LayoutType::Line => "LINE",
LayoutType::Token => "TOKEN",
LayoutType::VisualElement => "VISUAL_ELEMENT",
LayoutType::Table => "TABLE",
LayoutType::FormField => "FORM_FIELD",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"LAYOUT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"BLOCK" => Some(Self::Block),
"PARAGRAPH" => Some(Self::Paragraph),
"LINE" => Some(Self::Line),
"TOKEN" => Some(Self::Token),
"VISUAL_ELEMENT" => Some(Self::VisualElement),
"TABLE" => Some(Self::Table),
"FORM_FIELD" => Some(Self::FormField),
_ => None,
}
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Provenance {
#[deprecated]
#[prost(int32, tag = "1")]
pub revision: i32,
#[deprecated]
#[prost(int32, tag = "2")]
pub id: i32,
#[prost(message, repeated, tag = "3")]
pub parents: ::prost::alloc::vec::Vec<provenance::Parent>,
#[prost(enumeration = "provenance::OperationType", tag = "4")]
pub r#type: i32,
}
pub mod provenance {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Parent {
#[prost(int32, tag = "1")]
pub revision: i32,
#[prost(int32, tag = "3")]
pub index: i32,
#[deprecated]
#[prost(int32, tag = "2")]
pub id: i32,
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum OperationType {
Unspecified = 0,
Add = 1,
Remove = 2,
Update = 7,
Replace = 3,
EvalRequested = 4,
EvalApproved = 5,
EvalSkipped = 6,
}
impl OperationType {
pub fn as_str_name(&self) -> &'static str {
match self {
OperationType::Unspecified => "OPERATION_TYPE_UNSPECIFIED",
OperationType::Add => "ADD",
OperationType::Remove => "REMOVE",
OperationType::Update => "UPDATE",
OperationType::Replace => "REPLACE",
OperationType::EvalRequested => "EVAL_REQUESTED",
OperationType::EvalApproved => "EVAL_APPROVED",
OperationType::EvalSkipped => "EVAL_SKIPPED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"OPERATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"ADD" => Some(Self::Add),
"REMOVE" => Some(Self::Remove),
"UPDATE" => Some(Self::Update),
"REPLACE" => Some(Self::Replace),
"EVAL_REQUESTED" => Some(Self::EvalRequested),
"EVAL_APPROVED" => Some(Self::EvalApproved),
"EVAL_SKIPPED" => Some(Self::EvalSkipped),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Revision {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[deprecated]
#[prost(int32, repeated, packed = "false", tag = "2")]
pub parent: ::prost::alloc::vec::Vec<i32>,
#[prost(string, repeated, tag = "7")]
pub parent_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "6")]
pub human_review: ::core::option::Option<revision::HumanReview>,
#[prost(oneof = "revision::Source", tags = "4, 5")]
pub source: ::core::option::Option<revision::Source>,
}
pub mod revision {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HumanReview {
#[prost(string, tag = "1")]
pub state: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub state_message: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Source {
#[prost(string, tag = "4")]
Agent(::prost::alloc::string::String),
#[prost(string, tag = "5")]
Processor(::prost::alloc::string::String),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TextChange {
#[prost(message, optional, tag = "1")]
pub text_anchor: ::core::option::Option<TextAnchor>,
#[prost(string, tag = "2")]
pub changed_text: ::prost::alloc::string::String,
#[deprecated]
#[prost(message, repeated, tag = "3")]
pub provenance: ::prost::alloc::vec::Vec<Provenance>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Source {
#[prost(string, tag = "1")]
Uri(::prost::alloc::string::String),
#[prost(bytes, tag = "2")]
Content(::prost::bytes::Bytes),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CommonOperationMetadata {
#[prost(enumeration = "common_operation_metadata::State", tag = "1")]
pub state: i32,
#[prost(string, tag = "2")]
pub state_message: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub resource: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "4")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
}
pub mod common_operation_metadata {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
Running = 1,
Cancelling = 2,
Succeeded = 3,
Failed = 4,
Cancelled = 5,
}
impl State {
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Running => "RUNNING",
State::Cancelling => "CANCELLING",
State::Succeeded => "SUCCEEDED",
State::Failed => "FAILED",
State::Cancelled => "CANCELLED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"RUNNING" => Some(Self::Running),
"CANCELLING" => Some(Self::Cancelling),
"SUCCEEDED" => Some(Self::Succeeded),
"FAILED" => Some(Self::Failed),
"CANCELLED" => Some(Self::Cancelled),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProcessOptions {
#[prost(message, optional, tag = "1")]
pub ocr_config: ::core::option::Option<OcrConfig>,
#[prost(message, optional, tag = "8")]
pub schema_override: ::core::option::Option<DocumentSchema>,
#[prost(oneof = "process_options::PageRange", tags = "5, 6, 7")]
pub page_range: ::core::option::Option<process_options::PageRange>,
}
pub mod process_options {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IndividualPageSelector {
#[prost(int32, repeated, packed = "false", tag = "1")]
pub pages: ::prost::alloc::vec::Vec<i32>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum PageRange {
#[prost(message, tag = "5")]
IndividualPageSelector(IndividualPageSelector),
#[prost(int32, tag = "6")]
FromStart(i32),
#[prost(int32, tag = "7")]
FromEnd(i32),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProcessRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(bool, tag = "3")]
pub skip_human_review: bool,
#[prost(message, optional, tag = "6")]
pub field_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(message, optional, tag = "7")]
pub process_options: ::core::option::Option<ProcessOptions>,
#[prost(btree_map = "string, string", tag = "10")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(oneof = "process_request::Source", tags = "4, 5, 8")]
pub source: ::core::option::Option<process_request::Source>,
}
pub mod process_request {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Source {
#[prost(message, tag = "4")]
InlineDocument(super::Document),
#[prost(message, tag = "5")]
RawDocument(super::RawDocument),
#[prost(message, tag = "8")]
GcsDocument(super::GcsDocument),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HumanReviewStatus {
#[prost(enumeration = "human_review_status::State", tag = "1")]
pub state: i32,
#[prost(string, tag = "2")]
pub state_message: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub human_review_operation: ::prost::alloc::string::String,
}
pub mod human_review_status {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
Skipped = 1,
ValidationPassed = 2,
InProgress = 3,
Error = 4,
}
impl State {
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Skipped => "SKIPPED",
State::ValidationPassed => "VALIDATION_PASSED",
State::InProgress => "IN_PROGRESS",
State::Error => "ERROR",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"SKIPPED" => Some(Self::Skipped),
"VALIDATION_PASSED" => Some(Self::ValidationPassed),
"IN_PROGRESS" => Some(Self::InProgress),
"ERROR" => Some(Self::Error),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProcessResponse {
#[prost(message, optional, tag = "1")]
pub document: ::core::option::Option<Document>,
#[prost(message, optional, tag = "3")]
pub human_review_status: ::core::option::Option<HumanReviewStatus>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchProcessRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "5")]
pub input_documents: ::core::option::Option<BatchDocumentsInputConfig>,
#[prost(message, optional, tag = "6")]
pub document_output_config: ::core::option::Option<DocumentOutputConfig>,
#[prost(bool, tag = "4")]
pub skip_human_review: bool,
#[prost(message, optional, tag = "7")]
pub process_options: ::core::option::Option<ProcessOptions>,
#[prost(btree_map = "string, string", tag = "9")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchProcessResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchProcessMetadata {
#[prost(enumeration = "batch_process_metadata::State", tag = "1")]
pub state: i32,
#[prost(string, tag = "2")]
pub state_message: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "4")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, repeated, tag = "5")]
pub individual_process_statuses: ::prost::alloc::vec::Vec<
batch_process_metadata::IndividualProcessStatus,
>,
}
pub mod batch_process_metadata {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IndividualProcessStatus {
#[prost(string, tag = "1")]
pub input_gcs_source: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub status: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(string, tag = "3")]
pub output_gcs_destination: ::prost::alloc::string::String,
#[prost(message, optional, tag = "5")]
pub human_review_status: ::core::option::Option<super::HumanReviewStatus>,
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
Waiting = 1,
Running = 2,
Succeeded = 3,
Cancelling = 4,
Cancelled = 5,
Failed = 6,
}
impl State {
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Waiting => "WAITING",
State::Running => "RUNNING",
State::Succeeded => "SUCCEEDED",
State::Cancelling => "CANCELLING",
State::Cancelled => "CANCELLED",
State::Failed => "FAILED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"WAITING" => Some(Self::Waiting),
"RUNNING" => Some(Self::Running),
"SUCCEEDED" => Some(Self::Succeeded),
"CANCELLING" => Some(Self::Cancelling),
"CANCELLED" => Some(Self::Cancelled),
"FAILED" => Some(Self::Failed),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FetchProcessorTypesRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FetchProcessorTypesResponse {
#[prost(message, repeated, tag = "1")]
pub processor_types: ::prost::alloc::vec::Vec<ProcessorType>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListProcessorTypesRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub page_size: i32,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListProcessorTypesResponse {
#[prost(message, repeated, tag = "1")]
pub processor_types: ::prost::alloc::vec::Vec<ProcessorType>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListProcessorsRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub page_size: i32,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListProcessorsResponse {
#[prost(message, repeated, tag = "1")]
pub processors: ::prost::alloc::vec::Vec<Processor>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetProcessorTypeRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetProcessorRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetProcessorVersionRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListProcessorVersionsRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub page_size: i32,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListProcessorVersionsResponse {
#[prost(message, repeated, tag = "1")]
pub processor_versions: ::prost::alloc::vec::Vec<ProcessorVersion>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteProcessorVersionRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteProcessorVersionMetadata {
#[prost(message, optional, tag = "1")]
pub common_metadata: ::core::option::Option<CommonOperationMetadata>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeployProcessorVersionRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeployProcessorVersionResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeployProcessorVersionMetadata {
#[prost(message, optional, tag = "1")]
pub common_metadata: ::core::option::Option<CommonOperationMetadata>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UndeployProcessorVersionRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UndeployProcessorVersionResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UndeployProcessorVersionMetadata {
#[prost(message, optional, tag = "1")]
pub common_metadata: ::core::option::Option<CommonOperationMetadata>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateProcessorRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub processor: ::core::option::Option<Processor>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteProcessorRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteProcessorMetadata {
#[prost(message, optional, tag = "5")]
pub common_metadata: ::core::option::Option<CommonOperationMetadata>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EnableProcessorRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EnableProcessorResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EnableProcessorMetadata {
#[prost(message, optional, tag = "5")]
pub common_metadata: ::core::option::Option<CommonOperationMetadata>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DisableProcessorRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DisableProcessorResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DisableProcessorMetadata {
#[prost(message, optional, tag = "5")]
pub common_metadata: ::core::option::Option<CommonOperationMetadata>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetDefaultProcessorVersionRequest {
#[prost(string, tag = "1")]
pub processor: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub default_processor_version: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetDefaultProcessorVersionResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetDefaultProcessorVersionMetadata {
#[prost(message, optional, tag = "1")]
pub common_metadata: ::core::option::Option<CommonOperationMetadata>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TrainProcessorVersionRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub processor_version: ::core::option::Option<ProcessorVersion>,
#[prost(message, optional, tag = "10")]
pub document_schema: ::core::option::Option<DocumentSchema>,
#[prost(message, optional, tag = "4")]
pub input_data: ::core::option::Option<train_processor_version_request::InputData>,
#[prost(string, tag = "8")]
pub base_processor_version: ::prost::alloc::string::String,
#[prost(oneof = "train_processor_version_request::ProcessorFlags", tags = "5")]
pub processor_flags: ::core::option::Option<
train_processor_version_request::ProcessorFlags,
>,
}
pub mod train_processor_version_request {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InputData {
#[prost(message, optional, tag = "3")]
pub training_documents: ::core::option::Option<super::BatchDocumentsInputConfig>,
#[prost(message, optional, tag = "4")]
pub test_documents: ::core::option::Option<super::BatchDocumentsInputConfig>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CustomDocumentExtractionOptions {
#[prost(
enumeration = "custom_document_extraction_options::TrainingMethod",
tag = "3"
)]
pub training_method: i32,
}
pub mod custom_document_extraction_options {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum TrainingMethod {
Unspecified = 0,
ModelBased = 1,
TemplateBased = 2,
}
impl TrainingMethod {
pub fn as_str_name(&self) -> &'static str {
match self {
TrainingMethod::Unspecified => "TRAINING_METHOD_UNSPECIFIED",
TrainingMethod::ModelBased => "MODEL_BASED",
TrainingMethod::TemplateBased => "TEMPLATE_BASED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TRAINING_METHOD_UNSPECIFIED" => Some(Self::Unspecified),
"MODEL_BASED" => Some(Self::ModelBased),
"TEMPLATE_BASED" => Some(Self::TemplateBased),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ProcessorFlags {
#[prost(message, tag = "5")]
CustomDocumentExtractionOptions(CustomDocumentExtractionOptions),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TrainProcessorVersionResponse {
#[prost(string, tag = "1")]
pub processor_version: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TrainProcessorVersionMetadata {
#[prost(message, optional, tag = "1")]
pub common_metadata: ::core::option::Option<CommonOperationMetadata>,
#[prost(message, optional, tag = "2")]
pub training_dataset_validation: ::core::option::Option<
train_processor_version_metadata::DatasetValidation,
>,
#[prost(message, optional, tag = "3")]
pub test_dataset_validation: ::core::option::Option<
train_processor_version_metadata::DatasetValidation,
>,
}
pub mod train_processor_version_metadata {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DatasetValidation {
#[prost(int32, tag = "3")]
pub document_error_count: i32,
#[prost(int32, tag = "4")]
pub dataset_error_count: i32,
#[prost(message, repeated, tag = "1")]
pub document_errors: ::prost::alloc::vec::Vec<
super::super::super::super::rpc::Status,
>,
#[prost(message, repeated, tag = "2")]
pub dataset_errors: ::prost::alloc::vec::Vec<
super::super::super::super::rpc::Status,
>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReviewDocumentRequest {
#[prost(string, tag = "1")]
pub human_review_config: ::prost::alloc::string::String,
#[prost(bool, tag = "3")]
pub enable_schema_validation: bool,
#[prost(enumeration = "review_document_request::Priority", tag = "5")]
pub priority: i32,
#[prost(message, optional, tag = "6")]
pub document_schema: ::core::option::Option<DocumentSchema>,
#[prost(oneof = "review_document_request::Source", tags = "4")]
pub source: ::core::option::Option<review_document_request::Source>,
}
pub mod review_document_request {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Priority {
Default = 0,
Urgent = 1,
}
impl Priority {
pub fn as_str_name(&self) -> &'static str {
match self {
Priority::Default => "DEFAULT",
Priority::Urgent => "URGENT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DEFAULT" => Some(Self::Default),
"URGENT" => Some(Self::Urgent),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Source {
#[prost(message, tag = "4")]
InlineDocument(super::Document),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReviewDocumentResponse {
#[prost(string, tag = "1")]
pub gcs_destination: ::prost::alloc::string::String,
#[prost(enumeration = "review_document_response::State", tag = "2")]
pub state: i32,
#[prost(string, tag = "3")]
pub rejection_reason: ::prost::alloc::string::String,
}
pub mod review_document_response {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
Rejected = 1,
Succeeded = 2,
}
impl State {
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Rejected => "REJECTED",
State::Succeeded => "SUCCEEDED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"REJECTED" => Some(Self::Rejected),
"SUCCEEDED" => Some(Self::Succeeded),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReviewDocumentOperationMetadata {
#[prost(message, optional, tag = "5")]
pub common_metadata: ::core::option::Option<CommonOperationMetadata>,
#[prost(string, tag = "6")]
pub question_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EvaluateProcessorVersionRequest {
#[prost(string, tag = "1")]
pub processor_version: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub evaluation_documents: ::core::option::Option<BatchDocumentsInputConfig>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EvaluateProcessorVersionMetadata {
#[prost(message, optional, tag = "1")]
pub common_metadata: ::core::option::Option<CommonOperationMetadata>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EvaluateProcessorVersionResponse {
#[prost(string, tag = "2")]
pub evaluation: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetEvaluationRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListEvaluationsRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub page_size: i32,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListEvaluationsResponse {
#[prost(message, repeated, tag = "1")]
pub evaluations: ::prost::alloc::vec::Vec<Evaluation>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
pub mod document_processor_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct DocumentProcessorServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> DocumentProcessorServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> DocumentProcessorServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
DocumentProcessorServiceClient::new(
InterceptedService::new(inner, interceptor),
)
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn process_document(
&mut self,
request: impl tonic::IntoRequest<super::ProcessRequest>,
) -> std::result::Result<
tonic::Response<super::ProcessResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.documentai.v1.DocumentProcessorService/ProcessDocument",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.documentai.v1.DocumentProcessorService",
"ProcessDocument",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn batch_process_documents(
&mut self,
request: impl tonic::IntoRequest<super::BatchProcessRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.documentai.v1.DocumentProcessorService/BatchProcessDocuments",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.documentai.v1.DocumentProcessorService",
"BatchProcessDocuments",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn fetch_processor_types(
&mut self,
request: impl tonic::IntoRequest<super::FetchProcessorTypesRequest>,
) -> std::result::Result<
tonic::Response<super::FetchProcessorTypesResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.documentai.v1.DocumentProcessorService/FetchProcessorTypes",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.documentai.v1.DocumentProcessorService",
"FetchProcessorTypes",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_processor_types(
&mut self,
request: impl tonic::IntoRequest<super::ListProcessorTypesRequest>,
) -> std::result::Result<
tonic::Response<super::ListProcessorTypesResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.documentai.v1.DocumentProcessorService/ListProcessorTypes",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.documentai.v1.DocumentProcessorService",
"ListProcessorTypes",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_processor_type(
&mut self,
request: impl tonic::IntoRequest<super::GetProcessorTypeRequest>,
) -> std::result::Result<tonic::Response<super::ProcessorType>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.documentai.v1.DocumentProcessorService/GetProcessorType",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.documentai.v1.DocumentProcessorService",
"GetProcessorType",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_processors(
&mut self,
request: impl tonic::IntoRequest<super::ListProcessorsRequest>,
) -> std::result::Result<
tonic::Response<super::ListProcessorsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.documentai.v1.DocumentProcessorService/ListProcessors",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.documentai.v1.DocumentProcessorService",
"ListProcessors",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_processor(
&mut self,
request: impl tonic::IntoRequest<super::GetProcessorRequest>,
) -> std::result::Result<tonic::Response<super::Processor>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.documentai.v1.DocumentProcessorService/GetProcessor",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.documentai.v1.DocumentProcessorService",
"GetProcessor",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn train_processor_version(
&mut self,
request: impl tonic::IntoRequest<super::TrainProcessorVersionRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.documentai.v1.DocumentProcessorService/TrainProcessorVersion",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.documentai.v1.DocumentProcessorService",
"TrainProcessorVersion",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_processor_version(
&mut self,
request: impl tonic::IntoRequest<super::GetProcessorVersionRequest>,
) -> std::result::Result<
tonic::Response<super::ProcessorVersion>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.documentai.v1.DocumentProcessorService/GetProcessorVersion",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.documentai.v1.DocumentProcessorService",
"GetProcessorVersion",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_processor_versions(
&mut self,
request: impl tonic::IntoRequest<super::ListProcessorVersionsRequest>,
) -> std::result::Result<
tonic::Response<super::ListProcessorVersionsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.documentai.v1.DocumentProcessorService/ListProcessorVersions",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.documentai.v1.DocumentProcessorService",
"ListProcessorVersions",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete_processor_version(
&mut self,
request: impl tonic::IntoRequest<super::DeleteProcessorVersionRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.documentai.v1.DocumentProcessorService/DeleteProcessorVersion",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.documentai.v1.DocumentProcessorService",
"DeleteProcessorVersion",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn deploy_processor_version(
&mut self,
request: impl tonic::IntoRequest<super::DeployProcessorVersionRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.documentai.v1.DocumentProcessorService/DeployProcessorVersion",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.documentai.v1.DocumentProcessorService",
"DeployProcessorVersion",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn undeploy_processor_version(
&mut self,
request: impl tonic::IntoRequest<super::UndeployProcessorVersionRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.documentai.v1.DocumentProcessorService/UndeployProcessorVersion",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.documentai.v1.DocumentProcessorService",
"UndeployProcessorVersion",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn create_processor(
&mut self,
request: impl tonic::IntoRequest<super::CreateProcessorRequest>,
) -> std::result::Result<tonic::Response<super::Processor>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.documentai.v1.DocumentProcessorService/CreateProcessor",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.documentai.v1.DocumentProcessorService",
"CreateProcessor",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete_processor(
&mut self,
request: impl tonic::IntoRequest<super::DeleteProcessorRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.documentai.v1.DocumentProcessorService/DeleteProcessor",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.documentai.v1.DocumentProcessorService",
"DeleteProcessor",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn enable_processor(
&mut self,
request: impl tonic::IntoRequest<super::EnableProcessorRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.documentai.v1.DocumentProcessorService/EnableProcessor",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.documentai.v1.DocumentProcessorService",
"EnableProcessor",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn disable_processor(
&mut self,
request: impl tonic::IntoRequest<super::DisableProcessorRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.documentai.v1.DocumentProcessorService/DisableProcessor",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.documentai.v1.DocumentProcessorService",
"DisableProcessor",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn set_default_processor_version(
&mut self,
request: impl tonic::IntoRequest<super::SetDefaultProcessorVersionRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.documentai.v1.DocumentProcessorService/SetDefaultProcessorVersion",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.documentai.v1.DocumentProcessorService",
"SetDefaultProcessorVersion",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn review_document(
&mut self,
request: impl tonic::IntoRequest<super::ReviewDocumentRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.documentai.v1.DocumentProcessorService/ReviewDocument",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.documentai.v1.DocumentProcessorService",
"ReviewDocument",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn evaluate_processor_version(
&mut self,
request: impl tonic::IntoRequest<super::EvaluateProcessorVersionRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.documentai.v1.DocumentProcessorService/EvaluateProcessorVersion",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.documentai.v1.DocumentProcessorService",
"EvaluateProcessorVersion",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_evaluation(
&mut self,
request: impl tonic::IntoRequest<super::GetEvaluationRequest>,
) -> std::result::Result<tonic::Response<super::Evaluation>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.documentai.v1.DocumentProcessorService/GetEvaluation",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.documentai.v1.DocumentProcessorService",
"GetEvaluation",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_evaluations(
&mut self,
request: impl tonic::IntoRequest<super::ListEvaluationsRequest>,
) -> std::result::Result<
tonic::Response<super::ListEvaluationsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.documentai.v1.DocumentProcessorService/ListEvaluations",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.documentai.v1.DocumentProcessorService",
"ListEvaluations",
),
);
self.inner.unary(req, path, codec).await
}
}
}