Share via


AccessoryItem Class

  • java.lang.Object
    • com.azure.ai.vision.face.models.AccessoryItem

Implements

public final class AccessoryItem
implements JsonSerializable<AccessoryItem>

Accessory item and corresponding confidence level.

Method Summary

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

Reads an instance of AccessoryItem from the JsonReader.

double getConfidence()

Get the confidence property: Confidence level of the accessory type.

AccessoryType getType()

Get the type property: Type of the accessory.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static AccessoryItem fromJson(JsonReader jsonReader)

Reads an instance of AccessoryItem from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of AccessoryItem 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.

getConfidence

public double getConfidence()

Get the confidence property: Confidence level of the accessory type. Range between [0,1].

Returns:

the confidence value.

getType

public AccessoryType getType()

Get the type property: Type of the accessory.

Returns:

the type value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to