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

box / box-java-sdk / #6714

22 Apr 2026 11:25AM UTC coverage: 12.66%. Remained the same
#6714

push

github

web-flow
feat(boxsdkgen): Add `max_extension_length` field to Retention Policies (box/box-openapi#593) (#1798)

0 of 127 new or added lines in 9 files covered. (0.0%)

199 existing lines in 6 files now uncovered.

8374 of 66147 relevant lines covered (12.66%)

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/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.schemas.retentionpolicymaxextensionlengthresponse.RetentionPolicyMaxExtensionLengthResponse;
6
import com.box.sdkgen.schemas.retentionpolicymaxextensionlengthresponse.RetentionPolicyMaxExtensionLengthResponseEnum;
7
import com.box.sdkgen.serialization.json.EnumWrapper;
8
import com.fasterxml.jackson.annotation.JsonFilter;
9
import com.fasterxml.jackson.annotation.JsonProperty;
10
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
11
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
12
import java.util.Objects;
13

14
/** A mini representation of a retention policy, used when nested within another resource. */
15
@JsonFilter("nullablePropertyFilter")
16
public class RetentionPolicyMini extends RetentionPolicyBase {
17

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

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

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

47
  @JsonProperty("max_extension_length")
48
  protected RetentionPolicyMaxExtensionLengthResponse maxExtensionLength;
49

50
  public RetentionPolicyMini(@JsonProperty("id") String id) {
UNCOV
51
    super(id);
×
UNCOV
52
  }
×
53

54
  protected RetentionPolicyMini(Builder builder) {
UNCOV
55
    super(builder);
×
56
    this.policyName = builder.policyName;
×
57
    this.retentionLength = builder.retentionLength;
×
UNCOV
58
    this.dispositionAction = builder.dispositionAction;
×
NEW
59
    this.maxExtensionLength = builder.maxExtensionLength;
×
60
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
61
  }
×
62

63
  public String getPolicyName() {
64
    return policyName;
×
65
  }
66

67
  public String getRetentionLength() {
UNCOV
68
    return retentionLength;
×
69
  }
70

71
  public EnumWrapper<RetentionPolicyMiniDispositionActionField> getDispositionAction() {
UNCOV
72
    return dispositionAction;
×
73
  }
74

75
  public RetentionPolicyMaxExtensionLengthResponse getMaxExtensionLength() {
NEW
76
    return maxExtensionLength;
×
77
  }
78

79
  @Override
80
  public boolean equals(Object o) {
UNCOV
81
    if (this == o) {
×
82
      return true;
×
83
    }
UNCOV
84
    if (o == null || getClass() != o.getClass()) {
×
UNCOV
85
      return false;
×
86
    }
UNCOV
87
    RetentionPolicyMini casted = (RetentionPolicyMini) o;
×
UNCOV
88
    return Objects.equals(id, casted.id)
×
UNCOV
89
        && Objects.equals(type, casted.type)
×
UNCOV
90
        && Objects.equals(policyName, casted.policyName)
×
91
        && Objects.equals(retentionLength, casted.retentionLength)
×
NEW
92
        && Objects.equals(dispositionAction, casted.dispositionAction)
×
NEW
93
        && Objects.equals(maxExtensionLength, casted.maxExtensionLength);
×
94
  }
95

96
  @Override
97
  public int hashCode() {
NEW
98
    return Objects.hash(
×
99
        id, type, policyName, retentionLength, dispositionAction, maxExtensionLength);
100
  }
101

102
  @Override
103
  public String toString() {
104
    return "RetentionPolicyMini{"
×
105
        + "id='"
106
        + id
107
        + '\''
108
        + ", "
109
        + "type='"
110
        + type
111
        + '\''
112
        + ", "
113
        + "policyName='"
114
        + policyName
115
        + '\''
116
        + ", "
117
        + "retentionLength='"
118
        + retentionLength
119
        + '\''
120
        + ", "
121
        + "dispositionAction='"
122
        + dispositionAction
123
        + '\''
124
        + ", "
125
        + "maxExtensionLength='"
126
        + maxExtensionLength
127
        + '\''
128
        + "}";
129
  }
130

131
  public static class Builder extends RetentionPolicyBase.Builder {
132

133
    protected String policyName;
134

135
    protected String retentionLength;
136

137
    protected EnumWrapper<RetentionPolicyMiniDispositionActionField> dispositionAction;
138

139
    protected RetentionPolicyMaxExtensionLengthResponse maxExtensionLength;
140

141
    public Builder(String id) {
UNCOV
142
      super(id);
×
UNCOV
143
    }
×
144

145
    public Builder policyName(String policyName) {
UNCOV
146
      this.policyName = policyName;
×
UNCOV
147
      return this;
×
148
    }
149

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

155
    public Builder dispositionAction(RetentionPolicyMiniDispositionActionField dispositionAction) {
UNCOV
156
      this.dispositionAction =
×
157
          new EnumWrapper<RetentionPolicyMiniDispositionActionField>(dispositionAction);
UNCOV
158
      return this;
×
159
    }
160

161
    public Builder dispositionAction(
162
        EnumWrapper<RetentionPolicyMiniDispositionActionField> dispositionAction) {
UNCOV
163
      this.dispositionAction = dispositionAction;
×
164
      return this;
×
165
    }
166

167
    public Builder maxExtensionLength(
168
        RetentionPolicyMaxExtensionLengthResponseEnum maxExtensionLength) {
NEW
169
      this.maxExtensionLength = new RetentionPolicyMaxExtensionLengthResponse(maxExtensionLength);
×
NEW
170
      return this;
×
171
    }
172

173
    public Builder maxExtensionLength(String maxExtensionLength) {
NEW
174
      this.maxExtensionLength = new RetentionPolicyMaxExtensionLengthResponse(maxExtensionLength);
×
NEW
175
      return this;
×
176
    }
177

178
    public Builder maxExtensionLength(
179
        RetentionPolicyMaxExtensionLengthResponse maxExtensionLength) {
NEW
180
      this.maxExtensionLength = maxExtensionLength;
×
NEW
181
      return this;
×
182
    }
183

184
    @Override
185
    public Builder type(RetentionPolicyBaseTypeField type) {
186
      this.type = new EnumWrapper<RetentionPolicyBaseTypeField>(type);
×
187
      return this;
×
188
    }
189

190
    @Override
191
    public Builder type(EnumWrapper<RetentionPolicyBaseTypeField> type) {
UNCOV
192
      this.type = type;
×
193
      return this;
×
194
    }
195

196
    public RetentionPolicyMini build() {
UNCOV
197
      if (this.type == null) {
×
198
        this.type =
×
199
            new EnumWrapper<RetentionPolicyBaseTypeField>(
200
                RetentionPolicyBaseTypeField.RETENTION_POLICY);
201
      }
UNCOV
202
      return new RetentionPolicyMini(this);
×
203
    }
204
  }
205
}
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