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

box / box-java-sdk / #7242

10 Jun 2026 01:57PM UTC coverage: 12.418% (-0.05%) from 12.468%
#7242

Pull #1882

github

web-flow
Merge 475e1dd17 into de6bd88fa
Pull Request #1882: feat(boxsdkgen): Add new parameters to ai extract structured method (box/box-openapi#604)

0 of 231 new or added lines in 10 files covered. (0.0%)

17 existing lines in 10 files now uncovered.

8368 of 67388 relevant lines covered (12.42%)

0.12 hits per line

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

0.0
/src/main/java/com/box/sdkgen/schemas/aiextractstructured/AiExtractStructured.java
1
package com.box.sdkgen.schemas.aiextractstructured;
2

3
import com.box.sdkgen.internal.NullableFieldTracker;
4
import com.box.sdkgen.internal.SerializableObject;
5
import com.box.sdkgen.schemas.aiagentextractstructured.AiAgentExtractStructured;
6
import com.box.sdkgen.schemas.aiagentreference.AiAgentReference;
7
import com.box.sdkgen.schemas.aiextractstructuredagent.AiExtractStructuredAgent;
8
import com.box.sdkgen.schemas.aiitembase.AiItemBase;
9
import com.box.sdkgen.schemas.aitaxonomysource.AiTaxonomySource;
10
import com.fasterxml.jackson.annotation.JsonFilter;
11
import com.fasterxml.jackson.annotation.JsonProperty;
12
import java.util.List;
13
import java.util.Objects;
14

15
/** AI Extract Structured Request object. */
16
@JsonFilter("nullablePropertyFilter")
17
public class AiExtractStructured extends SerializableObject {
18

19
  /** The items to be processed by the LLM. Currently you can use files only. */
20
  protected final List<AiItemBase> items;
21

22
  /**
23
   * The metadata template containing the fields to extract. For your request to work, you must
24
   * provide either `metadata_template` or `fields`, but not both.
25
   */
26
  @JsonProperty("metadata_template")
27
  protected AiExtractStructuredMetadataTemplateField metadataTemplate;
28

29
  /**
30
   * The fields to be extracted from the provided items. For your request to work, you must provide
31
   * either `metadata_template` or `fields`, but not both.
32
   */
33
  protected List<AiExtractStructuredFieldsField> fields;
34

35
  @JsonProperty("ai_agent")
36
  protected AiExtractStructuredAgent aiAgent;
37

38
  /** A flag to indicate whether confidence scores for every extracted field should be returned. */
39
  @JsonProperty("include_confidence_score")
40
  protected Boolean includeConfidenceScore;
41

42
  /** A flag to indicate whether references for every extracted field should be returned. */
43
  @JsonProperty("include_reference")
44
  protected Boolean includeReference;
45

46
  /**
47
   * The taxonomy sources to be used for the structured extraction. They can either be an existing
48
   * file or a taxonomy. For your request to work, `fields` must also be provided.
49
   * `taxonomy_sources` is not supported with `metadata_template`.
50
   */
51
  @JsonProperty("taxonomy_sources")
52
  protected List<AiTaxonomySource> taxonomySources;
53

54
  public AiExtractStructured(@JsonProperty("items") List<AiItemBase> items) {
55
    super();
×
56
    this.items = items;
×
57
  }
×
58

59
  protected AiExtractStructured(Builder builder) {
60
    super();
×
61
    this.items = builder.items;
×
62
    this.metadataTemplate = builder.metadataTemplate;
×
63
    this.fields = builder.fields;
×
64
    this.aiAgent = builder.aiAgent;
×
65
    this.includeConfidenceScore = builder.includeConfidenceScore;
×
66
    this.includeReference = builder.includeReference;
×
NEW
67
    this.taxonomySources = builder.taxonomySources;
×
68
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
69
  }
×
70

71
  public List<AiItemBase> getItems() {
72
    return items;
×
73
  }
74

75
  public AiExtractStructuredMetadataTemplateField getMetadataTemplate() {
76
    return metadataTemplate;
×
77
  }
78

79
  public List<AiExtractStructuredFieldsField> getFields() {
80
    return fields;
×
81
  }
82

83
  public AiExtractStructuredAgent getAiAgent() {
84
    return aiAgent;
×
85
  }
86

87
  public Boolean getIncludeConfidenceScore() {
88
    return includeConfidenceScore;
×
89
  }
90

91
  public Boolean getIncludeReference() {
92
    return includeReference;
×
93
  }
94

95
  public List<AiTaxonomySource> getTaxonomySources() {
NEW
96
    return taxonomySources;
×
97
  }
98

99
  @Override
100
  public boolean equals(Object o) {
101
    if (this == o) {
×
102
      return true;
×
103
    }
104
    if (o == null || getClass() != o.getClass()) {
×
105
      return false;
×
106
    }
107
    AiExtractStructured casted = (AiExtractStructured) o;
×
108
    return Objects.equals(items, casted.items)
×
109
        && Objects.equals(metadataTemplate, casted.metadataTemplate)
×
110
        && Objects.equals(fields, casted.fields)
×
111
        && Objects.equals(aiAgent, casted.aiAgent)
×
112
        && Objects.equals(includeConfidenceScore, casted.includeConfidenceScore)
×
NEW
113
        && Objects.equals(includeReference, casted.includeReference)
×
NEW
114
        && Objects.equals(taxonomySources, casted.taxonomySources);
×
115
  }
116

117
  @Override
118
  public int hashCode() {
119
    return Objects.hash(
×
120
        items,
121
        metadataTemplate,
122
        fields,
123
        aiAgent,
124
        includeConfidenceScore,
125
        includeReference,
126
        taxonomySources);
127
  }
128

129
  @Override
130
  public String toString() {
131
    return "AiExtractStructured{"
×
132
        + "items='"
133
        + items
134
        + '\''
135
        + ", "
136
        + "metadataTemplate='"
137
        + metadataTemplate
138
        + '\''
139
        + ", "
140
        + "fields='"
141
        + fields
142
        + '\''
143
        + ", "
144
        + "aiAgent='"
145
        + aiAgent
146
        + '\''
147
        + ", "
148
        + "includeConfidenceScore='"
149
        + includeConfidenceScore
150
        + '\''
151
        + ", "
152
        + "includeReference='"
153
        + includeReference
154
        + '\''
155
        + ", "
156
        + "taxonomySources='"
157
        + taxonomySources
158
        + '\''
159
        + "}";
160
  }
161

162
  public static class Builder extends NullableFieldTracker {
163

164
    protected final List<AiItemBase> items;
165

166
    protected AiExtractStructuredMetadataTemplateField metadataTemplate;
167

168
    protected List<AiExtractStructuredFieldsField> fields;
169

170
    protected AiExtractStructuredAgent aiAgent;
171

172
    protected Boolean includeConfidenceScore;
173

174
    protected Boolean includeReference;
175

176
    protected List<AiTaxonomySource> taxonomySources;
177

178
    public Builder(List<AiItemBase> items) {
179
      super();
×
180
      this.items = items;
×
181
    }
×
182

183
    public Builder metadataTemplate(AiExtractStructuredMetadataTemplateField metadataTemplate) {
184
      this.metadataTemplate = metadataTemplate;
×
185
      return this;
×
186
    }
187

188
    public Builder fields(List<AiExtractStructuredFieldsField> fields) {
189
      this.fields = fields;
×
190
      return this;
×
191
    }
192

193
    public Builder aiAgent(AiAgentReference aiAgent) {
194
      this.aiAgent = new AiExtractStructuredAgent(aiAgent);
×
195
      return this;
×
196
    }
197

198
    public Builder aiAgent(AiAgentExtractStructured aiAgent) {
199
      this.aiAgent = new AiExtractStructuredAgent(aiAgent);
×
200
      return this;
×
201
    }
202

203
    public Builder aiAgent(AiExtractStructuredAgent aiAgent) {
204
      this.aiAgent = aiAgent;
×
205
      return this;
×
206
    }
207

208
    public Builder includeConfidenceScore(Boolean includeConfidenceScore) {
209
      this.includeConfidenceScore = includeConfidenceScore;
×
210
      return this;
×
211
    }
212

213
    public Builder includeReference(Boolean includeReference) {
214
      this.includeReference = includeReference;
×
215
      return this;
×
216
    }
217

218
    public Builder taxonomySources(List<AiTaxonomySource> taxonomySources) {
NEW
219
      this.taxonomySources = taxonomySources;
×
NEW
220
      return this;
×
221
    }
222

223
    public AiExtractStructured build() {
224
      return new AiExtractStructured(this);
×
225
    }
226
  }
227
}
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