• 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

15.25
/src/main/java/com/box/sdkgen/schemas/metadatatemplate/MetadataTemplate.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 MetadataTemplate extends SerializableObject {
15

16
  protected final String id;
17

18
  @JsonDeserialize(using = MetadataTemplateTypeField.MetadataTemplateTypeFieldDeserializer.class)
19
  @JsonSerialize(using = MetadataTemplateTypeField.MetadataTemplateTypeFieldSerializer.class)
20
  protected EnumWrapper<MetadataTemplateTypeField> type;
21

22
  protected String scope;
23

24
  protected String templateKey;
25

26
  protected String displayName;
27

28
  protected Boolean hidden;
29

30
  protected List<MetadataTemplateFieldsField> fields;
31

32
  protected Boolean copyInstanceOnItemCopy;
33

34
  public MetadataTemplate(@JsonProperty("id") String id) {
35
    super();
1✔
36
    this.id = id;
1✔
37
    this.type =
1✔
38
        new EnumWrapper<MetadataTemplateTypeField>(MetadataTemplateTypeField.METADATA_TEMPLATE);
39
  }
1✔
40

41
  protected MetadataTemplate(Builder builder) {
42
    super();
×
43
    this.id = builder.id;
×
44
    this.type = builder.type;
×
45
    this.scope = builder.scope;
×
46
    this.templateKey = builder.templateKey;
×
47
    this.displayName = builder.displayName;
×
48
    this.hidden = builder.hidden;
×
UNCOV
49
    this.fields = builder.fields;
×
UNCOV
50
    this.copyInstanceOnItemCopy = builder.copyInstanceOnItemCopy;
×
UNCOV
51
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
UNCOV
52
  }
×
53

54
  public String getId() {
55
    return id;
1✔
56
  }
57

58
  public EnumWrapper<MetadataTemplateTypeField> getType() {
UNCOV
59
    return type;
×
60
  }
61

62
  public String getScope() {
63
    return scope;
1✔
64
  }
65

66
  public String getTemplateKey() {
67
    return templateKey;
1✔
68
  }
69

70
  public String getDisplayName() {
71
    return displayName;
1✔
72
  }
73

74
  public Boolean getHidden() {
UNCOV
75
    return hidden;
×
76
  }
77

78
  public List<MetadataTemplateFieldsField> getFields() {
79
    return fields;
1✔
80
  }
81

82
  public Boolean getCopyInstanceOnItemCopy() {
UNCOV
83
    return copyInstanceOnItemCopy;
×
84
  }
85

86
  @Override
87
  public boolean equals(Object o) {
88
    if (this == o) {
×
UNCOV
89
      return true;
×
90
    }
91
    if (o == null || getClass() != o.getClass()) {
×
92
      return false;
×
93
    }
94
    MetadataTemplate casted = (MetadataTemplate) o;
×
95
    return Objects.equals(id, casted.id)
×
96
        && Objects.equals(type, casted.type)
×
97
        && Objects.equals(scope, casted.scope)
×
98
        && Objects.equals(templateKey, casted.templateKey)
×
UNCOV
99
        && Objects.equals(displayName, casted.displayName)
×
UNCOV
100
        && Objects.equals(hidden, casted.hidden)
×
UNCOV
101
        && Objects.equals(fields, casted.fields)
×
UNCOV
102
        && Objects.equals(copyInstanceOnItemCopy, casted.copyInstanceOnItemCopy);
×
103
  }
104

105
  @Override
106
  public int hashCode() {
UNCOV
107
    return Objects.hash(
×
108
        id, type, scope, templateKey, displayName, hidden, fields, copyInstanceOnItemCopy);
109
  }
110

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

148
  public static class Builder extends NullableFieldTracker {
149

150
    protected final String id;
151

152
    protected EnumWrapper<MetadataTemplateTypeField> type;
153

154
    protected String scope;
155

156
    protected String templateKey;
157

158
    protected String displayName;
159

160
    protected Boolean hidden;
161

162
    protected List<MetadataTemplateFieldsField> fields;
163

164
    protected Boolean copyInstanceOnItemCopy;
165

166
    public Builder(String id) {
UNCOV
167
      super();
×
UNCOV
168
      this.id = id;
×
169
      this.type =
×
170
          new EnumWrapper<MetadataTemplateTypeField>(MetadataTemplateTypeField.METADATA_TEMPLATE);
UNCOV
171
    }
×
172

173
    public Builder type(MetadataTemplateTypeField type) {
174
      this.type = new EnumWrapper<MetadataTemplateTypeField>(type);
×
175
      return this;
×
176
    }
177

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

183
    public Builder scope(String scope) {
184
      this.scope = scope;
×
185
      return this;
×
186
    }
187

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

193
    public Builder displayName(String displayName) {
194
      this.displayName = displayName;
×
195
      return this;
×
196
    }
197

198
    public Builder hidden(Boolean hidden) {
199
      this.hidden = hidden;
×
200
      return this;
×
201
    }
202

203
    public Builder fields(List<MetadataTemplateFieldsField> fields) {
204
      this.fields = fields;
×
205
      return this;
×
206
    }
207

208
    public Builder copyInstanceOnItemCopy(Boolean copyInstanceOnItemCopy) {
209
      this.copyInstanceOnItemCopy = copyInstanceOnItemCopy;
×
UNCOV
210
      return this;
×
211
    }
212

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