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

box / box-java-sdk-gen / #293

24 Jun 2025 01:20PM UTC coverage: 35.661% (+0.03%) from 35.632%
#293

Pull #347

github

web-flow
Merge 2c100d09c into d8480ee6c
Pull Request #347: feat: Add Webhook Validation In Java (box/box-codegen#745)

68 of 82 new or added lines in 2 files covered. (82.93%)

11794 existing lines in 627 files now uncovered.

16937 of 47495 relevant lines covered (35.66%)

0.36 hits per line

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

9.62
/src/main/java/com/box/sdkgen/schemas/comment/Comment.java
1
package com.box.sdkgen.schemas.comment;
2

3
import com.box.sdkgen.internal.utils.DateTimeUtils;
4
import com.box.sdkgen.schemas.commentbase.CommentBase;
5
import com.box.sdkgen.schemas.commentbase.CommentBaseTypeField;
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.util.Date;
13
import java.util.Objects;
14

15
@JsonFilter("nullablePropertyFilter")
16
public class Comment extends CommentBase {
17

18
  @JsonProperty("is_reply_comment")
19
  protected Boolean isReplyComment;
20

21
  protected String message;
22

23
  @JsonProperty("created_by")
24
  protected UserMini createdBy;
25

26
  @JsonProperty("created_at")
27
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
28
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
29
  protected Date createdAt;
30

31
  @JsonProperty("modified_at")
32
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
33
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
34
  protected Date modifiedAt;
35

36
  protected CommentItemField item;
37

38
  public Comment() {
39
    super();
1✔
40
  }
1✔
41

42
  protected Comment(Builder builder) {
43
    super(builder);
×
44
    this.isReplyComment = builder.isReplyComment;
×
45
    this.message = builder.message;
×
46
    this.createdBy = builder.createdBy;
×
47
    this.createdAt = builder.createdAt;
×
48
    this.modifiedAt = builder.modifiedAt;
×
UNCOV
49
    this.item = builder.item;
×
UNCOV
50
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
UNCOV
51
  }
×
52

53
  public Boolean getIsReplyComment() {
54
    return isReplyComment;
1✔
55
  }
56

57
  public String getMessage() {
58
    return message;
1✔
59
  }
60

61
  public UserMini getCreatedBy() {
UNCOV
62
    return createdBy;
×
63
  }
64

65
  public Date getCreatedAt() {
UNCOV
66
    return createdAt;
×
67
  }
68

69
  public Date getModifiedAt() {
UNCOV
70
    return modifiedAt;
×
71
  }
72

73
  public CommentItemField getItem() {
74
    return item;
1✔
75
  }
76

77
  @Override
78
  public boolean equals(Object o) {
79
    if (this == o) {
×
80
      return true;
×
81
    }
82
    if (o == null || getClass() != o.getClass()) {
×
83
      return false;
×
84
    }
85
    Comment casted = (Comment) o;
×
86
    return Objects.equals(id, casted.id)
×
87
        && Objects.equals(type, casted.type)
×
88
        && Objects.equals(isReplyComment, casted.isReplyComment)
×
89
        && Objects.equals(message, casted.message)
×
90
        && Objects.equals(createdBy, casted.createdBy)
×
UNCOV
91
        && Objects.equals(createdAt, casted.createdAt)
×
UNCOV
92
        && Objects.equals(modifiedAt, casted.modifiedAt)
×
UNCOV
93
        && Objects.equals(item, casted.item);
×
94
  }
95

96
  @Override
97
  public int hashCode() {
UNCOV
98
    return Objects.hash(id, type, isReplyComment, message, createdBy, createdAt, modifiedAt, item);
×
99
  }
100

101
  @Override
102
  public String toString() {
UNCOV
103
    return "Comment{"
×
104
        + "id='"
105
        + id
106
        + '\''
107
        + ", "
108
        + "type='"
109
        + type
110
        + '\''
111
        + ", "
112
        + "isReplyComment='"
113
        + isReplyComment
114
        + '\''
115
        + ", "
116
        + "message='"
117
        + message
118
        + '\''
119
        + ", "
120
        + "createdBy='"
121
        + createdBy
122
        + '\''
123
        + ", "
124
        + "createdAt='"
125
        + createdAt
126
        + '\''
127
        + ", "
128
        + "modifiedAt='"
129
        + modifiedAt
130
        + '\''
131
        + ", "
132
        + "item='"
133
        + item
134
        + '\''
135
        + "}";
136
  }
137

UNCOV
138
  public static class Builder extends CommentBase.Builder {
×
139

140
    protected Boolean isReplyComment;
141

142
    protected String message;
143

144
    protected UserMini createdBy;
145

146
    protected Date createdAt;
147

148
    protected Date modifiedAt;
149

150
    protected CommentItemField item;
151

152
    public Builder isReplyComment(Boolean isReplyComment) {
UNCOV
153
      this.isReplyComment = isReplyComment;
×
UNCOV
154
      return this;
×
155
    }
156

157
    public Builder message(String message) {
UNCOV
158
      this.message = message;
×
UNCOV
159
      return this;
×
160
    }
161

162
    public Builder createdBy(UserMini createdBy) {
UNCOV
163
      this.createdBy = createdBy;
×
UNCOV
164
      return this;
×
165
    }
166

167
    public Builder createdAt(Date createdAt) {
UNCOV
168
      this.createdAt = createdAt;
×
UNCOV
169
      return this;
×
170
    }
171

172
    public Builder modifiedAt(Date modifiedAt) {
UNCOV
173
      this.modifiedAt = modifiedAt;
×
UNCOV
174
      return this;
×
175
    }
176

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

182
    @Override
183
    public Builder id(String id) {
UNCOV
184
      this.id = id;
×
UNCOV
185
      return this;
×
186
    }
187

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

194
    @Override
195
    public Builder type(EnumWrapper<CommentBaseTypeField> type) {
UNCOV
196
      this.type = type;
×
UNCOV
197
      return this;
×
198
    }
199

200
    public Comment build() {
UNCOV
201
      return new Comment(this);
×
202
    }
203
  }
204
}
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