Class StyleReferenceImage

java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.StyleReferenceImage

public abstract class StyleReferenceImage extends JsonSerializable
A style reference image.

This encapsulates a style reference image provided by the user, and additionally optional config parameters for the style reference image.

A raw reference image can also be provided as a destination for the style to be applied to.

  • Constructor Details

    • StyleReferenceImage

      public StyleReferenceImage()
  • Method Details

    • referenceImage

      public abstract Optional<Image> referenceImage()
      The reference image for the editing operation.
    • referenceId

      public abstract Optional<Integer> referenceId()
      The id of the reference image.
    • referenceType

      public abstract Optional<String> referenceType()
      The type of the reference image. Only set by the SDK.
    • config

      public abstract Optional<StyleReferenceConfig> config()
      Configuration for the style reference image.
    • builder

      public static StyleReferenceImage.Builder builder()
      Instantiates a builder for StyleReferenceImage.
    • toBuilder

      public abstract StyleReferenceImage.Builder toBuilder()
      Creates a builder with the same values as this instance.
    • fromJson

      public static StyleReferenceImage fromJson(String jsonString)
      Deserializes a JSON string to a StyleReferenceImage object.