@@ -46,7 +46,7 @@ public final class AdminLeaderboard {
4646
4747 private final Optional <String > pointsSystemId ;
4848
49- private final int maxParticipants ;
49+ private final Optional < Integer > maxParticipants ;
5050
5151 private final String start ;
5252
@@ -62,9 +62,10 @@ public final class AdminLeaderboard {
6262
6363 private AdminLeaderboard (String id , String name , String key , Optional <String > description ,
6464 AdminLeaderboardStatus status , AdminLeaderboardRankBy rankBy , Optional <String > metricId ,
65- Optional <String > pointsSystemId , int maxParticipants , String start , Optional <String > end ,
66- List <String > breakdownAttributes , Optional <AdminLeaderboardRunUnit > runUnit ,
67- Optional <Integer > runInterval , Map <String , Object > additionalProperties ) {
65+ Optional <String > pointsSystemId , Optional <Integer > maxParticipants , String start ,
66+ Optional <String > end , List <String > breakdownAttributes ,
67+ Optional <AdminLeaderboardRunUnit > runUnit , Optional <Integer > runInterval ,
68+ Map <String , Object > additionalProperties ) {
6869 this .id = id ;
6970 this .name = name ;
7071 this .key = key ;
@@ -150,7 +151,7 @@ public Optional<String> getPointsSystemId() {
150151 * @return The maximum number of participants.
151152 */
152153 @ JsonProperty ("maxParticipants" )
153- public int getMaxParticipants () {
154+ public Optional < Integer > getMaxParticipants () {
154155 return maxParticipants ;
155156 }
156157
@@ -206,7 +207,7 @@ public Map<String, Object> getAdditionalProperties() {
206207 }
207208
208209 private boolean equalTo (AdminLeaderboard other ) {
209- return id .equals (other .id ) && name .equals (other .name ) && key .equals (other .key ) && description .equals (other .description ) && status .equals (other .status ) && rankBy .equals (other .rankBy ) && metricId .equals (other .metricId ) && pointsSystemId .equals (other .pointsSystemId ) && maxParticipants == other .maxParticipants && start .equals (other .start ) && end .equals (other .end ) && breakdownAttributes .equals (other .breakdownAttributes ) && runUnit .equals (other .runUnit ) && runInterval .equals (other .runInterval );
210+ return id .equals (other .id ) && name .equals (other .name ) && key .equals (other .key ) && description .equals (other .description ) && status .equals (other .status ) && rankBy .equals (other .rankBy ) && metricId .equals (other .metricId ) && pointsSystemId .equals (other .pointsSystemId ) && maxParticipants . equals ( other .maxParticipants ) && start .equals (other .start ) && end .equals (other .end ) && breakdownAttributes .equals (other .breakdownAttributes ) && runUnit .equals (other .runUnit ) && runInterval .equals (other .runInterval );
210211 }
211212
212213 @ java .lang .Override
@@ -257,14 +258,7 @@ public interface RankByStage {
257258 /**
258259 * <p>What the leaderboard ranks by.</p>
259260 */
260- MaxParticipantsStage rankBy (@ NotNull AdminLeaderboardRankBy rankBy );
261- }
262-
263- public interface MaxParticipantsStage {
264- /**
265- * <p>The maximum number of participants.</p>
266- */
267- StartStage maxParticipants (int maxParticipants );
261+ StartStage rankBy (@ NotNull AdminLeaderboardRankBy rankBy );
268262 }
269263
270264 public interface StartStage {
@@ -298,6 +292,13 @@ public interface _FinalStage {
298292
299293 _FinalStage pointsSystemId (String pointsSystemId );
300294
295+ /**
296+ * <p>The maximum number of participants.</p>
297+ */
298+ _FinalStage maxParticipants (Optional <Integer > maxParticipants );
299+
300+ _FinalStage maxParticipants (Integer maxParticipants );
301+
301302 /**
302303 * <p>The optional leaderboard end date in YYYY-MM-DD format.</p>
303304 */
@@ -332,7 +333,7 @@ public interface _FinalStage {
332333 @ JsonIgnoreProperties (
333334 ignoreUnknown = true
334335 )
335- public static final class Builder implements IdStage , NameStage , KeyStage , StatusStage , RankByStage , MaxParticipantsStage , StartStage , _FinalStage {
336+ public static final class Builder implements IdStage , NameStage , KeyStage , StatusStage , RankByStage , StartStage , _FinalStage {
336337 private String id ;
337338
338339 private String name ;
@@ -343,8 +344,6 @@ public static final class Builder implements IdStage, NameStage, KeyStage, Statu
343344
344345 private AdminLeaderboardRankBy rankBy ;
345346
346- private int maxParticipants ;
347-
348347 private String start ;
349348
350349 private Optional <Integer > runInterval = Optional .empty ();
@@ -355,6 +354,8 @@ public static final class Builder implements IdStage, NameStage, KeyStage, Statu
355354
356355 private Optional <String > end = Optional .empty ();
357356
357+ private Optional <Integer > maxParticipants = Optional .empty ();
358+
358359 private Optional <String > pointsSystemId = Optional .empty ();
359360
360361 private Optional <String > metricId = Optional .empty ();
@@ -441,23 +442,11 @@ public RankByStage status(@NotNull AdminLeaderboardStatus status) {
441442 */
442443 @ java .lang .Override
443444 @ JsonSetter ("rankBy" )
444- public MaxParticipantsStage rankBy (@ NotNull AdminLeaderboardRankBy rankBy ) {
445+ public StartStage rankBy (@ NotNull AdminLeaderboardRankBy rankBy ) {
445446 this .rankBy = Objects .requireNonNull (rankBy , "rankBy must not be null" );
446447 return this ;
447448 }
448449
449- /**
450- * <p>The maximum number of participants.</p>
451- * <p>The maximum number of participants.</p>
452- * @return Reference to {@code this} so that method calls can be chained together.
453- */
454- @ java .lang .Override
455- @ JsonSetter ("maxParticipants" )
456- public StartStage maxParticipants (int maxParticipants ) {
457- this .maxParticipants = maxParticipants ;
458- return this ;
459- }
460-
461450 /**
462451 * <p>The leaderboard start date in YYYY-MM-DD format.</p>
463452 * <p>The leaderboard start date in YYYY-MM-DD format.</p>
@@ -575,6 +564,29 @@ public _FinalStage end(Optional<String> end) {
575564 return this ;
576565 }
577566
567+ /**
568+ * <p>The maximum number of participants.</p>
569+ * @return Reference to {@code this} so that method calls can be chained together.
570+ */
571+ @ java .lang .Override
572+ public _FinalStage maxParticipants (Integer maxParticipants ) {
573+ this .maxParticipants = Optional .ofNullable (maxParticipants );
574+ return this ;
575+ }
576+
577+ /**
578+ * <p>The maximum number of participants.</p>
579+ */
580+ @ java .lang .Override
581+ @ JsonSetter (
582+ value = "maxParticipants" ,
583+ nulls = Nulls .SKIP
584+ )
585+ public _FinalStage maxParticipants (Optional <Integer > maxParticipants ) {
586+ this .maxParticipants = maxParticipants ;
587+ return this ;
588+ }
589+
578590 /**
579591 * <p>The points system ID used when <code>rankBy</code> is <code>points</code>.</p>
580592 * @return Reference to {@code this} so that method calls can be chained together.
0 commit comments