• 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

47.06
/src/main/java/com/box/sdkgen/schemas/aiextract/AiExtract.java
1
package com.box.sdkgen.schemas.aiextract;
2

3
import com.box.sdkgen.internal.NullableFieldTracker;
4
import com.box.sdkgen.internal.SerializableObject;
5
import com.box.sdkgen.schemas.aiagentextract.AiAgentExtract;
6
import com.box.sdkgen.schemas.aiagentreference.AiAgentReference;
7
import com.box.sdkgen.schemas.aiextractagent.AiExtractAgent;
8
import com.box.sdkgen.schemas.aiitembase.AiItemBase;
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
/** AI metadata freeform extraction request object. */
15
@JsonFilter("nullablePropertyFilter")
16
public class AiExtract extends SerializableObject {
17

18
  /**
19
   * The prompt provided to a Large Language Model (LLM) in the request. The prompt can be up to
20
   * 10000 characters long and it can be an XML or a JSON schema.
21
   */
22
  protected final String prompt;
23

24
  /** The items that LLM will process. Currently, you can use files only. */
25
  protected final List<AiItemBase> items;
26

27
  @JsonProperty("ai_agent")
28
  protected AiExtractAgent aiAgent;
29

30
  public AiExtract(
31
      @JsonProperty("prompt") String prompt, @JsonProperty("items") List<AiItemBase> items) {
32
    super();
×
33
    this.prompt = prompt;
×
34
    this.items = items;
×
35
  }
×
36

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

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

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

53
  public AiExtractAgent getAiAgent() {
54
    return aiAgent;
1✔
55
  }
56

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

71
  @Override
72
  public int hashCode() {
73
    return Objects.hash(prompt, items, aiAgent);
×
74
  }
75

76
  @Override
77
  public String toString() {
78
    return "AiExtract{"
×
79
        + "prompt='"
80
        + prompt
81
        + '\''
82
        + ", "
83
        + "items='"
84
        + items
85
        + '\''
86
        + ", "
87
        + "aiAgent='"
88
        + aiAgent
89
        + '\''
90
        + "}";
91
  }
92

93
  public static class Builder extends NullableFieldTracker {
94

95
    protected final String prompt;
96

97
    protected final List<AiItemBase> items;
98

99
    protected AiExtractAgent aiAgent;
100

101
    public Builder(String prompt, List<AiItemBase> items) {
102
      super();
1✔
103
      this.prompt = prompt;
1✔
104
      this.items = items;
1✔
105
    }
1✔
106

107
    public Builder aiAgent(AiAgentReference aiAgent) {
108
      this.aiAgent = new AiExtractAgent(aiAgent);
×
109
      return this;
×
110
    }
111

112
    public Builder aiAgent(AiAgentExtract aiAgent) {
113
      this.aiAgent = new AiExtractAgent(aiAgent);
1✔
114
      return this;
1✔
115
    }
116

117
    public Builder aiAgent(AiExtractAgent aiAgent) {
118
      this.aiAgent = aiAgent;
×
119
      return this;
×
120
    }
121

122
    public AiExtract build() {
123
      return new AiExtract(this);
1✔
124
    }
125
  }
126
}
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