• 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.0
/src/main/java/com/box/sdkgen/schemas/folderbase/FolderBase.java
1
package com.box.sdkgen.schemas.folderbase;
2

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

13
/**
14
 * The bare basic representation of a folder, the minimal amount of fields returned when using the
15
 * `fields` query parameter.
16
 */
17
@JsonFilter("nullablePropertyFilter")
18
public class FolderBase extends SerializableObject {
19

20
  /**
21
   * The unique identifier that represent a folder.
22
   *
23
   * <p>The ID for any folder can be determined by visiting a folder in the web application and
24
   * copying the ID from the URL. For example, for the URL `https://*.app.box.com/folders/123` the
25
   * `folder_id` is `123`.
26
   */
27
  protected final String id;
28

29
  /**
30
   * The HTTP `etag` of this folder. This can be used within some API endpoints in the `If-Match`
31
   * and `If-None-Match` headers to only perform changes on the folder if (no) changes have
32
   * happened.
33
   */
34
  @Nullable protected String etag;
35

36
  /** The value will always be `folder`. */
37
  @JsonDeserialize(using = FolderBaseTypeField.FolderBaseTypeFieldDeserializer.class)
38
  @JsonSerialize(using = FolderBaseTypeField.FolderBaseTypeFieldSerializer.class)
39
  protected EnumWrapper<FolderBaseTypeField> type;
40

41
  public FolderBase(@JsonProperty("id") String id) {
42
    super();
1✔
43
    this.id = id;
1✔
44
    this.type = new EnumWrapper<FolderBaseTypeField>(FolderBaseTypeField.FOLDER);
1✔
45
  }
1✔
46

47
  protected FolderBase(Builder builder) {
48
    super();
×
49
    this.id = builder.id;
×
50
    this.etag = builder.etag;
×
51
    this.type = builder.type;
×
52
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
53
  }
×
54

55
  public String getId() {
56
    return id;
1✔
57
  }
58

59
  public String getEtag() {
60
    return etag;
1✔
61
  }
62

63
  public EnumWrapper<FolderBaseTypeField> getType() {
64
    return type;
1✔
65
  }
66

67
  @Override
68
  public boolean equals(Object o) {
69
    if (this == o) {
×
70
      return true;
×
71
    }
72
    if (o == null || getClass() != o.getClass()) {
×
73
      return false;
×
74
    }
75
    FolderBase casted = (FolderBase) o;
×
76
    return Objects.equals(id, casted.id)
×
77
        && Objects.equals(etag, casted.etag)
×
78
        && Objects.equals(type, casted.type);
×
79
  }
80

81
  @Override
82
  public int hashCode() {
83
    return Objects.hash(id, etag, type);
×
84
  }
85

86
  @Override
87
  public String toString() {
88
    return "FolderBase{"
×
89
        + "id='"
90
        + id
91
        + '\''
92
        + ", "
93
        + "etag='"
94
        + etag
95
        + '\''
96
        + ", "
97
        + "type='"
98
        + type
99
        + '\''
100
        + "}";
101
  }
102

103
  public static class Builder extends NullableFieldTracker {
104

105
    protected final String id;
106

107
    protected String etag;
108

109
    protected EnumWrapper<FolderBaseTypeField> type;
110

111
    public Builder(String id) {
112
      super();
×
113
      this.id = id;
×
114
      this.type = new EnumWrapper<FolderBaseTypeField>(FolderBaseTypeField.FOLDER);
×
115
    }
×
116

117
    public Builder etag(String etag) {
118
      this.etag = etag;
×
119
      this.markNullableFieldAsSet("etag");
×
120
      return this;
×
121
    }
122

123
    public Builder type(FolderBaseTypeField type) {
124
      this.type = new EnumWrapper<FolderBaseTypeField>(type);
×
125
      return this;
×
126
    }
127

128
    public Builder type(EnumWrapper<FolderBaseTypeField> type) {
129
      this.type = type;
×
130
      return this;
×
131
    }
132

133
    public FolderBase build() {
134
      return new FolderBase(this);
×
135
    }
136
  }
137
}
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