Skip to content

Commit fac2a8c

Browse files
fix(client): deserialization of empty objects
1 parent aac4e9e commit fac2a8c

10 files changed

Lines changed: 67 additions & 0 deletions

brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandAiQueryParams.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ private constructor(
358358
override fun _queryParams(): QueryParams = additionalQueryParams
359359

360360
class Body
361+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
361362
private constructor(
362363
private val dataToExtract: JsonField<List<DataToExtract>>,
363364
private val domain: JsonField<String>,
@@ -661,6 +662,7 @@ private constructor(
661662
}
662663

663664
class DataToExtract
665+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
664666
private constructor(
665667
private val datapointDescription: JsonField<String>,
666668
private val datapointExample: JsonField<String>,
@@ -1135,6 +1137,7 @@ private constructor(
11351137

11361138
/** Optional object specifying which pages to analyze */
11371139
class SpecificPages
1140+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
11381141
private constructor(
11391142
private val aboutUs: JsonField<Boolean>,
11401143
private val blog: JsonField<Boolean>,

brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandAiQueryResponse.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import java.util.Optional
3030
import kotlin.jvm.optionals.getOrNull
3131

3232
class BrandAiQueryResponse
33+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
3334
private constructor(
3435
private val dataExtracted: JsonField<List<DataExtracted>>,
3536
private val domain: JsonField<String>,
@@ -294,6 +295,7 @@ private constructor(
294295
(urlsAnalyzed.asKnown().getOrNull()?.size ?: 0)
295296

296297
class DataExtracted
298+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
297299
private constructor(
298300
private val datapointName: JsonField<String>,
299301
private val datapointValue: JsonField<DatapointValue>,

brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandIdentifyFromTransactionResponse.kt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import java.util.Optional
2121
import kotlin.jvm.optionals.getOrNull
2222

2323
class BrandIdentifyFromTransactionResponse
24+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
2425
private constructor(
2526
private val brand: JsonField<Brand>,
2627
private val code: JsonField<Long>,
@@ -220,6 +221,7 @@ private constructor(
220221

221222
/** Detailed brand information */
222223
class Brand
224+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
223225
private constructor(
224226
private val address: JsonField<Address>,
225227
private val backdrops: JsonField<List<Backdrop>>,
@@ -921,6 +923,7 @@ private constructor(
921923

922924
/** Physical address of the brand */
923925
class Address
926+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
924927
private constructor(
925928
private val city: JsonField<String>,
926929
private val country: JsonField<String>,
@@ -1329,6 +1332,7 @@ private constructor(
13291332
}
13301333

13311334
class Backdrop
1335+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
13321336
private constructor(
13331337
private val colors: JsonField<List<Color>>,
13341338
private val resolution: JsonField<Resolution>,
@@ -1551,6 +1555,7 @@ private constructor(
15511555
(if (url.asKnown().isPresent) 1 else 0)
15521556

15531557
class Color
1558+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
15541559
private constructor(
15551560
private val hex: JsonField<String>,
15561561
private val name: JsonField<String>,
@@ -1732,6 +1737,7 @@ private constructor(
17321737

17331738
/** Resolution of the backdrop image */
17341739
class Resolution
1740+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
17351741
private constructor(
17361742
private val aspectRatio: JsonField<Double>,
17371743
private val height: JsonField<Long>,
@@ -1981,6 +1987,7 @@ private constructor(
19811987
}
19821988

19831989
class Color
1990+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
19841991
private constructor(
19851992
private val hex: JsonField<String>,
19861993
private val name: JsonField<String>,
@@ -2160,6 +2167,7 @@ private constructor(
21602167

21612168
/** Industry classification information for the brand */
21622169
class Industries
2170+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
21632171
private constructor(
21642172
private val eic: JsonField<List<Eic>>,
21652173
private val additionalProperties: MutableMap<String, JsonValue>,
@@ -2305,6 +2313,7 @@ private constructor(
23052313
(eic.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0)
23062314

23072315
class Eic
2316+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
23082317
private constructor(
23092318
private val industry: JsonField<Industry>,
23102319
private val subindustry: JsonField<Subindustry>,
@@ -4593,6 +4602,7 @@ private constructor(
45934602

45944603
/** Important website links for the brand */
45954604
class Links
4605+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
45964606
private constructor(
45974607
private val blog: JsonField<String>,
45984608
private val careers: JsonField<String>,
@@ -4945,6 +4955,7 @@ private constructor(
49454955
}
49464956

49474957
class Logo
4958+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
49484959
private constructor(
49494960
private val colors: JsonField<List<Color>>,
49504961
private val mode: JsonField<Mode>,
@@ -5241,6 +5252,7 @@ private constructor(
52415252
(if (url.asKnown().isPresent) 1 else 0)
52425253

52435254
class Color
5255+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
52445256
private constructor(
52455257
private val hex: JsonField<String>,
52465258
private val name: JsonField<String>,
@@ -5563,6 +5575,7 @@ private constructor(
55635575

55645576
/** Resolution of the logo image */
55655577
class Resolution
5578+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
55665579
private constructor(
55675580
private val aspectRatio: JsonField<Double>,
55685581
private val height: JsonField<Long>,
@@ -5945,6 +5958,7 @@ private constructor(
59455958
}
59465959

59475960
class Social
5961+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
59485962
private constructor(
59495963
private val type: JsonField<String>,
59505964
private val url: JsonField<String>,
@@ -6126,6 +6140,7 @@ private constructor(
61266140
* Stock market information for this brand (will be null if not a publicly traded company)
61276141
*/
61286142
class Stock
6143+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
61296144
private constructor(
61306145
private val exchange: JsonField<String>,
61316146
private val ticker: JsonField<String>,

brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandPrefetchParams.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ private constructor(
280280
override fun _queryParams(): QueryParams = additionalQueryParams
281281

282282
class Body
283+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
283284
private constructor(
284285
private val domain: JsonField<String>,
285286
private val timeoutMs: JsonField<Long>,

brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandPrefetchResponse.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import java.util.Objects
1616
import java.util.Optional
1717

1818
class BrandPrefetchResponse
19+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
1920
private constructor(
2021
private val domain: JsonField<String>,
2122
private val message: JsonField<String>,

brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandRetrieveNaicsResponse.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import java.util.Optional
1919
import kotlin.jvm.optionals.getOrNull
2020

2121
class BrandRetrieveNaicsResponse
22+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
2223
private constructor(
2324
private val codes: JsonField<List<Code>>,
2425
private val domain: JsonField<String>,
@@ -259,6 +260,7 @@ private constructor(
259260
(if (type.asKnown().isPresent) 1 else 0)
260261

261262
class Code
263+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
262264
private constructor(
263265
private val code: JsonField<String>,
264266
private val title: JsonField<String>,

brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandRetrieveResponse.kt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import java.util.Optional
2121
import kotlin.jvm.optionals.getOrNull
2222

2323
class BrandRetrieveResponse
24+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
2425
private constructor(
2526
private val brand: JsonField<Brand>,
2627
private val code: JsonField<Long>,
@@ -209,6 +210,7 @@ private constructor(
209210

210211
/** Detailed brand information */
211212
class Brand
213+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
212214
private constructor(
213215
private val address: JsonField<Address>,
214216
private val backdrops: JsonField<List<Backdrop>>,
@@ -910,6 +912,7 @@ private constructor(
910912

911913
/** Physical address of the brand */
912914
class Address
915+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
913916
private constructor(
914917
private val city: JsonField<String>,
915918
private val country: JsonField<String>,
@@ -1318,6 +1321,7 @@ private constructor(
13181321
}
13191322

13201323
class Backdrop
1324+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
13211325
private constructor(
13221326
private val colors: JsonField<List<Color>>,
13231327
private val resolution: JsonField<Resolution>,
@@ -1540,6 +1544,7 @@ private constructor(
15401544
(if (url.asKnown().isPresent) 1 else 0)
15411545

15421546
class Color
1547+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
15431548
private constructor(
15441549
private val hex: JsonField<String>,
15451550
private val name: JsonField<String>,
@@ -1721,6 +1726,7 @@ private constructor(
17211726

17221727
/** Resolution of the backdrop image */
17231728
class Resolution
1729+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
17241730
private constructor(
17251731
private val aspectRatio: JsonField<Double>,
17261732
private val height: JsonField<Long>,
@@ -1970,6 +1976,7 @@ private constructor(
19701976
}
19711977

19721978
class Color
1979+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
19731980
private constructor(
19741981
private val hex: JsonField<String>,
19751982
private val name: JsonField<String>,
@@ -2149,6 +2156,7 @@ private constructor(
21492156

21502157
/** Industry classification information for the brand */
21512158
class Industries
2159+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
21522160
private constructor(
21532161
private val eic: JsonField<List<Eic>>,
21542162
private val additionalProperties: MutableMap<String, JsonValue>,
@@ -2294,6 +2302,7 @@ private constructor(
22942302
(eic.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0)
22952303

22962304
class Eic
2305+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
22972306
private constructor(
22982307
private val industry: JsonField<Industry>,
22992308
private val subindustry: JsonField<Subindustry>,
@@ -4582,6 +4591,7 @@ private constructor(
45824591

45834592
/** Important website links for the brand */
45844593
class Links
4594+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
45854595
private constructor(
45864596
private val blog: JsonField<String>,
45874597
private val careers: JsonField<String>,
@@ -4934,6 +4944,7 @@ private constructor(
49344944
}
49354945

49364946
class Logo
4947+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
49374948
private constructor(
49384949
private val colors: JsonField<List<Color>>,
49394950
private val mode: JsonField<Mode>,
@@ -5230,6 +5241,7 @@ private constructor(
52305241
(if (url.asKnown().isPresent) 1 else 0)
52315242

52325243
class Color
5244+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
52335245
private constructor(
52345246
private val hex: JsonField<String>,
52355247
private val name: JsonField<String>,
@@ -5552,6 +5564,7 @@ private constructor(
55525564

55535565
/** Resolution of the logo image */
55545566
class Resolution
5567+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
55555568
private constructor(
55565569
private val aspectRatio: JsonField<Double>,
55575570
private val height: JsonField<Long>,
@@ -5934,6 +5947,7 @@ private constructor(
59345947
}
59355948

59365949
class Social
5950+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
59375951
private constructor(
59385952
private val type: JsonField<String>,
59395953
private val url: JsonField<String>,
@@ -6115,6 +6129,7 @@ private constructor(
61156129
* Stock market information for this brand (will be null if not a publicly traded company)
61166130
*/
61176131
class Stock
6132+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
61186133
private constructor(
61196134
private val exchange: JsonField<String>,
61206135
private val ticker: JsonField<String>,

brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandRetrieveSimplifiedResponse.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import java.util.Optional
2020
import kotlin.jvm.optionals.getOrNull
2121

2222
class BrandRetrieveSimplifiedResponse
23+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
2324
private constructor(
2425
private val brand: JsonField<Brand>,
2526
private val code: JsonField<Long>,
@@ -218,6 +219,7 @@ private constructor(
218219

219220
/** Simplified brand information */
220221
class Brand
222+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
221223
private constructor(
222224
private val backdrops: JsonField<List<Backdrop>>,
223225
private val colors: JsonField<List<Color>>,
@@ -530,6 +532,7 @@ private constructor(
530532
(if (title.asKnown().isPresent) 1 else 0)
531533

532534
class Backdrop
535+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
533536
private constructor(
534537
private val colors: JsonField<List<Color>>,
535538
private val resolution: JsonField<Resolution>,
@@ -752,6 +755,7 @@ private constructor(
752755
(if (url.asKnown().isPresent) 1 else 0)
753756

754757
class Color
758+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
755759
private constructor(
756760
private val hex: JsonField<String>,
757761
private val name: JsonField<String>,
@@ -933,6 +937,7 @@ private constructor(
933937

934938
/** Resolution of the backdrop image */
935939
class Resolution
940+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
936941
private constructor(
937942
private val aspectRatio: JsonField<Double>,
938943
private val height: JsonField<Long>,
@@ -1182,6 +1187,7 @@ private constructor(
11821187
}
11831188

11841189
class Color
1190+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
11851191
private constructor(
11861192
private val hex: JsonField<String>,
11871193
private val name: JsonField<String>,
@@ -1360,6 +1366,7 @@ private constructor(
13601366
}
13611367

13621368
class Logo
1369+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
13631370
private constructor(
13641371
private val colors: JsonField<List<Color>>,
13651372
private val mode: JsonField<Mode>,
@@ -1656,6 +1663,7 @@ private constructor(
16561663
(if (url.asKnown().isPresent) 1 else 0)
16571664

16581665
class Color
1666+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
16591667
private constructor(
16601668
private val hex: JsonField<String>,
16611669
private val name: JsonField<String>,
@@ -1978,6 +1986,7 @@ private constructor(
19781986

19791987
/** Resolution of the logo image */
19801988
class Resolution
1989+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
19811990
private constructor(
19821991
private val aspectRatio: JsonField<Double>,
19831992
private val height: JsonField<Long>,

brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandScreenshotResponse.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import java.util.Optional
1818
import kotlin.jvm.optionals.getOrNull
1919

2020
class BrandScreenshotResponse
21+
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
2122
private constructor(
2223
private val code: JsonField<Long>,
2324
private val domain: JsonField<String>,

0 commit comments

Comments
 (0)