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

box / box-java-sdk-gen / #293

24 Jun 2025 01:20PM UTC coverage: 35.661% (+0.03%) from 35.632%
#293

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

11794 existing lines in 627 files now uncovered.

16937 of 47495 relevant lines covered (35.66%)

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/file/FileSharedLinkField.java
1
package com.box.sdkgen.schemas.file;
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 FileSharedLinkField 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(using = FileSharedLinkAccessField.FileSharedLinkAccessFieldDeserializer.class)
33
  @JsonSerialize(using = FileSharedLinkAccessField.FileSharedLinkAccessFieldSerializer.class)
34
  protected EnumWrapper<FileSharedLinkAccessField> access;
35

36
  @JsonDeserialize(
37
      using =
38
          FileSharedLinkEffectiveAccessField.FileSharedLinkEffectiveAccessFieldDeserializer.class)
39
  @JsonSerialize(
40
      using = FileSharedLinkEffectiveAccessField.FileSharedLinkEffectiveAccessFieldSerializer.class)
41
  @JsonProperty("effective_access")
42
  protected final EnumWrapper<FileSharedLinkEffectiveAccessField> effectiveAccess;
43

44
  @JsonDeserialize(
45
      using =
46
          FileSharedLinkEffectivePermissionField.FileSharedLinkEffectivePermissionFieldDeserializer
47
              .class)
48
  @JsonSerialize(
49
      using =
50
          FileSharedLinkEffectivePermissionField.FileSharedLinkEffectivePermissionFieldSerializer
51
              .class)
52
  @JsonProperty("effective_permission")
53
  protected final EnumWrapper<FileSharedLinkEffectivePermissionField> effectivePermission;
54

55
  @JsonProperty("unshared_at")
56
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
57
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
58
  @Nullable
59
  protected Date unsharedAt;
60

61
  @JsonProperty("is_password_enabled")
62
  protected final boolean isPasswordEnabled;
63

64
  protected FileSharedLinkPermissionsField permissions;
65

66
  @JsonProperty("download_count")
67
  protected final long downloadCount;
68

69
  @JsonProperty("preview_count")
70
  protected final long previewCount;
71

72
  public FileSharedLinkField(
73
      @JsonProperty("url") String url,
74
      @JsonProperty("effective_access")
75
          EnumWrapper<FileSharedLinkEffectiveAccessField> effectiveAccess,
76
      @JsonProperty("effective_permission")
77
          EnumWrapper<FileSharedLinkEffectivePermissionField> effectivePermission,
78
      @JsonProperty("is_password_enabled") boolean isPasswordEnabled,
79
      @JsonProperty("download_count") long downloadCount,
80
      @JsonProperty("preview_count") long previewCount) {
81
    super();
1✔
82
    this.url = url;
1✔
83
    this.effectiveAccess = effectiveAccess;
1✔
84
    this.effectivePermission = effectivePermission;
1✔
85
    this.isPasswordEnabled = isPasswordEnabled;
1✔
86
    this.downloadCount = downloadCount;
1✔
87
    this.previewCount = previewCount;
1✔
88
  }
1✔
89

90
  public FileSharedLinkField(
91
      String url,
92
      FileSharedLinkEffectiveAccessField effectiveAccess,
93
      FileSharedLinkEffectivePermissionField effectivePermission,
94
      boolean isPasswordEnabled,
95
      long downloadCount,
96
      long previewCount) {
97
    super();
×
UNCOV
98
    this.url = url;
×
UNCOV
99
    this.effectiveAccess = new EnumWrapper<FileSharedLinkEffectiveAccessField>(effectiveAccess);
×
100
    this.effectivePermission =
×
101
        new EnumWrapper<FileSharedLinkEffectivePermissionField>(effectivePermission);
102
    this.isPasswordEnabled = isPasswordEnabled;
×
103
    this.downloadCount = downloadCount;
×
104
    this.previewCount = previewCount;
×
105
  }
×
106

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

124
  public String getUrl() {
125
    return url;
1✔
126
  }
127

128
  public String getDownloadUrl() {
UNCOV
129
    return downloadUrl;
×
130
  }
131

132
  public String getVanityUrl() {
UNCOV
133
    return vanityUrl;
×
134
  }
135

136
  public String getVanityName() {
UNCOV
137
    return vanityName;
×
138
  }
139

140
  public EnumWrapper<FileSharedLinkAccessField> getAccess() {
141
    return access;
1✔
142
  }
143

144
  public EnumWrapper<FileSharedLinkEffectiveAccessField> getEffectiveAccess() {
UNCOV
145
    return effectiveAccess;
×
146
  }
147

148
  public EnumWrapper<FileSharedLinkEffectivePermissionField> getEffectivePermission() {
UNCOV
149
    return effectivePermission;
×
150
  }
151

152
  public Date getUnsharedAt() {
UNCOV
153
    return unsharedAt;
×
154
  }
155

156
  public boolean getIsPasswordEnabled() {
UNCOV
157
    return isPasswordEnabled;
×
158
  }
159

160
  public FileSharedLinkPermissionsField getPermissions() {
UNCOV
161
    return permissions;
×
162
  }
163

164
  public long getDownloadCount() {
165
    return downloadCount;
×
166
  }
167

168
  public long getPreviewCount() {
169
    return previewCount;
×
170
  }
171

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

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

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

265
  public static class Builder extends NullableFieldTracker {
266

267
    protected final String url;
268

269
    protected String downloadUrl;
270

271
    protected String vanityUrl;
272

273
    protected String vanityName;
274

275
    protected EnumWrapper<FileSharedLinkAccessField> access;
276

277
    protected final EnumWrapper<FileSharedLinkEffectiveAccessField> effectiveAccess;
278

279
    protected final EnumWrapper<FileSharedLinkEffectivePermissionField> effectivePermission;
280

281
    protected Date unsharedAt;
282

283
    protected final boolean isPasswordEnabled;
284

285
    protected FileSharedLinkPermissionsField permissions;
286

287
    protected final long downloadCount;
288

289
    protected final long previewCount;
290

291
    public Builder(
292
        String url,
293
        EnumWrapper<FileSharedLinkEffectiveAccessField> effectiveAccess,
294
        EnumWrapper<FileSharedLinkEffectivePermissionField> effectivePermission,
295
        boolean isPasswordEnabled,
296
        long downloadCount,
297
        long previewCount) {
UNCOV
298
      super();
×
UNCOV
299
      this.url = url;
×
UNCOV
300
      this.effectiveAccess = effectiveAccess;
×
UNCOV
301
      this.effectivePermission = effectivePermission;
×
UNCOV
302
      this.isPasswordEnabled = isPasswordEnabled;
×
303
      this.downloadCount = downloadCount;
×
304
      this.previewCount = previewCount;
×
305
    }
×
306

307
    public Builder(
308
        String url,
309
        FileSharedLinkEffectiveAccessField effectiveAccess,
310
        FileSharedLinkEffectivePermissionField effectivePermission,
311
        boolean isPasswordEnabled,
312
        long downloadCount,
313
        long previewCount) {
314
      super();
×
315
      this.url = url;
×
UNCOV
316
      this.effectiveAccess = new EnumWrapper<FileSharedLinkEffectiveAccessField>(effectiveAccess);
×
UNCOV
317
      this.effectivePermission =
×
318
          new EnumWrapper<FileSharedLinkEffectivePermissionField>(effectivePermission);
319
      this.isPasswordEnabled = isPasswordEnabled;
×
320
      this.downloadCount = downloadCount;
×
UNCOV
321
      this.previewCount = previewCount;
×
UNCOV
322
    }
×
323

324
    public Builder downloadUrl(String downloadUrl) {
325
      this.downloadUrl = downloadUrl;
×
UNCOV
326
      this.markNullableFieldAsSet("download_url");
×
UNCOV
327
      return this;
×
328
    }
329

330
    public Builder vanityUrl(String vanityUrl) {
UNCOV
331
      this.vanityUrl = vanityUrl;
×
UNCOV
332
      this.markNullableFieldAsSet("vanity_url");
×
UNCOV
333
      return this;
×
334
    }
335

336
    public Builder vanityName(String vanityName) {
UNCOV
337
      this.vanityName = vanityName;
×
UNCOV
338
      this.markNullableFieldAsSet("vanity_name");
×
339
      return this;
×
340
    }
341

342
    public Builder access(FileSharedLinkAccessField access) {
UNCOV
343
      this.access = new EnumWrapper<FileSharedLinkAccessField>(access);
×
344
      return this;
×
345
    }
346

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

352
    public Builder unsharedAt(Date unsharedAt) {
UNCOV
353
      this.unsharedAt = unsharedAt;
×
UNCOV
354
      this.markNullableFieldAsSet("unshared_at");
×
UNCOV
355
      return this;
×
356
    }
357

358
    public Builder permissions(FileSharedLinkPermissionsField permissions) {
UNCOV
359
      this.permissions = permissions;
×
UNCOV
360
      return this;
×
361
    }
362

363
    public FileSharedLinkField build() {
UNCOV
364
      return new FileSharedLinkField(this);
×
365
    }
366
  }
367
}
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