@@ -25,6 +25,7 @@ private constructor(
2525 private val currency: JsonField <String >,
2626 private val customExpiration: JsonField <CustomExpiration >,
2727 private val filters: JsonField <List <Filter >>,
28+ private val licenseTypeId: JsonField <String >,
2829 private val additionalProperties: MutableMap <String , JsonValue >,
2930) {
3031
@@ -37,8 +38,13 @@ private constructor(
3738 @JsonProperty(" custom_expiration" )
3839 @ExcludeMissing
3940 customExpiration: JsonField <CustomExpiration > = JsonMissing .of(),
40- @JsonProperty(" filters" ) @ExcludeMissing filters: JsonField <List <Filter >> = JsonMissing .of(),
41- ) : this (allowsRollover, currency, customExpiration, filters, mutableMapOf ())
41+ @JsonProperty(" filters" )
42+ @ExcludeMissing
43+ filters: JsonField <List <Filter >> = JsonMissing .of(),
44+ @JsonProperty(" license_type_id" )
45+ @ExcludeMissing
46+ licenseTypeId: JsonField <String > = JsonMissing .of(),
47+ ) : this (allowsRollover, currency, customExpiration, filters, licenseTypeId, mutableMapOf ())
4248
4349 /* *
4450 * @throws OrbInvalidDataException if the JSON field has an unexpected type or is unexpectedly
@@ -64,6 +70,12 @@ private constructor(
6470 */
6571 fun filters (): List <Filter >? = filters.getNullable(" filters" )
6672
73+ /* *
74+ * @throws OrbInvalidDataException if the JSON field has an unexpected type (e.g. if the server
75+ * responded with an unexpected value).
76+ */
77+ fun licenseTypeId (): String? = licenseTypeId.getNullable(" license_type_id" )
78+
6779 /* *
6880 * Returns the raw JSON value of [allowsRollover].
6981 *
@@ -97,6 +109,15 @@ private constructor(
97109 */
98110 @JsonProperty(" filters" ) @ExcludeMissing fun _filters (): JsonField <List <Filter >> = filters
99111
112+ /* *
113+ * Returns the raw JSON value of [licenseTypeId].
114+ *
115+ * Unlike [licenseTypeId], this method doesn't throw if the JSON field has an unexpected type.
116+ */
117+ @JsonProperty(" license_type_id" )
118+ @ExcludeMissing
119+ fun _licenseTypeId (): JsonField <String > = licenseTypeId
120+
100121 @JsonAnySetter
101122 private fun putAdditionalProperty (key : String , value : JsonValue ) {
102123 additionalProperties.put(key, value)
@@ -131,13 +152,15 @@ private constructor(
131152 private var currency: JsonField <String >? = null
132153 private var customExpiration: JsonField <CustomExpiration >? = null
133154 private var filters: JsonField <MutableList <Filter >>? = null
155+ private var licenseTypeId: JsonField <String > = JsonMissing .of()
134156 private var additionalProperties: MutableMap <String , JsonValue > = mutableMapOf ()
135157
136158 internal fun from (allocation : Allocation ) = apply {
137159 allowsRollover = allocation.allowsRollover
138160 currency = allocation.currency
139161 customExpiration = allocation.customExpiration
140162 filters = allocation.filters.map { it.toMutableList() }
163+ licenseTypeId = allocation.licenseTypeId
141164 additionalProperties = allocation.additionalProperties.toMutableMap()
142165 }
143166
@@ -203,6 +226,20 @@ private constructor(
203226 }
204227 }
205228
229+ fun licenseTypeId (licenseTypeId : String? ) =
230+ licenseTypeId(JsonField .ofNullable(licenseTypeId))
231+
232+ /* *
233+ * Sets [Builder.licenseTypeId] to an arbitrary JSON value.
234+ *
235+ * You should usually call [Builder.licenseTypeId] with a well-typed [String] value instead.
236+ * This method is primarily for setting the field to an undocumented or not yet supported
237+ * value.
238+ */
239+ fun licenseTypeId (licenseTypeId : JsonField <String >) = apply {
240+ this .licenseTypeId = licenseTypeId
241+ }
242+
206243 fun additionalProperties (additionalProperties : Map <String , JsonValue >) = apply {
207244 this .additionalProperties.clear()
208245 putAllAdditionalProperties(additionalProperties)
@@ -242,6 +279,7 @@ private constructor(
242279 checkRequired(" currency" , currency),
243280 checkRequired(" customExpiration" , customExpiration),
244281 (filters ? : JsonMissing .of()).map { it.toImmutable() },
282+ licenseTypeId,
245283 additionalProperties.toMutableMap(),
246284 )
247285 }
@@ -257,6 +295,7 @@ private constructor(
257295 currency()
258296 customExpiration()?.validate()
259297 filters()?.forEach { it.validate() }
298+ licenseTypeId()
260299 validated = true
261300 }
262301
@@ -277,7 +316,8 @@ private constructor(
277316 (if (allowsRollover.asKnown() == null ) 0 else 1 ) +
278317 (if (currency.asKnown() == null ) 0 else 1 ) +
279318 (customExpiration.asKnown()?.validity() ? : 0 ) +
280- (filters.asKnown()?.sumOf { it.validity().toInt() } ? : 0 )
319+ (filters.asKnown()?.sumOf { it.validity().toInt() } ? : 0 ) +
320+ (if (licenseTypeId.asKnown() == null ) 0 else 1 )
281321
282322 class Filter
283323 @JsonCreator(mode = JsonCreator .Mode .DISABLED )
@@ -817,15 +857,23 @@ private constructor(
817857 currency == other.currency &&
818858 customExpiration == other.customExpiration &&
819859 filters == other.filters &&
860+ licenseTypeId == other.licenseTypeId &&
820861 additionalProperties == other.additionalProperties
821862 }
822863
823864 private val hashCode: Int by lazy {
824- Objects .hash(allowsRollover, currency, customExpiration, filters, additionalProperties)
865+ Objects .hash(
866+ allowsRollover,
867+ currency,
868+ customExpiration,
869+ filters,
870+ licenseTypeId,
871+ additionalProperties,
872+ )
825873 }
826874
827875 override fun hashCode (): Int = hashCode
828876
829877 override fun toString () =
830- " Allocation{allowsRollover=$allowsRollover , currency=$currency , customExpiration=$customExpiration , filters=$filters , additionalProperties=$additionalProperties }"
878+ " Allocation{allowsRollover=$allowsRollover , currency=$currency , customExpiration=$customExpiration , filters=$filters , licenseTypeId= $licenseTypeId , additionalProperties=$additionalProperties }"
831879}
0 commit comments