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

box / box-java-sdk-gen / #294

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

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%)

11791 existing lines in 624 files now uncovered.

16939 of 47499 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/clienterror/ClientError.java
1
package com.box.sdkgen.schemas.clienterror;
2

3
import com.box.sdkgen.internal.Nullable;
4
import com.box.sdkgen.internal.NullableFieldTracker;
5
import com.box.sdkgen.internal.SerializableObject;
6
import com.box.sdkgen.serialization.json.EnumWrapper;
7
import com.fasterxml.jackson.annotation.JsonFilter;
8
import com.fasterxml.jackson.annotation.JsonProperty;
9
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
10
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
11
import java.util.Map;
12
import java.util.Objects;
13

14
@JsonFilter("nullablePropertyFilter")
15
public class ClientError extends SerializableObject {
16

17
  @JsonDeserialize(using = ClientErrorTypeField.ClientErrorTypeFieldDeserializer.class)
18
  @JsonSerialize(using = ClientErrorTypeField.ClientErrorTypeFieldSerializer.class)
19
  protected EnumWrapper<ClientErrorTypeField> type;
20

21
  protected Integer status;
22

23
  @JsonDeserialize(using = ClientErrorCodeField.ClientErrorCodeFieldDeserializer.class)
24
  @JsonSerialize(using = ClientErrorCodeField.ClientErrorCodeFieldSerializer.class)
25
  protected EnumWrapper<ClientErrorCodeField> code;
26

27
  protected String message;
28

29
  @JsonProperty("context_info")
30
  @Nullable
31
  protected Map<String, Object> contextInfo;
32

33
  @JsonProperty("help_url")
34
  protected String helpUrl;
35

36
  @JsonProperty("request_id")
37
  protected String requestId;
38

39
  public ClientError() {
40
    super();
×
41
  }
×
42

43
  protected ClientError(Builder builder) {
44
    super();
×
45
    this.type = builder.type;
×
46
    this.status = builder.status;
×
47
    this.code = builder.code;
×
UNCOV
48
    this.message = builder.message;
×
UNCOV
49
    this.contextInfo = builder.contextInfo;
×
50
    this.helpUrl = builder.helpUrl;
×
UNCOV
51
    this.requestId = builder.requestId;
×
UNCOV
52
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
UNCOV
53
  }
×
54

55
  public EnumWrapper<ClientErrorTypeField> getType() {
UNCOV
56
    return type;
×
57
  }
58

59
  public Integer getStatus() {
UNCOV
60
    return status;
×
61
  }
62

63
  public EnumWrapper<ClientErrorCodeField> getCode() {
UNCOV
64
    return code;
×
65
  }
66

67
  public String getMessage() {
UNCOV
68
    return message;
×
69
  }
70

71
  public Map<String, Object> getContextInfo() {
UNCOV
72
    return contextInfo;
×
73
  }
74

75
  public String getHelpUrl() {
UNCOV
76
    return helpUrl;
×
77
  }
78

79
  public String getRequestId() {
80
    return requestId;
×
81
  }
82

83
  @Override
84
  public boolean equals(Object o) {
85
    if (this == o) {
×
86
      return true;
×
87
    }
88
    if (o == null || getClass() != o.getClass()) {
×
89
      return false;
×
90
    }
91
    ClientError casted = (ClientError) o;
×
92
    return Objects.equals(type, casted.type)
×
UNCOV
93
        && Objects.equals(status, casted.status)
×
UNCOV
94
        && Objects.equals(code, casted.code)
×
UNCOV
95
        && Objects.equals(message, casted.message)
×
UNCOV
96
        && Objects.equals(contextInfo, casted.contextInfo)
×
97
        && Objects.equals(helpUrl, casted.helpUrl)
×
UNCOV
98
        && Objects.equals(requestId, casted.requestId);
×
99
  }
100

101
  @Override
102
  public int hashCode() {
UNCOV
103
    return Objects.hash(type, status, code, message, contextInfo, helpUrl, requestId);
×
104
  }
105

106
  @Override
107
  public String toString() {
UNCOV
108
    return "ClientError{"
×
109
        + "type='"
110
        + type
111
        + '\''
112
        + ", "
113
        + "status='"
114
        + status
115
        + '\''
116
        + ", "
117
        + "code='"
118
        + code
119
        + '\''
120
        + ", "
121
        + "message='"
122
        + message
123
        + '\''
124
        + ", "
125
        + "contextInfo='"
126
        + contextInfo
127
        + '\''
128
        + ", "
129
        + "helpUrl='"
130
        + helpUrl
131
        + '\''
132
        + ", "
133
        + "requestId='"
134
        + requestId
135
        + '\''
136
        + "}";
137
  }
138

UNCOV
139
  public static class Builder extends NullableFieldTracker {
×
140

141
    protected EnumWrapper<ClientErrorTypeField> type;
142

143
    protected Integer status;
144

145
    protected EnumWrapper<ClientErrorCodeField> code;
146

147
    protected String message;
148

149
    protected Map<String, Object> contextInfo;
150

151
    protected String helpUrl;
152

153
    protected String requestId;
154

155
    public Builder type(ClientErrorTypeField type) {
156
      this.type = new EnumWrapper<ClientErrorTypeField>(type);
×
UNCOV
157
      return this;
×
158
    }
159

160
    public Builder type(EnumWrapper<ClientErrorTypeField> type) {
161
      this.type = type;
×
UNCOV
162
      return this;
×
163
    }
164

165
    public Builder status(Integer status) {
166
      this.status = status;
×
UNCOV
167
      return this;
×
168
    }
169

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

175
    public Builder code(EnumWrapper<ClientErrorCodeField> code) {
176
      this.code = code;
×
UNCOV
177
      return this;
×
178
    }
179

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

185
    public Builder contextInfo(Map<String, Object> contextInfo) {
186
      this.contextInfo = contextInfo;
×
UNCOV
187
      this.markNullableFieldAsSet("context_info");
×
UNCOV
188
      return this;
×
189
    }
190

191
    public Builder helpUrl(String helpUrl) {
UNCOV
192
      this.helpUrl = helpUrl;
×
UNCOV
193
      return this;
×
194
    }
195

196
    public Builder requestId(String requestId) {
UNCOV
197
      this.requestId = requestId;
×
UNCOV
198
      return this;
×
199
    }
200

201
    public ClientError build() {
UNCOV
202
      return new ClientError(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