Freigeben über


ContentFieldDefinition Class

  • java.lang.Object
    • com.azure.ai.contentunderstanding.models.ContentFieldDefinition

Implements

public final class ContentFieldDefinition
implements JsonSerializable<ContentFieldDefinition>

Definition of the field using a JSON Schema like syntax.

Constructor Summary

Constructor Description
ContentFieldDefinition()

Creates an instance of ContentFieldDefinition class.

Method Summary

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

Reads an instance of ContentFieldDefinition from the JsonReader.

String getDescription()

Get the description property: Field description.

Map<String,String> getEnumDescriptions()

Get the enumDescriptions property: Descriptions for each enumeration value.

List<String> getEnumProperty()

Get the enumProperty property: Enumeration of possible field values.

List<String> getExamples()

Get the examples property: Examples of field values.

ContentFieldDefinition getItemDefinition()

Get the itemDefinition property: Field type schema of each array element, if type is array.

GenerationMethod getMethod()

Get the method property: Generation method.

Map<String,ContentFieldDefinition> getProperties()

Get the properties property: Named sub-fields, if type is object.

String getRef()

Get the ref property: Reference to another field definition.

ContentFieldType getType()

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

Boolean isEstimateSourceAndConfidence()

Get the estimateSourceAndConfidence property: Return grounding source and confidence.

ContentFieldDefinition setDescription(String description)

Set the description property: Field description.

ContentFieldDefinition setEnumDescriptions(Map<String,String> enumDescriptions)

Set the enumDescriptions property: Descriptions for each enumeration value.

ContentFieldDefinition setEnumProperty(List<String> enumProperty)

Set the enumProperty property: Enumeration of possible field values.

ContentFieldDefinition setEstimateSourceAndConfidence(Boolean estimateSourceAndConfidence)

Set the estimateSourceAndConfidence property: Return grounding source and confidence.

ContentFieldDefinition setExamples(List<String> examples)

Set the examples property: Examples of field values.

ContentFieldDefinition setItemDefinition(ContentFieldDefinition itemDefinition)

Set the itemDefinition property: Field type schema of each array element, if type is array.

ContentFieldDefinition setMethod(GenerationMethod method)

Set the method property: Generation method.

ContentFieldDefinition setProperties(Map<String,ContentFieldDefinition> properties)

Set the properties property: Named sub-fields, if type is object.

ContentFieldDefinition setRef(String ref)

Set the ref property: Reference to another field definition.

ContentFieldDefinition setType(ContentFieldType type)

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

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

ContentFieldDefinition

public ContentFieldDefinition()

Creates an instance of ContentFieldDefinition class.

Method Details

fromJson

public static ContentFieldDefinition fromJson(JsonReader jsonReader)

Reads an instance of ContentFieldDefinition from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ContentFieldDefinition if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the ContentFieldDefinition.

getDescription

public String getDescription()

Get the description property: Field description.

Returns:

the description value.

getEnumDescriptions

public Map<String,String> getEnumDescriptions()

Get the enumDescriptions property: Descriptions for each enumeration value.

Returns:

the enumDescriptions value.

getEnumProperty

public List<String> getEnumProperty()

Get the enumProperty property: Enumeration of possible field values.

Returns:

the enumProperty value.

getExamples

public List<String> getExamples()

Get the examples property: Examples of field values.

Returns:

the examples value.

getItemDefinition

public ContentFieldDefinition getItemDefinition()

Get the itemDefinition property: Field type schema of each array element, if type is array.

Returns:

the itemDefinition value.

getMethod

public GenerationMethod getMethod()

Get the method property: Generation method.

Returns:

the method value.

getProperties

public Map<String,ContentFieldDefinition> getProperties()

Get the properties property: Named sub-fields, if type is object.

Returns:

the properties value.

getRef

public String getRef()

Get the ref property: Reference to another field definition.

Returns:

the ref value.

getType

public ContentFieldType getType()

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

Returns:

the type value.

isEstimateSourceAndConfidence

public Boolean isEstimateSourceAndConfidence()

Get the estimateSourceAndConfidence property: Return grounding source and confidence.

Returns:

the estimateSourceAndConfidence value.

setDescription

public ContentFieldDefinition setDescription(String description)

Set the description property: Field description.

Parameters:

description - the description value to set.

Returns:

the ContentFieldDefinition object itself.

setEnumDescriptions

public ContentFieldDefinition setEnumDescriptions(Map<String,String> enumDescriptions)

Set the enumDescriptions property: Descriptions for each enumeration value.

Parameters:

enumDescriptions - the enumDescriptions value to set.

Returns:

the ContentFieldDefinition object itself.

setEnumProperty

public ContentFieldDefinition setEnumProperty(List<String> enumProperty)

Set the enumProperty property: Enumeration of possible field values.

Parameters:

enumProperty - the enumProperty value to set.

Returns:

the ContentFieldDefinition object itself.

setEstimateSourceAndConfidence

public ContentFieldDefinition setEstimateSourceAndConfidence(Boolean estimateSourceAndConfidence)

Set the estimateSourceAndConfidence property: Return grounding source and confidence.

Parameters:

estimateSourceAndConfidence - the estimateSourceAndConfidence value to set.

Returns:

the ContentFieldDefinition object itself.

setExamples

public ContentFieldDefinition setExamples(List<String> examples)

Set the examples property: Examples of field values.

Parameters:

examples - the examples value to set.

Returns:

the ContentFieldDefinition object itself.

setItemDefinition

public ContentFieldDefinition setItemDefinition(ContentFieldDefinition itemDefinition)

Set the itemDefinition property: Field type schema of each array element, if type is array.

Parameters:

itemDefinition - the itemDefinition value to set.

Returns:

the ContentFieldDefinition object itself.

setMethod

public ContentFieldDefinition setMethod(GenerationMethod method)

Set the method property: Generation method.

Parameters:

method - the method value to set.

Returns:

the ContentFieldDefinition object itself.

setProperties

public ContentFieldDefinition setProperties(Map<String,ContentFieldDefinition> properties)

Set the properties property: Named sub-fields, if type is object.

Parameters:

properties - the properties value to set.

Returns:

the ContentFieldDefinition object itself.

setRef

public ContentFieldDefinition setRef(String ref)

Set the ref property: Reference to another field definition.

Parameters:

ref - the ref value to set.

Returns:

the ContentFieldDefinition object itself.

setType

public ContentFieldDefinition setType(ContentFieldType type)

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

Parameters:

type - the type value to set.

Returns:

the ContentFieldDefinition object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to