• 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

5.36
/src/main/java/com/box/sdkgen/schemas/classification/Classification.java
1
package com.box.sdkgen.schemas.classification;
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.Objects;
11

12
/**
13
 * An instance of the classification metadata template, containing the classification applied to the
14
 * file or folder.
15
 *
16
 * <p>To get more details about the classification applied to an item, request the classification
17
 * metadata template.
18
 */
19
@JsonFilter("nullablePropertyFilter")
20
public class Classification extends SerializableObject {
21

22
  /** The name of the classification applied to the item. */
23
  @JsonProperty("Box__Security__Classification__Key")
24
  protected String boxSecurityClassificationKey;
25

26
  /**
27
   * The identifier of the item that this metadata instance has been attached to. This combines the
28
   * `type` and the `id` of the parent in the form `{type}_{id}`.
29
   */
30
  @JsonProperty("$parent")
31
  protected String parent;
32

33
  /** The value will always be `securityClassification-6VMVochwUWo`. */
34
  @JsonDeserialize(
35
      using = ClassificationTemplateField.ClassificationTemplateFieldDeserializer.class)
36
  @JsonSerialize(using = ClassificationTemplateField.ClassificationTemplateFieldSerializer.class)
37
  @JsonProperty("$template")
38
  protected EnumWrapper<ClassificationTemplateField> template;
39

40
  /**
41
   * The scope of the enterprise that this classification has been applied for.
42
   *
43
   * <p>This will be in the format `enterprise_{enterprise_id}`.
44
   */
45
  @JsonProperty("$scope")
46
  protected String scope;
47

48
  /**
49
   * The version of the metadata instance. This version starts at 0 and increases every time a
50
   * classification is updated.
51
   */
52
  @JsonProperty("$version")
53
  protected Long version;
54

55
  /**
56
   * The unique ID of this classification instance. This will be include the name of the
57
   * classification template and a unique ID.
58
   */
59
  @JsonProperty("$type")
60
  protected String type;
61

62
  /**
63
   * The version of the metadata template. This version starts at 0 and increases every time the
64
   * template is updated. This is mostly for internal use.
65
   */
66
  @JsonProperty("$typeVersion")
67
  protected Double typeVersion;
68

69
  /** Whether an end user can change the classification. */
70
  @JsonProperty("$canEdit")
71
  protected Boolean canEdit;
72

73
  public Classification() {
74
    super();
1✔
75
  }
1✔
76

77
  protected Classification(Builder builder) {
78
    super();
×
79
    this.boxSecurityClassificationKey = builder.boxSecurityClassificationKey;
×
80
    this.parent = builder.parent;
×
81
    this.template = builder.template;
×
82
    this.scope = builder.scope;
×
83
    this.version = builder.version;
×
84
    this.type = builder.type;
×
85
    this.typeVersion = builder.typeVersion;
×
86
    this.canEdit = builder.canEdit;
×
87
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
88
  }
×
89

90
  public String getBoxSecurityClassificationKey() {
91
    return boxSecurityClassificationKey;
1✔
92
  }
93

94
  public String getParent() {
95
    return parent;
×
96
  }
97

98
  public EnumWrapper<ClassificationTemplateField> getTemplate() {
99
    return template;
×
100
  }
101

102
  public String getScope() {
103
    return scope;
×
104
  }
105

106
  public Long getVersion() {
107
    return version;
×
108
  }
109

110
  public String getType() {
111
    return type;
×
112
  }
113

114
  public Double getTypeVersion() {
115
    return typeVersion;
×
116
  }
117

118
  public Boolean getCanEdit() {
119
    return canEdit;
×
120
  }
121

122
  @Override
123
  public boolean equals(Object o) {
124
    if (this == o) {
×
125
      return true;
×
126
    }
127
    if (o == null || getClass() != o.getClass()) {
×
128
      return false;
×
129
    }
130
    Classification casted = (Classification) o;
×
131
    return Objects.equals(boxSecurityClassificationKey, casted.boxSecurityClassificationKey)
×
132
        && Objects.equals(parent, casted.parent)
×
133
        && Objects.equals(template, casted.template)
×
134
        && Objects.equals(scope, casted.scope)
×
135
        && Objects.equals(version, casted.version)
×
136
        && Objects.equals(type, casted.type)
×
137
        && Objects.equals(typeVersion, casted.typeVersion)
×
138
        && Objects.equals(canEdit, casted.canEdit);
×
139
  }
140

141
  @Override
142
  public int hashCode() {
143
    return Objects.hash(
×
144
        boxSecurityClassificationKey, parent, template, scope, version, type, typeVersion, canEdit);
145
  }
146

147
  @Override
148
  public String toString() {
149
    return "Classification{"
×
150
        + "boxSecurityClassificationKey='"
151
        + boxSecurityClassificationKey
152
        + '\''
153
        + ", "
154
        + "parent='"
155
        + parent
156
        + '\''
157
        + ", "
158
        + "template='"
159
        + template
160
        + '\''
161
        + ", "
162
        + "scope='"
163
        + scope
164
        + '\''
165
        + ", "
166
        + "version='"
167
        + version
168
        + '\''
169
        + ", "
170
        + "type='"
171
        + type
172
        + '\''
173
        + ", "
174
        + "typeVersion='"
175
        + typeVersion
176
        + '\''
177
        + ", "
178
        + "canEdit='"
179
        + canEdit
180
        + '\''
181
        + "}";
182
  }
183

184
  public static class Builder extends NullableFieldTracker {
×
185

186
    protected String boxSecurityClassificationKey;
187

188
    protected String parent;
189

190
    protected EnumWrapper<ClassificationTemplateField> template;
191

192
    protected String scope;
193

194
    protected Long version;
195

196
    protected String type;
197

198
    protected Double typeVersion;
199

200
    protected Boolean canEdit;
201

202
    public Builder boxSecurityClassificationKey(String boxSecurityClassificationKey) {
203
      this.boxSecurityClassificationKey = boxSecurityClassificationKey;
×
204
      return this;
×
205
    }
206

207
    public Builder parent(String parent) {
208
      this.parent = parent;
×
209
      return this;
×
210
    }
211

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

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

222
    public Builder scope(String scope) {
223
      this.scope = scope;
×
224
      return this;
×
225
    }
226

227
    public Builder version(Long version) {
228
      this.version = version;
×
229
      return this;
×
230
    }
231

232
    public Builder type(String type) {
233
      this.type = type;
×
234
      return this;
×
235
    }
236

237
    public Builder typeVersion(Double typeVersion) {
238
      this.typeVersion = typeVersion;
×
239
      return this;
×
240
    }
241

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

247
    public Classification build() {
248
      return new Classification(this);
×
249
    }
250
  }
251
}
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