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

box / box-java-sdk-gen / #296

25 Jun 2025 10:12AM UTC coverage: 35.677% (-0.05%) from 35.723%
#296

Pull #348

github

web-flow
Merge d48b178e0 into d8480ee6c
Pull Request #348: chore: Update .codegen.json with commit hash of codegen and openapi spec

68 of 82 new or added lines in 2 files covered. (82.93%)

11820 existing lines in 631 files now uncovered.

16946 of 47499 relevant lines covered (35.68%)

0.36 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
@JsonFilter("nullablePropertyFilter")
13
public class Collection extends SerializableObject {
14

15
  protected String id;
16

17
  @JsonDeserialize(using = CollectionTypeField.CollectionTypeFieldDeserializer.class)
18
  @JsonSerialize(using = CollectionTypeField.CollectionTypeFieldSerializer.class)
19
  protected EnumWrapper<CollectionTypeField> type;
20

21
  @JsonDeserialize(using = CollectionNameField.CollectionNameFieldDeserializer.class)
22
  @JsonSerialize(using = CollectionNameField.CollectionNameFieldSerializer.class)
23
  protected EnumWrapper<CollectionNameField> name;
24

25
  @JsonDeserialize(
26
      using = CollectionCollectionTypeField.CollectionCollectionTypeFieldDeserializer.class)
27
  @JsonSerialize(
28
      using = CollectionCollectionTypeField.CollectionCollectionTypeFieldSerializer.class)
29
  @JsonProperty("collection_type")
30
  protected EnumWrapper<CollectionCollectionTypeField> collectionType;
31

32
  public Collection() {
UNCOV
33
    super();
×
34
  }
×
35

36
  protected Collection(Builder builder) {
37
    super();
×
38
    this.id = builder.id;
×
39
    this.type = builder.type;
×
UNCOV
40
    this.name = builder.name;
×
UNCOV
41
    this.collectionType = builder.collectionType;
×
42
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
UNCOV
43
  }
×
44

45
  public String getId() {
46
    return id;
×
47
  }
48

49
  public EnumWrapper<CollectionTypeField> getType() {
50
    return type;
×
51
  }
52

53
  public EnumWrapper<CollectionNameField> getName() {
54
    return name;
×
55
  }
56

57
  public EnumWrapper<CollectionCollectionTypeField> getCollectionType() {
UNCOV
58
    return collectionType;
×
59
  }
60

61
  @Override
62
  public boolean equals(Object o) {
63
    if (this == o) {
×
UNCOV
64
      return true;
×
65
    }
66
    if (o == null || getClass() != o.getClass()) {
×
67
      return false;
×
68
    }
69
    Collection casted = (Collection) o;
×
UNCOV
70
    return Objects.equals(id, casted.id)
×
UNCOV
71
        && Objects.equals(type, casted.type)
×
UNCOV
72
        && Objects.equals(name, casted.name)
×
UNCOV
73
        && Objects.equals(collectionType, casted.collectionType);
×
74
  }
75

76
  @Override
77
  public int hashCode() {
UNCOV
78
    return Objects.hash(id, type, name, collectionType);
×
79
  }
80

81
  @Override
82
  public String toString() {
UNCOV
83
    return "Collection{"
×
84
        + "id='"
85
        + id
86
        + '\''
87
        + ", "
88
        + "type='"
89
        + type
90
        + '\''
91
        + ", "
92
        + "name='"
93
        + name
94
        + '\''
95
        + ", "
96
        + "collectionType='"
97
        + collectionType
98
        + '\''
99
        + "}";
100
  }
101

UNCOV
102
  public static class Builder extends NullableFieldTracker {
×
103

104
    protected String id;
105

106
    protected EnumWrapper<CollectionTypeField> type;
107

108
    protected EnumWrapper<CollectionNameField> name;
109

110
    protected EnumWrapper<CollectionCollectionTypeField> collectionType;
111

112
    public Builder id(String id) {
UNCOV
113
      this.id = id;
×
114
      return this;
×
115
    }
116

117
    public Builder type(CollectionTypeField type) {
UNCOV
118
      this.type = new EnumWrapper<CollectionTypeField>(type);
×
119
      return this;
×
120
    }
121

122
    public Builder type(EnumWrapper<CollectionTypeField> type) {
UNCOV
123
      this.type = type;
×
124
      return this;
×
125
    }
126

127
    public Builder name(CollectionNameField name) {
UNCOV
128
      this.name = new EnumWrapper<CollectionNameField>(name);
×
129
      return this;
×
130
    }
131

132
    public Builder name(EnumWrapper<CollectionNameField> name) {
UNCOV
133
      this.name = name;
×
134
      return this;
×
135
    }
136

137
    public Builder collectionType(CollectionCollectionTypeField collectionType) {
UNCOV
138
      this.collectionType = new EnumWrapper<CollectionCollectionTypeField>(collectionType);
×
139
      return this;
×
140
    }
141

142
    public Builder collectionType(EnumWrapper<CollectionCollectionTypeField> collectionType) {
UNCOV
143
      this.collectionType = collectionType;
×
144
      return this;
×
145
    }
146

147
    public Collection build() {
UNCOV
148
      return new Collection(this);
×
149
    }
150
  }
151
}
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