• 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

14.29
/src/main/java/com/box/sdkgen/schemas/classificationtemplate/ClassificationTemplateFieldsField.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 ClassificationTemplateFieldsField extends SerializableObject {
12

13
  protected final String id;
14

15
  @JsonDeserialize(
16
      using =
17
          ClassificationTemplateFieldsTypeField.ClassificationTemplateFieldsTypeFieldDeserializer
18
              .class)
19
  @JsonSerialize(
20
      using =
21
          ClassificationTemplateFieldsTypeField.ClassificationTemplateFieldsTypeFieldSerializer
22
              .class)
23
  protected EnumWrapper<ClassificationTemplateFieldsTypeField> type;
24

25
  @JsonDeserialize(
26
      using =
27
          ClassificationTemplateFieldsKeyField.ClassificationTemplateFieldsKeyFieldDeserializer
28
              .class)
29
  @JsonSerialize(
30
      using =
31
          ClassificationTemplateFieldsKeyField.ClassificationTemplateFieldsKeyFieldSerializer.class)
32
  protected EnumWrapper<ClassificationTemplateFieldsKeyField> key;
33

34
  @JsonDeserialize(
35
      using =
36
          ClassificationTemplateFieldsDisplayNameField
37
              .ClassificationTemplateFieldsDisplayNameFieldDeserializer.class)
38
  @JsonSerialize(
39
      using =
40
          ClassificationTemplateFieldsDisplayNameField
41
              .ClassificationTemplateFieldsDisplayNameFieldSerializer.class)
42
  protected EnumWrapper<ClassificationTemplateFieldsDisplayNameField> displayName;
43

44
  protected Boolean hidden;
45

46
  protected final List<ClassificationTemplateFieldsOptionsField> options;
47

48
  public ClassificationTemplateFieldsField(
49
      @JsonProperty("id") String id,
50
      @JsonProperty("options") List<ClassificationTemplateFieldsOptionsField> options) {
51
    super();
1✔
52
    this.id = id;
1✔
53
    this.options = options;
1✔
54
    this.type =
1✔
55
        new EnumWrapper<ClassificationTemplateFieldsTypeField>(
56
            ClassificationTemplateFieldsTypeField.ENUM);
57
    this.key =
1✔
58
        new EnumWrapper<ClassificationTemplateFieldsKeyField>(
59
            ClassificationTemplateFieldsKeyField.BOX__SECURITY__CLASSIFICATION__KEY);
60
    this.displayName =
1✔
61
        new EnumWrapper<ClassificationTemplateFieldsDisplayNameField>(
62
            ClassificationTemplateFieldsDisplayNameField.CLASSIFICATION);
63
  }
1✔
64

65
  protected ClassificationTemplateFieldsField(Builder builder) {
66
    super();
×
67
    this.id = builder.id;
×
68
    this.type = builder.type;
×
69
    this.key = builder.key;
×
70
    this.displayName = builder.displayName;
×
71
    this.hidden = builder.hidden;
×
72
    this.options = builder.options;
×
73
  }
×
74

75
  public String getId() {
76
    return id;
×
77
  }
78

79
  public EnumWrapper<ClassificationTemplateFieldsTypeField> getType() {
80
    return type;
×
81
  }
82

83
  public EnumWrapper<ClassificationTemplateFieldsKeyField> getKey() {
84
    return key;
×
85
  }
86

87
  public EnumWrapper<ClassificationTemplateFieldsDisplayNameField> getDisplayName() {
88
    return displayName;
×
89
  }
90

91
  public Boolean getHidden() {
92
    return hidden;
×
93
  }
94

95
  public List<ClassificationTemplateFieldsOptionsField> getOptions() {
96
    return options;
1✔
97
  }
98

99
  @Override
100
  public boolean equals(Object o) {
101
    if (this == o) {
×
102
      return true;
×
103
    }
104
    if (o == null || getClass() != o.getClass()) {
×
105
      return false;
×
106
    }
107
    ClassificationTemplateFieldsField casted = (ClassificationTemplateFieldsField) o;
×
108
    return Objects.equals(id, casted.id)
×
109
        && Objects.equals(type, casted.type)
×
110
        && Objects.equals(key, casted.key)
×
111
        && Objects.equals(displayName, casted.displayName)
×
112
        && Objects.equals(hidden, casted.hidden)
×
113
        && Objects.equals(options, casted.options);
×
114
  }
115

116
  @Override
117
  public int hashCode() {
118
    return Objects.hash(id, type, key, displayName, hidden, options);
×
119
  }
120

121
  @Override
122
  public String toString() {
123
    return "ClassificationTemplateFieldsField{"
×
124
        + "id='"
125
        + id
126
        + '\''
127
        + ", "
128
        + "type='"
129
        + type
130
        + '\''
131
        + ", "
132
        + "key='"
133
        + key
134
        + '\''
135
        + ", "
136
        + "displayName='"
137
        + displayName
138
        + '\''
139
        + ", "
140
        + "hidden='"
141
        + hidden
142
        + '\''
143
        + ", "
144
        + "options='"
145
        + options
146
        + '\''
147
        + "}";
148
  }
149

150
  public static class Builder {
151

152
    protected final String id;
153

154
    protected EnumWrapper<ClassificationTemplateFieldsTypeField> type;
155

156
    protected EnumWrapper<ClassificationTemplateFieldsKeyField> key;
157

158
    protected EnumWrapper<ClassificationTemplateFieldsDisplayNameField> displayName;
159

160
    protected Boolean hidden;
161

162
    protected final List<ClassificationTemplateFieldsOptionsField> options;
163

NEW
164
    public Builder(String id, List<ClassificationTemplateFieldsOptionsField> options) {
×
165
      this.id = id;
×
166
      this.options = options;
×
167
      this.type =
×
168
          new EnumWrapper<ClassificationTemplateFieldsTypeField>(
169
              ClassificationTemplateFieldsTypeField.ENUM);
170
      this.key =
×
171
          new EnumWrapper<ClassificationTemplateFieldsKeyField>(
172
              ClassificationTemplateFieldsKeyField.BOX__SECURITY__CLASSIFICATION__KEY);
173
      this.displayName =
×
174
          new EnumWrapper<ClassificationTemplateFieldsDisplayNameField>(
175
              ClassificationTemplateFieldsDisplayNameField.CLASSIFICATION);
176
    }
×
177

178
    public Builder type(ClassificationTemplateFieldsTypeField type) {
UNCOV
179
      this.type = new EnumWrapper<ClassificationTemplateFieldsTypeField>(type);
×
180
      return this;
×
181
    }
182

183
    public Builder type(EnumWrapper<ClassificationTemplateFieldsTypeField> type) {
UNCOV
184
      this.type = type;
×
185
      return this;
×
186
    }
187

188
    public Builder key(ClassificationTemplateFieldsKeyField key) {
189
      this.key = new EnumWrapper<ClassificationTemplateFieldsKeyField>(key);
×
190
      return this;
×
191
    }
192

193
    public Builder key(EnumWrapper<ClassificationTemplateFieldsKeyField> key) {
UNCOV
194
      this.key = key;
×
195
      return this;
×
196
    }
197

198
    public Builder displayName(ClassificationTemplateFieldsDisplayNameField displayName) {
UNCOV
199
      this.displayName = new EnumWrapper<ClassificationTemplateFieldsDisplayNameField>(displayName);
×
200
      return this;
×
201
    }
202

203
    public Builder displayName(
204
        EnumWrapper<ClassificationTemplateFieldsDisplayNameField> displayName) {
205
      this.displayName = displayName;
×
206
      return this;
×
207
    }
208

209
    public Builder hidden(Boolean hidden) {
210
      this.hidden = hidden;
×
211
      return this;
×
212
    }
213

214
    public ClassificationTemplateFieldsField build() {
215
      return new ClassificationTemplateFieldsField(this);
×
216
    }
217
  }
218
}
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