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 Summary
ConstructorDescriptionCreates an instance of DocumentFieldSchema class. -
Method Summary
Modifier and TypeMethodDescriptionstatic DocumentFieldSchema
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of DocumentFieldSchema from the JsonReader.Get the description property: Field description.Get the example property: Example field content.getItems()
Get the items property: Field type schema of each array element.Get the properties property: Named sub-fields of the object field.getType()
Get the type property: Semantic data type of the field value.setDescription
(String description) Set the description property: Field description.setExample
(String example) Set the example property: Example field content.setItems
(DocumentFieldSchema items) Set the items property: Field type schema of each array element.setProperties
(Map<String, DocumentFieldSchema> properties) Set the properties property: Named sub-fields of the object field.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
DocumentFieldSchema
Creates an instance of DocumentFieldSchema class.- Parameters:
type
- the type value to set.
-
-
Method Details
-
getType
Get the type property: Semantic data type of the field value.- Returns:
- the type value.
-
getDescription
Get the description property: Field description.- Returns:
- the description value.
-
setDescription
Set the description property: Field description.- Parameters:
description
- the description value to set.- Returns:
- the DocumentFieldSchema object itself.
-
getExample
Get the example property: Example field content.- Returns:
- the example value.
-
setExample
Set the example property: Example field content.- Parameters:
example
- the example value to set.- Returns:
- the DocumentFieldSchema object itself.
-
getItems
Get the items property: Field type schema of each array element.- Returns:
- the items value.
-
setItems
Set the items property: Field type schema of each array element.- Parameters:
items
- the items value to set.- Returns:
- the DocumentFieldSchema object itself.
-
getProperties
Get the properties property: Named sub-fields of the object field.- Returns:
- the properties value.
-
setProperties
Set the properties property: Named sub-fields of the object field.- Parameters:
properties
- the properties value to set.- Returns:
- the DocumentFieldSchema object itself.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<DocumentFieldSchema>
- Throws:
IOException
-
fromJson
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.
-