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

box / box-java-sdk-gen / #360

14 Jul 2025 11:20AM UTC coverage: 38.091% (+2.5%) from 35.58%
#360

push

github

web-flow
feat: Support common union fields and implicit union conversion (box/box-codegen#758) (#361)

288 of 1203 new or added lines in 106 files covered. (23.94%)

167 existing lines in 45 files now uncovered.

18543 of 48681 relevant lines covered (38.09%)

0.38 hits per line

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

51.28
/src/main/java/com/box/sdkgen/schemas/aitextgen/AiTextGen.java
1
package com.box.sdkgen.schemas.aitextgen;
2

3
import com.box.sdkgen.internal.NullableFieldTracker;
4
import com.box.sdkgen.internal.SerializableObject;
5
import com.box.sdkgen.schemas.aiagentreference.AiAgentReference;
6
import com.box.sdkgen.schemas.aiagentreferenceoraiagenttextgen.AiAgentReferenceOrAiAgentTextGen;
7
import com.box.sdkgen.schemas.aiagenttextgen.AiAgentTextGen;
8
import com.box.sdkgen.schemas.aidialoguehistory.AiDialogueHistory;
9
import com.fasterxml.jackson.annotation.JsonFilter;
10
import com.fasterxml.jackson.annotation.JsonProperty;
11
import java.util.List;
12
import java.util.Objects;
13

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

17
  protected final String prompt;
18

19
  protected final List<AiTextGenItemsField> items;
20

21
  @JsonProperty("dialogue_history")
22
  protected List<AiDialogueHistory> dialogueHistory;
23

24
  @JsonProperty("ai_agent")
25
  protected AiAgentReferenceOrAiAgentTextGen aiAgent;
26

27
  public AiTextGen(
28
      @JsonProperty("prompt") String prompt,
29
      @JsonProperty("items") List<AiTextGenItemsField> items) {
30
    super();
×
31
    this.prompt = prompt;
×
32
    this.items = items;
×
33
  }
×
34

35
  protected AiTextGen(Builder builder) {
36
    super();
1✔
37
    this.prompt = builder.prompt;
1✔
38
    this.items = builder.items;
1✔
39
    this.dialogueHistory = builder.dialogueHistory;
1✔
40
    this.aiAgent = builder.aiAgent;
1✔
41
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
1✔
42
  }
1✔
43

44
  public String getPrompt() {
45
    return prompt;
1✔
46
  }
47

48
  public List<AiTextGenItemsField> getItems() {
49
    return items;
1✔
50
  }
51

52
  public List<AiDialogueHistory> getDialogueHistory() {
53
    return dialogueHistory;
1✔
54
  }
55

56
  public AiAgentReferenceOrAiAgentTextGen getAiAgent() {
57
    return aiAgent;
1✔
58
  }
59

60
  @Override
61
  public boolean equals(Object o) {
62
    if (this == o) {
×
63
      return true;
×
64
    }
65
    if (o == null || getClass() != o.getClass()) {
×
66
      return false;
×
67
    }
68
    AiTextGen casted = (AiTextGen) o;
×
69
    return Objects.equals(prompt, casted.prompt)
×
70
        && Objects.equals(items, casted.items)
×
71
        && Objects.equals(dialogueHistory, casted.dialogueHistory)
×
72
        && Objects.equals(aiAgent, casted.aiAgent);
×
73
  }
74

75
  @Override
76
  public int hashCode() {
77
    return Objects.hash(prompt, items, dialogueHistory, aiAgent);
×
78
  }
79

80
  @Override
81
  public String toString() {
82
    return "AiTextGen{"
×
83
        + "prompt='"
84
        + prompt
85
        + '\''
86
        + ", "
87
        + "items='"
88
        + items
89
        + '\''
90
        + ", "
91
        + "dialogueHistory='"
92
        + dialogueHistory
93
        + '\''
94
        + ", "
95
        + "aiAgent='"
96
        + aiAgent
97
        + '\''
98
        + "}";
99
  }
100

101
  public static class Builder extends NullableFieldTracker {
102

103
    protected final String prompt;
104

105
    protected final List<AiTextGenItemsField> items;
106

107
    protected List<AiDialogueHistory> dialogueHistory;
108

109
    protected AiAgentReferenceOrAiAgentTextGen aiAgent;
110

111
    public Builder(String prompt, List<AiTextGenItemsField> items) {
112
      super();
1✔
113
      this.prompt = prompt;
1✔
114
      this.items = items;
1✔
115
    }
1✔
116

117
    public Builder dialogueHistory(List<AiDialogueHistory> dialogueHistory) {
118
      this.dialogueHistory = dialogueHistory;
1✔
119
      return this;
1✔
120
    }
121

122
    public Builder aiAgent(AiAgentReference aiAgent) {
NEW
123
      this.aiAgent = new AiAgentReferenceOrAiAgentTextGen(aiAgent);
×
NEW
124
      return this;
×
125
    }
126

127
    public Builder aiAgent(AiAgentTextGen aiAgent) {
128
      this.aiAgent = new AiAgentReferenceOrAiAgentTextGen(aiAgent);
1✔
129
      return this;
1✔
130
    }
131

132
    public Builder aiAgent(AiAgentReferenceOrAiAgentTextGen aiAgent) {
133
      this.aiAgent = aiAgent;
×
134
      return this;
×
135
    }
136

137
    public AiTextGen build() {
138
      return new AiTextGen(this);
1✔
139
    }
140
  }
141
}
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