Class DocumentField

java.lang.Object
com.azure.ai.documentintelligence.models.DocumentField
All Implemented Interfaces:
com.azure.json.JsonSerializable<DocumentField>

public final class DocumentField extends Object implements com.azure.json.JsonSerializable<DocumentField>
An object representing the content and location of a field value.
  • Method Details

    • getType

      public DocumentFieldType getType()
      Get the type property: Data type of the field value.
      Returns:
      the type value.
    • getValueString

      public String getValueString()
      Get the valueString property: String value.
      Returns:
      the valueString value.
    • getValueDate

      public LocalDate getValueDate()
      Get the valueDate property: Date value in YYYY-MM-DD format (ISO 8601).
      Returns:
      the valueDate value.
    • getValueTime

      public String getValueTime()
      Get the valueTime property: Time value in hh:mm:ss format (ISO 8601).
      Returns:
      the valueTime value.
    • getValuePhoneNumber

      public String getValuePhoneNumber()
      Get the valuePhoneNumber property: Phone number value in E.164 format (ex. +19876543210).
      Returns:
      the valuePhoneNumber value.
    • getValueNumber

      public Double getValueNumber()
      Get the valueNumber property: Floating point value.
      Returns:
      the valueNumber value.
    • getValueInteger

      public Long getValueInteger()
      Get the valueInteger property: Integer value.
      Returns:
      the valueInteger value.
    • getValueSelectionMark

      public DocumentSelectionMarkState getValueSelectionMark()
      Get the valueSelectionMark property: Selection mark value.
      Returns:
      the valueSelectionMark value.
    • getValueSignature

      public DocumentSignatureType getValueSignature()
      Get the valueSignature property: Presence of signature.
      Returns:
      the valueSignature value.
    • getValueCountryRegion

      public String getValueCountryRegion()
      Get the valueCountryRegion property: 3-letter country code value (ISO 3166-1 alpha-3).
      Returns:
      the valueCountryRegion value.
    • getValueArray

      public List<DocumentField> getValueArray()
      Get the valueArray property: Array of field values.
      Returns:
      the valueArray value.
    • getValueObject

      public Map<String,DocumentField> getValueObject()
      Get the valueObject property: Dictionary of named field values.
      Returns:
      the valueObject value.
    • getValueCurrency

      public CurrencyValue getValueCurrency()
      Get the valueCurrency property: Currency value.
      Returns:
      the valueCurrency value.
    • getValueAddress

      public AddressValue getValueAddress()
      Get the valueAddress property: Address value.
      Returns:
      the valueAddress value.
    • isValueBoolean

      public Boolean isValueBoolean()
      Get the valueBoolean property: Boolean value.
      Returns:
      the valueBoolean value.
    • getValueSelectionGroup

      public List<String> getValueSelectionGroup()
      Get the valueSelectionGroup property: Selection group value.
      Returns:
      the valueSelectionGroup value.
    • getContent

      public String getContent()
      Get the content property: Field content.
      Returns:
      the content value.
    • getBoundingRegions

      public List<BoundingRegion> getBoundingRegions()
      Get the boundingRegions property: Bounding regions covering the field.
      Returns:
      the boundingRegions value.
    • getSpans

      public List<DocumentSpan> getSpans()
      Get the spans property: Location of the field in the reading order concatenated content.
      Returns:
      the spans value.
    • getConfidence

      public Double getConfidence()
      Get the confidence property: Confidence of correctly extracting the field.
      Returns:
      the confidence value.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<DocumentField>
      Throws:
      IOException
    • fromJson

      public static DocumentField fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of DocumentField from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of DocumentField if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the DocumentField.