• 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

10.0
/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
      @JsonProperty("url") String url,
77
      @JsonProperty("effective_access")
78
          EnumWrapper<FolderSharedLinkEffectiveAccessField> effectiveAccess,
79
      @JsonProperty("effective_permission")
80
          EnumWrapper<FolderSharedLinkEffectivePermissionField> effectivePermission,
81
      @JsonProperty("is_password_enabled") boolean isPasswordEnabled,
82
      @JsonProperty("download_count") long downloadCount,
83
      @JsonProperty("preview_count") long previewCount) {
84
    super();
1✔
85
    this.url = url;
1✔
86
    this.effectiveAccess = effectiveAccess;
1✔
87
    this.effectivePermission = effectivePermission;
1✔
88
    this.isPasswordEnabled = isPasswordEnabled;
1✔
89
    this.downloadCount = downloadCount;
1✔
90
    this.previewCount = previewCount;
1✔
91
  }
1✔
92

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

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

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

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

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

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

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

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

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

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

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

163
  public FolderSharedLinkPermissionsField getPermissions() {
UNCOV
164
    return permissions;
×
165
  }
166

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

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

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

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

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

268
  public static class Builder extends NullableFieldTracker {
269

270
    protected final String url;
271

272
    protected String downloadUrl;
273

274
    protected String vanityUrl;
275

276
    protected String vanityName;
277

278
    protected EnumWrapper<FolderSharedLinkAccessField> access;
279

280
    protected final EnumWrapper<FolderSharedLinkEffectiveAccessField> effectiveAccess;
281

282
    protected final EnumWrapper<FolderSharedLinkEffectivePermissionField> effectivePermission;
283

284
    protected Date unsharedAt;
285

286
    protected final boolean isPasswordEnabled;
287

288
    protected FolderSharedLinkPermissionsField permissions;
289

290
    protected final long downloadCount;
291

292
    protected final long previewCount;
293

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

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

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

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

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

345
    public Builder access(FolderSharedLinkAccessField access) {
UNCOV
346
      this.access = new EnumWrapper<FolderSharedLinkAccessField>(access);
×
347
      return this;
×
348
    }
349

350
    public Builder access(EnumWrapper<FolderSharedLinkAccessField> access) {
UNCOV
351
      this.access = access;
×
352
      return this;
×
353
    }
354

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

361
    public Builder permissions(FolderSharedLinkPermissionsField permissions) {
UNCOV
362
      this.permissions = permissions;
×
UNCOV
363
      return this;
×
364
    }
365

366
    public FolderSharedLinkField build() {
UNCOV
367
      return new FolderSharedLinkField(this);
×
368
    }
369
  }
370
}
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