• 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/collection/Collection.java
1
package com.box.sdkgen.schemas.collection;
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
 * A collection of items, including files and folders.
14
 *
15
 * <p>Currently, the only collection available is the `favorites` collection.
16
 *
17
 * <p>The contents of a collection can be explored in a similar way to which the contents of a
18
 * folder is explored.
19
 */
20
@JsonFilter("nullablePropertyFilter")
21
public class Collection extends SerializableObject {
22

23
  /** The unique identifier for this collection. */
24
  protected String id;
25

26
  /** The value will always be `collection`. */
27
  @JsonDeserialize(using = CollectionTypeField.CollectionTypeFieldDeserializer.class)
28
  @JsonSerialize(using = CollectionTypeField.CollectionTypeFieldSerializer.class)
29
  protected EnumWrapper<CollectionTypeField> type;
30

31
  /** The name of the collection. */
32
  @JsonDeserialize(using = CollectionNameField.CollectionNameFieldDeserializer.class)
33
  @JsonSerialize(using = CollectionNameField.CollectionNameFieldSerializer.class)
34
  protected EnumWrapper<CollectionNameField> name;
35

36
  /**
37
   * The type of the collection. This is used to determine the proper visual treatment for
38
   * collections.
39
   */
40
  @JsonDeserialize(
41
      using = CollectionCollectionTypeField.CollectionCollectionTypeFieldDeserializer.class)
42
  @JsonSerialize(
43
      using = CollectionCollectionTypeField.CollectionCollectionTypeFieldSerializer.class)
44
  @JsonProperty("collection_type")
45
  protected EnumWrapper<CollectionCollectionTypeField> collectionType;
46

47
  public Collection() {
48
    super();
×
49
  }
×
50

51
  protected Collection(Builder builder) {
52
    super();
×
53
    this.id = builder.id;
×
54
    this.type = builder.type;
×
55
    this.name = builder.name;
×
56
    this.collectionType = builder.collectionType;
×
57
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
58
  }
×
59

60
  public String getId() {
61
    return id;
×
62
  }
63

64
  public EnumWrapper<CollectionTypeField> getType() {
65
    return type;
×
66
  }
67

68
  public EnumWrapper<CollectionNameField> getName() {
69
    return name;
×
70
  }
71

72
  public EnumWrapper<CollectionCollectionTypeField> getCollectionType() {
73
    return collectionType;
×
74
  }
75

76
  @Override
77
  public boolean equals(Object o) {
78
    if (this == o) {
×
79
      return true;
×
80
    }
81
    if (o == null || getClass() != o.getClass()) {
×
82
      return false;
×
83
    }
84
    Collection casted = (Collection) o;
×
85
    return Objects.equals(id, casted.id)
×
86
        && Objects.equals(type, casted.type)
×
87
        && Objects.equals(name, casted.name)
×
88
        && Objects.equals(collectionType, casted.collectionType);
×
89
  }
90

91
  @Override
92
  public int hashCode() {
93
    return Objects.hash(id, type, name, collectionType);
×
94
  }
95

96
  @Override
97
  public String toString() {
98
    return "Collection{"
×
99
        + "id='"
100
        + id
101
        + '\''
102
        + ", "
103
        + "type='"
104
        + type
105
        + '\''
106
        + ", "
107
        + "name='"
108
        + name
109
        + '\''
110
        + ", "
111
        + "collectionType='"
112
        + collectionType
113
        + '\''
114
        + "}";
115
  }
116

117
  public static class Builder extends NullableFieldTracker {
×
118

119
    protected String id;
120

121
    protected EnumWrapper<CollectionTypeField> type;
122

123
    protected EnumWrapper<CollectionNameField> name;
124

125
    protected EnumWrapper<CollectionCollectionTypeField> collectionType;
126

127
    public Builder id(String id) {
128
      this.id = id;
×
129
      return this;
×
130
    }
131

132
    public Builder type(CollectionTypeField type) {
133
      this.type = new EnumWrapper<CollectionTypeField>(type);
×
134
      return this;
×
135
    }
136

137
    public Builder type(EnumWrapper<CollectionTypeField> type) {
138
      this.type = type;
×
139
      return this;
×
140
    }
141

142
    public Builder name(CollectionNameField name) {
143
      this.name = new EnumWrapper<CollectionNameField>(name);
×
144
      return this;
×
145
    }
146

147
    public Builder name(EnumWrapper<CollectionNameField> name) {
148
      this.name = name;
×
149
      return this;
×
150
    }
151

152
    public Builder collectionType(CollectionCollectionTypeField collectionType) {
153
      this.collectionType = new EnumWrapper<CollectionCollectionTypeField>(collectionType);
×
154
      return this;
×
155
    }
156

157
    public Builder collectionType(EnumWrapper<CollectionCollectionTypeField> collectionType) {
158
      this.collectionType = collectionType;
×
159
      return this;
×
160
    }
161

162
    public Collection build() {
163
      return new Collection(this);
×
164
    }
165
  }
166
}
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