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

box / box-java-sdk-gen / #355

11 Jul 2025 04:43PM UTC coverage: 38.141% (+2.6%) from 35.58%
#355

Pull #361

github

web-flow
Merge 112b63b24 into 426763c84
Pull Request #361: feat: Support common fields in Union in Java (box/box-codegen#758)

288 of 1203 new or added lines in 106 files covered. (23.94%)

165 existing lines in 43 files now uncovered.

18569 of 48685 relevant lines covered (38.14%)

0.38 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.file.File;
7
import com.box.sdkgen.schemas.fileorfolder.FileOrFolder;
8
import com.box.sdkgen.schemas.folder.Folder;
9
import com.box.sdkgen.schemas.usermini.UserMini;
10
import com.box.sdkgen.schemas.webhook.Webhook;
11
import com.box.sdkgen.serialization.json.EnumWrapper;
12
import com.fasterxml.jackson.annotation.JsonFilter;
13
import com.fasterxml.jackson.annotation.JsonProperty;
14
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
15
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
16
import java.util.Date;
17
import java.util.Objects;
18

19
@JsonFilter("nullablePropertyFilter")
20
public class WebhookInvocation extends SerializableObject {
21

22
  protected String id;
23

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

28
  protected Webhook webhook;
29

30
  @JsonProperty("created_by")
31
  protected UserMini createdBy;
32

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

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

44
  protected FileOrFolder source;
45

46
  public WebhookInvocation() {
47
    super();
×
48
  }
×
49

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

62
  public String getId() {
63
    return id;
×
64
  }
65

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

70
  public Webhook getWebhook() {
71
    return webhook;
×
72
  }
73

74
  public UserMini getCreatedBy() {
75
    return createdBy;
×
76
  }
77

78
  public Date getCreatedAt() {
79
    return createdAt;
×
80
  }
81

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

86
  public FileOrFolder getSource() {
87
    return source;
×
88
  }
89

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

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

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

146
  public static class Builder extends NullableFieldTracker {
×
147

148
    protected String id;
149

150
    protected EnumWrapper<WebhookInvocationTypeField> type;
151

152
    protected Webhook webhook;
153

154
    protected UserMini createdBy;
155

156
    protected Date createdAt;
157

158
    protected EnumWrapper<WebhookInvocationTriggerField> trigger;
159

160
    protected FileOrFolder source;
161

162
    public Builder id(String id) {
163
      this.id = id;
×
164
      return this;
×
165
    }
166

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

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

177
    public Builder webhook(Webhook webhook) {
178
      this.webhook = webhook;
×
179
      return this;
×
180
    }
181

182
    public Builder createdBy(UserMini createdBy) {
183
      this.createdBy = createdBy;
×
184
      return this;
×
185
    }
186

187
    public Builder createdAt(Date createdAt) {
188
      this.createdAt = createdAt;
×
189
      return this;
×
190
    }
191

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

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

202
    public Builder source(File source) {
NEW
203
      this.source = new FileOrFolder(source);
×
NEW
204
      return this;
×
205
    }
206

207
    public Builder source(Folder source) {
NEW
208
      this.source = new FileOrFolder(source);
×
NEW
209
      return this;
×
210
    }
211

212
    public Builder source(FileOrFolder source) {
213
      this.source = source;
×
214
      return this;
×
215
    }
216

217
    public WebhookInvocation build() {
218
      return new WebhookInvocation(this);
×
219
    }
220
  }
221
}
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