• 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

12.77
/src/main/java/com/box/sdkgen/schemas/collaborationallowlistentry/CollaborationAllowlistEntry.java
1
package com.box.sdkgen.schemas.collaborationallowlistentry;
2

3
import com.box.sdkgen.internal.SerializableObject;
4
import com.box.sdkgen.internal.utils.DateTimeUtils;
5
import com.box.sdkgen.serialization.json.EnumWrapper;
6
import com.fasterxml.jackson.annotation.JsonProperty;
7
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
8
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
9
import java.util.Date;
10
import java.util.Objects;
11

12
public class CollaborationAllowlistEntry extends SerializableObject {
13

14
  protected String id;
15

16
  @JsonDeserialize(
17
      using =
18
          CollaborationAllowlistEntryTypeField.CollaborationAllowlistEntryTypeFieldDeserializer
19
              .class)
20
  @JsonSerialize(
21
      using =
22
          CollaborationAllowlistEntryTypeField.CollaborationAllowlistEntryTypeFieldSerializer.class)
23
  protected EnumWrapper<CollaborationAllowlistEntryTypeField> type;
24

25
  protected String domain;
26

27
  @JsonDeserialize(
28
      using =
29
          CollaborationAllowlistEntryDirectionField
30
              .CollaborationAllowlistEntryDirectionFieldDeserializer.class)
31
  @JsonSerialize(
32
      using =
33
          CollaborationAllowlistEntryDirectionField
34
              .CollaborationAllowlistEntryDirectionFieldSerializer.class)
35
  protected EnumWrapper<CollaborationAllowlistEntryDirectionField> direction;
36

37
  protected CollaborationAllowlistEntryEnterpriseField enterprise;
38

39
  @JsonProperty("created_at")
40
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
41
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
42
  protected Date createdAt;
43

44
  public CollaborationAllowlistEntry() {
45
    super();
1✔
46
  }
1✔
47

48
  protected CollaborationAllowlistEntry(Builder builder) {
49
    super();
×
50
    this.id = builder.id;
×
51
    this.type = builder.type;
×
52
    this.domain = builder.domain;
×
53
    this.direction = builder.direction;
×
54
    this.enterprise = builder.enterprise;
×
55
    this.createdAt = builder.createdAt;
×
56
  }
×
57

58
  public String getId() {
59
    return id;
1✔
60
  }
61

62
  public EnumWrapper<CollaborationAllowlistEntryTypeField> getType() {
63
    return type;
1✔
64
  }
65

66
  public String getDomain() {
67
    return domain;
1✔
68
  }
69

70
  public EnumWrapper<CollaborationAllowlistEntryDirectionField> getDirection() {
71
    return direction;
1✔
72
  }
73

74
  public CollaborationAllowlistEntryEnterpriseField getEnterprise() {
75
    return enterprise;
×
76
  }
77

78
  public Date getCreatedAt() {
79
    return createdAt;
×
80
  }
81

82
  @Override
83
  public boolean equals(Object o) {
84
    if (this == o) {
×
85
      return true;
×
86
    }
87
    if (o == null || getClass() != o.getClass()) {
×
88
      return false;
×
89
    }
90
    CollaborationAllowlistEntry casted = (CollaborationAllowlistEntry) o;
×
91
    return Objects.equals(id, casted.id)
×
92
        && Objects.equals(type, casted.type)
×
93
        && Objects.equals(domain, casted.domain)
×
94
        && Objects.equals(direction, casted.direction)
×
95
        && Objects.equals(enterprise, casted.enterprise)
×
96
        && Objects.equals(createdAt, casted.createdAt);
×
97
  }
98

99
  @Override
100
  public int hashCode() {
101
    return Objects.hash(id, type, domain, direction, enterprise, createdAt);
×
102
  }
103

104
  @Override
105
  public String toString() {
106
    return "CollaborationAllowlistEntry{"
×
107
        + "id='"
108
        + id
109
        + '\''
110
        + ", "
111
        + "type='"
112
        + type
113
        + '\''
114
        + ", "
115
        + "domain='"
116
        + domain
117
        + '\''
118
        + ", "
119
        + "direction='"
120
        + direction
121
        + '\''
122
        + ", "
123
        + "enterprise='"
124
        + enterprise
125
        + '\''
126
        + ", "
127
        + "createdAt='"
128
        + createdAt
129
        + '\''
130
        + "}";
131
  }
132

NEW
133
  public static class Builder {
×
134

135
    protected String id;
136

137
    protected EnumWrapper<CollaborationAllowlistEntryTypeField> type;
138

139
    protected String domain;
140

141
    protected EnumWrapper<CollaborationAllowlistEntryDirectionField> direction;
142

143
    protected CollaborationAllowlistEntryEnterpriseField enterprise;
144

145
    protected Date createdAt;
146

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

152
    public Builder type(CollaborationAllowlistEntryTypeField type) {
153
      this.type = new EnumWrapper<CollaborationAllowlistEntryTypeField>(type);
×
154
      return this;
×
155
    }
156

157
    public Builder type(EnumWrapper<CollaborationAllowlistEntryTypeField> type) {
UNCOV
158
      this.type = type;
×
159
      return this;
×
160
    }
161

162
    public Builder domain(String domain) {
163
      this.domain = domain;
×
164
      return this;
×
165
    }
166

167
    public Builder direction(CollaborationAllowlistEntryDirectionField direction) {
UNCOV
168
      this.direction = new EnumWrapper<CollaborationAllowlistEntryDirectionField>(direction);
×
169
      return this;
×
170
    }
171

172
    public Builder direction(EnumWrapper<CollaborationAllowlistEntryDirectionField> direction) {
UNCOV
173
      this.direction = direction;
×
174
      return this;
×
175
    }
176

177
    public Builder enterprise(CollaborationAllowlistEntryEnterpriseField enterprise) {
UNCOV
178
      this.enterprise = enterprise;
×
179
      return this;
×
180
    }
181

182
    public Builder createdAt(Date createdAt) {
183
      this.createdAt = createdAt;
×
184
      return this;
×
185
    }
186

187
    public CollaborationAllowlistEntry build() {
188
      return new CollaborationAllowlistEntry(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