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

box / box-java-sdk / #5076

07 Oct 2025 12:35PM UTC coverage: 37.132% (+0.007%) from 37.125%
#5076

push

github

web-flow
test: Change `Event.additionalDetails` field assertion in events test (box/box-codegen#858) (#1491)

18454 of 49699 relevant lines covered (37.13%)

0.37 hits per line

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

14.71
/src/main/java/com/box/sdkgen/schemas/zipdownload/ZipDownload.java
1
package com.box.sdkgen.schemas.zipdownload;
2

3
import com.box.sdkgen.internal.NullableFieldTracker;
4
import com.box.sdkgen.internal.SerializableObject;
5
import com.box.sdkgen.internal.utils.DateTimeUtils;
6
import com.fasterxml.jackson.annotation.JsonFilter;
7
import com.fasterxml.jackson.annotation.JsonProperty;
8
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
9
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
10
import java.time.OffsetDateTime;
11
import java.util.List;
12
import java.util.Objects;
13

14
/** Represents a successful request to create a `zip` archive of a list of files and folders. */
15
@JsonFilter("nullablePropertyFilter")
16
public class ZipDownload extends SerializableObject {
17

18
  /**
19
   * The URL that can be used to download the `zip` archive. A `Get` request to this URL will start
20
   * streaming the items requested. By default, this URL is only valid for a few seconds, until the
21
   * `expires_at` time, unless a download is started after which it is valid for the duration of the
22
   * download.
23
   *
24
   * <p>It is important to note that the domain and path of this URL might change between API calls,
25
   * and therefore it's important to use this URL as-is.
26
   */
27
  @JsonProperty("download_url")
28
  protected String downloadUrl;
29

30
  /**
31
   * The URL that can be used to get the status of the `zip` archive being downloaded. A `Get`
32
   * request to this URL will return the number of files in the archive as well as the number of
33
   * items already downloaded or skipped. By default, this URL is only valid for a few seconds,
34
   * until the `expires_at` time, unless a download is started after which the URL is valid for 12
35
   * hours from the start of the download.
36
   *
37
   * <p>It is important to note that the domain and path of this URL might change between API calls,
38
   * and therefore it's important to use this URL as-is.
39
   */
40
  @JsonProperty("status_url")
41
  protected String statusUrl;
42

43
  /**
44
   * The time and date when this archive will expire. After this time the `status_url` and
45
   * `download_url` will return an error.
46
   *
47
   * <p>By default, these URLs are only valid for a few seconds, unless a download is started after
48
   * which the `download_url` is valid for the duration of the download, and the `status_url` is
49
   * valid for 12 hours from the start of the download.
50
   */
51
  @JsonProperty("expires_at")
52
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
53
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
54
  protected OffsetDateTime expiresAt;
55

56
  /**
57
   * A list of conflicts that occurred when trying to create the archive. This would occur when
58
   * multiple items have been requested with the same name.
59
   *
60
   * <p>To solve these conflicts, the API will automatically rename an item and return a mapping
61
   * between the original item's name and its new name.
62
   *
63
   * <p>For every conflict, both files will be renamed and therefore this list will always be a
64
   * multiple of 2.
65
   */
66
  @JsonProperty("name_conflicts")
67
  protected List<List<ZipDownloadNameConflictsField>> nameConflicts;
68

69
  public ZipDownload() {
70
    super();
1✔
71
  }
1✔
72

73
  protected ZipDownload(Builder builder) {
74
    super();
×
75
    this.downloadUrl = builder.downloadUrl;
×
76
    this.statusUrl = builder.statusUrl;
×
77
    this.expiresAt = builder.expiresAt;
×
78
    this.nameConflicts = builder.nameConflicts;
×
79
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
80
  }
×
81

82
  public String getDownloadUrl() {
83
    return downloadUrl;
1✔
84
  }
85

86
  public String getStatusUrl() {
87
    return statusUrl;
1✔
88
  }
89

90
  public OffsetDateTime getExpiresAt() {
91
    return expiresAt;
1✔
92
  }
93

94
  public List<List<ZipDownloadNameConflictsField>> getNameConflicts() {
95
    return nameConflicts;
×
96
  }
97

98
  @Override
99
  public boolean equals(Object o) {
100
    if (this == o) {
×
101
      return true;
×
102
    }
103
    if (o == null || getClass() != o.getClass()) {
×
104
      return false;
×
105
    }
106
    ZipDownload casted = (ZipDownload) o;
×
107
    return Objects.equals(downloadUrl, casted.downloadUrl)
×
108
        && Objects.equals(statusUrl, casted.statusUrl)
×
109
        && Objects.equals(expiresAt, casted.expiresAt)
×
110
        && Objects.equals(nameConflicts, casted.nameConflicts);
×
111
  }
112

113
  @Override
114
  public int hashCode() {
115
    return Objects.hash(downloadUrl, statusUrl, expiresAt, nameConflicts);
×
116
  }
117

118
  @Override
119
  public String toString() {
120
    return "ZipDownload{"
×
121
        + "downloadUrl='"
122
        + downloadUrl
123
        + '\''
124
        + ", "
125
        + "statusUrl='"
126
        + statusUrl
127
        + '\''
128
        + ", "
129
        + "expiresAt='"
130
        + expiresAt
131
        + '\''
132
        + ", "
133
        + "nameConflicts='"
134
        + nameConflicts
135
        + '\''
136
        + "}";
137
  }
138

139
  public static class Builder extends NullableFieldTracker {
×
140

141
    protected String downloadUrl;
142

143
    protected String statusUrl;
144

145
    protected OffsetDateTime expiresAt;
146

147
    protected List<List<ZipDownloadNameConflictsField>> nameConflicts;
148

149
    public Builder downloadUrl(String downloadUrl) {
150
      this.downloadUrl = downloadUrl;
×
151
      return this;
×
152
    }
153

154
    public Builder statusUrl(String statusUrl) {
155
      this.statusUrl = statusUrl;
×
156
      return this;
×
157
    }
158

159
    public Builder expiresAt(OffsetDateTime expiresAt) {
160
      this.expiresAt = expiresAt;
×
161
      return this;
×
162
    }
163

164
    public Builder nameConflicts(List<List<ZipDownloadNameConflictsField>> nameConflicts) {
165
      this.nameConflicts = nameConflicts;
×
166
      return this;
×
167
    }
168

169
    public ZipDownload build() {
170
      return new ZipDownload(this);
×
171
    }
172
  }
173
}
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