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

box / box-java-sdk / #6927

05 May 2026 04:23PM UTC coverage: 12.537% (+0.007%) from 12.53%
#6927

push

github

web-flow
fix(boxsdkgen)!: Mark `id` field of `AIAgentReference` required (box/box-openapi#1629) (box/box-openapi#595) (#1826)

0 of 2 new or added lines in 1 file covered. (0.0%)

18 existing lines in 11 files now uncovered.

8374 of 66793 relevant lines covered (12.54%)

0.13 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.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 AI agent used to handle queries. */
13
@JsonFilter("nullablePropertyFilter")
14
public class AiAgentReference extends SerializableObject {
15

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

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

29
  public AiAgentReference(@JsonProperty("id") String id) {
30
    super();
×
NEW
31
    this.id = id;
×
32
    this.type = new EnumWrapper<AiAgentReferenceTypeField>(AiAgentReferenceTypeField.AI_AGENT_ID);
×
33
  }
×
34

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

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

46
  public String getId() {
47
    return id;
×
48
  }
49

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

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

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

72
  public static class Builder extends NullableFieldTracker {
73

74
    protected EnumWrapper<AiAgentReferenceTypeField> type;
75

76
    protected final String id;
77

78
    public Builder(String id) {
79
      super();
×
NEW
80
      this.id = id;
×
UNCOV
81
    }
×
82

83
    public Builder type(AiAgentReferenceTypeField type) {
84
      this.type = new EnumWrapper<AiAgentReferenceTypeField>(type);
×
85
      return this;
×
86
    }
87

88
    public Builder type(EnumWrapper<AiAgentReferenceTypeField> type) {
89
      this.type = type;
×
90
      return this;
×
91
    }
92

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