Package com.google.genai.types
Class ImageConfig
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.ImageConfig
The image generation configuration to be used in GenerateContentConfig.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAspect ratio of the generated images.static ImageConfig.Builderbuilder()Instantiates a builder for ImageConfig.static ImageConfigDeserializes a JSON string to a ImageConfig object.abstract ImageConfig.BuilderCreates a builder with the same values as this instance.Methods inherited from class com.google.genai.JsonSerializable
stringToJsonNode, toJson
-
Constructor Details
-
ImageConfig
public ImageConfig()
-
-
Method Details
-
aspectRatio
Aspect ratio of the generated images. Supported values are "1:1", "2:3", "3:2", "3:4", "4:3", "9:16", "16:9", and "21:9". -
builder
Instantiates a builder for ImageConfig. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a ImageConfig object.
-