Package com.google.genai.types
Class GenerateImagesResponse
-
- All Implemented Interfaces:
public abstract class GenerateImagesResponse extends JsonSerializable
The output images response.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classGenerateImagesResponse.BuilderBuilder for GenerateImagesResponse.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description GenerateImagesResponse()
-
Method Summary
Modifier and Type Method Description abstract Optional<HttpResponse>sdkHttpResponse()Used to retain the full HTTP response. abstract Optional<List<GeneratedImage>>generatedImages()List of generated images. abstract Optional<SafetyAttributes>positivePromptSafetyAttributes()Safety attributes of the positive prompt. static GenerateImagesResponse.Builderbuilder()Instantiates a builder for GenerateImagesResponse. abstract GenerateImagesResponse.BuildertoBuilder()Creates a builder with the same values as this instance. static GenerateImagesResponsefromJson(String jsonString)Deserializes a JSON string to a GenerateImagesResponse object. ImmutableList<Image>images()Returns the list of images from the response. -
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
-
sdkHttpResponse
abstract Optional<HttpResponse> sdkHttpResponse()
Used to retain the full HTTP response.
-
generatedImages
abstract Optional<List<GeneratedImage>> generatedImages()
List of generated images.
-
positivePromptSafetyAttributes
abstract Optional<SafetyAttributes> positivePromptSafetyAttributes()
Safety attributes of the positive prompt. Only populated if ``include_safety_attributes`` is set to True.
-
builder
static GenerateImagesResponse.Builder builder()
Instantiates a builder for GenerateImagesResponse.
-
toBuilder
abstract GenerateImagesResponse.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static GenerateImagesResponse fromJson(String jsonString)
Deserializes a JSON string to a GenerateImagesResponse object.
-
-
-
-