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

box / box-java-sdk / #5076

07 Oct 2025 12:35PM UTC coverage: 37.132% (+0.007%) from 37.125%
#5076

push

github

web-flow
test: Change `Event.additionalDetails` field assertion in events test (box/box-codegen#858) (#1491)

18454 of 49699 relevant lines covered (37.13%)

0.37 hits per line

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

45.76
/src/main/java/com/box/sdkgen/schemas/createaiagent/CreateAiAgent.java
1
package com.box.sdkgen.schemas.createaiagent;
2

3
import com.box.sdkgen.internal.NullableFieldTracker;
4
import com.box.sdkgen.internal.SerializableObject;
5
import com.box.sdkgen.schemas.aiagentallowedentity.AiAgentAllowedEntity;
6
import com.box.sdkgen.schemas.aistudioagentask.AiStudioAgentAsk;
7
import com.box.sdkgen.schemas.aistudioagentextract.AiStudioAgentExtract;
8
import com.box.sdkgen.schemas.aistudioagenttextgen.AiStudioAgentTextGen;
9
import com.box.sdkgen.serialization.json.EnumWrapper;
10
import com.fasterxml.jackson.annotation.JsonFilter;
11
import com.fasterxml.jackson.annotation.JsonProperty;
12
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
13
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
14
import java.util.List;
15
import java.util.Objects;
16

17
/** The schema for AI agent create request. */
18
@JsonFilter("nullablePropertyFilter")
19
public class CreateAiAgent extends SerializableObject {
20

21
  /** The type of agent used to handle queries. */
22
  @JsonDeserialize(using = CreateAiAgentTypeField.CreateAiAgentTypeFieldDeserializer.class)
23
  @JsonSerialize(using = CreateAiAgentTypeField.CreateAiAgentTypeFieldSerializer.class)
24
  protected EnumWrapper<CreateAiAgentTypeField> type;
25

26
  /** The name of the AI Agent. */
27
  protected final String name;
28

29
  /**
30
   * The state of the AI Agent. Possible values are: `enabled`, `disabled`, and
31
   * `enabled_for_selected_users`.
32
   */
33
  @JsonProperty("access_state")
34
  protected final String accessState;
35

36
  /**
37
   * The icon reference of the AI Agent. It should have format of the URL
38
   * `https://cdn01.boxcdn.net/app-assets/aistudio/avatars/&lt;file_name&gt;` where possible values
39
   * of `file_name` are:
40
   * `logo_boxAi.png`,`logo_stamp.png`,`logo_legal.png`,`logo_finance.png`,`logo_config.png`,`logo_handshake.png`,`logo_analytics.png`,`logo_classification.png`.
41
   */
42
  @JsonProperty("icon_reference")
43
  protected String iconReference;
44

45
  /** List of allowed users or groups. */
46
  @JsonProperty("allowed_entities")
47
  protected List<AiAgentAllowedEntity> allowedEntities;
48

49
  protected AiStudioAgentAsk ask;
50

51
  @JsonProperty("text_gen")
52
  protected AiStudioAgentTextGen textGen;
53

54
  protected AiStudioAgentExtract extract;
55

56
  public CreateAiAgent(
57
      @JsonProperty("name") String name, @JsonProperty("access_state") String accessState) {
58
    super();
×
59
    this.name = name;
×
60
    this.accessState = accessState;
×
61
    this.type = new EnumWrapper<CreateAiAgentTypeField>(CreateAiAgentTypeField.AI_AGENT);
×
62
  }
×
63

64
  protected CreateAiAgent(Builder builder) {
65
    super();
1✔
66
    this.type = builder.type;
1✔
67
    this.name = builder.name;
1✔
68
    this.accessState = builder.accessState;
1✔
69
    this.iconReference = builder.iconReference;
1✔
70
    this.allowedEntities = builder.allowedEntities;
1✔
71
    this.ask = builder.ask;
1✔
72
    this.textGen = builder.textGen;
1✔
73
    this.extract = builder.extract;
1✔
74
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
1✔
75
  }
1✔
76

77
  public EnumWrapper<CreateAiAgentTypeField> getType() {
78
    return type;
1✔
79
  }
80

81
  public String getName() {
82
    return name;
1✔
83
  }
84

85
  public String getAccessState() {
86
    return accessState;
1✔
87
  }
88

89
  public String getIconReference() {
90
    return iconReference;
1✔
91
  }
92

93
  public List<AiAgentAllowedEntity> getAllowedEntities() {
94
    return allowedEntities;
1✔
95
  }
96

97
  public AiStudioAgentAsk getAsk() {
98
    return ask;
1✔
99
  }
100

101
  public AiStudioAgentTextGen getTextGen() {
102
    return textGen;
1✔
103
  }
104

105
  public AiStudioAgentExtract getExtract() {
106
    return extract;
1✔
107
  }
108

109
  @Override
110
  public boolean equals(Object o) {
111
    if (this == o) {
×
112
      return true;
×
113
    }
114
    if (o == null || getClass() != o.getClass()) {
×
115
      return false;
×
116
    }
117
    CreateAiAgent casted = (CreateAiAgent) o;
×
118
    return Objects.equals(type, casted.type)
×
119
        && Objects.equals(name, casted.name)
×
120
        && Objects.equals(accessState, casted.accessState)
×
121
        && Objects.equals(iconReference, casted.iconReference)
×
122
        && Objects.equals(allowedEntities, casted.allowedEntities)
×
123
        && Objects.equals(ask, casted.ask)
×
124
        && Objects.equals(textGen, casted.textGen)
×
125
        && Objects.equals(extract, casted.extract);
×
126
  }
127

128
  @Override
129
  public int hashCode() {
130
    return Objects.hash(
×
131
        type, name, accessState, iconReference, allowedEntities, ask, textGen, extract);
132
  }
133

134
  @Override
135
  public String toString() {
136
    return "CreateAiAgent{"
×
137
        + "type='"
138
        + type
139
        + '\''
140
        + ", "
141
        + "name='"
142
        + name
143
        + '\''
144
        + ", "
145
        + "accessState='"
146
        + accessState
147
        + '\''
148
        + ", "
149
        + "iconReference='"
150
        + iconReference
151
        + '\''
152
        + ", "
153
        + "allowedEntities='"
154
        + allowedEntities
155
        + '\''
156
        + ", "
157
        + "ask='"
158
        + ask
159
        + '\''
160
        + ", "
161
        + "textGen='"
162
        + textGen
163
        + '\''
164
        + ", "
165
        + "extract='"
166
        + extract
167
        + '\''
168
        + "}";
169
  }
170

171
  public static class Builder extends NullableFieldTracker {
172

173
    protected EnumWrapper<CreateAiAgentTypeField> type;
174

175
    protected final String name;
176

177
    protected final String accessState;
178

179
    protected String iconReference;
180

181
    protected List<AiAgentAllowedEntity> allowedEntities;
182

183
    protected AiStudioAgentAsk ask;
184

185
    protected AiStudioAgentTextGen textGen;
186

187
    protected AiStudioAgentExtract extract;
188

189
    public Builder(String name, String accessState) {
190
      super();
1✔
191
      this.name = name;
1✔
192
      this.accessState = accessState;
1✔
193
      this.type = new EnumWrapper<CreateAiAgentTypeField>(CreateAiAgentTypeField.AI_AGENT);
1✔
194
    }
1✔
195

196
    public Builder type(CreateAiAgentTypeField type) {
197
      this.type = new EnumWrapper<CreateAiAgentTypeField>(type);
×
198
      return this;
×
199
    }
200

201
    public Builder type(EnumWrapper<CreateAiAgentTypeField> type) {
202
      this.type = type;
×
203
      return this;
×
204
    }
205

206
    public Builder iconReference(String iconReference) {
207
      this.iconReference = iconReference;
×
208
      return this;
×
209
    }
210

211
    public Builder allowedEntities(List<AiAgentAllowedEntity> allowedEntities) {
212
      this.allowedEntities = allowedEntities;
×
213
      return this;
×
214
    }
215

216
    public Builder ask(AiStudioAgentAsk ask) {
217
      this.ask = ask;
1✔
218
      return this;
1✔
219
    }
220

221
    public Builder textGen(AiStudioAgentTextGen textGen) {
222
      this.textGen = textGen;
×
223
      return this;
×
224
    }
225

226
    public Builder extract(AiStudioAgentExtract extract) {
227
      this.extract = extract;
×
228
      return this;
×
229
    }
230

231
    public CreateAiAgent build() {
232
      return new CreateAiAgent(this);
1✔
233
    }
234
  }
235
}
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