• 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

12.63
/src/main/java/com/box/sdkgen/schemas/filerequest/FileRequest.java
1
package com.box.sdkgen.schemas.filerequest;
2

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

16
  protected final String id;
17

18
  @JsonDeserialize(using = FileRequestTypeField.FileRequestTypeFieldDeserializer.class)
19
  @JsonSerialize(using = FileRequestTypeField.FileRequestTypeFieldSerializer.class)
20
  protected EnumWrapper<FileRequestTypeField> type;
21

22
  protected String title;
23

24
  protected String description;
25

26
  @JsonDeserialize(using = FileRequestStatusField.FileRequestStatusFieldDeserializer.class)
27
  @JsonSerialize(using = FileRequestStatusField.FileRequestStatusFieldSerializer.class)
28
  protected EnumWrapper<FileRequestStatusField> status;
29

30
  @JsonProperty("is_email_required")
31
  protected Boolean isEmailRequired;
32

33
  @JsonProperty("is_description_required")
34
  protected Boolean isDescriptionRequired;
35

36
  @JsonProperty("expires_at")
37
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
38
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
39
  protected Date expiresAt;
40

41
  protected final FolderMini folder;
42

43
  protected String url;
44

45
  protected String etag;
46

47
  @JsonProperty("created_by")
48
  protected UserMini createdBy;
49

50
  @JsonProperty("created_at")
51
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
52
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
53
  protected final Date createdAt;
54

55
  @JsonProperty("updated_by")
56
  protected UserMini updatedBy;
57

58
  @JsonProperty("updated_at")
59
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
60
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
61
  protected final Date updatedAt;
62

63
  public FileRequest(
64
      @JsonProperty("id") String id,
65
      @JsonProperty("folder") FolderMini folder,
66
      @JsonProperty("created_at") Date createdAt,
67
      @JsonProperty("updated_at") Date updatedAt) {
68
    super();
1✔
69
    this.id = id;
1✔
70
    this.folder = folder;
1✔
71
    this.createdAt = createdAt;
1✔
72
    this.updatedAt = updatedAt;
1✔
73
    this.type = new EnumWrapper<FileRequestTypeField>(FileRequestTypeField.FILE_REQUEST);
1✔
74
  }
1✔
75

76
  protected FileRequest(Builder builder) {
77
    super();
×
78
    this.id = builder.id;
×
79
    this.type = builder.type;
×
80
    this.title = builder.title;
×
81
    this.description = builder.description;
×
82
    this.status = builder.status;
×
83
    this.isEmailRequired = builder.isEmailRequired;
×
84
    this.isDescriptionRequired = builder.isDescriptionRequired;
×
85
    this.expiresAt = builder.expiresAt;
×
86
    this.folder = builder.folder;
×
87
    this.url = builder.url;
×
88
    this.etag = builder.etag;
×
89
    this.createdBy = builder.createdBy;
×
90
    this.createdAt = builder.createdAt;
×
91
    this.updatedBy = builder.updatedBy;
×
92
    this.updatedAt = builder.updatedAt;
×
93
  }
×
94

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

99
  public EnumWrapper<FileRequestTypeField> getType() {
100
    return type;
1✔
101
  }
102

103
  public String getTitle() {
104
    return title;
1✔
105
  }
106

107
  public String getDescription() {
108
    return description;
1✔
109
  }
110

111
  public EnumWrapper<FileRequestStatusField> getStatus() {
112
    return status;
×
113
  }
114

115
  public Boolean getIsEmailRequired() {
116
    return isEmailRequired;
×
117
  }
118

119
  public Boolean getIsDescriptionRequired() {
120
    return isDescriptionRequired;
×
121
  }
122

123
  public Date getExpiresAt() {
124
    return expiresAt;
×
125
  }
126

127
  public FolderMini getFolder() {
128
    return folder;
1✔
129
  }
130

131
  public String getUrl() {
132
    return url;
×
133
  }
134

135
  public String getEtag() {
136
    return etag;
×
137
  }
138

139
  public UserMini getCreatedBy() {
140
    return createdBy;
×
141
  }
142

143
  public Date getCreatedAt() {
144
    return createdAt;
×
145
  }
146

147
  public UserMini getUpdatedBy() {
148
    return updatedBy;
×
149
  }
150

151
  public Date getUpdatedAt() {
152
    return updatedAt;
×
153
  }
154

155
  @Override
156
  public boolean equals(Object o) {
157
    if (this == o) {
×
158
      return true;
×
159
    }
160
    if (o == null || getClass() != o.getClass()) {
×
161
      return false;
×
162
    }
163
    FileRequest casted = (FileRequest) o;
×
164
    return Objects.equals(id, casted.id)
×
165
        && Objects.equals(type, casted.type)
×
166
        && Objects.equals(title, casted.title)
×
167
        && Objects.equals(description, casted.description)
×
168
        && Objects.equals(status, casted.status)
×
169
        && Objects.equals(isEmailRequired, casted.isEmailRequired)
×
170
        && Objects.equals(isDescriptionRequired, casted.isDescriptionRequired)
×
171
        && Objects.equals(expiresAt, casted.expiresAt)
×
172
        && Objects.equals(folder, casted.folder)
×
173
        && Objects.equals(url, casted.url)
×
174
        && Objects.equals(etag, casted.etag)
×
175
        && Objects.equals(createdBy, casted.createdBy)
×
176
        && Objects.equals(createdAt, casted.createdAt)
×
177
        && Objects.equals(updatedBy, casted.updatedBy)
×
178
        && Objects.equals(updatedAt, casted.updatedAt);
×
179
  }
180

181
  @Override
182
  public int hashCode() {
183
    return Objects.hash(
×
184
        id,
185
        type,
186
        title,
187
        description,
188
        status,
189
        isEmailRequired,
190
        isDescriptionRequired,
191
        expiresAt,
192
        folder,
193
        url,
194
        etag,
195
        createdBy,
196
        createdAt,
197
        updatedBy,
198
        updatedAt);
199
  }
200

201
  @Override
202
  public String toString() {
203
    return "FileRequest{"
×
204
        + "id='"
205
        + id
206
        + '\''
207
        + ", "
208
        + "type='"
209
        + type
210
        + '\''
211
        + ", "
212
        + "title='"
213
        + title
214
        + '\''
215
        + ", "
216
        + "description='"
217
        + description
218
        + '\''
219
        + ", "
220
        + "status='"
221
        + status
222
        + '\''
223
        + ", "
224
        + "isEmailRequired='"
225
        + isEmailRequired
226
        + '\''
227
        + ", "
228
        + "isDescriptionRequired='"
229
        + isDescriptionRequired
230
        + '\''
231
        + ", "
232
        + "expiresAt='"
233
        + expiresAt
234
        + '\''
235
        + ", "
236
        + "folder='"
237
        + folder
238
        + '\''
239
        + ", "
240
        + "url='"
241
        + url
242
        + '\''
243
        + ", "
244
        + "etag='"
245
        + etag
246
        + '\''
247
        + ", "
248
        + "createdBy='"
249
        + createdBy
250
        + '\''
251
        + ", "
252
        + "createdAt='"
253
        + createdAt
254
        + '\''
255
        + ", "
256
        + "updatedBy='"
257
        + updatedBy
258
        + '\''
259
        + ", "
260
        + "updatedAt='"
261
        + updatedAt
262
        + '\''
263
        + "}";
264
  }
265

266
  public static class Builder {
267

268
    protected final String id;
269

270
    protected EnumWrapper<FileRequestTypeField> type;
271

272
    protected String title;
273

274
    protected String description;
275

276
    protected EnumWrapper<FileRequestStatusField> status;
277

278
    protected Boolean isEmailRequired;
279

280
    protected Boolean isDescriptionRequired;
281

282
    protected Date expiresAt;
283

284
    protected final FolderMini folder;
285

286
    protected String url;
287

288
    protected String etag;
289

290
    protected UserMini createdBy;
291

292
    protected final Date createdAt;
293

294
    protected UserMini updatedBy;
295

296
    protected final Date updatedAt;
297

NEW
298
    public Builder(String id, FolderMini folder, Date createdAt, Date updatedAt) {
×
299
      this.id = id;
×
300
      this.folder = folder;
×
301
      this.createdAt = createdAt;
×
302
      this.updatedAt = updatedAt;
×
303
      this.type = new EnumWrapper<FileRequestTypeField>(FileRequestTypeField.FILE_REQUEST);
×
304
    }
×
305

306
    public Builder type(FileRequestTypeField type) {
307
      this.type = new EnumWrapper<FileRequestTypeField>(type);
×
308
      return this;
×
309
    }
310

311
    public Builder type(EnumWrapper<FileRequestTypeField> type) {
312
      this.type = type;
×
313
      return this;
×
314
    }
315

316
    public Builder title(String title) {
317
      this.title = title;
×
318
      return this;
×
319
    }
320

321
    public Builder description(String description) {
322
      this.description = description;
×
323
      return this;
×
324
    }
325

326
    public Builder status(FileRequestStatusField status) {
327
      this.status = new EnumWrapper<FileRequestStatusField>(status);
×
328
      return this;
×
329
    }
330

331
    public Builder status(EnumWrapper<FileRequestStatusField> status) {
332
      this.status = status;
×
333
      return this;
×
334
    }
335

336
    public Builder isEmailRequired(Boolean isEmailRequired) {
337
      this.isEmailRequired = isEmailRequired;
×
338
      return this;
×
339
    }
340

341
    public Builder isDescriptionRequired(Boolean isDescriptionRequired) {
342
      this.isDescriptionRequired = isDescriptionRequired;
×
343
      return this;
×
344
    }
345

346
    public Builder expiresAt(Date expiresAt) {
347
      this.expiresAt = expiresAt;
×
348
      return this;
×
349
    }
350

351
    public Builder url(String url) {
352
      this.url = url;
×
353
      return this;
×
354
    }
355

356
    public Builder etag(String etag) {
357
      this.etag = etag;
×
358
      return this;
×
359
    }
360

361
    public Builder createdBy(UserMini createdBy) {
362
      this.createdBy = createdBy;
×
363
      return this;
×
364
    }
365

366
    public Builder updatedBy(UserMini updatedBy) {
367
      this.updatedBy = updatedBy;
×
368
      return this;
×
369
    }
370

371
    public FileRequest build() {
372
      return new FileRequest(this);
×
373
    }
374
  }
375
}
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