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

box / box-java-sdk-gen / #226

20 Jun 2025 03:14PM UTC coverage: 35.609% (-0.2%) from 35.816%
#226

push

github

web-flow
feat: Shorten builder names in Java (box/box-codegen#742) (#334)

367 of 1570 new or added lines in 984 files covered. (23.38%)

674 existing lines in 370 files now uncovered.

16125 of 45284 relevant lines covered (35.61%)

0.36 hits per line

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

41.38
/src/main/java/com/box/sdkgen/managers/retentionpolicies/UpdateRetentionPolicyByIdRequestBody.java
1
package com.box.sdkgen.managers.retentionpolicies;
2

3
import com.box.sdkgen.internal.SerializableObject;
4
import com.box.sdkgen.schemas.userbase.UserBase;
5
import com.fasterxml.jackson.annotation.JsonProperty;
6
import java.util.List;
7
import java.util.Objects;
8

9
public class UpdateRetentionPolicyByIdRequestBody extends SerializableObject {
10

11
  @JsonProperty("policy_name")
12
  protected String policyName;
13

14
  protected String description;
15

16
  @JsonProperty("disposition_action")
17
  protected String dispositionAction;
18

19
  @JsonProperty("retention_type")
20
  protected String retentionType;
21

22
  @JsonProperty("retention_length")
23
  protected String retentionLength;
24

25
  protected String status;
26

27
  @JsonProperty("can_owner_extend_retention")
28
  protected Boolean canOwnerExtendRetention;
29

30
  @JsonProperty("are_owners_notified")
31
  protected Boolean areOwnersNotified;
32

33
  @JsonProperty("custom_notification_recipients")
34
  protected List<UserBase> customNotificationRecipients;
35

36
  public UpdateRetentionPolicyByIdRequestBody() {
37
    super();
×
38
  }
×
39

40
  protected UpdateRetentionPolicyByIdRequestBody(Builder builder) {
41
    super();
1✔
42
    this.policyName = builder.policyName;
1✔
43
    this.description = builder.description;
1✔
44
    this.dispositionAction = builder.dispositionAction;
1✔
45
    this.retentionType = builder.retentionType;
1✔
46
    this.retentionLength = builder.retentionLength;
1✔
47
    this.status = builder.status;
1✔
48
    this.canOwnerExtendRetention = builder.canOwnerExtendRetention;
1✔
49
    this.areOwnersNotified = builder.areOwnersNotified;
1✔
50
    this.customNotificationRecipients = builder.customNotificationRecipients;
1✔
51
  }
1✔
52

53
  public String getPolicyName() {
54
    return policyName;
1✔
55
  }
56

57
  public String getDescription() {
58
    return description;
1✔
59
  }
60

61
  public String getDispositionAction() {
62
    return dispositionAction;
1✔
63
  }
64

65
  public String getRetentionType() {
66
    return retentionType;
1✔
67
  }
68

69
  public String getRetentionLength() {
70
    return retentionLength;
1✔
71
  }
72

73
  public String getStatus() {
74
    return status;
1✔
75
  }
76

77
  public Boolean getCanOwnerExtendRetention() {
78
    return canOwnerExtendRetention;
1✔
79
  }
80

81
  public Boolean getAreOwnersNotified() {
82
    return areOwnersNotified;
1✔
83
  }
84

85
  public List<UserBase> getCustomNotificationRecipients() {
86
    return customNotificationRecipients;
1✔
87
  }
88

89
  @Override
90
  public boolean equals(Object o) {
91
    if (this == o) {
×
92
      return true;
×
93
    }
94
    if (o == null || getClass() != o.getClass()) {
×
95
      return false;
×
96
    }
97
    UpdateRetentionPolicyByIdRequestBody casted = (UpdateRetentionPolicyByIdRequestBody) o;
×
98
    return Objects.equals(policyName, casted.policyName)
×
99
        && Objects.equals(description, casted.description)
×
100
        && Objects.equals(dispositionAction, casted.dispositionAction)
×
101
        && Objects.equals(retentionType, casted.retentionType)
×
102
        && Objects.equals(retentionLength, casted.retentionLength)
×
103
        && Objects.equals(status, casted.status)
×
104
        && Objects.equals(canOwnerExtendRetention, casted.canOwnerExtendRetention)
×
105
        && Objects.equals(areOwnersNotified, casted.areOwnersNotified)
×
106
        && Objects.equals(customNotificationRecipients, casted.customNotificationRecipients);
×
107
  }
108

109
  @Override
110
  public int hashCode() {
111
    return Objects.hash(
×
112
        policyName,
113
        description,
114
        dispositionAction,
115
        retentionType,
116
        retentionLength,
117
        status,
118
        canOwnerExtendRetention,
119
        areOwnersNotified,
120
        customNotificationRecipients);
121
  }
122

123
  @Override
124
  public String toString() {
125
    return "UpdateRetentionPolicyByIdRequestBody{"
×
126
        + "policyName='"
127
        + policyName
128
        + '\''
129
        + ", "
130
        + "description='"
131
        + description
132
        + '\''
133
        + ", "
134
        + "dispositionAction='"
135
        + dispositionAction
136
        + '\''
137
        + ", "
138
        + "retentionType='"
139
        + retentionType
140
        + '\''
141
        + ", "
142
        + "retentionLength='"
143
        + retentionLength
144
        + '\''
145
        + ", "
146
        + "status='"
147
        + status
148
        + '\''
149
        + ", "
150
        + "canOwnerExtendRetention='"
151
        + canOwnerExtendRetention
152
        + '\''
153
        + ", "
154
        + "areOwnersNotified='"
155
        + areOwnersNotified
156
        + '\''
157
        + ", "
158
        + "customNotificationRecipients='"
159
        + customNotificationRecipients
160
        + '\''
161
        + "}";
162
  }
163

164
  public static class Builder {
1✔
165

166
    protected String policyName;
167

168
    protected String description;
169

170
    protected String dispositionAction;
171

172
    protected String retentionType;
173

174
    protected String retentionLength;
175

176
    protected String status;
177

178
    protected Boolean canOwnerExtendRetention;
179

180
    protected Boolean areOwnersNotified;
181

182
    protected List<UserBase> customNotificationRecipients;
183

184
    public Builder policyName(String policyName) {
185
      this.policyName = policyName;
1✔
186
      return this;
1✔
187
    }
188

189
    public Builder description(String description) {
190
      this.description = description;
×
191
      return this;
×
192
    }
193

194
    public Builder dispositionAction(String dispositionAction) {
195
      this.dispositionAction = dispositionAction;
×
196
      return this;
×
197
    }
198

199
    public Builder retentionType(String retentionType) {
200
      this.retentionType = retentionType;
×
201
      return this;
×
202
    }
203

204
    public Builder retentionLength(String retentionLength) {
205
      this.retentionLength = retentionLength;
×
206
      return this;
×
207
    }
208

209
    public Builder status(String status) {
210
      this.status = status;
×
211
      return this;
×
212
    }
213

214
    public Builder canOwnerExtendRetention(Boolean canOwnerExtendRetention) {
UNCOV
215
      this.canOwnerExtendRetention = canOwnerExtendRetention;
×
216
      return this;
×
217
    }
218

219
    public Builder areOwnersNotified(Boolean areOwnersNotified) {
UNCOV
220
      this.areOwnersNotified = areOwnersNotified;
×
221
      return this;
×
222
    }
223

224
    public Builder customNotificationRecipients(List<UserBase> customNotificationRecipients) {
UNCOV
225
      this.customNotificationRecipients = customNotificationRecipients;
×
226
      return this;
×
227
    }
228

229
    public UpdateRetentionPolicyByIdRequestBody build() {
230
      return new UpdateRetentionPolicyByIdRequestBody(this);
1✔
231
    }
232
  }
233
}
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