2828public class Error
2929// CHECKSTYLE:ON
3030{
31+ @ JsonProperty ("code" )
32+ private String code ;
33+
34+ @ JsonProperty ("message" )
35+ private String message ;
36+
3137 @ JsonProperty ("param" )
3238 private String param ;
3339
@@ -37,168 +43,162 @@ public class Error
3743 @ JsonProperty ("inner_error" )
3844 private InnerError innerError ;
3945
40- @ JsonProperty ("code" )
41- private String code ;
42-
43- @ JsonProperty ("message" )
44- private String message ;
45-
4646 @ JsonAnySetter @ JsonAnyGetter
4747 private final Map <String , Object > cloudSdkCustomFields = new LinkedHashMap <>();
4848
4949 /**
50- * Set the param of this {@link Error} instance and return the same instance.
50+ * Set the code of this {@link Error} instance and return the same instance.
5151 *
52- * @param param The param of this {@link Error}
52+ * @param code The code of this {@link Error}
5353 * @return The same instance of this {@link Error} class
5454 */
5555 @ Nonnull
56- public Error param (@ Nullable final String param ) {
57- this .param = param ;
56+ public Error code (@ Nullable final String code ) {
57+ this .code = code ;
5858 return this ;
5959 }
6060
6161 /**
62- * Get param
62+ * Get code
6363 *
64- * @return param The param of this {@link Error} instance.
64+ * @return code The code of this {@link Error} instance.
6565 */
6666 @ Nonnull
67- public String getParam () {
68- return param ;
67+ public String getCode () {
68+ return code ;
6969 }
7070
7171 /**
72- * Set the param of this {@link Error} instance.
72+ * Set the code of this {@link Error} instance.
7373 *
74- * @param param The param of this {@link Error}
74+ * @param code The code of this {@link Error}
7575 */
76- public void setParam (@ Nullable final String param ) {
77- this .param = param ;
76+ public void setCode (@ Nullable final String code ) {
77+ this .code = code ;
7878 }
7979
8080 /**
81- * Set the type of this {@link Error} instance and return the same instance.
81+ * Set the message of this {@link Error} instance and return the same instance.
8282 *
83- * @param type The type of this {@link Error}
83+ * @param message The message of this {@link Error}
8484 * @return The same instance of this {@link Error} class
8585 */
8686 @ Nonnull
87- public Error type (@ Nullable final String type ) {
88- this .type = type ;
87+ public Error message (@ Nullable final String message ) {
88+ this .message = message ;
8989 return this ;
9090 }
9191
9292 /**
93- * Get type
93+ * Get message
9494 *
95- * @return type The type of this {@link Error} instance.
95+ * @return message The message of this {@link Error} instance.
9696 */
9797 @ Nonnull
98- public String getType () {
99- return type ;
98+ public String getMessage () {
99+ return message ;
100100 }
101101
102102 /**
103- * Set the type of this {@link Error} instance.
103+ * Set the message of this {@link Error} instance.
104104 *
105- * @param type The type of this {@link Error}
105+ * @param message The message of this {@link Error}
106106 */
107- public void setType (@ Nullable final String type ) {
108- this .type = type ;
107+ public void setMessage (@ Nullable final String message ) {
108+ this .message = message ;
109109 }
110110
111111 /**
112- * Set the innerError of this {@link Error} instance and return the same instance.
112+ * Set the param of this {@link Error} instance and return the same instance.
113113 *
114- * @param innerError The innerError of this {@link Error}
114+ * @param param The param of this {@link Error}
115115 * @return The same instance of this {@link Error} class
116116 */
117117 @ Nonnull
118- public Error innerError (@ Nullable final InnerError innerError ) {
119- this .innerError = innerError ;
118+ public Error param (@ Nullable final String param ) {
119+ this .param = param ;
120120 return this ;
121121 }
122122
123123 /**
124- * Get innerError
124+ * Get param
125125 *
126- * @return innerError The innerError of this {@link Error} instance.
126+ * @return param The param of this {@link Error} instance.
127127 */
128128 @ Nonnull
129- public InnerError getInnerError () {
130- return innerError ;
129+ public String getParam () {
130+ return param ;
131131 }
132132
133133 /**
134- * Set the innerError of this {@link Error} instance.
134+ * Set the param of this {@link Error} instance.
135135 *
136- * @param innerError The innerError of this {@link Error}
136+ * @param param The param of this {@link Error}
137137 */
138- public void setInnerError (@ Nullable final InnerError innerError ) {
139- this .innerError = innerError ;
138+ public void setParam (@ Nullable final String param ) {
139+ this .param = param ;
140140 }
141141
142142 /**
143- * Set the code of this {@link Error} instance and return the same instance.
143+ * Set the type of this {@link Error} instance and return the same instance.
144144 *
145- * @param code The code of this {@link Error}
145+ * @param type The type of this {@link Error}
146146 * @return The same instance of this {@link Error} class
147147 */
148148 @ Nonnull
149- public Error code (@ Nullable final String code ) {
150- this .code = code ;
149+ public Error type (@ Nullable final String type ) {
150+ this .type = type ;
151151 return this ;
152152 }
153153
154154 /**
155- * Get code
155+ * Get type
156156 *
157- * @return code The code of this {@link Error} instance.
157+ * @return type The type of this {@link Error} instance.
158158 */
159159 @ Nonnull
160- public String getCode () {
161- return code ;
160+ public String getType () {
161+ return type ;
162162 }
163163
164164 /**
165- * Set the code of this {@link Error} instance.
165+ * Set the type of this {@link Error} instance.
166166 *
167- * @param code The code of this {@link Error}
167+ * @param type The type of this {@link Error}
168168 */
169- public void setCode (@ Nullable final String code ) {
170- this .code = code ;
169+ public void setType (@ Nullable final String type ) {
170+ this .type = type ;
171171 }
172172
173173 /**
174- * Set the message of this {@link Error} instance and return the same instance.
174+ * Set the innerError of this {@link Error} instance and return the same instance.
175175 *
176- * @param message The message of this {@link Error}
176+ * @param innerError The innerError of this {@link Error}
177177 * @return The same instance of this {@link Error} class
178178 */
179179 @ Nonnull
180- public Error message (@ Nullable final String message ) {
181- this .message = message ;
180+ public Error innerError (@ Nullable final InnerError innerError ) {
181+ this .innerError = innerError ;
182182 return this ;
183183 }
184184
185185 /**
186- * Get message
186+ * Get innerError
187187 *
188- * @return message The message of this {@link Error} instance.
188+ * @return innerError The innerError of this {@link Error} instance.
189189 */
190190 @ Nonnull
191- public String getMessage () {
192- return message ;
191+ public InnerError getInnerError () {
192+ return innerError ;
193193 }
194194
195195 /**
196- * Set the message of this {@link Error} instance.
196+ * Set the innerError of this {@link Error} instance.
197197 *
198- * @param message The message of this {@link Error}
198+ * @param innerError The innerError of this {@link Error}
199199 */
200- public void setMessage (@ Nullable final String message ) {
201- this .message = message ;
200+ public void setInnerError (@ Nullable final InnerError innerError ) {
201+ this .innerError = innerError ;
202202 }
203203
204204 /**
@@ -239,11 +239,11 @@ public Object getCustomField(@Nonnull final String name) throws NoSuchElementExc
239239 @ Nonnull
240240 public Map <String , Object > toMap () {
241241 final Map <String , Object > declaredFields = new LinkedHashMap <>(cloudSdkCustomFields );
242+ if (code != null ) declaredFields .put ("code" , code );
243+ if (message != null ) declaredFields .put ("message" , message );
242244 if (param != null ) declaredFields .put ("param" , param );
243245 if (type != null ) declaredFields .put ("type" , type );
244246 if (innerError != null ) declaredFields .put ("innerError" , innerError );
245- if (code != null ) declaredFields .put ("code" , code );
246- if (message != null ) declaredFields .put ("message" , message );
247247 return declaredFields ;
248248 }
249249
@@ -269,28 +269,28 @@ public boolean equals(@Nullable final java.lang.Object o) {
269269 }
270270 final Error error = (Error ) o ;
271271 return Objects .equals (this .cloudSdkCustomFields , error .cloudSdkCustomFields )
272+ && Objects .equals (this .code , error .code )
273+ && Objects .equals (this .message , error .message )
272274 && Objects .equals (this .param , error .param )
273275 && Objects .equals (this .type , error .type )
274- && Objects .equals (this .innerError , error .innerError )
275- && Objects .equals (this .code , error .code )
276- && Objects .equals (this .message , error .message );
276+ && Objects .equals (this .innerError , error .innerError );
277277 }
278278
279279 @ Override
280280 public int hashCode () {
281- return Objects .hash (param , type , innerError , code , message , cloudSdkCustomFields );
281+ return Objects .hash (code , message , param , type , innerError , cloudSdkCustomFields );
282282 }
283283
284284 @ Override
285285 @ Nonnull
286286 public String toString () {
287287 final StringBuilder sb = new StringBuilder ();
288288 sb .append ("class Error {\n " );
289+ sb .append (" code: " ).append (toIndentedString (code )).append ("\n " );
290+ sb .append (" message: " ).append (toIndentedString (message )).append ("\n " );
289291 sb .append (" param: " ).append (toIndentedString (param )).append ("\n " );
290292 sb .append (" type: " ).append (toIndentedString (type )).append ("\n " );
291293 sb .append (" innerError: " ).append (toIndentedString (innerError )).append ("\n " );
292- sb .append (" code: " ).append (toIndentedString (code )).append ("\n " );
293- sb .append (" message: " ).append (toIndentedString (message )).append ("\n " );
294294 cloudSdkCustomFields .forEach (
295295 (k , v ) ->
296296 sb .append (" " ).append (k ).append (": " ).append (toIndentedString (v )).append ("\n " ));
0 commit comments