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

box / box-java-sdk / #5838

16 Dec 2025 01:57PM UTC coverage: 12.903% (-0.4%) from 13.282%
#5838

Pull #1633

github

web-flow
Merge 39eadee31 into af4861f83
Pull Request #1633: feat(boxsdkgen): Treat nullable fields as Optional (box/box-codegen#906)

0 of 1897 new or added lines in 73 files covered. (0.0%)

19 existing lines in 10 files now uncovered.

8374 of 64898 relevant lines covered (12.9%)

0.13 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/metadatataxonomynode/MetadataTaxonomyNode.java
1
package com.box.sdkgen.schemas.metadatataxonomynode;
2

3
import com.box.sdkgen.internal.NullableFieldTracker;
4
import com.box.sdkgen.internal.SerializableObject;
5
import com.box.sdkgen.schemas.metadatataxonomyancestor.MetadataTaxonomyAncestor;
6
import com.fasterxml.jackson.annotation.JsonFilter;
7
import com.fasterxml.jackson.annotation.JsonProperty;
8
import java.util.List;
9
import java.util.Objects;
10

11
/** A node object for metadata taxonomy that can be used in metadata templates. */
12
@JsonFilter("nullablePropertyFilter")
13
public class MetadataTaxonomyNode extends SerializableObject {
14

15
  /** A unique identifier of the metadata taxonomy node. */
16
  protected final String id;
17

18
  /** The display name of the metadata taxonomy node. */
19
  protected final String displayName;
20

21
  /** An index of the level to which the node belongs. */
22
  protected final long level;
23

24
  /** The identifier of the parent node. */
25
  protected String parentId;
26

27
  /** An array of identifiers for all ancestor nodes. Not returned for root-level nodes. */
28
  protected List<String> nodePath;
29

30
  /** An array of objects for all ancestor nodes. Not returned for root-level nodes. */
31
  protected List<MetadataTaxonomyAncestor> ancestors;
32

33
  public MetadataTaxonomyNode(
34
      @JsonProperty("id") String id,
35
      @JsonProperty("displayName") String displayName,
36
      @JsonProperty("level") long level) {
NEW
37
    super();
×
NEW
38
    this.id = id;
×
NEW
39
    this.displayName = displayName;
×
NEW
40
    this.level = level;
×
NEW
41
  }
×
42

43
  protected MetadataTaxonomyNode(Builder builder) {
NEW
44
    super();
×
NEW
45
    this.id = builder.id;
×
NEW
46
    this.displayName = builder.displayName;
×
NEW
47
    this.level = builder.level;
×
NEW
48
    this.parentId = builder.parentId;
×
NEW
49
    this.nodePath = builder.nodePath;
×
NEW
50
    this.ancestors = builder.ancestors;
×
NEW
51
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
NEW
52
  }
×
53

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

58
  public String getDisplayName() {
NEW
59
    return displayName;
×
60
  }
61

62
  public long getLevel() {
NEW
63
    return level;
×
64
  }
65

66
  public String getParentId() {
NEW
67
    return parentId;
×
68
  }
69

70
  public List<String> getNodePath() {
NEW
71
    return nodePath;
×
72
  }
73

74
  public List<MetadataTaxonomyAncestor> getAncestors() {
NEW
75
    return ancestors;
×
76
  }
77

78
  @Override
79
  public boolean equals(Object o) {
NEW
80
    if (this == o) {
×
NEW
81
      return true;
×
82
    }
NEW
83
    if (o == null || getClass() != o.getClass()) {
×
NEW
84
      return false;
×
85
    }
NEW
86
    MetadataTaxonomyNode casted = (MetadataTaxonomyNode) o;
×
NEW
87
    return Objects.equals(id, casted.id)
×
NEW
88
        && Objects.equals(displayName, casted.displayName)
×
NEW
89
        && Objects.equals(level, casted.level)
×
NEW
90
        && Objects.equals(parentId, casted.parentId)
×
NEW
91
        && Objects.equals(nodePath, casted.nodePath)
×
NEW
92
        && Objects.equals(ancestors, casted.ancestors);
×
93
  }
94

95
  @Override
96
  public int hashCode() {
NEW
97
    return Objects.hash(id, displayName, level, parentId, nodePath, ancestors);
×
98
  }
99

100
  @Override
101
  public String toString() {
NEW
102
    return "MetadataTaxonomyNode{"
×
103
        + "id='"
104
        + id
105
        + '\''
106
        + ", "
107
        + "displayName='"
108
        + displayName
109
        + '\''
110
        + ", "
111
        + "level='"
112
        + level
113
        + '\''
114
        + ", "
115
        + "parentId='"
116
        + parentId
117
        + '\''
118
        + ", "
119
        + "nodePath='"
120
        + nodePath
121
        + '\''
122
        + ", "
123
        + "ancestors='"
124
        + ancestors
125
        + '\''
126
        + "}";
127
  }
128

129
  public static class Builder extends NullableFieldTracker {
130

131
    protected final String id;
132

133
    protected final String displayName;
134

135
    protected final long level;
136

137
    protected String parentId;
138

139
    protected List<String> nodePath;
140

141
    protected List<MetadataTaxonomyAncestor> ancestors;
142

143
    public Builder(String id, String displayName, long level) {
NEW
144
      super();
×
NEW
145
      this.id = id;
×
NEW
146
      this.displayName = displayName;
×
NEW
147
      this.level = level;
×
NEW
148
    }
×
149

150
    public Builder parentId(String parentId) {
NEW
151
      this.parentId = parentId;
×
NEW
152
      return this;
×
153
    }
154

155
    public Builder nodePath(List<String> nodePath) {
NEW
156
      this.nodePath = nodePath;
×
NEW
157
      return this;
×
158
    }
159

160
    public Builder ancestors(List<MetadataTaxonomyAncestor> ancestors) {
NEW
161
      this.ancestors = ancestors;
×
NEW
162
      return this;
×
163
    }
164

165
    public MetadataTaxonomyNode build() {
NEW
166
      return new MetadataTaxonomyNode(this);
×
167
    }
168
  }
169
}
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