• 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

7.89
/src/main/java/com/box/sdkgen/schemas/retentionpolicymini/RetentionPolicyMini.java
1
package com.box.sdkgen.schemas.retentionpolicymini;
2

3
import com.box.sdkgen.schemas.retentionpolicybase.RetentionPolicyBase;
4
import com.box.sdkgen.schemas.retentionpolicybase.RetentionPolicyBaseTypeField;
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 mini representation of a retention policy, used when nested within another resource. */
13
@JsonFilter("nullablePropertyFilter")
14
public class RetentionPolicyMini extends RetentionPolicyBase {
15

16
  /** The name given to the retention policy. */
17
  @JsonProperty("policy_name")
18
  protected String policyName;
19

20
  /**
21
   * The length of the retention policy. This value specifies the duration in days that the
22
   * retention policy will be active for after being assigned to content. If the policy has a
23
   * `policy_type` of `indefinite`, the `retention_length` will also be `indefinite`.
24
   */
25
  @JsonProperty("retention_length")
26
  protected String retentionLength;
27

28
  /**
29
   * The disposition action of the retention policy. This action can be `permanently_delete`, which
30
   * will cause the content retained by the policy to be permanently deleted, or `remove_retention`,
31
   * which will lift the retention policy from the content, allowing it to be deleted by users, once
32
   * the retention policy has expired.
33
   */
34
  @JsonDeserialize(
35
      using =
36
          RetentionPolicyMiniDispositionActionField
37
              .RetentionPolicyMiniDispositionActionFieldDeserializer.class)
38
  @JsonSerialize(
39
      using =
40
          RetentionPolicyMiniDispositionActionField
41
              .RetentionPolicyMiniDispositionActionFieldSerializer.class)
42
  @JsonProperty("disposition_action")
43
  protected EnumWrapper<RetentionPolicyMiniDispositionActionField> dispositionAction;
44

45
  public RetentionPolicyMini(@JsonProperty("id") String id) {
46
    super(id);
1✔
47
  }
1✔
48

49
  protected RetentionPolicyMini(Builder builder) {
50
    super(builder);
×
51
    this.policyName = builder.policyName;
×
52
    this.retentionLength = builder.retentionLength;
×
53
    this.dispositionAction = builder.dispositionAction;
×
54
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
55
  }
×
56

57
  public String getPolicyName() {
58
    return policyName;
1✔
59
  }
60

61
  public String getRetentionLength() {
62
    return retentionLength;
×
63
  }
64

65
  public EnumWrapper<RetentionPolicyMiniDispositionActionField> getDispositionAction() {
66
    return dispositionAction;
×
67
  }
68

69
  @Override
70
  public boolean equals(Object o) {
71
    if (this == o) {
×
72
      return true;
×
73
    }
74
    if (o == null || getClass() != o.getClass()) {
×
75
      return false;
×
76
    }
77
    RetentionPolicyMini casted = (RetentionPolicyMini) o;
×
78
    return Objects.equals(id, casted.id)
×
79
        && Objects.equals(type, casted.type)
×
80
        && Objects.equals(policyName, casted.policyName)
×
81
        && Objects.equals(retentionLength, casted.retentionLength)
×
82
        && Objects.equals(dispositionAction, casted.dispositionAction);
×
83
  }
84

85
  @Override
86
  public int hashCode() {
87
    return Objects.hash(id, type, policyName, retentionLength, dispositionAction);
×
88
  }
89

90
  @Override
91
  public String toString() {
92
    return "RetentionPolicyMini{"
×
93
        + "id='"
94
        + id
95
        + '\''
96
        + ", "
97
        + "type='"
98
        + type
99
        + '\''
100
        + ", "
101
        + "policyName='"
102
        + policyName
103
        + '\''
104
        + ", "
105
        + "retentionLength='"
106
        + retentionLength
107
        + '\''
108
        + ", "
109
        + "dispositionAction='"
110
        + dispositionAction
111
        + '\''
112
        + "}";
113
  }
114

115
  public static class Builder extends RetentionPolicyBase.Builder {
116

117
    protected String policyName;
118

119
    protected String retentionLength;
120

121
    protected EnumWrapper<RetentionPolicyMiniDispositionActionField> dispositionAction;
122

123
    public Builder(String id) {
124
      super(id);
×
125
    }
×
126

127
    public Builder policyName(String policyName) {
128
      this.policyName = policyName;
×
129
      return this;
×
130
    }
131

132
    public Builder retentionLength(String retentionLength) {
133
      this.retentionLength = retentionLength;
×
134
      return this;
×
135
    }
136

137
    public Builder dispositionAction(RetentionPolicyMiniDispositionActionField dispositionAction) {
138
      this.dispositionAction =
×
139
          new EnumWrapper<RetentionPolicyMiniDispositionActionField>(dispositionAction);
140
      return this;
×
141
    }
142

143
    public Builder dispositionAction(
144
        EnumWrapper<RetentionPolicyMiniDispositionActionField> dispositionAction) {
145
      this.dispositionAction = dispositionAction;
×
146
      return this;
×
147
    }
148

149
    @Override
150
    public Builder type(RetentionPolicyBaseTypeField type) {
151
      this.type = new EnumWrapper<RetentionPolicyBaseTypeField>(type);
×
152
      return this;
×
153
    }
154

155
    @Override
156
    public Builder type(EnumWrapper<RetentionPolicyBaseTypeField> type) {
157
      this.type = type;
×
158
      return this;
×
159
    }
160

161
    public RetentionPolicyMini build() {
162
      return new RetentionPolicyMini(this);
×
163
    }
164
  }
165
}
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