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

box / box-java-sdk-gen / #294

24 Jun 2025 01:20PM UTC coverage: 35.662% (+0.03%) from 35.632%
#294

Pull #347

github

web-flow
Merge 2c100d09c into d8480ee6c
Pull Request #347: feat: Add Webhook Validation In Java (box/box-codegen#745)

68 of 82 new or added lines in 2 files covered. (82.93%)

11791 existing lines in 624 files now uncovered.

16939 of 47499 relevant lines covered (35.66%)

0.36 hits per line

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

17.14
/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.util.Date;
12
import java.util.Objects;
13

14
@JsonFilter("nullablePropertyFilter")
15
public class AiResponse extends SerializableObject {
16

17
  protected final String answer;
18

19
  @JsonProperty("created_at")
20
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
21
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
22
  protected final Date createdAt;
23

24
  @JsonProperty("completion_reason")
25
  protected String completionReason;
26

27
  @JsonProperty("ai_agent_info")
28
  protected AiAgentInfo aiAgentInfo;
29

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

37
  protected AiResponse(Builder builder) {
38
    super();
×
39
    this.answer = builder.answer;
×
40
    this.createdAt = builder.createdAt;
×
UNCOV
41
    this.completionReason = builder.completionReason;
×
UNCOV
42
    this.aiAgentInfo = builder.aiAgentInfo;
×
UNCOV
43
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
UNCOV
44
  }
×
45

46
  public String getAnswer() {
47
    return answer;
1✔
48
  }
49

50
  public Date getCreatedAt() {
UNCOV
51
    return createdAt;
×
52
  }
53

54
  public String getCompletionReason() {
55
    return completionReason;
1✔
56
  }
57

58
  public AiAgentInfo getAiAgentInfo() {
UNCOV
59
    return aiAgentInfo;
×
60
  }
61

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

77
  @Override
78
  public int hashCode() {
UNCOV
79
    return Objects.hash(answer, createdAt, completionReason, aiAgentInfo);
×
80
  }
81

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

103
  public static class Builder extends NullableFieldTracker {
104

105
    protected final String answer;
106

107
    protected final Date createdAt;
108

109
    protected String completionReason;
110

111
    protected AiAgentInfo aiAgentInfo;
112

113
    public Builder(String answer, Date createdAt) {
UNCOV
114
      super();
×
115
      this.answer = answer;
×
116
      this.createdAt = createdAt;
×
UNCOV
117
    }
×
118

119
    public Builder completionReason(String completionReason) {
120
      this.completionReason = completionReason;
×
121
      return this;
×
122
    }
123

124
    public Builder aiAgentInfo(AiAgentInfo aiAgentInfo) {
125
      this.aiAgentInfo = aiAgentInfo;
×
UNCOV
126
      return this;
×
127
    }
128

129
    public AiResponse build() {
UNCOV
130
      return new AiResponse(this);
×
131
    }
132
  }
133
}
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