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

box / box-java-sdk-gen / #294

24 Jun 2025 01:20PM UTC coverage: 35.662% (+0.03%) from 35.632%
#294

Pull #347

github

web-flow
Merge 2c100d09c into d8480ee6c
Pull Request #347: feat: Add Webhook Validation In Java (box/box-codegen#745)

68 of 82 new or added lines in 2 files covered. (82.93%)

11791 existing lines in 624 files now uncovered.

16939 of 47499 relevant lines covered (35.66%)

0.36 hits per line

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

13.33
/src/main/java/com/box/sdkgen/schemas/metadatatemplate/MetadataTemplateFieldsField.java
1
package com.box.sdkgen.schemas.metadatatemplate;
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 MetadataTemplateFieldsField extends SerializableObject {
15

16
  @JsonDeserialize(
17
      using = MetadataTemplateFieldsTypeField.MetadataTemplateFieldsTypeFieldDeserializer.class)
18
  @JsonSerialize(
19
      using = MetadataTemplateFieldsTypeField.MetadataTemplateFieldsTypeFieldSerializer.class)
20
  protected final EnumWrapper<MetadataTemplateFieldsTypeField> type;
21

22
  protected final String key;
23

24
  protected final String displayName;
25

26
  protected String description;
27

28
  protected Boolean hidden;
29

30
  protected List<MetadataTemplateFieldsOptionsField> options;
31

32
  protected String id;
33

34
  public MetadataTemplateFieldsField(
35
      @JsonProperty("type") EnumWrapper<MetadataTemplateFieldsTypeField> type,
36
      @JsonProperty("key") String key,
37
      @JsonProperty("displayName") String displayName) {
38
    super();
1✔
39
    this.type = type;
1✔
40
    this.key = key;
1✔
41
    this.displayName = displayName;
1✔
42
  }
1✔
43

44
  public MetadataTemplateFieldsField(
45
      MetadataTemplateFieldsTypeField type, String key, String displayName) {
46
    super();
×
47
    this.type = new EnumWrapper<MetadataTemplateFieldsTypeField>(type);
×
UNCOV
48
    this.key = key;
×
UNCOV
49
    this.displayName = displayName;
×
50
  }
×
51

52
  protected MetadataTemplateFieldsField(Builder builder) {
53
    super();
×
54
    this.type = builder.type;
×
55
    this.key = builder.key;
×
56
    this.displayName = builder.displayName;
×
57
    this.description = builder.description;
×
58
    this.hidden = builder.hidden;
×
UNCOV
59
    this.options = builder.options;
×
UNCOV
60
    this.id = builder.id;
×
UNCOV
61
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
UNCOV
62
  }
×
63

64
  public EnumWrapper<MetadataTemplateFieldsTypeField> getType() {
65
    return type;
1✔
66
  }
67

68
  public String getKey() {
69
    return key;
1✔
70
  }
71

72
  public String getDisplayName() {
73
    return displayName;
1✔
74
  }
75

76
  public String getDescription() {
77
    return description;
×
78
  }
79

80
  public Boolean getHidden() {
81
    return hidden;
×
82
  }
83

84
  public List<MetadataTemplateFieldsOptionsField> getOptions() {
85
    return options;
×
86
  }
87

88
  public String getId() {
UNCOV
89
    return id;
×
90
  }
91

92
  @Override
93
  public boolean equals(Object o) {
94
    if (this == o) {
×
UNCOV
95
      return true;
×
96
    }
97
    if (o == null || getClass() != o.getClass()) {
×
98
      return false;
×
99
    }
100
    MetadataTemplateFieldsField casted = (MetadataTemplateFieldsField) o;
×
101
    return Objects.equals(type, casted.type)
×
102
        && Objects.equals(key, casted.key)
×
103
        && Objects.equals(displayName, casted.displayName)
×
UNCOV
104
        && Objects.equals(description, casted.description)
×
UNCOV
105
        && Objects.equals(hidden, casted.hidden)
×
UNCOV
106
        && Objects.equals(options, casted.options)
×
UNCOV
107
        && Objects.equals(id, casted.id);
×
108
  }
109

110
  @Override
111
  public int hashCode() {
UNCOV
112
    return Objects.hash(type, key, displayName, description, hidden, options, id);
×
113
  }
114

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

148
  public static class Builder extends NullableFieldTracker {
149

150
    protected final EnumWrapper<MetadataTemplateFieldsTypeField> type;
151

152
    protected final String key;
153

154
    protected final String displayName;
155

156
    protected String description;
157

158
    protected Boolean hidden;
159

160
    protected List<MetadataTemplateFieldsOptionsField> options;
161

162
    protected String id;
163

164
    public Builder(
165
        EnumWrapper<MetadataTemplateFieldsTypeField> type, String key, String displayName) {
UNCOV
166
      super();
×
167
      this.type = type;
×
168
      this.key = key;
×
169
      this.displayName = displayName;
×
170
    }
×
171

172
    public Builder(MetadataTemplateFieldsTypeField type, String key, String displayName) {
UNCOV
173
      super();
×
174
      this.type = new EnumWrapper<MetadataTemplateFieldsTypeField>(type);
×
175
      this.key = key;
×
UNCOV
176
      this.displayName = displayName;
×
UNCOV
177
    }
×
178

179
    public Builder description(String description) {
180
      this.description = description;
×
UNCOV
181
      return this;
×
182
    }
183

184
    public Builder hidden(Boolean hidden) {
185
      this.hidden = hidden;
×
UNCOV
186
      return this;
×
187
    }
188

189
    public Builder options(List<MetadataTemplateFieldsOptionsField> options) {
190
      this.options = options;
×
UNCOV
191
      return this;
×
192
    }
193

194
    public Builder id(String id) {
UNCOV
195
      this.id = id;
×
UNCOV
196
      return this;
×
197
    }
198

199
    public MetadataTemplateFieldsField build() {
UNCOV
200
      return new MetadataTemplateFieldsField(this);
×
201
    }
202
  }
203
}
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