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

box / box-java-sdk-gen / #290

24 Jun 2025 01:20PM UTC coverage: 35.757% (+0.1%) from 35.632%
#290

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%)

11777 existing lines in 624 files now uncovered.

16984 of 47499 relevant lines covered (35.76%)

0.36 hits per line

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

6.19
/src/main/java/com/box/sdkgen/schemas/weblink/WebLink.java
1
package com.box.sdkgen.schemas.weblink;
2

3
import com.box.sdkgen.internal.Nullable;
4
import com.box.sdkgen.internal.utils.DateTimeUtils;
5
import com.box.sdkgen.schemas.foldermini.FolderMini;
6
import com.box.sdkgen.schemas.usermini.UserMini;
7
import com.box.sdkgen.schemas.weblinkbase.WebLinkBaseTypeField;
8
import com.box.sdkgen.schemas.weblinkmini.WebLinkMini;
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.Date;
15
import java.util.Objects;
16

17
@JsonFilter("nullablePropertyFilter")
18
public class WebLink extends WebLinkMini {
19

20
  protected FolderMini parent;
21

22
  protected String description;
23

24
  @JsonProperty("path_collection")
25
  protected WebLinkPathCollectionField pathCollection;
26

27
  @JsonProperty("created_at")
28
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
29
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
30
  protected Date createdAt;
31

32
  @JsonProperty("modified_at")
33
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
34
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
35
  protected Date modifiedAt;
36

37
  @JsonProperty("trashed_at")
38
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
39
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
40
  @Nullable
41
  protected Date trashedAt;
42

43
  @JsonProperty("purged_at")
44
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
45
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
46
  @Nullable
47
  protected Date purgedAt;
48

49
  @JsonProperty("created_by")
50
  protected UserMini createdBy;
51

52
  @JsonProperty("modified_by")
53
  protected UserMini modifiedBy;
54

55
  @JsonProperty("owned_by")
56
  protected UserMini ownedBy;
57

58
  @JsonProperty("shared_link")
59
  protected WebLinkSharedLinkField sharedLink;
60

61
  @JsonDeserialize(using = WebLinkItemStatusField.WebLinkItemStatusFieldDeserializer.class)
62
  @JsonSerialize(using = WebLinkItemStatusField.WebLinkItemStatusFieldSerializer.class)
63
  @JsonProperty("item_status")
64
  protected EnumWrapper<WebLinkItemStatusField> itemStatus;
65

66
  public WebLink(@JsonProperty("id") String id) {
67
    super(id);
1✔
68
  }
1✔
69

70
  protected WebLink(Builder builder) {
71
    super(builder);
×
72
    this.parent = builder.parent;
×
73
    this.description = builder.description;
×
74
    this.pathCollection = builder.pathCollection;
×
75
    this.createdAt = builder.createdAt;
×
76
    this.modifiedAt = builder.modifiedAt;
×
77
    this.trashedAt = builder.trashedAt;
×
78
    this.purgedAt = builder.purgedAt;
×
79
    this.createdBy = builder.createdBy;
×
UNCOV
80
    this.modifiedBy = builder.modifiedBy;
×
UNCOV
81
    this.ownedBy = builder.ownedBy;
×
UNCOV
82
    this.sharedLink = builder.sharedLink;
×
UNCOV
83
    this.itemStatus = builder.itemStatus;
×
UNCOV
84
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
UNCOV
85
  }
×
86

87
  public FolderMini getParent() {
88
    return parent;
1✔
89
  }
90

91
  public String getDescription() {
92
    return description;
1✔
93
  }
94

95
  public WebLinkPathCollectionField getPathCollection() {
UNCOV
96
    return pathCollection;
×
97
  }
98

99
  public Date getCreatedAt() {
UNCOV
100
    return createdAt;
×
101
  }
102

103
  public Date getModifiedAt() {
UNCOV
104
    return modifiedAt;
×
105
  }
106

107
  public Date getTrashedAt() {
UNCOV
108
    return trashedAt;
×
109
  }
110

111
  public Date getPurgedAt() {
UNCOV
112
    return purgedAt;
×
113
  }
114

115
  public UserMini getCreatedBy() {
UNCOV
116
    return createdBy;
×
117
  }
118

119
  public UserMini getModifiedBy() {
UNCOV
120
    return modifiedBy;
×
121
  }
122

123
  public UserMini getOwnedBy() {
UNCOV
124
    return ownedBy;
×
125
  }
126

127
  public WebLinkSharedLinkField getSharedLink() {
128
    return sharedLink;
1✔
129
  }
130

131
  public EnumWrapper<WebLinkItemStatusField> getItemStatus() {
132
    return itemStatus;
1✔
133
  }
134

135
  @Override
136
  public boolean equals(Object o) {
137
    if (this == o) {
×
138
      return true;
×
139
    }
140
    if (o == null || getClass() != o.getClass()) {
×
141
      return false;
×
142
    }
143
    WebLink casted = (WebLink) o;
×
144
    return Objects.equals(id, casted.id)
×
145
        && Objects.equals(type, casted.type)
×
146
        && Objects.equals(etag, casted.etag)
×
147
        && Objects.equals(url, casted.url)
×
148
        && Objects.equals(sequenceId, casted.sequenceId)
×
149
        && Objects.equals(name, casted.name)
×
150
        && Objects.equals(parent, casted.parent)
×
151
        && Objects.equals(description, casted.description)
×
152
        && Objects.equals(pathCollection, casted.pathCollection)
×
153
        && Objects.equals(createdAt, casted.createdAt)
×
154
        && Objects.equals(modifiedAt, casted.modifiedAt)
×
155
        && Objects.equals(trashedAt, casted.trashedAt)
×
UNCOV
156
        && Objects.equals(purgedAt, casted.purgedAt)
×
UNCOV
157
        && Objects.equals(createdBy, casted.createdBy)
×
UNCOV
158
        && Objects.equals(modifiedBy, casted.modifiedBy)
×
UNCOV
159
        && Objects.equals(ownedBy, casted.ownedBy)
×
160
        && Objects.equals(sharedLink, casted.sharedLink)
×
UNCOV
161
        && Objects.equals(itemStatus, casted.itemStatus);
×
162
  }
163

164
  @Override
165
  public int hashCode() {
UNCOV
166
    return Objects.hash(
×
167
        id,
168
        type,
169
        etag,
170
        url,
171
        sequenceId,
172
        name,
173
        parent,
174
        description,
175
        pathCollection,
176
        createdAt,
177
        modifiedAt,
178
        trashedAt,
179
        purgedAt,
180
        createdBy,
181
        modifiedBy,
182
        ownedBy,
183
        sharedLink,
184
        itemStatus);
185
  }
186

187
  @Override
188
  public String toString() {
UNCOV
189
    return "WebLink{"
×
190
        + "id='"
191
        + id
192
        + '\''
193
        + ", "
194
        + "type='"
195
        + type
196
        + '\''
197
        + ", "
198
        + "etag='"
199
        + etag
200
        + '\''
201
        + ", "
202
        + "url='"
203
        + url
204
        + '\''
205
        + ", "
206
        + "sequenceId='"
207
        + sequenceId
208
        + '\''
209
        + ", "
210
        + "name='"
211
        + name
212
        + '\''
213
        + ", "
214
        + "parent='"
215
        + parent
216
        + '\''
217
        + ", "
218
        + "description='"
219
        + description
220
        + '\''
221
        + ", "
222
        + "pathCollection='"
223
        + pathCollection
224
        + '\''
225
        + ", "
226
        + "createdAt='"
227
        + createdAt
228
        + '\''
229
        + ", "
230
        + "modifiedAt='"
231
        + modifiedAt
232
        + '\''
233
        + ", "
234
        + "trashedAt='"
235
        + trashedAt
236
        + '\''
237
        + ", "
238
        + "purgedAt='"
239
        + purgedAt
240
        + '\''
241
        + ", "
242
        + "createdBy='"
243
        + createdBy
244
        + '\''
245
        + ", "
246
        + "modifiedBy='"
247
        + modifiedBy
248
        + '\''
249
        + ", "
250
        + "ownedBy='"
251
        + ownedBy
252
        + '\''
253
        + ", "
254
        + "sharedLink='"
255
        + sharedLink
256
        + '\''
257
        + ", "
258
        + "itemStatus='"
259
        + itemStatus
260
        + '\''
261
        + "}";
262
  }
263

264
  public static class Builder extends WebLinkMini.Builder {
265

266
    protected FolderMini parent;
267

268
    protected String description;
269

270
    protected WebLinkPathCollectionField pathCollection;
271

272
    protected Date createdAt;
273

274
    protected Date modifiedAt;
275

276
    protected Date trashedAt;
277

278
    protected Date purgedAt;
279

280
    protected UserMini createdBy;
281

282
    protected UserMini modifiedBy;
283

284
    protected UserMini ownedBy;
285

286
    protected WebLinkSharedLinkField sharedLink;
287

288
    protected EnumWrapper<WebLinkItemStatusField> itemStatus;
289

290
    public Builder(String id) {
UNCOV
291
      super(id);
×
UNCOV
292
    }
×
293

294
    public Builder parent(FolderMini parent) {
295
      this.parent = parent;
×
UNCOV
296
      return this;
×
297
    }
298

299
    public Builder description(String description) {
300
      this.description = description;
×
UNCOV
301
      return this;
×
302
    }
303

304
    public Builder pathCollection(WebLinkPathCollectionField pathCollection) {
305
      this.pathCollection = pathCollection;
×
UNCOV
306
      return this;
×
307
    }
308

309
    public Builder createdAt(Date createdAt) {
310
      this.createdAt = createdAt;
×
UNCOV
311
      return this;
×
312
    }
313

314
    public Builder modifiedAt(Date modifiedAt) {
315
      this.modifiedAt = modifiedAt;
×
UNCOV
316
      return this;
×
317
    }
318

319
    public Builder trashedAt(Date trashedAt) {
320
      this.trashedAt = trashedAt;
×
UNCOV
321
      this.markNullableFieldAsSet("trashed_at");
×
UNCOV
322
      return this;
×
323
    }
324

325
    public Builder purgedAt(Date purgedAt) {
UNCOV
326
      this.purgedAt = purgedAt;
×
UNCOV
327
      this.markNullableFieldAsSet("purged_at");
×
UNCOV
328
      return this;
×
329
    }
330

331
    public Builder createdBy(UserMini createdBy) {
UNCOV
332
      this.createdBy = createdBy;
×
UNCOV
333
      return this;
×
334
    }
335

336
    public Builder modifiedBy(UserMini modifiedBy) {
UNCOV
337
      this.modifiedBy = modifiedBy;
×
UNCOV
338
      return this;
×
339
    }
340

341
    public Builder ownedBy(UserMini ownedBy) {
UNCOV
342
      this.ownedBy = ownedBy;
×
UNCOV
343
      return this;
×
344
    }
345

346
    public Builder sharedLink(WebLinkSharedLinkField sharedLink) {
UNCOV
347
      this.sharedLink = sharedLink;
×
UNCOV
348
      return this;
×
349
    }
350

351
    public Builder itemStatus(WebLinkItemStatusField itemStatus) {
UNCOV
352
      this.itemStatus = new EnumWrapper<WebLinkItemStatusField>(itemStatus);
×
UNCOV
353
      return this;
×
354
    }
355

356
    public Builder itemStatus(EnumWrapper<WebLinkItemStatusField> itemStatus) {
UNCOV
357
      this.itemStatus = itemStatus;
×
UNCOV
358
      return this;
×
359
    }
360

361
    @Override
362
    public Builder type(WebLinkBaseTypeField type) {
UNCOV
363
      this.type = new EnumWrapper<WebLinkBaseTypeField>(type);
×
UNCOV
364
      return this;
×
365
    }
366

367
    @Override
368
    public Builder type(EnumWrapper<WebLinkBaseTypeField> type) {
UNCOV
369
      this.type = type;
×
UNCOV
370
      return this;
×
371
    }
372

373
    @Override
374
    public Builder etag(String etag) {
UNCOV
375
      this.etag = etag;
×
UNCOV
376
      return this;
×
377
    }
378

379
    @Override
380
    public Builder url(String url) {
UNCOV
381
      this.url = url;
×
UNCOV
382
      return this;
×
383
    }
384

385
    @Override
386
    public Builder sequenceId(String sequenceId) {
UNCOV
387
      this.sequenceId = sequenceId;
×
UNCOV
388
      return this;
×
389
    }
390

391
    @Override
392
    public Builder name(String name) {
UNCOV
393
      this.name = name;
×
UNCOV
394
      return this;
×
395
    }
396

397
    public WebLink build() {
UNCOV
398
      return new WebLink(this);
×
399
    }
400
  }
401
}
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