• 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

13.89
/src/main/java/com/box/sdkgen/schemas/aisingleagentresponse/AiSingleAgentResponse.java
1
package com.box.sdkgen.schemas.aisingleagentresponse;
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.aiagentallowedentity.AiAgentAllowedEntity;
7
import com.box.sdkgen.schemas.userbase.UserBase;
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.time.OffsetDateTime;
14
import java.util.List;
15
import java.util.Objects;
16

17
/** Standard representation of an AI Agent instance. */
18
@JsonFilter("nullablePropertyFilter")
19
public class AiSingleAgentResponse extends SerializableObject {
20

21
  /** The unique identifier of the AI Agent. */
22
  protected final String id;
23

24
  /** The type of agent used to handle queries. */
25
  @JsonDeserialize(
26
      using = AiSingleAgentResponseTypeField.AiSingleAgentResponseTypeFieldDeserializer.class)
27
  @JsonSerialize(
28
      using = AiSingleAgentResponseTypeField.AiSingleAgentResponseTypeFieldSerializer.class)
29
  protected EnumWrapper<AiSingleAgentResponseTypeField> type;
30

31
  /** The provider of the AI Agent. */
32
  protected final String origin;
33

34
  /** The name of the AI Agent. */
35
  protected final String name;
36

37
  /**
38
   * The state of the AI Agent. Possible values are: `enabled`, `disabled`, and
39
   * `enabled_for_selected_users`.
40
   */
41
  @JsonProperty("access_state")
42
  protected final String accessState;
43

44
  /** The user who created this agent. */
45
  @JsonProperty("created_by")
46
  protected UserBase createdBy;
47

48
  /** The ISO date-time formatted timestamp of when this AI agent was created. */
49
  @JsonProperty("created_at")
50
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
51
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
52
  protected OffsetDateTime createdAt;
53

54
  /** The user who most recently modified this agent. */
55
  @JsonProperty("modified_by")
56
  protected UserBase modifiedBy;
57

58
  /** The ISO date-time formatted timestamp of when this AI agent was recently modified. */
59
  @JsonProperty("modified_at")
60
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
61
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
62
  protected OffsetDateTime modifiedAt;
63

64
  /** The icon reference of the AI Agent. */
65
  @JsonProperty("icon_reference")
66
  protected String iconReference;
67

68
  /** List of allowed users or groups. */
69
  @JsonProperty("allowed_entities")
70
  protected List<AiAgentAllowedEntity> allowedEntities;
71

72
  public AiSingleAgentResponse(
73
      @JsonProperty("id") String id,
74
      @JsonProperty("origin") String origin,
75
      @JsonProperty("name") String name,
76
      @JsonProperty("access_state") String accessState) {
77
    super();
1✔
78
    this.id = id;
1✔
79
    this.origin = origin;
1✔
80
    this.name = name;
1✔
81
    this.accessState = accessState;
1✔
82
  }
1✔
83

84
  protected AiSingleAgentResponse(Builder builder) {
85
    super();
×
86
    this.id = builder.id;
×
87
    this.type = builder.type;
×
88
    this.origin = builder.origin;
×
89
    this.name = builder.name;
×
90
    this.accessState = builder.accessState;
×
91
    this.createdBy = builder.createdBy;
×
92
    this.createdAt = builder.createdAt;
×
93
    this.modifiedBy = builder.modifiedBy;
×
94
    this.modifiedAt = builder.modifiedAt;
×
95
    this.iconReference = builder.iconReference;
×
96
    this.allowedEntities = builder.allowedEntities;
×
97
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
98
  }
×
99

100
  public String getId() {
101
    return id;
1✔
102
  }
103

104
  public EnumWrapper<AiSingleAgentResponseTypeField> getType() {
105
    return type;
1✔
106
  }
107

108
  public String getOrigin() {
109
    return origin;
×
110
  }
111

112
  public String getName() {
113
    return name;
1✔
114
  }
115

116
  public String getAccessState() {
117
    return accessState;
1✔
118
  }
119

120
  public UserBase getCreatedBy() {
121
    return createdBy;
×
122
  }
123

124
  public OffsetDateTime getCreatedAt() {
125
    return createdAt;
×
126
  }
127

128
  public UserBase getModifiedBy() {
129
    return modifiedBy;
×
130
  }
131

132
  public OffsetDateTime getModifiedAt() {
133
    return modifiedAt;
×
134
  }
135

136
  public String getIconReference() {
137
    return iconReference;
×
138
  }
139

140
  public List<AiAgentAllowedEntity> getAllowedEntities() {
141
    return allowedEntities;
×
142
  }
143

144
  @Override
145
  public boolean equals(Object o) {
146
    if (this == o) {
×
147
      return true;
×
148
    }
149
    if (o == null || getClass() != o.getClass()) {
×
150
      return false;
×
151
    }
152
    AiSingleAgentResponse casted = (AiSingleAgentResponse) o;
×
153
    return Objects.equals(id, casted.id)
×
154
        && Objects.equals(type, casted.type)
×
155
        && Objects.equals(origin, casted.origin)
×
156
        && Objects.equals(name, casted.name)
×
157
        && Objects.equals(accessState, casted.accessState)
×
158
        && Objects.equals(createdBy, casted.createdBy)
×
159
        && Objects.equals(createdAt, casted.createdAt)
×
160
        && Objects.equals(modifiedBy, casted.modifiedBy)
×
161
        && Objects.equals(modifiedAt, casted.modifiedAt)
×
162
        && Objects.equals(iconReference, casted.iconReference)
×
163
        && Objects.equals(allowedEntities, casted.allowedEntities);
×
164
  }
165

166
  @Override
167
  public int hashCode() {
168
    return Objects.hash(
×
169
        id,
170
        type,
171
        origin,
172
        name,
173
        accessState,
174
        createdBy,
175
        createdAt,
176
        modifiedBy,
177
        modifiedAt,
178
        iconReference,
179
        allowedEntities);
180
  }
181

182
  @Override
183
  public String toString() {
184
    return "AiSingleAgentResponse{"
×
185
        + "id='"
186
        + id
187
        + '\''
188
        + ", "
189
        + "type='"
190
        + type
191
        + '\''
192
        + ", "
193
        + "origin='"
194
        + origin
195
        + '\''
196
        + ", "
197
        + "name='"
198
        + name
199
        + '\''
200
        + ", "
201
        + "accessState='"
202
        + accessState
203
        + '\''
204
        + ", "
205
        + "createdBy='"
206
        + createdBy
207
        + '\''
208
        + ", "
209
        + "createdAt='"
210
        + createdAt
211
        + '\''
212
        + ", "
213
        + "modifiedBy='"
214
        + modifiedBy
215
        + '\''
216
        + ", "
217
        + "modifiedAt='"
218
        + modifiedAt
219
        + '\''
220
        + ", "
221
        + "iconReference='"
222
        + iconReference
223
        + '\''
224
        + ", "
225
        + "allowedEntities='"
226
        + allowedEntities
227
        + '\''
228
        + "}";
229
  }
230

231
  public static class Builder extends NullableFieldTracker {
232

233
    protected final String id;
234

235
    protected EnumWrapper<AiSingleAgentResponseTypeField> type;
236

237
    protected final String origin;
238

239
    protected final String name;
240

241
    protected final String accessState;
242

243
    protected UserBase createdBy;
244

245
    protected OffsetDateTime createdAt;
246

247
    protected UserBase modifiedBy;
248

249
    protected OffsetDateTime modifiedAt;
250

251
    protected String iconReference;
252

253
    protected List<AiAgentAllowedEntity> allowedEntities;
254

255
    public Builder(String id, String origin, String name, String accessState) {
256
      super();
×
257
      this.id = id;
×
258
      this.origin = origin;
×
259
      this.name = name;
×
260
      this.accessState = accessState;
×
261
    }
×
262

263
    public Builder type(AiSingleAgentResponseTypeField type) {
264
      this.type = new EnumWrapper<AiSingleAgentResponseTypeField>(type);
×
265
      return this;
×
266
    }
267

268
    public Builder type(EnumWrapper<AiSingleAgentResponseTypeField> type) {
269
      this.type = type;
×
270
      return this;
×
271
    }
272

273
    public Builder createdBy(UserBase createdBy) {
274
      this.createdBy = createdBy;
×
275
      return this;
×
276
    }
277

278
    public Builder createdAt(OffsetDateTime createdAt) {
279
      this.createdAt = createdAt;
×
280
      return this;
×
281
    }
282

283
    public Builder modifiedBy(UserBase modifiedBy) {
284
      this.modifiedBy = modifiedBy;
×
285
      return this;
×
286
    }
287

288
    public Builder modifiedAt(OffsetDateTime modifiedAt) {
289
      this.modifiedAt = modifiedAt;
×
290
      return this;
×
291
    }
292

293
    public Builder iconReference(String iconReference) {
294
      this.iconReference = iconReference;
×
295
      return this;
×
296
    }
297

298
    public Builder allowedEntities(List<AiAgentAllowedEntity> allowedEntities) {
299
      this.allowedEntities = allowedEntities;
×
300
      return this;
×
301
    }
302

303
    public AiSingleAgentResponse build() {
304
      return new AiSingleAgentResponse(this);
×
305
    }
306
  }
307
}
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