• 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/webhookinvocation/WebhookInvocation.java
1
package com.box.sdkgen.schemas.webhookinvocation;
2

3
import com.box.sdkgen.internal.SerializableObject;
4
import com.box.sdkgen.internal.utils.DateTimeUtils;
5
import com.box.sdkgen.schemas.fileorfolder.FileOrFolder;
6
import com.box.sdkgen.schemas.usermini.UserMini;
7
import com.box.sdkgen.schemas.webhook.Webhook;
8
import com.box.sdkgen.serialization.json.EnumWrapper;
9
import com.fasterxml.jackson.annotation.JsonProperty;
10
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
11
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
12
import java.util.Date;
13
import java.util.Objects;
14

15
public class WebhookInvocation extends SerializableObject {
16

17
  protected String id;
18

19
  @JsonDeserialize(using = WebhookInvocationTypeField.WebhookInvocationTypeFieldDeserializer.class)
20
  @JsonSerialize(using = WebhookInvocationTypeField.WebhookInvocationTypeFieldSerializer.class)
21
  protected EnumWrapper<WebhookInvocationTypeField> type;
22

23
  protected Webhook webhook;
24

25
  @JsonProperty("created_by")
26
  protected UserMini createdBy;
27

28
  @JsonProperty("created_at")
29
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
30
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
31
  protected Date createdAt;
32

33
  @JsonDeserialize(
34
      using = WebhookInvocationTriggerField.WebhookInvocationTriggerFieldDeserializer.class)
35
  @JsonSerialize(
36
      using = WebhookInvocationTriggerField.WebhookInvocationTriggerFieldSerializer.class)
37
  protected EnumWrapper<WebhookInvocationTriggerField> trigger;
38

39
  protected FileOrFolder source;
40

41
  public WebhookInvocation() {
42
    super();
×
43
  }
×
44

45
  protected WebhookInvocation(Builder builder) {
46
    super();
×
47
    this.id = builder.id;
×
48
    this.type = builder.type;
×
49
    this.webhook = builder.webhook;
×
50
    this.createdBy = builder.createdBy;
×
51
    this.createdAt = builder.createdAt;
×
52
    this.trigger = builder.trigger;
×
53
    this.source = builder.source;
×
54
  }
×
55

56
  public String getId() {
57
    return id;
×
58
  }
59

60
  public EnumWrapper<WebhookInvocationTypeField> getType() {
61
    return type;
×
62
  }
63

64
  public Webhook getWebhook() {
65
    return webhook;
×
66
  }
67

68
  public UserMini getCreatedBy() {
69
    return createdBy;
×
70
  }
71

72
  public Date getCreatedAt() {
73
    return createdAt;
×
74
  }
75

76
  public EnumWrapper<WebhookInvocationTriggerField> getTrigger() {
77
    return trigger;
×
78
  }
79

80
  public FileOrFolder getSource() {
81
    return source;
×
82
  }
83

84
  @Override
85
  public boolean equals(Object o) {
86
    if (this == o) {
×
87
      return true;
×
88
    }
89
    if (o == null || getClass() != o.getClass()) {
×
90
      return false;
×
91
    }
92
    WebhookInvocation casted = (WebhookInvocation) o;
×
93
    return Objects.equals(id, casted.id)
×
94
        && Objects.equals(type, casted.type)
×
95
        && Objects.equals(webhook, casted.webhook)
×
96
        && Objects.equals(createdBy, casted.createdBy)
×
97
        && Objects.equals(createdAt, casted.createdAt)
×
98
        && Objects.equals(trigger, casted.trigger)
×
99
        && Objects.equals(source, casted.source);
×
100
  }
101

102
  @Override
103
  public int hashCode() {
104
    return Objects.hash(id, type, webhook, createdBy, createdAt, trigger, source);
×
105
  }
106

107
  @Override
108
  public String toString() {
109
    return "WebhookInvocation{"
×
110
        + "id='"
111
        + id
112
        + '\''
113
        + ", "
114
        + "type='"
115
        + type
116
        + '\''
117
        + ", "
118
        + "webhook='"
119
        + webhook
120
        + '\''
121
        + ", "
122
        + "createdBy='"
123
        + createdBy
124
        + '\''
125
        + ", "
126
        + "createdAt='"
127
        + createdAt
128
        + '\''
129
        + ", "
130
        + "trigger='"
131
        + trigger
132
        + '\''
133
        + ", "
134
        + "source='"
135
        + source
136
        + '\''
137
        + "}";
138
  }
139

NEW
140
  public static class Builder {
×
141

142
    protected String id;
143

144
    protected EnumWrapper<WebhookInvocationTypeField> type;
145

146
    protected Webhook webhook;
147

148
    protected UserMini createdBy;
149

150
    protected Date createdAt;
151

152
    protected EnumWrapper<WebhookInvocationTriggerField> trigger;
153

154
    protected FileOrFolder source;
155

156
    public Builder id(String id) {
157
      this.id = id;
×
158
      return this;
×
159
    }
160

161
    public Builder type(WebhookInvocationTypeField type) {
162
      this.type = new EnumWrapper<WebhookInvocationTypeField>(type);
×
163
      return this;
×
164
    }
165

166
    public Builder type(EnumWrapper<WebhookInvocationTypeField> type) {
167
      this.type = type;
×
168
      return this;
×
169
    }
170

171
    public Builder webhook(Webhook webhook) {
172
      this.webhook = webhook;
×
173
      return this;
×
174
    }
175

176
    public Builder createdBy(UserMini createdBy) {
177
      this.createdBy = createdBy;
×
178
      return this;
×
179
    }
180

181
    public Builder createdAt(Date createdAt) {
182
      this.createdAt = createdAt;
×
183
      return this;
×
184
    }
185

186
    public Builder trigger(WebhookInvocationTriggerField trigger) {
187
      this.trigger = new EnumWrapper<WebhookInvocationTriggerField>(trigger);
×
188
      return this;
×
189
    }
190

191
    public Builder trigger(EnumWrapper<WebhookInvocationTriggerField> trigger) {
192
      this.trigger = trigger;
×
193
      return this;
×
194
    }
195

196
    public Builder source(FileOrFolder source) {
197
      this.source = source;
×
198
      return this;
×
199
    }
200

201
    public WebhookInvocation build() {
202
      return new WebhookInvocation(this);
×
203
    }
204
  }
205
}
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