• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

box / box-java-sdk-gen / #226

20 Jun 2025 03:14PM UTC coverage: 35.609% (-0.2%) from 35.816%
#226

push

github

web-flow
feat: Shorten builder names in Java (box/box-codegen#742) (#334)

367 of 1570 new or added lines in 984 files covered. (23.38%)

674 existing lines in 370 files now uncovered.

16125 of 45284 relevant lines covered (35.61%)

0.36 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

6.67
/src/main/java/com/box/sdkgen/schemas/event/Event.java
1
package com.box.sdkgen.schemas.event;
2

3
import com.box.sdkgen.internal.SerializableObject;
4
import com.box.sdkgen.internal.utils.DateTimeUtils;
5
import com.box.sdkgen.schemas.appitemeventsourceoreventsourceorfileorfolderorgenericsourceoruser.AppItemEventSourceOrEventSourceOrFileOrFolderOrGenericSourceOrUser;
6
import com.box.sdkgen.schemas.usermini.UserMini;
7
import com.box.sdkgen.serialization.json.EnumWrapper;
8
import com.fasterxml.jackson.annotation.JsonProperty;
9
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
10
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
11
import java.util.Date;
12
import java.util.Objects;
13

14
public class Event extends SerializableObject {
15

16
  protected String type;
17

18
  @JsonProperty("created_at")
19
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
20
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
21
  protected Date createdAt;
22

23
  @JsonProperty("recorded_at")
24
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
25
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
26
  protected Date recordedAt;
27

28
  @JsonProperty("event_id")
29
  protected String eventId;
30

31
  @JsonProperty("created_by")
32
  protected UserMini createdBy;
33

34
  @JsonDeserialize(using = EventEventTypeField.EventEventTypeFieldDeserializer.class)
35
  @JsonSerialize(using = EventEventTypeField.EventEventTypeFieldSerializer.class)
36
  @JsonProperty("event_type")
37
  protected EnumWrapper<EventEventTypeField> eventType;
38

39
  @JsonProperty("session_id")
40
  protected String sessionId;
41

42
  protected AppItemEventSourceOrEventSourceOrFileOrFolderOrGenericSourceOrUser source;
43

44
  @JsonProperty("additional_details")
45
  protected EventAdditionalDetailsField additionalDetails;
46

47
  public Event() {
48
    super();
1✔
49
  }
1✔
50

51
  protected Event(Builder builder) {
52
    super();
×
53
    this.type = builder.type;
×
54
    this.createdAt = builder.createdAt;
×
55
    this.recordedAt = builder.recordedAt;
×
56
    this.eventId = builder.eventId;
×
57
    this.createdBy = builder.createdBy;
×
58
    this.eventType = builder.eventType;
×
59
    this.sessionId = builder.sessionId;
×
60
    this.source = builder.source;
×
61
    this.additionalDetails = builder.additionalDetails;
×
62
  }
×
63

64
  public String getType() {
65
    return type;
×
66
  }
67

68
  public Date getCreatedAt() {
69
    return createdAt;
×
70
  }
71

72
  public Date getRecordedAt() {
73
    return recordedAt;
×
74
  }
75

76
  public String getEventId() {
77
    return eventId;
×
78
  }
79

80
  public UserMini getCreatedBy() {
81
    return createdBy;
1✔
82
  }
83

84
  public EnumWrapper<EventEventTypeField> getEventType() {
85
    return eventType;
1✔
86
  }
87

88
  public String getSessionId() {
89
    return sessionId;
×
90
  }
91

92
  public AppItemEventSourceOrEventSourceOrFileOrFolderOrGenericSourceOrUser getSource() {
93
    return source;
×
94
  }
95

96
  public EventAdditionalDetailsField getAdditionalDetails() {
97
    return additionalDetails;
×
98
  }
99

100
  @Override
101
  public boolean equals(Object o) {
102
    if (this == o) {
×
103
      return true;
×
104
    }
105
    if (o == null || getClass() != o.getClass()) {
×
106
      return false;
×
107
    }
108
    Event casted = (Event) o;
×
109
    return Objects.equals(type, casted.type)
×
110
        && Objects.equals(createdAt, casted.createdAt)
×
111
        && Objects.equals(recordedAt, casted.recordedAt)
×
112
        && Objects.equals(eventId, casted.eventId)
×
113
        && Objects.equals(createdBy, casted.createdBy)
×
114
        && Objects.equals(eventType, casted.eventType)
×
115
        && Objects.equals(sessionId, casted.sessionId)
×
116
        && Objects.equals(source, casted.source)
×
117
        && Objects.equals(additionalDetails, casted.additionalDetails);
×
118
  }
119

120
  @Override
121
  public int hashCode() {
122
    return Objects.hash(
×
123
        type,
124
        createdAt,
125
        recordedAt,
126
        eventId,
127
        createdBy,
128
        eventType,
129
        sessionId,
130
        source,
131
        additionalDetails);
132
  }
133

134
  @Override
135
  public String toString() {
136
    return "Event{"
×
137
        + "type='"
138
        + type
139
        + '\''
140
        + ", "
141
        + "createdAt='"
142
        + createdAt
143
        + '\''
144
        + ", "
145
        + "recordedAt='"
146
        + recordedAt
147
        + '\''
148
        + ", "
149
        + "eventId='"
150
        + eventId
151
        + '\''
152
        + ", "
153
        + "createdBy='"
154
        + createdBy
155
        + '\''
156
        + ", "
157
        + "eventType='"
158
        + eventType
159
        + '\''
160
        + ", "
161
        + "sessionId='"
162
        + sessionId
163
        + '\''
164
        + ", "
165
        + "source='"
166
        + source
167
        + '\''
168
        + ", "
169
        + "additionalDetails='"
170
        + additionalDetails
171
        + '\''
172
        + "}";
173
  }
174

NEW
175
  public static class Builder {
×
176

177
    protected String type;
178

179
    protected Date createdAt;
180

181
    protected Date recordedAt;
182

183
    protected String eventId;
184

185
    protected UserMini createdBy;
186

187
    protected EnumWrapper<EventEventTypeField> eventType;
188

189
    protected String sessionId;
190

191
    protected AppItemEventSourceOrEventSourceOrFileOrFolderOrGenericSourceOrUser source;
192

193
    protected EventAdditionalDetailsField additionalDetails;
194

195
    public Builder type(String type) {
196
      this.type = type;
×
197
      return this;
×
198
    }
199

200
    public Builder createdAt(Date createdAt) {
201
      this.createdAt = createdAt;
×
202
      return this;
×
203
    }
204

205
    public Builder recordedAt(Date recordedAt) {
206
      this.recordedAt = recordedAt;
×
207
      return this;
×
208
    }
209

210
    public Builder eventId(String eventId) {
211
      this.eventId = eventId;
×
212
      return this;
×
213
    }
214

215
    public Builder createdBy(UserMini createdBy) {
216
      this.createdBy = createdBy;
×
217
      return this;
×
218
    }
219

220
    public Builder eventType(EventEventTypeField eventType) {
221
      this.eventType = new EnumWrapper<EventEventTypeField>(eventType);
×
222
      return this;
×
223
    }
224

225
    public Builder eventType(EnumWrapper<EventEventTypeField> eventType) {
226
      this.eventType = eventType;
×
227
      return this;
×
228
    }
229

230
    public Builder sessionId(String sessionId) {
231
      this.sessionId = sessionId;
×
232
      return this;
×
233
    }
234

235
    public Builder source(
236
        AppItemEventSourceOrEventSourceOrFileOrFolderOrGenericSourceOrUser source) {
237
      this.source = source;
×
238
      return this;
×
239
    }
240

241
    public Builder additionalDetails(EventAdditionalDetailsField additionalDetails) {
242
      this.additionalDetails = additionalDetails;
×
243
      return this;
×
244
    }
245

246
    public Event build() {
247
      return new Event(this);
×
248
    }
249
  }
250
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc