Package com.google.genai.types
Class SegmentImageSource
-
- All Implemented Interfaces:
public abstract class SegmentImageSource extends JsonSerializable
A set of source input(s) for image segmentation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classSegmentImageSource.BuilderBuilder for SegmentImageSource.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description SegmentImageSource()
-
Method Summary
Modifier and Type Method Description abstract Optional<String>prompt()A text prompt for guiding the model during image segmentation. abstract Optional<Image>image()The image to be segmented. abstract Optional<ScribbleImage>scribbleImage()The brush scribble to guide segmentation. static SegmentImageSource.Builderbuilder()Instantiates a builder for SegmentImageSource. abstract SegmentImageSource.BuildertoBuilder()Creates a builder with the same values as this instance. static SegmentImageSourcefromJson(String jsonString)Deserializes a JSON string to a SegmentImageSource 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
-
prompt
abstract Optional<String> prompt()
A text prompt for guiding the model during image segmentation. Required for prompt mode and semantic mode, disallowed for other modes.
-
scribbleImage
abstract Optional<ScribbleImage> scribbleImage()
The brush scribble to guide segmentation. Required for the interactive mode, disallowed for other modes.
-
builder
static SegmentImageSource.Builder builder()
Instantiates a builder for SegmentImageSource.
-
toBuilder
abstract SegmentImageSource.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static SegmentImageSource fromJson(String jsonString)
Deserializes a JSON string to a SegmentImageSource object.
-
-
-
-