From 501d6c38a1d7d5151ff9dcbd910d08156d2406f2 Mon Sep 17 00:00:00 2001 From: jonghoonpark Date: Fri, 2 May 2025 06:51:14 +0900 Subject: [PATCH] Mark the builder methods in 'OpenAiImageOptions.Builder' that start with 'with' as '@Deprecated' Signed-off-by: jonghoonpark --- .../ai/openai/OpenAiImageOptions.java | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiImageOptions.java b/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiImageOptions.java index bb9170a63be..8a2f4e2ebd7 100644 --- a/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiImageOptions.java +++ b/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiImageOptions.java @@ -306,41 +306,73 @@ public Builder user(String user) { return this; } + /** + * @deprecated use {@link #N(Integer)} instead. + */ + @Deprecated(forRemoval = true, since = "1.0.0-M8") public Builder withN(Integer n) { this.options.setN(n); return this; } + /** + * @deprecated use {@link #model(String)} instead. + */ + @Deprecated(forRemoval = true, since = "1.0.0-M8") public Builder withModel(String model) { this.options.setModel(model); return this; } + /** + * @deprecated use {@link #quality(String)} instead. + */ + @Deprecated(forRemoval = true, since = "1.0.0-M8") public Builder withQuality(String quality) { this.options.setQuality(quality); return this; } + /** + * @deprecated use {@link #responseFormat(String)} instead. + */ + @Deprecated(forRemoval = true, since = "1.0.0-M8") public Builder withResponseFormat(String responseFormat) { this.options.setResponseFormat(responseFormat); return this; } + /** + * @deprecated use {@link #width(Integer)} instead. + */ + @Deprecated(forRemoval = true, since = "1.0.0-M8") public Builder withWidth(Integer width) { this.options.setWidth(width); return this; } + /** + * @deprecated use {@link #height(Integer)} instead. + */ + @Deprecated(forRemoval = true, since = "1.0.0-M8") public Builder withHeight(Integer height) { this.options.setHeight(height); return this; } + /** + * @deprecated use {@link #style(String)} instead. + */ + @Deprecated(forRemoval = true, since = "1.0.0-M8") public Builder withStyle(String style) { this.options.setStyle(style); return this; } + /** + * @deprecated use {@link #user(String)} instead. + */ + @Deprecated(forRemoval = true, since = "1.0.0-M8") public Builder withUser(String user) { this.options.setUser(user); return this;