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

box / box-java-sdk / #7247

10 Jun 2026 02:11PM UTC coverage: 12.425% (-0.04%) from 12.46%
#7247

push

github

web-flow
feat(boxsdkgen): Add new parameters to ai extract structured method (box/box-openapi#604) (#1882)

Co-authored-by: box-sdk-build <box-sdk-build@box.com>

0 of 231 new or added lines in 10 files covered. (0.0%)

17 existing lines in 10 files now uncovered.

8374 of 67394 relevant lines covered (12.43%)

0.12 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/aitaxonomysource/AiTaxonomySource.java
1
package com.box.sdkgen.schemas.aitaxonomysource;
2

3
import com.box.sdkgen.internal.OneOfTwo;
4
import com.box.sdkgen.schemas.aitaxonomyfilereference.AiTaxonomyFileReference;
5
import com.box.sdkgen.schemas.aitaxonomyreference.AiTaxonomyReference;
6
import com.box.sdkgen.serialization.json.EnumWrapper;
7
import com.box.sdkgen.serialization.json.JsonManager;
8
import com.fasterxml.jackson.core.JsonParser;
9
import com.fasterxml.jackson.databind.DeserializationContext;
10
import com.fasterxml.jackson.databind.JsonDeserializer;
11
import com.fasterxml.jackson.databind.JsonMappingException;
12
import com.fasterxml.jackson.databind.JsonNode;
13
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
14
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
15
import java.io.IOException;
16

17
@JsonDeserialize(using = AiTaxonomySource.AiTaxonomySourceDeserializer.class)
18
@JsonSerialize(using = OneOfTwo.OneOfTwoSerializer.class)
19
public class AiTaxonomySource extends OneOfTwo<AiTaxonomyReference, AiTaxonomyFileReference> {
20

21
  protected final String type;
22

23
  protected final String taxonomyKey;
24

25
  public AiTaxonomySource(AiTaxonomyReference aiTaxonomyReference) {
NEW
26
    super(aiTaxonomyReference, null);
×
NEW
27
    this.type = EnumWrapper.convertToString(aiTaxonomyReference.getType());
×
NEW
28
    this.taxonomyKey = aiTaxonomyReference.getTaxonomyKey();
×
NEW
29
  }
×
30

31
  public AiTaxonomySource(AiTaxonomyFileReference aiTaxonomyFileReference) {
NEW
32
    super(null, aiTaxonomyFileReference);
×
NEW
33
    this.type = EnumWrapper.convertToString(aiTaxonomyFileReference.getType());
×
NEW
34
    this.taxonomyKey = aiTaxonomyFileReference.getTaxonomyKey();
×
NEW
35
  }
×
36

37
  public boolean isAiTaxonomyReference() {
NEW
38
    return value0 != null;
×
39
  }
40

41
  public AiTaxonomyReference getAiTaxonomyReference() {
NEW
42
    return value0;
×
43
  }
44

45
  public boolean isAiTaxonomyFileReference() {
NEW
46
    return value1 != null;
×
47
  }
48

49
  public AiTaxonomyFileReference getAiTaxonomyFileReference() {
NEW
50
    return value1;
×
51
  }
52

53
  public String getType() {
NEW
54
    return type;
×
55
  }
56

57
  public String getTaxonomyKey() {
NEW
58
    return taxonomyKey;
×
59
  }
60

61
  static class AiTaxonomySourceDeserializer extends JsonDeserializer<AiTaxonomySource> {
62

63
    public AiTaxonomySourceDeserializer() {
NEW
64
      super();
×
NEW
65
    }
×
66

67
    @Override
68
    public AiTaxonomySource deserialize(JsonParser jp, DeserializationContext ctxt)
69
        throws IOException {
NEW
70
      JsonNode node = JsonManager.jsonToSerializedData(jp);
×
NEW
71
      JsonNode discriminant0 = node.get("type");
×
NEW
72
      if (!(discriminant0 == null)) {
×
NEW
73
        switch (discriminant0.asText()) {
×
74
          case "taxonomy":
NEW
75
            return new AiTaxonomySource(JsonManager.deserialize(node, AiTaxonomyReference.class));
×
76
          case "file":
NEW
77
            return new AiTaxonomySource(
×
NEW
78
                JsonManager.deserialize(node, AiTaxonomyFileReference.class));
×
79
        }
80
      }
NEW
81
      throw new JsonMappingException(jp, "Unable to deserialize AiTaxonomySource");
×
82
    }
83
  }
84
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc