• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

box / box-java-sdk-gen / #295

24 Jun 2025 01:20PM UTC coverage: 35.661% (+0.03%) from 35.632%
#295

Pull #347

github

web-flow
Merge 2c100d09c into d8480ee6c
Pull Request #347: feat: Add Webhook Validation In Java (box/box-codegen#745)

68 of 82 new or added lines in 2 files covered. (82.93%)

11794 existing lines in 627 files now uncovered.

16937 of 47495 relevant lines covered (35.66%)

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.NullableFieldTracker;
4
import com.box.sdkgen.internal.SerializableObject;
5
import com.box.sdkgen.internal.utils.DateTimeUtils;
6
import com.box.sdkgen.schemas.fileorfolder.FileOrFolder;
7
import com.box.sdkgen.schemas.usermini.UserMini;
8
import com.box.sdkgen.schemas.webhook.Webhook;
9
import com.box.sdkgen.serialization.json.EnumWrapper;
10
import com.fasterxml.jackson.annotation.JsonFilter;
11
import com.fasterxml.jackson.annotation.JsonProperty;
12
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
13
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
14
import java.util.Date;
15
import java.util.Objects;
16

17
@JsonFilter("nullablePropertyFilter")
18
public class WebhookInvocation extends SerializableObject {
19

20
  protected String id;
21

22
  @JsonDeserialize(using = WebhookInvocationTypeField.WebhookInvocationTypeFieldDeserializer.class)
23
  @JsonSerialize(using = WebhookInvocationTypeField.WebhookInvocationTypeFieldSerializer.class)
24
  protected EnumWrapper<WebhookInvocationTypeField> type;
25

26
  protected Webhook webhook;
27

28
  @JsonProperty("created_by")
29
  protected UserMini createdBy;
30

31
  @JsonProperty("created_at")
32
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
33
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
34
  protected Date createdAt;
35

36
  @JsonDeserialize(
37
      using = WebhookInvocationTriggerField.WebhookInvocationTriggerFieldDeserializer.class)
38
  @JsonSerialize(
39
      using = WebhookInvocationTriggerField.WebhookInvocationTriggerFieldSerializer.class)
40
  protected EnumWrapper<WebhookInvocationTriggerField> trigger;
41

42
  protected FileOrFolder source;
43

44
  public WebhookInvocation() {
UNCOV
45
    super();
×
46
  }
×
47

48
  protected WebhookInvocation(Builder builder) {
49
    super();
×
50
    this.id = builder.id;
×
51
    this.type = builder.type;
×
52
    this.webhook = builder.webhook;
×
53
    this.createdBy = builder.createdBy;
×
54
    this.createdAt = builder.createdAt;
×
UNCOV
55
    this.trigger = builder.trigger;
×
UNCOV
56
    this.source = builder.source;
×
57
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
UNCOV
58
  }
×
59

60
  public String getId() {
61
    return id;
×
62
  }
63

64
  public EnumWrapper<WebhookInvocationTypeField> getType() {
65
    return type;
×
66
  }
67

68
  public Webhook getWebhook() {
69
    return webhook;
×
70
  }
71

72
  public UserMini getCreatedBy() {
73
    return createdBy;
×
74
  }
75

76
  public Date getCreatedAt() {
77
    return createdAt;
×
78
  }
79

80
  public EnumWrapper<WebhookInvocationTriggerField> getTrigger() {
81
    return trigger;
×
82
  }
83

84
  public FileOrFolder getSource() {
UNCOV
85
    return source;
×
86
  }
87

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

106
  @Override
107
  public int hashCode() {
UNCOV
108
    return Objects.hash(id, type, webhook, createdBy, createdAt, trigger, source);
×
109
  }
110

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

UNCOV
144
  public static class Builder extends NullableFieldTracker {
×
145

146
    protected String id;
147

148
    protected EnumWrapper<WebhookInvocationTypeField> type;
149

150
    protected Webhook webhook;
151

152
    protected UserMini createdBy;
153

154
    protected Date createdAt;
155

156
    protected EnumWrapper<WebhookInvocationTriggerField> trigger;
157

158
    protected FileOrFolder source;
159

160
    public Builder id(String id) {
UNCOV
161
      this.id = id;
×
162
      return this;
×
163
    }
164

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

170
    public Builder type(EnumWrapper<WebhookInvocationTypeField> type) {
UNCOV
171
      this.type = type;
×
172
      return this;
×
173
    }
174

175
    public Builder webhook(Webhook webhook) {
UNCOV
176
      this.webhook = webhook;
×
177
      return this;
×
178
    }
179

180
    public Builder createdBy(UserMini createdBy) {
UNCOV
181
      this.createdBy = createdBy;
×
182
      return this;
×
183
    }
184

185
    public Builder createdAt(Date createdAt) {
UNCOV
186
      this.createdAt = createdAt;
×
187
      return this;
×
188
    }
189

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

195
    public Builder trigger(EnumWrapper<WebhookInvocationTriggerField> trigger) {
UNCOV
196
      this.trigger = trigger;
×
197
      return this;
×
198
    }
199

200
    public Builder source(FileOrFolder source) {
UNCOV
201
      this.source = source;
×
202
      return this;
×
203
    }
204

205
    public WebhookInvocation build() {
UNCOV
206
      return new WebhookInvocation(this);
×
207
    }
208
  }
209
}
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