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

box / box-java-sdk / #5922

17 Dec 2025 05:03PM UTC coverage: 35.498% (-0.4%) from 35.917%
#5922

push

github

web-flow
fix: add taxonomy to Metadata Field (read) definition (box/box-openapi#572) (#1644)

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

2 of 2 new or added lines in 1 file covered. (100.0%)

535 existing lines in 31 files now uncovered.

18926 of 53316 relevant lines covered (35.5%)

0.35 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
  public SignTemplate() {
134
    super();
×
UNCOV
135
  }
×
136

137
  protected SignTemplate(Builder builder) {
138
    super();
×
139
    this.type = builder.type;
×
140
    this.id = builder.id;
×
141
    this.name = builder.name;
×
142
    this.emailSubject = builder.emailSubject;
×
143
    this.emailMessage = builder.emailMessage;
×
144
    this.daysValid = builder.daysValid;
×
145
    this.parentFolder = builder.parentFolder;
×
146
    this.sourceFiles = builder.sourceFiles;
×
147
    this.areFieldsLocked = builder.areFieldsLocked;
×
148
    this.areOptionsLocked = builder.areOptionsLocked;
×
149
    this.areRecipientsLocked = builder.areRecipientsLocked;
×
150
    this.areEmailSettingsLocked = builder.areEmailSettingsLocked;
×
151
    this.areFilesLocked = builder.areFilesLocked;
×
152
    this.signers = builder.signers;
×
153
    this.additionalInfo = builder.additionalInfo;
×
154
    this.readySignLink = builder.readySignLink;
×
155
    this.customBranding = builder.customBranding;
×
156
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
UNCOV
157
  }
×
158

159
  public EnumWrapper<SignTemplateTypeField> getType() {
UNCOV
160
    return type;
×
161
  }
162

163
  public String getId() {
UNCOV
164
    return id;
×
165
  }
166

167
  public String getName() {
UNCOV
168
    return name;
×
169
  }
170

171
  public String getEmailSubject() {
UNCOV
172
    return emailSubject;
×
173
  }
174

175
  public String getEmailMessage() {
UNCOV
176
    return emailMessage;
×
177
  }
178

179
  public Long getDaysValid() {
UNCOV
180
    return daysValid;
×
181
  }
182

183
  public FolderMini getParentFolder() {
UNCOV
184
    return parentFolder;
×
185
  }
186

187
  public List<FileMini> getSourceFiles() {
UNCOV
188
    return sourceFiles;
×
189
  }
190

191
  public Boolean getAreFieldsLocked() {
UNCOV
192
    return areFieldsLocked;
×
193
  }
194

195
  public Boolean getAreOptionsLocked() {
UNCOV
196
    return areOptionsLocked;
×
197
  }
198

199
  public Boolean getAreRecipientsLocked() {
UNCOV
200
    return areRecipientsLocked;
×
201
  }
202

203
  public Boolean getAreEmailSettingsLocked() {
UNCOV
204
    return areEmailSettingsLocked;
×
205
  }
206

207
  public Boolean getAreFilesLocked() {
UNCOV
208
    return areFilesLocked;
×
209
  }
210

211
  public List<TemplateSigner> getSigners() {
UNCOV
212
    return signers;
×
213
  }
214

215
  public SignTemplateAdditionalInfoField getAdditionalInfo() {
UNCOV
216
    return additionalInfo;
×
217
  }
218

219
  public SignTemplateReadySignLinkField getReadySignLink() {
UNCOV
220
    return readySignLink;
×
221
  }
222

223
  public SignTemplateCustomBrandingField getCustomBranding() {
UNCOV
224
    return customBranding;
×
225
  }
226

227
  @Override
228
  public boolean equals(Object o) {
229
    if (this == o) {
×
UNCOV
230
      return true;
×
231
    }
232
    if (o == null || getClass() != o.getClass()) {
×
UNCOV
233
      return false;
×
234
    }
235
    SignTemplate casted = (SignTemplate) o;
×
236
    return Objects.equals(type, casted.type)
×
237
        && Objects.equals(id, casted.id)
×
238
        && Objects.equals(name, casted.name)
×
239
        && Objects.equals(emailSubject, casted.emailSubject)
×
240
        && Objects.equals(emailMessage, casted.emailMessage)
×
241
        && Objects.equals(daysValid, casted.daysValid)
×
242
        && Objects.equals(parentFolder, casted.parentFolder)
×
243
        && Objects.equals(sourceFiles, casted.sourceFiles)
×
244
        && Objects.equals(areFieldsLocked, casted.areFieldsLocked)
×
245
        && Objects.equals(areOptionsLocked, casted.areOptionsLocked)
×
246
        && Objects.equals(areRecipientsLocked, casted.areRecipientsLocked)
×
247
        && Objects.equals(areEmailSettingsLocked, casted.areEmailSettingsLocked)
×
248
        && Objects.equals(areFilesLocked, casted.areFilesLocked)
×
249
        && Objects.equals(signers, casted.signers)
×
250
        && Objects.equals(additionalInfo, casted.additionalInfo)
×
251
        && Objects.equals(readySignLink, casted.readySignLink)
×
UNCOV
252
        && Objects.equals(customBranding, casted.customBranding);
×
253
  }
254

255
  @Override
256
  public int hashCode() {
UNCOV
257
    return Objects.hash(
×
258
        type,
259
        id,
260
        name,
261
        emailSubject,
262
        emailMessage,
263
        daysValid,
264
        parentFolder,
265
        sourceFiles,
266
        areFieldsLocked,
267
        areOptionsLocked,
268
        areRecipientsLocked,
269
        areEmailSettingsLocked,
270
        areFilesLocked,
271
        signers,
272
        additionalInfo,
273
        readySignLink,
274
        customBranding);
275
  }
276

277
  @Override
278
  public String toString() {
UNCOV
279
    return "SignTemplate{"
×
280
        + "type='"
281
        + type
282
        + '\''
283
        + ", "
284
        + "id='"
285
        + id
286
        + '\''
287
        + ", "
288
        + "name='"
289
        + name
290
        + '\''
291
        + ", "
292
        + "emailSubject='"
293
        + emailSubject
294
        + '\''
295
        + ", "
296
        + "emailMessage='"
297
        + emailMessage
298
        + '\''
299
        + ", "
300
        + "daysValid='"
301
        + daysValid
302
        + '\''
303
        + ", "
304
        + "parentFolder='"
305
        + parentFolder
306
        + '\''
307
        + ", "
308
        + "sourceFiles='"
309
        + sourceFiles
310
        + '\''
311
        + ", "
312
        + "areFieldsLocked='"
313
        + areFieldsLocked
314
        + '\''
315
        + ", "
316
        + "areOptionsLocked='"
317
        + areOptionsLocked
318
        + '\''
319
        + ", "
320
        + "areRecipientsLocked='"
321
        + areRecipientsLocked
322
        + '\''
323
        + ", "
324
        + "areEmailSettingsLocked='"
325
        + areEmailSettingsLocked
326
        + '\''
327
        + ", "
328
        + "areFilesLocked='"
329
        + areFilesLocked
330
        + '\''
331
        + ", "
332
        + "signers='"
333
        + signers
334
        + '\''
335
        + ", "
336
        + "additionalInfo='"
337
        + additionalInfo
338
        + '\''
339
        + ", "
340
        + "readySignLink='"
341
        + readySignLink
342
        + '\''
343
        + ", "
344
        + "customBranding='"
345
        + customBranding
346
        + '\''
347
        + "}";
348
  }
349

UNCOV
350
  public static class Builder extends NullableFieldTracker {
×
351

352
    protected EnumWrapper<SignTemplateTypeField> type;
353

354
    protected String id;
355

356
    protected String name;
357

358
    protected String emailSubject;
359

360
    protected String emailMessage;
361

362
    protected Long daysValid;
363

364
    protected FolderMini parentFolder;
365

366
    protected List<FileMini> sourceFiles;
367

368
    protected Boolean areFieldsLocked;
369

370
    protected Boolean areOptionsLocked;
371

372
    protected Boolean areRecipientsLocked;
373

374
    protected Boolean areEmailSettingsLocked;
375

376
    protected Boolean areFilesLocked;
377

378
    protected List<TemplateSigner> signers;
379

380
    protected SignTemplateAdditionalInfoField additionalInfo;
381

382
    protected SignTemplateReadySignLinkField readySignLink;
383

384
    protected SignTemplateCustomBrandingField customBranding;
385

386
    public Builder type(SignTemplateTypeField type) {
387
      this.type = new EnumWrapper<SignTemplateTypeField>(type);
×
UNCOV
388
      return this;
×
389
    }
390

391
    public Builder type(EnumWrapper<SignTemplateTypeField> type) {
392
      this.type = type;
×
UNCOV
393
      return this;
×
394
    }
395

396
    public Builder id(String id) {
397
      this.id = id;
×
UNCOV
398
      return this;
×
399
    }
400

401
    public Builder name(String name) {
402
      this.name = name;
×
403
      this.markNullableFieldAsSet("name");
×
UNCOV
404
      return this;
×
405
    }
406

407
    public Builder emailSubject(String emailSubject) {
408
      this.emailSubject = emailSubject;
×
409
      this.markNullableFieldAsSet("email_subject");
×
UNCOV
410
      return this;
×
411
    }
412

413
    public Builder emailMessage(String emailMessage) {
414
      this.emailMessage = emailMessage;
×
415
      this.markNullableFieldAsSet("email_message");
×
UNCOV
416
      return this;
×
417
    }
418

419
    public Builder daysValid(Long daysValid) {
420
      this.daysValid = daysValid;
×
421
      this.markNullableFieldAsSet("days_valid");
×
UNCOV
422
      return this;
×
423
    }
424

425
    public Builder parentFolder(FolderMini parentFolder) {
426
      this.parentFolder = parentFolder;
×
UNCOV
427
      return this;
×
428
    }
429

430
    public Builder sourceFiles(List<FileMini> sourceFiles) {
431
      this.sourceFiles = sourceFiles;
×
UNCOV
432
      return this;
×
433
    }
434

435
    public Builder areFieldsLocked(Boolean areFieldsLocked) {
436
      this.areFieldsLocked = areFieldsLocked;
×
UNCOV
437
      return this;
×
438
    }
439

440
    public Builder areOptionsLocked(Boolean areOptionsLocked) {
441
      this.areOptionsLocked = areOptionsLocked;
×
UNCOV
442
      return this;
×
443
    }
444

445
    public Builder areRecipientsLocked(Boolean areRecipientsLocked) {
446
      this.areRecipientsLocked = areRecipientsLocked;
×
UNCOV
447
      return this;
×
448
    }
449

450
    public Builder areEmailSettingsLocked(Boolean areEmailSettingsLocked) {
451
      this.areEmailSettingsLocked = areEmailSettingsLocked;
×
UNCOV
452
      return this;
×
453
    }
454

455
    public Builder areFilesLocked(Boolean areFilesLocked) {
456
      this.areFilesLocked = areFilesLocked;
×
UNCOV
457
      return this;
×
458
    }
459

460
    public Builder signers(List<TemplateSigner> signers) {
461
      this.signers = signers;
×
UNCOV
462
      return this;
×
463
    }
464

465
    public Builder additionalInfo(SignTemplateAdditionalInfoField additionalInfo) {
466
      this.additionalInfo = additionalInfo;
×
UNCOV
467
      return this;
×
468
    }
469

470
    public Builder readySignLink(SignTemplateReadySignLinkField readySignLink) {
471
      this.readySignLink = readySignLink;
×
472
      this.markNullableFieldAsSet("ready_sign_link");
×
UNCOV
473
      return this;
×
474
    }
475

476
    public Builder customBranding(SignTemplateCustomBrandingField customBranding) {
477
      this.customBranding = customBranding;
×
478
      this.markNullableFieldAsSet("custom_branding");
×
UNCOV
479
      return this;
×
480
    }
481

482
    public SignTemplate build() {
UNCOV
483
      return new SignTemplate(this);
×
484
    }
485
  }
486
}
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