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

box / box-java-sdk / #5076

07 Oct 2025 12:35PM UTC coverage: 37.132% (+0.007%) from 37.125%
#5076

push

github

web-flow
test: Change `Event.additionalDetails` field assertion in events test (box/box-codegen#858) (#1491)

18454 of 49699 relevant lines covered (37.13%)

0.37 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.time.OffsetDateTime;
13
import java.util.Objects;
14

15
/** Standard representation of a comment. */
16
@JsonFilter("nullablePropertyFilter")
17
public class Comment extends CommentBase {
18

19
  /** Whether or not this comment is a reply to another comment. */
20
  @JsonProperty("is_reply_comment")
21
  protected Boolean isReplyComment;
22

23
  /** The text of the comment, as provided by the user. */
24
  protected String message;
25

26
  @JsonProperty("created_by")
27
  protected UserMini createdBy;
28

29
  /** The time this comment was created. */
30
  @JsonProperty("created_at")
31
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
32
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
33
  protected OffsetDateTime createdAt;
34

35
  /** The time this comment was last modified. */
36
  @JsonProperty("modified_at")
37
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
38
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
39
  protected OffsetDateTime modifiedAt;
40

41
  protected CommentItemField item;
42

43
  public Comment() {
44
    super();
1✔
45
  }
1✔
46

47
  protected Comment(Builder builder) {
48
    super(builder);
×
49
    this.isReplyComment = builder.isReplyComment;
×
50
    this.message = builder.message;
×
51
    this.createdBy = builder.createdBy;
×
52
    this.createdAt = builder.createdAt;
×
53
    this.modifiedAt = builder.modifiedAt;
×
54
    this.item = builder.item;
×
55
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
56
  }
×
57

58
  public Boolean getIsReplyComment() {
59
    return isReplyComment;
1✔
60
  }
61

62
  public String getMessage() {
63
    return message;
1✔
64
  }
65

66
  public UserMini getCreatedBy() {
67
    return createdBy;
×
68
  }
69

70
  public OffsetDateTime getCreatedAt() {
71
    return createdAt;
×
72
  }
73

74
  public OffsetDateTime getModifiedAt() {
75
    return modifiedAt;
×
76
  }
77

78
  public CommentItemField getItem() {
79
    return item;
1✔
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
    Comment casted = (Comment) o;
×
91
    return Objects.equals(id, casted.id)
×
92
        && Objects.equals(type, casted.type)
×
93
        && Objects.equals(isReplyComment, casted.isReplyComment)
×
94
        && Objects.equals(message, casted.message)
×
95
        && Objects.equals(createdBy, casted.createdBy)
×
96
        && Objects.equals(createdAt, casted.createdAt)
×
97
        && Objects.equals(modifiedAt, casted.modifiedAt)
×
98
        && Objects.equals(item, casted.item);
×
99
  }
100

101
  @Override
102
  public int hashCode() {
103
    return Objects.hash(id, type, isReplyComment, message, createdBy, createdAt, modifiedAt, item);
×
104
  }
105

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

143
  public static class Builder extends CommentBase.Builder {
×
144

145
    protected Boolean isReplyComment;
146

147
    protected String message;
148

149
    protected UserMini createdBy;
150

151
    protected OffsetDateTime createdAt;
152

153
    protected OffsetDateTime modifiedAt;
154

155
    protected CommentItemField item;
156

157
    public Builder isReplyComment(Boolean isReplyComment) {
158
      this.isReplyComment = isReplyComment;
×
159
      return this;
×
160
    }
161

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

167
    public Builder createdBy(UserMini createdBy) {
168
      this.createdBy = createdBy;
×
169
      return this;
×
170
    }
171

172
    public Builder createdAt(OffsetDateTime createdAt) {
173
      this.createdAt = createdAt;
×
174
      return this;
×
175
    }
176

177
    public Builder modifiedAt(OffsetDateTime modifiedAt) {
178
      this.modifiedAt = modifiedAt;
×
179
      return this;
×
180
    }
181

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

187
    @Override
188
    public Builder id(String id) {
189
      this.id = id;
×
190
      return this;
×
191
    }
192

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

199
    @Override
200
    public Builder type(EnumWrapper<CommentBaseTypeField> type) {
201
      this.type = type;
×
202
      return this;
×
203
    }
204

205
    public Comment build() {
206
      return new Comment(this);
×
207
    }
208
  }
209
}
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