• 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

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
/** A metadata template that holds the security classifications defined by an enterprise. */
14
@JsonFilter("nullablePropertyFilter")
15
public class ClassificationTemplate extends SerializableObject {
16

17
  /** The ID of the classification template. */
18
  protected final String id;
19

20
  /** The value will always be `metadata_template`. */
21
  @JsonDeserialize(
22
      using = ClassificationTemplateTypeField.ClassificationTemplateTypeFieldDeserializer.class)
23
  @JsonSerialize(
24
      using = ClassificationTemplateTypeField.ClassificationTemplateTypeFieldSerializer.class)
25
  protected EnumWrapper<ClassificationTemplateTypeField> type;
26

27
  /**
28
   * The scope of the classification template. This is in the format `enterprise_{id}` where the
29
   * `id` is the enterprise ID.
30
   */
31
  protected final String scope;
32

33
  /** The value will always be `securityClassification-6VMVochwUWo`. */
34
  @JsonDeserialize(
35
      using =
36
          ClassificationTemplateTemplateKeyField.ClassificationTemplateTemplateKeyFieldDeserializer
37
              .class)
38
  @JsonSerialize(
39
      using =
40
          ClassificationTemplateTemplateKeyField.ClassificationTemplateTemplateKeyFieldSerializer
41
              .class)
42
  protected EnumWrapper<ClassificationTemplateTemplateKeyField> templateKey;
43

44
  /** The name of this template as shown in web and mobile interfaces. */
45
  @JsonDeserialize(
46
      using =
47
          ClassificationTemplateDisplayNameField.ClassificationTemplateDisplayNameFieldDeserializer
48
              .class)
49
  @JsonSerialize(
50
      using =
51
          ClassificationTemplateDisplayNameField.ClassificationTemplateDisplayNameFieldSerializer
52
              .class)
53
  protected EnumWrapper<ClassificationTemplateDisplayNameField> displayName;
54

55
  /** Determines if the template is always available in web and mobile interfaces. */
56
  protected Boolean hidden;
57

58
  /** Determines if classifications are copied along when the file or folder is copied. */
59
  protected Boolean copyInstanceOnItemCopy;
60

61
  /**
62
   * A list of fields for this classification template. This includes only one field, the
63
   * `Box__Security__Classification__Key`, which defines the different classifications available in
64
   * this enterprise.
65
   */
66
  protected final List<ClassificationTemplateFieldsField> fields;
67

68
  public ClassificationTemplate(
69
      @JsonProperty("id") String id,
70
      @JsonProperty("scope") String scope,
71
      @JsonProperty("fields") List<ClassificationTemplateFieldsField> fields) {
72
    super();
1✔
73
    this.id = id;
1✔
74
    this.scope = scope;
1✔
75
    this.fields = fields;
1✔
76
    this.type =
1✔
77
        new EnumWrapper<ClassificationTemplateTypeField>(
78
            ClassificationTemplateTypeField.METADATA_TEMPLATE);
79
    this.templateKey =
1✔
80
        new EnumWrapper<ClassificationTemplateTemplateKeyField>(
81
            ClassificationTemplateTemplateKeyField.SECURITYCLASSIFICATION_6VMVOCHWUWO);
82
    this.displayName =
1✔
83
        new EnumWrapper<ClassificationTemplateDisplayNameField>(
84
            ClassificationTemplateDisplayNameField.CLASSIFICATION);
85
  }
1✔
86

87
  protected ClassificationTemplate(Builder builder) {
88
    super();
×
89
    this.id = builder.id;
×
90
    this.type = builder.type;
×
91
    this.scope = builder.scope;
×
92
    this.templateKey = builder.templateKey;
×
93
    this.displayName = builder.displayName;
×
94
    this.hidden = builder.hidden;
×
95
    this.copyInstanceOnItemCopy = builder.copyInstanceOnItemCopy;
×
96
    this.fields = builder.fields;
×
97
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
98
  }
×
99

100
  public String getId() {
101
    return id;
×
102
  }
103

104
  public EnumWrapper<ClassificationTemplateTypeField> getType() {
105
    return type;
×
106
  }
107

108
  public String getScope() {
109
    return scope;
×
110
  }
111

112
  public EnumWrapper<ClassificationTemplateTemplateKeyField> getTemplateKey() {
113
    return templateKey;
×
114
  }
115

116
  public EnumWrapper<ClassificationTemplateDisplayNameField> getDisplayName() {
117
    return displayName;
×
118
  }
119

120
  public Boolean getHidden() {
121
    return hidden;
×
122
  }
123

124
  public Boolean getCopyInstanceOnItemCopy() {
125
    return copyInstanceOnItemCopy;
×
126
  }
127

128
  public List<ClassificationTemplateFieldsField> getFields() {
129
    return fields;
1✔
130
  }
131

132
  @Override
133
  public boolean equals(Object o) {
134
    if (this == o) {
×
135
      return true;
×
136
    }
137
    if (o == null || getClass() != o.getClass()) {
×
138
      return false;
×
139
    }
140
    ClassificationTemplate casted = (ClassificationTemplate) o;
×
141
    return Objects.equals(id, casted.id)
×
142
        && Objects.equals(type, casted.type)
×
143
        && Objects.equals(scope, casted.scope)
×
144
        && Objects.equals(templateKey, casted.templateKey)
×
145
        && Objects.equals(displayName, casted.displayName)
×
146
        && Objects.equals(hidden, casted.hidden)
×
147
        && Objects.equals(copyInstanceOnItemCopy, casted.copyInstanceOnItemCopy)
×
148
        && Objects.equals(fields, casted.fields);
×
149
  }
150

151
  @Override
152
  public int hashCode() {
153
    return Objects.hash(
×
154
        id, type, scope, templateKey, displayName, hidden, copyInstanceOnItemCopy, fields);
155
  }
156

157
  @Override
158
  public String toString() {
159
    return "ClassificationTemplate{"
×
160
        + "id='"
161
        + id
162
        + '\''
163
        + ", "
164
        + "type='"
165
        + type
166
        + '\''
167
        + ", "
168
        + "scope='"
169
        + scope
170
        + '\''
171
        + ", "
172
        + "templateKey='"
173
        + templateKey
174
        + '\''
175
        + ", "
176
        + "displayName='"
177
        + displayName
178
        + '\''
179
        + ", "
180
        + "hidden='"
181
        + hidden
182
        + '\''
183
        + ", "
184
        + "copyInstanceOnItemCopy='"
185
        + copyInstanceOnItemCopy
186
        + '\''
187
        + ", "
188
        + "fields='"
189
        + fields
190
        + '\''
191
        + "}";
192
  }
193

194
  public static class Builder extends NullableFieldTracker {
195

196
    protected final String id;
197

198
    protected EnumWrapper<ClassificationTemplateTypeField> type;
199

200
    protected final String scope;
201

202
    protected EnumWrapper<ClassificationTemplateTemplateKeyField> templateKey;
203

204
    protected EnumWrapper<ClassificationTemplateDisplayNameField> displayName;
205

206
    protected Boolean hidden;
207

208
    protected Boolean copyInstanceOnItemCopy;
209

210
    protected final List<ClassificationTemplateFieldsField> fields;
211

212
    public Builder(String id, String scope, List<ClassificationTemplateFieldsField> fields) {
213
      super();
×
214
      this.id = id;
×
215
      this.scope = scope;
×
216
      this.fields = fields;
×
217
      this.type =
×
218
          new EnumWrapper<ClassificationTemplateTypeField>(
219
              ClassificationTemplateTypeField.METADATA_TEMPLATE);
220
      this.templateKey =
×
221
          new EnumWrapper<ClassificationTemplateTemplateKeyField>(
222
              ClassificationTemplateTemplateKeyField.SECURITYCLASSIFICATION_6VMVOCHWUWO);
223
      this.displayName =
×
224
          new EnumWrapper<ClassificationTemplateDisplayNameField>(
225
              ClassificationTemplateDisplayNameField.CLASSIFICATION);
226
    }
×
227

228
    public Builder type(ClassificationTemplateTypeField type) {
229
      this.type = new EnumWrapper<ClassificationTemplateTypeField>(type);
×
230
      return this;
×
231
    }
232

233
    public Builder type(EnumWrapper<ClassificationTemplateTypeField> type) {
234
      this.type = type;
×
235
      return this;
×
236
    }
237

238
    public Builder templateKey(ClassificationTemplateTemplateKeyField templateKey) {
239
      this.templateKey = new EnumWrapper<ClassificationTemplateTemplateKeyField>(templateKey);
×
240
      return this;
×
241
    }
242

243
    public Builder templateKey(EnumWrapper<ClassificationTemplateTemplateKeyField> templateKey) {
244
      this.templateKey = templateKey;
×
245
      return this;
×
246
    }
247

248
    public Builder displayName(ClassificationTemplateDisplayNameField displayName) {
249
      this.displayName = new EnumWrapper<ClassificationTemplateDisplayNameField>(displayName);
×
250
      return this;
×
251
    }
252

253
    public Builder displayName(EnumWrapper<ClassificationTemplateDisplayNameField> displayName) {
254
      this.displayName = displayName;
×
255
      return this;
×
256
    }
257

258
    public Builder hidden(Boolean hidden) {
259
      this.hidden = hidden;
×
260
      return this;
×
261
    }
262

263
    public Builder copyInstanceOnItemCopy(Boolean copyInstanceOnItemCopy) {
264
      this.copyInstanceOnItemCopy = copyInstanceOnItemCopy;
×
265
      return this;
×
266
    }
267

268
    public ClassificationTemplate build() {
269
      return new ClassificationTemplate(this);
×
270
    }
271
  }
272
}
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