Skip to content

Commit 162dffc

Browse files
Automatically update Java SDK
1 parent 8ee53b2 commit 162dffc

9 files changed

Lines changed: 1189 additions & 3 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.16.0</version>
11+
<version>1.17.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": "6fa27414d96efb5bd19536d91363e0946cf43387",
9+
"originGitCommit": "885d82705d6aef1477e8e3db3c503783d437a659",
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.5071");}});
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.5557");}});
3939
this.headerSuppliers = headerSuppliers;
4040
this.httpClient = httpClient;
4141
this.timeout = timeout;
Lines changed: 211 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,211 @@
1+
package so.trophy.src.main.java.types;
2+
3+
/**
4+
* This file was auto-generated by Fern from our API Definition.
5+
*/
6+
7+
8+
import com.fasterxml.jackson.annotation.JsonAnyGetter;
9+
import com.fasterxml.jackson.annotation.JsonAnySetter;
10+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
11+
import com.fasterxml.jackson.annotation.JsonInclude;
12+
import com.fasterxml.jackson.annotation.JsonProperty;
13+
import com.fasterxml.jackson.annotation.JsonSetter;
14+
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
15+
import so.trophy.core.ObjectMappers;
16+
import java.lang.Object;
17+
import java.lang.String;
18+
import java.time.OffsetDateTime;
19+
import java.util.HashMap;
20+
import java.util.Map;
21+
import java.util.Objects;
22+
import org.jetbrains.annotations.NotNull;
23+
24+
@JsonInclude(JsonInclude.Include.NON_ABSENT)
25+
@JsonDeserialize(
26+
builder = WebhooksEmailsAchievementDuePayload.Builder.class
27+
)
28+
public final class WebhooksEmailsAchievementDuePayload {
29+
private final OffsetDateTime timestamp;
30+
31+
private final User user;
32+
33+
private final UserAchievementResponse achievement;
34+
35+
private final Map<String, Object> additionalProperties;
36+
37+
private WebhooksEmailsAchievementDuePayload(OffsetDateTime timestamp, User user,
38+
UserAchievementResponse achievement, Map<String, Object> additionalProperties) {
39+
this.timestamp = timestamp;
40+
this.user = user;
41+
this.achievement = achievement;
42+
this.additionalProperties = additionalProperties;
43+
}
44+
45+
/**
46+
* @return The webhook event type.
47+
*/
48+
@JsonProperty("type")
49+
public String getType() {
50+
return "emails.achievement_due";
51+
}
52+
53+
/**
54+
* @return The time the webhook was sent.
55+
*/
56+
@JsonProperty("timestamp")
57+
public OffsetDateTime getTimestamp() {
58+
return timestamp;
59+
}
60+
61+
/**
62+
* @return The user the achievement message is due for.
63+
*/
64+
@JsonProperty("user")
65+
public User getUser() {
66+
return user;
67+
}
68+
69+
/**
70+
* @return The achievement that was completed.
71+
*/
72+
@JsonProperty("achievement")
73+
public UserAchievementResponse getAchievement() {
74+
return achievement;
75+
}
76+
77+
@java.lang.Override
78+
public boolean equals(Object other) {
79+
if (this == other) return true;
80+
return other instanceof WebhooksEmailsAchievementDuePayload && equalTo((WebhooksEmailsAchievementDuePayload) other);
81+
}
82+
83+
@JsonAnyGetter
84+
public Map<String, Object> getAdditionalProperties() {
85+
return this.additionalProperties;
86+
}
87+
88+
private boolean equalTo(WebhooksEmailsAchievementDuePayload other) {
89+
return timestamp.equals(other.timestamp) && user.equals(other.user) && achievement.equals(other.achievement);
90+
}
91+
92+
@java.lang.Override
93+
public int hashCode() {
94+
return Objects.hash(this.timestamp, this.user, this.achievement);
95+
}
96+
97+
@java.lang.Override
98+
public String toString() {
99+
return ObjectMappers.stringify(this);
100+
}
101+
102+
public static TimestampStage builder() {
103+
return new Builder();
104+
}
105+
106+
public interface TimestampStage {
107+
/**
108+
* <p>The time the webhook was sent.</p>
109+
*/
110+
UserStage timestamp(@NotNull OffsetDateTime timestamp);
111+
112+
Builder from(WebhooksEmailsAchievementDuePayload other);
113+
}
114+
115+
public interface UserStage {
116+
/**
117+
* <p>The user the achievement message is due for.</p>
118+
*/
119+
AchievementStage user(@NotNull User user);
120+
}
121+
122+
public interface AchievementStage {
123+
/**
124+
* <p>The achievement that was completed.</p>
125+
*/
126+
_FinalStage achievement(@NotNull UserAchievementResponse achievement);
127+
}
128+
129+
public interface _FinalStage {
130+
WebhooksEmailsAchievementDuePayload build();
131+
132+
_FinalStage additionalProperty(String key, Object value);
133+
134+
_FinalStage additionalProperties(Map<String, Object> additionalProperties);
135+
}
136+
137+
@JsonIgnoreProperties(
138+
ignoreUnknown = true
139+
)
140+
public static final class Builder implements TimestampStage, UserStage, AchievementStage, _FinalStage {
141+
private OffsetDateTime timestamp;
142+
143+
private User user;
144+
145+
private UserAchievementResponse achievement;
146+
147+
@JsonAnySetter
148+
private Map<String, Object> additionalProperties = new HashMap<>();
149+
150+
private Builder() {
151+
}
152+
153+
@java.lang.Override
154+
public Builder from(WebhooksEmailsAchievementDuePayload other) {
155+
timestamp(other.getTimestamp());
156+
user(other.getUser());
157+
achievement(other.getAchievement());
158+
return this;
159+
}
160+
161+
/**
162+
* <p>The time the webhook was sent.</p>
163+
* @return Reference to {@code this} so that method calls can be chained together.
164+
*/
165+
@java.lang.Override
166+
@JsonSetter("timestamp")
167+
public UserStage timestamp(@NotNull OffsetDateTime timestamp) {
168+
this.timestamp = Objects.requireNonNull(timestamp, "timestamp must not be null");
169+
return this;
170+
}
171+
172+
/**
173+
* <p>The user the achievement message is due for.</p>
174+
* @return Reference to {@code this} so that method calls can be chained together.
175+
*/
176+
@java.lang.Override
177+
@JsonSetter("user")
178+
public AchievementStage user(@NotNull User user) {
179+
this.user = Objects.requireNonNull(user, "user must not be null");
180+
return this;
181+
}
182+
183+
/**
184+
* <p>The achievement that was completed.</p>
185+
* @return Reference to {@code this} so that method calls can be chained together.
186+
*/
187+
@java.lang.Override
188+
@JsonSetter("achievement")
189+
public _FinalStage achievement(@NotNull UserAchievementResponse achievement) {
190+
this.achievement = Objects.requireNonNull(achievement, "achievement must not be null");
191+
return this;
192+
}
193+
194+
@java.lang.Override
195+
public WebhooksEmailsAchievementDuePayload build() {
196+
return new WebhooksEmailsAchievementDuePayload(timestamp, user, achievement, additionalProperties);
197+
}
198+
199+
@java.lang.Override
200+
public Builder additionalProperty(String key, Object value) {
201+
this.additionalProperties.put(key, value);
202+
return this;
203+
}
204+
205+
@java.lang.Override
206+
public Builder additionalProperties(Map<String, Object> additionalProperties) {
207+
this.additionalProperties.putAll(additionalProperties);
208+
return this;
209+
}
210+
}
211+
}

0 commit comments

Comments
 (0)