• 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

10.45
/src/main/java/com/box/sdkgen/schemas/taskassignment/TaskAssignment.java
1
package com.box.sdkgen.schemas.taskassignment;
2

3
import com.box.sdkgen.internal.SerializableObject;
4
import com.box.sdkgen.internal.utils.DateTimeUtils;
5
import com.box.sdkgen.schemas.filemini.FileMini;
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 TaskAssignment extends SerializableObject {
15

16
  protected String id;
17

18
  @JsonDeserialize(using = TaskAssignmentTypeField.TaskAssignmentTypeFieldDeserializer.class)
19
  @JsonSerialize(using = TaskAssignmentTypeField.TaskAssignmentTypeFieldSerializer.class)
20
  protected EnumWrapper<TaskAssignmentTypeField> type;
21

22
  protected FileMini item;
23

24
  @JsonProperty("assigned_to")
25
  protected UserMini assignedTo;
26

27
  protected String message;
28

29
  @JsonProperty("completed_at")
30
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
31
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
32
  protected Date completedAt;
33

34
  @JsonProperty("assigned_at")
35
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
36
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
37
  protected Date assignedAt;
38

39
  @JsonProperty("reminded_at")
40
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
41
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
42
  protected Date remindedAt;
43

44
  @JsonDeserialize(
45
      using =
46
          TaskAssignmentResolutionStateField.TaskAssignmentResolutionStateFieldDeserializer.class)
47
  @JsonSerialize(
48
      using = TaskAssignmentResolutionStateField.TaskAssignmentResolutionStateFieldSerializer.class)
49
  @JsonProperty("resolution_state")
50
  protected EnumWrapper<TaskAssignmentResolutionStateField> resolutionState;
51

52
  @JsonProperty("assigned_by")
53
  protected UserMini assignedBy;
54

55
  public TaskAssignment() {
56
    super();
1✔
57
  }
1✔
58

59
  protected TaskAssignment(Builder builder) {
60
    super();
×
61
    this.id = builder.id;
×
62
    this.type = builder.type;
×
63
    this.item = builder.item;
×
64
    this.assignedTo = builder.assignedTo;
×
65
    this.message = builder.message;
×
66
    this.completedAt = builder.completedAt;
×
67
    this.assignedAt = builder.assignedAt;
×
68
    this.remindedAt = builder.remindedAt;
×
69
    this.resolutionState = builder.resolutionState;
×
70
    this.assignedBy = builder.assignedBy;
×
71
  }
×
72

73
  public String getId() {
74
    return id;
1✔
75
  }
76

77
  public EnumWrapper<TaskAssignmentTypeField> getType() {
78
    return type;
×
79
  }
80

81
  public FileMini getItem() {
82
    return item;
1✔
83
  }
84

85
  public UserMini getAssignedTo() {
86
    return assignedTo;
1✔
87
  }
88

89
  public String getMessage() {
90
    return message;
1✔
91
  }
92

93
  public Date getCompletedAt() {
94
    return completedAt;
×
95
  }
96

97
  public Date getAssignedAt() {
98
    return assignedAt;
×
99
  }
100

101
  public Date getRemindedAt() {
102
    return remindedAt;
×
103
  }
104

105
  public EnumWrapper<TaskAssignmentResolutionStateField> getResolutionState() {
106
    return resolutionState;
1✔
107
  }
108

109
  public UserMini getAssignedBy() {
110
    return assignedBy;
×
111
  }
112

113
  @Override
114
  public boolean equals(Object o) {
115
    if (this == o) {
×
116
      return true;
×
117
    }
118
    if (o == null || getClass() != o.getClass()) {
×
119
      return false;
×
120
    }
121
    TaskAssignment casted = (TaskAssignment) o;
×
122
    return Objects.equals(id, casted.id)
×
123
        && Objects.equals(type, casted.type)
×
124
        && Objects.equals(item, casted.item)
×
125
        && Objects.equals(assignedTo, casted.assignedTo)
×
126
        && Objects.equals(message, casted.message)
×
127
        && Objects.equals(completedAt, casted.completedAt)
×
128
        && Objects.equals(assignedAt, casted.assignedAt)
×
129
        && Objects.equals(remindedAt, casted.remindedAt)
×
130
        && Objects.equals(resolutionState, casted.resolutionState)
×
131
        && Objects.equals(assignedBy, casted.assignedBy);
×
132
  }
133

134
  @Override
135
  public int hashCode() {
136
    return Objects.hash(
×
137
        id,
138
        type,
139
        item,
140
        assignedTo,
141
        message,
142
        completedAt,
143
        assignedAt,
144
        remindedAt,
145
        resolutionState,
146
        assignedBy);
147
  }
148

149
  @Override
150
  public String toString() {
151
    return "TaskAssignment{"
×
152
        + "id='"
153
        + id
154
        + '\''
155
        + ", "
156
        + "type='"
157
        + type
158
        + '\''
159
        + ", "
160
        + "item='"
161
        + item
162
        + '\''
163
        + ", "
164
        + "assignedTo='"
165
        + assignedTo
166
        + '\''
167
        + ", "
168
        + "message='"
169
        + message
170
        + '\''
171
        + ", "
172
        + "completedAt='"
173
        + completedAt
174
        + '\''
175
        + ", "
176
        + "assignedAt='"
177
        + assignedAt
178
        + '\''
179
        + ", "
180
        + "remindedAt='"
181
        + remindedAt
182
        + '\''
183
        + ", "
184
        + "resolutionState='"
185
        + resolutionState
186
        + '\''
187
        + ", "
188
        + "assignedBy='"
189
        + assignedBy
190
        + '\''
191
        + "}";
192
  }
193

NEW
194
  public static class Builder {
×
195

196
    protected String id;
197

198
    protected EnumWrapper<TaskAssignmentTypeField> type;
199

200
    protected FileMini item;
201

202
    protected UserMini assignedTo;
203

204
    protected String message;
205

206
    protected Date completedAt;
207

208
    protected Date assignedAt;
209

210
    protected Date remindedAt;
211

212
    protected EnumWrapper<TaskAssignmentResolutionStateField> resolutionState;
213

214
    protected UserMini assignedBy;
215

216
    public Builder id(String id) {
217
      this.id = id;
×
218
      return this;
×
219
    }
220

221
    public Builder type(TaskAssignmentTypeField type) {
222
      this.type = new EnumWrapper<TaskAssignmentTypeField>(type);
×
223
      return this;
×
224
    }
225

226
    public Builder type(EnumWrapper<TaskAssignmentTypeField> type) {
227
      this.type = type;
×
228
      return this;
×
229
    }
230

231
    public Builder item(FileMini item) {
232
      this.item = item;
×
233
      return this;
×
234
    }
235

236
    public Builder assignedTo(UserMini assignedTo) {
237
      this.assignedTo = assignedTo;
×
238
      return this;
×
239
    }
240

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

246
    public Builder completedAt(Date completedAt) {
247
      this.completedAt = completedAt;
×
248
      return this;
×
249
    }
250

251
    public Builder assignedAt(Date assignedAt) {
252
      this.assignedAt = assignedAt;
×
253
      return this;
×
254
    }
255

256
    public Builder remindedAt(Date remindedAt) {
257
      this.remindedAt = remindedAt;
×
258
      return this;
×
259
    }
260

261
    public Builder resolutionState(TaskAssignmentResolutionStateField resolutionState) {
UNCOV
262
      this.resolutionState = new EnumWrapper<TaskAssignmentResolutionStateField>(resolutionState);
×
263
      return this;
×
264
    }
265

266
    public Builder resolutionState(
267
        EnumWrapper<TaskAssignmentResolutionStateField> resolutionState) {
268
      this.resolutionState = resolutionState;
×
269
      return this;
×
270
    }
271

272
    public Builder assignedBy(UserMini assignedBy) {
273
      this.assignedBy = assignedBy;
×
274
      return this;
×
275
    }
276

277
    public TaskAssignment build() {
278
      return new TaskAssignment(this);
×
279
    }
280
  }
281
}
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