@@ -39,20 +39,49 @@ public class ImagenGenerationConfig(
3939 *
4040 * This is mainly intended for Java interop. For Kotlin, use [imagenGenerationConfig] for a more
4141 * idiomatic experience.
42- *
43- * @property negativePrompt See [ImagenGenerationConfig.negativePrompt].
44- * @property numberOfImages See [ImagenGenerationConfig.numberOfImages].
45- * @property aspectRatio See [ImagenGenerationConfig.aspectRatio].
46- * @property imageFormat See [ImagenGenerationConfig.imageFormat]
47- * @property addWatermark See [ImagenGenerationConfig.addWatermark]
48- * @see [imagenGenerationConfig]
4942 */
5043 public class Builder {
51- @JvmField public var negativePrompt: String? = null
52- @JvmField public var numberOfImages: Int? = 1
53- @JvmField public var aspectRatio: ImagenAspectRatio ? = null
54- @JvmField public var imageFormat: ImagenImageFormat ? = null
55- @JvmField public var addWatermark: Boolean? = null
44+ private var negativePrompt: String? = null
45+ private var numberOfImages: Int? = 1
46+ private var aspectRatio: ImagenAspectRatio ? = null
47+ private var imageFormat: ImagenImageFormat ? = null
48+ private var addWatermark: Boolean? = null
49+
50+ /* *
51+ * See [ImagenGenerationConfig.negativePrompt].
52+ */
53+ public fun setNegativePrompt (negativePrompt : String ): Builder = apply {
54+ this .negativePrompt = negativePrompt
55+ }
56+
57+ /* *
58+ * See [ImagenGenerationConfig.numberOfImages].
59+ */
60+ public fun setNumberOfImages (numberOfImages : Int ): Builder = apply {
61+ this .numberOfImages = numberOfImages
62+ }
63+
64+ /* *
65+ * See [ImagenGenerationConfig.aspectRatio].
66+ */
67+ public fun setAspectRatio (aspectRatio : ImagenAspectRatio ): Builder = apply {
68+ this .aspectRatio = aspectRatio
69+ }
70+
71+ /* *
72+ * See [ImagenGenerationConfig.imageFormat].
73+ */
74+ public fun setImageFormat (imageFormat : ImagenImageFormat ): Builder = apply {
75+ this .imageFormat = imageFormat
76+ }
77+
78+ /* *
79+ * See [ImagenGenerationConfig.addWatermark].
80+ */
81+ public fun setAddWatermark (addWatermark : Boolean ): Builder = apply {
82+ this .addWatermark = addWatermark
83+ }
84+
5685
5786 /* *
5887 * Alternative casing for [ImagenGenerationConfig.Builder]:
0 commit comments