Class EntityLabel

java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.EntityLabel

public abstract class EntityLabel extends JsonSerializable
An entity representing the segmented area.
  • Constructor Details

    • EntityLabel

      public EntityLabel()
  • Method Details

    • label

      public abstract Optional<String> label()
      The label of the segmented entity.
    • score

      public abstract Optional<Float> score()
      The confidence score of the detected label.
    • builder

      public static EntityLabel.Builder builder()
      Instantiates a builder for EntityLabel.
    • toBuilder

      public abstract EntityLabel.Builder toBuilder()
      Creates a builder with the same values as this instance.
    • fromJson

      public static EntityLabel fromJson(String jsonString)
      Deserializes a JSON string to a EntityLabel object.