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

box / box-java-sdk-gen / #331

10 Jul 2025 05:13PM UTC coverage: 35.58%. First build
#331

Pull #359

github

web-flow
Merge e49be1aba into b7374ec91
Pull Request #359: chore: Update .codegen.json with commit hash of codegen and openapi spec

41 of 91 new or added lines in 11 files covered. (45.05%)

16957 of 47659 relevant lines covered (35.58%)

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/internal/OneOfFive.java
1
package com.box.sdkgen.internal;
2

3
import com.box.sdkgen.serialization.json.JsonManager;
4
import com.fasterxml.jackson.core.JsonGenerator;
5
import com.fasterxml.jackson.databind.JsonSerializer;
6
import com.fasterxml.jackson.databind.ObjectMapper;
7
import com.fasterxml.jackson.databind.SerializerProvider;
8
import java.io.IOException;
9

10
public class OneOfFive<T0, T1, T2, T3, T4> extends SerializableObject {
11
  protected static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
×
12
  protected T0 value0;
13
  protected T1 value1;
14
  protected T2 value2;
15
  protected T3 value3;
16
  protected T4 value4;
17

18
  public OneOfFive(T0 value0, T1 value1, T2 value2, T3 value3, T4 value4) {
×
19
    this.value0 = value0;
×
20
    this.value1 = value1;
×
21
    this.value2 = value2;
×
22
    this.value3 = value3;
×
23
    this.value4 = value4;
×
24
  }
×
25

26
  public static class OneOfFiveSerializer extends JsonSerializer<OneOfFive<?, ?, ?, ?, ?>> {
27

28
    public OneOfFiveSerializer() {
29
      super();
×
30
    }
×
31

32
    @Override
33
    public void serialize(
34
        OneOfFive<?, ?, ?, ?, ?> itemEntryField, JsonGenerator gen, SerializerProvider provider)
35
        throws IOException {
36
      if (itemEntryField.value0 != null) {
×
NEW
37
        JsonManager.WRITER.writeValue(gen, itemEntryField.value0);
×
38
      }
39
      if (itemEntryField.value1 != null) {
×
NEW
40
        JsonManager.WRITER.writeValue(gen, itemEntryField.value1);
×
41
      }
42
      if (itemEntryField.value2 != null) {
×
NEW
43
        JsonManager.WRITER.writeValue(gen, itemEntryField.value2);
×
44
      }
45
      if (itemEntryField.value3 != null) {
×
NEW
46
        JsonManager.WRITER.writeValue(gen, itemEntryField.value3);
×
47
      }
48
      if (itemEntryField.value4 != null) {
×
NEW
49
        JsonManager.WRITER.writeValue(gen, itemEntryField.value4);
×
50
      }
51
    }
×
52
  }
53
}
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