• 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

13.79
/src/main/java/com/box/sdkgen/schemas/invite/Invite.java
1
package com.box.sdkgen.schemas.invite;
2

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

13
public class Invite extends SerializableObject {
14

15
  protected final String id;
16

17
  @JsonDeserialize(using = InviteTypeField.InviteTypeFieldDeserializer.class)
18
  @JsonSerialize(using = InviteTypeField.InviteTypeFieldSerializer.class)
19
  protected EnumWrapper<InviteTypeField> type;
20

21
  @JsonProperty("invited_to")
22
  protected InviteInvitedToField invitedTo;
23

24
  @JsonProperty("actionable_by")
25
  protected UserMini actionableBy;
26

27
  @JsonProperty("invited_by")
28
  protected UserMini invitedBy;
29

30
  protected String status;
31

32
  @JsonProperty("created_at")
33
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
34
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
35
  protected Date createdAt;
36

37
  @JsonProperty("modified_at")
38
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
39
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
40
  protected Date modifiedAt;
41

42
  public Invite(@JsonProperty("id") String id) {
43
    super();
1✔
44
    this.id = id;
1✔
45
    this.type = new EnumWrapper<InviteTypeField>(InviteTypeField.INVITE);
1✔
46
  }
1✔
47

48
  protected Invite(Builder builder) {
49
    super();
×
50
    this.id = builder.id;
×
51
    this.type = builder.type;
×
52
    this.invitedTo = builder.invitedTo;
×
53
    this.actionableBy = builder.actionableBy;
×
54
    this.invitedBy = builder.invitedBy;
×
55
    this.status = builder.status;
×
56
    this.createdAt = builder.createdAt;
×
57
    this.modifiedAt = builder.modifiedAt;
×
58
  }
×
59

60
  public String getId() {
61
    return id;
1✔
62
  }
63

64
  public EnumWrapper<InviteTypeField> getType() {
65
    return type;
1✔
66
  }
67

68
  public InviteInvitedToField getInvitedTo() {
69
    return invitedTo;
1✔
70
  }
71

72
  public UserMini getActionableBy() {
73
    return actionableBy;
1✔
74
  }
75

76
  public UserMini getInvitedBy() {
77
    return invitedBy;
×
78
  }
79

80
  public String getStatus() {
81
    return status;
×
82
  }
83

84
  public Date getCreatedAt() {
85
    return createdAt;
×
86
  }
87

88
  public Date getModifiedAt() {
89
    return modifiedAt;
×
90
  }
91

92
  @Override
93
  public boolean equals(Object o) {
94
    if (this == o) {
×
95
      return true;
×
96
    }
97
    if (o == null || getClass() != o.getClass()) {
×
98
      return false;
×
99
    }
100
    Invite casted = (Invite) o;
×
101
    return Objects.equals(id, casted.id)
×
102
        && Objects.equals(type, casted.type)
×
103
        && Objects.equals(invitedTo, casted.invitedTo)
×
104
        && Objects.equals(actionableBy, casted.actionableBy)
×
105
        && Objects.equals(invitedBy, casted.invitedBy)
×
106
        && Objects.equals(status, casted.status)
×
107
        && Objects.equals(createdAt, casted.createdAt)
×
108
        && Objects.equals(modifiedAt, casted.modifiedAt);
×
109
  }
110

111
  @Override
112
  public int hashCode() {
113
    return Objects.hash(
×
114
        id, type, invitedTo, actionableBy, invitedBy, status, createdAt, modifiedAt);
115
  }
116

117
  @Override
118
  public String toString() {
119
    return "Invite{"
×
120
        + "id='"
121
        + id
122
        + '\''
123
        + ", "
124
        + "type='"
125
        + type
126
        + '\''
127
        + ", "
128
        + "invitedTo='"
129
        + invitedTo
130
        + '\''
131
        + ", "
132
        + "actionableBy='"
133
        + actionableBy
134
        + '\''
135
        + ", "
136
        + "invitedBy='"
137
        + invitedBy
138
        + '\''
139
        + ", "
140
        + "status='"
141
        + status
142
        + '\''
143
        + ", "
144
        + "createdAt='"
145
        + createdAt
146
        + '\''
147
        + ", "
148
        + "modifiedAt='"
149
        + modifiedAt
150
        + '\''
151
        + "}";
152
  }
153

154
  public static class Builder {
155

156
    protected final String id;
157

158
    protected EnumWrapper<InviteTypeField> type;
159

160
    protected InviteInvitedToField invitedTo;
161

162
    protected UserMini actionableBy;
163

164
    protected UserMini invitedBy;
165

166
    protected String status;
167

168
    protected Date createdAt;
169

170
    protected Date modifiedAt;
171

NEW
172
    public Builder(String id) {
×
173
      this.id = id;
×
174
      this.type = new EnumWrapper<InviteTypeField>(InviteTypeField.INVITE);
×
175
    }
×
176

177
    public Builder type(InviteTypeField type) {
178
      this.type = new EnumWrapper<InviteTypeField>(type);
×
179
      return this;
×
180
    }
181

182
    public Builder type(EnumWrapper<InviteTypeField> type) {
183
      this.type = type;
×
184
      return this;
×
185
    }
186

187
    public Builder invitedTo(InviteInvitedToField invitedTo) {
188
      this.invitedTo = invitedTo;
×
189
      return this;
×
190
    }
191

192
    public Builder actionableBy(UserMini actionableBy) {
193
      this.actionableBy = actionableBy;
×
194
      return this;
×
195
    }
196

197
    public Builder invitedBy(UserMini invitedBy) {
198
      this.invitedBy = invitedBy;
×
199
      return this;
×
200
    }
201

202
    public Builder status(String status) {
203
      this.status = status;
×
204
      return this;
×
205
    }
206

207
    public Builder createdAt(Date createdAt) {
208
      this.createdAt = createdAt;
×
209
      return this;
×
210
    }
211

212
    public Builder modifiedAt(Date modifiedAt) {
213
      this.modifiedAt = modifiedAt;
×
214
      return this;
×
215
    }
216

217
    public Invite build() {
218
      return new Invite(this);
×
219
    }
220
  }
221
}
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