• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

box / box-java-sdk / #6241

10 Feb 2026 05:27PM UTC coverage: 24.324% (+11.5%) from 12.84%
#6241

push

github

web-flow
fix(boxsdkgen): Move assigning default values from builder constructor to `build()` method (box/box-codegen#922) (#1712)

0 of 1677 new or added lines in 569 files covered. (0.0%)

2130 existing lines in 537 files now uncovered.

7388 of 30373 relevant lines covered (24.32%)

0.28 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

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

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

15
/** An invite for a user to an enterprise. */
16
@JsonFilter("nullablePropertyFilter")
17
public class Invite extends SerializableObject {
18

19
  /** The unique identifier for this invite. */
20
  protected final String id;
21

22
  /** The value will always be `invite`. */
23
  @JsonDeserialize(using = InviteTypeField.InviteTypeFieldDeserializer.class)
24
  @JsonSerialize(using = InviteTypeField.InviteTypeFieldSerializer.class)
25
  protected EnumWrapper<InviteTypeField> type;
26

27
  /** A representation of a Box enterprise. */
28
  @JsonProperty("invited_to")
29
  protected InviteInvitedToField invitedTo;
30

31
  @JsonProperty("actionable_by")
32
  protected UserMini actionableBy;
33

34
  @JsonProperty("invited_by")
35
  protected UserMini invitedBy;
36

37
  /** The status of the invite. */
38
  protected String status;
39

40
  /** When the invite was created. */
41
  @JsonProperty("created_at")
42
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
43
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
44
  protected OffsetDateTime createdAt;
45

46
  /** When the invite was modified. */
47
  @JsonProperty("modified_at")
48
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
49
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
50
  protected OffsetDateTime modifiedAt;
51

52
  public Invite(@JsonProperty("id") String id) {
53
    super();
×
54
    this.id = id;
×
55
    this.type = new EnumWrapper<InviteTypeField>(InviteTypeField.INVITE);
×
56
  }
×
57

58
  protected Invite(Builder builder) {
59
    super();
×
60
    this.id = builder.id;
×
61
    this.type = builder.type;
×
62
    this.invitedTo = builder.invitedTo;
×
63
    this.actionableBy = builder.actionableBy;
×
64
    this.invitedBy = builder.invitedBy;
×
65
    this.status = builder.status;
×
66
    this.createdAt = builder.createdAt;
×
67
    this.modifiedAt = builder.modifiedAt;
×
68
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
69
  }
×
70

71
  public String getId() {
72
    return id;
×
73
  }
74

75
  public EnumWrapper<InviteTypeField> getType() {
76
    return type;
×
77
  }
78

79
  public InviteInvitedToField getInvitedTo() {
80
    return invitedTo;
×
81
  }
82

83
  public UserMini getActionableBy() {
84
    return actionableBy;
×
85
  }
86

87
  public UserMini getInvitedBy() {
88
    return invitedBy;
×
89
  }
90

91
  public String getStatus() {
92
    return status;
×
93
  }
94

95
  public OffsetDateTime getCreatedAt() {
96
    return createdAt;
×
97
  }
98

99
  public OffsetDateTime getModifiedAt() {
100
    return modifiedAt;
×
101
  }
102

103
  @Override
104
  public boolean equals(Object o) {
105
    if (this == o) {
×
106
      return true;
×
107
    }
108
    if (o == null || getClass() != o.getClass()) {
×
109
      return false;
×
110
    }
111
    Invite casted = (Invite) o;
×
112
    return Objects.equals(id, casted.id)
×
113
        && Objects.equals(type, casted.type)
×
114
        && Objects.equals(invitedTo, casted.invitedTo)
×
115
        && Objects.equals(actionableBy, casted.actionableBy)
×
116
        && Objects.equals(invitedBy, casted.invitedBy)
×
117
        && Objects.equals(status, casted.status)
×
118
        && Objects.equals(createdAt, casted.createdAt)
×
119
        && Objects.equals(modifiedAt, casted.modifiedAt);
×
120
  }
121

122
  @Override
123
  public int hashCode() {
124
    return Objects.hash(
×
125
        id, type, invitedTo, actionableBy, invitedBy, status, createdAt, modifiedAt);
126
  }
127

128
  @Override
129
  public String toString() {
130
    return "Invite{"
×
131
        + "id='"
132
        + id
133
        + '\''
134
        + ", "
135
        + "type='"
136
        + type
137
        + '\''
138
        + ", "
139
        + "invitedTo='"
140
        + invitedTo
141
        + '\''
142
        + ", "
143
        + "actionableBy='"
144
        + actionableBy
145
        + '\''
146
        + ", "
147
        + "invitedBy='"
148
        + invitedBy
149
        + '\''
150
        + ", "
151
        + "status='"
152
        + status
153
        + '\''
154
        + ", "
155
        + "createdAt='"
156
        + createdAt
157
        + '\''
158
        + ", "
159
        + "modifiedAt='"
160
        + modifiedAt
161
        + '\''
162
        + "}";
163
  }
164

165
  public static class Builder extends NullableFieldTracker {
166

167
    protected final String id;
168

169
    protected EnumWrapper<InviteTypeField> type;
170

171
    protected InviteInvitedToField invitedTo;
172

173
    protected UserMini actionableBy;
174

175
    protected UserMini invitedBy;
176

177
    protected String status;
178

179
    protected OffsetDateTime createdAt;
180

181
    protected OffsetDateTime modifiedAt;
182

183
    public Builder(String id) {
184
      super();
×
185
      this.id = id;
×
186
    }
×
187

188
    public Builder type(InviteTypeField type) {
189
      this.type = new EnumWrapper<InviteTypeField>(type);
×
UNCOV
190
      return this;
×
191
    }
192

193
    public Builder type(EnumWrapper<InviteTypeField> type) {
194
      this.type = type;
×
UNCOV
195
      return this;
×
196
    }
197

198
    public Builder invitedTo(InviteInvitedToField invitedTo) {
199
      this.invitedTo = invitedTo;
×
UNCOV
200
      return this;
×
201
    }
202

203
    public Builder actionableBy(UserMini actionableBy) {
204
      this.actionableBy = actionableBy;
×
UNCOV
205
      return this;
×
206
    }
207

208
    public Builder invitedBy(UserMini invitedBy) {
209
      this.invitedBy = invitedBy;
×
UNCOV
210
      return this;
×
211
    }
212

213
    public Builder status(String status) {
214
      this.status = status;
×
UNCOV
215
      return this;
×
216
    }
217

218
    public Builder createdAt(OffsetDateTime createdAt) {
219
      this.createdAt = createdAt;
×
UNCOV
220
      return this;
×
221
    }
222

223
    public Builder modifiedAt(OffsetDateTime modifiedAt) {
224
      this.modifiedAt = modifiedAt;
×
UNCOV
225
      return this;
×
226
    }
227

228
    public Invite build() {
NEW
229
      if (this.type == null) {
×
NEW
230
        this.type = new EnumWrapper<InviteTypeField>(InviteTypeField.INVITE);
×
231
      }
UNCOV
232
      return new Invite(this);
×
233
    }
234
  }
235
}
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