• 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

21.21
/src/main/java/com/box/sdkgen/schemas/folderbase/FolderBase.java
1
package com.box.sdkgen.schemas.folderbase;
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 FolderBase extends SerializableObject {
11

12
  protected final String id;
13

14
  protected String etag;
15

16
  @JsonDeserialize(using = FolderBaseTypeField.FolderBaseTypeFieldDeserializer.class)
17
  @JsonSerialize(using = FolderBaseTypeField.FolderBaseTypeFieldSerializer.class)
18
  protected EnumWrapper<FolderBaseTypeField> type;
19

20
  public FolderBase(@JsonProperty("id") String id) {
21
    super();
1✔
22
    this.id = id;
1✔
23
    this.type = new EnumWrapper<FolderBaseTypeField>(FolderBaseTypeField.FOLDER);
1✔
24
  }
1✔
25

26
  protected FolderBase(Builder builder) {
27
    super();
×
28
    this.id = builder.id;
×
29
    this.etag = builder.etag;
×
30
    this.type = builder.type;
×
31
  }
×
32

33
  public String getId() {
34
    return id;
1✔
35
  }
36

37
  public String getEtag() {
38
    return etag;
1✔
39
  }
40

41
  public EnumWrapper<FolderBaseTypeField> getType() {
42
    return type;
1✔
43
  }
44

45
  @Override
46
  public boolean equals(Object o) {
47
    if (this == o) {
×
48
      return true;
×
49
    }
50
    if (o == null || getClass() != o.getClass()) {
×
51
      return false;
×
52
    }
53
    FolderBase casted = (FolderBase) o;
×
54
    return Objects.equals(id, casted.id)
×
55
        && Objects.equals(etag, casted.etag)
×
56
        && Objects.equals(type, casted.type);
×
57
  }
58

59
  @Override
60
  public int hashCode() {
61
    return Objects.hash(id, etag, type);
×
62
  }
63

64
  @Override
65
  public String toString() {
66
    return "FolderBase{"
×
67
        + "id='"
68
        + id
69
        + '\''
70
        + ", "
71
        + "etag='"
72
        + etag
73
        + '\''
74
        + ", "
75
        + "type='"
76
        + type
77
        + '\''
78
        + "}";
79
  }
80

81
  public static class Builder {
82

83
    protected final String id;
84

85
    protected String etag;
86

87
    protected EnumWrapper<FolderBaseTypeField> type;
88

NEW
89
    public Builder(String id) {
×
90
      this.id = id;
×
91
      this.type = new EnumWrapper<FolderBaseTypeField>(FolderBaseTypeField.FOLDER);
×
92
    }
×
93

94
    public Builder etag(String etag) {
95
      this.etag = etag;
×
96
      return this;
×
97
    }
98

99
    public Builder type(FolderBaseTypeField type) {
100
      this.type = new EnumWrapper<FolderBaseTypeField>(type);
×
101
      return this;
×
102
    }
103

104
    public Builder type(EnumWrapper<FolderBaseTypeField> type) {
105
      this.type = type;
×
106
      return this;
×
107
    }
108

109
    public FolderBase build() {
110
      return new FolderBase(this);
×
111
    }
112
  }
113
}
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