Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .codegen.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "engineHash": "daeb1ea", "specHash": "88cd5aa", "version": "5.17.0" }
{ "engineHash": "daeb1ea", "specHash": "c5a35a6", "version": "5.17.0" }
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,22 @@ public class AiExtractStructured extends SerializableObject {
@JsonProperty("ai_agent")
protected AiExtractStructuredAgent aiAgent;

/** A flag to indicate whether confidence scores for every extracted field should be returned. */
/**
* A flag to indicate whether confidence scores for every extracted field should be returned.
* Estimates the likelihood that an extracted metadata field value is accurate and correct.
* Displays a numerical and categorical confidence score to help users and automated systems
* quickly determine extraction reliability.
*/
@JsonProperty("include_confidence_score")
protected Boolean includeConfidenceScore;

/** A flag to indicate whether references for every extracted field should be returned. */
/**
* A flag to indicate whether references for every extracted field should be returned. References
* and bounding boxes show where the agent extracted the metadata from. They help you check for
* accuracy and fix any mistakes. References are short, exact quotes from the original document
* used to verify results. Bounding boxes highlight the specific areas on the page where that text
* is found.
*/
@JsonProperty("include_reference")
protected Boolean includeReference;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
import com.box.sdkgen.schemas.appitem.AppItem;
import com.box.sdkgen.schemas.collaborationaccessgrantee.CollaborationAccessGrantee;
import com.box.sdkgen.schemas.collaborationitem.CollaborationItem;
import com.box.sdkgen.schemas.file.File;
import com.box.sdkgen.schemas.folder.Folder;
import com.box.sdkgen.schemas.filemini.FileMini;
import com.box.sdkgen.schemas.foldermini.FolderMini;
import com.box.sdkgen.schemas.groupmini.GroupMini;
import com.box.sdkgen.schemas.usercollaborations.UserCollaborations;
import com.box.sdkgen.schemas.weblink.WebLink;
import com.box.sdkgen.schemas.weblinkmini.WebLinkMini;
import com.box.sdkgen.serialization.json.EnumWrapper;
import com.fasterxml.jackson.annotation.JsonFilter;
import com.fasterxml.jackson.annotation.JsonProperty;
Expand Down Expand Up @@ -349,19 +349,19 @@ public Builder type(EnumWrapper<CollaborationTypeField> type) {
return this;
}

public Builder item(File item) {
public Builder item(FileMini item) {
this.item = new CollaborationItem(item);
this.markNullableFieldAsSet("item");
return this;
}

public Builder item(Folder item) {
public Builder item(FolderMini item) {
this.item = new CollaborationItem(item);
this.markNullableFieldAsSet("item");
return this;
}

public Builder item(WebLink item) {
public Builder item(WebLinkMini item) {
this.item = new CollaborationItem(item);
this.markNullableFieldAsSet("item");
return this;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package com.box.sdkgen.schemas.collaborationitem;

import com.box.sdkgen.internal.OneOfThree;
import com.box.sdkgen.schemas.file.File;
import com.box.sdkgen.schemas.folder.Folder;
import com.box.sdkgen.schemas.filemini.FileMini;
import com.box.sdkgen.schemas.foldermini.FolderMini;
import com.box.sdkgen.schemas.usermini.UserMini;
import com.box.sdkgen.schemas.weblink.WebLink;
import com.box.sdkgen.schemas.weblinkmini.WebLinkMini;
import com.box.sdkgen.serialization.json.EnumWrapper;
import com.box.sdkgen.serialization.json.JsonManager;
import com.fasterxml.jackson.core.JsonParser;
Expand All @@ -16,31 +14,10 @@
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import java.io.IOException;
import java.time.OffsetDateTime;

@JsonDeserialize(using = CollaborationItem.CollaborationItemDeserializer.class)
@JsonSerialize(using = OneOfThree.OneOfThreeSerializer.class)
public class CollaborationItem extends OneOfThree<File, Folder, WebLink> {

protected final String description;

protected final OffsetDateTime createdAt;

protected final OffsetDateTime modifiedAt;

protected final OffsetDateTime trashedAt;

protected final OffsetDateTime purgedAt;

protected final UserMini createdBy;

protected final UserMini modifiedBy;

protected final UserMini ownedBy;

protected final FolderMini parent;

protected final String itemStatus;
public class CollaborationItem extends OneOfThree<FileMini, FolderMini, WebLinkMini> {

protected final String sequenceId;

Expand All @@ -52,127 +29,57 @@ public class CollaborationItem extends OneOfThree<File, Folder, WebLink> {

protected final String type;

public CollaborationItem(File file) {
super(file, null, null);
this.description = file.getDescription();
this.createdAt = file.getCreatedAt();
this.modifiedAt = file.getModifiedAt();
this.trashedAt = file.getTrashedAt();
this.purgedAt = file.getPurgedAt();
this.createdBy = file.getCreatedBy();
this.modifiedBy = file.getModifiedBy();
this.ownedBy = file.getOwnedBy();
this.parent = file.getParent();
this.itemStatus = EnumWrapper.convertToString(file.getItemStatus());
this.sequenceId = file.getSequenceId();
this.name = file.getName();
this.id = file.getId();
this.etag = file.getEtag();
this.type = EnumWrapper.convertToString(file.getType());
public CollaborationItem(FileMini fileMini) {
super(fileMini, null, null);
this.sequenceId = fileMini.getSequenceId();
this.name = fileMini.getName();
this.id = fileMini.getId();
this.etag = fileMini.getEtag();
this.type = EnumWrapper.convertToString(fileMini.getType());
}

public CollaborationItem(Folder folder) {
super(null, folder, null);
this.description = folder.getDescription();
this.createdAt = folder.getCreatedAt();
this.modifiedAt = folder.getModifiedAt();
this.trashedAt = folder.getTrashedAt();
this.purgedAt = folder.getPurgedAt();
this.createdBy = folder.getCreatedBy();
this.modifiedBy = folder.getModifiedBy();
this.ownedBy = folder.getOwnedBy();
this.parent = folder.getParent();
this.itemStatus = EnumWrapper.convertToString(folder.getItemStatus());
this.sequenceId = folder.getSequenceId();
this.name = folder.getName();
this.id = folder.getId();
this.etag = folder.getEtag();
this.type = EnumWrapper.convertToString(folder.getType());
public CollaborationItem(FolderMini folderMini) {
super(null, folderMini, null);
this.sequenceId = folderMini.getSequenceId();
this.name = folderMini.getName();
this.id = folderMini.getId();
this.etag = folderMini.getEtag();
this.type = EnumWrapper.convertToString(folderMini.getType());
}

public CollaborationItem(WebLink webLink) {
super(null, null, webLink);
this.description = webLink.getDescription();
this.createdAt = webLink.getCreatedAt();
this.modifiedAt = webLink.getModifiedAt();
this.trashedAt = webLink.getTrashedAt();
this.purgedAt = webLink.getPurgedAt();
this.createdBy = webLink.getCreatedBy();
this.modifiedBy = webLink.getModifiedBy();
this.ownedBy = webLink.getOwnedBy();
this.parent = webLink.getParent();
this.itemStatus = EnumWrapper.convertToString(webLink.getItemStatus());
this.sequenceId = webLink.getSequenceId();
this.name = webLink.getName();
this.id = webLink.getId();
this.etag = webLink.getEtag();
this.type = EnumWrapper.convertToString(webLink.getType());
public CollaborationItem(WebLinkMini webLinkMini) {
super(null, null, webLinkMini);
this.sequenceId = webLinkMini.getSequenceId();
this.name = webLinkMini.getName();
this.id = webLinkMini.getId();
this.etag = webLinkMini.getEtag();
this.type = EnumWrapper.convertToString(webLinkMini.getType());
}

public boolean isFile() {
public boolean isFileMini() {
return value0 != null;
}

public File getFile() {
public FileMini getFileMini() {
return value0;
}

public boolean isFolder() {
public boolean isFolderMini() {
return value1 != null;
}

public Folder getFolder() {
public FolderMini getFolderMini() {
return value1;
}

public boolean isWebLink() {
public boolean isWebLinkMini() {
return value2 != null;
}

public WebLink getWebLink() {
public WebLinkMini getWebLinkMini() {
return value2;
}

public String getDescription() {
return description;
}

public OffsetDateTime getCreatedAt() {
return createdAt;
}

public OffsetDateTime getModifiedAt() {
return modifiedAt;
}

public OffsetDateTime getTrashedAt() {
return trashedAt;
}

public OffsetDateTime getPurgedAt() {
return purgedAt;
}

public UserMini getCreatedBy() {
return createdBy;
}

public UserMini getModifiedBy() {
return modifiedBy;
}

public UserMini getOwnedBy() {
return ownedBy;
}

public FolderMini getParent() {
return parent;
}

public String getItemStatus() {
return itemStatus;
}

public String getSequenceId() {
return sequenceId;
}
Expand Down Expand Up @@ -207,11 +114,11 @@ public CollaborationItem deserialize(JsonParser jp, DeserializationContext ctxt)
if (!(discriminant0 == null)) {
switch (discriminant0.asText()) {
case "file":
return new CollaborationItem(JsonManager.deserialize(node, File.class));
return new CollaborationItem(JsonManager.deserialize(node, FileMini.class));
case "folder":
return new CollaborationItem(JsonManager.deserialize(node, Folder.class));
return new CollaborationItem(JsonManager.deserialize(node, FolderMini.class));
case "web_link":
return new CollaborationItem(JsonManager.deserialize(node, WebLink.class));
return new CollaborationItem(JsonManager.deserialize(node, WebLinkMini.class));
}
}
throw new JsonMappingException(jp, "Unable to deserialize CollaborationItem");
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/box/sdkgen/schemas/file/File.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public class File extends FileMini {
protected UserMini ownedBy;

@JsonProperty("shared_link")
@Nullable
protected FileSharedLinkField sharedLink;

@Nullable protected FolderMini parent;
Expand Down Expand Up @@ -444,6 +445,7 @@ public Builder ownedBy(UserMini ownedBy) {

public Builder sharedLink(FileSharedLinkField sharedLink) {
this.sharedLink = sharedLink;
this.markNullableFieldAsSet("shared_link");
return this;
}

Expand Down
4 changes: 3 additions & 1 deletion src/main/java/com/box/sdkgen/schemas/filefull/FileFull.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public class FileFull extends File {

protected FileFullRepresentationsField representations;

protected FileFullClassificationField classification;
@Nullable protected FileFullClassificationField classification;

@JsonProperty("uploader_display_name")
protected String uploaderDisplayName;
Expand Down Expand Up @@ -770,6 +770,7 @@ public Builder representations(FileFullRepresentationsField representations) {

public Builder classification(FileFullClassificationField classification) {
this.classification = classification;
this.markNullableFieldAsSet("classification");
return this;
}

Expand Down Expand Up @@ -948,6 +949,7 @@ public Builder ownedBy(UserMini ownedBy) {
@Override
public Builder sharedLink(FileSharedLinkField sharedLink) {
this.sharedLink = sharedLink;
this.markNullableFieldAsSet("shared_link");
return this;
}

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/box/sdkgen/schemas/weblink/WebLink.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public class WebLink extends WebLinkMini {
protected UserMini ownedBy;

@JsonProperty("shared_link")
@Nullable
protected WebLinkSharedLinkField sharedLink;

/**
Expand Down Expand Up @@ -422,6 +423,7 @@ public Builder ownedBy(UserMini ownedBy) {

public Builder sharedLink(WebLinkSharedLinkField sharedLink) {
this.sharedLink = sharedLink;
this.markNullableFieldAsSet("shared_link");
return this;
}

Expand Down
Loading