Skip to content

Commit 8ee53b2

Browse files
Automatically update Java SDK
1 parent e14fac6 commit 8ee53b2

14 files changed

Lines changed: 962 additions & 61 deletions

‎pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<!-- General project information -->
99
<groupId>so.trophy</groupId>
1010
<artifactId>trophy-java</artifactId>
11-
<version>1.15.0</version>
11+
<version>1.16.0</version>
1212
<packaging>jar</packaging>
1313
<name>Trophy</name>
1414
<description>Java client library for the Trophy API</description>

‎src/main/java/so/trophy/.fern/metadata.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"enable-forward-compatible-enums": false,
77
"retry-status-codes": "legacy"
88
},
9-
"originGitCommit": "b18b99972464468a34beacaa16d18002f3d55fce",
9+
"originGitCommit": "6fa27414d96efb5bd19536d91363e0946cf43387",
1010
"originGitCommitIsDirty": false,
1111
"invokedBy": "ci",
1212
"ciProvider": "github"

‎src/main/java/so/trophy/src/main/java/core/ClientOptions.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ private ClientOptions(Environment environment, Map<String, String> headers,
3535
this.environment = environment;
3636
this.headers = new HashMap<>();
3737
this.headers.putAll(headers);
38-
this.headers.putAll(new HashMap<String,String>() {{put("X-Fern-Language", "JAVA");put("X-Fern-SDK-Name", "com.trophy.fern:api-sdk");put("X-Fern-SDK-Version", "0.0.4860");}});
38+
this.headers.putAll(new HashMap<String,String>() {{put("X-Fern-Language", "JAVA");put("X-Fern-SDK-Name", "com.trophy.fern:api-sdk");put("X-Fern-SDK-Version", "0.0.5071");}});
3939
this.headerSuppliers = headerSuppliers;
4040
this.httpClient = httpClient;
4141
this.timeout = timeout;

‎src/main/java/so/trophy/src/main/java/resources/leaderboards/types/LeaderboardsAllResponseItem.java‎

Lines changed: 97 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ public final class LeaderboardsAllResponseItem implements ILeaderboardResponse {
5959

6060
private final Optional<String> end;
6161

62+
private final Optional<String> startTime;
63+
64+
private final Optional<String> endTime;
65+
6266
private final Optional<Integer> maxParticipants;
6367

6468
private final Optional<LeaderboardResponseRunUnit> runUnit;
@@ -73,10 +77,10 @@ private LeaderboardsAllResponseItem(String id, String name, String key,
7377
LeaderboardResponseRankBy rankBy, Optional<String> breakdownAttribute,
7478
List<String> breakdownAttributes, Optional<String> metricKey, Optional<String> metricName,
7579
Optional<String> pointsSystemKey, Optional<String> pointsSystemName,
76-
Optional<String> description, String start, Optional<String> end,
77-
Optional<Integer> maxParticipants, Optional<LeaderboardResponseRunUnit> runUnit,
78-
Optional<Integer> runInterval, LeaderboardsAllResponseItemStatus status,
79-
Map<String, Object> additionalProperties) {
80+
Optional<String> description, String start, Optional<String> end, Optional<String> startTime,
81+
Optional<String> endTime, Optional<Integer> maxParticipants,
82+
Optional<LeaderboardResponseRunUnit> runUnit, Optional<Integer> runInterval,
83+
LeaderboardsAllResponseItemStatus status, Map<String, Object> additionalProperties) {
8084
this.id = id;
8185
this.name = name;
8286
this.key = key;
@@ -90,6 +94,8 @@ private LeaderboardsAllResponseItem(String id, String name, String key,
9094
this.description = description;
9195
this.start = start;
9296
this.end = end;
97+
this.startTime = startTime;
98+
this.endTime = endTime;
9399
this.maxParticipants = maxParticipants;
94100
this.runUnit = runUnit;
95101
this.runInterval = runInterval;
@@ -213,6 +219,24 @@ public Optional<String> getEnd() {
213219
return end;
214220
}
215221

222+
/**
223+
* @return When set, ranking only counts activity at or after this time of day in the user's timezone (HH:mm format).
224+
*/
225+
@JsonProperty("startTime")
226+
@java.lang.Override
227+
public Optional<String> getStartTime() {
228+
return startTime;
229+
}
230+
231+
/**
232+
* @return When set, ranking only counts activity before this time of day in the user's timezone (HH:mm format).
233+
*/
234+
@JsonProperty("endTime")
235+
@java.lang.Override
236+
public Optional<String> getEndTime() {
237+
return endTime;
238+
}
239+
216240
/**
217241
* @return The maximum number of participants in the leaderboard.
218242
*/
@@ -259,12 +283,12 @@ public Map<String, Object> getAdditionalProperties() {
259283
}
260284

261285
private boolean equalTo(LeaderboardsAllResponseItem other) {
262-
return id.equals(other.id) && name.equals(other.name) && key.equals(other.key) && rankBy.equals(other.rankBy) && breakdownAttribute.equals(other.breakdownAttribute) && breakdownAttributes.equals(other.breakdownAttributes) && metricKey.equals(other.metricKey) && metricName.equals(other.metricName) && pointsSystemKey.equals(other.pointsSystemKey) && pointsSystemName.equals(other.pointsSystemName) && description.equals(other.description) && start.equals(other.start) && end.equals(other.end) && maxParticipants.equals(other.maxParticipants) && runUnit.equals(other.runUnit) && runInterval.equals(other.runInterval) && status.equals(other.status);
286+
return id.equals(other.id) && name.equals(other.name) && key.equals(other.key) && rankBy.equals(other.rankBy) && breakdownAttribute.equals(other.breakdownAttribute) && breakdownAttributes.equals(other.breakdownAttributes) && metricKey.equals(other.metricKey) && metricName.equals(other.metricName) && pointsSystemKey.equals(other.pointsSystemKey) && pointsSystemName.equals(other.pointsSystemName) && description.equals(other.description) && start.equals(other.start) && end.equals(other.end) && startTime.equals(other.startTime) && endTime.equals(other.endTime) && maxParticipants.equals(other.maxParticipants) && runUnit.equals(other.runUnit) && runInterval.equals(other.runInterval) && status.equals(other.status);
263287
}
264288

265289
@java.lang.Override
266290
public int hashCode() {
267-
return Objects.hash(this.id, this.name, this.key, this.rankBy, this.breakdownAttribute, this.breakdownAttributes, this.metricKey, this.metricName, this.pointsSystemKey, this.pointsSystemName, this.description, this.start, this.end, this.maxParticipants, this.runUnit, this.runInterval, this.status);
291+
return Objects.hash(this.id, this.name, this.key, this.rankBy, this.breakdownAttribute, this.breakdownAttributes, this.metricKey, this.metricName, this.pointsSystemKey, this.pointsSystemName, this.description, this.start, this.end, this.startTime, this.endTime, this.maxParticipants, this.runUnit, this.runInterval, this.status);
268292
}
269293

270294
@java.lang.Override
@@ -385,6 +409,20 @@ public interface _FinalStage {
385409

386410
_FinalStage end(String end);
387411

412+
/**
413+
* <p>When set, ranking only counts activity at or after this time of day in the user's timezone (HH:mm format).</p>
414+
*/
415+
_FinalStage startTime(Optional<String> startTime);
416+
417+
_FinalStage startTime(String startTime);
418+
419+
/**
420+
* <p>When set, ranking only counts activity before this time of day in the user's timezone (HH:mm format).</p>
421+
*/
422+
_FinalStage endTime(Optional<String> endTime);
423+
424+
_FinalStage endTime(String endTime);
425+
388426
/**
389427
* <p>The maximum number of participants in the leaderboard.</p>
390428
*/
@@ -429,6 +467,10 @@ public static final class Builder implements IdStage, NameStage, KeyStage, RankB
429467

430468
private Optional<Integer> maxParticipants = Optional.empty();
431469

470+
private Optional<String> endTime = Optional.empty();
471+
472+
private Optional<String> startTime = Optional.empty();
473+
432474
private Optional<String> end = Optional.empty();
433475

434476
private Optional<String> description = Optional.empty();
@@ -466,6 +508,8 @@ public Builder from(LeaderboardsAllResponseItem other) {
466508
description(other.getDescription());
467509
start(other.getStart());
468510
end(other.getEnd());
511+
startTime(other.getStartTime());
512+
endTime(other.getEndTime());
469513
maxParticipants(other.getMaxParticipants());
470514
runUnit(other.getRunUnit());
471515
runInterval(other.getRunInterval());
@@ -608,6 +652,52 @@ public _FinalStage maxParticipants(Optional<Integer> maxParticipants) {
608652
return this;
609653
}
610654

655+
/**
656+
* <p>When set, ranking only counts activity before this time of day in the user's timezone (HH:mm format).</p>
657+
* @return Reference to {@code this} so that method calls can be chained together.
658+
*/
659+
@java.lang.Override
660+
public _FinalStage endTime(String endTime) {
661+
this.endTime = Optional.ofNullable(endTime);
662+
return this;
663+
}
664+
665+
/**
666+
* <p>When set, ranking only counts activity before this time of day in the user's timezone (HH:mm format).</p>
667+
*/
668+
@java.lang.Override
669+
@JsonSetter(
670+
value = "endTime",
671+
nulls = Nulls.SKIP
672+
)
673+
public _FinalStage endTime(Optional<String> endTime) {
674+
this.endTime = endTime;
675+
return this;
676+
}
677+
678+
/**
679+
* <p>When set, ranking only counts activity at or after this time of day in the user's timezone (HH:mm format).</p>
680+
* @return Reference to {@code this} so that method calls can be chained together.
681+
*/
682+
@java.lang.Override
683+
public _FinalStage startTime(String startTime) {
684+
this.startTime = Optional.ofNullable(startTime);
685+
return this;
686+
}
687+
688+
/**
689+
* <p>When set, ranking only counts activity at or after this time of day in the user's timezone (HH:mm format).</p>
690+
*/
691+
@java.lang.Override
692+
@JsonSetter(
693+
value = "startTime",
694+
nulls = Nulls.SKIP
695+
)
696+
public _FinalStage startTime(Optional<String> startTime) {
697+
this.startTime = startTime;
698+
return this;
699+
}
700+
611701
/**
612702
* <p>The end date of the leaderboard in YYYY-MM-DD format, or null if it runs forever.</p>
613703
* @return Reference to {@code this} so that method calls can be chained together.
@@ -809,7 +899,7 @@ public _FinalStage breakdownAttribute(Optional<String> breakdownAttribute) {
809899

810900
@java.lang.Override
811901
public LeaderboardsAllResponseItem build() {
812-
return new LeaderboardsAllResponseItem(id, name, key, rankBy, breakdownAttribute, breakdownAttributes, metricKey, metricName, pointsSystemKey, pointsSystemName, description, start, end, maxParticipants, runUnit, runInterval, status, additionalProperties);
902+
return new LeaderboardsAllResponseItem(id, name, key, rankBy, breakdownAttribute, breakdownAttributes, metricKey, metricName, pointsSystemKey, pointsSystemName, description, start, end, startTime, endTime, maxParticipants, runUnit, runInterval, status, additionalProperties);
813903
}
814904

815905
@java.lang.Override

‎src/main/java/so/trophy/src/main/java/types/AdminLeaderboard.java‎

Lines changed: 94 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ public final class AdminLeaderboard {
5252

5353
private final Optional<String> end;
5454

55+
private final Optional<String> startTime;
56+
57+
private final Optional<String> endTime;
58+
5559
private final List<String> breakdownAttributes;
5660

5761
private final Optional<AdminLeaderboardRunUnit> runUnit;
@@ -63,9 +67,9 @@ public final class AdminLeaderboard {
6367
private AdminLeaderboard(String id, String name, String key, Optional<String> description,
6468
AdminLeaderboardStatus status, AdminLeaderboardRankBy rankBy, Optional<String> metricId,
6569
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) {
70+
Optional<String> end, Optional<String> startTime, Optional<String> endTime,
71+
List<String> breakdownAttributes, Optional<AdminLeaderboardRunUnit> runUnit,
72+
Optional<Integer> runInterval, Map<String, Object> additionalProperties) {
6973
this.id = id;
7074
this.name = name;
7175
this.key = key;
@@ -77,6 +81,8 @@ private AdminLeaderboard(String id, String name, String key, Optional<String> de
7781
this.maxParticipants = maxParticipants;
7882
this.start = start;
7983
this.end = end;
84+
this.startTime = startTime;
85+
this.endTime = endTime;
8086
this.breakdownAttributes = breakdownAttributes;
8187
this.runUnit = runUnit;
8288
this.runInterval = runInterval;
@@ -171,6 +177,22 @@ public Optional<String> getEnd() {
171177
return end;
172178
}
173179

180+
/**
181+
* @return When set, ranking only counts activity at or after this time of day in the user's timezone (HH:mm format).
182+
*/
183+
@JsonProperty("startTime")
184+
public Optional<String> getStartTime() {
185+
return startTime;
186+
}
187+
188+
/**
189+
* @return When set, ranking only counts activity before this time of day in the user's timezone (HH:mm format).
190+
*/
191+
@JsonProperty("endTime")
192+
public Optional<String> getEndTime() {
193+
return endTime;
194+
}
195+
174196
/**
175197
* @return The UUIDs of the user attributes used for ranking breakdowns.
176198
*/
@@ -207,12 +229,12 @@ public Map<String, Object> getAdditionalProperties() {
207229
}
208230

209231
private boolean equalTo(AdminLeaderboard other) {
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);
232+
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) && startTime.equals(other.startTime) && endTime.equals(other.endTime) && breakdownAttributes.equals(other.breakdownAttributes) && runUnit.equals(other.runUnit) && runInterval.equals(other.runInterval);
211233
}
212234

213235
@java.lang.Override
214236
public int hashCode() {
215-
return Objects.hash(this.id, this.name, this.key, this.description, this.status, this.rankBy, this.metricId, this.pointsSystemId, this.maxParticipants, this.start, this.end, this.breakdownAttributes, this.runUnit, this.runInterval);
237+
return Objects.hash(this.id, this.name, this.key, this.description, this.status, this.rankBy, this.metricId, this.pointsSystemId, this.maxParticipants, this.start, this.end, this.startTime, this.endTime, this.breakdownAttributes, this.runUnit, this.runInterval);
216238
}
217239

218240
@java.lang.Override
@@ -310,6 +332,20 @@ public interface _FinalStage {
310332

311333
_FinalStage end(String end);
312334

335+
/**
336+
* <p>When set, ranking only counts activity at or after this time of day in the user's timezone (HH:mm format).</p>
337+
*/
338+
_FinalStage startTime(Optional<String> startTime);
339+
340+
_FinalStage startTime(String startTime);
341+
342+
/**
343+
* <p>When set, ranking only counts activity before this time of day in the user's timezone (HH:mm format).</p>
344+
*/
345+
_FinalStage endTime(Optional<String> endTime);
346+
347+
_FinalStage endTime(String endTime);
348+
313349
/**
314350
* <p>The UUIDs of the user attributes used for ranking breakdowns.</p>
315351
*/
@@ -356,6 +392,10 @@ public static final class Builder implements IdStage, NameStage, KeyStage, Statu
356392

357393
private List<String> breakdownAttributes = new ArrayList<>();
358394

395+
private Optional<String> endTime = Optional.empty();
396+
397+
private Optional<String> startTime = Optional.empty();
398+
359399
private Optional<String> end = Optional.empty();
360400

361401
private Optional<Integer> maxParticipants = Optional.empty();
@@ -385,6 +425,8 @@ public Builder from(AdminLeaderboard other) {
385425
maxParticipants(other.getMaxParticipants());
386426
start(other.getStart());
387427
end(other.getEnd());
428+
startTime(other.getStartTime());
429+
endTime(other.getEndTime());
388430
breakdownAttributes(other.getBreakdownAttributes());
389431
runUnit(other.getRunUnit());
390432
runInterval(other.getRunInterval());
@@ -541,6 +583,52 @@ public _FinalStage breakdownAttributes(List<String> breakdownAttributes) {
541583
return this;
542584
}
543585

586+
/**
587+
* <p>When set, ranking only counts activity before this time of day in the user's timezone (HH:mm format).</p>
588+
* @return Reference to {@code this} so that method calls can be chained together.
589+
*/
590+
@java.lang.Override
591+
public _FinalStage endTime(String endTime) {
592+
this.endTime = Optional.ofNullable(endTime);
593+
return this;
594+
}
595+
596+
/**
597+
* <p>When set, ranking only counts activity before this time of day in the user's timezone (HH:mm format).</p>
598+
*/
599+
@java.lang.Override
600+
@JsonSetter(
601+
value = "endTime",
602+
nulls = Nulls.SKIP
603+
)
604+
public _FinalStage endTime(Optional<String> endTime) {
605+
this.endTime = endTime;
606+
return this;
607+
}
608+
609+
/**
610+
* <p>When set, ranking only counts activity at or after this time of day in the user's timezone (HH:mm format).</p>
611+
* @return Reference to {@code this} so that method calls can be chained together.
612+
*/
613+
@java.lang.Override
614+
public _FinalStage startTime(String startTime) {
615+
this.startTime = Optional.ofNullable(startTime);
616+
return this;
617+
}
618+
619+
/**
620+
* <p>When set, ranking only counts activity at or after this time of day in the user's timezone (HH:mm format).</p>
621+
*/
622+
@java.lang.Override
623+
@JsonSetter(
624+
value = "startTime",
625+
nulls = Nulls.SKIP
626+
)
627+
public _FinalStage startTime(Optional<String> startTime) {
628+
this.startTime = startTime;
629+
return this;
630+
}
631+
544632
/**
545633
* <p>The optional leaderboard end date in YYYY-MM-DD format.</p>
546634
* @return Reference to {@code this} so that method calls can be chained together.
@@ -658,7 +746,7 @@ public _FinalStage description(Optional<String> description) {
658746

659747
@java.lang.Override
660748
public AdminLeaderboard build() {
661-
return new AdminLeaderboard(id, name, key, description, status, rankBy, metricId, pointsSystemId, maxParticipants, start, end, breakdownAttributes, runUnit, runInterval, additionalProperties);
749+
return new AdminLeaderboard(id, name, key, description, status, rankBy, metricId, pointsSystemId, maxParticipants, start, end, startTime, endTime, breakdownAttributes, runUnit, runInterval, additionalProperties);
662750
}
663751

664752
@java.lang.Override

0 commit comments

Comments
 (0)