• 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

20.0
/src/main/java/com/box/sdkgen/schemas/aiask/AiAsk.java
1
package com.box.sdkgen.schemas.aiask;
2

3
import com.box.sdkgen.internal.NullableFieldTracker;
4
import com.box.sdkgen.internal.SerializableObject;
5
import com.box.sdkgen.schemas.aiagentaskoraiagentreference.AiAgentAskOrAiAgentReference;
6
import com.box.sdkgen.schemas.aidialoguehistory.AiDialogueHistory;
7
import com.box.sdkgen.schemas.aiitemask.AiItemAsk;
8
import com.box.sdkgen.serialization.json.EnumWrapper;
9
import com.fasterxml.jackson.annotation.JsonFilter;
10
import com.fasterxml.jackson.annotation.JsonProperty;
11
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
12
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
13
import java.util.List;
14
import java.util.Objects;
15

16
@JsonFilter("nullablePropertyFilter")
17
public class AiAsk extends SerializableObject {
18

19
  @JsonDeserialize(using = AiAskModeField.AiAskModeFieldDeserializer.class)
20
  @JsonSerialize(using = AiAskModeField.AiAskModeFieldSerializer.class)
21
  protected final EnumWrapper<AiAskModeField> mode;
22

23
  protected final String prompt;
24

25
  protected final List<AiItemAsk> items;
26

27
  @JsonProperty("dialogue_history")
28
  protected List<AiDialogueHistory> dialogueHistory;
29

30
  @JsonProperty("include_citations")
31
  protected Boolean includeCitations;
32

33
  @JsonProperty("ai_agent")
34
  protected AiAgentAskOrAiAgentReference aiAgent;
35

36
  public AiAsk(
37
      @JsonProperty("mode") EnumWrapper<AiAskModeField> mode,
38
      @JsonProperty("prompt") String prompt,
39
      @JsonProperty("items") List<AiItemAsk> items) {
40
    super();
×
41
    this.mode = mode;
×
UNCOV
42
    this.prompt = prompt;
×
UNCOV
43
    this.items = items;
×
UNCOV
44
  }
×
45

46
  public AiAsk(AiAskModeField mode, String prompt, List<AiItemAsk> items) {
47
    super();
1✔
48
    this.mode = new EnumWrapper<AiAskModeField>(mode);
1✔
49
    this.prompt = prompt;
1✔
50
    this.items = items;
1✔
51
  }
1✔
52

53
  protected AiAsk(Builder builder) {
54
    super();
×
55
    this.mode = builder.mode;
×
56
    this.prompt = builder.prompt;
×
57
    this.items = builder.items;
×
58
    this.dialogueHistory = builder.dialogueHistory;
×
UNCOV
59
    this.includeCitations = builder.includeCitations;
×
UNCOV
60
    this.aiAgent = builder.aiAgent;
×
UNCOV
61
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
UNCOV
62
  }
×
63

64
  public EnumWrapper<AiAskModeField> getMode() {
65
    return mode;
1✔
66
  }
67

68
  public String getPrompt() {
69
    return prompt;
1✔
70
  }
71

72
  public List<AiItemAsk> getItems() {
73
    return items;
1✔
74
  }
75

76
  public List<AiDialogueHistory> getDialogueHistory() {
77
    return dialogueHistory;
1✔
78
  }
79

80
  public Boolean getIncludeCitations() {
81
    return includeCitations;
1✔
82
  }
83

84
  public AiAgentAskOrAiAgentReference getAiAgent() {
85
    return aiAgent;
1✔
86
  }
87

88
  @Override
89
  public boolean equals(Object o) {
90
    if (this == o) {
×
UNCOV
91
      return true;
×
92
    }
93
    if (o == null || getClass() != o.getClass()) {
×
94
      return false;
×
95
    }
96
    AiAsk casted = (AiAsk) o;
×
97
    return Objects.equals(mode, casted.mode)
×
98
        && Objects.equals(prompt, casted.prompt)
×
UNCOV
99
        && Objects.equals(items, casted.items)
×
UNCOV
100
        && Objects.equals(dialogueHistory, casted.dialogueHistory)
×
UNCOV
101
        && Objects.equals(includeCitations, casted.includeCitations)
×
UNCOV
102
        && Objects.equals(aiAgent, casted.aiAgent);
×
103
  }
104

105
  @Override
106
  public int hashCode() {
UNCOV
107
    return Objects.hash(mode, prompt, items, dialogueHistory, includeCitations, aiAgent);
×
108
  }
109

110
  @Override
111
  public String toString() {
UNCOV
112
    return "AiAsk{"
×
113
        + "mode='"
114
        + mode
115
        + '\''
116
        + ", "
117
        + "prompt='"
118
        + prompt
119
        + '\''
120
        + ", "
121
        + "items='"
122
        + items
123
        + '\''
124
        + ", "
125
        + "dialogueHistory='"
126
        + dialogueHistory
127
        + '\''
128
        + ", "
129
        + "includeCitations='"
130
        + includeCitations
131
        + '\''
132
        + ", "
133
        + "aiAgent='"
134
        + aiAgent
135
        + '\''
136
        + "}";
137
  }
138

139
  public static class Builder extends NullableFieldTracker {
140

141
    protected final EnumWrapper<AiAskModeField> mode;
142

143
    protected final String prompt;
144

145
    protected final List<AiItemAsk> items;
146

147
    protected List<AiDialogueHistory> dialogueHistory;
148

149
    protected Boolean includeCitations;
150

151
    protected AiAgentAskOrAiAgentReference aiAgent;
152

153
    public Builder(EnumWrapper<AiAskModeField> mode, String prompt, List<AiItemAsk> items) {
UNCOV
154
      super();
×
155
      this.mode = mode;
×
156
      this.prompt = prompt;
×
157
      this.items = items;
×
158
    }
×
159

160
    public Builder(AiAskModeField mode, String prompt, List<AiItemAsk> items) {
UNCOV
161
      super();
×
162
      this.mode = new EnumWrapper<AiAskModeField>(mode);
×
163
      this.prompt = prompt;
×
UNCOV
164
      this.items = items;
×
UNCOV
165
    }
×
166

167
    public Builder dialogueHistory(List<AiDialogueHistory> dialogueHistory) {
168
      this.dialogueHistory = dialogueHistory;
×
UNCOV
169
      return this;
×
170
    }
171

172
    public Builder includeCitations(Boolean includeCitations) {
173
      this.includeCitations = includeCitations;
×
UNCOV
174
      return this;
×
175
    }
176

177
    public Builder aiAgent(AiAgentAskOrAiAgentReference aiAgent) {
UNCOV
178
      this.aiAgent = aiAgent;
×
UNCOV
179
      return this;
×
180
    }
181

182
    public AiAsk build() {
UNCOV
183
      return new AiAsk(this);
×
184
    }
185
  }
186
}
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