• 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

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

10
public class Classification extends SerializableObject {
11

12
  @JsonProperty("Box__Security__Classification__Key")
13
  protected String boxSecurityClassificationKey;
14

15
  @JsonProperty("$parent")
16
  protected String parent;
17

18
  @JsonDeserialize(
19
      using = ClassificationTemplateField.ClassificationTemplateFieldDeserializer.class)
20
  @JsonSerialize(using = ClassificationTemplateField.ClassificationTemplateFieldSerializer.class)
21
  @JsonProperty("$template")
22
  protected EnumWrapper<ClassificationTemplateField> template;
23

24
  @JsonProperty("$scope")
25
  protected String scope;
26

27
  @JsonProperty("$version")
28
  protected Long version;
29

30
  @JsonProperty("$type")
31
  protected String type;
32

33
  @JsonProperty("$typeVersion")
34
  protected Double typeVersion;
35

36
  @JsonProperty("$canEdit")
37
  protected Boolean canEdit;
38

39
  public Classification() {
40
    super();
1✔
41
  }
1✔
42

43
  protected Classification(Builder builder) {
44
    super();
×
45
    this.boxSecurityClassificationKey = builder.boxSecurityClassificationKey;
×
46
    this.parent = builder.parent;
×
47
    this.template = builder.template;
×
48
    this.scope = builder.scope;
×
49
    this.version = builder.version;
×
50
    this.type = builder.type;
×
51
    this.typeVersion = builder.typeVersion;
×
52
    this.canEdit = builder.canEdit;
×
53
  }
×
54

55
  public String getBoxSecurityClassificationKey() {
56
    return boxSecurityClassificationKey;
1✔
57
  }
58

59
  public String getParent() {
60
    return parent;
×
61
  }
62

63
  public EnumWrapper<ClassificationTemplateField> getTemplate() {
64
    return template;
×
65
  }
66

67
  public String getScope() {
68
    return scope;
×
69
  }
70

71
  public Long getVersion() {
72
    return version;
×
73
  }
74

75
  public String getType() {
76
    return type;
×
77
  }
78

79
  public Double getTypeVersion() {
80
    return typeVersion;
×
81
  }
82

83
  public Boolean getCanEdit() {
84
    return canEdit;
×
85
  }
86

87
  @Override
88
  public boolean equals(Object o) {
89
    if (this == o) {
×
90
      return true;
×
91
    }
92
    if (o == null || getClass() != o.getClass()) {
×
93
      return false;
×
94
    }
95
    Classification casted = (Classification) o;
×
96
    return Objects.equals(boxSecurityClassificationKey, casted.boxSecurityClassificationKey)
×
97
        && Objects.equals(parent, casted.parent)
×
98
        && Objects.equals(template, casted.template)
×
99
        && Objects.equals(scope, casted.scope)
×
100
        && Objects.equals(version, casted.version)
×
101
        && Objects.equals(type, casted.type)
×
102
        && Objects.equals(typeVersion, casted.typeVersion)
×
103
        && Objects.equals(canEdit, casted.canEdit);
×
104
  }
105

106
  @Override
107
  public int hashCode() {
108
    return Objects.hash(
×
109
        boxSecurityClassificationKey, parent, template, scope, version, type, typeVersion, canEdit);
110
  }
111

112
  @Override
113
  public String toString() {
114
    return "Classification{"
×
115
        + "boxSecurityClassificationKey='"
116
        + boxSecurityClassificationKey
117
        + '\''
118
        + ", "
119
        + "parent='"
120
        + parent
121
        + '\''
122
        + ", "
123
        + "template='"
124
        + template
125
        + '\''
126
        + ", "
127
        + "scope='"
128
        + scope
129
        + '\''
130
        + ", "
131
        + "version='"
132
        + version
133
        + '\''
134
        + ", "
135
        + "type='"
136
        + type
137
        + '\''
138
        + ", "
139
        + "typeVersion='"
140
        + typeVersion
141
        + '\''
142
        + ", "
143
        + "canEdit='"
144
        + canEdit
145
        + '\''
146
        + "}";
147
  }
148

NEW
149
  public static class Builder {
×
150

151
    protected String boxSecurityClassificationKey;
152

153
    protected String parent;
154

155
    protected EnumWrapper<ClassificationTemplateField> template;
156

157
    protected String scope;
158

159
    protected Long version;
160

161
    protected String type;
162

163
    protected Double typeVersion;
164

165
    protected Boolean canEdit;
166

167
    public Builder boxSecurityClassificationKey(String boxSecurityClassificationKey) {
168
      this.boxSecurityClassificationKey = boxSecurityClassificationKey;
×
169
      return this;
×
170
    }
171

172
    public Builder parent(String parent) {
173
      this.parent = parent;
×
174
      return this;
×
175
    }
176

177
    public Builder template(ClassificationTemplateField template) {
178
      this.template = new EnumWrapper<ClassificationTemplateField>(template);
×
179
      return this;
×
180
    }
181

182
    public Builder template(EnumWrapper<ClassificationTemplateField> template) {
183
      this.template = template;
×
184
      return this;
×
185
    }
186

187
    public Builder scope(String scope) {
188
      this.scope = scope;
×
189
      return this;
×
190
    }
191

192
    public Builder version(Long version) {
193
      this.version = version;
×
194
      return this;
×
195
    }
196

197
    public Builder type(String type) {
198
      this.type = type;
×
199
      return this;
×
200
    }
201

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

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

212
    public Classification build() {
213
      return new Classification(this);
×
214
    }
215
  }
216
}
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