• 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.35
/src/main/java/com/box/sdkgen/schemas/signrequest/SignRequest.java
1
package com.box.sdkgen.schemas.signrequest;
2

3
import com.box.sdkgen.internal.utils.DateTimeUtils;
4
import com.box.sdkgen.schemas.filebase.FileBase;
5
import com.box.sdkgen.schemas.filemini.FileMini;
6
import com.box.sdkgen.schemas.foldermini.FolderMini;
7
import com.box.sdkgen.schemas.signrequestbase.SignRequestBase;
8
import com.box.sdkgen.schemas.signrequestprefilltag.SignRequestPrefillTag;
9
import com.box.sdkgen.schemas.signrequestsigner.SignRequestSigner;
10
import com.box.sdkgen.serialization.json.EnumWrapper;
11
import com.fasterxml.jackson.annotation.JsonProperty;
12
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
13
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
14
import java.util.Date;
15
import java.util.List;
16
import java.util.Objects;
17

18
public class SignRequest extends SignRequestBase {
19

20
  @JsonDeserialize(using = SignRequestTypeField.SignRequestTypeFieldDeserializer.class)
21
  @JsonSerialize(using = SignRequestTypeField.SignRequestTypeFieldSerializer.class)
22
  protected EnumWrapper<SignRequestTypeField> type;
23

24
  @JsonProperty("source_files")
25
  protected List<FileBase> sourceFiles;
26

27
  protected List<SignRequestSigner> signers;
28

29
  @JsonProperty("signature_color")
30
  protected String signatureColor;
31

32
  protected String id;
33

34
  @JsonProperty("prepare_url")
35
  protected String prepareUrl;
36

37
  @JsonProperty("signing_log")
38
  protected FileMini signingLog;
39

40
  @JsonDeserialize(using = SignRequestStatusField.SignRequestStatusFieldDeserializer.class)
41
  @JsonSerialize(using = SignRequestStatusField.SignRequestStatusFieldSerializer.class)
42
  protected EnumWrapper<SignRequestStatusField> status;
43

44
  @JsonProperty("sign_files")
45
  protected SignRequestSignFilesField signFiles;
46

47
  @JsonProperty("auto_expire_at")
48
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
49
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
50
  protected Date autoExpireAt;
51

52
  @JsonProperty("parent_folder")
53
  protected FolderMini parentFolder;
54

55
  @JsonProperty("collaborator_level")
56
  protected String collaboratorLevel;
57

58
  @JsonProperty("sender_email")
59
  protected String senderEmail;
60

61
  @JsonProperty("sender_id")
62
  protected Long senderId;
63

64
  public SignRequest() {
65
    super();
1✔
66
  }
1✔
67

68
  protected SignRequest(Builder builder) {
69
    super(builder);
×
70
    this.type = builder.type;
×
71
    this.sourceFiles = builder.sourceFiles;
×
72
    this.signers = builder.signers;
×
73
    this.signatureColor = builder.signatureColor;
×
74
    this.id = builder.id;
×
75
    this.prepareUrl = builder.prepareUrl;
×
76
    this.signingLog = builder.signingLog;
×
77
    this.status = builder.status;
×
78
    this.signFiles = builder.signFiles;
×
79
    this.autoExpireAt = builder.autoExpireAt;
×
80
    this.parentFolder = builder.parentFolder;
×
81
    this.collaboratorLevel = builder.collaboratorLevel;
×
82
    this.senderEmail = builder.senderEmail;
×
83
    this.senderId = builder.senderId;
×
84
  }
×
85

86
  public EnumWrapper<SignRequestTypeField> getType() {
87
    return type;
1✔
88
  }
89

90
  public List<FileBase> getSourceFiles() {
91
    return sourceFiles;
×
92
  }
93

94
  public List<SignRequestSigner> getSigners() {
95
    return signers;
1✔
96
  }
97

98
  public String getSignatureColor() {
99
    return signatureColor;
×
100
  }
101

102
  public String getId() {
103
    return id;
1✔
104
  }
105

106
  public String getPrepareUrl() {
107
    return prepareUrl;
×
108
  }
109

110
  public FileMini getSigningLog() {
111
    return signingLog;
×
112
  }
113

114
  public EnumWrapper<SignRequestStatusField> getStatus() {
115
    return status;
1✔
116
  }
117

118
  public SignRequestSignFilesField getSignFiles() {
119
    return signFiles;
1✔
120
  }
121

122
  public Date getAutoExpireAt() {
123
    return autoExpireAt;
×
124
  }
125

126
  public FolderMini getParentFolder() {
127
    return parentFolder;
1✔
128
  }
129

130
  public String getCollaboratorLevel() {
131
    return collaboratorLevel;
×
132
  }
133

134
  public String getSenderEmail() {
135
    return senderEmail;
×
136
  }
137

138
  public Long getSenderId() {
139
    return senderId;
×
140
  }
141

142
  @Override
143
  public boolean equals(Object o) {
144
    if (this == o) {
×
145
      return true;
×
146
    }
147
    if (o == null || getClass() != o.getClass()) {
×
148
      return false;
×
149
    }
150
    SignRequest casted = (SignRequest) o;
×
151
    return Objects.equals(isDocumentPreparationNeeded, casted.isDocumentPreparationNeeded)
×
152
        && Objects.equals(redirectUrl, casted.redirectUrl)
×
153
        && Objects.equals(declinedRedirectUrl, casted.declinedRedirectUrl)
×
154
        && Objects.equals(areTextSignaturesEnabled, casted.areTextSignaturesEnabled)
×
155
        && Objects.equals(emailSubject, casted.emailSubject)
×
156
        && Objects.equals(emailMessage, casted.emailMessage)
×
157
        && Objects.equals(areRemindersEnabled, casted.areRemindersEnabled)
×
158
        && Objects.equals(name, casted.name)
×
159
        && Objects.equals(prefillTags, casted.prefillTags)
×
160
        && Objects.equals(daysValid, casted.daysValid)
×
161
        && Objects.equals(externalId, casted.externalId)
×
162
        && Objects.equals(templateId, casted.templateId)
×
163
        && Objects.equals(externalSystemName, casted.externalSystemName)
×
164
        && Objects.equals(type, casted.type)
×
165
        && Objects.equals(sourceFiles, casted.sourceFiles)
×
166
        && Objects.equals(signers, casted.signers)
×
167
        && Objects.equals(signatureColor, casted.signatureColor)
×
168
        && Objects.equals(id, casted.id)
×
169
        && Objects.equals(prepareUrl, casted.prepareUrl)
×
170
        && Objects.equals(signingLog, casted.signingLog)
×
171
        && Objects.equals(status, casted.status)
×
172
        && Objects.equals(signFiles, casted.signFiles)
×
173
        && Objects.equals(autoExpireAt, casted.autoExpireAt)
×
174
        && Objects.equals(parentFolder, casted.parentFolder)
×
175
        && Objects.equals(collaboratorLevel, casted.collaboratorLevel)
×
176
        && Objects.equals(senderEmail, casted.senderEmail)
×
177
        && Objects.equals(senderId, casted.senderId);
×
178
  }
179

180
  @Override
181
  public int hashCode() {
182
    return Objects.hash(
×
183
        isDocumentPreparationNeeded,
184
        redirectUrl,
185
        declinedRedirectUrl,
186
        areTextSignaturesEnabled,
187
        emailSubject,
188
        emailMessage,
189
        areRemindersEnabled,
190
        name,
191
        prefillTags,
192
        daysValid,
193
        externalId,
194
        templateId,
195
        externalSystemName,
196
        type,
197
        sourceFiles,
198
        signers,
199
        signatureColor,
200
        id,
201
        prepareUrl,
202
        signingLog,
203
        status,
204
        signFiles,
205
        autoExpireAt,
206
        parentFolder,
207
        collaboratorLevel,
208
        senderEmail,
209
        senderId);
210
  }
211

212
  @Override
213
  public String toString() {
214
    return "SignRequest{"
×
215
        + "isDocumentPreparationNeeded='"
216
        + isDocumentPreparationNeeded
217
        + '\''
218
        + ", "
219
        + "redirectUrl='"
220
        + redirectUrl
221
        + '\''
222
        + ", "
223
        + "declinedRedirectUrl='"
224
        + declinedRedirectUrl
225
        + '\''
226
        + ", "
227
        + "areTextSignaturesEnabled='"
228
        + areTextSignaturesEnabled
229
        + '\''
230
        + ", "
231
        + "emailSubject='"
232
        + emailSubject
233
        + '\''
234
        + ", "
235
        + "emailMessage='"
236
        + emailMessage
237
        + '\''
238
        + ", "
239
        + "areRemindersEnabled='"
240
        + areRemindersEnabled
241
        + '\''
242
        + ", "
243
        + "name='"
244
        + name
245
        + '\''
246
        + ", "
247
        + "prefillTags='"
248
        + prefillTags
249
        + '\''
250
        + ", "
251
        + "daysValid='"
252
        + daysValid
253
        + '\''
254
        + ", "
255
        + "externalId='"
256
        + externalId
257
        + '\''
258
        + ", "
259
        + "templateId='"
260
        + templateId
261
        + '\''
262
        + ", "
263
        + "externalSystemName='"
264
        + externalSystemName
265
        + '\''
266
        + ", "
267
        + "type='"
268
        + type
269
        + '\''
270
        + ", "
271
        + "sourceFiles='"
272
        + sourceFiles
273
        + '\''
274
        + ", "
275
        + "signers='"
276
        + signers
277
        + '\''
278
        + ", "
279
        + "signatureColor='"
280
        + signatureColor
281
        + '\''
282
        + ", "
283
        + "id='"
284
        + id
285
        + '\''
286
        + ", "
287
        + "prepareUrl='"
288
        + prepareUrl
289
        + '\''
290
        + ", "
291
        + "signingLog='"
292
        + signingLog
293
        + '\''
294
        + ", "
295
        + "status='"
296
        + status
297
        + '\''
298
        + ", "
299
        + "signFiles='"
300
        + signFiles
301
        + '\''
302
        + ", "
303
        + "autoExpireAt='"
304
        + autoExpireAt
305
        + '\''
306
        + ", "
307
        + "parentFolder='"
308
        + parentFolder
309
        + '\''
310
        + ", "
311
        + "collaboratorLevel='"
312
        + collaboratorLevel
313
        + '\''
314
        + ", "
315
        + "senderEmail='"
316
        + senderEmail
317
        + '\''
318
        + ", "
319
        + "senderId='"
320
        + senderId
321
        + '\''
322
        + "}";
323
  }
324

NEW
325
  public static class Builder extends SignRequestBase.Builder {
×
326

327
    protected EnumWrapper<SignRequestTypeField> type;
328

329
    protected List<FileBase> sourceFiles;
330

331
    protected List<SignRequestSigner> signers;
332

333
    protected String signatureColor;
334

335
    protected String id;
336

337
    protected String prepareUrl;
338

339
    protected FileMini signingLog;
340

341
    protected EnumWrapper<SignRequestStatusField> status;
342

343
    protected SignRequestSignFilesField signFiles;
344

345
    protected Date autoExpireAt;
346

347
    protected FolderMini parentFolder;
348

349
    protected String collaboratorLevel;
350

351
    protected String senderEmail;
352

353
    protected Long senderId;
354

355
    public Builder type(SignRequestTypeField type) {
356
      this.type = new EnumWrapper<SignRequestTypeField>(type);
×
357
      return this;
×
358
    }
359

360
    public Builder type(EnumWrapper<SignRequestTypeField> type) {
361
      this.type = type;
×
362
      return this;
×
363
    }
364

365
    public Builder sourceFiles(List<FileBase> sourceFiles) {
366
      this.sourceFiles = sourceFiles;
×
367
      return this;
×
368
    }
369

370
    public Builder signers(List<SignRequestSigner> signers) {
371
      this.signers = signers;
×
372
      return this;
×
373
    }
374

375
    public Builder signatureColor(String signatureColor) {
376
      this.signatureColor = signatureColor;
×
377
      return this;
×
378
    }
379

380
    public Builder id(String id) {
381
      this.id = id;
×
382
      return this;
×
383
    }
384

385
    public Builder prepareUrl(String prepareUrl) {
386
      this.prepareUrl = prepareUrl;
×
387
      return this;
×
388
    }
389

390
    public Builder signingLog(FileMini signingLog) {
391
      this.signingLog = signingLog;
×
392
      return this;
×
393
    }
394

395
    public Builder status(SignRequestStatusField status) {
396
      this.status = new EnumWrapper<SignRequestStatusField>(status);
×
397
      return this;
×
398
    }
399

400
    public Builder status(EnumWrapper<SignRequestStatusField> status) {
401
      this.status = status;
×
402
      return this;
×
403
    }
404

405
    public Builder signFiles(SignRequestSignFilesField signFiles) {
406
      this.signFiles = signFiles;
×
407
      return this;
×
408
    }
409

410
    public Builder autoExpireAt(Date autoExpireAt) {
411
      this.autoExpireAt = autoExpireAt;
×
412
      return this;
×
413
    }
414

415
    public Builder parentFolder(FolderMini parentFolder) {
416
      this.parentFolder = parentFolder;
×
417
      return this;
×
418
    }
419

420
    public Builder collaboratorLevel(String collaboratorLevel) {
421
      this.collaboratorLevel = collaboratorLevel;
×
422
      return this;
×
423
    }
424

425
    public Builder senderEmail(String senderEmail) {
426
      this.senderEmail = senderEmail;
×
427
      return this;
×
428
    }
429

430
    public Builder senderId(Long senderId) {
431
      this.senderId = senderId;
×
432
      return this;
×
433
    }
434

435
    @Override
436
    public Builder isDocumentPreparationNeeded(Boolean isDocumentPreparationNeeded) {
437
      this.isDocumentPreparationNeeded = isDocumentPreparationNeeded;
×
438
      return this;
×
439
    }
440

441
    @Override
442
    public Builder redirectUrl(String redirectUrl) {
443
      this.redirectUrl = redirectUrl;
×
444
      return this;
×
445
    }
446

447
    @Override
448
    public Builder declinedRedirectUrl(String declinedRedirectUrl) {
449
      this.declinedRedirectUrl = declinedRedirectUrl;
×
450
      return this;
×
451
    }
452

453
    @Override
454
    public Builder areTextSignaturesEnabled(Boolean areTextSignaturesEnabled) {
455
      this.areTextSignaturesEnabled = areTextSignaturesEnabled;
×
456
      return this;
×
457
    }
458

459
    @Override
460
    public Builder emailSubject(String emailSubject) {
461
      this.emailSubject = emailSubject;
×
462
      return this;
×
463
    }
464

465
    @Override
466
    public Builder emailMessage(String emailMessage) {
467
      this.emailMessage = emailMessage;
×
468
      return this;
×
469
    }
470

471
    @Override
472
    public Builder areRemindersEnabled(Boolean areRemindersEnabled) {
473
      this.areRemindersEnabled = areRemindersEnabled;
×
474
      return this;
×
475
    }
476

477
    @Override
478
    public Builder name(String name) {
479
      this.name = name;
×
480
      return this;
×
481
    }
482

483
    @Override
484
    public Builder prefillTags(List<SignRequestPrefillTag> prefillTags) {
485
      this.prefillTags = prefillTags;
×
486
      return this;
×
487
    }
488

489
    @Override
490
    public Builder daysValid(Long daysValid) {
491
      this.daysValid = daysValid;
×
492
      return this;
×
493
    }
494

495
    @Override
496
    public Builder externalId(String externalId) {
497
      this.externalId = externalId;
×
498
      return this;
×
499
    }
500

501
    @Override
502
    public Builder templateId(String templateId) {
503
      this.templateId = templateId;
×
504
      return this;
×
505
    }
506

507
    @Override
508
    public Builder externalSystemName(String externalSystemName) {
509
      this.externalSystemName = externalSystemName;
×
510
      return this;
×
511
    }
512

513
    public SignRequest build() {
514
      return new SignRequest(this);
×
515
    }
516
  }
517
}
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