• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

box / box-java-sdk / #6243

10 Feb 2026 05:27PM UTC coverage: 18.192% (-17.5%) from 35.714%
#6243

push

github

web-flow
fix(boxsdkgen): Move assigning default values from builder constructor to `build()` method (box/box-codegen#922) (#1712)

0 of 1677 new or added lines in 569 files covered. (0.0%)

2147 existing lines in 545 files now uncovered.

7388 of 40611 relevant lines covered (18.19%)

0.21 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
    }
×
184

185
    public Builder scope(CreateClassificationTemplateRequestBodyScopeField scope) {
UNCOV
186
      this.scope = new EnumWrapper<CreateClassificationTemplateRequestBodyScopeField>(scope);
×
187
      return this;
×
188
    }
189

190
    public Builder scope(EnumWrapper<CreateClassificationTemplateRequestBodyScopeField> scope) {
UNCOV
191
      this.scope = scope;
×
UNCOV
192
      return this;
×
193
    }
194

195
    public Builder templateKey(
196
        CreateClassificationTemplateRequestBodyTemplateKeyField templateKey) {
UNCOV
197
      this.templateKey =
×
198
          new EnumWrapper<CreateClassificationTemplateRequestBodyTemplateKeyField>(templateKey);
UNCOV
199
      return this;
×
200
    }
201

202
    public Builder templateKey(
203
        EnumWrapper<CreateClassificationTemplateRequestBodyTemplateKeyField> templateKey) {
UNCOV
204
      this.templateKey = templateKey;
×
UNCOV
205
      return this;
×
206
    }
207

208
    public Builder displayName(
209
        CreateClassificationTemplateRequestBodyDisplayNameField displayName) {
UNCOV
210
      this.displayName =
×
211
          new EnumWrapper<CreateClassificationTemplateRequestBodyDisplayNameField>(displayName);
212
      return this;
×
213
    }
214

215
    public Builder displayName(
216
        EnumWrapper<CreateClassificationTemplateRequestBodyDisplayNameField> displayName) {
217
      this.displayName = displayName;
×
218
      return this;
×
219
    }
220

221
    public Builder hidden(Boolean hidden) {
222
      this.hidden = hidden;
×
223
      return this;
×
224
    }
225

226
    public Builder copyInstanceOnItemCopy(Boolean copyInstanceOnItemCopy) {
227
      this.copyInstanceOnItemCopy = copyInstanceOnItemCopy;
×
228
      return this;
×
229
    }
230

231
    public CreateClassificationTemplateRequestBody build() {
NEW
232
      if (this.scope == null) {
×
NEW
233
        this.scope =
×
234
            new EnumWrapper<CreateClassificationTemplateRequestBodyScopeField>(
235
                CreateClassificationTemplateRequestBodyScopeField.ENTERPRISE);
236
      }
NEW
237
      if (this.templateKey == null) {
×
NEW
238
        this.templateKey =
×
239
            new EnumWrapper<CreateClassificationTemplateRequestBodyTemplateKeyField>(
240
                CreateClassificationTemplateRequestBodyTemplateKeyField
241
                    .SECURITYCLASSIFICATION_6VMVOCHWUWO);
242
      }
NEW
243
      if (this.displayName == null) {
×
NEW
244
        this.displayName =
×
245
            new EnumWrapper<CreateClassificationTemplateRequestBodyDisplayNameField>(
246
                CreateClassificationTemplateRequestBodyDisplayNameField.CLASSIFICATION);
247
      }
248
      return new CreateClassificationTemplateRequestBody(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