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

box / box-java-sdk / #5076

07 Oct 2025 12:35PM UTC coverage: 37.132% (+0.007%) from 37.125%
#5076

push

github

web-flow
test: Change `Event.additionalDetails` field assertion in events test (box/box-codegen#858) (#1491)

18454 of 49699 relevant lines covered (37.13%)

0.37 hits per line

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

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

3
import com.box.sdkgen.internal.NullableFieldTracker;
4
import com.box.sdkgen.internal.SerializableObject;
5
import com.box.sdkgen.internal.utils.DateTimeUtils;
6
import com.box.sdkgen.schemas.filemini.FileMini;
7
import com.box.sdkgen.schemas.usermini.UserMini;
8
import com.box.sdkgen.serialization.json.EnumWrapper;
9
import com.fasterxml.jackson.annotation.JsonFilter;
10
import com.fasterxml.jackson.annotation.JsonProperty;
11
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
12
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
13
import java.time.OffsetDateTime;
14
import java.util.Objects;
15

16
/** A task assignment defines which task is assigned to which user to complete. */
17
@JsonFilter("nullablePropertyFilter")
18
public class TaskAssignment extends SerializableObject {
19

20
  /** The unique identifier for this task assignment. */
21
  protected String id;
22

23
  /** The value will always be `task_assignment`. */
24
  @JsonDeserialize(using = TaskAssignmentTypeField.TaskAssignmentTypeFieldDeserializer.class)
25
  @JsonSerialize(using = TaskAssignmentTypeField.TaskAssignmentTypeFieldSerializer.class)
26
  protected EnumWrapper<TaskAssignmentTypeField> type;
27

28
  protected FileMini item;
29

30
  @JsonProperty("assigned_to")
31
  protected UserMini assignedTo;
32

33
  /**
34
   * A message that will is included with the task assignment. This is visible to the assigned user
35
   * in the web and mobile UI.
36
   */
37
  protected String message;
38

39
  /**
40
   * The date at which this task assignment was completed. This will be `null` if the task is not
41
   * completed yet.
42
   */
43
  @JsonProperty("completed_at")
44
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
45
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
46
  protected OffsetDateTime completedAt;
47

48
  /** The date at which this task was assigned to the user. */
49
  @JsonProperty("assigned_at")
50
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
51
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
52
  protected OffsetDateTime assignedAt;
53

54
  /** The date at which the assigned user was reminded of this task assignment. */
55
  @JsonProperty("reminded_at")
56
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
57
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
58
  protected OffsetDateTime remindedAt;
59

60
  /**
61
   * The current state of the assignment. The available states depend on the `action` value of the
62
   * task object.
63
   */
64
  @JsonDeserialize(
65
      using =
66
          TaskAssignmentResolutionStateField.TaskAssignmentResolutionStateFieldDeserializer.class)
67
  @JsonSerialize(
68
      using = TaskAssignmentResolutionStateField.TaskAssignmentResolutionStateFieldSerializer.class)
69
  @JsonProperty("resolution_state")
70
  protected EnumWrapper<TaskAssignmentResolutionStateField> resolutionState;
71

72
  @JsonProperty("assigned_by")
73
  protected UserMini assignedBy;
74

75
  public TaskAssignment() {
76
    super();
1✔
77
  }
1✔
78

79
  protected TaskAssignment(Builder builder) {
80
    super();
×
81
    this.id = builder.id;
×
82
    this.type = builder.type;
×
83
    this.item = builder.item;
×
84
    this.assignedTo = builder.assignedTo;
×
85
    this.message = builder.message;
×
86
    this.completedAt = builder.completedAt;
×
87
    this.assignedAt = builder.assignedAt;
×
88
    this.remindedAt = builder.remindedAt;
×
89
    this.resolutionState = builder.resolutionState;
×
90
    this.assignedBy = builder.assignedBy;
×
91
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
92
  }
×
93

94
  public String getId() {
95
    return id;
1✔
96
  }
97

98
  public EnumWrapper<TaskAssignmentTypeField> getType() {
99
    return type;
×
100
  }
101

102
  public FileMini getItem() {
103
    return item;
1✔
104
  }
105

106
  public UserMini getAssignedTo() {
107
    return assignedTo;
1✔
108
  }
109

110
  public String getMessage() {
111
    return message;
1✔
112
  }
113

114
  public OffsetDateTime getCompletedAt() {
115
    return completedAt;
×
116
  }
117

118
  public OffsetDateTime getAssignedAt() {
119
    return assignedAt;
×
120
  }
121

122
  public OffsetDateTime getRemindedAt() {
123
    return remindedAt;
×
124
  }
125

126
  public EnumWrapper<TaskAssignmentResolutionStateField> getResolutionState() {
127
    return resolutionState;
1✔
128
  }
129

130
  public UserMini getAssignedBy() {
131
    return assignedBy;
×
132
  }
133

134
  @Override
135
  public boolean equals(Object o) {
136
    if (this == o) {
×
137
      return true;
×
138
    }
139
    if (o == null || getClass() != o.getClass()) {
×
140
      return false;
×
141
    }
142
    TaskAssignment casted = (TaskAssignment) o;
×
143
    return Objects.equals(id, casted.id)
×
144
        && Objects.equals(type, casted.type)
×
145
        && Objects.equals(item, casted.item)
×
146
        && Objects.equals(assignedTo, casted.assignedTo)
×
147
        && Objects.equals(message, casted.message)
×
148
        && Objects.equals(completedAt, casted.completedAt)
×
149
        && Objects.equals(assignedAt, casted.assignedAt)
×
150
        && Objects.equals(remindedAt, casted.remindedAt)
×
151
        && Objects.equals(resolutionState, casted.resolutionState)
×
152
        && Objects.equals(assignedBy, casted.assignedBy);
×
153
  }
154

155
  @Override
156
  public int hashCode() {
157
    return Objects.hash(
×
158
        id,
159
        type,
160
        item,
161
        assignedTo,
162
        message,
163
        completedAt,
164
        assignedAt,
165
        remindedAt,
166
        resolutionState,
167
        assignedBy);
168
  }
169

170
  @Override
171
  public String toString() {
172
    return "TaskAssignment{"
×
173
        + "id='"
174
        + id
175
        + '\''
176
        + ", "
177
        + "type='"
178
        + type
179
        + '\''
180
        + ", "
181
        + "item='"
182
        + item
183
        + '\''
184
        + ", "
185
        + "assignedTo='"
186
        + assignedTo
187
        + '\''
188
        + ", "
189
        + "message='"
190
        + message
191
        + '\''
192
        + ", "
193
        + "completedAt='"
194
        + completedAt
195
        + '\''
196
        + ", "
197
        + "assignedAt='"
198
        + assignedAt
199
        + '\''
200
        + ", "
201
        + "remindedAt='"
202
        + remindedAt
203
        + '\''
204
        + ", "
205
        + "resolutionState='"
206
        + resolutionState
207
        + '\''
208
        + ", "
209
        + "assignedBy='"
210
        + assignedBy
211
        + '\''
212
        + "}";
213
  }
214

215
  public static class Builder extends NullableFieldTracker {
×
216

217
    protected String id;
218

219
    protected EnumWrapper<TaskAssignmentTypeField> type;
220

221
    protected FileMini item;
222

223
    protected UserMini assignedTo;
224

225
    protected String message;
226

227
    protected OffsetDateTime completedAt;
228

229
    protected OffsetDateTime assignedAt;
230

231
    protected OffsetDateTime remindedAt;
232

233
    protected EnumWrapper<TaskAssignmentResolutionStateField> resolutionState;
234

235
    protected UserMini assignedBy;
236

237
    public Builder id(String id) {
238
      this.id = id;
×
239
      return this;
×
240
    }
241

242
    public Builder type(TaskAssignmentTypeField type) {
243
      this.type = new EnumWrapper<TaskAssignmentTypeField>(type);
×
244
      return this;
×
245
    }
246

247
    public Builder type(EnumWrapper<TaskAssignmentTypeField> type) {
248
      this.type = type;
×
249
      return this;
×
250
    }
251

252
    public Builder item(FileMini item) {
253
      this.item = item;
×
254
      return this;
×
255
    }
256

257
    public Builder assignedTo(UserMini assignedTo) {
258
      this.assignedTo = assignedTo;
×
259
      return this;
×
260
    }
261

262
    public Builder message(String message) {
263
      this.message = message;
×
264
      return this;
×
265
    }
266

267
    public Builder completedAt(OffsetDateTime completedAt) {
268
      this.completedAt = completedAt;
×
269
      return this;
×
270
    }
271

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

277
    public Builder remindedAt(OffsetDateTime remindedAt) {
278
      this.remindedAt = remindedAt;
×
279
      return this;
×
280
    }
281

282
    public Builder resolutionState(TaskAssignmentResolutionStateField resolutionState) {
283
      this.resolutionState = new EnumWrapper<TaskAssignmentResolutionStateField>(resolutionState);
×
284
      return this;
×
285
    }
286

287
    public Builder resolutionState(
288
        EnumWrapper<TaskAssignmentResolutionStateField> resolutionState) {
289
      this.resolutionState = resolutionState;
×
290
      return this;
×
291
    }
292

293
    public Builder assignedBy(UserMini assignedBy) {
294
      this.assignedBy = assignedBy;
×
295
      return this;
×
296
    }
297

298
    public TaskAssignment build() {
299
      return new TaskAssignment(this);
×
300
    }
301
  }
302
}
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