• 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

9.09
/src/main/java/com/box/sdkgen/schemas/termsofservice/TermsOfService.java
1
package com.box.sdkgen.schemas.termsofservice;
2

3
import com.box.sdkgen.internal.utils.DateTimeUtils;
4
import com.box.sdkgen.schemas.termsofservicebase.TermsOfServiceBase;
5
import com.box.sdkgen.schemas.termsofservicebase.TermsOfServiceBaseTypeField;
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 TermsOfService extends TermsOfServiceBase {
16

17
  @JsonDeserialize(using = TermsOfServiceStatusField.TermsOfServiceStatusFieldDeserializer.class)
18
  @JsonSerialize(using = TermsOfServiceStatusField.TermsOfServiceStatusFieldSerializer.class)
19
  protected EnumWrapper<TermsOfServiceStatusField> status;
20

21
  protected TermsOfServiceEnterpriseField enterprise;
22

23
  @JsonDeserialize(using = TermsOfServiceTosTypeField.TermsOfServiceTosTypeFieldDeserializer.class)
24
  @JsonSerialize(using = TermsOfServiceTosTypeField.TermsOfServiceTosTypeFieldSerializer.class)
25
  @JsonProperty("tos_type")
26
  protected EnumWrapper<TermsOfServiceTosTypeField> tosType;
27

28
  protected String text;
29

30
  @JsonProperty("created_at")
31
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
32
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
33
  protected Date createdAt;
34

35
  @JsonProperty("modified_at")
36
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
37
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
38
  protected Date modifiedAt;
39

40
  public TermsOfService(@JsonProperty("id") String id) {
41
    super(id);
1✔
42
  }
1✔
43

44
  protected TermsOfService(Builder builder) {
45
    super(builder);
×
46
    this.status = builder.status;
×
47
    this.enterprise = builder.enterprise;
×
48
    this.tosType = builder.tosType;
×
49
    this.text = builder.text;
×
50
    this.createdAt = builder.createdAt;
×
UNCOV
51
    this.modifiedAt = builder.modifiedAt;
×
UNCOV
52
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
UNCOV
53
  }
×
54

55
  public EnumWrapper<TermsOfServiceStatusField> getStatus() {
56
    return status;
1✔
57
  }
58

59
  public TermsOfServiceEnterpriseField getEnterprise() {
UNCOV
60
    return enterprise;
×
61
  }
62

63
  public EnumWrapper<TermsOfServiceTosTypeField> getTosType() {
64
    return tosType;
1✔
65
  }
66

67
  public String getText() {
68
    return text;
1✔
69
  }
70

71
  public Date getCreatedAt() {
UNCOV
72
    return createdAt;
×
73
  }
74

75
  public Date getModifiedAt() {
UNCOV
76
    return modifiedAt;
×
77
  }
78

79
  @Override
80
  public boolean equals(Object o) {
81
    if (this == o) {
×
82
      return true;
×
83
    }
84
    if (o == null || getClass() != o.getClass()) {
×
85
      return false;
×
86
    }
87
    TermsOfService casted = (TermsOfService) o;
×
88
    return Objects.equals(id, casted.id)
×
89
        && Objects.equals(type, casted.type)
×
90
        && Objects.equals(status, casted.status)
×
91
        && Objects.equals(enterprise, casted.enterprise)
×
92
        && Objects.equals(tosType, casted.tosType)
×
UNCOV
93
        && Objects.equals(text, casted.text)
×
UNCOV
94
        && Objects.equals(createdAt, casted.createdAt)
×
UNCOV
95
        && Objects.equals(modifiedAt, casted.modifiedAt);
×
96
  }
97

98
  @Override
99
  public int hashCode() {
UNCOV
100
    return Objects.hash(id, type, status, enterprise, tosType, text, createdAt, modifiedAt);
×
101
  }
102

103
  @Override
104
  public String toString() {
UNCOV
105
    return "TermsOfService{"
×
106
        + "id='"
107
        + id
108
        + '\''
109
        + ", "
110
        + "type='"
111
        + type
112
        + '\''
113
        + ", "
114
        + "status='"
115
        + status
116
        + '\''
117
        + ", "
118
        + "enterprise='"
119
        + enterprise
120
        + '\''
121
        + ", "
122
        + "tosType='"
123
        + tosType
124
        + '\''
125
        + ", "
126
        + "text='"
127
        + text
128
        + '\''
129
        + ", "
130
        + "createdAt='"
131
        + createdAt
132
        + '\''
133
        + ", "
134
        + "modifiedAt='"
135
        + modifiedAt
136
        + '\''
137
        + "}";
138
  }
139

140
  public static class Builder extends TermsOfServiceBase.Builder {
141

142
    protected EnumWrapper<TermsOfServiceStatusField> status;
143

144
    protected TermsOfServiceEnterpriseField enterprise;
145

146
    protected EnumWrapper<TermsOfServiceTosTypeField> tosType;
147

148
    protected String text;
149

150
    protected Date createdAt;
151

152
    protected Date modifiedAt;
153

154
    public Builder(String id) {
UNCOV
155
      super(id);
×
156
    }
×
157

158
    public Builder status(TermsOfServiceStatusField status) {
UNCOV
159
      this.status = new EnumWrapper<TermsOfServiceStatusField>(status);
×
UNCOV
160
      return this;
×
161
    }
162

163
    public Builder status(EnumWrapper<TermsOfServiceStatusField> status) {
UNCOV
164
      this.status = status;
×
UNCOV
165
      return this;
×
166
    }
167

168
    public Builder enterprise(TermsOfServiceEnterpriseField enterprise) {
UNCOV
169
      this.enterprise = enterprise;
×
UNCOV
170
      return this;
×
171
    }
172

173
    public Builder tosType(TermsOfServiceTosTypeField tosType) {
UNCOV
174
      this.tosType = new EnumWrapper<TermsOfServiceTosTypeField>(tosType);
×
UNCOV
175
      return this;
×
176
    }
177

178
    public Builder tosType(EnumWrapper<TermsOfServiceTosTypeField> tosType) {
UNCOV
179
      this.tosType = tosType;
×
UNCOV
180
      return this;
×
181
    }
182

183
    public Builder text(String text) {
UNCOV
184
      this.text = text;
×
UNCOV
185
      return this;
×
186
    }
187

188
    public Builder createdAt(Date createdAt) {
UNCOV
189
      this.createdAt = createdAt;
×
UNCOV
190
      return this;
×
191
    }
192

193
    public Builder modifiedAt(Date modifiedAt) {
UNCOV
194
      this.modifiedAt = modifiedAt;
×
UNCOV
195
      return this;
×
196
    }
197

198
    @Override
199
    public Builder type(TermsOfServiceBaseTypeField type) {
UNCOV
200
      this.type = new EnumWrapper<TermsOfServiceBaseTypeField>(type);
×
UNCOV
201
      return this;
×
202
    }
203

204
    @Override
205
    public Builder type(EnumWrapper<TermsOfServiceBaseTypeField> type) {
UNCOV
206
      this.type = type;
×
UNCOV
207
      return this;
×
208
    }
209

210
    public TermsOfService build() {
UNCOV
211
      return new TermsOfService(this);
×
212
    }
213
  }
214
}
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