Class ImagesResponse.Builder
-
- All Implemented Interfaces:
public final class ImagesResponse.Builder
A builder for ImagesResponse.
-
-
Method Summary
-
-
Method Detail
-
created
final ImagesResponse.Builder created(Long created)
The Unix timestamp (in seconds) of when the image was created.
-
created
final ImagesResponse.Builder created(JsonField<Long> created)
Sets Builder.created to an arbitrary JSON value.
You should usually call Builder.created with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
background
final ImagesResponse.Builder background(ImagesResponse.Background background)
The background parameter used for the image generation. Either
transparent
oropaque
.
-
background
final ImagesResponse.Builder background(JsonField<ImagesResponse.Background> background)
Sets Builder.background to an arbitrary JSON value.
You should usually call Builder.background with a well-typed Background value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
data
final ImagesResponse.Builder data(List<Image> data)
The list of generated images.
-
data
final ImagesResponse.Builder data(JsonField<List<Image>> data)
Sets Builder.data to an arbitrary JSON value.
You should usually call Builder.data with a well-typed
List<Image>
value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addData
final ImagesResponse.Builder addData(Image data)
Adds a single Image to Builder.data.
-
outputFormat
final ImagesResponse.Builder outputFormat(ImagesResponse.OutputFormat outputFormat)
The output format of the image generation. Either
png
,webp
, orjpeg
.
-
outputFormat
final ImagesResponse.Builder outputFormat(JsonField<ImagesResponse.OutputFormat> outputFormat)
Sets Builder.outputFormat to an arbitrary JSON value.
You should usually call Builder.outputFormat with a well-typed OutputFormat value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
quality
final ImagesResponse.Builder quality(ImagesResponse.Quality quality)
The quality of the image generated. Either
low
,medium
, orhigh
.
-
quality
final ImagesResponse.Builder quality(JsonField<ImagesResponse.Quality> quality)
Sets Builder.quality to an arbitrary JSON value.
You should usually call Builder.quality with a well-typed Quality value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
size
final ImagesResponse.Builder size(ImagesResponse.Size size)
The size of the image generated. Either
1024x1024
,1024x1536
, or1536x1024
.
-
size
final ImagesResponse.Builder size(JsonField<ImagesResponse.Size> size)
Sets Builder.size to an arbitrary JSON value.
You should usually call Builder.size with a well-typed Size value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
usage
final ImagesResponse.Builder usage(ImagesResponse.Usage usage)
For
gpt-image-1
only, the token usage information for the image generation.
-
usage
final ImagesResponse.Builder usage(JsonField<ImagesResponse.Usage> usage)
Sets Builder.usage to an arbitrary JSON value.
You should usually call Builder.usage with a well-typed Usage value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final ImagesResponse.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final ImagesResponse.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final ImagesResponse.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final ImagesResponse.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final ImagesResponse.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final ImagesResponse build()
Returns an immutable instance of ImagesResponse.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.created()
-
-
-
-