• 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/managers/search/SearchForContentQueryParams.java
1
package com.box.sdkgen.managers.search;
2

3
import com.box.sdkgen.schemas.metadatafilter.MetadataFilter;
4
import com.box.sdkgen.serialization.json.EnumWrapper;
5
import com.box.sdkgen.serialization.json.Valuable;
6
import com.fasterxml.jackson.core.JsonGenerator;
7
import com.fasterxml.jackson.core.JsonParser;
8
import com.fasterxml.jackson.databind.DeserializationContext;
9
import com.fasterxml.jackson.databind.JsonDeserializer;
10
import com.fasterxml.jackson.databind.JsonNode;
11
import com.fasterxml.jackson.databind.JsonSerializer;
12
import com.fasterxml.jackson.databind.SerializerProvider;
13
import java.io.IOException;
14
import java.util.ArrayList;
15
import java.util.List;
16

17
public class SearchForContentQueryParams {
18

19
  public String query;
20

21
  public EnumWrapper<SearchForContentQueryParamsScopeField> scope;
22

23
  public List<String> fileExtensions;
24

25
  public List<String> createdAtRange;
26

27
  public List<String> updatedAtRange;
28

29
  public List<Long> sizeRange;
30

31
  public List<String> ownerUserIds;
32

33
  public List<String> recentUpdaterUserIds;
34

35
  public List<String> ancestorFolderIds;
36

37
  public List<EnumWrapper<SearchForContentQueryParamsContentTypesField>> contentTypes;
38

39
  public EnumWrapper<SearchForContentQueryParamsTypeField> type;
40

41
  public EnumWrapper<SearchForContentQueryParamsTrashContentField> trashContent;
42

43
  public List<MetadataFilter> mdfilters;
44

45
  public EnumWrapper<SearchForContentQueryParamsSortField> sort;
46

47
  public EnumWrapper<SearchForContentQueryParamsDirectionField> direction;
48

49
  public Long limit;
50

51
  public Boolean includeRecentSharedLinks;
52

53
  public List<String> fields;
54

55
  public Long offset;
56

57
  public List<String> deletedUserIds;
58

59
  public List<String> deletedAtRange;
60

61
  public SearchForContentQueryParams() {}
×
62

NEW
63
  protected SearchForContentQueryParams(Builder builder) {
×
64
    this.query = builder.query;
×
65
    this.scope = builder.scope;
×
66
    this.fileExtensions = builder.fileExtensions;
×
67
    this.createdAtRange = builder.createdAtRange;
×
68
    this.updatedAtRange = builder.updatedAtRange;
×
69
    this.sizeRange = builder.sizeRange;
×
70
    this.ownerUserIds = builder.ownerUserIds;
×
71
    this.recentUpdaterUserIds = builder.recentUpdaterUserIds;
×
72
    this.ancestorFolderIds = builder.ancestorFolderIds;
×
73
    this.contentTypes = builder.contentTypes;
×
74
    this.type = builder.type;
×
75
    this.trashContent = builder.trashContent;
×
76
    this.mdfilters = builder.mdfilters;
×
77
    this.sort = builder.sort;
×
78
    this.direction = builder.direction;
×
79
    this.limit = builder.limit;
×
80
    this.includeRecentSharedLinks = builder.includeRecentSharedLinks;
×
81
    this.fields = builder.fields;
×
82
    this.offset = builder.offset;
×
83
    this.deletedUserIds = builder.deletedUserIds;
×
84
    this.deletedAtRange = builder.deletedAtRange;
×
85
  }
×
86

87
  public String getQuery() {
88
    return query;
×
89
  }
90

91
  public EnumWrapper<SearchForContentQueryParamsScopeField> getScope() {
92
    return scope;
×
93
  }
94

95
  public List<String> getFileExtensions() {
96
    return fileExtensions;
×
97
  }
98

99
  public List<String> getCreatedAtRange() {
100
    return createdAtRange;
×
101
  }
102

103
  public List<String> getUpdatedAtRange() {
104
    return updatedAtRange;
×
105
  }
106

107
  public List<Long> getSizeRange() {
108
    return sizeRange;
×
109
  }
110

111
  public List<String> getOwnerUserIds() {
112
    return ownerUserIds;
×
113
  }
114

115
  public List<String> getRecentUpdaterUserIds() {
116
    return recentUpdaterUserIds;
×
117
  }
118

119
  public List<String> getAncestorFolderIds() {
120
    return ancestorFolderIds;
×
121
  }
122

123
  public List<EnumWrapper<SearchForContentQueryParamsContentTypesField>> getContentTypes() {
124
    return contentTypes;
×
125
  }
126

127
  public EnumWrapper<SearchForContentQueryParamsTypeField> getType() {
128
    return type;
×
129
  }
130

131
  public EnumWrapper<SearchForContentQueryParamsTrashContentField> getTrashContent() {
132
    return trashContent;
×
133
  }
134

135
  public List<MetadataFilter> getMdfilters() {
136
    return mdfilters;
×
137
  }
138

139
  public EnumWrapper<SearchForContentQueryParamsSortField> getSort() {
140
    return sort;
×
141
  }
142

143
  public EnumWrapper<SearchForContentQueryParamsDirectionField> getDirection() {
144
    return direction;
×
145
  }
146

147
  public Long getLimit() {
148
    return limit;
×
149
  }
150

151
  public Boolean getIncludeRecentSharedLinks() {
152
    return includeRecentSharedLinks;
×
153
  }
154

155
  public List<String> getFields() {
156
    return fields;
×
157
  }
158

159
  public Long getOffset() {
160
    return offset;
×
161
  }
162

163
  public List<String> getDeletedUserIds() {
164
    return deletedUserIds;
×
165
  }
166

167
  public List<String> getDeletedAtRange() {
168
    return deletedAtRange;
×
169
  }
170

NEW
171
  public static class Builder {
×
172

173
    protected String query;
174

175
    protected EnumWrapper<SearchForContentQueryParamsScopeField> scope;
176

177
    protected List<String> fileExtensions;
178

179
    protected List<String> createdAtRange;
180

181
    protected List<String> updatedAtRange;
182

183
    protected List<Long> sizeRange;
184

185
    protected List<String> ownerUserIds;
186

187
    protected List<String> recentUpdaterUserIds;
188

189
    protected List<String> ancestorFolderIds;
190

191
    protected List<EnumWrapper<SearchForContentQueryParamsContentTypesField>> contentTypes;
192

193
    protected EnumWrapper<SearchForContentQueryParamsTypeField> type;
194

195
    protected EnumWrapper<SearchForContentQueryParamsTrashContentField> trashContent;
196

197
    protected List<MetadataFilter> mdfilters;
198

199
    protected EnumWrapper<SearchForContentQueryParamsSortField> sort;
200

201
    protected EnumWrapper<SearchForContentQueryParamsDirectionField> direction;
202

203
    protected Long limit;
204

205
    protected Boolean includeRecentSharedLinks;
206

207
    protected List<String> fields;
208

209
    protected Long offset;
210

211
    protected List<String> deletedUserIds;
212

213
    protected List<String> deletedAtRange;
214

215
    public Builder query(String query) {
216
      this.query = query;
×
217
      return this;
×
218
    }
219

220
    public Builder scope(SearchForContentQueryParamsScopeField scope) {
221
      this.scope = new EnumWrapper<SearchForContentQueryParamsScopeField>(scope);
×
222
      return this;
×
223
    }
224

225
    public Builder scope(EnumWrapper<SearchForContentQueryParamsScopeField> scope) {
UNCOV
226
      this.scope = scope;
×
227
      return this;
×
228
    }
229

230
    public Builder fileExtensions(List<String> fileExtensions) {
231
      this.fileExtensions = fileExtensions;
×
232
      return this;
×
233
    }
234

235
    public Builder createdAtRange(List<String> createdAtRange) {
236
      this.createdAtRange = createdAtRange;
×
237
      return this;
×
238
    }
239

240
    public Builder updatedAtRange(List<String> updatedAtRange) {
241
      this.updatedAtRange = updatedAtRange;
×
242
      return this;
×
243
    }
244

245
    public Builder sizeRange(List<Long> sizeRange) {
246
      this.sizeRange = sizeRange;
×
247
      return this;
×
248
    }
249

250
    public Builder ownerUserIds(List<String> ownerUserIds) {
251
      this.ownerUserIds = ownerUserIds;
×
252
      return this;
×
253
    }
254

255
    public Builder recentUpdaterUserIds(List<String> recentUpdaterUserIds) {
UNCOV
256
      this.recentUpdaterUserIds = recentUpdaterUserIds;
×
257
      return this;
×
258
    }
259

260
    public Builder ancestorFolderIds(List<String> ancestorFolderIds) {
261
      this.ancestorFolderIds = ancestorFolderIds;
×
262
      return this;
×
263
    }
264

265
    public Builder contentTypes(List<? extends Valuable> contentTypes) {
266
      this.contentTypes =
×
267
          EnumWrapper.wrapValuableEnumList(
×
268
              contentTypes, SearchForContentQueryParamsContentTypesField.class);
269
      return this;
×
270
    }
271

272
    public Builder type(SearchForContentQueryParamsTypeField type) {
273
      this.type = new EnumWrapper<SearchForContentQueryParamsTypeField>(type);
×
274
      return this;
×
275
    }
276

277
    public Builder type(EnumWrapper<SearchForContentQueryParamsTypeField> type) {
UNCOV
278
      this.type = type;
×
279
      return this;
×
280
    }
281

282
    public Builder trashContent(SearchForContentQueryParamsTrashContentField trashContent) {
UNCOV
283
      this.trashContent =
×
284
          new EnumWrapper<SearchForContentQueryParamsTrashContentField>(trashContent);
285
      return this;
×
286
    }
287

288
    public Builder trashContent(
289
        EnumWrapper<SearchForContentQueryParamsTrashContentField> trashContent) {
290
      this.trashContent = trashContent;
×
291
      return this;
×
292
    }
293

294
    public Builder mdfilters(List<MetadataFilter> mdfilters) {
295
      this.mdfilters = mdfilters;
×
296
      return this;
×
297
    }
298

299
    public Builder sort(SearchForContentQueryParamsSortField sort) {
300
      this.sort = new EnumWrapper<SearchForContentQueryParamsSortField>(sort);
×
301
      return this;
×
302
    }
303

304
    public Builder sort(EnumWrapper<SearchForContentQueryParamsSortField> sort) {
UNCOV
305
      this.sort = sort;
×
306
      return this;
×
307
    }
308

309
    public Builder direction(SearchForContentQueryParamsDirectionField direction) {
UNCOV
310
      this.direction = new EnumWrapper<SearchForContentQueryParamsDirectionField>(direction);
×
311
      return this;
×
312
    }
313

314
    public Builder direction(EnumWrapper<SearchForContentQueryParamsDirectionField> direction) {
UNCOV
315
      this.direction = direction;
×
316
      return this;
×
317
    }
318

319
    public Builder limit(Long limit) {
320
      this.limit = limit;
×
321
      return this;
×
322
    }
323

324
    public Builder includeRecentSharedLinks(Boolean includeRecentSharedLinks) {
UNCOV
325
      this.includeRecentSharedLinks = includeRecentSharedLinks;
×
326
      return this;
×
327
    }
328

329
    public Builder fields(List<String> fields) {
330
      this.fields = fields;
×
331
      return this;
×
332
    }
333

334
    public Builder offset(Long offset) {
335
      this.offset = offset;
×
336
      return this;
×
337
    }
338

339
    public Builder deletedUserIds(List<String> deletedUserIds) {
340
      this.deletedUserIds = deletedUserIds;
×
341
      return this;
×
342
    }
343

344
    public Builder deletedAtRange(List<String> deletedAtRange) {
345
      this.deletedAtRange = deletedAtRange;
×
346
      return this;
×
347
    }
348

349
    public SearchForContentQueryParams build() {
350
      return new SearchForContentQueryParams(this);
×
351
    }
352
  }
353

354
  public static class ContentTypesDeserializer
355
      extends JsonDeserializer<List<EnumWrapper<SearchForContentQueryParamsContentTypesField>>> {
356

357
    public final JsonDeserializer<EnumWrapper<SearchForContentQueryParamsContentTypesField>>
358
        elementDeserializer;
359

360
    public ContentTypesDeserializer() {
361
      super();
×
362
      this.elementDeserializer =
×
363
          new SearchForContentQueryParamsContentTypesField
364
              .SearchForContentQueryParamsContentTypesFieldDeserializer();
365
    }
×
366

367
    @Override
368
    public List<EnumWrapper<SearchForContentQueryParamsContentTypesField>> deserialize(
369
        JsonParser p, DeserializationContext ctxt) throws IOException {
370
      JsonNode node = p.getCodec().readTree(p);
×
371
      List<EnumWrapper<SearchForContentQueryParamsContentTypesField>> elements = new ArrayList<>();
×
372
      for (JsonNode item : node) {
×
373
        JsonParser pa = item.traverse(p.getCodec());
×
374
        pa.nextToken();
×
375
        elements.add(elementDeserializer.deserialize(pa, ctxt));
×
376
      }
×
377
      return elements;
×
378
    }
379
  }
380

381
  public static class ContentTypesSerializer
382
      extends JsonSerializer<List<EnumWrapper<SearchForContentQueryParamsContentTypesField>>> {
383

384
    public final JsonSerializer<EnumWrapper<SearchForContentQueryParamsContentTypesField>>
385
        elementSerializer;
386

387
    public ContentTypesSerializer() {
388
      super();
×
389
      this.elementSerializer =
×
390
          new SearchForContentQueryParamsContentTypesField
391
              .SearchForContentQueryParamsContentTypesFieldSerializer();
392
    }
×
393

394
    @Override
395
    public void serialize(
396
        List<EnumWrapper<SearchForContentQueryParamsContentTypesField>> value,
397
        JsonGenerator gen,
398
        SerializerProvider serializers)
399
        throws IOException {
400
      gen.writeStartArray();
×
401
      for (EnumWrapper<SearchForContentQueryParamsContentTypesField> item : value) {
×
402
        elementSerializer.serialize(item, gen, serializers);
×
403
      }
×
404
      gen.writeEndArray();
×
405
    }
×
406
  }
407
}
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