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

box / box-java-sdk-gen / #226

20 Jun 2025 03:14PM UTC coverage: 35.609% (-0.2%) from 35.816%
#226

push

github

web-flow
feat: Shorten builder names in Java (box/box-codegen#742) (#334)

367 of 1570 new or added lines in 984 files covered. (23.38%)

674 existing lines in 370 files now uncovered.

16125 of 45284 relevant lines covered (35.61%)

0.36 hits per line

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

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

3
import com.box.sdkgen.internal.SerializableObject;
4
import com.box.sdkgen.schemas.aiagentaskoraiagentreference.AiAgentAskOrAiAgentReference;
5
import com.box.sdkgen.schemas.aidialoguehistory.AiDialogueHistory;
6
import com.box.sdkgen.schemas.aiitemask.AiItemAsk;
7
import com.box.sdkgen.serialization.json.EnumWrapper;
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.List;
12
import java.util.Objects;
13

14
public class AiAsk extends SerializableObject {
15

16
  @JsonDeserialize(using = AiAskModeField.AiAskModeFieldDeserializer.class)
17
  @JsonSerialize(using = AiAskModeField.AiAskModeFieldSerializer.class)
18
  protected final EnumWrapper<AiAskModeField> mode;
19

20
  protected final String prompt;
21

22
  protected final List<AiItemAsk> items;
23

24
  @JsonProperty("dialogue_history")
25
  protected List<AiDialogueHistory> dialogueHistory;
26

27
  @JsonProperty("include_citations")
28
  protected Boolean includeCitations;
29

30
  @JsonProperty("ai_agent")
31
  protected AiAgentAskOrAiAgentReference aiAgent;
32

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

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

50
  protected AiAsk(Builder builder) {
51
    super();
×
52
    this.mode = builder.mode;
×
53
    this.prompt = builder.prompt;
×
54
    this.items = builder.items;
×
55
    this.dialogueHistory = builder.dialogueHistory;
×
56
    this.includeCitations = builder.includeCitations;
×
57
    this.aiAgent = builder.aiAgent;
×
58
  }
×
59

60
  public EnumWrapper<AiAskModeField> getMode() {
61
    return mode;
1✔
62
  }
63

64
  public String getPrompt() {
65
    return prompt;
1✔
66
  }
67

68
  public List<AiItemAsk> getItems() {
69
    return items;
1✔
70
  }
71

72
  public List<AiDialogueHistory> getDialogueHistory() {
73
    return dialogueHistory;
1✔
74
  }
75

76
  public Boolean getIncludeCitations() {
77
    return includeCitations;
1✔
78
  }
79

80
  public AiAgentAskOrAiAgentReference getAiAgent() {
81
    return aiAgent;
1✔
82
  }
83

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

101
  @Override
102
  public int hashCode() {
103
    return Objects.hash(mode, prompt, items, dialogueHistory, includeCitations, aiAgent);
×
104
  }
105

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

135
  public static class Builder {
136

137
    protected final EnumWrapper<AiAskModeField> mode;
138

139
    protected final String prompt;
140

141
    protected final List<AiItemAsk> items;
142

143
    protected List<AiDialogueHistory> dialogueHistory;
144

145
    protected Boolean includeCitations;
146

147
    protected AiAgentAskOrAiAgentReference aiAgent;
148

NEW
149
    public Builder(EnumWrapper<AiAskModeField> mode, String prompt, List<AiItemAsk> items) {
×
150
      this.mode = mode;
×
151
      this.prompt = prompt;
×
152
      this.items = items;
×
153
    }
×
154

NEW
155
    public Builder(AiAskModeField mode, String prompt, List<AiItemAsk> items) {
×
156
      this.mode = new EnumWrapper<AiAskModeField>(mode);
×
157
      this.prompt = prompt;
×
158
      this.items = items;
×
159
    }
×
160

161
    public Builder dialogueHistory(List<AiDialogueHistory> dialogueHistory) {
162
      this.dialogueHistory = dialogueHistory;
×
163
      return this;
×
164
    }
165

166
    public Builder includeCitations(Boolean includeCitations) {
167
      this.includeCitations = includeCitations;
×
168
      return this;
×
169
    }
170

171
    public Builder aiAgent(AiAgentAskOrAiAgentReference aiAgent) {
172
      this.aiAgent = aiAgent;
×
173
      return this;
×
174
    }
175

176
    public AiAsk build() {
177
      return new AiAsk(this);
×
178
    }
179
  }
180
}
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