@@ -56,6 +56,10 @@ class Item implements SerializableInterface, JsonSerializable
56
56
/** @var ItemMandatoryObject */
57
57
private $ mandatoryObject ;
58
58
59
+ private $ mandatoryMixed ;
60
+
61
+ private $ mandatoryAnyOf ;
62
+
59
63
/** @var ItemNullableObject|null */
60
64
private $ nullableObject ;
61
65
@@ -83,6 +87,9 @@ class Item implements SerializableInterface, JsonSerializable
83
87
/** @var string[]|null */
84
88
private $ optionalArray ;
85
89
90
+ /** @var mixed[]|null */
91
+ private $ optionalMixedArray ;
92
+
86
93
/** @var string[]|null */
87
94
private $ optionalArrayWithMinMaxItems ;
88
95
@@ -113,7 +120,7 @@ class Item implements SerializableInterface, JsonSerializable
113
120
*
114
121
* @throws RequestValidationException
115
122
*/
116
- public function __construct (int $ mandatoryInteger , string $ mandatoryString , string $ mandatoryEnum , DateTimeInterface $ mandatoryDate , ?DateTimeInterface $ mandatoryNullableDate , float $ mandatoryFloat , bool $ mandatoryBoolean , array $ mandatoryArray , array $ mandatoryArrayWithMinItems , ItemMandatoryObject $ mandatoryObject )
123
+ public function __construct (int $ mandatoryInteger , string $ mandatoryString , string $ mandatoryEnum , DateTimeInterface $ mandatoryDate , ?DateTimeInterface $ mandatoryNullableDate , float $ mandatoryFloat , bool $ mandatoryBoolean , array $ mandatoryArray , array $ mandatoryArrayWithMinItems , ItemMandatoryObject $ mandatoryObject, $ mandatoryMixed , $ mandatoryAnyOf )
117
124
{
118
125
$ this ->mandatoryInteger = $ mandatoryInteger ;
119
126
$ this ->mandatoryString = $ mandatoryString ;
@@ -131,6 +138,8 @@ public function __construct(int $mandatoryInteger, string $mandatoryString, stri
131
138
}
132
139
$ this ->mandatoryArrayWithMinItems = $ mandatoryArrayWithMinItems ;
133
140
$ this ->mandatoryObject = $ mandatoryObject ;
141
+ $ this ->mandatoryMixed = $ mandatoryMixed ;
142
+ $ this ->mandatoryAnyOf = $ mandatoryAnyOf ;
134
143
}
135
144
136
145
public function setNullableObject (?ItemNullableObject $ nullableObject ): self
@@ -205,6 +214,16 @@ public function setOptionalArray(array $optionalArray): self
205
214
return $ this ;
206
215
}
207
216
217
+ /**
218
+ * @param mixed[] $optionalMixedArray
219
+ */
220
+ public function setOptionalMixedArray (array $ optionalMixedArray ): self
221
+ {
222
+ $ this ->optionalMixedArray = $ optionalMixedArray ;
223
+
224
+ return $ this ;
225
+ }
226
+
208
227
/**
209
228
* @param string[] $optionalArrayWithMinMaxItems
210
229
*
@@ -379,6 +398,16 @@ public function getMandatoryObject(): ItemMandatoryObject
379
398
return $ this ->mandatoryObject ;
380
399
}
381
400
401
+ public function getMandatoryMixed ()
402
+ {
403
+ return $ this ->mandatoryMixed ;
404
+ }
405
+
406
+ public function getMandatoryAnyOf ()
407
+ {
408
+ return $ this ->mandatoryAnyOf ;
409
+ }
410
+
382
411
public function getNullableObject (): ?ItemNullableObject
383
412
{
384
413
return $ this ->nullableObject ;
@@ -427,6 +456,14 @@ public function getOptionalArray(): ?array
427
456
return $ this ->optionalArray ;
428
457
}
429
458
459
+ /**
460
+ * @return mixed[]|null
461
+ */
462
+ public function getOptionalMixedArray (): ?array
463
+ {
464
+ return $ this ->optionalMixedArray ;
465
+ }
466
+
430
467
/**
431
468
* @return string[]|null
432
469
*/
@@ -483,6 +520,8 @@ public function toArray(): array
483
520
$ fields ['mandatoryArray ' ] = $ this ->mandatoryArray ;
484
521
$ fields ['mandatoryArrayWithMinItems ' ] = $ this ->mandatoryArrayWithMinItems ;
485
522
$ fields ['mandatoryObject ' ] = $ this ->mandatoryObject ->toArray ();
523
+ $ fields ['mandatoryMixed ' ] = $ this ->mandatoryMixed ;
524
+ $ fields ['mandatoryAnyOf ' ] = $ this ->mandatoryAnyOf ;
486
525
$ fields ['nullableObject ' ] = $ this ->nullableObject !== null ? $ this ->nullableObject ->toArray () : null ;
487
526
$ fields ['nullableDate ' ] = $ this ->nullableDate !== null ? $ this ->nullableDate ->format (DATE_RFC3339 ) : null ;
488
527
if ($ this ->optionalInteger !== null ) {
@@ -506,6 +545,9 @@ public function toArray(): array
506
545
if ($ this ->optionalArray !== null ) {
507
546
$ fields ['optionalArray ' ] = $ this ->optionalArray ;
508
547
}
548
+ if ($ this ->optionalMixedArray !== null ) {
549
+ $ fields ['optionalMixedArray ' ] = $ this ->optionalMixedArray ;
550
+ }
509
551
if ($ this ->optionalArrayWithMinMaxItems !== null ) {
510
552
$ fields ['optionalArrayWithMinMaxItems ' ] = $ this ->optionalArrayWithMinMaxItems ;
511
553
}
0 commit comments