@@ -148,7 +148,7 @@ public final String type() {
148
148
}
149
149
150
150
/**
151
- * Additional details about the error
151
+ * Additional details about the error.
152
152
*/
153
153
public final Map <String , JsonData > metadata () {
154
154
return this .metadata ;
@@ -168,52 +168,42 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
168
168
for (Map .Entry <String , JsonData > item0 : this .metadata .entrySet ()) {
169
169
generator .writeKey (item0 .getKey ());
170
170
item0 .getValue ().serialize (generator , mapper );
171
-
172
171
}
173
-
174
172
if (this .causedBy != null ) {
175
173
generator .writeKey ("caused_by" );
176
174
this .causedBy .serialize (generator , mapper );
177
-
178
175
}
179
176
180
177
if (this .reason != null ) {
181
178
generator .writeKey ("reason" );
182
179
generator .write (this .reason );
183
-
184
180
}
185
181
186
182
if (ApiTypeHelper .isDefined (this .rootCause )) {
187
183
generator .writeKey ("root_cause" );
188
184
generator .writeStartArray ();
189
185
for (ErrorCause item0 : this .rootCause ) {
190
186
item0 .serialize (generator , mapper );
191
-
192
187
}
193
188
generator .writeEnd ();
194
-
195
189
}
196
190
197
191
if (this .stackTrace != null ) {
198
192
generator .writeKey ("stack_trace" );
199
193
generator .write (this .stackTrace );
200
-
201
194
}
202
195
203
196
if (ApiTypeHelper .isDefined (this .suppressed )) {
204
197
generator .writeKey ("suppressed" );
205
198
generator .writeStartArray ();
206
199
for (ErrorCause item0 : this .suppressed ) {
207
200
item0 .serialize (generator , mapper );
208
-
209
201
}
210
202
generator .writeEnd ();
211
-
212
203
}
213
204
214
205
generator .writeKey ("type" );
215
206
generator .write (this .type );
216
-
217
207
}
218
208
219
209
// ---------------------------------------------------------------------------------------------
@@ -355,15 +345,23 @@ public final Builder type(String value) {
355
345
}
356
346
357
347
/**
358
- * Additional details about the error
348
+ * Additional details about the error.
349
+ *
350
+ * <p>
351
+ * Adds all elements of <code>map</code> to <code>metadata</code>.
352
+ * </p>
359
353
*/
360
354
public final Builder metadata (Map <String , JsonData > map ) {
361
355
this .metadata = _mapPutAll (this .metadata , map );
362
356
return this ;
363
357
}
364
358
365
359
/**
366
- * Additional details about the error
360
+ * Additional details about the error.
361
+ *
362
+ * <p>
363
+ * Adds an entry to <code>metadata</code>.
364
+ * </p>
367
365
*/
368
366
public final Builder metadata (String key , JsonData value ) {
369
367
this .metadata = _mapPut (this .metadata , key , value );
0 commit comments