• 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

50.91
/src/main/java/com/box/sdkgen/schemas/metadataquery/MetadataQuery.java
1
package com.box.sdkgen.schemas.metadataquery;
2

3
import com.box.sdkgen.internal.NullableFieldTracker;
4
import com.box.sdkgen.internal.SerializableObject;
5
import com.fasterxml.jackson.annotation.JsonFilter;
6
import com.fasterxml.jackson.annotation.JsonProperty;
7
import java.util.List;
8
import java.util.Map;
9
import java.util.Objects;
10

11
@JsonFilter("nullablePropertyFilter")
12
public class MetadataQuery extends SerializableObject {
13

14
  protected final String from;
15

16
  protected String query;
17

18
  @JsonProperty("query_params")
19
  protected Map<String, Object> queryParams;
20

21
  @JsonProperty("ancestor_folder_id")
22
  protected final String ancestorFolderId;
23

24
  @JsonProperty("order_by")
25
  protected List<MetadataQueryOrderByField> orderBy;
26

27
  protected Long limit;
28

29
  protected String marker;
30

31
  protected List<String> fields;
32

33
  public MetadataQuery(
34
      @JsonProperty("from") String from,
35
      @JsonProperty("ancestor_folder_id") String ancestorFolderId) {
36
    super();
×
UNCOV
37
    this.from = from;
×
UNCOV
38
    this.ancestorFolderId = ancestorFolderId;
×
UNCOV
39
  }
×
40

41
  protected MetadataQuery(Builder builder) {
42
    super();
1✔
43
    this.from = builder.from;
1✔
44
    this.query = builder.query;
1✔
45
    this.queryParams = builder.queryParams;
1✔
46
    this.ancestorFolderId = builder.ancestorFolderId;
1✔
47
    this.orderBy = builder.orderBy;
1✔
48
    this.limit = builder.limit;
1✔
49
    this.marker = builder.marker;
1✔
50
    this.fields = builder.fields;
1✔
51
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
1✔
52
  }
1✔
53

54
  public String getFrom() {
55
    return from;
1✔
56
  }
57

58
  public String getQuery() {
59
    return query;
1✔
60
  }
61

62
  public Map<String, Object> getQueryParams() {
63
    return queryParams;
1✔
64
  }
65

66
  public String getAncestorFolderId() {
67
    return ancestorFolderId;
1✔
68
  }
69

70
  public List<MetadataQueryOrderByField> getOrderBy() {
71
    return orderBy;
1✔
72
  }
73

74
  public Long getLimit() {
75
    return limit;
1✔
76
  }
77

78
  public String getMarker() {
79
    return marker;
1✔
80
  }
81

82
  public List<String> getFields() {
83
    return fields;
1✔
84
  }
85

86
  @Override
87
  public boolean equals(Object o) {
88
    if (this == o) {
×
UNCOV
89
      return true;
×
90
    }
91
    if (o == null || getClass() != o.getClass()) {
×
92
      return false;
×
93
    }
94
    MetadataQuery casted = (MetadataQuery) o;
×
95
    return Objects.equals(from, casted.from)
×
96
        && Objects.equals(query, casted.query)
×
97
        && Objects.equals(queryParams, casted.queryParams)
×
98
        && Objects.equals(ancestorFolderId, casted.ancestorFolderId)
×
UNCOV
99
        && Objects.equals(orderBy, casted.orderBy)
×
UNCOV
100
        && Objects.equals(limit, casted.limit)
×
UNCOV
101
        && Objects.equals(marker, casted.marker)
×
UNCOV
102
        && Objects.equals(fields, casted.fields);
×
103
  }
104

105
  @Override
106
  public int hashCode() {
UNCOV
107
    return Objects.hash(from, query, queryParams, ancestorFolderId, orderBy, limit, marker, fields);
×
108
  }
109

110
  @Override
111
  public String toString() {
UNCOV
112
    return "MetadataQuery{"
×
113
        + "from='"
114
        + from
115
        + '\''
116
        + ", "
117
        + "query='"
118
        + query
119
        + '\''
120
        + ", "
121
        + "queryParams='"
122
        + queryParams
123
        + '\''
124
        + ", "
125
        + "ancestorFolderId='"
126
        + ancestorFolderId
127
        + '\''
128
        + ", "
129
        + "orderBy='"
130
        + orderBy
131
        + '\''
132
        + ", "
133
        + "limit='"
134
        + limit
135
        + '\''
136
        + ", "
137
        + "marker='"
138
        + marker
139
        + '\''
140
        + ", "
141
        + "fields='"
142
        + fields
143
        + '\''
144
        + "}";
145
  }
146

147
  public static class Builder extends NullableFieldTracker {
148

149
    protected final String from;
150

151
    protected String query;
152

153
    protected Map<String, Object> queryParams;
154

155
    protected final String ancestorFolderId;
156

157
    protected List<MetadataQueryOrderByField> orderBy;
158

159
    protected Long limit;
160

161
    protected String marker;
162

163
    protected List<String> fields;
164

165
    public Builder(String from, String ancestorFolderId) {
166
      super();
1✔
167
      this.from = from;
1✔
168
      this.ancestorFolderId = ancestorFolderId;
1✔
169
    }
1✔
170

171
    public Builder query(String query) {
172
      this.query = query;
1✔
173
      return this;
1✔
174
    }
175

176
    public Builder queryParams(Map<String, Object> queryParams) {
177
      this.queryParams = queryParams;
1✔
178
      return this;
1✔
179
    }
180

181
    public Builder orderBy(List<MetadataQueryOrderByField> orderBy) {
182
      this.orderBy = orderBy;
×
183
      return this;
×
184
    }
185

186
    public Builder limit(Long limit) {
187
      this.limit = limit;
×
188
      return this;
×
189
    }
190

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

196
    public Builder fields(List<String> fields) {
UNCOV
197
      this.fields = fields;
×
UNCOV
198
      return this;
×
199
    }
200

201
    public MetadataQuery build() {
202
      return new MetadataQuery(this);
1✔
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