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

box / box-java-sdk-gen / #294

24 Jun 2025 01:20PM UTC coverage: 35.662% (+0.03%) from 35.632%
#294

Pull #347

github

web-flow
Merge 2c100d09c into d8480ee6c
Pull Request #347: feat: Add Webhook Validation In Java (box/box-codegen#745)

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

11791 existing lines in 624 files now uncovered.

16939 of 47499 relevant lines covered (35.66%)

0.36 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

20.41
/src/main/java/com/box/sdkgen/schemas/metadatacascadepolicy/MetadataCascadePolicy.java
1
package com.box.sdkgen.schemas.metadatacascadepolicy;
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 MetadataCascadePolicy extends SerializableObject {
14

15
  protected final String id;
16

17
  @JsonDeserialize(
18
      using = MetadataCascadePolicyTypeField.MetadataCascadePolicyTypeFieldDeserializer.class)
19
  @JsonSerialize(
20
      using = MetadataCascadePolicyTypeField.MetadataCascadePolicyTypeFieldSerializer.class)
21
  protected EnumWrapper<MetadataCascadePolicyTypeField> type;
22

23
  @JsonProperty("owner_enterprise")
24
  protected MetadataCascadePolicyOwnerEnterpriseField ownerEnterprise;
25

26
  protected MetadataCascadePolicyParentField parent;
27

28
  protected String scope;
29

30
  protected String templateKey;
31

32
  public MetadataCascadePolicy(@JsonProperty("id") String id) {
33
    super();
1✔
34
    this.id = id;
1✔
35
    this.type =
1✔
36
        new EnumWrapper<MetadataCascadePolicyTypeField>(
37
            MetadataCascadePolicyTypeField.METADATA_CASCADE_POLICY);
38
  }
1✔
39

40
  protected MetadataCascadePolicy(Builder builder) {
41
    super();
×
42
    this.id = builder.id;
×
43
    this.type = builder.type;
×
44
    this.ownerEnterprise = builder.ownerEnterprise;
×
45
    this.parent = builder.parent;
×
UNCOV
46
    this.scope = builder.scope;
×
UNCOV
47
    this.templateKey = builder.templateKey;
×
UNCOV
48
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
UNCOV
49
  }
×
50

51
  public String getId() {
52
    return id;
1✔
53
  }
54

55
  public EnumWrapper<MetadataCascadePolicyTypeField> getType() {
56
    return type;
1✔
57
  }
58

59
  public MetadataCascadePolicyOwnerEnterpriseField getOwnerEnterprise() {
60
    return ownerEnterprise;
1✔
61
  }
62

63
  public MetadataCascadePolicyParentField getParent() {
64
    return parent;
1✔
65
  }
66

67
  public String getScope() {
68
    return scope;
1✔
69
  }
70

71
  public String getTemplateKey() {
72
    return templateKey;
1✔
73
  }
74

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

92
  @Override
93
  public int hashCode() {
UNCOV
94
    return Objects.hash(id, type, ownerEnterprise, parent, scope, templateKey);
×
95
  }
96

97
  @Override
98
  public String toString() {
UNCOV
99
    return "MetadataCascadePolicy{"
×
100
        + "id='"
101
        + id
102
        + '\''
103
        + ", "
104
        + "type='"
105
        + type
106
        + '\''
107
        + ", "
108
        + "ownerEnterprise='"
109
        + ownerEnterprise
110
        + '\''
111
        + ", "
112
        + "parent='"
113
        + parent
114
        + '\''
115
        + ", "
116
        + "scope='"
117
        + scope
118
        + '\''
119
        + ", "
120
        + "templateKey='"
121
        + templateKey
122
        + '\''
123
        + "}";
124
  }
125

126
  public static class Builder extends NullableFieldTracker {
127

128
    protected final String id;
129

130
    protected EnumWrapper<MetadataCascadePolicyTypeField> type;
131

132
    protected MetadataCascadePolicyOwnerEnterpriseField ownerEnterprise;
133

134
    protected MetadataCascadePolicyParentField parent;
135

136
    protected String scope;
137

138
    protected String templateKey;
139

140
    public Builder(String id) {
141
      super();
×
UNCOV
142
      this.id = id;
×
UNCOV
143
      this.type =
×
144
          new EnumWrapper<MetadataCascadePolicyTypeField>(
145
              MetadataCascadePolicyTypeField.METADATA_CASCADE_POLICY);
UNCOV
146
    }
×
147

148
    public Builder type(MetadataCascadePolicyTypeField type) {
149
      this.type = new EnumWrapper<MetadataCascadePolicyTypeField>(type);
×
150
      return this;
×
151
    }
152

153
    public Builder type(EnumWrapper<MetadataCascadePolicyTypeField> type) {
154
      this.type = type;
×
155
      return this;
×
156
    }
157

158
    public Builder ownerEnterprise(MetadataCascadePolicyOwnerEnterpriseField ownerEnterprise) {
159
      this.ownerEnterprise = ownerEnterprise;
×
160
      return this;
×
161
    }
162

163
    public Builder parent(MetadataCascadePolicyParentField parent) {
164
      this.parent = parent;
×
165
      return this;
×
166
    }
167

168
    public Builder scope(String scope) {
169
      this.scope = scope;
×
170
      return this;
×
171
    }
172

173
    public Builder templateKey(String templateKey) {
174
      this.templateKey = templateKey;
×
UNCOV
175
      return this;
×
176
    }
177

178
    public MetadataCascadePolicy build() {
UNCOV
179
      return new MetadataCascadePolicy(this);
×
180
    }
181
  }
182
}
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