• 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

13.43
/src/main/java/com/box/sdkgen/schemas/classificationtemplate/ClassificationTemplate.java
1
package com.box.sdkgen.schemas.classificationtemplate;
2

3
import com.box.sdkgen.internal.NullableFieldTracker;
4
import com.box.sdkgen.internal.SerializableObject;
5
import com.box.sdkgen.serialization.json.EnumWrapper;
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.util.List;
11
import java.util.Objects;
12

13
@JsonFilter("nullablePropertyFilter")
14
public class ClassificationTemplate extends SerializableObject {
15

16
  protected final String id;
17

18
  @JsonDeserialize(
19
      using = ClassificationTemplateTypeField.ClassificationTemplateTypeFieldDeserializer.class)
20
  @JsonSerialize(
21
      using = ClassificationTemplateTypeField.ClassificationTemplateTypeFieldSerializer.class)
22
  protected EnumWrapper<ClassificationTemplateTypeField> type;
23

24
  protected final String scope;
25

26
  @JsonDeserialize(
27
      using =
28
          ClassificationTemplateTemplateKeyField.ClassificationTemplateTemplateKeyFieldDeserializer
29
              .class)
30
  @JsonSerialize(
31
      using =
32
          ClassificationTemplateTemplateKeyField.ClassificationTemplateTemplateKeyFieldSerializer
33
              .class)
34
  protected EnumWrapper<ClassificationTemplateTemplateKeyField> templateKey;
35

36
  @JsonDeserialize(
37
      using =
38
          ClassificationTemplateDisplayNameField.ClassificationTemplateDisplayNameFieldDeserializer
39
              .class)
40
  @JsonSerialize(
41
      using =
42
          ClassificationTemplateDisplayNameField.ClassificationTemplateDisplayNameFieldSerializer
43
              .class)
44
  protected EnumWrapper<ClassificationTemplateDisplayNameField> displayName;
45

46
  protected Boolean hidden;
47

48
  protected Boolean copyInstanceOnItemCopy;
49

50
  protected final List<ClassificationTemplateFieldsField> fields;
51

52
  public ClassificationTemplate(
53
      @JsonProperty("id") String id,
54
      @JsonProperty("scope") String scope,
55
      @JsonProperty("fields") List<ClassificationTemplateFieldsField> fields) {
56
    super();
1✔
57
    this.id = id;
1✔
58
    this.scope = scope;
1✔
59
    this.fields = fields;
1✔
60
    this.type =
1✔
61
        new EnumWrapper<ClassificationTemplateTypeField>(
62
            ClassificationTemplateTypeField.METADATA_TEMPLATE);
63
    this.templateKey =
1✔
64
        new EnumWrapper<ClassificationTemplateTemplateKeyField>(
65
            ClassificationTemplateTemplateKeyField.SECURITYCLASSIFICATION_6VMVOCHWUWO);
66
    this.displayName =
1✔
67
        new EnumWrapper<ClassificationTemplateDisplayNameField>(
68
            ClassificationTemplateDisplayNameField.CLASSIFICATION);
69
  }
1✔
70

71
  protected ClassificationTemplate(Builder builder) {
72
    super();
×
73
    this.id = builder.id;
×
74
    this.type = builder.type;
×
75
    this.scope = builder.scope;
×
76
    this.templateKey = builder.templateKey;
×
77
    this.displayName = builder.displayName;
×
78
    this.hidden = builder.hidden;
×
UNCOV
79
    this.copyInstanceOnItemCopy = builder.copyInstanceOnItemCopy;
×
UNCOV
80
    this.fields = builder.fields;
×
81
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
UNCOV
82
  }
×
83

84
  public String getId() {
85
    return id;
×
86
  }
87

88
  public EnumWrapper<ClassificationTemplateTypeField> getType() {
89
    return type;
×
90
  }
91

92
  public String getScope() {
93
    return scope;
×
94
  }
95

96
  public EnumWrapper<ClassificationTemplateTemplateKeyField> getTemplateKey() {
97
    return templateKey;
×
98
  }
99

100
  public EnumWrapper<ClassificationTemplateDisplayNameField> getDisplayName() {
101
    return displayName;
×
102
  }
103

104
  public Boolean getHidden() {
105
    return hidden;
×
106
  }
107

108
  public Boolean getCopyInstanceOnItemCopy() {
UNCOV
109
    return copyInstanceOnItemCopy;
×
110
  }
111

112
  public List<ClassificationTemplateFieldsField> getFields() {
113
    return fields;
1✔
114
  }
115

116
  @Override
117
  public boolean equals(Object o) {
118
    if (this == o) {
×
UNCOV
119
      return true;
×
120
    }
121
    if (o == null || getClass() != o.getClass()) {
×
122
      return false;
×
123
    }
124
    ClassificationTemplate casted = (ClassificationTemplate) o;
×
125
    return Objects.equals(id, casted.id)
×
126
        && Objects.equals(type, casted.type)
×
127
        && Objects.equals(scope, casted.scope)
×
128
        && Objects.equals(templateKey, casted.templateKey)
×
UNCOV
129
        && Objects.equals(displayName, casted.displayName)
×
UNCOV
130
        && Objects.equals(hidden, casted.hidden)
×
UNCOV
131
        && Objects.equals(copyInstanceOnItemCopy, casted.copyInstanceOnItemCopy)
×
UNCOV
132
        && Objects.equals(fields, casted.fields);
×
133
  }
134

135
  @Override
136
  public int hashCode() {
UNCOV
137
    return Objects.hash(
×
138
        id, type, scope, templateKey, displayName, hidden, copyInstanceOnItemCopy, fields);
139
  }
140

141
  @Override
142
  public String toString() {
UNCOV
143
    return "ClassificationTemplate{"
×
144
        + "id='"
145
        + id
146
        + '\''
147
        + ", "
148
        + "type='"
149
        + type
150
        + '\''
151
        + ", "
152
        + "scope='"
153
        + scope
154
        + '\''
155
        + ", "
156
        + "templateKey='"
157
        + templateKey
158
        + '\''
159
        + ", "
160
        + "displayName='"
161
        + displayName
162
        + '\''
163
        + ", "
164
        + "hidden='"
165
        + hidden
166
        + '\''
167
        + ", "
168
        + "copyInstanceOnItemCopy='"
169
        + copyInstanceOnItemCopy
170
        + '\''
171
        + ", "
172
        + "fields='"
173
        + fields
174
        + '\''
175
        + "}";
176
  }
177

178
  public static class Builder extends NullableFieldTracker {
179

180
    protected final String id;
181

182
    protected EnumWrapper<ClassificationTemplateTypeField> type;
183

184
    protected final String scope;
185

186
    protected EnumWrapper<ClassificationTemplateTemplateKeyField> templateKey;
187

188
    protected EnumWrapper<ClassificationTemplateDisplayNameField> displayName;
189

190
    protected Boolean hidden;
191

192
    protected Boolean copyInstanceOnItemCopy;
193

194
    protected final List<ClassificationTemplateFieldsField> fields;
195

196
    public Builder(String id, String scope, List<ClassificationTemplateFieldsField> fields) {
UNCOV
197
      super();
×
UNCOV
198
      this.id = id;
×
199
      this.scope = scope;
×
UNCOV
200
      this.fields = fields;
×
UNCOV
201
      this.type =
×
202
          new EnumWrapper<ClassificationTemplateTypeField>(
203
              ClassificationTemplateTypeField.METADATA_TEMPLATE);
UNCOV
204
      this.templateKey =
×
205
          new EnumWrapper<ClassificationTemplateTemplateKeyField>(
206
              ClassificationTemplateTemplateKeyField.SECURITYCLASSIFICATION_6VMVOCHWUWO);
UNCOV
207
      this.displayName =
×
208
          new EnumWrapper<ClassificationTemplateDisplayNameField>(
209
              ClassificationTemplateDisplayNameField.CLASSIFICATION);
UNCOV
210
    }
×
211

212
    public Builder type(ClassificationTemplateTypeField type) {
213
      this.type = new EnumWrapper<ClassificationTemplateTypeField>(type);
×
214
      return this;
×
215
    }
216

217
    public Builder type(EnumWrapper<ClassificationTemplateTypeField> type) {
218
      this.type = type;
×
219
      return this;
×
220
    }
221

222
    public Builder templateKey(ClassificationTemplateTemplateKeyField templateKey) {
223
      this.templateKey = new EnumWrapper<ClassificationTemplateTemplateKeyField>(templateKey);
×
224
      return this;
×
225
    }
226

227
    public Builder templateKey(EnumWrapper<ClassificationTemplateTemplateKeyField> templateKey) {
228
      this.templateKey = templateKey;
×
229
      return this;
×
230
    }
231

232
    public Builder displayName(ClassificationTemplateDisplayNameField displayName) {
233
      this.displayName = new EnumWrapper<ClassificationTemplateDisplayNameField>(displayName);
×
234
      return this;
×
235
    }
236

237
    public Builder displayName(EnumWrapper<ClassificationTemplateDisplayNameField> displayName) {
238
      this.displayName = displayName;
×
239
      return this;
×
240
    }
241

242
    public Builder hidden(Boolean hidden) {
243
      this.hidden = hidden;
×
244
      return this;
×
245
    }
246

247
    public Builder copyInstanceOnItemCopy(Boolean copyInstanceOnItemCopy) {
248
      this.copyInstanceOnItemCopy = copyInstanceOnItemCopy;
×
UNCOV
249
      return this;
×
250
    }
251

252
    public ClassificationTemplate build() {
UNCOV
253
      return new ClassificationTemplate(this);
×
254
    }
255
  }
256
}
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