#[non_exhaustive]pub struct FormField {
pub field_name: Option<Layout>,
pub field_value: Option<Layout>,
pub name_detected_languages: Vec<DetectedLanguage>,
pub value_detected_languages: Vec<DetectedLanguage>,
pub value_type: String,
pub corrected_key_text: String,
pub corrected_value_text: String,
pub provenance: Option<Provenance>,
/* private fields */
}Expand description
A form field detected on the page.
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.field_name: Option<Layout>§field_value: Option<Layout>§name_detected_languages: Vec<DetectedLanguage>A list of detected languages for name together with confidence.
value_detected_languages: Vec<DetectedLanguage>A list of detected languages for value together with confidence.
value_type: StringIf the value is non-textual, this field represents the type. Current valid values are:
- blank (this indicates the
field_valueis normal text) unfilled_checkboxfilled_checkbox
corrected_key_text: StringCreated for Labeling UI to export key text.
If corrections were made to the text identified by the
field_name.text_anchor, this field will contain the correction.
corrected_value_text: StringCreated for Labeling UI to export value text.
If corrections were made to the text identified by the
field_value.text_anchor, this field will contain the correction.
provenance: Option<Provenance>The history of this annotation.
Implementations§
Source§impl FormField
impl FormField
pub fn new() -> Self
Sourcepub fn set_field_name<T>(self, v: T) -> Self
pub fn set_field_name<T>(self, v: T) -> Self
Sets the value of field_name.
§Example
use google_cloud_documentai_v1::model::document::page::Layout;
let x = FormField::new().set_field_name(Layout::default()/* use setters */);Sourcepub fn set_or_clear_field_name<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_field_name<T>(self, v: Option<T>) -> Self
Sets or clears the value of field_name.
§Example
use google_cloud_documentai_v1::model::document::page::Layout;
let x = FormField::new().set_or_clear_field_name(Some(Layout::default()/* use setters */));
let x = FormField::new().set_or_clear_field_name(None::<Layout>);Sourcepub fn set_field_value<T>(self, v: T) -> Self
pub fn set_field_value<T>(self, v: T) -> Self
Sets the value of field_value.
§Example
use google_cloud_documentai_v1::model::document::page::Layout;
let x = FormField::new().set_field_value(Layout::default()/* use setters */);Sourcepub fn set_or_clear_field_value<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_field_value<T>(self, v: Option<T>) -> Self
Sets or clears the value of field_value.
§Example
use google_cloud_documentai_v1::model::document::page::Layout;
let x = FormField::new().set_or_clear_field_value(Some(Layout::default()/* use setters */));
let x = FormField::new().set_or_clear_field_value(None::<Layout>);Sourcepub fn set_name_detected_languages<T, V>(self, v: T) -> Self
pub fn set_name_detected_languages<T, V>(self, v: T) -> Self
Sets the value of name_detected_languages.
§Example
use google_cloud_documentai_v1::model::document::page::DetectedLanguage;
let x = FormField::new()
.set_name_detected_languages([
DetectedLanguage::default()/* use setters */,
DetectedLanguage::default()/* use (different) setters */,
]);Sourcepub fn set_value_detected_languages<T, V>(self, v: T) -> Self
pub fn set_value_detected_languages<T, V>(self, v: T) -> Self
Sets the value of value_detected_languages.
§Example
use google_cloud_documentai_v1::model::document::page::DetectedLanguage;
let x = FormField::new()
.set_value_detected_languages([
DetectedLanguage::default()/* use setters */,
DetectedLanguage::default()/* use (different) setters */,
]);Sourcepub fn set_value_type<T: Into<String>>(self, v: T) -> Self
pub fn set_value_type<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_corrected_key_text<T: Into<String>>(self, v: T) -> Self
pub fn set_corrected_key_text<T: Into<String>>(self, v: T) -> Self
Sets the value of corrected_key_text.
§Example
let x = FormField::new().set_corrected_key_text("example");Sourcepub fn set_corrected_value_text<T: Into<String>>(self, v: T) -> Self
pub fn set_corrected_value_text<T: Into<String>>(self, v: T) -> Self
Sets the value of corrected_value_text.
§Example
let x = FormField::new().set_corrected_value_text("example");Sourcepub fn set_provenance<T>(self, v: T) -> Selfwhere
T: Into<Provenance>,
pub fn set_provenance<T>(self, v: T) -> Selfwhere
T: Into<Provenance>,
Sets the value of provenance.
§Example
use google_cloud_documentai_v1::model::document::Provenance;
let x = FormField::new().set_provenance(Provenance::default()/* use setters */);Sourcepub fn set_or_clear_provenance<T>(self, v: Option<T>) -> Selfwhere
T: Into<Provenance>,
pub fn set_or_clear_provenance<T>(self, v: Option<T>) -> Selfwhere
T: Into<Provenance>,
Sets or clears the value of provenance.
§Example
use google_cloud_documentai_v1::model::document::Provenance;
let x = FormField::new().set_or_clear_provenance(Some(Provenance::default()/* use setters */));
let x = FormField::new().set_or_clear_provenance(None::<Provenance>);