• 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/signtemplate/SignTemplate.java
1
package com.box.sdkgen.schemas.signtemplate;
2

3
import com.box.sdkgen.internal.Nullable;
4
import com.box.sdkgen.internal.NullableFieldTracker;
5
import com.box.sdkgen.internal.SerializableObject;
6
import com.box.sdkgen.schemas.filemini.FileMini;
7
import com.box.sdkgen.schemas.foldermini.FolderMini;
8
import com.box.sdkgen.schemas.templatesigner.TemplateSigner;
9
import com.box.sdkgen.serialization.json.EnumWrapper;
10
import com.fasterxml.jackson.annotation.JsonFilter;
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.List;
15
import java.util.Objects;
16

17
/** A Box Sign template object. */
18
@JsonFilter("nullablePropertyFilter")
19
public class SignTemplate extends SerializableObject {
20

21
  /** The value will always be `sign-template`. */
22
  @JsonDeserialize(using = SignTemplateTypeField.SignTemplateTypeFieldDeserializer.class)
23
  @JsonSerialize(using = SignTemplateTypeField.SignTemplateTypeFieldSerializer.class)
24
  protected EnumWrapper<SignTemplateTypeField> type;
25

26
  /** Template identifier. */
27
  protected String id;
28

29
  /** The name of the template. */
30
  @Nullable protected String name;
31

32
  /**
33
   * Subject of signature request email. This is cleaned by sign request. If this field is not
34
   * passed, a default subject will be used.
35
   */
36
  @JsonProperty("email_subject")
37
  @Nullable
38
  protected String emailSubject;
39

40
  /**
41
   * Message to include in signature request email. The field is cleaned through sanitization of
42
   * specific characters. However, some html tags are allowed. Links included in the message are
43
   * also converted to hyperlinks in the email. The message may contain the following html tags
44
   * including `a`, `abbr`, `acronym`, `b`, `blockquote`, `code`, `em`, `i`, `ul`, `li`, `ol`, and
45
   * `strong`. Be aware that when the text to html ratio is too high, the email may end up in spam
46
   * filters. Custom styles on these tags are not allowed. If this field is not passed, a default
47
   * message will be used.
48
   */
49
  @JsonProperty("email_message")
50
  @Nullable
51
  protected String emailMessage;
52

53
  /**
54
   * Set the number of days after which the created signature request will automatically expire if
55
   * not completed. By default, we do not apply any expiration date on signature requests, and the
56
   * signature request does not expire.
57
   */
58
  @JsonProperty("days_valid")
59
  @Nullable
60
  protected Long daysValid;
61

62
  @JsonProperty("parent_folder")
63
  protected FolderMini parentFolder;
64

65
  /**
66
   * List of files to create a signing document from. Only the ID and type fields are required for
67
   * each file.
68
   */
69
  @JsonProperty("source_files")
70
  protected List<FileMini> sourceFiles;
71

72
  /** Indicates if the template input fields are editable or not. */
73
  @JsonProperty("are_fields_locked")
74
  protected Boolean areFieldsLocked;
75

76
  /**
77
   * Indicates if the template document options are editable or not, for example renaming the
78
   * document.
79
   */
80
  @JsonProperty("are_options_locked")
81
  protected Boolean areOptionsLocked;
82

83
  /** Indicates if the template signers are editable or not. */
84
  @JsonProperty("are_recipients_locked")
85
  protected Boolean areRecipientsLocked;
86

87
  /** Indicates if the template email settings are editable or not. */
88
  @JsonProperty("are_email_settings_locked")
89
  protected Boolean areEmailSettingsLocked;
90

91
  /**
92
   * Indicates if the template files are editable or not. This includes deleting or renaming
93
   * template files.
94
   */
95
  @JsonProperty("are_files_locked")
96
  protected Boolean areFilesLocked;
97

98
  /**
99
   * Array of signers for the template.
100
   *
101
   * <p>**Note**: It may happen that some signers specified in the template belong to conflicting
102
   * [segments](https://developer.box.com/reference/resources/shield-information-barrier-segment-member)
103
   * (user groups). This means that due to the security policies, users are assigned to segments to
104
   * prevent exchanges or communication that could lead to ethical conflicts. In such a case, an
105
   * attempt to send a sign request based on a template that lists signers in conflicting segments
106
   * will result in an error.
107
   *
108
   * <p>Read more about [segments and ethical
109
   * walls](https://support.box.com/hc/en-us/articles/9920431507603-Understanding-Information-Barriers#h_01GFVJEHQA06N7XEZ4GCZ9GFAQ).
110
   */
111
  protected List<TemplateSigner> signers;
112

113
  /** Additional information on which fields are required and which fields are not editable. */
114
  @JsonProperty("additional_info")
115
  protected SignTemplateAdditionalInfoField additionalInfo;
116

117
  /**
118
   * Box's ready-sign link feature enables you to create a link to a signature request that you've
119
   * created from a template. Use this link when you want to post a signature request on a public
120
   * form — such as an email, social media post, or web page — without knowing who the signers will
121
   * be. Note: The ready-sign link feature is limited to Enterprise Plus customers and not available
122
   * to Box Verified Enterprises.
123
   */
124
  @JsonProperty("ready_sign_link")
125
  @Nullable
126
  protected SignTemplateReadySignLinkField readySignLink;
127

128
  /** Custom branding applied to notifications and signature requests. */
129
  @JsonProperty("custom_branding")
130
  @Nullable
131
  protected SignTemplateCustomBrandingField customBranding;
132

133
  /**
134
   * The sign flow of sign requests created from the template. Values can include `standard` or
135
   * `cfr11`.
136
   */
137
  @JsonProperty("request_flow")
138
  @Nullable
139
  protected String requestFlow;
140

141
  public SignTemplate() {
142
    super();
×
143
  }
×
144

145
  protected SignTemplate(Builder builder) {
146
    super();
×
147
    this.type = builder.type;
×
148
    this.id = builder.id;
×
149
    this.name = builder.name;
×
150
    this.emailSubject = builder.emailSubject;
×
151
    this.emailMessage = builder.emailMessage;
×
152
    this.daysValid = builder.daysValid;
×
153
    this.parentFolder = builder.parentFolder;
×
154
    this.sourceFiles = builder.sourceFiles;
×
155
    this.areFieldsLocked = builder.areFieldsLocked;
×
156
    this.areOptionsLocked = builder.areOptionsLocked;
×
157
    this.areRecipientsLocked = builder.areRecipientsLocked;
×
158
    this.areEmailSettingsLocked = builder.areEmailSettingsLocked;
×
159
    this.areFilesLocked = builder.areFilesLocked;
×
160
    this.signers = builder.signers;
×
161
    this.additionalInfo = builder.additionalInfo;
×
162
    this.readySignLink = builder.readySignLink;
×
163
    this.customBranding = builder.customBranding;
×
NEW
164
    this.requestFlow = builder.requestFlow;
×
165
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
166
  }
×
167

168
  public EnumWrapper<SignTemplateTypeField> getType() {
169
    return type;
×
170
  }
171

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

176
  public String getName() {
177
    return name;
×
178
  }
179

180
  public String getEmailSubject() {
181
    return emailSubject;
×
182
  }
183

184
  public String getEmailMessage() {
185
    return emailMessage;
×
186
  }
187

188
  public Long getDaysValid() {
189
    return daysValid;
×
190
  }
191

192
  public FolderMini getParentFolder() {
193
    return parentFolder;
×
194
  }
195

196
  public List<FileMini> getSourceFiles() {
197
    return sourceFiles;
×
198
  }
199

200
  public Boolean getAreFieldsLocked() {
201
    return areFieldsLocked;
×
202
  }
203

204
  public Boolean getAreOptionsLocked() {
205
    return areOptionsLocked;
×
206
  }
207

208
  public Boolean getAreRecipientsLocked() {
209
    return areRecipientsLocked;
×
210
  }
211

212
  public Boolean getAreEmailSettingsLocked() {
213
    return areEmailSettingsLocked;
×
214
  }
215

216
  public Boolean getAreFilesLocked() {
217
    return areFilesLocked;
×
218
  }
219

220
  public List<TemplateSigner> getSigners() {
221
    return signers;
×
222
  }
223

224
  public SignTemplateAdditionalInfoField getAdditionalInfo() {
225
    return additionalInfo;
×
226
  }
227

228
  public SignTemplateReadySignLinkField getReadySignLink() {
229
    return readySignLink;
×
230
  }
231

232
  public SignTemplateCustomBrandingField getCustomBranding() {
233
    return customBranding;
×
234
  }
235

236
  public String getRequestFlow() {
NEW
237
    return requestFlow;
×
238
  }
239

240
  @Override
241
  public boolean equals(Object o) {
242
    if (this == o) {
×
243
      return true;
×
244
    }
245
    if (o == null || getClass() != o.getClass()) {
×
246
      return false;
×
247
    }
248
    SignTemplate casted = (SignTemplate) o;
×
249
    return Objects.equals(type, casted.type)
×
250
        && Objects.equals(id, casted.id)
×
251
        && Objects.equals(name, casted.name)
×
252
        && Objects.equals(emailSubject, casted.emailSubject)
×
253
        && Objects.equals(emailMessage, casted.emailMessage)
×
254
        && Objects.equals(daysValid, casted.daysValid)
×
255
        && Objects.equals(parentFolder, casted.parentFolder)
×
256
        && Objects.equals(sourceFiles, casted.sourceFiles)
×
257
        && Objects.equals(areFieldsLocked, casted.areFieldsLocked)
×
258
        && Objects.equals(areOptionsLocked, casted.areOptionsLocked)
×
259
        && Objects.equals(areRecipientsLocked, casted.areRecipientsLocked)
×
260
        && Objects.equals(areEmailSettingsLocked, casted.areEmailSettingsLocked)
×
261
        && Objects.equals(areFilesLocked, casted.areFilesLocked)
×
262
        && Objects.equals(signers, casted.signers)
×
263
        && Objects.equals(additionalInfo, casted.additionalInfo)
×
264
        && Objects.equals(readySignLink, casted.readySignLink)
×
NEW
265
        && Objects.equals(customBranding, casted.customBranding)
×
NEW
266
        && Objects.equals(requestFlow, casted.requestFlow);
×
267
  }
268

269
  @Override
270
  public int hashCode() {
271
    return Objects.hash(
×
272
        type,
273
        id,
274
        name,
275
        emailSubject,
276
        emailMessage,
277
        daysValid,
278
        parentFolder,
279
        sourceFiles,
280
        areFieldsLocked,
281
        areOptionsLocked,
282
        areRecipientsLocked,
283
        areEmailSettingsLocked,
284
        areFilesLocked,
285
        signers,
286
        additionalInfo,
287
        readySignLink,
288
        customBranding,
289
        requestFlow);
290
  }
291

292
  @Override
293
  public String toString() {
294
    return "SignTemplate{"
×
295
        + "type='"
296
        + type
297
        + '\''
298
        + ", "
299
        + "id='"
300
        + id
301
        + '\''
302
        + ", "
303
        + "name='"
304
        + name
305
        + '\''
306
        + ", "
307
        + "emailSubject='"
308
        + emailSubject
309
        + '\''
310
        + ", "
311
        + "emailMessage='"
312
        + emailMessage
313
        + '\''
314
        + ", "
315
        + "daysValid='"
316
        + daysValid
317
        + '\''
318
        + ", "
319
        + "parentFolder='"
320
        + parentFolder
321
        + '\''
322
        + ", "
323
        + "sourceFiles='"
324
        + sourceFiles
325
        + '\''
326
        + ", "
327
        + "areFieldsLocked='"
328
        + areFieldsLocked
329
        + '\''
330
        + ", "
331
        + "areOptionsLocked='"
332
        + areOptionsLocked
333
        + '\''
334
        + ", "
335
        + "areRecipientsLocked='"
336
        + areRecipientsLocked
337
        + '\''
338
        + ", "
339
        + "areEmailSettingsLocked='"
340
        + areEmailSettingsLocked
341
        + '\''
342
        + ", "
343
        + "areFilesLocked='"
344
        + areFilesLocked
345
        + '\''
346
        + ", "
347
        + "signers='"
348
        + signers
349
        + '\''
350
        + ", "
351
        + "additionalInfo='"
352
        + additionalInfo
353
        + '\''
354
        + ", "
355
        + "readySignLink='"
356
        + readySignLink
357
        + '\''
358
        + ", "
359
        + "customBranding='"
360
        + customBranding
361
        + '\''
362
        + ", "
363
        + "requestFlow='"
364
        + requestFlow
365
        + '\''
366
        + "}";
367
  }
368

369
  public static class Builder extends NullableFieldTracker {
×
370

371
    protected EnumWrapper<SignTemplateTypeField> type;
372

373
    protected String id;
374

375
    protected String name;
376

377
    protected String emailSubject;
378

379
    protected String emailMessage;
380

381
    protected Long daysValid;
382

383
    protected FolderMini parentFolder;
384

385
    protected List<FileMini> sourceFiles;
386

387
    protected Boolean areFieldsLocked;
388

389
    protected Boolean areOptionsLocked;
390

391
    protected Boolean areRecipientsLocked;
392

393
    protected Boolean areEmailSettingsLocked;
394

395
    protected Boolean areFilesLocked;
396

397
    protected List<TemplateSigner> signers;
398

399
    protected SignTemplateAdditionalInfoField additionalInfo;
400

401
    protected SignTemplateReadySignLinkField readySignLink;
402

403
    protected SignTemplateCustomBrandingField customBranding;
404

405
    protected String requestFlow;
406

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

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

417
    public Builder id(String id) {
418
      this.id = id;
×
419
      return this;
×
420
    }
421

422
    public Builder name(String name) {
423
      this.name = name;
×
424
      this.markNullableFieldAsSet("name");
×
425
      return this;
×
426
    }
427

428
    public Builder emailSubject(String emailSubject) {
429
      this.emailSubject = emailSubject;
×
430
      this.markNullableFieldAsSet("email_subject");
×
431
      return this;
×
432
    }
433

434
    public Builder emailMessage(String emailMessage) {
435
      this.emailMessage = emailMessage;
×
436
      this.markNullableFieldAsSet("email_message");
×
437
      return this;
×
438
    }
439

440
    public Builder daysValid(Long daysValid) {
441
      this.daysValid = daysValid;
×
442
      this.markNullableFieldAsSet("days_valid");
×
443
      return this;
×
444
    }
445

446
    public Builder parentFolder(FolderMini parentFolder) {
447
      this.parentFolder = parentFolder;
×
448
      return this;
×
449
    }
450

451
    public Builder sourceFiles(List<FileMini> sourceFiles) {
452
      this.sourceFiles = sourceFiles;
×
453
      return this;
×
454
    }
455

456
    public Builder areFieldsLocked(Boolean areFieldsLocked) {
457
      this.areFieldsLocked = areFieldsLocked;
×
458
      return this;
×
459
    }
460

461
    public Builder areOptionsLocked(Boolean areOptionsLocked) {
462
      this.areOptionsLocked = areOptionsLocked;
×
463
      return this;
×
464
    }
465

466
    public Builder areRecipientsLocked(Boolean areRecipientsLocked) {
467
      this.areRecipientsLocked = areRecipientsLocked;
×
468
      return this;
×
469
    }
470

471
    public Builder areEmailSettingsLocked(Boolean areEmailSettingsLocked) {
472
      this.areEmailSettingsLocked = areEmailSettingsLocked;
×
473
      return this;
×
474
    }
475

476
    public Builder areFilesLocked(Boolean areFilesLocked) {
477
      this.areFilesLocked = areFilesLocked;
×
478
      return this;
×
479
    }
480

481
    public Builder signers(List<TemplateSigner> signers) {
482
      this.signers = signers;
×
483
      return this;
×
484
    }
485

486
    public Builder additionalInfo(SignTemplateAdditionalInfoField additionalInfo) {
487
      this.additionalInfo = additionalInfo;
×
488
      return this;
×
489
    }
490

491
    public Builder readySignLink(SignTemplateReadySignLinkField readySignLink) {
492
      this.readySignLink = readySignLink;
×
493
      this.markNullableFieldAsSet("ready_sign_link");
×
494
      return this;
×
495
    }
496

497
    public Builder customBranding(SignTemplateCustomBrandingField customBranding) {
498
      this.customBranding = customBranding;
×
499
      this.markNullableFieldAsSet("custom_branding");
×
500
      return this;
×
501
    }
502

503
    public Builder requestFlow(String requestFlow) {
NEW
504
      this.requestFlow = requestFlow;
×
NEW
505
      this.markNullableFieldAsSet("request_flow");
×
NEW
506
      return this;
×
507
    }
508

509
    public SignTemplate build() {
510
      return new SignTemplate(this);
×
511
    }
512
  }
513
}
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