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

box / box-java-sdk-gen / #361

14 Jul 2025 11:20AM UTC coverage: 38.075% (+2.5%) from 35.58%
#361

push

github

web-flow
feat: Support common union fields and implicit union conversion (box/box-codegen#758) (#361)

288 of 1203 new or added lines in 106 files covered. (23.94%)

165 existing lines in 43 files now uncovered.

18537 of 48685 relevant lines covered (38.08%)

0.38 hits per line

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

7.58
/src/main/java/com/box/sdkgen/schemas/folder/FolderSharedLinkField.java
1
package com.box.sdkgen.schemas.folder;
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.internal.utils.DateTimeUtils;
7
import com.box.sdkgen.serialization.json.EnumWrapper;
8
import com.fasterxml.jackson.annotation.JsonFilter;
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
@JsonFilter("nullablePropertyFilter")
16
public class FolderSharedLinkField extends SerializableObject {
17

18
  protected final String url;
19

20
  @JsonProperty("download_url")
21
  @Nullable
22
  protected String downloadUrl;
23

24
  @JsonProperty("vanity_url")
25
  @Nullable
26
  protected String vanityUrl;
27

28
  @JsonProperty("vanity_name")
29
  @Nullable
30
  protected String vanityName;
31

32
  @JsonDeserialize(
33
      using = FolderSharedLinkAccessField.FolderSharedLinkAccessFieldDeserializer.class)
34
  @JsonSerialize(using = FolderSharedLinkAccessField.FolderSharedLinkAccessFieldSerializer.class)
35
  protected EnumWrapper<FolderSharedLinkAccessField> access;
36

37
  @JsonDeserialize(
38
      using =
39
          FolderSharedLinkEffectiveAccessField.FolderSharedLinkEffectiveAccessFieldDeserializer
40
              .class)
41
  @JsonSerialize(
42
      using =
43
          FolderSharedLinkEffectiveAccessField.FolderSharedLinkEffectiveAccessFieldSerializer.class)
44
  @JsonProperty("effective_access")
45
  protected final EnumWrapper<FolderSharedLinkEffectiveAccessField> effectiveAccess;
46

47
  @JsonDeserialize(
48
      using =
49
          FolderSharedLinkEffectivePermissionField
50
              .FolderSharedLinkEffectivePermissionFieldDeserializer.class)
51
  @JsonSerialize(
52
      using =
53
          FolderSharedLinkEffectivePermissionField
54
              .FolderSharedLinkEffectivePermissionFieldSerializer.class)
55
  @JsonProperty("effective_permission")
56
  protected final EnumWrapper<FolderSharedLinkEffectivePermissionField> effectivePermission;
57

58
  @JsonProperty("unshared_at")
59
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
60
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
61
  @Nullable
62
  protected Date unsharedAt;
63

64
  @JsonProperty("is_password_enabled")
65
  protected final boolean isPasswordEnabled;
66

67
  protected FolderSharedLinkPermissionsField permissions;
68

69
  @JsonProperty("download_count")
70
  protected final long downloadCount;
71

72
  @JsonProperty("preview_count")
73
  protected final long previewCount;
74

75
  public FolderSharedLinkField(
76
      String url,
77
      FolderSharedLinkEffectiveAccessField effectiveAccess,
78
      FolderSharedLinkEffectivePermissionField effectivePermission,
79
      boolean isPasswordEnabled,
80
      long downloadCount,
81
      long previewCount) {
UNCOV
82
    super();
×
UNCOV
83
    this.url = url;
×
NEW
84
    this.effectiveAccess = new EnumWrapper<FolderSharedLinkEffectiveAccessField>(effectiveAccess);
×
NEW
85
    this.effectivePermission =
×
86
        new EnumWrapper<FolderSharedLinkEffectivePermissionField>(effectivePermission);
UNCOV
87
    this.isPasswordEnabled = isPasswordEnabled;
×
UNCOV
88
    this.downloadCount = downloadCount;
×
UNCOV
89
    this.previewCount = previewCount;
×
UNCOV
90
  }
×
91

92
  public FolderSharedLinkField(
93
      String url,
94
      FolderSharedLinkEffectiveAccessField effectiveAccess,
95
      EnumWrapper<FolderSharedLinkEffectivePermissionField> effectivePermission,
96
      boolean isPasswordEnabled,
97
      long downloadCount,
98
      long previewCount) {
99
    super();
×
100
    this.url = url;
×
101
    this.effectiveAccess = new EnumWrapper<FolderSharedLinkEffectiveAccessField>(effectiveAccess);
×
NEW
102
    this.effectivePermission = effectivePermission;
×
NEW
103
    this.isPasswordEnabled = isPasswordEnabled;
×
NEW
104
    this.downloadCount = downloadCount;
×
NEW
105
    this.previewCount = previewCount;
×
NEW
106
  }
×
107

108
  public FolderSharedLinkField(
109
      String url,
110
      EnumWrapper<FolderSharedLinkEffectiveAccessField> effectiveAccess,
111
      FolderSharedLinkEffectivePermissionField effectivePermission,
112
      boolean isPasswordEnabled,
113
      long downloadCount,
114
      long previewCount) {
NEW
115
    super();
×
NEW
116
    this.url = url;
×
NEW
117
    this.effectiveAccess = effectiveAccess;
×
UNCOV
118
    this.effectivePermission =
×
119
        new EnumWrapper<FolderSharedLinkEffectivePermissionField>(effectivePermission);
120
    this.isPasswordEnabled = isPasswordEnabled;
×
121
    this.downloadCount = downloadCount;
×
122
    this.previewCount = previewCount;
×
123
  }
×
124

125
  public FolderSharedLinkField(
126
      @JsonProperty("url") String url,
127
      @JsonProperty("effective_access")
128
          EnumWrapper<FolderSharedLinkEffectiveAccessField> effectiveAccess,
129
      @JsonProperty("effective_permission")
130
          EnumWrapper<FolderSharedLinkEffectivePermissionField> effectivePermission,
131
      @JsonProperty("is_password_enabled") boolean isPasswordEnabled,
132
      @JsonProperty("download_count") long downloadCount,
133
      @JsonProperty("preview_count") long previewCount) {
134
    super();
1✔
135
    this.url = url;
1✔
136
    this.effectiveAccess = effectiveAccess;
1✔
137
    this.effectivePermission = effectivePermission;
1✔
138
    this.isPasswordEnabled = isPasswordEnabled;
1✔
139
    this.downloadCount = downloadCount;
1✔
140
    this.previewCount = previewCount;
1✔
141
  }
1✔
142

143
  protected FolderSharedLinkField(Builder builder) {
144
    super();
×
145
    this.url = builder.url;
×
146
    this.downloadUrl = builder.downloadUrl;
×
147
    this.vanityUrl = builder.vanityUrl;
×
148
    this.vanityName = builder.vanityName;
×
149
    this.access = builder.access;
×
150
    this.effectiveAccess = builder.effectiveAccess;
×
151
    this.effectivePermission = builder.effectivePermission;
×
152
    this.unsharedAt = builder.unsharedAt;
×
153
    this.isPasswordEnabled = builder.isPasswordEnabled;
×
154
    this.permissions = builder.permissions;
×
155
    this.downloadCount = builder.downloadCount;
×
156
    this.previewCount = builder.previewCount;
×
157
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
158
  }
×
159

160
  public String getUrl() {
161
    return url;
1✔
162
  }
163

164
  public String getDownloadUrl() {
165
    return downloadUrl;
×
166
  }
167

168
  public String getVanityUrl() {
169
    return vanityUrl;
×
170
  }
171

172
  public String getVanityName() {
173
    return vanityName;
×
174
  }
175

176
  public EnumWrapper<FolderSharedLinkAccessField> getAccess() {
177
    return access;
1✔
178
  }
179

180
  public EnumWrapper<FolderSharedLinkEffectiveAccessField> getEffectiveAccess() {
181
    return effectiveAccess;
×
182
  }
183

184
  public EnumWrapper<FolderSharedLinkEffectivePermissionField> getEffectivePermission() {
185
    return effectivePermission;
×
186
  }
187

188
  public Date getUnsharedAt() {
189
    return unsharedAt;
×
190
  }
191

192
  public boolean getIsPasswordEnabled() {
193
    return isPasswordEnabled;
×
194
  }
195

196
  public FolderSharedLinkPermissionsField getPermissions() {
197
    return permissions;
×
198
  }
199

200
  public long getDownloadCount() {
201
    return downloadCount;
×
202
  }
203

204
  public long getPreviewCount() {
205
    return previewCount;
×
206
  }
207

208
  @Override
209
  public boolean equals(Object o) {
210
    if (this == o) {
×
211
      return true;
×
212
    }
213
    if (o == null || getClass() != o.getClass()) {
×
214
      return false;
×
215
    }
216
    FolderSharedLinkField casted = (FolderSharedLinkField) o;
×
217
    return Objects.equals(url, casted.url)
×
218
        && Objects.equals(downloadUrl, casted.downloadUrl)
×
219
        && Objects.equals(vanityUrl, casted.vanityUrl)
×
220
        && Objects.equals(vanityName, casted.vanityName)
×
221
        && Objects.equals(access, casted.access)
×
222
        && Objects.equals(effectiveAccess, casted.effectiveAccess)
×
223
        && Objects.equals(effectivePermission, casted.effectivePermission)
×
224
        && Objects.equals(unsharedAt, casted.unsharedAt)
×
225
        && Objects.equals(isPasswordEnabled, casted.isPasswordEnabled)
×
226
        && Objects.equals(permissions, casted.permissions)
×
227
        && Objects.equals(downloadCount, casted.downloadCount)
×
228
        && Objects.equals(previewCount, casted.previewCount);
×
229
  }
230

231
  @Override
232
  public int hashCode() {
233
    return Objects.hash(
×
234
        url,
235
        downloadUrl,
236
        vanityUrl,
237
        vanityName,
238
        access,
239
        effectiveAccess,
240
        effectivePermission,
241
        unsharedAt,
242
        isPasswordEnabled,
×
243
        permissions,
244
        downloadCount,
×
245
        previewCount);
×
246
  }
247

248
  @Override
249
  public String toString() {
250
    return "FolderSharedLinkField{"
×
251
        + "url='"
252
        + url
253
        + '\''
254
        + ", "
255
        + "downloadUrl='"
256
        + downloadUrl
257
        + '\''
258
        + ", "
259
        + "vanityUrl='"
260
        + vanityUrl
261
        + '\''
262
        + ", "
263
        + "vanityName='"
264
        + vanityName
265
        + '\''
266
        + ", "
267
        + "access='"
268
        + access
269
        + '\''
270
        + ", "
271
        + "effectiveAccess='"
272
        + effectiveAccess
273
        + '\''
274
        + ", "
275
        + "effectivePermission='"
276
        + effectivePermission
277
        + '\''
278
        + ", "
279
        + "unsharedAt='"
280
        + unsharedAt
281
        + '\''
282
        + ", "
283
        + "isPasswordEnabled='"
284
        + isPasswordEnabled
285
        + '\''
286
        + ", "
287
        + "permissions='"
288
        + permissions
289
        + '\''
290
        + ", "
291
        + "downloadCount='"
292
        + downloadCount
293
        + '\''
294
        + ", "
295
        + "previewCount='"
296
        + previewCount
297
        + '\''
298
        + "}";
299
  }
300

301
  public static class Builder extends NullableFieldTracker {
302

303
    protected final String url;
304

305
    protected String downloadUrl;
306

307
    protected String vanityUrl;
308

309
    protected String vanityName;
310

311
    protected EnumWrapper<FolderSharedLinkAccessField> access;
312

313
    protected final EnumWrapper<FolderSharedLinkEffectiveAccessField> effectiveAccess;
314

315
    protected final EnumWrapper<FolderSharedLinkEffectivePermissionField> effectivePermission;
316

317
    protected Date unsharedAt;
318

319
    protected final boolean isPasswordEnabled;
320

321
    protected FolderSharedLinkPermissionsField permissions;
322

323
    protected final long downloadCount;
324

325
    protected final long previewCount;
326

327
    public Builder(
328
        String url,
329
        FolderSharedLinkEffectiveAccessField effectiveAccess,
330
        FolderSharedLinkEffectivePermissionField effectivePermission,
331
        boolean isPasswordEnabled,
332
        long downloadCount,
333
        long previewCount) {
NEW
334
      super();
×
NEW
335
      this.url = url;
×
NEW
336
      this.effectiveAccess = new EnumWrapper<FolderSharedLinkEffectiveAccessField>(effectiveAccess);
×
NEW
337
      this.effectivePermission =
×
338
          new EnumWrapper<FolderSharedLinkEffectivePermissionField>(effectivePermission);
NEW
339
      this.isPasswordEnabled = isPasswordEnabled;
×
NEW
340
      this.downloadCount = downloadCount;
×
NEW
341
      this.previewCount = previewCount;
×
NEW
342
    }
×
343

344
    public Builder(
345
        String url,
346
        FolderSharedLinkEffectiveAccessField effectiveAccess,
347
        EnumWrapper<FolderSharedLinkEffectivePermissionField> effectivePermission,
348
        boolean isPasswordEnabled,
349
        long downloadCount,
350
        long previewCount) {
351
      super();
×
352
      this.url = url;
×
NEW
353
      this.effectiveAccess = new EnumWrapper<FolderSharedLinkEffectiveAccessField>(effectiveAccess);
×
354
      this.effectivePermission = effectivePermission;
×
355
      this.isPasswordEnabled = isPasswordEnabled;
×
356
      this.downloadCount = downloadCount;
×
357
      this.previewCount = previewCount;
×
358
    }
×
359

360
    public Builder(
361
        String url,
362
        EnumWrapper<FolderSharedLinkEffectiveAccessField> effectiveAccess,
363
        FolderSharedLinkEffectivePermissionField effectivePermission,
364
        boolean isPasswordEnabled,
365
        long downloadCount,
366
        long previewCount) {
367
      super();
×
368
      this.url = url;
×
NEW
369
      this.effectiveAccess = effectiveAccess;
×
370
      this.effectivePermission =
×
371
          new EnumWrapper<FolderSharedLinkEffectivePermissionField>(effectivePermission);
372
      this.isPasswordEnabled = isPasswordEnabled;
×
373
      this.downloadCount = downloadCount;
×
374
      this.previewCount = previewCount;
×
375
    }
×
376

377
    public Builder(
378
        String url,
379
        EnumWrapper<FolderSharedLinkEffectiveAccessField> effectiveAccess,
380
        EnumWrapper<FolderSharedLinkEffectivePermissionField> effectivePermission,
381
        boolean isPasswordEnabled,
382
        long downloadCount,
383
        long previewCount) {
NEW
384
      super();
×
NEW
385
      this.url = url;
×
NEW
386
      this.effectiveAccess = effectiveAccess;
×
NEW
387
      this.effectivePermission = effectivePermission;
×
NEW
388
      this.isPasswordEnabled = isPasswordEnabled;
×
NEW
389
      this.downloadCount = downloadCount;
×
NEW
390
      this.previewCount = previewCount;
×
NEW
391
    }
×
392

393
    public Builder downloadUrl(String downloadUrl) {
394
      this.downloadUrl = downloadUrl;
×
395
      this.markNullableFieldAsSet("download_url");
×
396
      return this;
×
397
    }
398

399
    public Builder vanityUrl(String vanityUrl) {
400
      this.vanityUrl = vanityUrl;
×
401
      this.markNullableFieldAsSet("vanity_url");
×
402
      return this;
×
403
    }
404

405
    public Builder vanityName(String vanityName) {
406
      this.vanityName = vanityName;
×
407
      this.markNullableFieldAsSet("vanity_name");
×
408
      return this;
×
409
    }
410

411
    public Builder access(FolderSharedLinkAccessField access) {
412
      this.access = new EnumWrapper<FolderSharedLinkAccessField>(access);
×
413
      return this;
×
414
    }
415

416
    public Builder access(EnumWrapper<FolderSharedLinkAccessField> access) {
417
      this.access = access;
×
418
      return this;
×
419
    }
420

421
    public Builder unsharedAt(Date unsharedAt) {
422
      this.unsharedAt = unsharedAt;
×
423
      this.markNullableFieldAsSet("unshared_at");
×
424
      return this;
×
425
    }
426

427
    public Builder permissions(FolderSharedLinkPermissionsField permissions) {
428
      this.permissions = permissions;
×
429
      return this;
×
430
    }
431

432
    public FolderSharedLinkField build() {
433
      return new FolderSharedLinkField(this);
×
434
    }
435
  }
436
}
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