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

box / box-java-sdk / #5076

07 Oct 2025 12:35PM UTC coverage: 37.132% (+0.007%) from 37.125%
#5076

push

github

web-flow
test: Change `Event.additionalDetails` field assertion in events test (box/box-codegen#858) (#1491)

18454 of 49699 relevant lines covered (37.13%)

0.37 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

20.0
/src/main/java/com/box/sdkgen/schemas/airesponse/AiResponse.java
1
package com.box.sdkgen.schemas.airesponse;
2

3
import com.box.sdkgen.internal.NullableFieldTracker;
4
import com.box.sdkgen.internal.SerializableObject;
5
import com.box.sdkgen.internal.utils.DateTimeUtils;
6
import com.box.sdkgen.schemas.aiagentinfo.AiAgentInfo;
7
import com.fasterxml.jackson.annotation.JsonFilter;
8
import com.fasterxml.jackson.annotation.JsonProperty;
9
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
10
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
11
import java.time.OffsetDateTime;
12
import java.util.Objects;
13

14
/** AI response. */
15
@JsonFilter("nullablePropertyFilter")
16
public class AiResponse extends SerializableObject {
17

18
  /** The answer provided by the LLM. */
19
  protected final String answer;
20

21
  /** The ISO date formatted timestamp of when the answer to the prompt was created. */
22
  @JsonProperty("created_at")
23
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
24
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
25
  protected final OffsetDateTime createdAt;
26

27
  /** The reason the response finishes. */
28
  @JsonProperty("completion_reason")
29
  protected String completionReason;
30

31
  @JsonProperty("ai_agent_info")
32
  protected AiAgentInfo aiAgentInfo;
33

34
  public AiResponse(
35
      @JsonProperty("answer") String answer, @JsonProperty("created_at") OffsetDateTime createdAt) {
36
    super();
1✔
37
    this.answer = answer;
1✔
38
    this.createdAt = createdAt;
1✔
39
  }
1✔
40

41
  protected AiResponse(Builder builder) {
42
    super();
×
43
    this.answer = builder.answer;
×
44
    this.createdAt = builder.createdAt;
×
45
    this.completionReason = builder.completionReason;
×
46
    this.aiAgentInfo = builder.aiAgentInfo;
×
47
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
48
  }
×
49

50
  public String getAnswer() {
51
    return answer;
1✔
52
  }
53

54
  public OffsetDateTime getCreatedAt() {
55
    return createdAt;
×
56
  }
57

58
  public String getCompletionReason() {
59
    return completionReason;
1✔
60
  }
61

62
  public AiAgentInfo getAiAgentInfo() {
63
    return aiAgentInfo;
1✔
64
  }
65

66
  @Override
67
  public boolean equals(Object o) {
68
    if (this == o) {
×
69
      return true;
×
70
    }
71
    if (o == null || getClass() != o.getClass()) {
×
72
      return false;
×
73
    }
74
    AiResponse casted = (AiResponse) o;
×
75
    return Objects.equals(answer, casted.answer)
×
76
        && Objects.equals(createdAt, casted.createdAt)
×
77
        && Objects.equals(completionReason, casted.completionReason)
×
78
        && Objects.equals(aiAgentInfo, casted.aiAgentInfo);
×
79
  }
80

81
  @Override
82
  public int hashCode() {
83
    return Objects.hash(answer, createdAt, completionReason, aiAgentInfo);
×
84
  }
85

86
  @Override
87
  public String toString() {
88
    return "AiResponse{"
×
89
        + "answer='"
90
        + answer
91
        + '\''
92
        + ", "
93
        + "createdAt='"
94
        + createdAt
95
        + '\''
96
        + ", "
97
        + "completionReason='"
98
        + completionReason
99
        + '\''
100
        + ", "
101
        + "aiAgentInfo='"
102
        + aiAgentInfo
103
        + '\''
104
        + "}";
105
  }
106

107
  public static class Builder extends NullableFieldTracker {
108

109
    protected final String answer;
110

111
    protected final OffsetDateTime createdAt;
112

113
    protected String completionReason;
114

115
    protected AiAgentInfo aiAgentInfo;
116

117
    public Builder(String answer, OffsetDateTime createdAt) {
118
      super();
×
119
      this.answer = answer;
×
120
      this.createdAt = createdAt;
×
121
    }
×
122

123
    public Builder completionReason(String completionReason) {
124
      this.completionReason = completionReason;
×
125
      return this;
×
126
    }
127

128
    public Builder aiAgentInfo(AiAgentInfo aiAgentInfo) {
129
      this.aiAgentInfo = aiAgentInfo;
×
130
      return this;
×
131
    }
132

133
    public AiResponse build() {
134
      return new AiResponse(this);
×
135
    }
136
  }
137
}
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