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

box / box-java-sdk / #5838

16 Dec 2025 01:57PM UTC coverage: 12.903% (-0.4%) from 13.282%
#5838

Pull #1633

github

web-flow
Merge 39eadee31 into af4861f83
Pull Request #1633: feat(boxsdkgen): Treat nullable fields as Optional (box/box-codegen#906)

0 of 1897 new or added lines in 73 files covered. (0.0%)

19 existing lines in 10 files now uncovered.

8374 of 64898 relevant lines covered (12.9%)

0.13 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/templatesignerinput/TemplateSignerInput.java
1
package com.box.sdkgen.schemas.templatesignerinput;
2

3
import com.box.sdkgen.internal.Nullable;
4
import com.box.sdkgen.schemas.signrequestprefilltag.SignRequestPrefillTag;
5
import com.box.sdkgen.schemas.signrequestsignerinputcustomvalidation.SignRequestSignerInputCustomValidation;
6
import com.box.sdkgen.schemas.signrequestsignerinputdateasiavalidation.SignRequestSignerInputDateAsiaValidation;
7
import com.box.sdkgen.schemas.signrequestsignerinputdateeuvalidation.SignRequestSignerInputDateEuValidation;
8
import com.box.sdkgen.schemas.signrequestsignerinputdateisovalidation.SignRequestSignerInputDateIsoValidation;
9
import com.box.sdkgen.schemas.signrequestsignerinputdateusvalidation.SignRequestSignerInputDateUsValidation;
10
import com.box.sdkgen.schemas.signrequestsignerinputemailvalidation.SignRequestSignerInputEmailValidation;
11
import com.box.sdkgen.schemas.signrequestsignerinputnumberwithcommavalidation.SignRequestSignerInputNumberWithCommaValidation;
12
import com.box.sdkgen.schemas.signrequestsignerinputnumberwithperiodvalidation.SignRequestSignerInputNumberWithPeriodValidation;
13
import com.box.sdkgen.schemas.signrequestsignerinputssnvalidation.SignRequestSignerInputSsnValidation;
14
import com.box.sdkgen.schemas.signrequestsignerinputvalidation.SignRequestSignerInputValidation;
15
import com.box.sdkgen.schemas.signrequestsignerinputzip4validation.SignRequestSignerInputZip4Validation;
16
import com.box.sdkgen.schemas.signrequestsignerinputzipvalidation.SignRequestSignerInputZipValidation;
17
import com.box.sdkgen.serialization.json.EnumWrapper;
18
import com.fasterxml.jackson.annotation.JsonFilter;
19
import com.fasterxml.jackson.annotation.JsonProperty;
20
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
21
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
22
import java.time.OffsetDateTime;
23
import java.util.List;
24
import java.util.Objects;
25

26
/** Input created by a Signer on a Template. */
27
@JsonFilter("nullablePropertyFilter")
28
public class TemplateSignerInput extends SignRequestPrefillTag {
29

30
  /** Type of input. */
31
  @JsonDeserialize(
32
      using = TemplateSignerInputTypeField.TemplateSignerInputTypeFieldDeserializer.class)
33
  @JsonSerialize(using = TemplateSignerInputTypeField.TemplateSignerInputTypeFieldSerializer.class)
34
  protected EnumWrapper<TemplateSignerInputTypeField> type;
35

36
  /** Content type of input. */
37
  @JsonDeserialize(
38
      using =
39
          TemplateSignerInputContentTypeField.TemplateSignerInputContentTypeFieldDeserializer.class)
40
  @JsonSerialize(
41
      using =
42
          TemplateSignerInputContentTypeField.TemplateSignerInputContentTypeFieldSerializer.class)
43
  @JsonProperty("content_type")
44
  protected EnumWrapper<TemplateSignerInputContentTypeField> contentType;
45

46
  /** Whether or not the input is required. */
47
  @JsonProperty("is_required")
48
  protected Boolean isRequired;
49

50
  /** Index of page that the input is on. */
51
  @JsonProperty("page_index")
52
  protected final long pageIndex;
53

54
  /** Document identifier. */
55
  @JsonProperty("document_id")
56
  @Nullable
57
  protected String documentId;
58

59
  /**
60
   * When the input is of the type `dropdown` this values will be filled with all the dropdown
61
   * options.
62
   */
63
  @JsonProperty("dropdown_choices")
64
  @Nullable
65
  protected List<String> dropdownChoices;
66

67
  /** When the input is of type `radio` they can be grouped to gather with this identifier. */
68
  @JsonProperty("group_id")
69
  @Nullable
70
  protected String groupId;
71

72
  /** Where the input is located on a page. */
73
  protected TemplateSignerInputCoordinatesField coordinates;
74

75
  /** The size of the input. */
76
  protected TemplateSignerInputDimensionsField dimensions;
77

78
  /** The label field is used especially for text, attachment, radio, and checkbox type inputs. */
79
  @Nullable protected String label;
80

81
  /** Indicates whether this input is read-only (cannot be modified by signers). */
82
  @JsonProperty("read_only")
83
  protected Boolean readOnly;
84

85
  /**
86
   * Specifies the formatting rules that signers must follow for text field inputs. If set, this
87
   * validation is mandatory.
88
   */
89
  protected SignRequestSignerInputValidation validation;
90

91
  public TemplateSignerInput(@JsonProperty("page_index") long pageIndex) {
92
    super();
×
93
    this.pageIndex = pageIndex;
×
94
  }
×
95

96
  protected TemplateSignerInput(Builder builder) {
97
    super(builder);
×
98
    this.type = builder.type;
×
99
    this.contentType = builder.contentType;
×
100
    this.isRequired = builder.isRequired;
×
101
    this.pageIndex = builder.pageIndex;
×
102
    this.documentId = builder.documentId;
×
103
    this.dropdownChoices = builder.dropdownChoices;
×
104
    this.groupId = builder.groupId;
×
105
    this.coordinates = builder.coordinates;
×
106
    this.dimensions = builder.dimensions;
×
107
    this.label = builder.label;
×
108
    this.readOnly = builder.readOnly;
×
NEW
109
    this.validation = builder.validation;
×
110
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
111
  }
×
112

113
  public EnumWrapper<TemplateSignerInputTypeField> getType() {
114
    return type;
×
115
  }
116

117
  public EnumWrapper<TemplateSignerInputContentTypeField> getContentType() {
118
    return contentType;
×
119
  }
120

121
  public Boolean getIsRequired() {
122
    return isRequired;
×
123
  }
124

125
  public long getPageIndex() {
126
    return pageIndex;
×
127
  }
128

129
  public String getDocumentId() {
130
    return documentId;
×
131
  }
132

133
  public List<String> getDropdownChoices() {
134
    return dropdownChoices;
×
135
  }
136

137
  public String getGroupId() {
138
    return groupId;
×
139
  }
140

141
  public TemplateSignerInputCoordinatesField getCoordinates() {
142
    return coordinates;
×
143
  }
144

145
  public TemplateSignerInputDimensionsField getDimensions() {
146
    return dimensions;
×
147
  }
148

149
  public String getLabel() {
150
    return label;
×
151
  }
152

153
  public Boolean getReadOnly() {
154
    return readOnly;
×
155
  }
156

157
  public SignRequestSignerInputValidation getValidation() {
NEW
158
    return validation;
×
159
  }
160

161
  @Override
162
  public boolean equals(Object o) {
163
    if (this == o) {
×
164
      return true;
×
165
    }
166
    if (o == null || getClass() != o.getClass()) {
×
167
      return false;
×
168
    }
169
    TemplateSignerInput casted = (TemplateSignerInput) o;
×
170
    return Objects.equals(documentTagId, casted.documentTagId)
×
171
        && Objects.equals(textValue, casted.textValue)
×
172
        && Objects.equals(checkboxValue, casted.checkboxValue)
×
173
        && Objects.equals(dateValue, casted.dateValue)
×
174
        && Objects.equals(type, casted.type)
×
175
        && Objects.equals(contentType, casted.contentType)
×
176
        && Objects.equals(isRequired, casted.isRequired)
×
177
        && Objects.equals(pageIndex, casted.pageIndex)
×
178
        && Objects.equals(documentId, casted.documentId)
×
179
        && Objects.equals(dropdownChoices, casted.dropdownChoices)
×
180
        && Objects.equals(groupId, casted.groupId)
×
181
        && Objects.equals(coordinates, casted.coordinates)
×
182
        && Objects.equals(dimensions, casted.dimensions)
×
183
        && Objects.equals(label, casted.label)
×
NEW
184
        && Objects.equals(readOnly, casted.readOnly)
×
NEW
185
        && Objects.equals(validation, casted.validation);
×
186
  }
187

188
  @Override
189
  public int hashCode() {
190
    return Objects.hash(
×
191
        documentTagId,
192
        textValue,
193
        checkboxValue,
194
        dateValue,
195
        type,
196
        contentType,
197
        isRequired,
198
        pageIndex,
×
199
        documentId,
200
        dropdownChoices,
201
        groupId,
202
        coordinates,
203
        dimensions,
204
        label,
205
        readOnly,
206
        validation);
207
  }
208

209
  @Override
210
  public String toString() {
211
    return "TemplateSignerInput{"
×
212
        + "documentTagId='"
213
        + documentTagId
214
        + '\''
215
        + ", "
216
        + "textValue='"
217
        + textValue
218
        + '\''
219
        + ", "
220
        + "checkboxValue='"
221
        + checkboxValue
222
        + '\''
223
        + ", "
224
        + "dateValue='"
225
        + dateValue
226
        + '\''
227
        + ", "
228
        + "type='"
229
        + type
230
        + '\''
231
        + ", "
232
        + "contentType='"
233
        + contentType
234
        + '\''
235
        + ", "
236
        + "isRequired='"
237
        + isRequired
238
        + '\''
239
        + ", "
240
        + "pageIndex='"
241
        + pageIndex
242
        + '\''
243
        + ", "
244
        + "documentId='"
245
        + documentId
246
        + '\''
247
        + ", "
248
        + "dropdownChoices='"
249
        + dropdownChoices
250
        + '\''
251
        + ", "
252
        + "groupId='"
253
        + groupId
254
        + '\''
255
        + ", "
256
        + "coordinates='"
257
        + coordinates
258
        + '\''
259
        + ", "
260
        + "dimensions='"
261
        + dimensions
262
        + '\''
263
        + ", "
264
        + "label='"
265
        + label
266
        + '\''
267
        + ", "
268
        + "readOnly='"
269
        + readOnly
270
        + '\''
271
        + ", "
272
        + "validation='"
273
        + validation
274
        + '\''
275
        + "}";
276
  }
277

278
  public static class Builder extends SignRequestPrefillTag.Builder {
279

280
    protected EnumWrapper<TemplateSignerInputTypeField> type;
281

282
    protected EnumWrapper<TemplateSignerInputContentTypeField> contentType;
283

284
    protected Boolean isRequired;
285

286
    protected final long pageIndex;
287

288
    protected String documentId;
289

290
    protected List<String> dropdownChoices;
291

292
    protected String groupId;
293

294
    protected TemplateSignerInputCoordinatesField coordinates;
295

296
    protected TemplateSignerInputDimensionsField dimensions;
297

298
    protected String label;
299

300
    protected Boolean readOnly;
301

302
    protected SignRequestSignerInputValidation validation;
303

304
    public Builder(long pageIndex) {
305
      super();
×
306
      this.pageIndex = pageIndex;
×
307
    }
×
308

309
    public Builder type(TemplateSignerInputTypeField type) {
310
      this.type = new EnumWrapper<TemplateSignerInputTypeField>(type);
×
311
      return this;
×
312
    }
313

314
    public Builder type(EnumWrapper<TemplateSignerInputTypeField> type) {
315
      this.type = type;
×
316
      return this;
×
317
    }
318

319
    public Builder contentType(TemplateSignerInputContentTypeField contentType) {
320
      this.contentType = new EnumWrapper<TemplateSignerInputContentTypeField>(contentType);
×
321
      return this;
×
322
    }
323

324
    public Builder contentType(EnumWrapper<TemplateSignerInputContentTypeField> contentType) {
325
      this.contentType = contentType;
×
326
      return this;
×
327
    }
328

329
    public Builder isRequired(Boolean isRequired) {
330
      this.isRequired = isRequired;
×
331
      return this;
×
332
    }
333

334
    public Builder documentId(String documentId) {
335
      this.documentId = documentId;
×
336
      this.markNullableFieldAsSet("document_id");
×
337
      return this;
×
338
    }
339

340
    public Builder dropdownChoices(List<String> dropdownChoices) {
341
      this.dropdownChoices = dropdownChoices;
×
342
      this.markNullableFieldAsSet("dropdown_choices");
×
343
      return this;
×
344
    }
345

346
    public Builder groupId(String groupId) {
347
      this.groupId = groupId;
×
348
      this.markNullableFieldAsSet("group_id");
×
349
      return this;
×
350
    }
351

352
    public Builder coordinates(TemplateSignerInputCoordinatesField coordinates) {
353
      this.coordinates = coordinates;
×
354
      return this;
×
355
    }
356

357
    public Builder dimensions(TemplateSignerInputDimensionsField dimensions) {
358
      this.dimensions = dimensions;
×
359
      return this;
×
360
    }
361

362
    public Builder label(String label) {
363
      this.label = label;
×
364
      this.markNullableFieldAsSet("label");
×
365
      return this;
×
366
    }
367

368
    public Builder readOnly(Boolean readOnly) {
369
      this.readOnly = readOnly;
×
370
      return this;
×
371
    }
372

373
    public Builder validation(SignRequestSignerInputEmailValidation validation) {
NEW
374
      this.validation = new SignRequestSignerInputValidation(validation);
×
NEW
375
      return this;
×
376
    }
377

378
    public Builder validation(SignRequestSignerInputCustomValidation validation) {
NEW
379
      this.validation = new SignRequestSignerInputValidation(validation);
×
NEW
380
      return this;
×
381
    }
382

383
    public Builder validation(SignRequestSignerInputZipValidation validation) {
NEW
384
      this.validation = new SignRequestSignerInputValidation(validation);
×
NEW
385
      return this;
×
386
    }
387

388
    public Builder validation(SignRequestSignerInputZip4Validation validation) {
NEW
389
      this.validation = new SignRequestSignerInputValidation(validation);
×
NEW
390
      return this;
×
391
    }
392

393
    public Builder validation(SignRequestSignerInputSsnValidation validation) {
NEW
394
      this.validation = new SignRequestSignerInputValidation(validation);
×
NEW
395
      return this;
×
396
    }
397

398
    public Builder validation(SignRequestSignerInputNumberWithPeriodValidation validation) {
NEW
399
      this.validation = new SignRequestSignerInputValidation(validation);
×
NEW
400
      return this;
×
401
    }
402

403
    public Builder validation(SignRequestSignerInputNumberWithCommaValidation validation) {
NEW
404
      this.validation = new SignRequestSignerInputValidation(validation);
×
NEW
405
      return this;
×
406
    }
407

408
    public Builder validation(SignRequestSignerInputDateIsoValidation validation) {
NEW
409
      this.validation = new SignRequestSignerInputValidation(validation);
×
NEW
410
      return this;
×
411
    }
412

413
    public Builder validation(SignRequestSignerInputDateUsValidation validation) {
NEW
414
      this.validation = new SignRequestSignerInputValidation(validation);
×
NEW
415
      return this;
×
416
    }
417

418
    public Builder validation(SignRequestSignerInputDateEuValidation validation) {
NEW
419
      this.validation = new SignRequestSignerInputValidation(validation);
×
NEW
420
      return this;
×
421
    }
422

423
    public Builder validation(SignRequestSignerInputDateAsiaValidation validation) {
NEW
424
      this.validation = new SignRequestSignerInputValidation(validation);
×
NEW
425
      return this;
×
426
    }
427

428
    public Builder validation(SignRequestSignerInputValidation validation) {
NEW
429
      this.validation = validation;
×
NEW
430
      return this;
×
431
    }
432

433
    @Override
434
    public Builder documentTagId(String documentTagId) {
435
      this.documentTagId = documentTagId;
×
436
      this.markNullableFieldAsSet("document_tag_id");
×
437
      return this;
×
438
    }
439

440
    @Override
441
    public Builder textValue(String textValue) {
442
      this.textValue = textValue;
×
443
      this.markNullableFieldAsSet("text_value");
×
444
      return this;
×
445
    }
446

447
    @Override
448
    public Builder checkboxValue(Boolean checkboxValue) {
449
      this.checkboxValue = checkboxValue;
×
450
      this.markNullableFieldAsSet("checkbox_value");
×
451
      return this;
×
452
    }
453

454
    @Override
455
    public Builder dateValue(OffsetDateTime dateValue) {
456
      this.dateValue = dateValue;
×
457
      this.markNullableFieldAsSet("date_value");
×
458
      return this;
×
459
    }
460

461
    public TemplateSignerInput build() {
462
      return new TemplateSignerInput(this);
×
463
    }
464
  }
465
}
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

© 2025 Coveralls, Inc