ContentObjectField Class
- java.
lang. Object - com.
azure. ai. contentunderstanding. models. ContentField - com.
azure. ai. contentunderstanding. models. ContentObjectField
- com.
- com.
public final class ContentObjectField
extends ContentField
Object field extracted from the content.
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Content |
fromJson(JsonReader jsonReader)
Reads an instance of Content |
|
Content |
getField(String fieldName)
Gets a field from the object by name. |
|
Content |
getFieldOrDefault(String fieldName)
Gets a field from the object by name, or null if the field does not exist. |
|
Content |
getType()
Get the type property: Semantic data type of the field value. |
|
Map<String,Content |
getValue()
Gets the strongly-typed value of this field. |
|
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from ContentField
Methods inherited from java.lang.Object
Method Details
fromJson
public static ContentObjectField fromJson(JsonReader jsonReader)
Reads an instance of ContentObjectField from the JsonReader.
Parameters:
Returns:
Throws:
getField
public ContentField getField(String fieldName)
Gets a field from the object by name.
Parameters:
Returns:
getFieldOrDefault
public ContentField getFieldOrDefault(String fieldName)
Gets a field from the object by name, or null if the field does not exist.
Parameters:
Returns:
getType
public ContentFieldType getType()
Get the type property: Semantic data type of the field value.
Overrides:
ContentObjectField.getType()Returns:
getValue
public Map<String,ContentField> getValue()
Gets the strongly-typed value of this field.
Overrides:
ContentObjectField.getValue()Returns:
toJson
public JsonWriter toJson(JsonWriter jsonWriter)
Overrides:
ContentObjectField.toJson(JsonWriter jsonWriter)Parameters:
Throws: