Package com.google.genai.types
Class GeneratedImageMask
-
- All Implemented Interfaces:
public abstract class GeneratedImageMask extends JsonSerializable
A generated image mask.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classGeneratedImageMask.BuilderBuilder for GeneratedImageMask.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description GeneratedImageMask()
-
Method Summary
Modifier and Type Method Description abstract Optional<Image>mask()The generated image mask. abstract Optional<List<EntityLabel>>labels()The detected entities on the segmented area. static GeneratedImageMask.Builderbuilder()Instantiates a builder for GeneratedImageMask. abstract GeneratedImageMask.BuildertoBuilder()Creates a builder with the same values as this instance. static GeneratedImageMaskfromJson(String jsonString)Deserializes a JSON string to a GeneratedImageMask object. -
Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
labels
abstract Optional<List<EntityLabel>> labels()
The detected entities on the segmented area.
-
builder
static GeneratedImageMask.Builder builder()
Instantiates a builder for GeneratedImageMask.
-
toBuilder
abstract GeneratedImageMask.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static GeneratedImageMask fromJson(String jsonString)
Deserializes a JSON string to a GeneratedImageMask object.
-
-
-
-