@@ -9,6 +9,8 @@ import java.util.HashMap;
99import java.util.List;
1010import java.util.Locale;
1111import java.util.Map;
12+ import java.util.Objects;
13+ import java.util.Arrays;
1214import java.util.stream.Collectors;
1315
1416{ {#useBeanValidation} }
@@ -83,55 +85,83 @@ public class {{classname}} {
8385 }
8486
8587 { {/allParams} }
88+ @Override
89+ public boolean equals(Object o) {
90+ {{#useReflectionEqualsHashCode} }
91+ return EqualsBuilder.reflectionEquals(this, o, false, null, true);
92+ { {/useReflectionEqualsHashCode} }
93+ { {^useReflectionEqualsHashCode} }
94+ if (this == o) {
95+ return true ;
96+ }
97+ if (o == null || getClass() != o.getClass()) {
98+ return false ;
99+ } { {#hasParams} }
100+ { {#lambda.titlecase} }{ {operationId} }{ {/lambda.titlecase} }Request request = ({ {#lambda.titlecase} }{ {operationId} }{ {/lambda.titlecase} }Request) o;
101+ return { {#allParams} }{ {#vendorExtensions.x-is-jackson-optional-nullable} }equalsNullable(this.{ {paramName} }, request.{ {paramName} }()){ {/vendorExtensions.x-is-jackson-optional-nullable} }{ {^vendorExtensions.x-is-jackson-optional-nullable} }{ {#isByteArray} }Arrays{ {/isByteArray} }{ {^isByteArray} }Objects{ {/isByteArray} }.equals(this.{ {paramName} }, request.{ {paramName} }()){ {/vendorExtensions.x-is-jackson-optional-nullable} }{ {^-last} } &&
102+ { {/-last} }{ {/allParams} };{ {/hasParams} }{ {^hasParams} }
103+ return true;{ {/hasParams} }
104+ { {/useReflectionEqualsHashCode} }
105+ }
106+
107+ @Override
108+ public int hashCode() {
109+ {{#useReflectionEqualsHashCode} }
110+ return HashCodeBuilder.reflectionHashCode(this);
111+ { {/useReflectionEqualsHashCode} }
112+ { {^useReflectionEqualsHashCode} }
113+ return Objects.hash({ {#allParams} }{ {#vendorExtensions.x-is-jackson-optional-nullable} }hashCodeNullable({ {paramName} }){ {/vendorExtensions.x-is-jackson-optional-nullable} }{ {^vendorExtensions.x-is-jackson-optional-nullable} }{ {^isByteArray} }{ {paramName} }{ {/isByteArray} }{ {#isByteArray} }Arrays.hashCode({ {paramName} }){ {/isByteArray} }{ {/vendorExtensions.x-is-jackson-optional-nullable} }{ {^-last} }, { {/-last} }{ {/allParams} });
114+ { {/useReflectionEqualsHashCode} }
115+ }
86116 }
87117
88- /**
89- * { {summary} }
90- * { {notes} }
91- { {#responses} } * <p ><b >{ {code} }</b >{ {#message} } - { {.} }{ {/message} }
92- { {/responses} } * @param requestParameters The { {operationId} } request parameters as object
93- { {#returnType} } * @return { {.} }
94- { {/returnType} } * @throws WebClientResponseException if an error occurs while attempting to invoke the API
118+ /**
119+ * { {summary} }
120+ * { {notes} }
121+ { {#responses} } * <p ><b >{ {code} }</b >{ {#message} } - { {.} }{ {/message} }
122+ { {/responses} } * @param requestParameters The { {operationId} } request parameters as object
123+ { {#returnType} } * @return { {.} }
124+ { {/returnType} } * @throws WebClientResponseException if an error occurs while attempting to invoke the API
95125 { {#externalDocs} }
96- * { {description} }
97- * @see <a href =" { { url} } " >{ {summary} } Documentation</a >
126+ * { {description} }
127+ * @see <a href =" { { url} } " >{ {summary} } Documentation</a >
98128 { {/externalDocs} }
99- */
100- public {{#returnType}}{{#vendorExtensions.x-webclient-blocking}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}{{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnBaseType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnBaseType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/vendorExtensions.x-webclient-blocking}}{{^vendorExtensions.x-webclient-blocking}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}Flux<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnBaseType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnBaseType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}Mono<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/vendorExtensions.x-webclient-blocking}} {{/returnType}}{{^returnType}}{{#vendorExtensions.x-webclient-blocking}}void{{/vendorExtensions.x-webclient-blocking}}{{^vendorExtensions.x-webclient-blocking}}Mono<Void>{{/vendorExtensions.x-webclient-blocking}} {{/returnType}}{{operationId}}({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request requestParameters) throws WebClientResponseException {
101- { {^returnType} }{ {^vendorExtensions.x-webclient-blocking} }return { {/vendorExtensions.x-webclient-blocking} }{ {/returnType} }{ {#returnType} }return { {/returnType} }this.{ {operationId} }({ {#allParams} }requestParameters.{ {paramName} }(){ {^-last} }, { {/-last} }{ {/allParams} });
102- }
103-
104- /**
105- * { {summary} }
106- * { {notes} }
107- { {#responses} } * <p ><b >{ {code} }</b >{ {#message} } - { {.} }{ {/message} }
108- { {/responses} } * @param requestParameters The { {operationId} } request parameters as object
109- { {#returnType} } * @return ResponseEntity< ; { {.} }> ;
110- { {/returnType} } * @throws WebClientResponseException if an error occurs while attempting to invoke the API
129+ */
130+ public {{#returnType}}{{#vendorExtensions.x-webclient-blocking}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}{{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnBaseType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnBaseType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/vendorExtensions.x-webclient-blocking}}{{^vendorExtensions.x-webclient-blocking}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}Flux<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnBaseType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnBaseType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}Mono<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/vendorExtensions.x-webclient-blocking}} {{/returnType}}{{^returnType}}{{#vendorExtensions.x-webclient-blocking}}void{{/vendorExtensions.x-webclient-blocking}}{{^vendorExtensions.x-webclient-blocking}}Mono<Void>{{/vendorExtensions.x-webclient-blocking}} {{/returnType}}{{operationId}}({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request requestParameters) throws WebClientResponseException {
131+ { {^returnType} }{ {^vendorExtensions.x-webclient-blocking} }return { {/vendorExtensions.x-webclient-blocking} }{ {/returnType} }{ {#returnType} }return { {/returnType} }this.{ {operationId} }({ {#allParams} }requestParameters.{ {paramName} }(){ {^-last} }, { {/-last} }{ {/allParams} });
132+ }
133+
134+ /**
135+ * { {summary} }
136+ * { {notes} }
137+ { {#responses} } * <p ><b >{ {code} }</b >{ {#message} } - { {.} }{ {/message} }
138+ { {/responses} } * @param requestParameters The { {operationId} } request parameters as object
139+ { {#returnType} } * @return ResponseEntity< ; { {.} }> ;
140+ { {/returnType} } * @throws WebClientResponseException if an error occurs while attempting to invoke the API
111141 { {#externalDocs} }
112- * { {description} }
113- * @see <a href =" { { url} } " >{ {summary} } Documentation</a >
142+ * { {description} }
143+ * @see <a href =" { { url} } " >{ {summary} } Documentation</a >
114144 { {/externalDocs} }
115- */
116- public {{#vendorExtensions.x-webclient-blocking}}{{#returnType}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}ResponseEntity<List<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnBaseType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnBaseType}}}{{/isResponseFile}}>>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}ResponseEntity<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/returnType}}{{^returnType}}ResponseEntity<Void>{{/returnType}} {{/vendorExtensions.x-webclient-blocking}}{{^vendorExtensions.x-webclient-blocking}}{{#returnType}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}Mono<ResponseEntity<List<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnBaseType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnBaseType}}}{{/isResponseFile}}>>>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}Mono<ResponseEntity<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/returnType}}{{^returnType}}Mono<ResponseEntity<Void>>{{/returnType}} {{/vendorExtensions.x-webclient-blocking}}{{operationId}}WithHttpInfo({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request requestParameters) throws WebClientResponseException {
117- return this.{ {operationId} }WithHttpInfo({ {#allParams} }requestParameters.{ {paramName} }(){ {^-last} }, { {/-last} }{ {/allParams} });
118- }
119-
120- /**
121- * { {summary} }
122- * { {notes} }
123- { {#responses} } * <p ><b >{ {code} }</b >{ {#message} } - { {.} }{ {/message} }
124- { {/responses} } * @param requestParameters The { {operationId} } request parameters as object
125- * @return ResponseSpec
126- * @throws WebClientResponseException if an error occurs while attempting to invoke the API
145+ */
146+ public {{#vendorExtensions.x-webclient-blocking}}{{#returnType}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}ResponseEntity<List<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnBaseType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnBaseType}}}{{/isResponseFile}}>>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}ResponseEntity<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/returnType}}{{^returnType}}ResponseEntity<Void>{{/returnType}} {{/vendorExtensions.x-webclient-blocking}}{{^vendorExtensions.x-webclient-blocking}}{{#returnType}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}Mono<ResponseEntity<List<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnBaseType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnBaseType}}}{{/isResponseFile}}>>>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}Mono<ResponseEntity<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/returnType}}{{^returnType}}Mono<ResponseEntity<Void>>{{/returnType}} {{/vendorExtensions.x-webclient-blocking}}{{operationId}}WithHttpInfo({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request requestParameters) throws WebClientResponseException {
147+ return this.{ {operationId} }WithHttpInfo({ {#allParams} }requestParameters.{ {paramName} }(){ {^-last} }, { {/-last} }{ {/allParams} });
148+ }
149+
150+ /**
151+ * { {summary} }
152+ * { {notes} }
153+ { {#responses} } * <p ><b >{ {code} }</b >{ {#message} } - { {.} }{ {/message} }
154+ { {/responses} } * @param requestParameters The { {operationId} } request parameters as object
155+ * @return ResponseSpec
156+ * @throws WebClientResponseException if an error occurs while attempting to invoke the API
127157 { {#externalDocs} }
128- * { {description} }
129- * @see <a href =" { { url} } " >{ {summary} } Documentation</a >
158+ * { {description} }
159+ * @see <a href =" { { url} } " >{ {summary} } Documentation</a >
130160 { {/externalDocs} }
131- */
132- public ResponseSpec { {operationId} }WithResponseSpec({ {#lambda.titlecase} }{ {operationId} }{ {/lambda.titlecase} }Request requestParameters) throws WebClientResponseException {
133- return this.{{operationId} }WithResponseSpec({ {#allParams} }requestParameters.{ {paramName} }(){ {^-last} }, { {/-last} }{ {/allParams} });
134- }
161+ */
162+ public ResponseSpec { {operationId} }WithResponseSpec({ {#lambda.titlecase} }{ {operationId} }{ {/lambda.titlecase} }Request requestParameters) throws WebClientResponseException {
163+ return this.{{operationId} }WithResponseSpec({ {#allParams} }requestParameters.{ {paramName} }(){ {^-last} }, { {/-last} }{ {/allParams} });
164+ }
135165
136166 { {/hasSingleParam} }{ {/hasParams} }{ {/singleRequestParameter} }
137167 /**
0 commit comments