Class DocumentFieldSchema

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

public final class DocumentFieldSchema extends Object implements com.azure.json.JsonSerializable<DocumentFieldSchema>
Description of the field semantic schema using a JSON Schema style syntax.
  • Constructor Details

    • DocumentFieldSchema

      public DocumentFieldSchema(DocumentFieldType type)
      Creates an instance of DocumentFieldSchema class.
      Parameters:
      type - the type value to set.
  • Method Details

    • getType

      public DocumentFieldType getType()
      Get the type property: Semantic data type of the field value.
      Returns:
      the type value.
    • getDescription

      public String getDescription()
      Get the description property: Field description.
      Returns:
      the description value.
    • setDescription

      public DocumentFieldSchema setDescription(String description)
      Set the description property: Field description.
      Parameters:
      description - the description value to set.
      Returns:
      the DocumentFieldSchema object itself.
    • getExample

      public String getExample()
      Get the example property: Example field content.
      Returns:
      the example value.
    • setExample

      public DocumentFieldSchema setExample(String example)
      Set the example property: Example field content.
      Parameters:
      example - the example value to set.
      Returns:
      the DocumentFieldSchema object itself.
    • getItems

      public DocumentFieldSchema getItems()
      Get the items property: Field type schema of each array element.
      Returns:
      the items value.
    • setItems

      public DocumentFieldSchema setItems(DocumentFieldSchema items)
      Set the items property: Field type schema of each array element.
      Parameters:
      items - the items value to set.
      Returns:
      the DocumentFieldSchema object itself.
    • getProperties

      public Map<String,DocumentFieldSchema> getProperties()
      Get the properties property: Named sub-fields of the object field.
      Returns:
      the properties value.
    • setProperties

      public DocumentFieldSchema setProperties(Map<String,DocumentFieldSchema> properties)
      Set the properties property: Named sub-fields of the object field.
      Parameters:
      properties - the properties value to set.
      Returns:
      the DocumentFieldSchema object itself.
    • toJson

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

      public static DocumentFieldSchema fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of DocumentFieldSchema from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of DocumentFieldSchema 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 DocumentFieldSchema.