• 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

23.33
/src/main/java/com/box/sdkgen/managers/comments/CreateCommentRequestBody.java
1
package com.box.sdkgen.managers.comments;
2

3
import com.box.sdkgen.internal.NullableFieldTracker;
4
import com.box.sdkgen.internal.SerializableObject;
5
import com.fasterxml.jackson.annotation.JsonFilter;
6
import com.fasterxml.jackson.annotation.JsonProperty;
7
import java.util.Objects;
8

9
@JsonFilter("nullablePropertyFilter")
10
public class CreateCommentRequestBody extends SerializableObject {
11

12
  /**
13
   * The text of the comment.
14
   *
15
   * <p>To mention a user, use the `tagged_message` parameter instead.
16
   */
17
  protected final String message;
18

19
  /**
20
   * The text of the comment, including `&#64;[user_id:name]` somewhere in the message to mention
21
   * another user, which will send them an email notification, letting them know they have been
22
   * mentioned.
23
   *
24
   * <p>The `user_id` is the target user's ID, where the `name` can be any custom phrase. In the Box
25
   * UI this name will link to the user's profile.
26
   *
27
   * <p>If you are not mentioning another user, use `message` instead.
28
   */
29
  @JsonProperty("tagged_message")
30
  protected String taggedMessage;
31

32
  /** The item to attach the comment to. */
33
  protected final CreateCommentRequestBodyItemField item;
34

35
  public CreateCommentRequestBody(
36
      @JsonProperty("message") String message,
37
      @JsonProperty("item") CreateCommentRequestBodyItemField item) {
38
    super();
1✔
39
    this.message = message;
1✔
40
    this.item = item;
1✔
41
  }
1✔
42

43
  protected CreateCommentRequestBody(Builder builder) {
44
    super();
×
45
    this.message = builder.message;
×
46
    this.taggedMessage = builder.taggedMessage;
×
47
    this.item = builder.item;
×
48
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
49
  }
×
50

51
  public String getMessage() {
52
    return message;
1✔
53
  }
54

55
  public String getTaggedMessage() {
56
    return taggedMessage;
1✔
57
  }
58

59
  public CreateCommentRequestBodyItemField getItem() {
60
    return item;
1✔
61
  }
62

63
  @Override
64
  public boolean equals(Object o) {
65
    if (this == o) {
×
66
      return true;
×
67
    }
68
    if (o == null || getClass() != o.getClass()) {
×
69
      return false;
×
70
    }
71
    CreateCommentRequestBody casted = (CreateCommentRequestBody) o;
×
72
    return Objects.equals(message, casted.message)
×
73
        && Objects.equals(taggedMessage, casted.taggedMessage)
×
74
        && Objects.equals(item, casted.item);
×
75
  }
76

77
  @Override
78
  public int hashCode() {
79
    return Objects.hash(message, taggedMessage, item);
×
80
  }
81

82
  @Override
83
  public String toString() {
84
    return "CreateCommentRequestBody{"
×
85
        + "message='"
86
        + message
87
        + '\''
88
        + ", "
89
        + "taggedMessage='"
90
        + taggedMessage
91
        + '\''
92
        + ", "
93
        + "item='"
94
        + item
95
        + '\''
96
        + "}";
97
  }
98

99
  public static class Builder extends NullableFieldTracker {
100

101
    protected final String message;
102

103
    protected String taggedMessage;
104

105
    protected final CreateCommentRequestBodyItemField item;
106

107
    public Builder(String message, CreateCommentRequestBodyItemField item) {
108
      super();
×
109
      this.message = message;
×
110
      this.item = item;
×
111
    }
×
112

113
    public Builder taggedMessage(String taggedMessage) {
114
      this.taggedMessage = taggedMessage;
×
115
      return this;
×
116
    }
117

118
    public CreateCommentRequestBody build() {
119
      return new CreateCommentRequestBody(this);
×
120
    }
121
  }
122
}
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