• 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.69
/src/main/java/com/box/sdkgen/schemas/storagepolicy/StoragePolicy.java
1
package com.box.sdkgen.schemas.storagepolicy;
2

3
import com.box.sdkgen.schemas.storagepolicymini.StoragePolicyMini;
4
import com.box.sdkgen.schemas.storagepolicymini.StoragePolicyMiniTypeField;
5
import com.box.sdkgen.serialization.json.EnumWrapper;
6
import com.fasterxml.jackson.annotation.JsonFilter;
7
import com.fasterxml.jackson.annotation.JsonProperty;
8
import java.util.Objects;
9

10
/** The Storage Policy object describes the storage zone. */
11
@JsonFilter("nullablePropertyFilter")
12
public class StoragePolicy extends StoragePolicyMini {
13

14
  /** A descriptive name of the region. */
15
  protected String name;
16

17
  public StoragePolicy(@JsonProperty("id") String id) {
18
    super(id);
1✔
19
  }
1✔
20

21
  protected StoragePolicy(Builder builder) {
22
    super(builder);
×
23
    this.name = builder.name;
×
24
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
25
  }
×
26

27
  public String getName() {
28
    return name;
×
29
  }
30

31
  @Override
32
  public boolean equals(Object o) {
33
    if (this == o) {
×
34
      return true;
×
35
    }
36
    if (o == null || getClass() != o.getClass()) {
×
37
      return false;
×
38
    }
39
    StoragePolicy casted = (StoragePolicy) o;
×
40
    return Objects.equals(id, casted.id)
×
41
        && Objects.equals(type, casted.type)
×
42
        && Objects.equals(name, casted.name);
×
43
  }
44

45
  @Override
46
  public int hashCode() {
47
    return Objects.hash(id, type, name);
×
48
  }
49

50
  @Override
51
  public String toString() {
52
    return "StoragePolicy{"
×
53
        + "id='"
54
        + id
55
        + '\''
56
        + ", "
57
        + "type='"
58
        + type
59
        + '\''
60
        + ", "
61
        + "name='"
62
        + name
63
        + '\''
64
        + "}";
65
  }
66

67
  public static class Builder extends StoragePolicyMini.Builder {
68

69
    protected String name;
70

71
    public Builder(String id) {
72
      super(id);
×
73
    }
×
74

75
    public Builder name(String name) {
76
      this.name = name;
×
77
      return this;
×
78
    }
79

80
    @Override
81
    public Builder type(StoragePolicyMiniTypeField type) {
82
      this.type = new EnumWrapper<StoragePolicyMiniTypeField>(type);
×
83
      return this;
×
84
    }
85

86
    @Override
87
    public Builder type(EnumWrapper<StoragePolicyMiniTypeField> type) {
88
      this.type = type;
×
89
      return this;
×
90
    }
91

92
    public StoragePolicy build() {
93
      return new StoragePolicy(this);
×
94
    }
95
  }
96
}
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