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

box / box-java-sdk / #5076

07 Oct 2025 12:35PM UTC coverage: 37.132% (+0.007%) from 37.125%
#5076

push

github

web-flow
test: Change `Event.additionalDetails` field assertion in events test (box/box-codegen#858) (#1491)

18454 of 49699 relevant lines covered (37.13%)

0.37 hits per line

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

36.78
/src/main/java/com/box/sdkgen/schemas/signrequestbase/SignRequestBase.java
1
package com.box.sdkgen.schemas.signrequestbase;
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.signrequestprefilltag.SignRequestPrefillTag;
7
import com.fasterxml.jackson.annotation.JsonFilter;
8
import com.fasterxml.jackson.annotation.JsonProperty;
9
import java.util.List;
10
import java.util.Objects;
11

12
/** A standard representation of a signature request object. */
13
@JsonFilter("nullablePropertyFilter")
14
public class SignRequestBase extends SerializableObject {
15

16
  /**
17
   * Indicates if the sender should receive a `prepare_url` in the response to complete document
18
   * preparation using the UI.
19
   */
20
  @JsonProperty("is_document_preparation_needed")
21
  protected Boolean isDocumentPreparationNeeded;
22

23
  /**
24
   * When specified, the signature request will be redirected to this url when a document is signed.
25
   */
26
  @JsonProperty("redirect_url")
27
  @Nullable
28
  protected String redirectUrl;
29

30
  /** The uri that a signer will be redirected to after declining to sign a document. */
31
  @JsonProperty("declined_redirect_url")
32
  @Nullable
33
  protected String declinedRedirectUrl;
34

35
  /** Disables the usage of signatures generated by typing (text). */
36
  @JsonProperty("are_text_signatures_enabled")
37
  protected Boolean areTextSignaturesEnabled;
38

39
  /**
40
   * Subject of sign request email. This is cleaned by sign request. If this field is not passed, a
41
   * default subject will be used.
42
   */
43
  @JsonProperty("email_subject")
44
  @Nullable
45
  protected String emailSubject;
46

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

60
  /**
61
   * Reminds signers to sign a document on day 3, 8, 13 and 18. Reminders are only sent to
62
   * outstanding signers.
63
   */
64
  @JsonProperty("are_reminders_enabled")
65
  protected Boolean areRemindersEnabled;
66

67
  /** Name of the signature request. */
68
  protected String name;
69

70
  /**
71
   * When a document contains sign-related tags in the content, you can prefill them using this
72
   * `prefill_tags` by referencing the 'id' of the tag as the `external_id` field of the prefill
73
   * tag.
74
   */
75
  @JsonProperty("prefill_tags")
76
  protected List<SignRequestPrefillTag> prefillTags;
77

78
  /**
79
   * Set the number of days after which the created signature request will automatically expire if
80
   * not completed. By default, we do not apply any expiration date on signature requests, and the
81
   * signature request does not expire.
82
   */
83
  @JsonProperty("days_valid")
84
  @Nullable
85
  protected Long daysValid;
86

87
  /**
88
   * This can be used to reference an ID in an external system that the sign request is related to.
89
   */
90
  @JsonProperty("external_id")
91
  @Nullable
92
  protected String externalId;
93

94
  /**
95
   * When a signature request is created from a template this field will indicate the id of that
96
   * template.
97
   */
98
  @JsonProperty("template_id")
99
  @Nullable
100
  protected String templateId;
101

102
  /**
103
   * Used as an optional system name to appear in the signature log next to the signers who have
104
   * been assigned the `embed_url_external_id`.
105
   */
106
  @JsonProperty("external_system_name")
107
  @Nullable
108
  protected String externalSystemName;
109

110
  public SignRequestBase() {
111
    super();
1✔
112
  }
1✔
113

114
  protected SignRequestBase(Builder builder) {
115
    super();
1✔
116
    this.isDocumentPreparationNeeded = builder.isDocumentPreparationNeeded;
1✔
117
    this.redirectUrl = builder.redirectUrl;
1✔
118
    this.declinedRedirectUrl = builder.declinedRedirectUrl;
1✔
119
    this.areTextSignaturesEnabled = builder.areTextSignaturesEnabled;
1✔
120
    this.emailSubject = builder.emailSubject;
1✔
121
    this.emailMessage = builder.emailMessage;
1✔
122
    this.areRemindersEnabled = builder.areRemindersEnabled;
1✔
123
    this.name = builder.name;
1✔
124
    this.prefillTags = builder.prefillTags;
1✔
125
    this.daysValid = builder.daysValid;
1✔
126
    this.externalId = builder.externalId;
1✔
127
    this.templateId = builder.templateId;
1✔
128
    this.externalSystemName = builder.externalSystemName;
1✔
129
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
1✔
130
  }
1✔
131

132
  public Boolean getIsDocumentPreparationNeeded() {
133
    return isDocumentPreparationNeeded;
1✔
134
  }
135

136
  public String getRedirectUrl() {
137
    return redirectUrl;
1✔
138
  }
139

140
  public String getDeclinedRedirectUrl() {
141
    return declinedRedirectUrl;
1✔
142
  }
143

144
  public Boolean getAreTextSignaturesEnabled() {
145
    return areTextSignaturesEnabled;
1✔
146
  }
147

148
  public String getEmailSubject() {
149
    return emailSubject;
1✔
150
  }
151

152
  public String getEmailMessage() {
153
    return emailMessage;
1✔
154
  }
155

156
  public Boolean getAreRemindersEnabled() {
157
    return areRemindersEnabled;
1✔
158
  }
159

160
  public String getName() {
161
    return name;
1✔
162
  }
163

164
  public List<SignRequestPrefillTag> getPrefillTags() {
165
    return prefillTags;
1✔
166
  }
167

168
  public Long getDaysValid() {
169
    return daysValid;
1✔
170
  }
171

172
  public String getExternalId() {
173
    return externalId;
1✔
174
  }
175

176
  public String getTemplateId() {
177
    return templateId;
1✔
178
  }
179

180
  public String getExternalSystemName() {
181
    return externalSystemName;
1✔
182
  }
183

184
  @Override
185
  public boolean equals(Object o) {
186
    if (this == o) {
×
187
      return true;
×
188
    }
189
    if (o == null || getClass() != o.getClass()) {
×
190
      return false;
×
191
    }
192
    SignRequestBase casted = (SignRequestBase) o;
×
193
    return Objects.equals(isDocumentPreparationNeeded, casted.isDocumentPreparationNeeded)
×
194
        && Objects.equals(redirectUrl, casted.redirectUrl)
×
195
        && Objects.equals(declinedRedirectUrl, casted.declinedRedirectUrl)
×
196
        && Objects.equals(areTextSignaturesEnabled, casted.areTextSignaturesEnabled)
×
197
        && Objects.equals(emailSubject, casted.emailSubject)
×
198
        && Objects.equals(emailMessage, casted.emailMessage)
×
199
        && Objects.equals(areRemindersEnabled, casted.areRemindersEnabled)
×
200
        && Objects.equals(name, casted.name)
×
201
        && Objects.equals(prefillTags, casted.prefillTags)
×
202
        && Objects.equals(daysValid, casted.daysValid)
×
203
        && Objects.equals(externalId, casted.externalId)
×
204
        && Objects.equals(templateId, casted.templateId)
×
205
        && Objects.equals(externalSystemName, casted.externalSystemName);
×
206
  }
207

208
  @Override
209
  public int hashCode() {
210
    return Objects.hash(
×
211
        isDocumentPreparationNeeded,
212
        redirectUrl,
213
        declinedRedirectUrl,
214
        areTextSignaturesEnabled,
215
        emailSubject,
216
        emailMessage,
217
        areRemindersEnabled,
218
        name,
219
        prefillTags,
220
        daysValid,
221
        externalId,
222
        templateId,
223
        externalSystemName);
224
  }
225

226
  @Override
227
  public String toString() {
228
    return "SignRequestBase{"
×
229
        + "isDocumentPreparationNeeded='"
230
        + isDocumentPreparationNeeded
231
        + '\''
232
        + ", "
233
        + "redirectUrl='"
234
        + redirectUrl
235
        + '\''
236
        + ", "
237
        + "declinedRedirectUrl='"
238
        + declinedRedirectUrl
239
        + '\''
240
        + ", "
241
        + "areTextSignaturesEnabled='"
242
        + areTextSignaturesEnabled
243
        + '\''
244
        + ", "
245
        + "emailSubject='"
246
        + emailSubject
247
        + '\''
248
        + ", "
249
        + "emailMessage='"
250
        + emailMessage
251
        + '\''
252
        + ", "
253
        + "areRemindersEnabled='"
254
        + areRemindersEnabled
255
        + '\''
256
        + ", "
257
        + "name='"
258
        + name
259
        + '\''
260
        + ", "
261
        + "prefillTags='"
262
        + prefillTags
263
        + '\''
264
        + ", "
265
        + "daysValid='"
266
        + daysValid
267
        + '\''
268
        + ", "
269
        + "externalId='"
270
        + externalId
271
        + '\''
272
        + ", "
273
        + "templateId='"
274
        + templateId
275
        + '\''
276
        + ", "
277
        + "externalSystemName='"
278
        + externalSystemName
279
        + '\''
280
        + "}";
281
  }
282

283
  public static class Builder extends NullableFieldTracker {
1✔
284

285
    protected Boolean isDocumentPreparationNeeded;
286

287
    protected String redirectUrl;
288

289
    protected String declinedRedirectUrl;
290

291
    protected Boolean areTextSignaturesEnabled;
292

293
    protected String emailSubject;
294

295
    protected String emailMessage;
296

297
    protected Boolean areRemindersEnabled;
298

299
    protected String name;
300

301
    protected List<SignRequestPrefillTag> prefillTags;
302

303
    protected Long daysValid;
304

305
    protected String externalId;
306

307
    protected String templateId;
308

309
    protected String externalSystemName;
310

311
    public Builder isDocumentPreparationNeeded(Boolean isDocumentPreparationNeeded) {
312
      this.isDocumentPreparationNeeded = isDocumentPreparationNeeded;
×
313
      return this;
×
314
    }
315

316
    public Builder redirectUrl(String redirectUrl) {
317
      this.redirectUrl = redirectUrl;
×
318
      this.markNullableFieldAsSet("redirect_url");
×
319
      return this;
×
320
    }
321

322
    public Builder declinedRedirectUrl(String declinedRedirectUrl) {
323
      this.declinedRedirectUrl = declinedRedirectUrl;
×
324
      this.markNullableFieldAsSet("declined_redirect_url");
×
325
      return this;
×
326
    }
327

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

333
    public Builder emailSubject(String emailSubject) {
334
      this.emailSubject = emailSubject;
×
335
      this.markNullableFieldAsSet("email_subject");
×
336
      return this;
×
337
    }
338

339
    public Builder emailMessage(String emailMessage) {
340
      this.emailMessage = emailMessage;
×
341
      this.markNullableFieldAsSet("email_message");
×
342
      return this;
×
343
    }
344

345
    public Builder areRemindersEnabled(Boolean areRemindersEnabled) {
346
      this.areRemindersEnabled = areRemindersEnabled;
×
347
      return this;
×
348
    }
349

350
    public Builder name(String name) {
351
      this.name = name;
×
352
      return this;
×
353
    }
354

355
    public Builder prefillTags(List<SignRequestPrefillTag> prefillTags) {
356
      this.prefillTags = prefillTags;
×
357
      return this;
×
358
    }
359

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

366
    public Builder externalId(String externalId) {
367
      this.externalId = externalId;
×
368
      this.markNullableFieldAsSet("external_id");
×
369
      return this;
×
370
    }
371

372
    public Builder templateId(String templateId) {
373
      this.templateId = templateId;
×
374
      this.markNullableFieldAsSet("template_id");
×
375
      return this;
×
376
    }
377

378
    public Builder externalSystemName(String externalSystemName) {
379
      this.externalSystemName = externalSystemName;
×
380
      this.markNullableFieldAsSet("external_system_name");
×
381
      return this;
×
382
    }
383

384
    public SignRequestBase build() {
385
      return new SignRequestBase(this);
×
386
    }
387
  }
388
}
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