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": "450fb53", "specHash": "f8e0d99", "version": "10.8.0" }
{ "engineHash": "450fb53", "specHash": "d0976fc", "version": "10.8.0" }
2 changes: 1 addition & 1 deletion docs/ai.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ See the endpoint docs at

<!-- sample post_ai_extract_structured -->
```
client.getAi().createAiExtractStructured(new AiExtractStructured.Builder(Arrays.asList(new AiItemBase(file.getId()))).fields(Arrays.asList(new AiExtractStructuredFieldsField.Builder("firstName").description("Person first name").displayName("First name").prompt("What is the your first name?").type("string").build(), new AiExtractStructuredFieldsField.Builder("lastName").description("Person last name").displayName("Last name").prompt("What is the your last name?").type("string").build(), new AiExtractStructuredFieldsField.Builder("dateOfBirth").description("Person date of birth").displayName("Birth date").prompt("What is the date of your birth?").type("date").build(), new AiExtractStructuredFieldsField.Builder("age").description("Person age").displayName("Age").prompt("How old are you?").type("float").build(), new AiExtractStructuredFieldsField.Builder("hobby").description("Person hobby").displayName("Hobby").prompt("What is your hobby?").type("multiSelect").options(Arrays.asList(new AiExtractStructuredFieldsOptionsField("guitar"), new AiExtractStructuredFieldsOptionsField("books"))).build())).includeConfidenceScore(true).aiAgent(aiExtractStructuredAgentBasicTextConfig).build())
client.getAi().createAiExtractStructured(new AiExtractStructured.Builder(Arrays.asList(new AiItemBase(file.getId()))).fields(Arrays.asList(new AiExtractStructuredFieldsField.Builder("firstName").description("Person first name").displayName("First name").prompt("What is the your first name?").type("string").build(), new AiExtractStructuredFieldsField.Builder("lastName").description("Person last name").displayName("Last name").prompt("What is the your last name?").type("string").build(), new AiExtractStructuredFieldsField.Builder("dateOfBirth").description("Person date of birth").displayName("Birth date").prompt("What is the date of your birth?").type("date").build(), new AiExtractStructuredFieldsField.Builder("age").description("Person age").displayName("Age").prompt("How old are you?").type("float").build(), new AiExtractStructuredFieldsField.Builder("hobby").description("Person hobby").displayName("Hobby").prompt("What is your hobby?").type("multiSelect").options(Arrays.asList(new AiExtractStructuredFieldsOptionsField("guitar"), new AiExtractStructuredFieldsOptionsField("books"))).build())).aiAgent(aiExtractStructuredAgentBasicTextConfig).includeConfidenceScore(true).build())
```

### Arguments
Expand Down
2 changes: 1 addition & 1 deletion docs/users.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ Returns the updated user object.
## Delete user

Deletes a user. By default, this operation fails if the user
still owns any content, was recently active, or recently joined the enterprise from a free account.
still owns any content.
To proceed, move their owned content first, or use the `force` parameter to delete
the user and their files.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import com.box.sdkgen.internal.NullableFieldTracker;
import com.box.sdkgen.internal.SerializableObject;
import com.box.sdkgen.schemas.retentionpolicymaxextensionlengthrequest.RetentionPolicyMaxExtensionLengthRequest;
import com.box.sdkgen.schemas.retentionpolicymaxextensionlengthrequest.RetentionPolicyMaxExtensionLengthRequestEnum;
import com.box.sdkgen.schemas.usermini.UserMini;
import com.box.sdkgen.serialization.json.EnumWrapper;
import com.fasterxml.jackson.annotation.JsonFilter;
Expand Down Expand Up @@ -89,6 +91,9 @@ public class CreateRetentionPolicyRequestBody extends SerializableObject {
@JsonProperty("can_owner_extend_retention")
protected Boolean canOwnerExtendRetention;

@JsonProperty("max_extension_length")
protected RetentionPolicyMaxExtensionLengthRequest maxExtensionLength;

/** Whether owner and co-owners of a file are notified when the policy nears expiration. */
@JsonProperty("are_owners_notified")
protected Boolean areOwnersNotified;
Expand Down Expand Up @@ -150,6 +155,7 @@ protected CreateRetentionPolicyRequestBody(Builder builder) {
this.retentionLength = builder.retentionLength;
this.retentionType = builder.retentionType;
this.canOwnerExtendRetention = builder.canOwnerExtendRetention;
this.maxExtensionLength = builder.maxExtensionLength;
this.areOwnersNotified = builder.areOwnersNotified;
this.customNotificationRecipients = builder.customNotificationRecipients;
markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
Expand Down Expand Up @@ -184,6 +190,10 @@ public Boolean getCanOwnerExtendRetention() {
return canOwnerExtendRetention;
}

public RetentionPolicyMaxExtensionLengthRequest getMaxExtensionLength() {
return maxExtensionLength;
}

public Boolean getAreOwnersNotified() {
return areOwnersNotified;
}
Expand All @@ -208,6 +218,7 @@ public boolean equals(Object o) {
&& Objects.equals(retentionLength, casted.retentionLength)
&& Objects.equals(retentionType, casted.retentionType)
&& Objects.equals(canOwnerExtendRetention, casted.canOwnerExtendRetention)
&& Objects.equals(maxExtensionLength, casted.maxExtensionLength)
&& Objects.equals(areOwnersNotified, casted.areOwnersNotified)
&& Objects.equals(customNotificationRecipients, casted.customNotificationRecipients);
}
Expand All @@ -222,6 +233,7 @@ public int hashCode() {
retentionLength,
retentionType,
canOwnerExtendRetention,
maxExtensionLength,
areOwnersNotified,
customNotificationRecipients);
}
Expand Down Expand Up @@ -257,6 +269,10 @@ public String toString() {
+ canOwnerExtendRetention
+ '\''
+ ", "
+ "maxExtensionLength='"
+ maxExtensionLength
+ '\''
+ ", "
+ "areOwnersNotified='"
+ areOwnersNotified
+ '\''
Expand Down Expand Up @@ -284,6 +300,8 @@ public static class Builder extends NullableFieldTracker {

protected Boolean canOwnerExtendRetention;

protected RetentionPolicyMaxExtensionLengthRequest maxExtensionLength;

protected Boolean areOwnersNotified;

protected List<UserMini> customNotificationRecipients;
Expand Down Expand Up @@ -374,6 +392,27 @@ public Builder canOwnerExtendRetention(Boolean canOwnerExtendRetention) {
return this;
}

public Builder maxExtensionLength(
RetentionPolicyMaxExtensionLengthRequestEnum maxExtensionLength) {
this.maxExtensionLength = new RetentionPolicyMaxExtensionLengthRequest(maxExtensionLength);
return this;
}

public Builder maxExtensionLength(String maxExtensionLength) {
this.maxExtensionLength = new RetentionPolicyMaxExtensionLengthRequest(maxExtensionLength);
return this;
}

public Builder maxExtensionLength(int maxExtensionLength) {
this.maxExtensionLength = new RetentionPolicyMaxExtensionLengthRequest(maxExtensionLength);
return this;
}

public Builder maxExtensionLength(RetentionPolicyMaxExtensionLengthRequest maxExtensionLength) {
this.maxExtensionLength = maxExtensionLength;
return this;
}

public Builder areOwnersNotified(Boolean areOwnersNotified) {
this.areOwnersNotified = areOwnersNotified;
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import com.box.sdkgen.internal.Nullable;
import com.box.sdkgen.internal.NullableFieldTracker;
import com.box.sdkgen.internal.SerializableObject;
import com.box.sdkgen.schemas.retentionpolicymaxextensionlengthrequest.RetentionPolicyMaxExtensionLengthRequest;
import com.box.sdkgen.schemas.retentionpolicymaxextensionlengthrequest.RetentionPolicyMaxExtensionLengthRequestEnum;
import com.box.sdkgen.schemas.userbase.UserBase;
import com.fasterxml.jackson.annotation.JsonFilter;
import com.fasterxml.jackson.annotation.JsonProperty;
Expand Down Expand Up @@ -71,6 +73,9 @@ public class UpdateRetentionPolicyByIdRequestBody extends SerializableObject {
@Nullable
protected Boolean canOwnerExtendRetention;

@JsonProperty("max_extension_length")
protected RetentionPolicyMaxExtensionLengthRequest maxExtensionLength;

/**
* Determines if owners and co-owners of items under the policy are notified when the retention
* duration is about to end.
Expand All @@ -97,6 +102,7 @@ protected UpdateRetentionPolicyByIdRequestBody(Builder builder) {
this.retentionLength = builder.retentionLength;
this.status = builder.status;
this.canOwnerExtendRetention = builder.canOwnerExtendRetention;
this.maxExtensionLength = builder.maxExtensionLength;
this.areOwnersNotified = builder.areOwnersNotified;
this.customNotificationRecipients = builder.customNotificationRecipients;
markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
Expand Down Expand Up @@ -130,6 +136,10 @@ public Boolean getCanOwnerExtendRetention() {
return canOwnerExtendRetention;
}

public RetentionPolicyMaxExtensionLengthRequest getMaxExtensionLength() {
return maxExtensionLength;
}

public Boolean getAreOwnersNotified() {
return areOwnersNotified;
}
Expand All @@ -154,6 +164,7 @@ public boolean equals(Object o) {
&& Objects.equals(retentionLength, casted.retentionLength)
&& Objects.equals(status, casted.status)
&& Objects.equals(canOwnerExtendRetention, casted.canOwnerExtendRetention)
&& Objects.equals(maxExtensionLength, casted.maxExtensionLength)
&& Objects.equals(areOwnersNotified, casted.areOwnersNotified)
&& Objects.equals(customNotificationRecipients, casted.customNotificationRecipients);
}
Expand All @@ -168,6 +179,7 @@ public int hashCode() {
retentionLength,
status,
canOwnerExtendRetention,
maxExtensionLength,
areOwnersNotified,
customNotificationRecipients);
}
Expand Down Expand Up @@ -203,6 +215,10 @@ public String toString() {
+ canOwnerExtendRetention
+ '\''
+ ", "
+ "maxExtensionLength='"
+ maxExtensionLength
+ '\''
+ ", "
+ "areOwnersNotified='"
+ areOwnersNotified
+ '\''
Expand All @@ -229,6 +245,8 @@ public static class Builder extends NullableFieldTracker {

protected Boolean canOwnerExtendRetention;

protected RetentionPolicyMaxExtensionLengthRequest maxExtensionLength;

protected Boolean areOwnersNotified;

protected List<UserBase> customNotificationRecipients;
Expand Down Expand Up @@ -286,6 +304,27 @@ public Builder canOwnerExtendRetention(Boolean canOwnerExtendRetention) {
return this;
}

public Builder maxExtensionLength(
RetentionPolicyMaxExtensionLengthRequestEnum maxExtensionLength) {
this.maxExtensionLength = new RetentionPolicyMaxExtensionLengthRequest(maxExtensionLength);
return this;
}

public Builder maxExtensionLength(String maxExtensionLength) {
this.maxExtensionLength = new RetentionPolicyMaxExtensionLengthRequest(maxExtensionLength);
return this;
}

public Builder maxExtensionLength(int maxExtensionLength) {
this.maxExtensionLength = new RetentionPolicyMaxExtensionLengthRequest(maxExtensionLength);
return this;
}

public Builder maxExtensionLength(RetentionPolicyMaxExtensionLengthRequest maxExtensionLength) {
this.maxExtensionLength = maxExtensionLength;
return this;
}

public Builder areOwnersNotified(Boolean areOwnersNotified) {
this.areOwnersNotified = areOwnersNotified;
this.markNullableFieldAsSet("are_owners_notified");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ public class DeleteUserByIdQueryParams {
/** Whether the user will receive email notification of the deletion. */
public Boolean notify;

/**
* Specifies whether to delete the user even if they still own files, were recently active, or
* recently joined the enterprise from a free account.
*/
/** Specifies whether to delete the user even if they still own files. */
public Boolean force;

public DeleteUserByIdQueryParams() {}
Expand Down
24 changes: 12 additions & 12 deletions src/main/java/com/box/sdkgen/managers/users/UsersManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -477,9 +477,9 @@ public UserFull updateUserById(
}

/**
* Deletes a user. By default, this operation fails if the user still owns any content, was
* recently active, or recently joined the enterprise from a free account. To proceed, move their
* owned content first, or use the `force` parameter to delete the user and their files.
* Deletes a user. By default, this operation fails if the user still owns any content. To
* proceed, move their owned content first, or use the `force` parameter to delete the user and
* their files.
*
* @param userId The ID of the user. Example: "12345"
*/
Expand All @@ -488,9 +488,9 @@ public void deleteUserById(String userId) {
}

/**
* Deletes a user. By default, this operation fails if the user still owns any content, was
* recently active, or recently joined the enterprise from a free account. To proceed, move their
* owned content first, or use the `force` parameter to delete the user and their files.
* Deletes a user. By default, this operation fails if the user still owns any content. To
* proceed, move their owned content first, or use the `force` parameter to delete the user and
* their files.
*
* @param userId The ID of the user. Example: "12345"
* @param queryParams Query parameters of deleteUserById method
Expand All @@ -500,9 +500,9 @@ public void deleteUserById(String userId, DeleteUserByIdQueryParams queryParams)
}

/**
* Deletes a user. By default, this operation fails if the user still owns any content, was
* recently active, or recently joined the enterprise from a free account. To proceed, move their
* owned content first, or use the `force` parameter to delete the user and their files.
* Deletes a user. By default, this operation fails if the user still owns any content. To
* proceed, move their owned content first, or use the `force` parameter to delete the user and
* their files.
*
* @param userId The ID of the user. Example: "12345"
* @param headers Headers of deleteUserById method
Expand All @@ -512,9 +512,9 @@ public void deleteUserById(String userId, DeleteUserByIdHeaders headers) {
}

/**
* Deletes a user. By default, this operation fails if the user still owns any content, was
* recently active, or recently joined the enterprise from a free account. To proceed, move their
* owned content first, or use the `force` parameter to delete the user and their files.
* Deletes a user. By default, this operation fails if the user still owns any content. To
* proceed, move their owned content first, or use the `force` parameter to delete the user and
* their files.
*
* @param userId The ID of the user. Example: "12345"
* @param queryParams Query parameters of deleteUserById method
Expand Down
Loading
Loading