Class ImageConfig.Builder
- Enclosing class:
- ImageConfig
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract ImageConfig.BuilderaspectRatio(String aspectRatio) Setter for aspectRatio.abstract ImageConfigbuild()Clears the value of aspectRatio field.Clears the value of imageOutputOptions field.Clears the value of imageSize field.Clears the value of outputCompressionQuality field.Clears the value of outputMimeType field.Clears the value of personGeneration field.Clears the value of prominentPeople field.abstract ImageConfig.BuilderimageOutputOptions(ImageConfigImageOutputOptions imageOutputOptions) Setter for imageOutputOptions.imageOutputOptions(ImageConfigImageOutputOptions.Builder imageOutputOptionsBuilder) Setter for imageOutputOptions builder.abstract ImageConfig.BuilderSetter for imageSize.abstract ImageConfig.BuilderoutputCompressionQuality(Integer outputCompressionQuality) Setter for outputCompressionQuality.abstract ImageConfig.BuilderoutputMimeType(String outputMimeType) Setter for outputMimeType.abstract ImageConfig.BuilderpersonGeneration(String personGeneration) Setter for personGeneration.abstract ImageConfig.BuilderprominentPeople(ProminentPeople prominentPeople) Setter for prominentPeople.prominentPeople(ProminentPeople.Known knownType) Setter for prominentPeople given a known enum.prominentPeople(String prominentPeople) Setter for prominentPeople given a string.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
aspectRatio
Setter for aspectRatio.aspectRatio: Aspect ratio of the generated images. Supported values are "1:1", "2:3", "3:2", "3:4", "4:3", "9:16", "16:9", and "21:9".
-
clearAspectRatio
Clears the value of aspectRatio field. -
imageSize
Setter for imageSize.imageSize: Optional. Specifies the size of generated images. Supported values are `1K`, `2K`, `4K`. If not specified, the model will use default value `1K`.
-
clearImageSize
Clears the value of imageSize field. -
personGeneration
Setter for personGeneration.personGeneration: Controls the generation of people. Supported values are: ALLOW_ALL, ALLOW_ADULT, ALLOW_NONE.
-
clearPersonGeneration
Clears the value of personGeneration field. -
prominentPeople
Setter for prominentPeople.prominentPeople: Controls whether prominent people (celebrities) generation is allowed. If used with personGeneration, personGeneration enum would take precedence. For instance, if ALLOW_NONE is set, all person generation would be blocked. If this field is unspecified, the default behavior is to allow prominent people.
-
clearProminentPeople
Clears the value of prominentPeople field. -
prominentPeople
Setter for prominentPeople given a known enum.prominentPeople: Controls whether prominent people (celebrities) generation is allowed. If used with personGeneration, personGeneration enum would take precedence. For instance, if ALLOW_NONE is set, all person generation would be blocked. If this field is unspecified, the default behavior is to allow prominent people.
-
prominentPeople
Setter for prominentPeople given a string.prominentPeople: Controls whether prominent people (celebrities) generation is allowed. If used with personGeneration, personGeneration enum would take precedence. For instance, if ALLOW_NONE is set, all person generation would be blocked. If this field is unspecified, the default behavior is to allow prominent people.
-
outputMimeType
Setter for outputMimeType.outputMimeType: MIME type of the generated image. This field is not supported in Gemini API.
-
clearOutputMimeType
Clears the value of outputMimeType field. -
outputCompressionQuality
Setter for outputCompressionQuality.outputCompressionQuality: Compression quality of the generated image (for ``image/jpeg`` only). This field is not supported in Gemini API.
-
clearOutputCompressionQuality
Clears the value of outputCompressionQuality field. -
imageOutputOptions
public abstract ImageConfig.Builder imageOutputOptions(ImageConfigImageOutputOptions imageOutputOptions) Setter for imageOutputOptions.imageOutputOptions: Optional. The image output format for generated images.
-
imageOutputOptions
@CanIgnoreReturnValue public ImageConfig.Builder imageOutputOptions(ImageConfigImageOutputOptions.Builder imageOutputOptionsBuilder) Setter for imageOutputOptions builder.imageOutputOptions: Optional. The image output format for generated images.
-
clearImageOutputOptions
Clears the value of imageOutputOptions field. -
build
-