@@ -29,6 +29,14 @@ private constructor(
29
29
/* * The identifier of the Account to update. */
30
30
fun accountId (): String? = accountId
31
31
32
+ /* *
33
+ * The new credit limit of the Account, if and only if the Account is a loan account.
34
+ *
35
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
36
+ * server responded with an unexpected value).
37
+ */
38
+ fun creditLimit (): Long? = body.creditLimit()
39
+
32
40
/* *
33
41
* The new name of the Account.
34
42
*
@@ -37,6 +45,13 @@ private constructor(
37
45
*/
38
46
fun name (): String? = body.name()
39
47
48
+ /* *
49
+ * Returns the raw JSON value of [creditLimit].
50
+ *
51
+ * Unlike [creditLimit], this method doesn't throw if the JSON field has an unexpected type.
52
+ */
53
+ fun _creditLimit (): JsonField <Long > = body._creditLimit ()
54
+
40
55
/* *
41
56
* Returns the raw JSON value of [name].
42
57
*
@@ -83,10 +98,23 @@ private constructor(
83
98
*
84
99
* This is generally only useful if you are already constructing the body separately.
85
100
* Otherwise, it's more convenient to use the top-level setters instead:
101
+ * - [creditLimit]
86
102
* - [name]
87
103
*/
88
104
fun body (body : Body ) = apply { this .body = body.toBuilder() }
89
105
106
+ /* * The new credit limit of the Account, if and only if the Account is a loan account. */
107
+ fun creditLimit (creditLimit : Long ) = apply { body.creditLimit(creditLimit) }
108
+
109
+ /* *
110
+ * Sets [Builder.creditLimit] to an arbitrary JSON value.
111
+ *
112
+ * You should usually call [Builder.creditLimit] with a well-typed [Long] value instead.
113
+ * This method is primarily for setting the field to an undocumented or not yet supported
114
+ * value.
115
+ */
116
+ fun creditLimit (creditLimit : JsonField <Long >) = apply { body.creditLimit(creditLimit) }
117
+
90
118
/* * The new name of the Account. */
91
119
fun name (name : String ) = apply { body.name(name) }
92
120
@@ -243,14 +271,26 @@ private constructor(
243
271
244
272
class Body
245
273
private constructor (
274
+ private val creditLimit: JsonField <Long >,
246
275
private val name: JsonField <String >,
247
276
private val additionalProperties: MutableMap <String , JsonValue >,
248
277
) {
249
278
250
279
@JsonCreator
251
280
private constructor (
252
- @JsonProperty(" name" ) @ExcludeMissing name: JsonField <String > = JsonMissing .of()
253
- ) : this (name, mutableMapOf ())
281
+ @JsonProperty(" credit_limit" )
282
+ @ExcludeMissing
283
+ creditLimit: JsonField <Long > = JsonMissing .of(),
284
+ @JsonProperty(" name" ) @ExcludeMissing name: JsonField <String > = JsonMissing .of(),
285
+ ) : this (creditLimit, name, mutableMapOf ())
286
+
287
+ /* *
288
+ * The new credit limit of the Account, if and only if the Account is a loan account.
289
+ *
290
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
291
+ * the server responded with an unexpected value).
292
+ */
293
+ fun creditLimit (): Long? = creditLimit.getNullable(" credit_limit" )
254
294
255
295
/* *
256
296
* The new name of the Account.
@@ -260,6 +300,15 @@ private constructor(
260
300
*/
261
301
fun name (): String? = name.getNullable(" name" )
262
302
303
+ /* *
304
+ * Returns the raw JSON value of [creditLimit].
305
+ *
306
+ * Unlike [creditLimit], this method doesn't throw if the JSON field has an unexpected type.
307
+ */
308
+ @JsonProperty(" credit_limit" )
309
+ @ExcludeMissing
310
+ fun _creditLimit (): JsonField <Long > = creditLimit
311
+
263
312
/* *
264
313
* Returns the raw JSON value of [name].
265
314
*
@@ -288,14 +337,30 @@ private constructor(
288
337
/* * A builder for [Body]. */
289
338
class Builder internal constructor() {
290
339
340
+ private var creditLimit: JsonField <Long > = JsonMissing .of()
291
341
private var name: JsonField <String > = JsonMissing .of()
292
342
private var additionalProperties: MutableMap <String , JsonValue > = mutableMapOf ()
293
343
294
344
internal fun from (body : Body ) = apply {
345
+ creditLimit = body.creditLimit
295
346
name = body.name
296
347
additionalProperties = body.additionalProperties.toMutableMap()
297
348
}
298
349
350
+ /* *
351
+ * The new credit limit of the Account, if and only if the Account is a loan account.
352
+ */
353
+ fun creditLimit (creditLimit : Long ) = creditLimit(JsonField .of(creditLimit))
354
+
355
+ /* *
356
+ * Sets [Builder.creditLimit] to an arbitrary JSON value.
357
+ *
358
+ * You should usually call [Builder.creditLimit] with a well-typed [Long] value instead.
359
+ * This method is primarily for setting the field to an undocumented or not yet
360
+ * supported value.
361
+ */
362
+ fun creditLimit (creditLimit : JsonField <Long >) = apply { this .creditLimit = creditLimit }
363
+
299
364
/* * The new name of the Account. */
300
365
fun name (name : String ) = name(JsonField .of(name))
301
366
@@ -332,7 +397,7 @@ private constructor(
332
397
*
333
398
* Further updates to this [Builder] will not mutate the returned instance.
334
399
*/
335
- fun build (): Body = Body (name, additionalProperties.toMutableMap())
400
+ fun build (): Body = Body (creditLimit, name, additionalProperties.toMutableMap())
336
401
}
337
402
338
403
private var validated: Boolean = false
@@ -342,6 +407,7 @@ private constructor(
342
407
return @apply
343
408
}
344
409
410
+ creditLimit()
345
411
name()
346
412
validated = true
347
413
}
@@ -360,23 +426,25 @@ private constructor(
360
426
*
361
427
* Used for best match union deserialization.
362
428
*/
363
- internal fun validity (): Int = (if (name.asKnown() == null ) 0 else 1 )
429
+ internal fun validity (): Int =
430
+ (if (creditLimit.asKnown() == null ) 0 else 1 ) + (if (name.asKnown() == null ) 0 else 1 )
364
431
365
432
override fun equals (other : Any? ): Boolean {
366
433
if (this == = other) {
367
434
return true
368
435
}
369
436
370
- return /* spotless:off */ other is Body && name == other.name && additionalProperties == other.additionalProperties /* spotless:on */
437
+ return /* spotless:off */ other is Body && creditLimit == other.creditLimit && name == other.name && additionalProperties == other.additionalProperties /* spotless:on */
371
438
}
372
439
373
440
/* spotless:off */
374
- private val hashCode: Int by lazy { Objects .hash(name, additionalProperties) }
441
+ private val hashCode: Int by lazy { Objects .hash(creditLimit, name, additionalProperties) }
375
442
/* spotless:on */
376
443
377
444
override fun hashCode (): Int = hashCode
378
445
379
- override fun toString () = " Body{name=$name , additionalProperties=$additionalProperties }"
446
+ override fun toString () =
447
+ " Body{creditLimit=$creditLimit , name=$name , additionalProperties=$additionalProperties }"
380
448
}
381
449
382
450
override fun equals (other : Any? ): Boolean {
0 commit comments