Class GeneratedImage

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public abstract class GeneratedImage.Builder

      Builder for GeneratedImage.

    • Constructor Summary

      Constructors 
      Constructor Description
      GeneratedImage()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Optional<Image> image() The output image data.
      abstract Optional<String> raiFilteredReason() Responsible AI filter reason if the image is filtered out of the response.
      abstract Optional<SafetyAttributes> safetyAttributes() Safety attributes of the image.
      abstract Optional<String> enhancedPrompt() The rewritten prompt used for the image generation if the prompt enhancer is enabled.
      static GeneratedImage.Builder builder() Instantiates a builder for GeneratedImage.
      abstract GeneratedImage.Builder toBuilder() Creates a builder with the same values as this instance.
      static GeneratedImage fromJson(String jsonString) Deserializes a JSON string to a GeneratedImage 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