• 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

0.0
/src/main/java/com/box/sdkgen/schemas/appitemeventsource/AppItemEventSource.java
1
package com.box.sdkgen.schemas.appitemeventsource;
2

3
import com.box.sdkgen.internal.NullableFieldTracker;
4
import com.box.sdkgen.internal.SerializableObject;
5
import com.box.sdkgen.schemas.groupmini.GroupMini;
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.Objects;
13

14
/** The AppItem that triggered an event in the event stream. */
15
@JsonFilter("nullablePropertyFilter")
16
public class AppItemEventSource extends SerializableObject {
17

18
  /** The id of the `AppItem`. */
19
  protected final String id;
20

21
  /** The type of the source that this event represents. Can only be `app_item`. */
22
  @JsonDeserialize(
23
      using = AppItemEventSourceTypeField.AppItemEventSourceTypeFieldDeserializer.class)
24
  @JsonSerialize(using = AppItemEventSourceTypeField.AppItemEventSourceTypeFieldSerializer.class)
25
  protected EnumWrapper<AppItemEventSourceTypeField> type;
26

27
  /** The type of the `AppItem`. */
28
  @JsonProperty("app_item_type")
29
  protected final String appItemType;
30

31
  protected UserMini user;
32

33
  protected GroupMini group;
34

35
  public AppItemEventSource(
36
      @JsonProperty("id") String id, @JsonProperty("app_item_type") String appItemType) {
37
    super();
×
38
    this.id = id;
×
39
    this.appItemType = appItemType;
×
40
    this.type = new EnumWrapper<AppItemEventSourceTypeField>(AppItemEventSourceTypeField.APP_ITEM);
×
41
  }
×
42

43
  protected AppItemEventSource(Builder builder) {
44
    super();
×
45
    this.id = builder.id;
×
46
    this.type = builder.type;
×
47
    this.appItemType = builder.appItemType;
×
48
    this.user = builder.user;
×
49
    this.group = builder.group;
×
50
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
51
  }
×
52

53
  public String getId() {
54
    return id;
×
55
  }
56

57
  public EnumWrapper<AppItemEventSourceTypeField> getType() {
58
    return type;
×
59
  }
60

61
  public String getAppItemType() {
62
    return appItemType;
×
63
  }
64

65
  public UserMini getUser() {
66
    return user;
×
67
  }
68

69
  public GroupMini getGroup() {
70
    return group;
×
71
  }
72

73
  @Override
74
  public boolean equals(Object o) {
75
    if (this == o) {
×
76
      return true;
×
77
    }
78
    if (o == null || getClass() != o.getClass()) {
×
79
      return false;
×
80
    }
81
    AppItemEventSource casted = (AppItemEventSource) o;
×
82
    return Objects.equals(id, casted.id)
×
83
        && Objects.equals(type, casted.type)
×
84
        && Objects.equals(appItemType, casted.appItemType)
×
85
        && Objects.equals(user, casted.user)
×
86
        && Objects.equals(group, casted.group);
×
87
  }
88

89
  @Override
90
  public int hashCode() {
91
    return Objects.hash(id, type, appItemType, user, group);
×
92
  }
93

94
  @Override
95
  public String toString() {
96
    return "AppItemEventSource{"
×
97
        + "id='"
98
        + id
99
        + '\''
100
        + ", "
101
        + "type='"
102
        + type
103
        + '\''
104
        + ", "
105
        + "appItemType='"
106
        + appItemType
107
        + '\''
108
        + ", "
109
        + "user='"
110
        + user
111
        + '\''
112
        + ", "
113
        + "group='"
114
        + group
115
        + '\''
116
        + "}";
117
  }
118

119
  public static class Builder extends NullableFieldTracker {
120

121
    protected final String id;
122

123
    protected EnumWrapper<AppItemEventSourceTypeField> type;
124

125
    protected final String appItemType;
126

127
    protected UserMini user;
128

129
    protected GroupMini group;
130

131
    public Builder(String id, String appItemType) {
132
      super();
×
133
      this.id = id;
×
134
      this.appItemType = appItemType;
×
135
      this.type =
×
136
          new EnumWrapper<AppItemEventSourceTypeField>(AppItemEventSourceTypeField.APP_ITEM);
137
    }
×
138

139
    public Builder type(AppItemEventSourceTypeField type) {
140
      this.type = new EnumWrapper<AppItemEventSourceTypeField>(type);
×
141
      return this;
×
142
    }
143

144
    public Builder type(EnumWrapper<AppItemEventSourceTypeField> type) {
145
      this.type = type;
×
146
      return this;
×
147
    }
148

149
    public Builder user(UserMini user) {
150
      this.user = user;
×
151
      return this;
×
152
    }
153

154
    public Builder group(GroupMini group) {
155
      this.group = group;
×
156
      return this;
×
157
    }
158

159
    public AppItemEventSource build() {
160
      return new AppItemEventSource(this);
×
161
    }
162
  }
163
}
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