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

box / box-java-sdk-gen / #301

26 Jun 2025 03:33PM UTC coverage: 35.681% (-0.04%) from 35.723%
#301

push

github

web-flow
feat: Add webhook validation(box/box-codegen#745) (#347)

Co-authored-by: box-sdk-build <box-sdk-build@box.com>

68 of 82 new or added lines in 2 files covered. (82.93%)

11818 existing lines in 631 files now uncovered.

16948 of 47499 relevant lines covered (35.68%)

0.36 hits per line

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

5.67
/src/main/java/com/box/sdkgen/schemas/signrequest/SignRequest.java
1
package com.box.sdkgen.schemas.signrequest;
2

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

20
@JsonFilter("nullablePropertyFilter")
21
public class SignRequest extends SignRequestBase {
22

23
  @JsonDeserialize(using = SignRequestTypeField.SignRequestTypeFieldDeserializer.class)
24
  @JsonSerialize(using = SignRequestTypeField.SignRequestTypeFieldSerializer.class)
25
  protected EnumWrapper<SignRequestTypeField> type;
26

27
  @JsonProperty("source_files")
28
  protected List<FileBase> sourceFiles;
29

30
  protected List<SignRequestSigner> signers;
31

32
  @JsonProperty("signature_color")
33
  @Nullable
34
  protected String signatureColor;
35

36
  protected String id;
37

38
  @JsonProperty("prepare_url")
39
  @Nullable
40
  protected String prepareUrl;
41

42
  @JsonProperty("signing_log")
43
  protected FileMini signingLog;
44

45
  @JsonDeserialize(using = SignRequestStatusField.SignRequestStatusFieldDeserializer.class)
46
  @JsonSerialize(using = SignRequestStatusField.SignRequestStatusFieldSerializer.class)
47
  protected EnumWrapper<SignRequestStatusField> status;
48

49
  @JsonProperty("sign_files")
50
  protected SignRequestSignFilesField signFiles;
51

52
  @JsonProperty("auto_expire_at")
53
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
54
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
55
  @Nullable
56
  protected Date autoExpireAt;
57

58
  @JsonProperty("parent_folder")
59
  protected FolderMini parentFolder;
60

61
  @JsonProperty("collaborator_level")
62
  @Nullable
63
  protected String collaboratorLevel;
64

65
  @JsonProperty("sender_email")
66
  @Nullable
67
  protected String senderEmail;
68

69
  @JsonProperty("sender_id")
70
  @Nullable
71
  protected Long senderId;
72

73
  public SignRequest() {
74
    super();
1✔
75
  }
1✔
76

77
  protected SignRequest(Builder builder) {
78
    super(builder);
×
79
    this.type = builder.type;
×
80
    this.sourceFiles = builder.sourceFiles;
×
81
    this.signers = builder.signers;
×
82
    this.signatureColor = builder.signatureColor;
×
83
    this.id = builder.id;
×
84
    this.prepareUrl = builder.prepareUrl;
×
UNCOV
85
    this.signingLog = builder.signingLog;
×
UNCOV
86
    this.status = builder.status;
×
UNCOV
87
    this.signFiles = builder.signFiles;
×
UNCOV
88
    this.autoExpireAt = builder.autoExpireAt;
×
UNCOV
89
    this.parentFolder = builder.parentFolder;
×
UNCOV
90
    this.collaboratorLevel = builder.collaboratorLevel;
×
91
    this.senderEmail = builder.senderEmail;
×
UNCOV
92
    this.senderId = builder.senderId;
×
UNCOV
93
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
UNCOV
94
  }
×
95

96
  public EnumWrapper<SignRequestTypeField> getType() {
97
    return type;
1✔
98
  }
99

100
  public List<FileBase> getSourceFiles() {
UNCOV
101
    return sourceFiles;
×
102
  }
103

104
  public List<SignRequestSigner> getSigners() {
105
    return signers;
1✔
106
  }
107

108
  public String getSignatureColor() {
UNCOV
109
    return signatureColor;
×
110
  }
111

112
  public String getId() {
113
    return id;
1✔
114
  }
115

116
  public String getPrepareUrl() {
UNCOV
117
    return prepareUrl;
×
118
  }
119

120
  public FileMini getSigningLog() {
UNCOV
121
    return signingLog;
×
122
  }
123

124
  public EnumWrapper<SignRequestStatusField> getStatus() {
125
    return status;
1✔
126
  }
127

128
  public SignRequestSignFilesField getSignFiles() {
129
    return signFiles;
1✔
130
  }
131

132
  public Date getAutoExpireAt() {
UNCOV
133
    return autoExpireAt;
×
134
  }
135

136
  public FolderMini getParentFolder() {
137
    return parentFolder;
1✔
138
  }
139

140
  public String getCollaboratorLevel() {
UNCOV
141
    return collaboratorLevel;
×
142
  }
143

144
  public String getSenderEmail() {
145
    return senderEmail;
×
146
  }
147

148
  public Long getSenderId() {
UNCOV
149
    return senderId;
×
150
  }
151

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

190
  @Override
191
  public int hashCode() {
UNCOV
192
    return Objects.hash(
×
193
        isDocumentPreparationNeeded,
194
        redirectUrl,
195
        declinedRedirectUrl,
196
        areTextSignaturesEnabled,
197
        emailSubject,
198
        emailMessage,
199
        areRemindersEnabled,
200
        name,
201
        prefillTags,
202
        daysValid,
203
        externalId,
204
        templateId,
205
        externalSystemName,
206
        type,
207
        sourceFiles,
208
        signers,
209
        signatureColor,
210
        id,
211
        prepareUrl,
212
        signingLog,
213
        status,
214
        signFiles,
215
        autoExpireAt,
216
        parentFolder,
217
        collaboratorLevel,
218
        senderEmail,
219
        senderId);
220
  }
221

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

UNCOV
335
  public static class Builder extends SignRequestBase.Builder {
×
336

337
    protected EnumWrapper<SignRequestTypeField> type;
338

339
    protected List<FileBase> sourceFiles;
340

341
    protected List<SignRequestSigner> signers;
342

343
    protected String signatureColor;
344

345
    protected String id;
346

347
    protected String prepareUrl;
348

349
    protected FileMini signingLog;
350

351
    protected EnumWrapper<SignRequestStatusField> status;
352

353
    protected SignRequestSignFilesField signFiles;
354

355
    protected Date autoExpireAt;
356

357
    protected FolderMini parentFolder;
358

359
    protected String collaboratorLevel;
360

361
    protected String senderEmail;
362

363
    protected Long senderId;
364

365
    public Builder type(SignRequestTypeField type) {
366
      this.type = new EnumWrapper<SignRequestTypeField>(type);
×
367
      return this;
×
368
    }
369

370
    public Builder type(EnumWrapper<SignRequestTypeField> type) {
371
      this.type = type;
×
372
      return this;
×
373
    }
374

375
    public Builder sourceFiles(List<FileBase> sourceFiles) {
376
      this.sourceFiles = sourceFiles;
×
377
      return this;
×
378
    }
379

380
    public Builder signers(List<SignRequestSigner> signers) {
381
      this.signers = signers;
×
382
      return this;
×
383
    }
384

385
    public Builder signatureColor(String signatureColor) {
386
      this.signatureColor = signatureColor;
×
387
      this.markNullableFieldAsSet("signature_color");
×
UNCOV
388
      return this;
×
389
    }
390

391
    public Builder id(String id) {
392
      this.id = id;
×
UNCOV
393
      return this;
×
394
    }
395

396
    public Builder prepareUrl(String prepareUrl) {
397
      this.prepareUrl = prepareUrl;
×
UNCOV
398
      this.markNullableFieldAsSet("prepare_url");
×
UNCOV
399
      return this;
×
400
    }
401

402
    public Builder signingLog(FileMini signingLog) {
UNCOV
403
      this.signingLog = signingLog;
×
UNCOV
404
      return this;
×
405
    }
406

407
    public Builder status(SignRequestStatusField status) {
UNCOV
408
      this.status = new EnumWrapper<SignRequestStatusField>(status);
×
UNCOV
409
      return this;
×
410
    }
411

412
    public Builder status(EnumWrapper<SignRequestStatusField> status) {
UNCOV
413
      this.status = status;
×
UNCOV
414
      return this;
×
415
    }
416

417
    public Builder signFiles(SignRequestSignFilesField signFiles) {
UNCOV
418
      this.signFiles = signFiles;
×
UNCOV
419
      return this;
×
420
    }
421

422
    public Builder autoExpireAt(Date autoExpireAt) {
UNCOV
423
      this.autoExpireAt = autoExpireAt;
×
UNCOV
424
      this.markNullableFieldAsSet("auto_expire_at");
×
UNCOV
425
      return this;
×
426
    }
427

428
    public Builder parentFolder(FolderMini parentFolder) {
UNCOV
429
      this.parentFolder = parentFolder;
×
UNCOV
430
      return this;
×
431
    }
432

433
    public Builder collaboratorLevel(String collaboratorLevel) {
UNCOV
434
      this.collaboratorLevel = collaboratorLevel;
×
UNCOV
435
      this.markNullableFieldAsSet("collaborator_level");
×
UNCOV
436
      return this;
×
437
    }
438

439
    public Builder senderEmail(String senderEmail) {
UNCOV
440
      this.senderEmail = senderEmail;
×
UNCOV
441
      this.markNullableFieldAsSet("sender_email");
×
UNCOV
442
      return this;
×
443
    }
444

445
    public Builder senderId(Long senderId) {
UNCOV
446
      this.senderId = senderId;
×
UNCOV
447
      this.markNullableFieldAsSet("sender_id");
×
UNCOV
448
      return this;
×
449
    }
450

451
    @Override
452
    public Builder isDocumentPreparationNeeded(Boolean isDocumentPreparationNeeded) {
UNCOV
453
      this.isDocumentPreparationNeeded = isDocumentPreparationNeeded;
×
UNCOV
454
      return this;
×
455
    }
456

457
    @Override
458
    public Builder redirectUrl(String redirectUrl) {
UNCOV
459
      this.redirectUrl = redirectUrl;
×
UNCOV
460
      this.markNullableFieldAsSet("redirect_url");
×
461
      return this;
×
462
    }
463

464
    @Override
465
    public Builder declinedRedirectUrl(String declinedRedirectUrl) {
UNCOV
466
      this.declinedRedirectUrl = declinedRedirectUrl;
×
467
      this.markNullableFieldAsSet("declined_redirect_url");
×
468
      return this;
×
469
    }
470

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

477
    @Override
478
    public Builder emailSubject(String emailSubject) {
479
      this.emailSubject = emailSubject;
×
480
      this.markNullableFieldAsSet("email_subject");
×
UNCOV
481
      return this;
×
482
    }
483

484
    @Override
485
    public Builder emailMessage(String emailMessage) {
486
      this.emailMessage = emailMessage;
×
UNCOV
487
      this.markNullableFieldAsSet("email_message");
×
UNCOV
488
      return this;
×
489
    }
490

491
    @Override
492
    public Builder areRemindersEnabled(Boolean areRemindersEnabled) {
UNCOV
493
      this.areRemindersEnabled = areRemindersEnabled;
×
UNCOV
494
      return this;
×
495
    }
496

497
    @Override
498
    public Builder name(String name) {
UNCOV
499
      this.name = name;
×
UNCOV
500
      return this;
×
501
    }
502

503
    @Override
504
    public Builder prefillTags(List<SignRequestPrefillTag> prefillTags) {
UNCOV
505
      this.prefillTags = prefillTags;
×
UNCOV
506
      return this;
×
507
    }
508

509
    @Override
510
    public Builder daysValid(Long daysValid) {
UNCOV
511
      this.daysValid = daysValid;
×
UNCOV
512
      this.markNullableFieldAsSet("days_valid");
×
UNCOV
513
      return this;
×
514
    }
515

516
    @Override
517
    public Builder externalId(String externalId) {
UNCOV
518
      this.externalId = externalId;
×
UNCOV
519
      this.markNullableFieldAsSet("external_id");
×
UNCOV
520
      return this;
×
521
    }
522

523
    @Override
524
    public Builder templateId(String templateId) {
UNCOV
525
      this.templateId = templateId;
×
UNCOV
526
      this.markNullableFieldAsSet("template_id");
×
UNCOV
527
      return this;
×
528
    }
529

530
    @Override
531
    public Builder externalSystemName(String externalSystemName) {
UNCOV
532
      this.externalSystemName = externalSystemName;
×
UNCOV
533
      this.markNullableFieldAsSet("external_system_name");
×
UNCOV
534
      return this;
×
535
    }
536

537
    public SignRequest build() {
UNCOV
538
      return new SignRequest(this);
×
539
    }
540
  }
541
}
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