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

box / box-java-sdk / #7360

30 Jun 2026 12:41PM UTC coverage: 12.39% (-0.03%) from 12.415%
#7360

push

github

web-flow
feat(boxsdkgen): Add new fields to Hubs (box/box-openapi#606) (#1900)

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

0 of 99 new or added lines in 10 files covered. (0.0%)

17 existing lines in 10 files now uncovered.

8368 of 67537 relevant lines covered (12.39%)

0.12 hits per line

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

0.0
/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.time.OffsetDateTime;
17
import java.util.List;
18
import java.util.Objects;
19

20
/** A Box Sign request object. */
21
@JsonFilter("nullablePropertyFilter")
22
public class SignRequest extends SignRequestBase {
23

24
  /** The value will always be `sign-request`. */
25
  @JsonDeserialize(using = SignRequestTypeField.SignRequestTypeFieldDeserializer.class)
26
  @JsonSerialize(using = SignRequestTypeField.SignRequestTypeFieldSerializer.class)
27
  protected EnumWrapper<SignRequestTypeField> type;
28

29
  /**
30
   * List of files to create a signing document from. This is currently limited to ten files. Only
31
   * the ID and type fields are required for each file.
32
   */
33
  @JsonProperty("source_files")
34
  protected List<FileBase> sourceFiles;
35

36
  /** Array of signers for the signature request. */
37
  protected List<SignRequestSigner> signers;
38

39
  /** Force a specific color for the signature (blue, black, or red). */
40
  @JsonProperty("signature_color")
41
  @Nullable
42
  protected String signatureColor;
43

44
  /** Box Sign request ID. */
45
  protected String id;
46

47
  /**
48
   * This URL is returned if `is_document_preparation_needed` is set to `true` in the request. The
49
   * parameter is used to prepare the signature request using the UI. The signature request is not
50
   * sent until the preparation phase is complete.
51
   */
52
  @JsonProperty("prepare_url")
53
  @Nullable
54
  protected String prepareUrl;
55

56
  @JsonProperty("signing_log")
57
  protected FileMini signingLog;
58

59
  /** Describes the status of the signature request. */
60
  @JsonDeserialize(using = SignRequestStatusField.SignRequestStatusFieldDeserializer.class)
61
  @JsonSerialize(using = SignRequestStatusField.SignRequestStatusFieldSerializer.class)
62
  protected EnumWrapper<SignRequestStatusField> status;
63

64
  /**
65
   * List of files that will be signed, which are copies of the original source files. A new version
66
   * of these files are created as signers sign and can be downloaded at any point in the signing
67
   * process.
68
   */
69
  @JsonProperty("sign_files")
70
  protected SignRequestSignFilesField signFiles;
71

72
  /**
73
   * Uses `days_valid` to calculate the date and time, in GMT, the sign request will expire if
74
   * unsigned.
75
   */
76
  @JsonProperty("auto_expire_at")
77
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
78
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
79
  @Nullable
80
  protected OffsetDateTime autoExpireAt;
81

82
  @JsonProperty("parent_folder")
83
  protected FolderMini parentFolder;
84

85
  /**
86
   * The collaborator level of the user to the sign request. Values can include "owner", "editor",
87
   * and "viewer".
88
   */
89
  @JsonProperty("collaborator_level")
90
  @Nullable
91
  protected String collaboratorLevel;
92

93
  /** Short identifier for the sign request. */
94
  @JsonProperty("short_id")
95
  protected String shortId;
96

97
  /** Timestamp marking when the sign request was created. */
98
  @JsonProperty("created_at")
99
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
100
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
101
  protected OffsetDateTime createdAt;
102

103
  /** Timestamp indicating when all signing actions completed. */
104
  @JsonProperty("finished_at")
105
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
106
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
107
  @Nullable
108
  protected OffsetDateTime finishedAt;
109

110
  /**
111
   * When the sign request is in an error state, identifies the specific reason. Null when no error
112
   * code applies.
113
   */
114
  @JsonProperty("error_code")
115
  @Nullable
116
  protected String errorCode;
117

118
  /** The email address of the sender of the sign request. */
119
  @JsonProperty("sender_email")
120
  @Nullable
121
  protected String senderEmail;
122

123
  /** The user ID of the sender of the sign request. */
124
  @JsonProperty("sender_id")
125
  @Nullable
126
  protected Long senderId;
127

128
  public SignRequest() {
129
    super();
×
130
  }
×
131

132
  protected SignRequest(Builder builder) {
133
    super(builder);
×
134
    this.type = builder.type;
×
135
    this.sourceFiles = builder.sourceFiles;
×
136
    this.signers = builder.signers;
×
137
    this.signatureColor = builder.signatureColor;
×
138
    this.id = builder.id;
×
139
    this.prepareUrl = builder.prepareUrl;
×
140
    this.signingLog = builder.signingLog;
×
141
    this.status = builder.status;
×
142
    this.signFiles = builder.signFiles;
×
143
    this.autoExpireAt = builder.autoExpireAt;
×
144
    this.parentFolder = builder.parentFolder;
×
145
    this.collaboratorLevel = builder.collaboratorLevel;
×
146
    this.shortId = builder.shortId;
×
147
    this.createdAt = builder.createdAt;
×
148
    this.finishedAt = builder.finishedAt;
×
149
    this.errorCode = builder.errorCode;
×
150
    this.senderEmail = builder.senderEmail;
×
151
    this.senderId = builder.senderId;
×
152
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
153
  }
×
154

155
  public EnumWrapper<SignRequestTypeField> getType() {
156
    return type;
×
157
  }
158

159
  public List<FileBase> getSourceFiles() {
160
    return sourceFiles;
×
161
  }
162

163
  public List<SignRequestSigner> getSigners() {
164
    return signers;
×
165
  }
166

167
  public String getSignatureColor() {
168
    return signatureColor;
×
169
  }
170

171
  public String getId() {
172
    return id;
×
173
  }
174

175
  public String getPrepareUrl() {
176
    return prepareUrl;
×
177
  }
178

179
  public FileMini getSigningLog() {
180
    return signingLog;
×
181
  }
182

183
  public EnumWrapper<SignRequestStatusField> getStatus() {
184
    return status;
×
185
  }
186

187
  public SignRequestSignFilesField getSignFiles() {
188
    return signFiles;
×
189
  }
190

191
  public OffsetDateTime getAutoExpireAt() {
192
    return autoExpireAt;
×
193
  }
194

195
  public FolderMini getParentFolder() {
196
    return parentFolder;
×
197
  }
198

199
  public String getCollaboratorLevel() {
200
    return collaboratorLevel;
×
201
  }
202

203
  public String getShortId() {
204
    return shortId;
×
205
  }
206

207
  public OffsetDateTime getCreatedAt() {
208
    return createdAt;
×
209
  }
210

211
  public OffsetDateTime getFinishedAt() {
212
    return finishedAt;
×
213
  }
214

215
  public String getErrorCode() {
216
    return errorCode;
×
217
  }
218

219
  public String getSenderEmail() {
220
    return senderEmail;
×
221
  }
222

223
  public Long getSenderId() {
224
    return senderId;
×
225
  }
226

227
  @Override
228
  public boolean equals(Object o) {
229
    if (this == o) {
×
230
      return true;
×
231
    }
232
    if (o == null || getClass() != o.getClass()) {
×
233
      return false;
×
234
    }
235
    SignRequest casted = (SignRequest) o;
×
236
    return Objects.equals(isDocumentPreparationNeeded, casted.isDocumentPreparationNeeded)
×
237
        && Objects.equals(redirectUrl, casted.redirectUrl)
×
238
        && Objects.equals(declinedRedirectUrl, casted.declinedRedirectUrl)
×
239
        && Objects.equals(areTextSignaturesEnabled, casted.areTextSignaturesEnabled)
×
240
        && Objects.equals(emailSubject, casted.emailSubject)
×
241
        && Objects.equals(emailMessage, casted.emailMessage)
×
242
        && Objects.equals(areRemindersEnabled, casted.areRemindersEnabled)
×
243
        && Objects.equals(name, casted.name)
×
244
        && Objects.equals(prefillTags, casted.prefillTags)
×
245
        && Objects.equals(daysValid, casted.daysValid)
×
246
        && Objects.equals(externalId, casted.externalId)
×
247
        && Objects.equals(templateId, casted.templateId)
×
248
        && Objects.equals(externalSystemName, casted.externalSystemName)
×
NEW
249
        && Objects.equals(requestFlow, casted.requestFlow)
×
250
        && Objects.equals(type, casted.type)
×
251
        && Objects.equals(sourceFiles, casted.sourceFiles)
×
252
        && Objects.equals(signers, casted.signers)
×
253
        && Objects.equals(signatureColor, casted.signatureColor)
×
254
        && Objects.equals(id, casted.id)
×
255
        && Objects.equals(prepareUrl, casted.prepareUrl)
×
256
        && Objects.equals(signingLog, casted.signingLog)
×
257
        && Objects.equals(status, casted.status)
×
258
        && Objects.equals(signFiles, casted.signFiles)
×
259
        && Objects.equals(autoExpireAt, casted.autoExpireAt)
×
260
        && Objects.equals(parentFolder, casted.parentFolder)
×
261
        && Objects.equals(collaboratorLevel, casted.collaboratorLevel)
×
262
        && Objects.equals(shortId, casted.shortId)
×
263
        && Objects.equals(createdAt, casted.createdAt)
×
264
        && Objects.equals(finishedAt, casted.finishedAt)
×
265
        && Objects.equals(errorCode, casted.errorCode)
×
266
        && Objects.equals(senderEmail, casted.senderEmail)
×
267
        && Objects.equals(senderId, casted.senderId);
×
268
  }
269

270
  @Override
271
  public int hashCode() {
272
    return Objects.hash(
×
273
        isDocumentPreparationNeeded,
274
        redirectUrl,
275
        declinedRedirectUrl,
276
        areTextSignaturesEnabled,
277
        emailSubject,
278
        emailMessage,
279
        areRemindersEnabled,
280
        name,
281
        prefillTags,
282
        daysValid,
283
        externalId,
284
        templateId,
285
        externalSystemName,
286
        requestFlow,
287
        type,
288
        sourceFiles,
289
        signers,
290
        signatureColor,
291
        id,
292
        prepareUrl,
293
        signingLog,
294
        status,
295
        signFiles,
296
        autoExpireAt,
297
        parentFolder,
298
        collaboratorLevel,
299
        shortId,
300
        createdAt,
301
        finishedAt,
302
        errorCode,
303
        senderEmail,
304
        senderId);
305
  }
306

307
  @Override
308
  public String toString() {
309
    return "SignRequest{"
×
310
        + "isDocumentPreparationNeeded='"
311
        + isDocumentPreparationNeeded
312
        + '\''
313
        + ", "
314
        + "redirectUrl='"
315
        + redirectUrl
316
        + '\''
317
        + ", "
318
        + "declinedRedirectUrl='"
319
        + declinedRedirectUrl
320
        + '\''
321
        + ", "
322
        + "areTextSignaturesEnabled='"
323
        + areTextSignaturesEnabled
324
        + '\''
325
        + ", "
326
        + "emailSubject='"
327
        + emailSubject
328
        + '\''
329
        + ", "
330
        + "emailMessage='"
331
        + emailMessage
332
        + '\''
333
        + ", "
334
        + "areRemindersEnabled='"
335
        + areRemindersEnabled
336
        + '\''
337
        + ", "
338
        + "name='"
339
        + name
340
        + '\''
341
        + ", "
342
        + "prefillTags='"
343
        + prefillTags
344
        + '\''
345
        + ", "
346
        + "daysValid='"
347
        + daysValid
348
        + '\''
349
        + ", "
350
        + "externalId='"
351
        + externalId
352
        + '\''
353
        + ", "
354
        + "templateId='"
355
        + templateId
356
        + '\''
357
        + ", "
358
        + "externalSystemName='"
359
        + externalSystemName
360
        + '\''
361
        + ", "
362
        + "requestFlow='"
363
        + requestFlow
364
        + '\''
365
        + ", "
366
        + "type='"
367
        + type
368
        + '\''
369
        + ", "
370
        + "sourceFiles='"
371
        + sourceFiles
372
        + '\''
373
        + ", "
374
        + "signers='"
375
        + signers
376
        + '\''
377
        + ", "
378
        + "signatureColor='"
379
        + signatureColor
380
        + '\''
381
        + ", "
382
        + "id='"
383
        + id
384
        + '\''
385
        + ", "
386
        + "prepareUrl='"
387
        + prepareUrl
388
        + '\''
389
        + ", "
390
        + "signingLog='"
391
        + signingLog
392
        + '\''
393
        + ", "
394
        + "status='"
395
        + status
396
        + '\''
397
        + ", "
398
        + "signFiles='"
399
        + signFiles
400
        + '\''
401
        + ", "
402
        + "autoExpireAt='"
403
        + autoExpireAt
404
        + '\''
405
        + ", "
406
        + "parentFolder='"
407
        + parentFolder
408
        + '\''
409
        + ", "
410
        + "collaboratorLevel='"
411
        + collaboratorLevel
412
        + '\''
413
        + ", "
414
        + "shortId='"
415
        + shortId
416
        + '\''
417
        + ", "
418
        + "createdAt='"
419
        + createdAt
420
        + '\''
421
        + ", "
422
        + "finishedAt='"
423
        + finishedAt
424
        + '\''
425
        + ", "
426
        + "errorCode='"
427
        + errorCode
428
        + '\''
429
        + ", "
430
        + "senderEmail='"
431
        + senderEmail
432
        + '\''
433
        + ", "
434
        + "senderId='"
435
        + senderId
436
        + '\''
437
        + "}";
438
  }
439

440
  public static class Builder extends SignRequestBase.Builder {
×
441

442
    protected EnumWrapper<SignRequestTypeField> type;
443

444
    protected List<FileBase> sourceFiles;
445

446
    protected List<SignRequestSigner> signers;
447

448
    protected String signatureColor;
449

450
    protected String id;
451

452
    protected String prepareUrl;
453

454
    protected FileMini signingLog;
455

456
    protected EnumWrapper<SignRequestStatusField> status;
457

458
    protected SignRequestSignFilesField signFiles;
459

460
    protected OffsetDateTime autoExpireAt;
461

462
    protected FolderMini parentFolder;
463

464
    protected String collaboratorLevel;
465

466
    protected String shortId;
467

468
    protected OffsetDateTime createdAt;
469

470
    protected OffsetDateTime finishedAt;
471

472
    protected String errorCode;
473

474
    protected String senderEmail;
475

476
    protected Long senderId;
477

478
    public Builder type(SignRequestTypeField type) {
479
      this.type = new EnumWrapper<SignRequestTypeField>(type);
×
480
      return this;
×
481
    }
482

483
    public Builder type(EnumWrapper<SignRequestTypeField> type) {
484
      this.type = type;
×
485
      return this;
×
486
    }
487

488
    public Builder sourceFiles(List<FileBase> sourceFiles) {
489
      this.sourceFiles = sourceFiles;
×
490
      return this;
×
491
    }
492

493
    public Builder signers(List<SignRequestSigner> signers) {
494
      this.signers = signers;
×
495
      return this;
×
496
    }
497

498
    public Builder signatureColor(String signatureColor) {
499
      this.signatureColor = signatureColor;
×
500
      this.markNullableFieldAsSet("signature_color");
×
501
      return this;
×
502
    }
503

504
    public Builder id(String id) {
505
      this.id = id;
×
506
      return this;
×
507
    }
508

509
    public Builder prepareUrl(String prepareUrl) {
510
      this.prepareUrl = prepareUrl;
×
511
      this.markNullableFieldAsSet("prepare_url");
×
512
      return this;
×
513
    }
514

515
    public Builder signingLog(FileMini signingLog) {
516
      this.signingLog = signingLog;
×
517
      return this;
×
518
    }
519

520
    public Builder status(SignRequestStatusField status) {
521
      this.status = new EnumWrapper<SignRequestStatusField>(status);
×
522
      return this;
×
523
    }
524

525
    public Builder status(EnumWrapper<SignRequestStatusField> status) {
526
      this.status = status;
×
527
      return this;
×
528
    }
529

530
    public Builder signFiles(SignRequestSignFilesField signFiles) {
531
      this.signFiles = signFiles;
×
532
      return this;
×
533
    }
534

535
    public Builder autoExpireAt(OffsetDateTime autoExpireAt) {
536
      this.autoExpireAt = autoExpireAt;
×
537
      this.markNullableFieldAsSet("auto_expire_at");
×
538
      return this;
×
539
    }
540

541
    public Builder parentFolder(FolderMini parentFolder) {
542
      this.parentFolder = parentFolder;
×
543
      return this;
×
544
    }
545

546
    public Builder collaboratorLevel(String collaboratorLevel) {
547
      this.collaboratorLevel = collaboratorLevel;
×
548
      this.markNullableFieldAsSet("collaborator_level");
×
549
      return this;
×
550
    }
551

552
    public Builder shortId(String shortId) {
553
      this.shortId = shortId;
×
554
      return this;
×
555
    }
556

557
    public Builder createdAt(OffsetDateTime createdAt) {
558
      this.createdAt = createdAt;
×
559
      return this;
×
560
    }
561

562
    public Builder finishedAt(OffsetDateTime finishedAt) {
563
      this.finishedAt = finishedAt;
×
564
      this.markNullableFieldAsSet("finished_at");
×
565
      return this;
×
566
    }
567

568
    public Builder errorCode(String errorCode) {
569
      this.errorCode = errorCode;
×
570
      this.markNullableFieldAsSet("error_code");
×
571
      return this;
×
572
    }
573

574
    public Builder senderEmail(String senderEmail) {
575
      this.senderEmail = senderEmail;
×
576
      this.markNullableFieldAsSet("sender_email");
×
577
      return this;
×
578
    }
579

580
    public Builder senderId(Long senderId) {
581
      this.senderId = senderId;
×
582
      this.markNullableFieldAsSet("sender_id");
×
583
      return this;
×
584
    }
585

586
    @Override
587
    public Builder isDocumentPreparationNeeded(Boolean isDocumentPreparationNeeded) {
588
      this.isDocumentPreparationNeeded = isDocumentPreparationNeeded;
×
589
      return this;
×
590
    }
591

592
    @Override
593
    public Builder redirectUrl(String redirectUrl) {
594
      this.redirectUrl = redirectUrl;
×
595
      this.markNullableFieldAsSet("redirect_url");
×
596
      return this;
×
597
    }
598

599
    @Override
600
    public Builder declinedRedirectUrl(String declinedRedirectUrl) {
601
      this.declinedRedirectUrl = declinedRedirectUrl;
×
602
      this.markNullableFieldAsSet("declined_redirect_url");
×
603
      return this;
×
604
    }
605

606
    @Override
607
    public Builder areTextSignaturesEnabled(Boolean areTextSignaturesEnabled) {
608
      this.areTextSignaturesEnabled = areTextSignaturesEnabled;
×
609
      return this;
×
610
    }
611

612
    @Override
613
    public Builder emailSubject(String emailSubject) {
614
      this.emailSubject = emailSubject;
×
615
      this.markNullableFieldAsSet("email_subject");
×
616
      return this;
×
617
    }
618

619
    @Override
620
    public Builder emailMessage(String emailMessage) {
621
      this.emailMessage = emailMessage;
×
622
      this.markNullableFieldAsSet("email_message");
×
623
      return this;
×
624
    }
625

626
    @Override
627
    public Builder areRemindersEnabled(Boolean areRemindersEnabled) {
628
      this.areRemindersEnabled = areRemindersEnabled;
×
629
      return this;
×
630
    }
631

632
    @Override
633
    public Builder name(String name) {
634
      this.name = name;
×
635
      return this;
×
636
    }
637

638
    @Override
639
    public Builder prefillTags(List<SignRequestPrefillTag> prefillTags) {
640
      this.prefillTags = prefillTags;
×
641
      return this;
×
642
    }
643

644
    @Override
645
    public Builder daysValid(Long daysValid) {
646
      this.daysValid = daysValid;
×
647
      this.markNullableFieldAsSet("days_valid");
×
648
      return this;
×
649
    }
650

651
    @Override
652
    public Builder externalId(String externalId) {
653
      this.externalId = externalId;
×
654
      this.markNullableFieldAsSet("external_id");
×
655
      return this;
×
656
    }
657

658
    @Override
659
    public Builder templateId(String templateId) {
660
      this.templateId = templateId;
×
661
      this.markNullableFieldAsSet("template_id");
×
662
      return this;
×
663
    }
664

665
    @Override
666
    public Builder externalSystemName(String externalSystemName) {
667
      this.externalSystemName = externalSystemName;
×
668
      this.markNullableFieldAsSet("external_system_name");
×
669
      return this;
×
670
    }
671

672
    @Override
673
    public Builder requestFlow(String requestFlow) {
NEW
674
      this.requestFlow = requestFlow;
×
NEW
675
      this.markNullableFieldAsSet("request_flow");
×
NEW
676
      return this;
×
677
    }
678

679
    public SignRequest build() {
680
      return new SignRequest(this);
×
681
    }
682
  }
683
}
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