• 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

13.33
/src/main/java/com/box/sdkgen/schemas/webhookmini/WebhookMini.java
1
package com.box.sdkgen.schemas.webhookmini;
2

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

9
public class WebhookMini extends SerializableObject {
10

11
  protected String id;
12

13
  @JsonDeserialize(using = WebhookMiniTypeField.WebhookMiniTypeFieldDeserializer.class)
14
  @JsonSerialize(using = WebhookMiniTypeField.WebhookMiniTypeFieldSerializer.class)
15
  protected EnumWrapper<WebhookMiniTypeField> type;
16

17
  protected WebhookMiniTargetField target;
18

19
  public WebhookMini() {
20
    super();
1✔
21
  }
1✔
22

23
  protected WebhookMini(Builder builder) {
24
    super();
×
25
    this.id = builder.id;
×
26
    this.type = builder.type;
×
27
    this.target = builder.target;
×
28
  }
×
29

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

34
  public EnumWrapper<WebhookMiniTypeField> getType() {
35
    return type;
×
36
  }
37

38
  public WebhookMiniTargetField getTarget() {
39
    return target;
1✔
40
  }
41

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

56
  @Override
57
  public int hashCode() {
58
    return Objects.hash(id, type, target);
×
59
  }
60

61
  @Override
62
  public String toString() {
63
    return "WebhookMini{"
×
64
        + "id='"
65
        + id
66
        + '\''
67
        + ", "
68
        + "type='"
69
        + type
70
        + '\''
71
        + ", "
72
        + "target='"
73
        + target
74
        + '\''
75
        + "}";
76
  }
77

NEW
78
  public static class Builder {
×
79

80
    protected String id;
81

82
    protected EnumWrapper<WebhookMiniTypeField> type;
83

84
    protected WebhookMiniTargetField target;
85

86
    public Builder id(String id) {
87
      this.id = id;
×
88
      return this;
×
89
    }
90

91
    public Builder type(WebhookMiniTypeField type) {
92
      this.type = new EnumWrapper<WebhookMiniTypeField>(type);
×
93
      return this;
×
94
    }
95

96
    public Builder type(EnumWrapper<WebhookMiniTypeField> type) {
97
      this.type = type;
×
98
      return this;
×
99
    }
100

101
    public Builder target(WebhookMiniTargetField target) {
102
      this.target = target;
×
103
      return this;
×
104
    }
105

106
    public WebhookMini build() {
107
      return new WebhookMini(this);
×
108
    }
109
  }
110
}
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