Package com.google.genai.types
Class StyleReferenceImage
-
- All Implemented Interfaces:
-
com.google.genai.types.ReferenceImage
public abstract class StyleReferenceImage extends JsonSerializable implements ReferenceImage
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classStyleReferenceImage.BuilderBuilder for StyleReferenceImage.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description StyleReferenceImage()
-
Method Summary
Modifier and Type Method Description abstract Optional<Image>referenceImage()The reference image for the editing operation. abstract Optional<Integer>referenceId()The id of the reference image. abstract Optional<String>referenceType()The type of the reference image. abstract Optional<StyleReferenceConfig>config()Configuration for the style reference image. static StyleReferenceImage.Builderbuilder()Instantiates a builder for StyleReferenceImage. abstract StyleReferenceImage.BuildertoBuilder()Creates a builder with the same values as this instance. static StyleReferenceImagefromJson(String jsonString)Deserializes a JSON string to a StyleReferenceImage object. ReferenceImageAPItoReferenceImageAPI()-
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
-
referenceImage
abstract Optional<Image> referenceImage()
The reference image for the editing operation.
-
referenceId
abstract Optional<Integer> referenceId()
The id of the reference image.
-
referenceType
abstract Optional<String> referenceType()
The type of the reference image. Only set by the SDK.
-
config
abstract Optional<StyleReferenceConfig> config()
Configuration for the style reference image.
-
builder
static StyleReferenceImage.Builder builder()
Instantiates a builder for StyleReferenceImage.
-
toBuilder
abstract StyleReferenceImage.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static StyleReferenceImage fromJson(String jsonString)
Deserializes a JSON string to a StyleReferenceImage object.
-
toReferenceImageAPI
ReferenceImageAPI toReferenceImageAPI()
-
-
-
-