Package com.google.genai.types
Class GenerateImagesResponse
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.GenerateImagesResponse
The output images response.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for GenerateImagesResponse. -
Field Summary
Fields inherited from class com.google.genai.JsonSerializable
MAX_READ_LENGTH_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Instantiates a builder for GenerateImagesResponse.static GenerateImagesResponseDeserializes a JSON string to a GenerateImagesResponse object.abstract Optional<List<GeneratedImage>>List of generated images.@Nullable com.google.common.collect.ImmutableList<Image>images()Returns the list of images from the response.abstract Optional<SafetyAttributes>Safety attributes of the positive prompt.abstract Optional<HttpResponse>Used to retain the full HTTP response.abstract GenerateImagesResponse.BuilderCreates a builder with the same values as this instance.Methods inherited from class com.google.genai.JsonSerializable
setMaxReadLength, stringToJsonNode, toJson
-
Constructor Details
-
GenerateImagesResponse
public GenerateImagesResponse()
-
-
Method Details
-
sdkHttpResponse
Used to retain the full HTTP response. -
generatedImages
List of generated images. -
positivePromptSafetyAttributes
Safety attributes of the positive prompt. Only populated if ``include_safety_attributes`` is set to True. -
builder
Instantiates a builder for GenerateImagesResponse. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a GenerateImagesResponse object. -
images
Returns the list of images from the response.Returns null if there are no generated images in the response.
-