• 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

14.71
/src/main/java/com/box/sdkgen/schemas/metadatabase/MetadataBase.java
1
package com.box.sdkgen.schemas.metadatabase;
2

3
import com.box.sdkgen.internal.NullableFieldTracker;
4
import com.box.sdkgen.internal.SerializableObject;
5
import com.fasterxml.jackson.annotation.JsonFilter;
6
import com.fasterxml.jackson.annotation.JsonProperty;
7
import java.util.Objects;
8

9
/** The base representation of a metadata instance. */
10
@JsonFilter("nullablePropertyFilter")
11
public class MetadataBase extends SerializableObject {
12

13
  /**
14
   * The identifier of the item that this metadata instance has been attached to. This combines the
15
   * `type` and the `id` of the parent in the form `{type}_{id}`.
16
   */
17
  @JsonProperty("$parent")
18
  protected String parent;
19

20
  /** The name of the template. */
21
  @JsonProperty("$template")
22
  protected String template;
23

24
  /**
25
   * An ID for the scope in which this template has been applied. This will be
26
   * `enterprise_{enterprise_id}` for templates defined for use in this enterprise, and `global` for
27
   * general templates that are available to all enterprises using Box.
28
   */
29
  @JsonProperty("$scope")
30
  protected String scope;
31

32
  /**
33
   * The version of the metadata instance. This version starts at 0 and increases every time a
34
   * user-defined property is modified.
35
   */
36
  @JsonProperty("$version")
37
  protected Long version;
38

39
  public MetadataBase() {
40
    super();
1✔
41
  }
1✔
42

43
  protected MetadataBase(Builder builder) {
44
    super();
×
45
    this.parent = builder.parent;
×
46
    this.template = builder.template;
×
47
    this.scope = builder.scope;
×
48
    this.version = builder.version;
×
49
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
50
  }
×
51

52
  public String getParent() {
53
    return parent;
×
54
  }
55

56
  public String getTemplate() {
57
    return template;
1✔
58
  }
59

60
  public String getScope() {
61
    return scope;
1✔
62
  }
63

64
  public Long getVersion() {
65
    return version;
1✔
66
  }
67

68
  @Override
69
  public boolean equals(Object o) {
70
    if (this == o) {
×
71
      return true;
×
72
    }
73
    if (o == null || getClass() != o.getClass()) {
×
74
      return false;
×
75
    }
76
    MetadataBase casted = (MetadataBase) o;
×
77
    return Objects.equals(parent, casted.parent)
×
78
        && Objects.equals(template, casted.template)
×
79
        && Objects.equals(scope, casted.scope)
×
80
        && Objects.equals(version, casted.version);
×
81
  }
82

83
  @Override
84
  public int hashCode() {
85
    return Objects.hash(parent, template, scope, version);
×
86
  }
87

88
  @Override
89
  public String toString() {
90
    return "MetadataBase{"
×
91
        + "parent='"
92
        + parent
93
        + '\''
94
        + ", "
95
        + "template='"
96
        + template
97
        + '\''
98
        + ", "
99
        + "scope='"
100
        + scope
101
        + '\''
102
        + ", "
103
        + "version='"
104
        + version
105
        + '\''
106
        + "}";
107
  }
108

109
  public static class Builder extends NullableFieldTracker {
×
110

111
    protected String parent;
112

113
    protected String template;
114

115
    protected String scope;
116

117
    protected Long version;
118

119
    public Builder parent(String parent) {
120
      this.parent = parent;
×
121
      return this;
×
122
    }
123

124
    public Builder template(String template) {
125
      this.template = template;
×
126
      return this;
×
127
    }
128

129
    public Builder scope(String scope) {
130
      this.scope = scope;
×
131
      return this;
×
132
    }
133

134
    public Builder version(Long version) {
135
      this.version = version;
×
136
      return this;
×
137
    }
138

139
    public MetadataBase build() {
140
      return new MetadataBase(this);
×
141
    }
142
  }
143
}
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