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

box / box-java-sdk / #7215

10 Jun 2026 01:32PM UTC coverage: 12.425% (-0.04%) from 12.469%
#7215

Pull #1882

github

web-flow
Merge b738555d5 into 4554701c0
Pull Request #1882: feat(boxsdkgen): Add new parameters to ai extract structured method (box/box-openapi#604)

0 of 237 new or added lines in 11 files covered. (0.0%)

73 existing lines in 1 file now uncovered.

8374 of 67394 relevant lines covered (12.43%)

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;
×
UNCOV
145
    this.collaboratorLevel = builder.collaboratorLevel;
×
UNCOV
146
    this.shortId = builder.shortId;
×
147
    this.createdAt = builder.createdAt;
×
UNCOV
148
    this.finishedAt = builder.finishedAt;
×
NEW
UNCOV
149
    this.errorCode = builder.errorCode;
×
UNCOV
150
    this.senderEmail = builder.senderEmail;
×
151
    this.senderId = builder.senderId;
×
UNCOV
152
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
UNCOV
153
  }
×
154

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

215
  public String getErrorCode() {
NEW
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)
×
249
        && Objects.equals(type, casted.type)
×
250
        && Objects.equals(sourceFiles, casted.sourceFiles)
×
251
        && Objects.equals(signers, casted.signers)
×
252
        && Objects.equals(signatureColor, casted.signatureColor)
×
UNCOV
253
        && Objects.equals(id, casted.id)
×
UNCOV
254
        && Objects.equals(prepareUrl, casted.prepareUrl)
×
UNCOV
255
        && Objects.equals(signingLog, casted.signingLog)
×
UNCOV
256
        && Objects.equals(status, casted.status)
×
257
        && Objects.equals(signFiles, casted.signFiles)
×
UNCOV
258
        && Objects.equals(autoExpireAt, casted.autoExpireAt)
×
UNCOV
259
        && Objects.equals(parentFolder, casted.parentFolder)
×
UNCOV
260
        && Objects.equals(collaboratorLevel, casted.collaboratorLevel)
×
UNCOV
261
        && Objects.equals(shortId, casted.shortId)
×
UNCOV
262
        && Objects.equals(createdAt, casted.createdAt)
×
UNCOV
263
        && Objects.equals(finishedAt, casted.finishedAt)
×
NEW
UNCOV
264
        && Objects.equals(errorCode, casted.errorCode)
×
UNCOV
265
        && Objects.equals(senderEmail, casted.senderEmail)
×
UNCOV
266
        && Objects.equals(senderId, casted.senderId);
×
267
  }
268

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

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

UNCOV
434
  public static class Builder extends SignRequestBase.Builder {
×
435

436
    protected EnumWrapper<SignRequestTypeField> type;
437

438
    protected List<FileBase> sourceFiles;
439

440
    protected List<SignRequestSigner> signers;
441

442
    protected String signatureColor;
443

444
    protected String id;
445

446
    protected String prepareUrl;
447

448
    protected FileMini signingLog;
449

450
    protected EnumWrapper<SignRequestStatusField> status;
451

452
    protected SignRequestSignFilesField signFiles;
453

454
    protected OffsetDateTime autoExpireAt;
455

456
    protected FolderMini parentFolder;
457

458
    protected String collaboratorLevel;
459

460
    protected String shortId;
461

462
    protected OffsetDateTime createdAt;
463

464
    protected OffsetDateTime finishedAt;
465

466
    protected String errorCode;
467

468
    protected String senderEmail;
469

470
    protected Long senderId;
471

472
    public Builder type(SignRequestTypeField type) {
473
      this.type = new EnumWrapper<SignRequestTypeField>(type);
×
474
      return this;
×
475
    }
476

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

482
    public Builder sourceFiles(List<FileBase> sourceFiles) {
483
      this.sourceFiles = sourceFiles;
×
484
      return this;
×
485
    }
486

487
    public Builder signers(List<SignRequestSigner> signers) {
UNCOV
488
      this.signers = signers;
×
489
      return this;
×
490
    }
491

492
    public Builder signatureColor(String signatureColor) {
UNCOV
493
      this.signatureColor = signatureColor;
×
494
      this.markNullableFieldAsSet("signature_color");
×
495
      return this;
×
496
    }
497

498
    public Builder id(String id) {
499
      this.id = id;
×
500
      return this;
×
501
    }
502

503
    public Builder prepareUrl(String prepareUrl) {
504
      this.prepareUrl = prepareUrl;
×
505
      this.markNullableFieldAsSet("prepare_url");
×
UNCOV
506
      return this;
×
507
    }
508

509
    public Builder signingLog(FileMini signingLog) {
510
      this.signingLog = signingLog;
×
511
      return this;
×
512
    }
513

514
    public Builder status(SignRequestStatusField status) {
515
      this.status = new EnumWrapper<SignRequestStatusField>(status);
×
516
      return this;
×
517
    }
518

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

524
    public Builder signFiles(SignRequestSignFilesField signFiles) {
UNCOV
525
      this.signFiles = signFiles;
×
526
      return this;
×
527
    }
528

529
    public Builder autoExpireAt(OffsetDateTime autoExpireAt) {
UNCOV
530
      this.autoExpireAt = autoExpireAt;
×
531
      this.markNullableFieldAsSet("auto_expire_at");
×
532
      return this;
×
533
    }
534

535
    public Builder parentFolder(FolderMini parentFolder) {
536
      this.parentFolder = parentFolder;
×
537
      return this;
×
538
    }
539

540
    public Builder collaboratorLevel(String collaboratorLevel) {
UNCOV
541
      this.collaboratorLevel = collaboratorLevel;
×
542
      this.markNullableFieldAsSet("collaborator_level");
×
543
      return this;
×
544
    }
545

546
    public Builder shortId(String shortId) {
UNCOV
547
      this.shortId = shortId;
×
548
      return this;
×
549
    }
550

551
    public Builder createdAt(OffsetDateTime createdAt) {
UNCOV
552
      this.createdAt = createdAt;
×
UNCOV
553
      return this;
×
554
    }
555

556
    public Builder finishedAt(OffsetDateTime finishedAt) {
UNCOV
557
      this.finishedAt = finishedAt;
×
UNCOV
558
      this.markNullableFieldAsSet("finished_at");
×
UNCOV
559
      return this;
×
560
    }
561

562
    public Builder errorCode(String errorCode) {
NEW
563
      this.errorCode = errorCode;
×
NEW
UNCOV
564
      this.markNullableFieldAsSet("error_code");
×
NEW
UNCOV
565
      return this;
×
566
    }
567

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

574
    public Builder senderId(Long senderId) {
575
      this.senderId = senderId;
×
576
      this.markNullableFieldAsSet("sender_id");
×
UNCOV
577
      return this;
×
578
    }
579

580
    @Override
581
    public Builder isDocumentPreparationNeeded(Boolean isDocumentPreparationNeeded) {
582
      this.isDocumentPreparationNeeded = isDocumentPreparationNeeded;
×
583
      return this;
×
584
    }
585

586
    @Override
587
    public Builder redirectUrl(String redirectUrl) {
588
      this.redirectUrl = redirectUrl;
×
589
      this.markNullableFieldAsSet("redirect_url");
×
590
      return this;
×
591
    }
592

593
    @Override
594
    public Builder declinedRedirectUrl(String declinedRedirectUrl) {
595
      this.declinedRedirectUrl = declinedRedirectUrl;
×
596
      this.markNullableFieldAsSet("declined_redirect_url");
×
UNCOV
597
      return this;
×
598
    }
599

600
    @Override
601
    public Builder areTextSignaturesEnabled(Boolean areTextSignaturesEnabled) {
602
      this.areTextSignaturesEnabled = areTextSignaturesEnabled;
×
UNCOV
603
      return this;
×
604
    }
605

606
    @Override
607
    public Builder emailSubject(String emailSubject) {
608
      this.emailSubject = emailSubject;
×
UNCOV
609
      this.markNullableFieldAsSet("email_subject");
×
UNCOV
610
      return this;
×
611
    }
612

613
    @Override
614
    public Builder emailMessage(String emailMessage) {
615
      this.emailMessage = emailMessage;
×
UNCOV
616
      this.markNullableFieldAsSet("email_message");
×
UNCOV
617
      return this;
×
618
    }
619

620
    @Override
621
    public Builder areRemindersEnabled(Boolean areRemindersEnabled) {
622
      this.areRemindersEnabled = areRemindersEnabled;
×
UNCOV
623
      return this;
×
624
    }
625

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

632
    @Override
633
    public Builder prefillTags(List<SignRequestPrefillTag> prefillTags) {
634
      this.prefillTags = prefillTags;
×
635
      return this;
×
636
    }
637

638
    @Override
639
    public Builder daysValid(Long daysValid) {
640
      this.daysValid = daysValid;
×
UNCOV
641
      this.markNullableFieldAsSet("days_valid");
×
UNCOV
642
      return this;
×
643
    }
644

645
    @Override
646
    public Builder externalId(String externalId) {
UNCOV
647
      this.externalId = externalId;
×
UNCOV
648
      this.markNullableFieldAsSet("external_id");
×
UNCOV
649
      return this;
×
650
    }
651

652
    @Override
653
    public Builder templateId(String templateId) {
UNCOV
654
      this.templateId = templateId;
×
UNCOV
655
      this.markNullableFieldAsSet("template_id");
×
UNCOV
656
      return this;
×
657
    }
658

659
    @Override
660
    public Builder externalSystemName(String externalSystemName) {
UNCOV
661
      this.externalSystemName = externalSystemName;
×
UNCOV
662
      this.markNullableFieldAsSet("external_system_name");
×
UNCOV
663
      return this;
×
664
    }
665

666
    public SignRequest build() {
UNCOV
667
      return new SignRequest(this);
×
668
    }
669
  }
670
}
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