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

box / box-java-sdk-gen / #141

28 May 2025 09:09AM UTC coverage: 35.551% (+0.2%) from 35.312%
#141

Pull #317

github

web-flow
Merge a88c4bc17 into 7ea98521c
Pull Request #317: chore: Update .codegen.json with commit hash of codegen and openapi spec

38 of 77 new or added lines in 15 files covered. (49.35%)

6 existing lines in 6 files now uncovered.

15595 of 43866 relevant lines covered (35.55%)

0.36 hits per line

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

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

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

12
public class AiResponse extends SerializableObject {
13

14
  protected final String answer;
15

16
  @JsonProperty("created_at")
17
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
18
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
19
  protected final Date createdAt;
20

21
  @JsonProperty("completion_reason")
22
  protected String completionReason;
23

24
  @JsonProperty("ai_agent_info")
25
  protected AiAgentInfo aiAgentInfo;
26

27
  public AiResponse(
28
      @JsonProperty("answer") String answer, @JsonProperty("created_at") Date createdAt) {
29
    super();
1✔
30
    this.answer = answer;
1✔
31
    this.createdAt = createdAt;
1✔
32
  }
1✔
33

34
  protected AiResponse(AiResponseBuilder builder) {
35
    super();
×
36
    this.answer = builder.answer;
×
37
    this.createdAt = builder.createdAt;
×
38
    this.completionReason = builder.completionReason;
×
39
    this.aiAgentInfo = builder.aiAgentInfo;
×
40
  }
×
41

42
  public String getAnswer() {
43
    return answer;
1✔
44
  }
45

46
  public Date getCreatedAt() {
47
    return createdAt;
×
48
  }
49

50
  public String getCompletionReason() {
51
    return completionReason;
1✔
52
  }
53

54
  public AiAgentInfo getAiAgentInfo() {
55
    return aiAgentInfo;
×
56
  }
57

58
  @Override
59
  public boolean equals(Object o) {
60
    if (this == o) {
×
61
      return true;
×
62
    }
63
    if (o == null || getClass() != o.getClass()) {
×
64
      return false;
×
65
    }
66
    AiResponse casted = (AiResponse) o;
×
67
    return Objects.equals(answer, casted.answer)
×
68
        && Objects.equals(createdAt, casted.createdAt)
×
69
        && Objects.equals(completionReason, casted.completionReason)
×
70
        && Objects.equals(aiAgentInfo, casted.aiAgentInfo);
×
71
  }
72

73
  @Override
74
  public int hashCode() {
75
    return Objects.hash(answer, createdAt, completionReason, aiAgentInfo);
×
76
  }
77

78
  @Override
79
  public String toString() {
80
    return "AiResponse{"
×
81
        + "answer='"
82
        + answer
83
        + '\''
84
        + ", "
85
        + "createdAt='"
86
        + createdAt
87
        + '\''
88
        + ", "
89
        + "completionReason='"
90
        + completionReason
91
        + '\''
92
        + ", "
93
        + "aiAgentInfo='"
94
        + aiAgentInfo
95
        + '\''
96
        + "}";
97
  }
98

99
  public static class AiResponseBuilder {
100

101
    protected final String answer;
102

103
    protected final Date createdAt;
104

105
    protected String completionReason;
106

107
    protected AiAgentInfo aiAgentInfo;
108

NEW
109
    public AiResponseBuilder(String answer, Date createdAt) {
×
110
      this.answer = answer;
×
111
      this.createdAt = createdAt;
×
112
    }
×
113

114
    public AiResponseBuilder completionReason(String completionReason) {
115
      this.completionReason = completionReason;
×
116
      return this;
×
117
    }
118

119
    public AiResponseBuilder aiAgentInfo(AiAgentInfo aiAgentInfo) {
120
      this.aiAgentInfo = aiAgentInfo;
×
121
      return this;
×
122
    }
123

124
    public AiResponse build() {
125
      return new AiResponse(this);
×
126
    }
127
  }
128
}
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