• 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

8.0
/src/main/java/com/box/sdkgen/schemas/metadatafull/MetadataFull.java
1
package com.box.sdkgen.schemas.metadatafull;
2

3
import com.box.sdkgen.schemas.metadata.Metadata;
4
import com.fasterxml.jackson.annotation.JsonAnyGetter;
5
import com.fasterxml.jackson.annotation.JsonAnySetter;
6
import com.fasterxml.jackson.annotation.JsonProperty;
7
import java.util.Map;
8
import java.util.Objects;
9

10
public class MetadataFull extends Metadata {
11

12
  @JsonProperty("$canEdit")
13
  protected Boolean canEdit;
14

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

18
  @JsonProperty("$type")
19
  protected String type;
20

21
  @JsonProperty("$typeVersion")
22
  protected Long typeVersion;
23

24
  @JsonAnyGetter @JsonAnySetter protected Map<String, Object> extraData;
25

26
  public MetadataFull() {
27
    super();
1✔
28
  }
1✔
29

30
  protected MetadataFull(Builder builder) {
31
    super(builder);
×
32
    this.canEdit = builder.canEdit;
×
33
    this.id = builder.id;
×
34
    this.type = builder.type;
×
35
    this.typeVersion = builder.typeVersion;
×
36
    this.extraData = builder.extraData;
×
37
  }
×
38

39
  public Boolean getCanEdit() {
40
    return canEdit;
×
41
  }
42

43
  public String getId() {
44
    return id;
1✔
45
  }
46

47
  public String getType() {
48
    return type;
×
49
  }
50

51
  public Long getTypeVersion() {
52
    return typeVersion;
×
53
  }
54

55
  public Map<String, Object> getExtraData() {
56
    return extraData;
1✔
57
  }
58

59
  @Override
60
  public boolean equals(Object o) {
61
    if (this == o) {
×
62
      return true;
×
63
    }
64
    if (o == null || getClass() != o.getClass()) {
×
65
      return false;
×
66
    }
67
    MetadataFull casted = (MetadataFull) o;
×
68
    return Objects.equals(parent, casted.parent)
×
69
        && Objects.equals(template, casted.template)
×
70
        && Objects.equals(scope, casted.scope)
×
71
        && Objects.equals(version, casted.version)
×
72
        && Objects.equals(canEdit, casted.canEdit)
×
73
        && Objects.equals(id, casted.id)
×
74
        && Objects.equals(type, casted.type)
×
75
        && Objects.equals(typeVersion, casted.typeVersion)
×
76
        && Objects.equals(extraData, casted.extraData);
×
77
  }
78

79
  @Override
80
  public int hashCode() {
81
    return Objects.hash(
×
82
        parent, template, scope, version, canEdit, id, type, typeVersion, extraData);
83
  }
84

85
  @Override
86
  public String toString() {
87
    return "MetadataFull{"
×
88
        + "parent='"
89
        + parent
90
        + '\''
91
        + ", "
92
        + "template='"
93
        + template
94
        + '\''
95
        + ", "
96
        + "scope='"
97
        + scope
98
        + '\''
99
        + ", "
100
        + "version='"
101
        + version
102
        + '\''
103
        + ", "
104
        + "canEdit='"
105
        + canEdit
106
        + '\''
107
        + ", "
108
        + "id='"
109
        + id
110
        + '\''
111
        + ", "
112
        + "type='"
113
        + type
114
        + '\''
115
        + ", "
116
        + "typeVersion='"
117
        + typeVersion
118
        + '\''
119
        + ", "
120
        + "extraData='"
121
        + extraData
122
        + '\''
123
        + "}";
124
  }
125

NEW
126
  public static class Builder extends Metadata.Builder {
×
127

128
    protected Boolean canEdit;
129

130
    protected String id;
131

132
    protected String type;
133

134
    protected Long typeVersion;
135

136
    protected Map<String, Object> extraData;
137

138
    public Builder canEdit(Boolean canEdit) {
139
      this.canEdit = canEdit;
×
140
      return this;
×
141
    }
142

143
    public Builder id(String id) {
144
      this.id = id;
×
145
      return this;
×
146
    }
147

148
    public Builder type(String type) {
149
      this.type = type;
×
150
      return this;
×
151
    }
152

153
    public Builder typeVersion(Long typeVersion) {
154
      this.typeVersion = typeVersion;
×
155
      return this;
×
156
    }
157

158
    public Builder extraData(Map<String, Object> extraData) {
159
      this.extraData = extraData;
×
160
      return this;
×
161
    }
162

163
    @Override
164
    public Builder parent(String parent) {
165
      this.parent = parent;
×
166
      return this;
×
167
    }
168

169
    @Override
170
    public Builder template(String template) {
171
      this.template = template;
×
172
      return this;
×
173
    }
174

175
    @Override
176
    public Builder scope(String scope) {
177
      this.scope = scope;
×
178
      return this;
×
179
    }
180

181
    @Override
182
    public Builder version(Long version) {
183
      this.version = version;
×
184
      return this;
×
185
    }
186

187
    public MetadataFull build() {
188
      return new MetadataFull(this);
×
189
    }
190
  }
191
}
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