@@ -224,7 +224,7 @@ public class {{classname}} {
224224 /**
225225 * { {summary} }
226226 * { {notes} }
227- * @param apiRequest { @link API {{#lambda.titlecase} }{ {operationId} }{ {/lambda.titlecase} }Request }
227+ * @param apiRequest { @link {{#lambda.titlecase} }{ {operationId} }{ {/lambda.titlecase} }Args }
228228 { {#returnType} }
229229 * @return { {#asyncNative} }CompletableFuture< ; { {/asyncNative} }{ {returnType} }{ {#asyncNative} }> ; { {/asyncNative} }
230230 { {/returnType} }
@@ -245,7 +245,8 @@ public class {{classname}} {
245245 { {#isDeprecated} }
246246 @Deprecated
247247 { {/isDeprecated} }
248- public { {#returnType} }{ {#asyncNative} }CompletableFuture<{ {{returnType} }}>{ {/asyncNative} }{ {^asyncNative} }{ {{returnType} }}{ {/asyncNative} }{ {/returnType} }{ {^returnType} }{ {#asyncNative} }CompletableFuture<Void >{ {/asyncNative} }{ {^asyncNative} }void{ {/asyncNative} }{ {/returnType} } { {operationId} }(API{ {#lambda.titlecase} }{ {operationId} }{ {/lambda.titlecase} }Request apiRequest) throws ApiException {
248+ @SuppressWarnings({ " deprecation" , " removal" } )
249+ public { {#returnType} }{ {#asyncNative} }CompletableFuture<{ {{returnType} }}>{ {/asyncNative} }{ {^asyncNative} }{ {{returnType} }}{ {/asyncNative} }{ {/returnType} }{ {^returnType} }{ {#asyncNative} }CompletableFuture<Void >{ {/asyncNative} }{ {^asyncNative} }void{ {/asyncNative} }{ {/returnType} } { {operationId} }({ {#lambda.titlecase} }{ {operationId} }{ {/lambda.titlecase} }Args apiRequest) throws ApiException {
249250 {{#allParams} }
250251 { {> nullable_var_annotations} }{ {! prevent indent} }
251252 { {{dataType} }} { {paramName} } = apiRequest.{ {paramName} }();
@@ -270,7 +271,7 @@ public class {{classname}} {
270271 /**
271272 * { {summary} }
272273 * { {notes} }
273- * @param apiRequest { @link API {{#lambda.titlecase} }{ {operationId} }{ {/lambda.titlecase} }Request }
274+ * @param apiRequest { @link {{#lambda.titlecase} }{ {operationId} }{ {/lambda.titlecase} }Args }
274275 * @param headers Optional headers to include in the request
275276 * @return { {#asyncNative} }CompletableFuture< ; { {/asyncNative} }ApiResponse< ; { {returnType} }{ {^returnType} }Void{ {/returnType} }> ; { {#asyncNative} }> ; { {/asyncNative} }
276277 * @throws ApiException if fails to make API call
@@ -285,7 +286,8 @@ public class {{classname}} {
285286 { {#isDeprecated} }
286287 @Deprecated
287288 { {/isDeprecated} }
288- public { {#asyncNative} }CompletableFuture<{ {/asyncNative} }ApiResponse<{ {{returnType} }}{ {^returnType} }Void{ {/returnType} }>{ {#asyncNative} }>{ {/asyncNative} } { {operationId} }WithHttpInfo(API{ {#lambda.titlecase} }{ {operationId} }{ {/lambda.titlecase} }Request apiRequest, Map<String , String > headers) throws ApiException {
289+ @SuppressWarnings({ " deprecation" , " removal" } )
290+ public { {#asyncNative} }CompletableFuture<{ {/asyncNative} }ApiResponse<{ {{returnType} }}{ {^returnType} }Void{ {/returnType} }>{ {#asyncNative} }>{ {/asyncNative} } { {operationId} }WithHttpInfo({ {#lambda.titlecase} }{ {operationId} }{ {/lambda.titlecase} }Args apiRequest, Map<String , String > headers) throws ApiException {
289291 {{#allParams} }
290292 { {{dataType} }} { {paramName} } = apiRequest.{ {paramName} }();
291293 { {/allParams} }
@@ -309,17 +311,31 @@ public class {{classname}} {
309311 { {/asyncNative} }
310312 { {/returnType} }
311313 * @throws ApiException if fails to make API call
314+ { {#hasParams} }
315+ * @deprecated Use { @link #{{operationId} }({ {#lambda.titlecase} }{ {operationId} }{ {/lambda.titlecase} }Args)} instead.
316+ * This overload passes each parameter positionally, so its signature changes whenever a
317+ * parameter is added to this endpoint — breaking source and binary compatibility for
318+ * existing callers on version upgrades. The request-object overload stays compatible because
319+ * new parameters are added as optional builder fields. Scheduled for removal in a future release.
320+ { {/hasParams} }
321+ { {^hasParams} }
312322 { {#isDeprecated} }
313323 * @deprecated
314324 { {/isDeprecated} }
325+ { {/hasParams} }
315326 { {#externalDocs} }
316327 * { {description} }
317328 * @see <a href =" { { url} } " >{ {summary} } Documentation</a >
318329 { {/externalDocs} }
319330 */
331+ { {#hasParams} }
332+ @Deprecated(forRemoval = true)
333+ { {/hasParams} }
334+ { {^hasParams} }
320335 { {#isDeprecated} }
321336 @Deprecated
322337 { {/isDeprecated} }
338+ { {/hasParams} }
323339 public { {#returnType} }{ {#asyncNative} }CompletableFuture<{ {{returnType} }}>{ {/asyncNative} }{ {^asyncNative} }{ {{returnType} }}{ {/asyncNative} }{ {/returnType} }{ {^returnType} }{ {#asyncNative} }CompletableFuture<Void >{ {/asyncNative} }{ {^asyncNative} }void{ {/asyncNative} }{ {/returnType} } { {operationId} }({ {#allParams} }{ {> nullable_var_annotations} } { {{dataType} }} { {paramName} }{ {^-last} }, { {/-last} }{ {/allParams} }) throws ApiException {
324340 {{^asyncNative} }
325341 { {#returnType} }ApiResponse<{ {{.} }}> localVarResponse = { {/returnType} }{ {operationId} }WithHttpInfo({ {#allParams} }{ {paramName} }{ {^-last} }, { {/-last} }{ {/allParams} }{ {#hasParams} }, { {/hasParams} }null);
@@ -347,17 +363,31 @@ public class {{classname}} {
347363 * @param headers Optional headers to include in the request
348364 * @return { {#asyncNative} }CompletableFuture< ; { {/asyncNative} }ApiResponse< ; { {returnType} }{ {^returnType} }Void{ {/returnType} }> ; { {#asyncNative} }> ; { {/asyncNative} }
349365 * @throws ApiException if fails to make API call
366+ { {#hasParams} }
367+ * @deprecated Use { @link #{{operationId} }({ {#lambda.titlecase} }{ {operationId} }{ {/lambda.titlecase} }Args)} instead.
368+ * This overload passes each parameter positionally, so its signature changes whenever a
369+ * parameter is added to this endpoint — breaking source and binary compatibility for
370+ * existing callers on version upgrades. The request-object overload stays compatible because
371+ * new parameters are added as optional builder fields. Scheduled for removal in a future release.
372+ { {/hasParams} }
373+ { {^hasParams} }
350374 { {#isDeprecated} }
351375 * @deprecated
352376 { {/isDeprecated} }
377+ { {/hasParams} }
353378 { {#externalDocs} }
354379 * { {description} }
355380 * @see <a href =" { { url} } " >{ {summary} } Documentation</a >
356381 { {/externalDocs} }
357382 */
383+ { {#hasParams} }
384+ @Deprecated(forRemoval = true)
385+ { {/hasParams} }
386+ { {^hasParams} }
358387 { {#isDeprecated} }
359388 @Deprecated
360389 { {/isDeprecated} }
390+ { {/hasParams} }
361391 public { {#asyncNative} }CompletableFuture<{ {/asyncNative} }ApiResponse<{ {{returnType} }}{ {^returnType} }Void{ {/returnType} }>{ {#asyncNative} }>{ {/asyncNative} } { {operationId} }WithHttpInfo({ {#allParams} }{ {> nullable_var_annotations} } { {{dataType} }} { {paramName} }{ {^-last} }, { {/-last} }{ {/allParams} }{ {#hasParams} }, { {/hasParams} }Map<String , String > headers) throws ApiException {
362392 {{^asyncNative} }
363393 HttpRequest.Builder localVarRequestBuilder = { {operationId} }RequestBuilder({ {#allParams} }{ {paramName} }{ {^-last} }, { {/-last} }{ {/allParams} }{ {#hasParams} }, { {/hasParams} }headers);
@@ -792,7 +822,7 @@ public class {{classname}} {
792822 { {#vendorExtensions.x-group-parameters} }
793823 { {#hasParams} }
794824
795- public static final class API { {#lambda.titlecase} }{ {operationId} }{ {/lambda.titlecase} }Request {
825+ public static final class { {#lambda.titlecase} }{ {operationId} }{ {/lambda.titlecase} }Args {
796826 {{#requiredParams} }
797827 { {> nullable_var_annotations} }{ {! prevent indent} }
798828 private { {{dataType} }} { {paramName} }; // { {description} } (required)
@@ -802,7 +832,7 @@ public class {{classname}} {
802832 private { {{dataType} }} { {paramName} }; // { {description} } (optional{ {^isContainer} }{ {#defaultValue} }, default to { {.} }{ {/defaultValue} }{ {/isContainer} })
803833 { {/optionalParams} }
804834
805- private API { {#lambda.titlecase} }{ {operationId} }{ {/lambda.titlecase} }Request (Builder builder) {
835+ private { {#lambda.titlecase} }{ {operationId} }{ {/lambda.titlecase} }Args (Builder builder) {
806836 {{#requiredParams} }
807837 this.{ {paramName} } = builder.{ {paramName} };
808838 { {/requiredParams} }
@@ -816,7 +846,7 @@ public class {{classname}} {
816846 return {{paramName} };
817847 }
818848 { {/allParams} }
819- public static Builder newBuilder () {
849+ public static Builder builder () {
820850 return new Builder();
821851 }
822852
@@ -834,8 +864,13 @@ public class {{classname}} {
834864 return this;
835865 }
836866 { {/allParams} }
837- public API{ {#lambda.titlecase} }{ {operationId} }{ {/lambda.titlecase} }Request build() {
838- return new API{{#lambda.titlecase} }{ {operationId} }{ {/lambda.titlecase} }Request(this);
867+ public { {#lambda.titlecase} }{ {operationId} }{ {/lambda.titlecase} }Args build() {
868+ {{#requiredParams} }
869+ if (this.{ {paramName} } == null) {
870+ throw new IllegalArgumentException(" Required parameter '{{paramName}}' is not set for {{operationId}}" );
871+ }
872+ { {/requiredParams} }
873+ return new { {#lambda.titlecase} }{ {operationId} }{ {/lambda.titlecase} }Args(this);
839874 }
840875 }
841876 }
0 commit comments