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

box / box-java-sdk-gen / #226

20 Jun 2025 03:14PM UTC coverage: 35.609% (-0.2%) from 35.816%
#226

push

github

web-flow
feat: Shorten builder names in Java (box/box-codegen#742) (#334)

367 of 1570 new or added lines in 984 files covered. (23.38%)

674 existing lines in 370 files now uncovered.

16125 of 45284 relevant lines covered (35.61%)

0.36 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

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

3
import com.box.sdkgen.internal.SerializableObject;
4
import com.box.sdkgen.serialization.json.EnumWrapper;
5
import com.fasterxml.jackson.annotation.JsonProperty;
6
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
7
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
8
import java.util.List;
9
import java.util.Objects;
10

11
public class ClassificationTemplate extends SerializableObject {
12

13
  protected final String id;
14

15
  @JsonDeserialize(
16
      using = ClassificationTemplateTypeField.ClassificationTemplateTypeFieldDeserializer.class)
17
  @JsonSerialize(
18
      using = ClassificationTemplateTypeField.ClassificationTemplateTypeFieldSerializer.class)
19
  protected EnumWrapper<ClassificationTemplateTypeField> type;
20

21
  protected final String scope;
22

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

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

43
  protected Boolean hidden;
44

45
  protected Boolean copyInstanceOnItemCopy;
46

47
  protected final List<ClassificationTemplateFieldsField> fields;
48

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

68
  protected ClassificationTemplate(Builder builder) {
69
    super();
×
70
    this.id = builder.id;
×
71
    this.type = builder.type;
×
72
    this.scope = builder.scope;
×
73
    this.templateKey = builder.templateKey;
×
74
    this.displayName = builder.displayName;
×
75
    this.hidden = builder.hidden;
×
76
    this.copyInstanceOnItemCopy = builder.copyInstanceOnItemCopy;
×
77
    this.fields = builder.fields;
×
78
  }
×
79

80
  public String getId() {
81
    return id;
×
82
  }
83

84
  public EnumWrapper<ClassificationTemplateTypeField> getType() {
85
    return type;
×
86
  }
87

88
  public String getScope() {
89
    return scope;
×
90
  }
91

92
  public EnumWrapper<ClassificationTemplateTemplateKeyField> getTemplateKey() {
93
    return templateKey;
×
94
  }
95

96
  public EnumWrapper<ClassificationTemplateDisplayNameField> getDisplayName() {
97
    return displayName;
×
98
  }
99

100
  public Boolean getHidden() {
101
    return hidden;
×
102
  }
103

104
  public Boolean getCopyInstanceOnItemCopy() {
105
    return copyInstanceOnItemCopy;
×
106
  }
107

108
  public List<ClassificationTemplateFieldsField> getFields() {
109
    return fields;
1✔
110
  }
111

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

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

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

174
  public static class Builder {
175

176
    protected final String id;
177

178
    protected EnumWrapper<ClassificationTemplateTypeField> type;
179

180
    protected final String scope;
181

182
    protected EnumWrapper<ClassificationTemplateTemplateKeyField> templateKey;
183

184
    protected EnumWrapper<ClassificationTemplateDisplayNameField> displayName;
185

186
    protected Boolean hidden;
187

188
    protected Boolean copyInstanceOnItemCopy;
189

190
    protected final List<ClassificationTemplateFieldsField> fields;
191

NEW
192
    public Builder(String id, String scope, List<ClassificationTemplateFieldsField> fields) {
×
193
      this.id = id;
×
194
      this.scope = scope;
×
195
      this.fields = fields;
×
196
      this.type =
×
197
          new EnumWrapper<ClassificationTemplateTypeField>(
198
              ClassificationTemplateTypeField.METADATA_TEMPLATE);
199
      this.templateKey =
×
200
          new EnumWrapper<ClassificationTemplateTemplateKeyField>(
201
              ClassificationTemplateTemplateKeyField.SECURITYCLASSIFICATION_6VMVOCHWUWO);
202
      this.displayName =
×
203
          new EnumWrapper<ClassificationTemplateDisplayNameField>(
204
              ClassificationTemplateDisplayNameField.CLASSIFICATION);
205
    }
×
206

207
    public Builder type(ClassificationTemplateTypeField type) {
208
      this.type = new EnumWrapper<ClassificationTemplateTypeField>(type);
×
209
      return this;
×
210
    }
211

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

217
    public Builder templateKey(ClassificationTemplateTemplateKeyField templateKey) {
UNCOV
218
      this.templateKey = new EnumWrapper<ClassificationTemplateTemplateKeyField>(templateKey);
×
219
      return this;
×
220
    }
221

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

227
    public Builder displayName(ClassificationTemplateDisplayNameField displayName) {
UNCOV
228
      this.displayName = new EnumWrapper<ClassificationTemplateDisplayNameField>(displayName);
×
229
      return this;
×
230
    }
231

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

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

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

247
    public ClassificationTemplate build() {
248
      return new ClassificationTemplate(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