Skip to content

Commit b3b9792

Browse files
Cloud SDK 5.17.0
1 parent 0771462 commit b3b9792

24 files changed

+424
-0
lines changed

prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ChatCompletionTool.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,18 +173,35 @@ public Set<String> getCustomFieldNames() {
173173
/**
174174
* Get the value of an unrecognizable property of this {@link ChatCompletionTool} instance.
175175
*
176+
* @deprecated Use {@link #toMap()} instead.
176177
* @param name The name of the property
177178
* @return The value of the property
178179
* @throws NoSuchElementException If no property with the given name could be found.
179180
*/
180181
@Nullable
182+
@Deprecated
181183
public Object getCustomField(@Nonnull final String name) throws NoSuchElementException {
182184
if (!cloudSdkCustomFields.containsKey(name)) {
183185
throw new NoSuchElementException("ChatCompletionTool has no field with name '" + name + "'.");
184186
}
185187
return cloudSdkCustomFields.get(name);
186188
}
187189

190+
/**
191+
* Get the value of all properties of this {@link ChatCompletionTool} instance including
192+
* unrecognized properties.
193+
*
194+
* @return The map of all properties
195+
*/
196+
@JsonIgnore
197+
@Nonnull
198+
public Map<String, Object> toMap() {
199+
final Map<String, Object> declaredFields = new LinkedHashMap<>(cloudSdkCustomFields);
200+
if (type != null) declaredFields.put("type", type);
201+
if (function != null) declaredFields.put("function", function);
202+
return declaredFields;
203+
}
204+
188205
/**
189206
* Set an unrecognizable property of this {@link ChatCompletionTool} instance. If the map
190207
* previously contained a mapping for the key, the old value is replaced by the specified value.

prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ErrorResponse.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,18 +117,35 @@ public Set<String> getCustomFieldNames() {
117117
/**
118118
* Get the value of an unrecognizable property of this {@link ErrorResponse} instance.
119119
*
120+
* @deprecated Use {@link #toMap()} instead.
120121
* @param name The name of the property
121122
* @return The value of the property
122123
* @throws NoSuchElementException If no property with the given name could be found.
123124
*/
124125
@Nullable
126+
@Deprecated
125127
public Object getCustomField(@Nonnull final String name) throws NoSuchElementException {
126128
if (!cloudSdkCustomFields.containsKey(name)) {
127129
throw new NoSuchElementException("ErrorResponse has no field with name '" + name + "'.");
128130
}
129131
return cloudSdkCustomFields.get(name);
130132
}
131133

134+
/**
135+
* Get the value of all properties of this {@link ErrorResponse} instance including unrecognized
136+
* properties.
137+
*
138+
* @return The map of all properties
139+
*/
140+
@JsonIgnore
141+
@Nonnull
142+
public Map<String, Object> toMap() {
143+
final Map<String, Object> declaredFields = new LinkedHashMap<>(cloudSdkCustomFields);
144+
if (requestId != null) declaredFields.put("requestId", requestId);
145+
if (message != null) declaredFields.put("message", message);
146+
return declaredFields;
147+
}
148+
132149
/**
133150
* Set an unrecognizable property of this {@link ErrorResponse} instance. If the map previously
134151
* contained a mapping for the key, the old value is replaced by the specified value.

prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/FunctionObject.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,18 +231,37 @@ public Set<String> getCustomFieldNames() {
231231
/**
232232
* Get the value of an unrecognizable property of this {@link FunctionObject} instance.
233233
*
234+
* @deprecated Use {@link #toMap()} instead.
234235
* @param name The name of the property
235236
* @return The value of the property
236237
* @throws NoSuchElementException If no property with the given name could be found.
237238
*/
238239
@Nullable
240+
@Deprecated
239241
public Object getCustomField(@Nonnull final String name) throws NoSuchElementException {
240242
if (!cloudSdkCustomFields.containsKey(name)) {
241243
throw new NoSuchElementException("FunctionObject has no field with name '" + name + "'.");
242244
}
243245
return cloudSdkCustomFields.get(name);
244246
}
245247

248+
/**
249+
* Get the value of all properties of this {@link FunctionObject} instance including unrecognized
250+
* properties.
251+
*
252+
* @return The map of all properties
253+
*/
254+
@JsonIgnore
255+
@Nonnull
256+
public Map<String, Object> toMap() {
257+
final Map<String, Object> declaredFields = new LinkedHashMap<>(cloudSdkCustomFields);
258+
if (description != null) declaredFields.put("description", description);
259+
if (name != null) declaredFields.put("name", name);
260+
if (parameters != null) declaredFields.put("parameters", parameters);
261+
if (strict != null) declaredFields.put("strict", strict);
262+
return declaredFields;
263+
}
264+
246265
/**
247266
* Set an unrecognizable property of this {@link FunctionObject} instance. If the map previously
248267
* contained a mapping for the key, the old value is replaced by the specified value.

prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ImageContent.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,18 +173,35 @@ public Set<String> getCustomFieldNames() {
173173
/**
174174
* Get the value of an unrecognizable property of this {@link ImageContent} instance.
175175
*
176+
* @deprecated Use {@link #toMap()} instead.
176177
* @param name The name of the property
177178
* @return The value of the property
178179
* @throws NoSuchElementException If no property with the given name could be found.
179180
*/
180181
@Nullable
182+
@Deprecated
181183
public Object getCustomField(@Nonnull final String name) throws NoSuchElementException {
182184
if (!cloudSdkCustomFields.containsKey(name)) {
183185
throw new NoSuchElementException("ImageContent has no field with name '" + name + "'.");
184186
}
185187
return cloudSdkCustomFields.get(name);
186188
}
187189

190+
/**
191+
* Get the value of all properties of this {@link ImageContent} instance including unrecognized
192+
* properties.
193+
*
194+
* @return The map of all properties
195+
*/
196+
@JsonIgnore
197+
@Nonnull
198+
public Map<String, Object> toMap() {
199+
final Map<String, Object> declaredFields = new LinkedHashMap<>(cloudSdkCustomFields);
200+
if (type != null) declaredFields.put("type", type);
201+
if (imageUrl != null) declaredFields.put("imageUrl", imageUrl);
202+
return declaredFields;
203+
}
204+
188205
/**
189206
* Set an unrecognizable property of this {@link ImageContent} instance. If the map previously
190207
* contained a mapping for the key, the old value is replaced by the specified value.

prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ImageContentImageUrl.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,13 @@ public Set<String> getCustomFieldNames() {
117117
/**
118118
* Get the value of an unrecognizable property of this {@link ImageContentImageUrl} instance.
119119
*
120+
* @deprecated Use {@link #toMap()} instead.
120121
* @param name The name of the property
121122
* @return The value of the property
122123
* @throws NoSuchElementException If no property with the given name could be found.
123124
*/
124125
@Nullable
126+
@Deprecated
125127
public Object getCustomField(@Nonnull final String name) throws NoSuchElementException {
126128
if (!cloudSdkCustomFields.containsKey(name)) {
127129
throw new NoSuchElementException(
@@ -130,6 +132,21 @@ public Object getCustomField(@Nonnull final String name) throws NoSuchElementExc
130132
return cloudSdkCustomFields.get(name);
131133
}
132134

135+
/**
136+
* Get the value of all properties of this {@link ImageContentImageUrl} instance including
137+
* unrecognized properties.
138+
*
139+
* @return The map of all properties
140+
*/
141+
@JsonIgnore
142+
@Nonnull
143+
public Map<String, Object> toMap() {
144+
final Map<String, Object> declaredFields = new LinkedHashMap<>(cloudSdkCustomFields);
145+
if (url != null) declaredFields.put("url", url);
146+
if (detail != null) declaredFields.put("detail", detail);
147+
return declaredFields;
148+
}
149+
133150
/**
134151
* Set an unrecognizable property of this {@link ImageContentImageUrl} instance. If the map
135152
* previously contained a mapping for the key, the old value is replaced by the specified value.

prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/MultiChatTemplate.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,18 +135,35 @@ public Set<String> getCustomFieldNames() {
135135
/**
136136
* Get the value of an unrecognizable property of this {@link MultiChatTemplate} instance.
137137
*
138+
* @deprecated Use {@link #toMap()} instead.
138139
* @param name The name of the property
139140
* @return The value of the property
140141
* @throws NoSuchElementException If no property with the given name could be found.
141142
*/
142143
@Nullable
144+
@Deprecated
143145
public Object getCustomField(@Nonnull final String name) throws NoSuchElementException {
144146
if (!cloudSdkCustomFields.containsKey(name)) {
145147
throw new NoSuchElementException("MultiChatTemplate has no field with name '" + name + "'.");
146148
}
147149
return cloudSdkCustomFields.get(name);
148150
}
149151

152+
/**
153+
* Get the value of all properties of this {@link MultiChatTemplate} instance including
154+
* unrecognized properties.
155+
*
156+
* @return The map of all properties
157+
*/
158+
@JsonIgnore
159+
@Nonnull
160+
public Map<String, Object> toMap() {
161+
final Map<String, Object> declaredFields = new LinkedHashMap<>(cloudSdkCustomFields);
162+
if (role != null) declaredFields.put("role", role);
163+
if (content != null) declaredFields.put("content", content);
164+
return declaredFields;
165+
}
166+
150167
/**
151168
* Set an unrecognizable property of this {@link MultiChatTemplate} instance. If the map
152169
* previously contained a mapping for the key, the old value is replaced by the specified value.

prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateDeleteResponse.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,13 @@ public Set<String> getCustomFieldNames() {
8585
* Get the value of an unrecognizable property of this {@link PromptTemplateDeleteResponse}
8686
* instance.
8787
*
88+
* @deprecated Use {@link #toMap()} instead.
8889
* @param name The name of the property
8990
* @return The value of the property
9091
* @throws NoSuchElementException If no property with the given name could be found.
9192
*/
9293
@Nullable
94+
@Deprecated
9395
public Object getCustomField(@Nonnull final String name) throws NoSuchElementException {
9496
if (!cloudSdkCustomFields.containsKey(name)) {
9597
throw new NoSuchElementException(
@@ -98,6 +100,20 @@ public Object getCustomField(@Nonnull final String name) throws NoSuchElementExc
98100
return cloudSdkCustomFields.get(name);
99101
}
100102

103+
/**
104+
* Get the value of all properties of this {@link PromptTemplateDeleteResponse} instance including
105+
* unrecognized properties.
106+
*
107+
* @return The map of all properties
108+
*/
109+
@JsonIgnore
110+
@Nonnull
111+
public Map<String, Object> toMap() {
112+
final Map<String, Object> declaredFields = new LinkedHashMap<>(cloudSdkCustomFields);
113+
if (message != null) declaredFields.put("message", message);
114+
return declaredFields;
115+
}
116+
101117
/**
102118
* Set an unrecognizable property of this {@link PromptTemplateDeleteResponse} instance. If the
103119
* map previously contained a mapping for the key, the old value is replaced by the specified

prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateGetResponse.java

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,11 +328,13 @@ public Set<String> getCustomFieldNames() {
328328
/**
329329
* Get the value of an unrecognizable property of this {@link PromptTemplateGetResponse} instance.
330330
*
331+
* @deprecated Use {@link #toMap()} instead.
331332
* @param name The name of the property
332333
* @return The value of the property
333334
* @throws NoSuchElementException If no property with the given name could be found.
334335
*/
335336
@Nullable
337+
@Deprecated
336338
public Object getCustomField(@Nonnull final String name) throws NoSuchElementException {
337339
if (!cloudSdkCustomFields.containsKey(name)) {
338340
throw new NoSuchElementException(
@@ -341,6 +343,27 @@ public Object getCustomField(@Nonnull final String name) throws NoSuchElementExc
341343
return cloudSdkCustomFields.get(name);
342344
}
343345

346+
/**
347+
* Get the value of all properties of this {@link PromptTemplateGetResponse} instance including
348+
* unrecognized properties.
349+
*
350+
* @return The map of all properties
351+
*/
352+
@JsonIgnore
353+
@Nonnull
354+
public Map<String, Object> toMap() {
355+
final Map<String, Object> declaredFields = new LinkedHashMap<>(cloudSdkCustomFields);
356+
if (id != null) declaredFields.put("id", id);
357+
if (name != null) declaredFields.put("name", name);
358+
if (version != null) declaredFields.put("version", version);
359+
if (scenario != null) declaredFields.put("scenario", scenario);
360+
if (creationTimestamp != null) declaredFields.put("creationTimestamp", creationTimestamp);
361+
if (managedBy != null) declaredFields.put("managedBy", managedBy);
362+
if (isVersionHead != null) declaredFields.put("isVersionHead", isVersionHead);
363+
if (spec != null) declaredFields.put("spec", spec);
364+
return declaredFields;
365+
}
366+
344367
/**
345368
* Set an unrecognizable property of this {@link PromptTemplateGetResponse} instance. If the map
346369
* previously contained a mapping for the key, the old value is replaced by the specified value.

prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateListResponse.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,13 @@ public Set<String> getCustomFieldNames() {
139139
* Get the value of an unrecognizable property of this {@link PromptTemplateListResponse}
140140
* instance.
141141
*
142+
* @deprecated Use {@link #toMap()} instead.
142143
* @param name The name of the property
143144
* @return The value of the property
144145
* @throws NoSuchElementException If no property with the given name could be found.
145146
*/
146147
@Nullable
148+
@Deprecated
147149
public Object getCustomField(@Nonnull final String name) throws NoSuchElementException {
148150
if (!cloudSdkCustomFields.containsKey(name)) {
149151
throw new NoSuchElementException(
@@ -152,6 +154,21 @@ public Object getCustomField(@Nonnull final String name) throws NoSuchElementExc
152154
return cloudSdkCustomFields.get(name);
153155
}
154156

157+
/**
158+
* Get the value of all properties of this {@link PromptTemplateListResponse} instance including
159+
* unrecognized properties.
160+
*
161+
* @return The map of all properties
162+
*/
163+
@JsonIgnore
164+
@Nonnull
165+
public Map<String, Object> toMap() {
166+
final Map<String, Object> declaredFields = new LinkedHashMap<>(cloudSdkCustomFields);
167+
if (count != null) declaredFields.put("count", count);
168+
if (resources != null) declaredFields.put("resources", resources);
169+
return declaredFields;
170+
}
171+
155172
/**
156173
* Set an unrecognizable property of this {@link PromptTemplateListResponse} instance. If the map
157174
* previously contained a mapping for the key, the old value is replaced by the specified value.

prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplatePostRequest.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,13 @@ public Set<String> getCustomFieldNames() {
187187
/**
188188
* Get the value of an unrecognizable property of this {@link PromptTemplatePostRequest} instance.
189189
*
190+
* @deprecated Use {@link #toMap()} instead.
190191
* @param name The name of the property
191192
* @return The value of the property
192193
* @throws NoSuchElementException If no property with the given name could be found.
193194
*/
194195
@Nullable
196+
@Deprecated
195197
public Object getCustomField(@Nonnull final String name) throws NoSuchElementException {
196198
if (!cloudSdkCustomFields.containsKey(name)) {
197199
throw new NoSuchElementException(
@@ -200,6 +202,23 @@ public Object getCustomField(@Nonnull final String name) throws NoSuchElementExc
200202
return cloudSdkCustomFields.get(name);
201203
}
202204

205+
/**
206+
* Get the value of all properties of this {@link PromptTemplatePostRequest} instance including
207+
* unrecognized properties.
208+
*
209+
* @return The map of all properties
210+
*/
211+
@JsonIgnore
212+
@Nonnull
213+
public Map<String, Object> toMap() {
214+
final Map<String, Object> declaredFields = new LinkedHashMap<>(cloudSdkCustomFields);
215+
if (name != null) declaredFields.put("name", name);
216+
if (version != null) declaredFields.put("version", version);
217+
if (scenario != null) declaredFields.put("scenario", scenario);
218+
if (spec != null) declaredFields.put("spec", spec);
219+
return declaredFields;
220+
}
221+
203222
/**
204223
* Set an unrecognizable property of this {@link PromptTemplatePostRequest} instance. If the map
205224
* previously contained a mapping for the key, the old value is replaced by the specified value.

0 commit comments

Comments
 (0)