Partager via


DocumentFieldSchema Class

  • java.lang.Object
    • com.azure.ai.documentintelligence.models.DocumentFieldSchema

Implements

public final class DocumentFieldSchema
implements JsonSerializable<DocumentFieldSchema>

Description of the field semantic schema using a JSON Schema style syntax.

Constructor Summary

Constructor Description
DocumentFieldSchema(DocumentFieldType type)

Creates an instance of DocumentFieldSchema class.

Method Summary

Modifier and Type Method and Description
static DocumentFieldSchema fromJson(JsonReader jsonReader)

Reads an instance of DocumentFieldSchema from the JsonReader.

String getDescription()

Get the description property: Field description.

String getExample()

Get the example property: Example field content.

DocumentFieldSchema getItems()

Get the items property: Field type schema of each array element.

Map<String,DocumentFieldSchema> getProperties()

Get the properties property: Named sub-fields of the object field.

DocumentFieldType getType()

Get the type property: Semantic data type of the field value.

DocumentFieldSchema setDescription(String description)

Set the description property: Field description.

DocumentFieldSchema setExample(String example)

Set the example property: Example field content.

DocumentFieldSchema setItems(DocumentFieldSchema items)

Set the items property: Field type schema of each array element.

DocumentFieldSchema setProperties(Map<String,DocumentFieldSchema> properties)

Set the properties property: Named sub-fields of the object field.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

DocumentFieldSchema

public DocumentFieldSchema(DocumentFieldType type)

Creates an instance of DocumentFieldSchema class.

Parameters:

type - the type value to set.

Method Details

fromJson

public static DocumentFieldSchema fromJson(JsonReader jsonReader)

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:

IOException

- If the deserialized JSON object was missing any required properties.

getDescription

public String getDescription()

Get the description property: Field description.

Returns:

the description value.

getExample

public String getExample()

Get the example property: Example field content.

Returns:

the example value.

getItems

public DocumentFieldSchema getItems()

Get the items property: Field type schema of each array element.

Returns:

the items value.

getProperties

public Map getProperties()

Get the properties property: Named sub-fields of the object field.

Returns:

the properties value.

getType

public DocumentFieldType getType()

Get the type property: Semantic data type of the field value.

Returns:

the type 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.

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.

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.

setProperties

public DocumentFieldSchema setProperties(Map 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 JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to