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

box / box-java-sdk / #6243

10 Feb 2026 05:27PM UTC coverage: 18.192% (-17.5%) from 35.714%
#6243

push

github

web-flow
fix(boxsdkgen): Move assigning default values from builder constructor to `build()` method (box/box-codegen#922) (#1712)

0 of 1677 new or added lines in 569 files covered. (0.0%)

2147 existing lines in 545 files now uncovered.

7388 of 40611 relevant lines covered (18.19%)

0.21 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/aiitembase/AiItemBase.java
1
package com.box.sdkgen.schemas.aiitembase;
2

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

12
/** The item to be processed by the LLM. */
13
@JsonFilter("nullablePropertyFilter")
14
public class AiItemBase extends SerializableObject {
15

16
  /** The ID of the file. */
17
  protected final String id;
18

19
  /** The type of the item. Currently the value can be `file` only. */
20
  @JsonDeserialize(using = AiItemBaseTypeField.AiItemBaseTypeFieldDeserializer.class)
21
  @JsonSerialize(using = AiItemBaseTypeField.AiItemBaseTypeFieldSerializer.class)
22
  protected EnumWrapper<AiItemBaseTypeField> type;
23

24
  /** The content of the item, often the text representation. */
25
  protected String content;
26

27
  public AiItemBase(@JsonProperty("id") String id) {
28
    super();
×
29
    this.id = id;
×
30
    this.type = new EnumWrapper<AiItemBaseTypeField>(AiItemBaseTypeField.FILE);
×
31
  }
×
32

33
  protected AiItemBase(Builder builder) {
34
    super();
×
35
    this.id = builder.id;
×
36
    this.type = builder.type;
×
37
    this.content = builder.content;
×
38
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
39
  }
×
40

41
  public String getId() {
42
    return id;
×
43
  }
44

45
  public EnumWrapper<AiItemBaseTypeField> getType() {
46
    return type;
×
47
  }
48

49
  public String getContent() {
50
    return content;
×
51
  }
52

53
  @Override
54
  public boolean equals(Object o) {
55
    if (this == o) {
×
56
      return true;
×
57
    }
58
    if (o == null || getClass() != o.getClass()) {
×
59
      return false;
×
60
    }
61
    AiItemBase casted = (AiItemBase) o;
×
62
    return Objects.equals(id, casted.id)
×
63
        && Objects.equals(type, casted.type)
×
64
        && Objects.equals(content, casted.content);
×
65
  }
66

67
  @Override
68
  public int hashCode() {
69
    return Objects.hash(id, type, content);
×
70
  }
71

72
  @Override
73
  public String toString() {
74
    return "AiItemBase{"
×
75
        + "id='"
76
        + id
77
        + '\''
78
        + ", "
79
        + "type='"
80
        + type
81
        + '\''
82
        + ", "
83
        + "content='"
84
        + content
85
        + '\''
86
        + "}";
87
  }
88

89
  public static class Builder extends NullableFieldTracker {
90

91
    protected final String id;
92

93
    protected EnumWrapper<AiItemBaseTypeField> type;
94

95
    protected String content;
96

97
    public Builder(String id) {
98
      super();
×
99
      this.id = id;
×
100
    }
×
101

102
    public Builder type(AiItemBaseTypeField type) {
103
      this.type = new EnumWrapper<AiItemBaseTypeField>(type);
×
UNCOV
104
      return this;
×
105
    }
106

107
    public Builder type(EnumWrapper<AiItemBaseTypeField> type) {
108
      this.type = type;
×
UNCOV
109
      return this;
×
110
    }
111

112
    public Builder content(String content) {
113
      this.content = content;
×
UNCOV
114
      return this;
×
115
    }
116

117
    public AiItemBase build() {
NEW
118
      if (this.type == null) {
×
NEW
119
        this.type = new EnumWrapper<AiItemBaseTypeField>(AiItemBaseTypeField.FILE);
×
120
      }
UNCOV
121
      return new AiItemBase(this);
×
122
    }
123
  }
124
}
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