Class ImageGenCompletedEvent
-
- All Implemented Interfaces:
public final class ImageGenCompletedEvent
Emitted when image generation has completed and the final image is available.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
ImageGenCompletedEvent.Builder
A builder for ImageGenCompletedEvent.
public final class
ImageGenCompletedEvent.Background
The background setting for the generated image.
public final class
ImageGenCompletedEvent.OutputFormat
The output format for the generated image.
public final class
ImageGenCompletedEvent.Quality
The quality setting for the generated image.
public final class
ImageGenCompletedEvent.Size
The size of the generated image.
public final class
ImageGenCompletedEvent.Usage
For
gpt-image-1
only, the token usage information for the image generation.
-
Method Summary
Modifier and Type Method Description final String
b64Json()
Base64-encoded image data, suitable for rendering as an image. final ImageGenCompletedEvent.Background
background()
The background setting for the generated image. final Long
createdAt()
The Unix timestamp when the event was created. final ImageGenCompletedEvent.OutputFormat
outputFormat()
The output format for the generated image. final ImageGenCompletedEvent.Quality
quality()
The quality setting for the generated image. final ImageGenCompletedEvent.Size
size()
The size of the generated image. final JsonValue
_type()
The type of the event. final ImageGenCompletedEvent.Usage
usage()
For gpt-image-1
only, the token usage information for the image generation.final JsonField<String>
_b64Json()
Returns the raw JSON value of b64Json. final JsonField<ImageGenCompletedEvent.Background>
_background()
Returns the raw JSON value of background. final JsonField<Long>
_createdAt()
Returns the raw JSON value of createdAt. final JsonField<ImageGenCompletedEvent.OutputFormat>
_outputFormat()
Returns the raw JSON value of outputFormat. final JsonField<ImageGenCompletedEvent.Quality>
_quality()
Returns the raw JSON value of quality. final JsonField<ImageGenCompletedEvent.Size>
_size()
Returns the raw JSON value of size. final JsonField<ImageGenCompletedEvent.Usage>
_usage()
Returns the raw JSON value of usage. final Map<String, JsonValue>
_additionalProperties()
final ImageGenCompletedEvent.Builder
toBuilder()
final ImageGenCompletedEvent
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static ImageGenCompletedEvent.Builder
builder()
Returns a mutable builder for constructing an instance of ImageGenCompletedEvent. -
-
Method Detail
-
background
final ImageGenCompletedEvent.Background background()
The background setting for the generated image.
-
outputFormat
final ImageGenCompletedEvent.OutputFormat outputFormat()
The output format for the generated image.
-
quality
final ImageGenCompletedEvent.Quality quality()
The quality setting for the generated image.
-
size
final ImageGenCompletedEvent.Size size()
The size of the generated image.
-
_type
final JsonValue _type()
The type of the event. Always
image_generation.completed
.Expected to always return the following:
JsonValue.from("image_generation.completed")
However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
usage
final ImageGenCompletedEvent.Usage usage()
For
gpt-image-1
only, the token usage information for the image generation.
-
_b64Json
final JsonField<String> _b64Json()
Returns the raw JSON value of b64Json.
Unlike b64Json, this method doesn't throw if the JSON field has an unexpected type.
-
_background
final JsonField<ImageGenCompletedEvent.Background> _background()
Returns the raw JSON value of background.
Unlike background, this method doesn't throw if the JSON field has an unexpected type.
-
_createdAt
final JsonField<Long> _createdAt()
Returns the raw JSON value of createdAt.
Unlike createdAt, this method doesn't throw if the JSON field has an unexpected type.
-
_outputFormat
final JsonField<ImageGenCompletedEvent.OutputFormat> _outputFormat()
Returns the raw JSON value of outputFormat.
Unlike outputFormat, this method doesn't throw if the JSON field has an unexpected type.
-
_quality
final JsonField<ImageGenCompletedEvent.Quality> _quality()
Returns the raw JSON value of quality.
Unlike quality, this method doesn't throw if the JSON field has an unexpected type.
-
_size
final JsonField<ImageGenCompletedEvent.Size> _size()
Returns the raw JSON value of size.
Unlike size, this method doesn't throw if the JSON field has an unexpected type.
-
_usage
final JsonField<ImageGenCompletedEvent.Usage> _usage()
Returns the raw JSON value of usage.
Unlike usage, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final ImageGenCompletedEvent.Builder toBuilder()
-
validate
final ImageGenCompletedEvent validate()
-
builder
final static ImageGenCompletedEvent.Builder builder()
Returns a mutable builder for constructing an instance of ImageGenCompletedEvent.
The following fields are required:
.b64Json() .background() .createdAt() .outputFormat() .quality() .size() .usage()
-
-
-
-