• 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

20.59
/src/main/java/com/box/sdkgen/schemas/appitem/AppItem.java
1
package com.box.sdkgen.schemas.appitem;
2

3
import com.box.sdkgen.internal.NullableFieldTracker;
4
import com.box.sdkgen.internal.SerializableObject;
5
import com.box.sdkgen.serialization.json.EnumWrapper;
6
import com.fasterxml.jackson.annotation.JsonFilter;
7
import com.fasterxml.jackson.annotation.JsonProperty;
8
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
9
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
10
import java.util.Objects;
11

12
/**
13
 * An app item represents an content object owned by an application. It can group files and folders
14
 * together from different paths. That set can be shared via a collaboration.
15
 */
16
@JsonFilter("nullablePropertyFilter")
17
public class AppItem extends SerializableObject {
18

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

22
  /** The value will always be `app_item`. */
23
  @JsonDeserialize(using = AppItemTypeField.AppItemTypeFieldDeserializer.class)
24
  @JsonSerialize(using = AppItemTypeField.AppItemTypeFieldSerializer.class)
25
  protected EnumWrapper<AppItemTypeField> type;
26

27
  /** The type of the app that owns this app item. */
28
  @JsonProperty("application_type")
29
  protected final String applicationType;
30

31
  public AppItem(
32
      @JsonProperty("id") String id, @JsonProperty("application_type") String applicationType) {
33
    super();
1✔
34
    this.id = id;
1✔
35
    this.applicationType = applicationType;
1✔
36
    this.type = new EnumWrapper<AppItemTypeField>(AppItemTypeField.APP_ITEM);
1✔
37
  }
1✔
38

39
  protected AppItem(Builder builder) {
40
    super();
×
41
    this.id = builder.id;
×
42
    this.type = builder.type;
×
43
    this.applicationType = builder.applicationType;
×
44
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
45
  }
×
46

47
  public String getId() {
48
    return id;
×
49
  }
50

51
  public EnumWrapper<AppItemTypeField> getType() {
52
    return type;
1✔
53
  }
54

55
  public String getApplicationType() {
56
    return applicationType;
1✔
57
  }
58

59
  @Override
60
  public boolean equals(Object o) {
61
    if (this == o) {
×
62
      return true;
×
63
    }
64
    if (o == null || getClass() != o.getClass()) {
×
65
      return false;
×
66
    }
67
    AppItem casted = (AppItem) o;
×
68
    return Objects.equals(id, casted.id)
×
69
        && Objects.equals(type, casted.type)
×
70
        && Objects.equals(applicationType, casted.applicationType);
×
71
  }
72

73
  @Override
74
  public int hashCode() {
75
    return Objects.hash(id, type, applicationType);
×
76
  }
77

78
  @Override
79
  public String toString() {
80
    return "AppItem{"
×
81
        + "id='"
82
        + id
83
        + '\''
84
        + ", "
85
        + "type='"
86
        + type
87
        + '\''
88
        + ", "
89
        + "applicationType='"
90
        + applicationType
91
        + '\''
92
        + "}";
93
  }
94

95
  public static class Builder extends NullableFieldTracker {
96

97
    protected final String id;
98

99
    protected EnumWrapper<AppItemTypeField> type;
100

101
    protected final String applicationType;
102

103
    public Builder(String id, String applicationType) {
104
      super();
×
105
      this.id = id;
×
106
      this.applicationType = applicationType;
×
107
      this.type = new EnumWrapper<AppItemTypeField>(AppItemTypeField.APP_ITEM);
×
108
    }
×
109

110
    public Builder type(AppItemTypeField type) {
111
      this.type = new EnumWrapper<AppItemTypeField>(type);
×
112
      return this;
×
113
    }
114

115
    public Builder type(EnumWrapper<AppItemTypeField> type) {
116
      this.type = type;
×
117
      return this;
×
118
    }
119

120
    public AppItem build() {
121
      return new AppItem(this);
×
122
    }
123
  }
124
}
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