• 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

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

12
  protected final String id;
13

14
  @JsonDeserialize(
15
      using = TermsOfServiceBaseTypeField.TermsOfServiceBaseTypeFieldDeserializer.class)
16
  @JsonSerialize(using = TermsOfServiceBaseTypeField.TermsOfServiceBaseTypeFieldSerializer.class)
17
  protected EnumWrapper<TermsOfServiceBaseTypeField> type;
18

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

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

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

36
  public EnumWrapper<TermsOfServiceBaseTypeField> getType() {
37
    return type;
1✔
38
  }
39

40
  @Override
41
  public boolean equals(Object o) {
42
    if (this == o) {
×
43
      return true;
×
44
    }
45
    if (o == null || getClass() != o.getClass()) {
×
46
      return false;
×
47
    }
48
    TermsOfServiceBase casted = (TermsOfServiceBase) o;
×
49
    return Objects.equals(id, casted.id) && Objects.equals(type, casted.type);
×
50
  }
51

52
  @Override
53
  public int hashCode() {
54
    return Objects.hash(id, type);
×
55
  }
56

57
  @Override
58
  public String toString() {
59
    return "TermsOfServiceBase{" + "id='" + id + '\'' + ", " + "type='" + type + '\'' + "}";
×
60
  }
61

62
  public static class Builder {
63

64
    protected final String id;
65

66
    protected EnumWrapper<TermsOfServiceBaseTypeField> type;
67

NEW
68
    public Builder(String id) {
×
69
      this.id = id;
×
70
      this.type =
×
71
          new EnumWrapper<TermsOfServiceBaseTypeField>(
72
              TermsOfServiceBaseTypeField.TERMS_OF_SERVICE);
73
    }
×
74

75
    public Builder type(TermsOfServiceBaseTypeField type) {
76
      this.type = new EnumWrapper<TermsOfServiceBaseTypeField>(type);
×
77
      return this;
×
78
    }
79

80
    public Builder type(EnumWrapper<TermsOfServiceBaseTypeField> type) {
81
      this.type = type;
×
82
      return this;
×
83
    }
84

85
    public TermsOfServiceBase build() {
86
      return new TermsOfServiceBase(this);
×
87
    }
88
  }
89
}
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