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

box / box-java-sdk-gen / #295

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

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

13.73
/src/main/java/com/box/sdkgen/schemas/uploadsession/UploadSession.java
1
package com.box.sdkgen.schemas.uploadsession;
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.box.sdkgen.serialization.json.EnumWrapper;
7
import com.fasterxml.jackson.annotation.JsonFilter;
8
import com.fasterxml.jackson.annotation.JsonProperty;
9
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
10
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
11
import java.util.Date;
12
import java.util.Objects;
13

14
@JsonFilter("nullablePropertyFilter")
15
public class UploadSession extends SerializableObject {
16

17
  protected String id;
18

19
  @JsonDeserialize(using = UploadSessionTypeField.UploadSessionTypeFieldDeserializer.class)
20
  @JsonSerialize(using = UploadSessionTypeField.UploadSessionTypeFieldSerializer.class)
21
  protected EnumWrapper<UploadSessionTypeField> type;
22

23
  @JsonProperty("session_expires_at")
24
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
25
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
26
  protected Date sessionExpiresAt;
27

28
  @JsonProperty("part_size")
29
  protected Long partSize;
30

31
  @JsonProperty("total_parts")
32
  protected Integer totalParts;
33

34
  @JsonProperty("num_parts_processed")
35
  protected Integer numPartsProcessed;
36

37
  @JsonProperty("session_endpoints")
38
  protected UploadSessionSessionEndpointsField sessionEndpoints;
39

40
  public UploadSession() {
41
    super();
1✔
42
  }
1✔
43

44
  protected UploadSession(Builder builder) {
45
    super();
×
46
    this.id = builder.id;
×
47
    this.type = builder.type;
×
48
    this.sessionExpiresAt = builder.sessionExpiresAt;
×
49
    this.partSize = builder.partSize;
×
50
    this.totalParts = builder.totalParts;
×
UNCOV
51
    this.numPartsProcessed = builder.numPartsProcessed;
×
UNCOV
52
    this.sessionEndpoints = builder.sessionEndpoints;
×
UNCOV
53
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
UNCOV
54
  }
×
55

56
  public String getId() {
57
    return id;
1✔
58
  }
59

60
  public EnumWrapper<UploadSessionTypeField> getType() {
61
    return type;
×
62
  }
63

64
  public Date getSessionExpiresAt() {
UNCOV
65
    return sessionExpiresAt;
×
66
  }
67

68
  public Long getPartSize() {
69
    return partSize;
1✔
70
  }
71

72
  public Integer getTotalParts() {
73
    return totalParts;
1✔
74
  }
75

76
  public Integer getNumPartsProcessed() {
77
    return numPartsProcessed;
1✔
78
  }
79

80
  public UploadSessionSessionEndpointsField getSessionEndpoints() {
81
    return sessionEndpoints;
1✔
82
  }
83

84
  @Override
85
  public boolean equals(Object o) {
86
    if (this == o) {
×
UNCOV
87
      return true;
×
88
    }
89
    if (o == null || getClass() != o.getClass()) {
×
90
      return false;
×
91
    }
92
    UploadSession casted = (UploadSession) o;
×
93
    return Objects.equals(id, casted.id)
×
94
        && Objects.equals(type, casted.type)
×
95
        && Objects.equals(sessionExpiresAt, casted.sessionExpiresAt)
×
UNCOV
96
        && Objects.equals(partSize, casted.partSize)
×
UNCOV
97
        && Objects.equals(totalParts, casted.totalParts)
×
UNCOV
98
        && Objects.equals(numPartsProcessed, casted.numPartsProcessed)
×
UNCOV
99
        && Objects.equals(sessionEndpoints, casted.sessionEndpoints);
×
100
  }
101

102
  @Override
103
  public int hashCode() {
UNCOV
104
    return Objects.hash(
×
105
        id, type, sessionExpiresAt, partSize, totalParts, numPartsProcessed, sessionEndpoints);
106
  }
107

108
  @Override
109
  public String toString() {
UNCOV
110
    return "UploadSession{"
×
111
        + "id='"
112
        + id
113
        + '\''
114
        + ", "
115
        + "type='"
116
        + type
117
        + '\''
118
        + ", "
119
        + "sessionExpiresAt='"
120
        + sessionExpiresAt
121
        + '\''
122
        + ", "
123
        + "partSize='"
124
        + partSize
125
        + '\''
126
        + ", "
127
        + "totalParts='"
128
        + totalParts
129
        + '\''
130
        + ", "
131
        + "numPartsProcessed='"
132
        + numPartsProcessed
133
        + '\''
134
        + ", "
135
        + "sessionEndpoints='"
136
        + sessionEndpoints
137
        + '\''
138
        + "}";
139
  }
140

UNCOV
141
  public static class Builder extends NullableFieldTracker {
×
142

143
    protected String id;
144

145
    protected EnumWrapper<UploadSessionTypeField> type;
146

147
    protected Date sessionExpiresAt;
148

149
    protected Long partSize;
150

151
    protected Integer totalParts;
152

153
    protected Integer numPartsProcessed;
154

155
    protected UploadSessionSessionEndpointsField sessionEndpoints;
156

157
    public Builder id(String id) {
UNCOV
158
      this.id = id;
×
159
      return this;
×
160
    }
161

162
    public Builder type(UploadSessionTypeField type) {
UNCOV
163
      this.type = new EnumWrapper<UploadSessionTypeField>(type);
×
164
      return this;
×
165
    }
166

167
    public Builder type(EnumWrapper<UploadSessionTypeField> type) {
UNCOV
168
      this.type = type;
×
169
      return this;
×
170
    }
171

172
    public Builder sessionExpiresAt(Date sessionExpiresAt) {
UNCOV
173
      this.sessionExpiresAt = sessionExpiresAt;
×
174
      return this;
×
175
    }
176

177
    public Builder partSize(Long partSize) {
UNCOV
178
      this.partSize = partSize;
×
179
      return this;
×
180
    }
181

182
    public Builder totalParts(Integer totalParts) {
UNCOV
183
      this.totalParts = totalParts;
×
184
      return this;
×
185
    }
186

187
    public Builder numPartsProcessed(Integer numPartsProcessed) {
UNCOV
188
      this.numPartsProcessed = numPartsProcessed;
×
189
      return this;
×
190
    }
191

192
    public Builder sessionEndpoints(UploadSessionSessionEndpointsField sessionEndpoints) {
UNCOV
193
      this.sessionEndpoints = sessionEndpoints;
×
194
      return this;
×
195
    }
196

197
    public UploadSession build() {
UNCOV
198
      return new UploadSession(this);
×
199
    }
200
  }
201
}
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