• 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

17.86
/src/main/java/com/box/sdkgen/schemas/retentionpolicybase/RetentionPolicyBase.java
1
package com.box.sdkgen.schemas.retentionpolicybase;
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
/** A base representation of a retention policy. */
13
@JsonFilter("nullablePropertyFilter")
14
public class RetentionPolicyBase extends SerializableObject {
15

16
  /** The unique identifier that represents a retention policy. */
17
  protected final String id;
18

19
  /** The value will always be `retention_policy`. */
20
  @JsonDeserialize(
21
      using = RetentionPolicyBaseTypeField.RetentionPolicyBaseTypeFieldDeserializer.class)
22
  @JsonSerialize(using = RetentionPolicyBaseTypeField.RetentionPolicyBaseTypeFieldSerializer.class)
23
  protected EnumWrapper<RetentionPolicyBaseTypeField> type;
24

25
  public RetentionPolicyBase(@JsonProperty("id") String id) {
26
    super();
1✔
27
    this.id = id;
1✔
28
    this.type =
1✔
29
        new EnumWrapper<RetentionPolicyBaseTypeField>(
30
            RetentionPolicyBaseTypeField.RETENTION_POLICY);
31
  }
1✔
32

33
  protected RetentionPolicyBase(Builder builder) {
34
    super();
×
35
    this.id = builder.id;
×
36
    this.type = builder.type;
×
37
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
38
  }
×
39

40
  public String getId() {
41
    return id;
1✔
42
  }
43

44
  public EnumWrapper<RetentionPolicyBaseTypeField> getType() {
45
    return type;
×
46
  }
47

48
  @Override
49
  public boolean equals(Object o) {
50
    if (this == o) {
×
51
      return true;
×
52
    }
53
    if (o == null || getClass() != o.getClass()) {
×
54
      return false;
×
55
    }
56
    RetentionPolicyBase casted = (RetentionPolicyBase) o;
×
57
    return Objects.equals(id, casted.id) && Objects.equals(type, casted.type);
×
58
  }
59

60
  @Override
61
  public int hashCode() {
62
    return Objects.hash(id, type);
×
63
  }
64

65
  @Override
66
  public String toString() {
67
    return "RetentionPolicyBase{" + "id='" + id + '\'' + ", " + "type='" + type + '\'' + "}";
×
68
  }
69

70
  public static class Builder extends NullableFieldTracker {
71

72
    protected final String id;
73

74
    protected EnumWrapper<RetentionPolicyBaseTypeField> type;
75

76
    public Builder(String id) {
77
      super();
×
78
      this.id = id;
×
79
      this.type =
×
80
          new EnumWrapper<RetentionPolicyBaseTypeField>(
81
              RetentionPolicyBaseTypeField.RETENTION_POLICY);
82
    }
×
83

84
    public Builder type(RetentionPolicyBaseTypeField type) {
85
      this.type = new EnumWrapper<RetentionPolicyBaseTypeField>(type);
×
86
      return this;
×
87
    }
88

89
    public Builder type(EnumWrapper<RetentionPolicyBaseTypeField> type) {
90
      this.type = type;
×
91
      return this;
×
92
    }
93

94
    public RetentionPolicyBase build() {
95
      return new RetentionPolicyBase(this);
×
96
    }
97
  }
98
}
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