• 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

22.22
/src/main/java/com/box/sdkgen/schemas/storagepolicymini/StoragePolicyMini.java
1
package com.box.sdkgen.schemas.storagepolicymini;
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 StoragePolicyMini extends SerializableObject {
11

12
  protected final String id;
13

14
  @JsonDeserialize(using = StoragePolicyMiniTypeField.StoragePolicyMiniTypeFieldDeserializer.class)
15
  @JsonSerialize(using = StoragePolicyMiniTypeField.StoragePolicyMiniTypeFieldSerializer.class)
16
  protected EnumWrapper<StoragePolicyMiniTypeField> type;
17

18
  public StoragePolicyMini(@JsonProperty("id") String id) {
19
    super();
1✔
20
    this.id = id;
1✔
21
    this.type =
1✔
22
        new EnumWrapper<StoragePolicyMiniTypeField>(StoragePolicyMiniTypeField.STORAGE_POLICY);
23
  }
1✔
24

25
  protected StoragePolicyMini(Builder builder) {
26
    super();
×
27
    this.id = builder.id;
×
28
    this.type = builder.type;
×
29
  }
×
30

31
  public String getId() {
32
    return id;
1✔
33
  }
34

35
  public EnumWrapper<StoragePolicyMiniTypeField> getType() {
36
    return type;
1✔
37
  }
38

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

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

56
  @Override
57
  public String toString() {
58
    return "StoragePolicyMini{" + "id='" + id + '\'' + ", " + "type='" + type + '\'' + "}";
×
59
  }
60

61
  public static class Builder {
62

63
    protected final String id;
64

65
    protected EnumWrapper<StoragePolicyMiniTypeField> type;
66

NEW
67
    public Builder(String id) {
×
68
      this.id = id;
×
69
      this.type =
×
70
          new EnumWrapper<StoragePolicyMiniTypeField>(StoragePolicyMiniTypeField.STORAGE_POLICY);
71
    }
×
72

73
    public Builder type(StoragePolicyMiniTypeField type) {
74
      this.type = new EnumWrapper<StoragePolicyMiniTypeField>(type);
×
75
      return this;
×
76
    }
77

78
    public Builder type(EnumWrapper<StoragePolicyMiniTypeField> type) {
79
      this.type = type;
×
80
      return this;
×
81
    }
82

83
    public StoragePolicyMini build() {
84
      return new StoragePolicyMini(this);
×
85
    }
86
  }
87
}
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