• 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

18.52
/src/main/java/com/box/sdkgen/schemas/retentionpolicybase/RetentionPolicyBase.java
1
package com.box.sdkgen.schemas.retentionpolicybase;
2

3
import com.box.sdkgen.internal.SerializableObject;
4
import com.box.sdkgen.serialization.json.EnumWrapper;
5
import com.fasterxml.jackson.annotation.JsonProperty;
6
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
7
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
8
import java.util.Objects;
9

10
public class RetentionPolicyBase extends SerializableObject {
11

12
  protected final String id;
13

14
  @JsonDeserialize(
15
      using = RetentionPolicyBaseTypeField.RetentionPolicyBaseTypeFieldDeserializer.class)
16
  @JsonSerialize(using = RetentionPolicyBaseTypeField.RetentionPolicyBaseTypeFieldSerializer.class)
17
  protected EnumWrapper<RetentionPolicyBaseTypeField> type;
18

19
  public RetentionPolicyBase(@JsonProperty("id") String id) {
20
    super();
1✔
21
    this.id = id;
1✔
22
    this.type =
1✔
23
        new EnumWrapper<RetentionPolicyBaseTypeField>(
24
            RetentionPolicyBaseTypeField.RETENTION_POLICY);
25
  }
1✔
26

27
  protected RetentionPolicyBase(Builder builder) {
28
    super();
×
29
    this.id = builder.id;
×
30
    this.type = builder.type;
×
31
  }
×
32

33
  public String getId() {
34
    return id;
1✔
35
  }
36

37
  public EnumWrapper<RetentionPolicyBaseTypeField> getType() {
38
    return type;
×
39
  }
40

41
  @Override
42
  public boolean equals(Object o) {
43
    if (this == o) {
×
44
      return true;
×
45
    }
46
    if (o == null || getClass() != o.getClass()) {
×
47
      return false;
×
48
    }
49
    RetentionPolicyBase casted = (RetentionPolicyBase) o;
×
50
    return Objects.equals(id, casted.id) && Objects.equals(type, casted.type);
×
51
  }
52

53
  @Override
54
  public int hashCode() {
55
    return Objects.hash(id, type);
×
56
  }
57

58
  @Override
59
  public String toString() {
60
    return "RetentionPolicyBase{" + "id='" + id + '\'' + ", " + "type='" + type + '\'' + "}";
×
61
  }
62

63
  public static class Builder {
64

65
    protected final String id;
66

67
    protected EnumWrapper<RetentionPolicyBaseTypeField> type;
68

NEW
69
    public Builder(String id) {
×
70
      this.id = id;
×
71
      this.type =
×
72
          new EnumWrapper<RetentionPolicyBaseTypeField>(
73
              RetentionPolicyBaseTypeField.RETENTION_POLICY);
74
    }
×
75

76
    public Builder type(RetentionPolicyBaseTypeField type) {
77
      this.type = new EnumWrapper<RetentionPolicyBaseTypeField>(type);
×
78
      return this;
×
79
    }
80

81
    public Builder type(EnumWrapper<RetentionPolicyBaseTypeField> type) {
82
      this.type = type;
×
83
      return this;
×
84
    }
85

86
    public RetentionPolicyBase build() {
87
      return new RetentionPolicyBase(this);
×
88
    }
89
  }
90
}
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