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

box / box-java-sdk-gen / #155

30 May 2025 01:03PM UTC coverage: 35.646% (+0.3%) from 35.311%
#155

push

github

web-flow
fix: Fix downscope token to use `retrieveToken` method for token retrieval (box/box-codegen#731) (#320)

4 of 4 new or added lines in 4 files covered. (100.0%)

2952 existing lines in 99 files now uncovered.

15628 of 43842 relevant lines covered (35.65%)

0.36 hits per line

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

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

3
import com.box.sdkgen.internal.utils.DateTimeUtils;
4
import com.box.sdkgen.schemas.foldermini.FolderMini;
5
import com.box.sdkgen.schemas.usermini.UserMini;
6
import com.box.sdkgen.schemas.weblinkbase.WebLinkBaseTypeField;
7
import com.box.sdkgen.schemas.weblinkmini.WebLinkMini;
8
import com.box.sdkgen.serialization.json.EnumWrapper;
9
import com.fasterxml.jackson.annotation.JsonProperty;
10
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
11
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
12
import java.util.Date;
13
import java.util.Objects;
14

15
public class WebLink extends WebLinkMini {
16

17
  protected FolderMini parent;
18

19
  protected String description;
20

21
  @JsonProperty("path_collection")
22
  protected WebLinkPathCollectionField pathCollection;
23

24
  @JsonProperty("created_at")
25
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
26
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
27
  protected Date createdAt;
28

29
  @JsonProperty("modified_at")
30
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
31
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
32
  protected Date modifiedAt;
33

34
  @JsonProperty("trashed_at")
35
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
36
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
37
  protected Date trashedAt;
38

39
  @JsonProperty("purged_at")
40
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
41
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
42
  protected Date purgedAt;
43

44
  @JsonProperty("created_by")
45
  protected UserMini createdBy;
46

47
  @JsonProperty("modified_by")
48
  protected UserMini modifiedBy;
49

50
  @JsonProperty("owned_by")
51
  protected UserMini ownedBy;
52

53
  @JsonProperty("shared_link")
54
  protected WebLinkSharedLinkField sharedLink;
55

56
  @JsonDeserialize(using = WebLinkItemStatusField.WebLinkItemStatusFieldDeserializer.class)
57
  @JsonSerialize(using = WebLinkItemStatusField.WebLinkItemStatusFieldSerializer.class)
58
  @JsonProperty("item_status")
59
  protected EnumWrapper<WebLinkItemStatusField> itemStatus;
60

61
  public WebLink(@JsonProperty("id") String id) {
62
    super(id);
1✔
63
  }
1✔
64

65
  protected WebLink(WebLinkBuilder builder) {
66
    super(builder);
×
67
    this.parent = builder.parent;
×
68
    this.description = builder.description;
×
69
    this.pathCollection = builder.pathCollection;
×
UNCOV
70
    this.createdAt = builder.createdAt;
×
UNCOV
71
    this.modifiedAt = builder.modifiedAt;
×
UNCOV
72
    this.trashedAt = builder.trashedAt;
×
UNCOV
73
    this.purgedAt = builder.purgedAt;
×
UNCOV
74
    this.createdBy = builder.createdBy;
×
UNCOV
75
    this.modifiedBy = builder.modifiedBy;
×
UNCOV
76
    this.ownedBy = builder.ownedBy;
×
UNCOV
77
    this.sharedLink = builder.sharedLink;
×
UNCOV
78
    this.itemStatus = builder.itemStatus;
×
UNCOV
79
  }
×
80

81
  public FolderMini getParent() {
82
    return parent;
1✔
83
  }
84

85
  public String getDescription() {
86
    return description;
1✔
87
  }
88

89
  public WebLinkPathCollectionField getPathCollection() {
UNCOV
90
    return pathCollection;
×
91
  }
92

93
  public Date getCreatedAt() {
UNCOV
94
    return createdAt;
×
95
  }
96

97
  public Date getModifiedAt() {
UNCOV
98
    return modifiedAt;
×
99
  }
100

101
  public Date getTrashedAt() {
UNCOV
102
    return trashedAt;
×
103
  }
104

105
  public Date getPurgedAt() {
UNCOV
106
    return purgedAt;
×
107
  }
108

109
  public UserMini getCreatedBy() {
UNCOV
110
    return createdBy;
×
111
  }
112

113
  public UserMini getModifiedBy() {
UNCOV
114
    return modifiedBy;
×
115
  }
116

117
  public UserMini getOwnedBy() {
UNCOV
118
    return ownedBy;
×
119
  }
120

121
  public WebLinkSharedLinkField getSharedLink() {
122
    return sharedLink;
1✔
123
  }
124

125
  public EnumWrapper<WebLinkItemStatusField> getItemStatus() {
126
    return itemStatus;
1✔
127
  }
128

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

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

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

258
  public static class WebLinkBuilder extends WebLinkMiniBuilder {
259

260
    protected FolderMini parent;
261

262
    protected String description;
263

264
    protected WebLinkPathCollectionField pathCollection;
265

266
    protected Date createdAt;
267

268
    protected Date modifiedAt;
269

270
    protected Date trashedAt;
271

272
    protected Date purgedAt;
273

274
    protected UserMini createdBy;
275

276
    protected UserMini modifiedBy;
277

278
    protected UserMini ownedBy;
279

280
    protected WebLinkSharedLinkField sharedLink;
281

282
    protected EnumWrapper<WebLinkItemStatusField> itemStatus;
283

284
    public WebLinkBuilder(String id) {
285
      super(id);
×
UNCOV
286
    }
×
287

288
    public WebLinkBuilder parent(FolderMini parent) {
289
      this.parent = parent;
×
290
      return this;
×
291
    }
292

293
    public WebLinkBuilder description(String description) {
294
      this.description = description;
×
295
      return this;
×
296
    }
297

298
    public WebLinkBuilder pathCollection(WebLinkPathCollectionField pathCollection) {
299
      this.pathCollection = pathCollection;
×
300
      return this;
×
301
    }
302

303
    public WebLinkBuilder createdAt(Date createdAt) {
304
      this.createdAt = createdAt;
×
305
      return this;
×
306
    }
307

308
    public WebLinkBuilder modifiedAt(Date modifiedAt) {
309
      this.modifiedAt = modifiedAt;
×
310
      return this;
×
311
    }
312

313
    public WebLinkBuilder trashedAt(Date trashedAt) {
314
      this.trashedAt = trashedAt;
×
315
      return this;
×
316
    }
317

318
    public WebLinkBuilder purgedAt(Date purgedAt) {
319
      this.purgedAt = purgedAt;
×
320
      return this;
×
321
    }
322

323
    public WebLinkBuilder createdBy(UserMini createdBy) {
324
      this.createdBy = createdBy;
×
325
      return this;
×
326
    }
327

328
    public WebLinkBuilder modifiedBy(UserMini modifiedBy) {
329
      this.modifiedBy = modifiedBy;
×
330
      return this;
×
331
    }
332

333
    public WebLinkBuilder ownedBy(UserMini ownedBy) {
334
      this.ownedBy = ownedBy;
×
335
      return this;
×
336
    }
337

338
    public WebLinkBuilder sharedLink(WebLinkSharedLinkField sharedLink) {
339
      this.sharedLink = sharedLink;
×
340
      return this;
×
341
    }
342

343
    public WebLinkBuilder itemStatus(WebLinkItemStatusField itemStatus) {
UNCOV
344
      this.itemStatus = new EnumWrapper<WebLinkItemStatusField>(itemStatus);
×
345
      return this;
×
346
    }
347

348
    public WebLinkBuilder itemStatus(EnumWrapper<WebLinkItemStatusField> itemStatus) {
UNCOV
349
      this.itemStatus = itemStatus;
×
UNCOV
350
      return this;
×
351
    }
352

353
    @Override
354
    public WebLinkBuilder type(WebLinkBaseTypeField type) {
UNCOV
355
      this.type = new EnumWrapper<WebLinkBaseTypeField>(type);
×
UNCOV
356
      return this;
×
357
    }
358

359
    @Override
360
    public WebLinkBuilder type(EnumWrapper<WebLinkBaseTypeField> type) {
UNCOV
361
      this.type = type;
×
UNCOV
362
      return this;
×
363
    }
364

365
    @Override
366
    public WebLinkBuilder etag(String etag) {
UNCOV
367
      this.etag = etag;
×
UNCOV
368
      return this;
×
369
    }
370

371
    @Override
372
    public WebLinkBuilder url(String url) {
UNCOV
373
      this.url = url;
×
UNCOV
374
      return this;
×
375
    }
376

377
    @Override
378
    public WebLinkBuilder sequenceId(String sequenceId) {
UNCOV
379
      this.sequenceId = sequenceId;
×
380
      return this;
×
381
    }
382

383
    @Override
384
    public WebLinkBuilder name(String name) {
UNCOV
385
      this.name = name;
×
UNCOV
386
      return this;
×
387
    }
388

389
    public WebLink build() {
UNCOV
390
      return new WebLink(this);
×
391
    }
392
  }
393
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc