• 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

0.0
/src/main/java/com/box/sdkgen/schemas/devicepinner/DevicePinner.java
1
package com.box.sdkgen.schemas.devicepinner;
2

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

11
public class DevicePinner extends SerializableObject {
12

13
  protected String id;
14

15
  @JsonDeserialize(using = DevicePinnerTypeField.DevicePinnerTypeFieldDeserializer.class)
16
  @JsonSerialize(using = DevicePinnerTypeField.DevicePinnerTypeFieldSerializer.class)
17
  protected EnumWrapper<DevicePinnerTypeField> type;
18

19
  @JsonProperty("owned_by")
20
  protected UserMini ownedBy;
21

22
  @JsonProperty("product_name")
23
  protected String productName;
24

25
  public DevicePinner() {
26
    super();
×
27
  }
×
28

29
  protected DevicePinner(Builder builder) {
30
    super();
×
31
    this.id = builder.id;
×
32
    this.type = builder.type;
×
33
    this.ownedBy = builder.ownedBy;
×
34
    this.productName = builder.productName;
×
35
  }
×
36

37
  public String getId() {
38
    return id;
×
39
  }
40

41
  public EnumWrapper<DevicePinnerTypeField> getType() {
42
    return type;
×
43
  }
44

45
  public UserMini getOwnedBy() {
46
    return ownedBy;
×
47
  }
48

49
  public String getProductName() {
50
    return productName;
×
51
  }
52

53
  @Override
54
  public boolean equals(Object o) {
55
    if (this == o) {
×
56
      return true;
×
57
    }
58
    if (o == null || getClass() != o.getClass()) {
×
59
      return false;
×
60
    }
61
    DevicePinner casted = (DevicePinner) o;
×
62
    return Objects.equals(id, casted.id)
×
63
        && Objects.equals(type, casted.type)
×
64
        && Objects.equals(ownedBy, casted.ownedBy)
×
65
        && Objects.equals(productName, casted.productName);
×
66
  }
67

68
  @Override
69
  public int hashCode() {
70
    return Objects.hash(id, type, ownedBy, productName);
×
71
  }
72

73
  @Override
74
  public String toString() {
75
    return "DevicePinner{"
×
76
        + "id='"
77
        + id
78
        + '\''
79
        + ", "
80
        + "type='"
81
        + type
82
        + '\''
83
        + ", "
84
        + "ownedBy='"
85
        + ownedBy
86
        + '\''
87
        + ", "
88
        + "productName='"
89
        + productName
90
        + '\''
91
        + "}";
92
  }
93

NEW
94
  public static class Builder {
×
95

96
    protected String id;
97

98
    protected EnumWrapper<DevicePinnerTypeField> type;
99

100
    protected UserMini ownedBy;
101

102
    protected String productName;
103

104
    public Builder id(String id) {
105
      this.id = id;
×
106
      return this;
×
107
    }
108

109
    public Builder type(DevicePinnerTypeField type) {
110
      this.type = new EnumWrapper<DevicePinnerTypeField>(type);
×
111
      return this;
×
112
    }
113

114
    public Builder type(EnumWrapper<DevicePinnerTypeField> type) {
115
      this.type = type;
×
116
      return this;
×
117
    }
118

119
    public Builder ownedBy(UserMini ownedBy) {
120
      this.ownedBy = ownedBy;
×
121
      return this;
×
122
    }
123

124
    public Builder productName(String productName) {
125
      this.productName = productName;
×
126
      return this;
×
127
    }
128

129
    public DevicePinner build() {
130
      return new DevicePinner(this);
×
131
    }
132
  }
133
}
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