• 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

0.0
/src/main/java/com/box/sdkgen/managers/classifications/CreateClassificationTemplateRequestBody.java
1
package com.box.sdkgen.managers.classifications;
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 CreateClassificationTemplateRequestBody extends SerializableObject {
15

16
  /**
17
   * The scope in which to create the classifications. This should be `enterprise` or
18
   * `enterprise_{id}` where `id` is the unique ID of the enterprise.
19
   */
20
  @JsonDeserialize(
21
      using =
22
          CreateClassificationTemplateRequestBodyScopeField
23
              .CreateClassificationTemplateRequestBodyScopeFieldDeserializer.class)
24
  @JsonSerialize(
25
      using =
26
          CreateClassificationTemplateRequestBodyScopeField
27
              .CreateClassificationTemplateRequestBodyScopeFieldSerializer.class)
28
  protected EnumWrapper<CreateClassificationTemplateRequestBodyScopeField> scope;
29

30
  /** Defines the list of metadata templates. */
31
  @JsonDeserialize(
32
      using =
33
          CreateClassificationTemplateRequestBodyTemplateKeyField
34
              .CreateClassificationTemplateRequestBodyTemplateKeyFieldDeserializer.class)
35
  @JsonSerialize(
36
      using =
37
          CreateClassificationTemplateRequestBodyTemplateKeyField
38
              .CreateClassificationTemplateRequestBodyTemplateKeyFieldSerializer.class)
39
  protected EnumWrapper<CreateClassificationTemplateRequestBodyTemplateKeyField> templateKey;
40

41
  /** The name of the template as shown in web and mobile interfaces. */
42
  @JsonDeserialize(
43
      using =
44
          CreateClassificationTemplateRequestBodyDisplayNameField
45
              .CreateClassificationTemplateRequestBodyDisplayNameFieldDeserializer.class)
46
  @JsonSerialize(
47
      using =
48
          CreateClassificationTemplateRequestBodyDisplayNameField
49
              .CreateClassificationTemplateRequestBodyDisplayNameFieldSerializer.class)
50
  protected EnumWrapper<CreateClassificationTemplateRequestBodyDisplayNameField> displayName;
51

52
  /** Determines if the classification template is hidden or available on web and mobile devices. */
53
  protected Boolean hidden;
54

55
  /** Determines if classifications are copied along when the file or folder is copied. */
56
  protected Boolean copyInstanceOnItemCopy;
57

58
  /**
59
   * The classification template requires exactly one field, which holds all the valid
60
   * classification values.
61
   */
62
  protected final List<CreateClassificationTemplateRequestBodyFieldsField> fields;
63

64
  public CreateClassificationTemplateRequestBody(
65
      @JsonProperty("fields") List<CreateClassificationTemplateRequestBodyFieldsField> fields) {
66
    super();
×
67
    this.fields = fields;
×
68
    this.scope =
×
69
        new EnumWrapper<CreateClassificationTemplateRequestBodyScopeField>(
70
            CreateClassificationTemplateRequestBodyScopeField.ENTERPRISE);
71
    this.templateKey =
×
72
        new EnumWrapper<CreateClassificationTemplateRequestBodyTemplateKeyField>(
73
            CreateClassificationTemplateRequestBodyTemplateKeyField
74
                .SECURITYCLASSIFICATION_6VMVOCHWUWO);
75
    this.displayName =
×
76
        new EnumWrapper<CreateClassificationTemplateRequestBodyDisplayNameField>(
77
            CreateClassificationTemplateRequestBodyDisplayNameField.CLASSIFICATION);
78
  }
×
79

80
  protected CreateClassificationTemplateRequestBody(Builder builder) {
81
    super();
×
82
    this.scope = builder.scope;
×
83
    this.templateKey = builder.templateKey;
×
84
    this.displayName = builder.displayName;
×
85
    this.hidden = builder.hidden;
×
86
    this.copyInstanceOnItemCopy = builder.copyInstanceOnItemCopy;
×
87
    this.fields = builder.fields;
×
88
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
89
  }
×
90

91
  public EnumWrapper<CreateClassificationTemplateRequestBodyScopeField> getScope() {
92
    return scope;
×
93
  }
94

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

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

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

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

111
  public List<CreateClassificationTemplateRequestBodyFieldsField> getFields() {
112
    return fields;
×
113
  }
114

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

132
  @Override
133
  public int hashCode() {
134
    return Objects.hash(scope, templateKey, displayName, hidden, copyInstanceOnItemCopy, fields);
×
135
  }
136

137
  @Override
138
  public String toString() {
139
    return "CreateClassificationTemplateRequestBody{"
×
140
        + "scope='"
141
        + scope
142
        + '\''
143
        + ", "
144
        + "templateKey='"
145
        + templateKey
146
        + '\''
147
        + ", "
148
        + "displayName='"
149
        + displayName
150
        + '\''
151
        + ", "
152
        + "hidden='"
153
        + hidden
154
        + '\''
155
        + ", "
156
        + "copyInstanceOnItemCopy='"
157
        + copyInstanceOnItemCopy
158
        + '\''
159
        + ", "
160
        + "fields='"
161
        + fields
162
        + '\''
163
        + "}";
164
  }
165

166
  public static class Builder extends NullableFieldTracker {
167

168
    protected EnumWrapper<CreateClassificationTemplateRequestBodyScopeField> scope;
169

170
    protected EnumWrapper<CreateClassificationTemplateRequestBodyTemplateKeyField> templateKey;
171

172
    protected EnumWrapper<CreateClassificationTemplateRequestBodyDisplayNameField> displayName;
173

174
    protected Boolean hidden;
175

176
    protected Boolean copyInstanceOnItemCopy;
177

178
    protected final List<CreateClassificationTemplateRequestBodyFieldsField> fields;
179

180
    public Builder(List<CreateClassificationTemplateRequestBodyFieldsField> fields) {
181
      super();
×
182
      this.fields = fields;
×
183
      this.scope =
×
184
          new EnumWrapper<CreateClassificationTemplateRequestBodyScopeField>(
185
              CreateClassificationTemplateRequestBodyScopeField.ENTERPRISE);
186
      this.templateKey =
×
187
          new EnumWrapper<CreateClassificationTemplateRequestBodyTemplateKeyField>(
188
              CreateClassificationTemplateRequestBodyTemplateKeyField
189
                  .SECURITYCLASSIFICATION_6VMVOCHWUWO);
190
      this.displayName =
×
191
          new EnumWrapper<CreateClassificationTemplateRequestBodyDisplayNameField>(
192
              CreateClassificationTemplateRequestBodyDisplayNameField.CLASSIFICATION);
193
    }
×
194

195
    public Builder scope(CreateClassificationTemplateRequestBodyScopeField scope) {
196
      this.scope = new EnumWrapper<CreateClassificationTemplateRequestBodyScopeField>(scope);
×
197
      return this;
×
198
    }
199

200
    public Builder scope(EnumWrapper<CreateClassificationTemplateRequestBodyScopeField> scope) {
201
      this.scope = scope;
×
202
      return this;
×
203
    }
204

205
    public Builder templateKey(
206
        CreateClassificationTemplateRequestBodyTemplateKeyField templateKey) {
207
      this.templateKey =
×
208
          new EnumWrapper<CreateClassificationTemplateRequestBodyTemplateKeyField>(templateKey);
209
      return this;
×
210
    }
211

212
    public Builder templateKey(
213
        EnumWrapper<CreateClassificationTemplateRequestBodyTemplateKeyField> templateKey) {
214
      this.templateKey = templateKey;
×
215
      return this;
×
216
    }
217

218
    public Builder displayName(
219
        CreateClassificationTemplateRequestBodyDisplayNameField displayName) {
220
      this.displayName =
×
221
          new EnumWrapper<CreateClassificationTemplateRequestBodyDisplayNameField>(displayName);
222
      return this;
×
223
    }
224

225
    public Builder displayName(
226
        EnumWrapper<CreateClassificationTemplateRequestBodyDisplayNameField> displayName) {
227
      this.displayName = displayName;
×
228
      return this;
×
229
    }
230

231
    public Builder hidden(Boolean hidden) {
232
      this.hidden = hidden;
×
233
      return this;
×
234
    }
235

236
    public Builder copyInstanceOnItemCopy(Boolean copyInstanceOnItemCopy) {
237
      this.copyInstanceOnItemCopy = copyInstanceOnItemCopy;
×
238
      return this;
×
239
    }
240

241
    public CreateClassificationTemplateRequestBody build() {
242
      return new CreateClassificationTemplateRequestBody(this);
×
243
    }
244
  }
245
}
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