• 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

6.67
/src/main/java/com/box/sdkgen/schemas/termsofservice/TermsOfServiceEnterpriseField.java
1
package com.box.sdkgen.schemas.termsofservice;
2

3
import com.box.sdkgen.internal.SerializableObject;
4
import com.box.sdkgen.serialization.json.EnumWrapper;
5
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
6
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
7
import java.util.Objects;
8

9
public class TermsOfServiceEnterpriseField extends SerializableObject {
10

11
  protected String id;
12

13
  @JsonDeserialize(
14
      using = TermsOfServiceEnterpriseTypeField.TermsOfServiceEnterpriseTypeFieldDeserializer.class)
15
  @JsonSerialize(
16
      using = TermsOfServiceEnterpriseTypeField.TermsOfServiceEnterpriseTypeFieldSerializer.class)
17
  protected EnumWrapper<TermsOfServiceEnterpriseTypeField> type;
18

19
  protected String name;
20

21
  public TermsOfServiceEnterpriseField() {
22
    super();
1✔
23
  }
1✔
24

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

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

36
  public EnumWrapper<TermsOfServiceEnterpriseTypeField> getType() {
37
    return type;
×
38
  }
39

40
  public String getName() {
41
    return name;
×
42
  }
43

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

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

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

NEW
80
  public static class Builder {
×
81

82
    protected String id;
83

84
    protected EnumWrapper<TermsOfServiceEnterpriseTypeField> type;
85

86
    protected String name;
87

88
    public Builder id(String id) {
89
      this.id = id;
×
90
      return this;
×
91
    }
92

93
    public Builder type(TermsOfServiceEnterpriseTypeField type) {
94
      this.type = new EnumWrapper<TermsOfServiceEnterpriseTypeField>(type);
×
95
      return this;
×
96
    }
97

98
    public Builder type(EnumWrapper<TermsOfServiceEnterpriseTypeField> type) {
UNCOV
99
      this.type = type;
×
100
      return this;
×
101
    }
102

103
    public Builder name(String name) {
104
      this.name = name;
×
105
      return this;
×
106
    }
107

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