Skip to content

Commit 52203d2

Browse files
committed
fix: specify events next_stream_position property format as int64 (box/box-openapi#535)
1 parent 1d7b860 commit 52203d2

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

.codegen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "engineHash": "fe7a2b2", "specHash": "8402463", "version": "0.7.0" }
1+
{ "engineHash": "fe7a2b2", "specHash": "719cda2", "version": "0.7.0" }

src/main/java/com/box/sdkgen/schemas/events/Events.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public Builder nextStreamPosition(String nextStreamPosition) {
9797
return this;
9898
}
9999

100-
public Builder nextStreamPosition(double nextStreamPosition) {
100+
public Builder nextStreamPosition(long nextStreamPosition) {
101101
this.nextStreamPosition = new EventsNextStreamPositionField(nextStreamPosition);
102102
return this;
103103
}

src/main/java/com/box/sdkgen/schemas/events/EventsNextStreamPositionField.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
@JsonDeserialize(
1515
using = EventsNextStreamPositionField.EventsNextStreamPositionFieldDeserializer.class)
1616
@JsonSerialize(using = OneOfTwo.OneOfTwoSerializer.class)
17-
public class EventsNextStreamPositionField extends OneOfTwo<String, Double> {
17+
public class EventsNextStreamPositionField extends OneOfTwo<String, Long> {
1818

1919
public EventsNextStreamPositionField(String string) {
2020
super(string, null);
2121
}
2222

23-
public EventsNextStreamPositionField(Double doubleNumber) {
24-
super(null, doubleNumber);
23+
public EventsNextStreamPositionField(Long longNumber) {
24+
super(null, longNumber);
2525
}
2626

2727
public boolean isString() {
@@ -32,11 +32,11 @@ public String getString() {
3232
return value0;
3333
}
3434

35-
public boolean isDoubleNumber() {
35+
public boolean isLongNumber() {
3636
return value1 != null;
3737
}
3838

39-
public Double getDoubleNumber() {
39+
public Long getLongNumber() {
4040
return value1;
4141
}
4242

@@ -53,7 +53,7 @@ public EventsNextStreamPositionField deserialize(JsonParser jp, DeserializationC
5353
JsonNode node = JsonManager.jsonToSerializedData(jp);
5454
try {
5555
return new EventsNextStreamPositionField(
56-
OneOfTwo.OBJECT_MAPPER.convertValue(node, Double.class));
56+
OneOfTwo.OBJECT_MAPPER.convertValue(node, Long.class));
5757
} catch (Exception ignored) {
5858
}
5959
try {

0 commit comments

Comments
 (0)