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

box / box-java-sdk-gen / #296

25 Jun 2025 10:12AM UTC coverage: 35.677% (-0.05%) from 35.723%
#296

Pull #348

github

web-flow
Merge d48b178e0 into d8480ee6c
Pull Request #348: chore: Update .codegen.json with commit hash of codegen and openapi spec

68 of 82 new or added lines in 2 files covered. (82.93%)

11820 existing lines in 631 files now uncovered.

16946 of 47499 relevant lines covered (35.68%)

0.36 hits per line

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

10.0
/src/main/java/com/box/sdkgen/schemas/weblink/WebLinkSharedLinkField.java
1
package com.box.sdkgen.schemas.weblink;
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 WebLinkSharedLinkField 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 = WebLinkSharedLinkAccessField.WebLinkSharedLinkAccessFieldDeserializer.class)
34
  @JsonSerialize(using = WebLinkSharedLinkAccessField.WebLinkSharedLinkAccessFieldSerializer.class)
35
  protected EnumWrapper<WebLinkSharedLinkAccessField> access;
36

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

48
  @JsonDeserialize(
49
      using =
50
          WebLinkSharedLinkEffectivePermissionField
51
              .WebLinkSharedLinkEffectivePermissionFieldDeserializer.class)
52
  @JsonSerialize(
53
      using =
54
          WebLinkSharedLinkEffectivePermissionField
55
              .WebLinkSharedLinkEffectivePermissionFieldSerializer.class)
56
  @JsonProperty("effective_permission")
57
  protected final EnumWrapper<WebLinkSharedLinkEffectivePermissionField> effectivePermission;
58

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

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

68
  protected WebLinkSharedLinkPermissionsField permissions;
69

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

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

76
  public WebLinkSharedLinkField(
77
      @JsonProperty("url") String url,
78
      @JsonProperty("effective_access")
79
          EnumWrapper<WebLinkSharedLinkEffectiveAccessField> effectiveAccess,
80
      @JsonProperty("effective_permission")
81
          EnumWrapper<WebLinkSharedLinkEffectivePermissionField> effectivePermission,
82
      @JsonProperty("is_password_enabled") boolean isPasswordEnabled,
83
      @JsonProperty("download_count") long downloadCount,
84
      @JsonProperty("preview_count") long previewCount) {
85
    super();
1✔
86
    this.url = url;
1✔
87
    this.effectiveAccess = effectiveAccess;
1✔
88
    this.effectivePermission = effectivePermission;
1✔
89
    this.isPasswordEnabled = isPasswordEnabled;
1✔
90
    this.downloadCount = downloadCount;
1✔
91
    this.previewCount = previewCount;
1✔
92
  }
1✔
93

94
  public WebLinkSharedLinkField(
95
      String url,
96
      WebLinkSharedLinkEffectiveAccessField effectiveAccess,
97
      WebLinkSharedLinkEffectivePermissionField effectivePermission,
98
      boolean isPasswordEnabled,
99
      long downloadCount,
100
      long previewCount) {
101
    super();
×
UNCOV
102
    this.url = url;
×
UNCOV
103
    this.effectiveAccess = new EnumWrapper<WebLinkSharedLinkEffectiveAccessField>(effectiveAccess);
×
104
    this.effectivePermission =
×
105
        new EnumWrapper<WebLinkSharedLinkEffectivePermissionField>(effectivePermission);
106
    this.isPasswordEnabled = isPasswordEnabled;
×
107
    this.downloadCount = downloadCount;
×
108
    this.previewCount = previewCount;
×
109
  }
×
110

111
  protected WebLinkSharedLinkField(Builder builder) {
112
    super();
×
113
    this.url = builder.url;
×
114
    this.downloadUrl = builder.downloadUrl;
×
115
    this.vanityUrl = builder.vanityUrl;
×
116
    this.vanityName = builder.vanityName;
×
117
    this.access = builder.access;
×
UNCOV
118
    this.effectiveAccess = builder.effectiveAccess;
×
UNCOV
119
    this.effectivePermission = builder.effectivePermission;
×
UNCOV
120
    this.unsharedAt = builder.unsharedAt;
×
UNCOV
121
    this.isPasswordEnabled = builder.isPasswordEnabled;
×
UNCOV
122
    this.permissions = builder.permissions;
×
UNCOV
123
    this.downloadCount = builder.downloadCount;
×
124
    this.previewCount = builder.previewCount;
×
UNCOV
125
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
UNCOV
126
  }
×
127

128
  public String getUrl() {
129
    return url;
1✔
130
  }
131

132
  public String getDownloadUrl() {
UNCOV
133
    return downloadUrl;
×
134
  }
135

136
  public String getVanityUrl() {
UNCOV
137
    return vanityUrl;
×
138
  }
139

140
  public String getVanityName() {
UNCOV
141
    return vanityName;
×
142
  }
143

144
  public EnumWrapper<WebLinkSharedLinkAccessField> getAccess() {
145
    return access;
1✔
146
  }
147

148
  public EnumWrapper<WebLinkSharedLinkEffectiveAccessField> getEffectiveAccess() {
UNCOV
149
    return effectiveAccess;
×
150
  }
151

152
  public EnumWrapper<WebLinkSharedLinkEffectivePermissionField> getEffectivePermission() {
UNCOV
153
    return effectivePermission;
×
154
  }
155

156
  public Date getUnsharedAt() {
UNCOV
157
    return unsharedAt;
×
158
  }
159

160
  public boolean getIsPasswordEnabled() {
UNCOV
161
    return isPasswordEnabled;
×
162
  }
163

164
  public WebLinkSharedLinkPermissionsField getPermissions() {
UNCOV
165
    return permissions;
×
166
  }
167

168
  public long getDownloadCount() {
169
    return downloadCount;
×
170
  }
171

172
  public long getPreviewCount() {
173
    return previewCount;
×
174
  }
175

176
  @Override
177
  public boolean equals(Object o) {
178
    if (this == o) {
×
179
      return true;
×
180
    }
181
    if (o == null || getClass() != o.getClass()) {
×
182
      return false;
×
183
    }
184
    WebLinkSharedLinkField casted = (WebLinkSharedLinkField) o;
×
185
    return Objects.equals(url, casted.url)
×
186
        && Objects.equals(downloadUrl, casted.downloadUrl)
×
187
        && Objects.equals(vanityUrl, casted.vanityUrl)
×
UNCOV
188
        && Objects.equals(vanityName, casted.vanityName)
×
UNCOV
189
        && Objects.equals(access, casted.access)
×
UNCOV
190
        && Objects.equals(effectiveAccess, casted.effectiveAccess)
×
UNCOV
191
        && Objects.equals(effectivePermission, casted.effectivePermission)
×
192
        && Objects.equals(unsharedAt, casted.unsharedAt)
×
UNCOV
193
        && Objects.equals(isPasswordEnabled, casted.isPasswordEnabled)
×
UNCOV
194
        && Objects.equals(permissions, casted.permissions)
×
UNCOV
195
        && Objects.equals(downloadCount, casted.downloadCount)
×
UNCOV
196
        && Objects.equals(previewCount, casted.previewCount);
×
197
  }
198

199
  @Override
200
  public int hashCode() {
201
    return Objects.hash(
×
202
        url,
203
        downloadUrl,
204
        vanityUrl,
205
        vanityName,
206
        access,
207
        effectiveAccess,
208
        effectivePermission,
209
        unsharedAt,
UNCOV
210
        isPasswordEnabled,
×
211
        permissions,
UNCOV
212
        downloadCount,
×
UNCOV
213
        previewCount);
×
214
  }
215

216
  @Override
217
  public String toString() {
UNCOV
218
    return "WebLinkSharedLinkField{"
×
219
        + "url='"
220
        + url
221
        + '\''
222
        + ", "
223
        + "downloadUrl='"
224
        + downloadUrl
225
        + '\''
226
        + ", "
227
        + "vanityUrl='"
228
        + vanityUrl
229
        + '\''
230
        + ", "
231
        + "vanityName='"
232
        + vanityName
233
        + '\''
234
        + ", "
235
        + "access='"
236
        + access
237
        + '\''
238
        + ", "
239
        + "effectiveAccess='"
240
        + effectiveAccess
241
        + '\''
242
        + ", "
243
        + "effectivePermission='"
244
        + effectivePermission
245
        + '\''
246
        + ", "
247
        + "unsharedAt='"
248
        + unsharedAt
249
        + '\''
250
        + ", "
251
        + "isPasswordEnabled='"
252
        + isPasswordEnabled
253
        + '\''
254
        + ", "
255
        + "permissions='"
256
        + permissions
257
        + '\''
258
        + ", "
259
        + "downloadCount='"
260
        + downloadCount
261
        + '\''
262
        + ", "
263
        + "previewCount='"
264
        + previewCount
265
        + '\''
266
        + "}";
267
  }
268

269
  public static class Builder extends NullableFieldTracker {
270

271
    protected final String url;
272

273
    protected String downloadUrl;
274

275
    protected String vanityUrl;
276

277
    protected String vanityName;
278

279
    protected EnumWrapper<WebLinkSharedLinkAccessField> access;
280

281
    protected final EnumWrapper<WebLinkSharedLinkEffectiveAccessField> effectiveAccess;
282

283
    protected final EnumWrapper<WebLinkSharedLinkEffectivePermissionField> effectivePermission;
284

285
    protected Date unsharedAt;
286

287
    protected final boolean isPasswordEnabled;
288

289
    protected WebLinkSharedLinkPermissionsField permissions;
290

291
    protected final long downloadCount;
292

293
    protected final long previewCount;
294

295
    public Builder(
296
        String url,
297
        EnumWrapper<WebLinkSharedLinkEffectiveAccessField> effectiveAccess,
298
        EnumWrapper<WebLinkSharedLinkEffectivePermissionField> effectivePermission,
299
        boolean isPasswordEnabled,
300
        long downloadCount,
301
        long previewCount) {
UNCOV
302
      super();
×
UNCOV
303
      this.url = url;
×
UNCOV
304
      this.effectiveAccess = effectiveAccess;
×
UNCOV
305
      this.effectivePermission = effectivePermission;
×
UNCOV
306
      this.isPasswordEnabled = isPasswordEnabled;
×
307
      this.downloadCount = downloadCount;
×
308
      this.previewCount = previewCount;
×
309
    }
×
310

311
    public Builder(
312
        String url,
313
        WebLinkSharedLinkEffectiveAccessField effectiveAccess,
314
        WebLinkSharedLinkEffectivePermissionField effectivePermission,
315
        boolean isPasswordEnabled,
316
        long downloadCount,
317
        long previewCount) {
UNCOV
318
      super();
×
319
      this.url = url;
×
320
      this.effectiveAccess =
×
321
          new EnumWrapper<WebLinkSharedLinkEffectiveAccessField>(effectiveAccess);
UNCOV
322
      this.effectivePermission =
×
323
          new EnumWrapper<WebLinkSharedLinkEffectivePermissionField>(effectivePermission);
324
      this.isPasswordEnabled = isPasswordEnabled;
×
325
      this.downloadCount = downloadCount;
×
UNCOV
326
      this.previewCount = previewCount;
×
UNCOV
327
    }
×
328

329
    public Builder downloadUrl(String downloadUrl) {
330
      this.downloadUrl = downloadUrl;
×
UNCOV
331
      this.markNullableFieldAsSet("download_url");
×
UNCOV
332
      return this;
×
333
    }
334

335
    public Builder vanityUrl(String vanityUrl) {
UNCOV
336
      this.vanityUrl = vanityUrl;
×
UNCOV
337
      this.markNullableFieldAsSet("vanity_url");
×
UNCOV
338
      return this;
×
339
    }
340

341
    public Builder vanityName(String vanityName) {
UNCOV
342
      this.vanityName = vanityName;
×
UNCOV
343
      this.markNullableFieldAsSet("vanity_name");
×
344
      return this;
×
345
    }
346

347
    public Builder access(WebLinkSharedLinkAccessField access) {
UNCOV
348
      this.access = new EnumWrapper<WebLinkSharedLinkAccessField>(access);
×
349
      return this;
×
350
    }
351

352
    public Builder access(EnumWrapper<WebLinkSharedLinkAccessField> access) {
UNCOV
353
      this.access = access;
×
354
      return this;
×
355
    }
356

357
    public Builder unsharedAt(Date unsharedAt) {
UNCOV
358
      this.unsharedAt = unsharedAt;
×
UNCOV
359
      this.markNullableFieldAsSet("unshared_at");
×
UNCOV
360
      return this;
×
361
    }
362

363
    public Builder permissions(WebLinkSharedLinkPermissionsField permissions) {
UNCOV
364
      this.permissions = permissions;
×
UNCOV
365
      return this;
×
366
    }
367

368
    public WebLinkSharedLinkField build() {
UNCOV
369
      return new WebLinkSharedLinkField(this);
×
370
    }
371
  }
372
}
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