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

box / box-java-sdk-gen / #294

24 Jun 2025 01:20PM UTC coverage: 35.662% (+0.03%) from 35.632%
#294

Pull #347

github

web-flow
Merge 2c100d09c into d8480ee6c
Pull Request #347: feat: Add Webhook Validation In Java (box/box-codegen#745)

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

11791 existing lines in 624 files now uncovered.

16939 of 47499 relevant lines covered (35.66%)

0.36 hits per line

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

5.61
/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
@JsonFilter("nullablePropertyFilter")
18
public class SignTemplate extends SerializableObject {
19

20
  @JsonDeserialize(using = SignTemplateTypeField.SignTemplateTypeFieldDeserializer.class)
21
  @JsonSerialize(using = SignTemplateTypeField.SignTemplateTypeFieldSerializer.class)
22
  protected EnumWrapper<SignTemplateTypeField> type;
23

24
  protected String id;
25

26
  @Nullable protected String name;
27

28
  @JsonProperty("email_subject")
29
  @Nullable
30
  protected String emailSubject;
31

32
  @JsonProperty("email_message")
33
  @Nullable
34
  protected String emailMessage;
35

36
  @JsonProperty("days_valid")
37
  @Nullable
38
  protected Long daysValid;
39

40
  @JsonProperty("parent_folder")
41
  protected FolderMini parentFolder;
42

43
  @JsonProperty("source_files")
44
  protected List<FileMini> sourceFiles;
45

46
  @JsonProperty("are_fields_locked")
47
  protected Boolean areFieldsLocked;
48

49
  @JsonProperty("are_options_locked")
50
  protected Boolean areOptionsLocked;
51

52
  @JsonProperty("are_recipients_locked")
53
  protected Boolean areRecipientsLocked;
54

55
  @JsonProperty("are_email_settings_locked")
56
  protected Boolean areEmailSettingsLocked;
57

58
  @JsonProperty("are_files_locked")
59
  protected Boolean areFilesLocked;
60

61
  protected List<TemplateSigner> signers;
62

63
  @JsonProperty("additional_info")
64
  protected SignTemplateAdditionalInfoField additionalInfo;
65

66
  @JsonProperty("ready_sign_link")
67
  @Nullable
68
  protected SignTemplateReadySignLinkField readySignLink;
69

70
  @JsonProperty("custom_branding")
71
  @Nullable
72
  protected SignTemplateCustomBrandingField customBranding;
73

74
  public SignTemplate() {
75
    super();
1✔
76
  }
1✔
77

78
  protected SignTemplate(Builder builder) {
79
    super();
×
80
    this.type = builder.type;
×
81
    this.id = builder.id;
×
82
    this.name = builder.name;
×
83
    this.emailSubject = builder.emailSubject;
×
84
    this.emailMessage = builder.emailMessage;
×
85
    this.daysValid = builder.daysValid;
×
86
    this.parentFolder = builder.parentFolder;
×
87
    this.sourceFiles = builder.sourceFiles;
×
88
    this.areFieldsLocked = builder.areFieldsLocked;
×
UNCOV
89
    this.areOptionsLocked = builder.areOptionsLocked;
×
UNCOV
90
    this.areRecipientsLocked = builder.areRecipientsLocked;
×
91
    this.areEmailSettingsLocked = builder.areEmailSettingsLocked;
×
UNCOV
92
    this.areFilesLocked = builder.areFilesLocked;
×
UNCOV
93
    this.signers = builder.signers;
×
UNCOV
94
    this.additionalInfo = builder.additionalInfo;
×
UNCOV
95
    this.readySignLink = builder.readySignLink;
×
UNCOV
96
    this.customBranding = builder.customBranding;
×
UNCOV
97
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
UNCOV
98
  }
×
99

100
  public EnumWrapper<SignTemplateTypeField> getType() {
UNCOV
101
    return type;
×
102
  }
103

104
  public String getId() {
105
    return id;
1✔
106
  }
107

108
  public String getName() {
109
    return name;
1✔
110
  }
111

112
  public String getEmailSubject() {
UNCOV
113
    return emailSubject;
×
114
  }
115

116
  public String getEmailMessage() {
UNCOV
117
    return emailMessage;
×
118
  }
119

120
  public Long getDaysValid() {
UNCOV
121
    return daysValid;
×
122
  }
123

124
  public FolderMini getParentFolder() {
125
    return parentFolder;
1✔
126
  }
127

128
  public List<FileMini> getSourceFiles() {
129
    return sourceFiles;
1✔
130
  }
131

132
  public Boolean getAreFieldsLocked() {
UNCOV
133
    return areFieldsLocked;
×
134
  }
135

136
  public Boolean getAreOptionsLocked() {
UNCOV
137
    return areOptionsLocked;
×
138
  }
139

140
  public Boolean getAreRecipientsLocked() {
UNCOV
141
    return areRecipientsLocked;
×
142
  }
143

144
  public Boolean getAreEmailSettingsLocked() {
UNCOV
145
    return areEmailSettingsLocked;
×
146
  }
147

148
  public Boolean getAreFilesLocked() {
UNCOV
149
    return areFilesLocked;
×
150
  }
151

152
  public List<TemplateSigner> getSigners() {
UNCOV
153
    return signers;
×
154
  }
155

156
  public SignTemplateAdditionalInfoField getAdditionalInfo() {
UNCOV
157
    return additionalInfo;
×
158
  }
159

160
  public SignTemplateReadySignLinkField getReadySignLink() {
161
    return readySignLink;
×
162
  }
163

164
  public SignTemplateCustomBrandingField getCustomBranding() {
UNCOV
165
    return customBranding;
×
166
  }
167

168
  @Override
169
  public boolean equals(Object o) {
170
    if (this == o) {
×
171
      return true;
×
172
    }
173
    if (o == null || getClass() != o.getClass()) {
×
174
      return false;
×
175
    }
176
    SignTemplate casted = (SignTemplate) o;
×
177
    return Objects.equals(type, casted.type)
×
178
        && Objects.equals(id, casted.id)
×
179
        && Objects.equals(name, casted.name)
×
180
        && Objects.equals(emailSubject, casted.emailSubject)
×
181
        && Objects.equals(emailMessage, casted.emailMessage)
×
182
        && Objects.equals(daysValid, casted.daysValid)
×
183
        && Objects.equals(parentFolder, casted.parentFolder)
×
UNCOV
184
        && Objects.equals(sourceFiles, casted.sourceFiles)
×
UNCOV
185
        && Objects.equals(areFieldsLocked, casted.areFieldsLocked)
×
UNCOV
186
        && Objects.equals(areOptionsLocked, casted.areOptionsLocked)
×
UNCOV
187
        && Objects.equals(areRecipientsLocked, casted.areRecipientsLocked)
×
188
        && Objects.equals(areEmailSettingsLocked, casted.areEmailSettingsLocked)
×
UNCOV
189
        && Objects.equals(areFilesLocked, casted.areFilesLocked)
×
UNCOV
190
        && Objects.equals(signers, casted.signers)
×
UNCOV
191
        && Objects.equals(additionalInfo, casted.additionalInfo)
×
UNCOV
192
        && Objects.equals(readySignLink, casted.readySignLink)
×
UNCOV
193
        && Objects.equals(customBranding, casted.customBranding);
×
194
  }
195

196
  @Override
197
  public int hashCode() {
UNCOV
198
    return Objects.hash(
×
199
        type,
200
        id,
201
        name,
202
        emailSubject,
203
        emailMessage,
204
        daysValid,
205
        parentFolder,
206
        sourceFiles,
207
        areFieldsLocked,
208
        areOptionsLocked,
209
        areRecipientsLocked,
210
        areEmailSettingsLocked,
211
        areFilesLocked,
212
        signers,
213
        additionalInfo,
214
        readySignLink,
215
        customBranding);
216
  }
217

218
  @Override
219
  public String toString() {
UNCOV
220
    return "SignTemplate{"
×
221
        + "type='"
222
        + type
223
        + '\''
224
        + ", "
225
        + "id='"
226
        + id
227
        + '\''
228
        + ", "
229
        + "name='"
230
        + name
231
        + '\''
232
        + ", "
233
        + "emailSubject='"
234
        + emailSubject
235
        + '\''
236
        + ", "
237
        + "emailMessage='"
238
        + emailMessage
239
        + '\''
240
        + ", "
241
        + "daysValid='"
242
        + daysValid
243
        + '\''
244
        + ", "
245
        + "parentFolder='"
246
        + parentFolder
247
        + '\''
248
        + ", "
249
        + "sourceFiles='"
250
        + sourceFiles
251
        + '\''
252
        + ", "
253
        + "areFieldsLocked='"
254
        + areFieldsLocked
255
        + '\''
256
        + ", "
257
        + "areOptionsLocked='"
258
        + areOptionsLocked
259
        + '\''
260
        + ", "
261
        + "areRecipientsLocked='"
262
        + areRecipientsLocked
263
        + '\''
264
        + ", "
265
        + "areEmailSettingsLocked='"
266
        + areEmailSettingsLocked
267
        + '\''
268
        + ", "
269
        + "areFilesLocked='"
270
        + areFilesLocked
271
        + '\''
272
        + ", "
273
        + "signers='"
274
        + signers
275
        + '\''
276
        + ", "
277
        + "additionalInfo='"
278
        + additionalInfo
279
        + '\''
280
        + ", "
281
        + "readySignLink='"
282
        + readySignLink
283
        + '\''
284
        + ", "
285
        + "customBranding='"
286
        + customBranding
287
        + '\''
288
        + "}";
289
  }
290

UNCOV
291
  public static class Builder extends NullableFieldTracker {
×
292

293
    protected EnumWrapper<SignTemplateTypeField> type;
294

295
    protected String id;
296

297
    protected String name;
298

299
    protected String emailSubject;
300

301
    protected String emailMessage;
302

303
    protected Long daysValid;
304

305
    protected FolderMini parentFolder;
306

307
    protected List<FileMini> sourceFiles;
308

309
    protected Boolean areFieldsLocked;
310

311
    protected Boolean areOptionsLocked;
312

313
    protected Boolean areRecipientsLocked;
314

315
    protected Boolean areEmailSettingsLocked;
316

317
    protected Boolean areFilesLocked;
318

319
    protected List<TemplateSigner> signers;
320

321
    protected SignTemplateAdditionalInfoField additionalInfo;
322

323
    protected SignTemplateReadySignLinkField readySignLink;
324

325
    protected SignTemplateCustomBrandingField customBranding;
326

327
    public Builder type(SignTemplateTypeField type) {
328
      this.type = new EnumWrapper<SignTemplateTypeField>(type);
×
329
      return this;
×
330
    }
331

332
    public Builder type(EnumWrapper<SignTemplateTypeField> type) {
333
      this.type = type;
×
334
      return this;
×
335
    }
336

337
    public Builder id(String id) {
338
      this.id = id;
×
339
      return this;
×
340
    }
341

342
    public Builder name(String name) {
343
      this.name = name;
×
344
      this.markNullableFieldAsSet("name");
×
UNCOV
345
      return this;
×
346
    }
347

348
    public Builder emailSubject(String emailSubject) {
349
      this.emailSubject = emailSubject;
×
UNCOV
350
      this.markNullableFieldAsSet("email_subject");
×
UNCOV
351
      return this;
×
352
    }
353

354
    public Builder emailMessage(String emailMessage) {
UNCOV
355
      this.emailMessage = emailMessage;
×
UNCOV
356
      this.markNullableFieldAsSet("email_message");
×
UNCOV
357
      return this;
×
358
    }
359

360
    public Builder daysValid(Long daysValid) {
UNCOV
361
      this.daysValid = daysValid;
×
UNCOV
362
      this.markNullableFieldAsSet("days_valid");
×
363
      return this;
×
364
    }
365

366
    public Builder parentFolder(FolderMini parentFolder) {
UNCOV
367
      this.parentFolder = parentFolder;
×
368
      return this;
×
369
    }
370

371
    public Builder sourceFiles(List<FileMini> sourceFiles) {
UNCOV
372
      this.sourceFiles = sourceFiles;
×
373
      return this;
×
374
    }
375

376
    public Builder areFieldsLocked(Boolean areFieldsLocked) {
UNCOV
377
      this.areFieldsLocked = areFieldsLocked;
×
378
      return this;
×
379
    }
380

381
    public Builder areOptionsLocked(Boolean areOptionsLocked) {
UNCOV
382
      this.areOptionsLocked = areOptionsLocked;
×
383
      return this;
×
384
    }
385

386
    public Builder areRecipientsLocked(Boolean areRecipientsLocked) {
UNCOV
387
      this.areRecipientsLocked = areRecipientsLocked;
×
388
      return this;
×
389
    }
390

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

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

401
    public Builder signers(List<TemplateSigner> signers) {
UNCOV
402
      this.signers = signers;
×
403
      return this;
×
404
    }
405

406
    public Builder additionalInfo(SignTemplateAdditionalInfoField additionalInfo) {
UNCOV
407
      this.additionalInfo = additionalInfo;
×
408
      return this;
×
409
    }
410

411
    public Builder readySignLink(SignTemplateReadySignLinkField readySignLink) {
UNCOV
412
      this.readySignLink = readySignLink;
×
UNCOV
413
      this.markNullableFieldAsSet("ready_sign_link");
×
UNCOV
414
      return this;
×
415
    }
416

417
    public Builder customBranding(SignTemplateCustomBrandingField customBranding) {
UNCOV
418
      this.customBranding = customBranding;
×
UNCOV
419
      this.markNullableFieldAsSet("custom_branding");
×
UNCOV
420
      return this;
×
421
    }
422

423
    public SignTemplate build() {
UNCOV
424
      return new SignTemplate(this);
×
425
    }
426
  }
427
}
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