Skip to content

Commit f4ec75c

Browse files
Automatically update Java SDK
1 parent ec148ab commit f4ec75c

27 files changed

+1940
-1101
lines changed

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.2.1</version>
11+
<version>1.3.4</version>
1212
<packaging>jar</packaging>
1313
<name>Trophy</name>
1414
<description>Java client library for the Trophy API</description>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ private ClientOptions(Environment environment, Map<String, String> headers,
3030
this.environment = environment;
3131
this.headers = new HashMap<>();
3232
this.headers.putAll(headers);
33-
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.555");}});
33+
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.1794");}});
3434
this.headerSuppliers = headerSuppliers;
3535
this.httpClient = httpClient;
3636
this.timeout = timeout;

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

Lines changed: 74 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
import java.lang.Integer;
1818
import java.lang.Object;
1919
import java.lang.String;
20+
import java.util.ArrayList;
2021
import java.util.HashMap;
22+
import java.util.List;
2123
import java.util.Map;
2224
import java.util.Objects;
2325
import java.util.Optional;
@@ -41,6 +43,8 @@ public final class LeaderboardsAllResponseItem implements ILeaderboardResponse {
4143

4244
private final Optional<String> breakdownAttribute;
4345

46+
private final List<String> breakdownAttributes;
47+
4448
private final Optional<String> metricKey;
4549

4650
private final Optional<String> metricName;
@@ -67,16 +71,17 @@ public final class LeaderboardsAllResponseItem implements ILeaderboardResponse {
6771

6872
private LeaderboardsAllResponseItem(String id, String name, String key,
6973
LeaderboardResponseRankBy rankBy, Optional<String> breakdownAttribute,
70-
Optional<String> metricKey, Optional<String> metricName, Optional<String> pointsSystemKey,
71-
Optional<String> pointsSystemName, Optional<String> description, String start,
72-
Optional<String> end, int maxParticipants, Optional<LeaderboardResponseRunUnit> runUnit,
73-
Optional<Integer> runInterval, LeaderboardsAllResponseItemStatus status,
74-
Map<String, Object> additionalProperties) {
74+
List<String> breakdownAttributes, Optional<String> metricKey, Optional<String> metricName,
75+
Optional<String> pointsSystemKey, Optional<String> pointsSystemName,
76+
Optional<String> description, String start, Optional<String> end, int maxParticipants,
77+
Optional<LeaderboardResponseRunUnit> runUnit, Optional<Integer> runInterval,
78+
LeaderboardsAllResponseItemStatus status, Map<String, Object> additionalProperties) {
7579
this.id = id;
7680
this.name = name;
7781
this.key = key;
7882
this.rankBy = rankBy;
7983
this.breakdownAttribute = breakdownAttribute;
84+
this.breakdownAttributes = breakdownAttributes;
8085
this.metricKey = metricKey;
8186
this.metricName = metricName;
8287
this.pointsSystemKey = pointsSystemKey;
@@ -127,14 +132,23 @@ public LeaderboardResponseRankBy getRankBy() {
127132
}
128133

129134
/**
130-
* @return The key of the attribute to break down this leaderboard by.
135+
* @return Deprecated. The key of the attribute to break down this leaderboard by.
131136
*/
132137
@JsonProperty("breakdownAttribute")
133138
@java.lang.Override
134139
public Optional<String> getBreakdownAttribute() {
135140
return breakdownAttribute;
136141
}
137142

143+
/**
144+
* @return The user attribute keys that this leaderboard is broken down by.
145+
*/
146+
@JsonProperty("breakdownAttributes")
147+
@java.lang.Override
148+
public List<String> getBreakdownAttributes() {
149+
return breakdownAttributes;
150+
}
151+
138152
/**
139153
* @return The key of the metric to rank by, if rankBy is 'metric'.
140154
*/
@@ -244,12 +258,12 @@ public Map<String, Object> getAdditionalProperties() {
244258
}
245259

246260
private boolean equalTo(LeaderboardsAllResponseItem other) {
247-
return id.equals(other.id) && name.equals(other.name) && key.equals(other.key) && rankBy.equals(other.rankBy) && breakdownAttribute.equals(other.breakdownAttribute) && 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 == other.maxParticipants && runUnit.equals(other.runUnit) && runInterval.equals(other.runInterval) && status.equals(other.status);
261+
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 == other.maxParticipants && runUnit.equals(other.runUnit) && runInterval.equals(other.runInterval) && status.equals(other.status);
248262
}
249263

250264
@java.lang.Override
251265
public int hashCode() {
252-
return Objects.hash(this.id, this.name, this.key, this.rankBy, this.breakdownAttribute, this.metricKey, this.metricName, this.pointsSystemKey, this.pointsSystemName, this.description, this.start, this.end, this.maxParticipants, this.runUnit, this.runInterval, this.status);
266+
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);
253267
}
254268

255269
@java.lang.Override
@@ -316,12 +330,21 @@ public interface _FinalStage {
316330
LeaderboardsAllResponseItem build();
317331

318332
/**
319-
* <p>The key of the attribute to break down this leaderboard by.</p>
333+
* <p>Deprecated. The key of the attribute to break down this leaderboard by.</p>
320334
*/
321335
_FinalStage breakdownAttribute(Optional<String> breakdownAttribute);
322336

323337
_FinalStage breakdownAttribute(String breakdownAttribute);
324338

339+
/**
340+
* <p>The user attribute keys that this leaderboard is broken down by.</p>
341+
*/
342+
_FinalStage breakdownAttributes(List<String> breakdownAttributes);
343+
344+
_FinalStage addBreakdownAttributes(String breakdownAttributes);
345+
346+
_FinalStage addAllBreakdownAttributes(List<String> breakdownAttributes);
347+
325348
/**
326349
* <p>The key of the metric to rank by, if rankBy is 'metric'.</p>
327350
*/
@@ -413,6 +436,8 @@ public static final class Builder implements IdStage, NameStage, KeyStage, RankB
413436

414437
private Optional<String> metricKey = Optional.empty();
415438

439+
private List<String> breakdownAttributes = new ArrayList<>();
440+
416441
private Optional<String> breakdownAttribute = Optional.empty();
417442

418443
@JsonAnySetter
@@ -428,6 +453,7 @@ public Builder from(LeaderboardsAllResponseItem other) {
428453
key(other.getKey());
429454
rankBy(other.getRankBy());
430455
breakdownAttribute(other.getBreakdownAttribute());
456+
breakdownAttributes(other.getBreakdownAttributes());
431457
metricKey(other.getMetricKey());
432458
metricName(other.getMetricName());
433459
pointsSystemKey(other.getPointsSystemKey());
@@ -711,7 +737,43 @@ public _FinalStage metricKey(Optional<String> metricKey) {
711737
}
712738

713739
/**
714-
* <p>The key of the attribute to break down this leaderboard by.</p>
740+
* <p>The user attribute keys that this leaderboard is broken down by.</p>
741+
* @return Reference to {@code this} so that method calls can be chained together.
742+
*/
743+
@java.lang.Override
744+
public _FinalStage addAllBreakdownAttributes(List<String> breakdownAttributes) {
745+
if (breakdownAttributes != null) {
746+
this.breakdownAttributes.addAll(breakdownAttributes);
747+
}
748+
return this;
749+
}
750+
751+
/**
752+
* <p>The user attribute keys that this leaderboard is broken down by.</p>
753+
* @return Reference to {@code this} so that method calls can be chained together.
754+
*/
755+
@java.lang.Override
756+
public _FinalStage addBreakdownAttributes(String breakdownAttributes) {
757+
this.breakdownAttributes.add(breakdownAttributes);
758+
return this;
759+
}
760+
761+
/**
762+
* <p>The user attribute keys that this leaderboard is broken down by.</p>
763+
*/
764+
@java.lang.Override
765+
@JsonSetter(
766+
value = "breakdownAttributes",
767+
nulls = Nulls.SKIP
768+
)
769+
public _FinalStage breakdownAttributes(List<String> breakdownAttributes) {
770+
this.breakdownAttributes.clear();
771+
this.breakdownAttributes.addAll(breakdownAttributes);
772+
return this;
773+
}
774+
775+
/**
776+
* <p>Deprecated. The key of the attribute to break down this leaderboard by.</p>
715777
* @return Reference to {@code this} so that method calls can be chained together.
716778
*/
717779
@java.lang.Override
@@ -721,7 +783,7 @@ public _FinalStage breakdownAttribute(String breakdownAttribute) {
721783
}
722784

723785
/**
724-
* <p>The key of the attribute to break down this leaderboard by.</p>
786+
* <p>Deprecated. The key of the attribute to break down this leaderboard by.</p>
725787
*/
726788
@java.lang.Override
727789
@JsonSetter(
@@ -735,7 +797,7 @@ public _FinalStage breakdownAttribute(Optional<String> breakdownAttribute) {
735797

736798
@java.lang.Override
737799
public LeaderboardsAllResponseItem build() {
738-
return new LeaderboardsAllResponseItem(id, name, key, rankBy, breakdownAttribute, metricKey, metricName, pointsSystemKey, pointsSystemName, description, start, end, maxParticipants, runUnit, runInterval, status, additionalProperties);
800+
return new LeaderboardsAllResponseItem(id, name, key, rankBy, breakdownAttribute, breakdownAttributes, metricKey, metricName, pointsSystemKey, pointsSystemName, description, start, end, maxParticipants, runUnit, runInterval, status, additionalProperties);
739801
}
740802
}
741803
}

0 commit comments

Comments
 (0)