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

box / box-java-sdk / #6242

10 Feb 2026 05:27PM UTC coverage: 35.714% (+11.4%) from 24.324%
#6242

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%)

2146 existing lines in 544 files now uncovered.

7382 of 20670 relevant lines covered (35.71%)

0.4 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/aiagentreference/AiAgentReference.java
1
package com.box.sdkgen.schemas.aiagentreference;
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.databind.annotation.JsonDeserialize;
8
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
9
import java.util.Objects;
10

11
/** The AI agent used to handle queries. */
12
@JsonFilter("nullablePropertyFilter")
13
public class AiAgentReference extends SerializableObject {
14

15
  /** The type of AI agent used to handle queries. */
16
  @JsonDeserialize(using = AiAgentReferenceTypeField.AiAgentReferenceTypeFieldDeserializer.class)
17
  @JsonSerialize(using = AiAgentReferenceTypeField.AiAgentReferenceTypeFieldSerializer.class)
18
  protected EnumWrapper<AiAgentReferenceTypeField> type;
19

20
  /**
21
   * The ID of an Agent. This can be a numeric ID for custom agents (for example, `14031`) or a
22
   * unique identifier for pre-built agents (for example, `enhanced_extract_agent` for the [Enhanced
23
   * Extract
24
   * Agent](https://developer.box.com/guides/box-ai/ai-tutorials/extract-metadata-structured#enhanced-extract-agent)).
25
   */
26
  protected String id;
27

28
  public AiAgentReference() {
29
    super();
×
30
    this.type = new EnumWrapper<AiAgentReferenceTypeField>(AiAgentReferenceTypeField.AI_AGENT_ID);
×
31
  }
×
32

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

40
  public EnumWrapper<AiAgentReferenceTypeField> getType() {
41
    return type;
×
42
  }
43

44
  public String getId() {
45
    return id;
×
46
  }
47

48
  @Override
49
  public boolean equals(Object o) {
50
    if (this == o) {
×
51
      return true;
×
52
    }
53
    if (o == null || getClass() != o.getClass()) {
×
54
      return false;
×
55
    }
56
    AiAgentReference casted = (AiAgentReference) o;
×
57
    return Objects.equals(type, casted.type) && Objects.equals(id, casted.id);
×
58
  }
59

60
  @Override
61
  public int hashCode() {
62
    return Objects.hash(type, id);
×
63
  }
64

65
  @Override
66
  public String toString() {
67
    return "AiAgentReference{" + "type='" + type + '\'' + ", " + "id='" + id + '\'' + "}";
×
68
  }
69

70
  public static class Builder extends NullableFieldTracker {
71

72
    protected EnumWrapper<AiAgentReferenceTypeField> type;
73

74
    protected String id;
75

76
    public Builder() {
77
      super();
×
78
    }
×
79

80
    public Builder type(AiAgentReferenceTypeField type) {
81
      this.type = new EnumWrapper<AiAgentReferenceTypeField>(type);
×
UNCOV
82
      return this;
×
83
    }
84

85
    public Builder type(EnumWrapper<AiAgentReferenceTypeField> type) {
86
      this.type = type;
×
UNCOV
87
      return this;
×
88
    }
89

90
    public Builder id(String id) {
91
      this.id = id;
×
UNCOV
92
      return this;
×
93
    }
94

95
    public AiAgentReference build() {
NEW
96
      if (this.type == null) {
×
NEW
97
        this.type =
×
98
            new EnumWrapper<AiAgentReferenceTypeField>(AiAgentReferenceTypeField.AI_AGENT_ID);
99
      }
UNCOV
100
      return new AiAgentReference(this);
×
101
    }
102
  }
103
}
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