@@ -102,11 +102,14 @@ public function __construct(?array $campaignIds = null, ?array $ids = null, ?arr
102102 }
103103 /**
104104 * Get CampaignIds value
105+ * An additional test has been added (isset) before returning the property value as
106+ * this property may have been unset before, due to the fact that this property is
107+ * removable from the request (minOccurs=0)
105108 * @return int[]
106109 */
107110 public function getCampaignIds (): ?array
108111 {
109- return $ this ->CampaignIds ;
112+ return $ this ->CampaignIds ?? null ;
110113 }
111114 /**
112115 * This method is responsible for validating the value(s) passed to the setCampaignIds method
@@ -137,6 +140,8 @@ public static function validateCampaignIdsForArrayConstraintFromSetCampaignIds(?
137140 }
138141 /**
139142 * Set CampaignIds value
143+ * This property is removable from request (minOccurs=0), therefore if the value
144+ * assigned to this property is null, it is removed from this object
140145 * @throws InvalidArgumentException
141146 * @param int[] $campaignIds
142147 * @return \StructType\ApiAdGroupsSelectionCriteria
@@ -147,7 +152,11 @@ public function setCampaignIds(?array $campaignIds = null): self
147152 if ('' !== ($ campaignIdsArrayErrorMessage = self ::validateCampaignIdsForArrayConstraintFromSetCampaignIds ($ campaignIds ))) {
148153 throw new InvalidArgumentException ($ campaignIdsArrayErrorMessage , __LINE__ );
149154 }
150- $ this ->CampaignIds = $ campaignIds ;
155+ if (is_null ($ campaignIds ) || (is_array ($ campaignIds ) && empty ($ campaignIds ))) {
156+ unset($ this ->CampaignIds );
157+ } else {
158+ $ this ->CampaignIds = $ campaignIds ;
159+ }
151160
152161 return $ this ;
153162 }
@@ -169,11 +178,14 @@ public function addToCampaignIds(int $item): self
169178 }
170179 /**
171180 * Get Ids value
181+ * An additional test has been added (isset) before returning the property value as
182+ * this property may have been unset before, due to the fact that this property is
183+ * removable from the request (minOccurs=0)
172184 * @return int[]
173185 */
174186 public function getIds (): ?array
175187 {
176- return $ this ->Ids ;
188+ return $ this ->Ids ?? null ;
177189 }
178190 /**
179191 * This method is responsible for validating the value(s) passed to the setIds method
@@ -204,6 +216,8 @@ public static function validateIdsForArrayConstraintFromSetIds(?array $values =
204216 }
205217 /**
206218 * Set Ids value
219+ * This property is removable from request (minOccurs=0), therefore if the value
220+ * assigned to this property is null, it is removed from this object
207221 * @throws InvalidArgumentException
208222 * @param int[] $ids
209223 * @return \StructType\ApiAdGroupsSelectionCriteria
@@ -214,7 +228,11 @@ public function setIds(?array $ids = null): self
214228 if ('' !== ($ idsArrayErrorMessage = self ::validateIdsForArrayConstraintFromSetIds ($ ids ))) {
215229 throw new InvalidArgumentException ($ idsArrayErrorMessage , __LINE__ );
216230 }
217- $ this ->Ids = $ ids ;
231+ if (is_null ($ ids ) || (is_array ($ ids ) && empty ($ ids ))) {
232+ unset($ this ->Ids );
233+ } else {
234+ $ this ->Ids = $ ids ;
235+ }
218236
219237 return $ this ;
220238 }
@@ -236,11 +254,14 @@ public function addToIds(int $item): self
236254 }
237255 /**
238256 * Get Types value
257+ * An additional test has been added (isset) before returning the property value as
258+ * this property may have been unset before, due to the fact that this property is
259+ * removable from the request (minOccurs=0)
239260 * @return string[]
240261 */
241262 public function getTypes (): ?array
242263 {
243- return $ this ->Types ;
264+ return $ this ->Types ?? null ;
244265 }
245266 /**
246267 * This method is responsible for validating the value(s) passed to the setTypes method
@@ -271,6 +292,8 @@ public static function validateTypesForArrayConstraintFromSetTypes(?array $value
271292 }
272293 /**
273294 * Set Types value
295+ * This property is removable from request (minOccurs=0), therefore if the value
296+ * assigned to this property is null, it is removed from this object
274297 * @uses \EnumType\ApiAdGroupTypesEnum::valueIsValid()
275298 * @uses \EnumType\ApiAdGroupTypesEnum::getValidValues()
276299 * @throws InvalidArgumentException
@@ -283,7 +306,11 @@ public function setTypes(?array $types = null): self
283306 if ('' !== ($ typesArrayErrorMessage = self ::validateTypesForArrayConstraintFromSetTypes ($ types ))) {
284307 throw new InvalidArgumentException ($ typesArrayErrorMessage , __LINE__ );
285308 }
286- $ this ->Types = $ types ;
309+ if (is_null ($ types ) || (is_array ($ types ) && empty ($ types ))) {
310+ unset($ this ->Types );
311+ } else {
312+ $ this ->Types = $ types ;
313+ }
287314
288315 return $ this ;
289316 }
@@ -307,11 +334,14 @@ public function addToTypes(string $item): self
307334 }
308335 /**
309336 * Get Statuses value
337+ * An additional test has been added (isset) before returning the property value as
338+ * this property may have been unset before, due to the fact that this property is
339+ * removable from the request (minOccurs=0)
310340 * @return string[]
311341 */
312342 public function getStatuses (): ?array
313343 {
314- return $ this ->Statuses ;
344+ return $ this ->Statuses ?? null ;
315345 }
316346 /**
317347 * This method is responsible for validating the value(s) passed to the setStatuses method
@@ -342,6 +372,8 @@ public static function validateStatusesForArrayConstraintFromSetStatuses(?array
342372 }
343373 /**
344374 * Set Statuses value
375+ * This property is removable from request (minOccurs=0), therefore if the value
376+ * assigned to this property is null, it is removed from this object
345377 * @uses \EnumType\ApiStatusSelectionEnum::valueIsValid()
346378 * @uses \EnumType\ApiStatusSelectionEnum::getValidValues()
347379 * @throws InvalidArgumentException
@@ -354,7 +386,11 @@ public function setStatuses(?array $statuses = null): self
354386 if ('' !== ($ statusesArrayErrorMessage = self ::validateStatusesForArrayConstraintFromSetStatuses ($ statuses ))) {
355387 throw new InvalidArgumentException ($ statusesArrayErrorMessage , __LINE__ );
356388 }
357- $ this ->Statuses = $ statuses ;
389+ if (is_null ($ statuses ) || (is_array ($ statuses ) && empty ($ statuses ))) {
390+ unset($ this ->Statuses );
391+ } else {
392+ $ this ->Statuses = $ statuses ;
393+ }
358394
359395 return $ this ;
360396 }
@@ -378,11 +414,14 @@ public function addToStatuses(string $item): self
378414 }
379415 /**
380416 * Get TagIds value
417+ * An additional test has been added (isset) before returning the property value as
418+ * this property may have been unset before, due to the fact that this property is
419+ * removable from the request (minOccurs=0)
381420 * @return int[]
382421 */
383422 public function getTagIds (): ?array
384423 {
385- return $ this ->TagIds ;
424+ return $ this ->TagIds ?? null ;
386425 }
387426 /**
388427 * This method is responsible for validating the value(s) passed to the setTagIds method
@@ -413,6 +452,8 @@ public static function validateTagIdsForArrayConstraintFromSetTagIds(?array $val
413452 }
414453 /**
415454 * Set TagIds value
455+ * This property is removable from request (minOccurs=0), therefore if the value
456+ * assigned to this property is null, it is removed from this object
416457 * @throws InvalidArgumentException
417458 * @param int[] $tagIds
418459 * @return \StructType\ApiAdGroupsSelectionCriteria
@@ -423,7 +464,11 @@ public function setTagIds(?array $tagIds = null): self
423464 if ('' !== ($ tagIdsArrayErrorMessage = self ::validateTagIdsForArrayConstraintFromSetTagIds ($ tagIds ))) {
424465 throw new InvalidArgumentException ($ tagIdsArrayErrorMessage , __LINE__ );
425466 }
426- $ this ->TagIds = $ tagIds ;
467+ if (is_null ($ tagIds ) || (is_array ($ tagIds ) && empty ($ tagIds ))) {
468+ unset($ this ->TagIds );
469+ } else {
470+ $ this ->TagIds = $ tagIds ;
471+ }
427472
428473 return $ this ;
429474 }
@@ -445,11 +490,14 @@ public function addToTagIds(int $item): self
445490 }
446491 /**
447492 * Get Tags value
493+ * An additional test has been added (isset) before returning the property value as
494+ * this property may have been unset before, due to the fact that this property is
495+ * removable from the request (minOccurs=0)
448496 * @return string[]
449497 */
450498 public function getTags (): ?array
451499 {
452- return $ this ->Tags ;
500+ return $ this ->Tags ?? null ;
453501 }
454502 /**
455503 * This method is responsible for validating the value(s) passed to the setTags method
@@ -480,6 +528,8 @@ public static function validateTagsForArrayConstraintFromSetTags(?array $values
480528 }
481529 /**
482530 * Set Tags value
531+ * This property is removable from request (minOccurs=0), therefore if the value
532+ * assigned to this property is null, it is removed from this object
483533 * @throws InvalidArgumentException
484534 * @param string[] $tags
485535 * @return \StructType\ApiAdGroupsSelectionCriteria
@@ -490,7 +540,11 @@ public function setTags(?array $tags = null): self
490540 if ('' !== ($ tagsArrayErrorMessage = self ::validateTagsForArrayConstraintFromSetTags ($ tags ))) {
491541 throw new InvalidArgumentException ($ tagsArrayErrorMessage , __LINE__ );
492542 }
493- $ this ->Tags = $ tags ;
543+ if (is_null ($ tags ) || (is_array ($ tags ) && empty ($ tags ))) {
544+ unset($ this ->Tags );
545+ } else {
546+ $ this ->Tags = $ tags ;
547+ }
494548
495549 return $ this ;
496550 }
@@ -512,11 +566,14 @@ public function addToTags(string $item): self
512566 }
513567 /**
514568 * Get AppIconStatuses value
569+ * An additional test has been added (isset) before returning the property value as
570+ * this property may have been unset before, due to the fact that this property is
571+ * removable from the request (minOccurs=0)
515572 * @return string[]
516573 */
517574 public function getAppIconStatuses (): ?array
518575 {
519- return $ this ->AppIconStatuses ;
576+ return $ this ->AppIconStatuses ?? null ;
520577 }
521578 /**
522579 * This method is responsible for validating the value(s) passed to the setAppIconStatuses method
@@ -547,6 +604,8 @@ public static function validateAppIconStatusesForArrayConstraintFromSetAppIconSt
547604 }
548605 /**
549606 * Set AppIconStatuses value
607+ * This property is removable from request (minOccurs=0), therefore if the value
608+ * assigned to this property is null, it is removed from this object
550609 * @uses \EnumType\ApiStatusSelectionEnum::valueIsValid()
551610 * @uses \EnumType\ApiStatusSelectionEnum::getValidValues()
552611 * @throws InvalidArgumentException
@@ -559,7 +618,11 @@ public function setAppIconStatuses(?array $appIconStatuses = null): self
559618 if ('' !== ($ appIconStatusesArrayErrorMessage = self ::validateAppIconStatusesForArrayConstraintFromSetAppIconStatuses ($ appIconStatuses ))) {
560619 throw new InvalidArgumentException ($ appIconStatusesArrayErrorMessage , __LINE__ );
561620 }
562- $ this ->AppIconStatuses = $ appIconStatuses ;
621+ if (is_null ($ appIconStatuses ) || (is_array ($ appIconStatuses ) && empty ($ appIconStatuses ))) {
622+ unset($ this ->AppIconStatuses );
623+ } else {
624+ $ this ->AppIconStatuses = $ appIconStatuses ;
625+ }
563626
564627 return $ this ;
565628 }
0 commit comments