diff --git a/.codegen.json b/.codegen.json
index 4130666af..1c2091f82 100644
--- a/.codegen.json
+++ b/.codegen.json
@@ -1 +1 @@
-{ "engineHash": "12f2054", "specHash": "5bf3652", "version": "0.1.0" }
+{ "engineHash": "be39be6", "specHash": "bad862d", "version": "0.1.0" }
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index 8117147a7..673dfbff9 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -1,14 +1,14 @@
blank_issues_enabled: false
contact_links:
- name: SDK documentation
- url: https://github.com/box/box-java-sdk-gen/tree/main/docs
+ url: https://github.com/box/box-java-sdk/tree/sdk-gen/docs
about: Before creating an issue, I have checked that the SDK documentation doesn't solve my issue.
- name: API documentation
url: https://developer.box.com/docs
about: Before creating an issue, I have checked that the API documentation doesn't solve my issue.
- name: Box Developer Forums
- url: https://community.box.com/t5/Platform-and-Development-Forum/bd-p/DeveloperForum
+ url: https://community.box.com/box-platform-5
about: Before creating an issue, I have searched the Box Developer Forums and my issue isn't already reported there.
- name: Issues in this repo
- url: https://github.com/box/box-java-sdk-gen/search?type=Issues
+ url: https://github.com/box/box-java-sdk/search?type=Issues
about: Before creating an issue, I have searched Issues in this repo and my issue isn't already reported.
diff --git a/.github/workflows/autoupdate-pr.yml b/.github/workflows/autoupdate-pr.yml
index 185ab949d..080c51c32 100644
--- a/.github/workflows/autoupdate-pr.yml
+++ b/.github/workflows/autoupdate-pr.yml
@@ -2,7 +2,7 @@ name: Autoupdate PR
on:
push:
branches:
- - main
+ - sdk-gen
jobs:
update_pull_requests:
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 61e1b7806..2cfcb2ba9 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -1,10 +1,11 @@
name: build
on:
pull_request:
- types: [opened, synchronize]
+ branches:
+ - sdk-gen
push:
branches:
- - main
+ - sdk-gen
jobs:
build-and-test:
runs-on: ubuntu-latest
diff --git a/.github/workflows/notify-changelog.yml b/.github/workflows/notify-changelog.yml
index b54a043bf..fec9ec4ff 100644
--- a/.github/workflows/notify-changelog.yml
+++ b/.github/workflows/notify-changelog.yml
@@ -24,4 +24,4 @@ jobs:
token: ${{ secrets.DISPATCH_ACCESS_TOKEN }}
repository: box/box-developer-changelog
event-type: new-release-note
- client-payload: '{"ref": "${{ github.ref }}", "repository": "${{github.repository}}", "labels": "sdks,java", "repo_display_name": "Box Java SDK Generated"}'
+ client-payload: '{"ref": "${{ github.ref }}", "repository": "${{github.repository}}", "labels": "sdks,java", "repo_display_name": "Box Java SDK"}'
diff --git a/.github/workflows/semantic-pr.yml b/.github/workflows/semantic-pr.yml
index cbff636c5..de1b2c83c 100644
--- a/.github/workflows/semantic-pr.yml
+++ b/.github/workflows/semantic-pr.yml
@@ -6,6 +6,8 @@ on:
- opened
- edited
- synchronize
+ branches:
+ - sdk-gen
jobs:
main:
diff --git a/.github/workflows/spell-check-lint.yml b/.github/workflows/spell-check-lint.yml
index 659bbd3fa..6bcfc58e4 100644
--- a/.github/workflows/spell-check-lint.yml
+++ b/.github/workflows/spell-check-lint.yml
@@ -3,7 +3,7 @@ on:
pull_request_target:
types: [opened, synchronize, edited]
branches:
- - main
+ - sdk-gen
jobs:
spellcheck-request:
runs-on: ubuntu-latest
diff --git a/README.md b/README.md
index 5cbe15237..1413a3a07 100644
--- a/README.md
+++ b/README.md
@@ -2,15 +2,15 @@
-# Box Java SDK Gen
+# Box Java SDK
[](http://opensource.box.com/badges)
-
-
+
+

-[](https://coveralls.io/github/box/box-java-sdk-gen?branch=main)
+[](https://coveralls.io/github/box/box-java-sdk-gen?branch=sdk-gen)
-We are excited to introduce the Beta Release of the latest generation of Box Java SDK Gen, designed to elevate the developer experience and streamline your integration with the Box Content Cloud.
+We are excited to introduce the stable Release of the latest generation of Box Java SDK, designed to elevate the developer experience and streamline your integration with the Box Content Cloud.
With this SDK, you’ll have access to:
@@ -27,7 +27,7 @@ Embrace the new generation of Box SDKs and unlock the full potential of the Box
-- [Box Java SDK Gen](#box-java-sdk-gen)
+- [Box Java SDK](#box-java-sdk)
- [Table of contents](#table-of-contents)
- [Installing](#installing)
- [Getting Started](#getting-started)
@@ -46,20 +46,12 @@ Embrace the new generation of Box SDKs and unlock the full potential of the Box
# Installing
-To generate a .jar file download the source code and run the following command:
-
-```console
-./gradlew build
-```
-
-.jar file will be generated in the build/libs directory.
-
-The SDK is also available on [Maven Central Repository](https://mvnrepository.com/artifact/com.box/box-java-sdk-gen). To include the SDK in your project, add the following dependency to your `pom.xml` file:
+The SDK is available on [Maven Central Repository](https://mvnrepository.com/artifact/com.box/box-java-sdk). To include the SDK in your project, add the following dependency to your `pom.xml` file:
```xml
com.box
- box-java-sdk-gen
+ box-java-sdk
VERSION
```
@@ -67,10 +59,11 @@ The SDK is also available on [Maven Central Repository](https://mvnrepository.co
To include the SDK in your project using Gradle, add the following dependency to your `build.gradle` file:
```gradle
-implementation 'com.box:box-java-sdk-gen:VERSION'
+implementation 'com.box:box-java-sdk:VERSION'
```
-Where `VERSION` is the version of the SDK you want to use. You can find the latest version in the [Maven Central Repository](https://mvnrepository.com/artifact/com.box/box-java-sdk-gen).
+Where `VERSION` is the version of the SDK you want to use. The next generation of the SDK starts with version `10.0.0`.
+You can find the latest version in the [Maven Central Repository](https://mvnrepository.com/artifact/com.box/box-java-sdk).
# Getting Started
@@ -97,7 +90,7 @@ Browse the [docs](docs/README.md) or see [API Reference](https://developer.box.c
# Upgrades
-The SDK is updated regularly to include new features, enhancements, and bug fixes. If you are upgrading from our legacy SDKs to this new generation SDKs is a straightforward process. Checkout the [migration guide](MIGRATION_GUIDE.md) and [changelog](CHANGELOG.md) for more information.
+The SDK is updated regularly to include new features, enhancements, and bug fixes. If you are upgrading from manual SDK to this new generated SDKm checkout the [migration guide](MIGRATION_GUIDE.md) and [changelog](CHANGELOG.md) for more information.
# Integration Tests
@@ -136,7 +129,7 @@ To run integration tests locally, you can use the following command:
# 3rd Party Libraries & Licenses
-The Java SDK Gen uses third-party libraries that are required for usage. Their licenses are listed below:
+The Java SDK uses third-party libraries that are required for usage. Their licenses are listed below:
1. [jackson-annotations v2.17.2](https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-annotations/2.17.2)
Maven: `com.fasterxml.jackson.core:jackson-annotations:2.17.2`
@@ -175,9 +168,9 @@ The following libraries are required for running tests:
# Questions, Bugs, and Feature Requests?
Need to contact us directly? [Browse the issues
-tickets](https://github.com/box/box-java-sdk-gen/issues)! Or, if that
+tickets](https://github.com/box/box-java-sdk/issues)! Or, if that
doesn't work, [file a new
-one](https://github.com/box/box-java-sdk-gen/issues/new) and we will get
+one](https://github.com/box/box-java-sdk/issues/new) and we will get
back to you. If you have general questions about the Box API, you can
post to the [Box Developer Forum](https://forum.box.com/).
diff --git a/docs/archives.md b/docs/archives.md
index d0a2f7b9c..173edd0c6 100644
--- a/docs/archives.md
+++ b/docs/archives.md
@@ -9,6 +9,8 @@
Retrieves archives for an enterprise.
+To learn more about the archive APIs, see the [Archive API Guide](g://archives).
+
This operation is performed by calling function `getArchivesV2025R0`.
See the endpoint docs at
@@ -38,6 +40,8 @@ Returns a list of archives in the enterprise.
Creates an archive.
+To learn more about the archive APIs, see the [Archive API Guide](g://archives).
+
This operation is performed by calling function `createArchiveV2025R0`.
See the endpoint docs at
@@ -67,6 +71,8 @@ Returns a new archive object.
Permanently deletes an archive.
+To learn more about the archive APIs, see the [Archive API Guide](g://archives).
+
This operation is performed by calling function `deleteArchiveByIdV2025R0`.
See the endpoint docs at
diff --git a/docs/docgen.md b/docs/docgen.md
index d7246e4df..ad7ad936f 100644
--- a/docs/docgen.md
+++ b/docs/docgen.md
@@ -46,7 +46,7 @@ See the endpoint docs at
```
-client.getDocgen().getDocgenJobsV2025R0(new GetDocgenJobsV2025R0QueryParams.Builder().limit(500L).build())
+client.getDocgen().getDocgenJobsV2025R0(new GetDocgenJobsV2025R0QueryParams.Builder().limit(10000L).build())
```
### Arguments
diff --git a/migration-guide.md b/migration-guide.md
index 9c5f5fc47..a38d4f5de 100644
--- a/migration-guide.md
+++ b/migration-guide.md
@@ -1,4 +1,4 @@
-# Migration guide from `box-java-sdk` to `box-java-sdk-gen`
+# Migration guide from v4 to v10 version of `box-java-sdk`
@@ -31,58 +31,64 @@
- [As-User header](#as-user-header)
- [Custom Base URLs](#custom-base-urls)
- [Convenience methods](#convenience-methods)
+ - [Webhook validation](#webhook-validation)
- [Chunked upload of big files](#chunked-upload-of-big-files)
## Introduction
-The new `box-java-sdk-gen` SDK library, which helps Java developers to conveniently integrate with Box API.
-In the contrary to the previous library (`box-java-sdk`), it is not manually maintained, but auto-generated
+The v10 release of `box-java-sdk` library helps Java developers to conveniently integrate with Box API.
+In the contrary to the previous versions (v4 or lower), it is not manually maintained, but auto-generated
based on Open API Specification. This means you can leverage the most up-to-date Box API features in your
-applications without delay. More information and benefits of using the new can be found in the
-[README](https://github.com/box/box-java-sdk-gen/blob/main/README.md) file.
+applications without delay. We introduced this major version bump to reflect the significant codebase changes
+and to align with other Box SDKs, which will also adopt generated code starting from their v10 releases.
+More information and benefits of using the new can be found in the
+[README](https://github.com/box/box-java-sdk/blob/sdk-gen/README.md) file.
## Installation
-To install a new Box Java SDK GENERATED library, you can use Maven or Gradle. The library is available in the
-[Maven Central Repository](https://search.maven.org/artifact/com.box/box-java-sdk-gen).
+To install v10 version of Box Java SDK, you can use Maven or Gradle. The library is available in the
+[Maven Central Repository](https://search.maven.org/artifact/com.box/box-java-sdk).
-The new Box Java SDK GENERATED library could be used in the same project along with the legacy one.
-If you want to use a feature available only in the new SDK, you don't need to necessarily migrate all your code
-to use Box Java SDK GENERATED at once. You can use a new feature from the new library,
+Soon we are going to introduce v5 version of Box Java SDK that will combine package `com.box.sdk` from
+v4 and `com.box.sdkgen` from v10 of the SDK so that code from both versions could be used in the same project.
+If you would like to use a feature available only in the new SDK, you won't need to necessarily migrate all your code
+to use generated SDK at once. You will be able to use a new feature from the `com.box.sdkgen` package,
while keeping the rest of your code unchanged. Note that it may be required to use fully qualified class names
-from the new SDK to avoid conflicts with the old one. However, we recommend to fully migrate to the new SDK eventually.
+to avoid conflicts between two packages. However, we recommend to fully migrate to the v10 of the SDK eventually.
### Maven
-To add a dependency to your Maven project, add the following to your `pom.xml` file:
+To start using generated version of the SDK in you Maven project just bump the version of the Box Java SDK library
+in `pom.xml`to 10.0.0 or higher:
```xml
com.box
- box-java-sdk-gen
- VERSION
+ box-java-sdk
+ 10.0.0
```
### Gradle
-To add a dependency to your Gradle project, add the following to your `build.gradle` file:
+To bump a dependency in your Gradle project, bump the version useed in your `build.gradle` file:
```groovy
-implementation 'com.box:box-java-sdk-gen:VERSION'
+implementation 'com.box:box-java-sdk:10.0.0'
```
## Key differences
### Manager approach
-The main difference between the old SDK and the new one is the way how API methods are aggregated into objects.
+The main difference between the manual v4 version of the SDK and the nextgen generated one,
+is the way how API methods are aggregated into objects.
-**Old (`box-java-sdk`)**
+**Old (`v4`)**
-Firstly, in the old SDK to be able to perform any action on an API object, e.g. `User`, you first had to create its class.
+Firstly, in the v4 version of the SDK to be able to perform any action on an API object, e.g. `User`, you first had to create its class.
To do it is required to call:
```java
@@ -104,9 +110,9 @@ info.setName(name);
user.updateInfo(info);
```
-**New (`box-java-sdk-gen`)**
+**New (`v10`)**
-In the new SDK the API methods are grouped into dedicated manager classes, e.g. `User` object
+In the v10 version of the SDK the API methods are grouped into dedicated manager classes, e.g. `User` object
has dedicated `UserManager` class. Each manager class instance is available in `BoxClient` object.
The fields storing references to the managers are named in the plural form of the resource that the
manager handles - `client.users` for `UsersManager`. If you want to perform any operation
@@ -138,12 +144,12 @@ UserFull updatedUser = client.users.updateUserById(user.getId(), requestBody);
### Immutable design
-The new SDK is designed to be mostly immutable. This means that methods,
-which used to modify the existing object in old SDK now return a new instance of the class with the modified state.
+The v10 is designed to be mostly immutable. This means that methods,
+which used to modify the existing object in v4 release now return a new instance of the class with the modified state.
This design pattern is used to avoid side effects and make the code more predictable and easier to reason about.
Methods, which returns a new modified instance of an object, will always have a prefix `with` in their names, e.g.
-**New (`box-java-sdk-gen`)**
+**New (`v10`)**
```java
BoxClient client = new BoxClient(auth);
@@ -154,9 +160,9 @@ BoxClient asUserClient = client.withAsUserHeader("USER_ID");
To facilitate easier work with the new SDK, we have changed the API method signatures to be consistent and unified.
-**Old (`box-java-sdk`)**
+**Old (`v4`)**
-In the old SDK, API methods had numerous parameters, which were not grouped into any objects and were passed as separate arguments, e.g. the method for creating a sign request looked like this:
+In the manual version, API methods had numerous parameters, which were not grouped into any objects and were passed as separate arguments, e.g. the method for creating a sign request looked like this:
```java
public static BoxSignRequest.Info createSignRequest(BoxAPIConnection api, List sourceFiles,
@@ -164,9 +170,9 @@ public static BoxSignRequest.Info createSignRequest(BoxAPIConnection api, List() {{
### Custom Base URLs
-**Old (`box-java-sdk`)**
+**Old (`v4`)**
-In old SDK you could specify the custom base URLs, which will be used for API calls made by setting
+In v4 you could specify the custom base URLs, which will be used for API calls made by setting
the new values of static variables of the `API` class.
```java
@@ -545,9 +552,9 @@ api.setUploadURL("https://upload.example.com");
api.setTokenURL("https://example.com/token");
```
-**New (`box-java-sdk-gen`)**
+**New (`v10`)**
-In the new SDK this functionality has been implemented as part of the `BoxClient` class.
+Inv10 this functionality has been implemented as part of the `BoxClient` class.
By calling the `client.withCustomBaseUrls()` method, you can specify the custom base URLs that will be used for API
calls made by client. Following the immutability pattern, this call creates a new client, leaving the original client unmodified.
@@ -562,14 +569,102 @@ BoxClient clientWithCustomBaseUrl = client.withCustomBaseUrls(baseUrls);
## Convenience methods
+### Webhook validation
+
+Webhook validation is used to validate a webhook message by verifying the signature and the delivery timestamp.
+
+**Old (`v4`)**
+
+In v4, when you receive a webhook message from Box, to validate that it actually came from Box
+you need to call `BoxWebHookSignatureVerifier#verify(String sigVersion, String sigAlgorithm, String primarySignature, String secondarySignature, String payload, String deliveryTimestamp)` method.
+It would return a `boolean` value indicating whether the message was valid.
+
+```java
+// Webhook message contents are shown for demonstration purposes
+// Normally these would come from your HTTP handler
+
+// Webhook message HTTP body
+String messagePayload = "{"
++ "\"type\":\"webhook_event","
++ "\"webhook\":{"
++ "\"id\":\"1234567890\""
++ "},"
++ "\"trigger\":\"FILE.UPLOADED\","
++ "\"source\":{"
++ "\"id\":\"1234567890\","
++ "\"type\":\"file\","
++ "\"name\":\"Test.txt\""
++ "}}";
+
+// Webhook message HTTP headers
+Map messageHeaders = new HashMap();
+headers.put("BOX-DELIVERY-ID", "f96bb54b-ee16-4fc5-aa65-8c2d9e5b546f");
+headers.put("BOX-DELIVERY-TIMESTAMP", "2020-01-01T00:00:00-07:00");
+headers.put("BOX-SIGNATURE-ALGORITHM", "HmacSHA256");
+headers.put("BOX-SIGNATURE-PRIMARY", "6TfeAW3A1PASkgboxxA5yqHNKOwFyMWuEXny/FPD5hI=");
+headers.put("BOX-SIGNATURE-SECONDARY", "v+1CD1Jdo3muIcbpv5lxxgPglOqMfsNHPV899xWYydo=");
+headers.put("BOX-SIGNATURE-VERSION", "1");
+
+// Your application's webhook keys, obtained from the Box Developer Console
+String primaryKey = "4py2I9eSFb0ezXH5iPeQRcFK1LRLCdip";
+String secondaryKey = "Aq5EEEjAu4ssbz8n9UMu7EerI0LKj2TL";
+
+BoxWebHookSignatureVerifier verifier = new BoxWebHookSignatureVerifier(primaryKey, secondaryKey);
+boolean isValidMessage = verifier.verify(
+ headers.get("BOX-SIGNATURE-VERSION"),
+ headers.get("BOX-SIGNATURE-ALGORITHM"),
+ headers.get("BOX-SIGNATURE-PRIMARY"),
+ headers.get("BOX-SIGNATURE-SECONDARY"),
+ messagePayload,
+ headers.get("BOX-DELIVERY-TIMESTAMP")
+);
+```
+
+**New (`v10`)**
+
+In the v10 version of ths SDK, the `WebhooksManager.validateMessage()` method requires the `messagePayload` to be of type `string`,
+map of headers to be of type `Map`, and the primary and secondary keys to be of type `String`.
+
+```java
+// Webhook message HTTP body
+String messagePayload = "{"
+ + "\"type\":\"webhook_event","
+ + "\"webhook\":{"
+ + "\"id\":\"1234567890\""
+ + "},"
+ + "\"trigger\":\"FILE.UPLOADED\","
+ + "\"source\":{"
+ + "\"id\":\"1234567890\","
+ + "\"type\":\"file\","
+ + "\"name\":\"Test.txt\""
+ + "}}";
+
+// Webhook message HTTP headers
+Map messageHeaders = new HashMap();
+headers.put("BOX-DELIVERY-ID", "f96bb54b-ee16-4fc5-aa65-8c2d9e5b546f");
+headers.put("BOX-DELIVERY-TIMESTAMP", "2020-01-01T00:00:00-07:00");
+headers.put("BOX-SIGNATURE-ALGORITHM", "HmacSHA256");
+headers.put("BOX-SIGNATURE-PRIMARY", "6TfeAW3A1PASkgboxxA5yqHNKOwFyMWuEXny/FPD5hI=");
+headers.put("BOX-SIGNATURE-SECONDARY", "v+1CD1Jdo3muIcbpv5lxxgPglOqMfsNHPV899xWYydo=");
+headers.put("BOX-SIGNATURE-VERSION", "1");
+
+// Your application's webhook keys, obtained from the Box Developer Console
+String primaryKey = "4py2I9eSFb0ezXH5iPeQRcFK1LRLCdip";
+String secondaryKey = "Aq5EEEjAu4ssbz8n9UMu7EerI0LKj2TL";
+
+boolean isValidMessage = WebhooksManager.validateMessage(
+ messagePayload, messageHeaders, primaryKey, secondaryKey);
+)
+```
+
### Chunked upload of big files
For large files or in cases where the network connection is less reliable, you may want to upload the file in parts.
This allows a single part to fail without aborting the entire upload, and failed parts are being retried automatically.
-**Old (`box-java-sdk`)**
+**Old (`v4`)**
-In the old SDK, you could use the `uploadLargeFile` method of the `BoxFolder` class to upload a large file.
+In the v4, you could use the `uploadLargeFile` method of the `BoxFolder` class to upload a large file.
This method accepted a `FileInputStream` as the input stream and the file size as a parameter. The method also required
```java
@@ -580,9 +675,9 @@ BoxFolder rootFolder = BoxFolder.getRootFolder(api);
BoxFile.Info fileInfo = rootFolder.uploadLargeFile(inputStream, "My_Large_File.txt", myFile.length());
```
-**New (`box-java-sdk-gen`)**
+**New (`v10`)**
-In the new SDK, the equivalent method is `chunked_uploads.uploadBigFile()`. It accepts a file-like object
+In the v10, the equivalent method is `chunked_uploads.uploadBigFile()`. It accepts a file-like object
as the `file` parameter, and the `fileName` and `fileSize` parameters are now passed as arguments.
The `parentFolderId` parameter is also required to specify the folder where the file will be uploaded.
diff --git a/src/main/java/com/box/sdkgen/schemas/v2025r0/userreferencev2025r0/UserReferenceV2025R0.java b/src/main/java/com/box/sdkgen/schemas/v2025r0/userreferencev2025r0/UserReferenceV2025R0.java
new file mode 100644
index 000000000..f47964532
--- /dev/null
+++ b/src/main/java/com/box/sdkgen/schemas/v2025r0/userreferencev2025r0/UserReferenceV2025R0.java
@@ -0,0 +1,93 @@
+package com.box.sdkgen.schemas.v2025r0.userreferencev2025r0;
+
+import com.box.sdkgen.internal.NullableFieldTracker;
+import com.box.sdkgen.internal.SerializableObject;
+import com.box.sdkgen.serialization.json.EnumWrapper;
+import com.fasterxml.jackson.annotation.JsonFilter;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import java.util.Objects;
+
+@JsonFilter("nullablePropertyFilter")
+public class UserReferenceV2025R0 extends SerializableObject {
+
+ @JsonDeserialize(
+ using = UserReferenceV2025R0TypeField.UserReferenceV2025R0TypeFieldDeserializer.class)
+ @JsonSerialize(
+ using = UserReferenceV2025R0TypeField.UserReferenceV2025R0TypeFieldSerializer.class)
+ protected EnumWrapper type;
+
+ protected final String id;
+
+ public UserReferenceV2025R0(@JsonProperty("id") String id) {
+ super();
+ this.id = id;
+ this.type = new EnumWrapper(UserReferenceV2025R0TypeField.USER);
+ }
+
+ protected UserReferenceV2025R0(Builder builder) {
+ super();
+ this.type = builder.type;
+ this.id = builder.id;
+ markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
+ }
+
+ public EnumWrapper getType() {
+ return type;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ UserReferenceV2025R0 casted = (UserReferenceV2025R0) o;
+ return Objects.equals(type, casted.type) && Objects.equals(id, casted.id);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(type, id);
+ }
+
+ @Override
+ public String toString() {
+ return "UserReferenceV2025R0{" + "type='" + type + '\'' + ", " + "id='" + id + '\'' + "}";
+ }
+
+ public static class Builder extends NullableFieldTracker {
+
+ protected EnumWrapper type;
+
+ protected final String id;
+
+ public Builder(String id) {
+ super();
+ this.id = id;
+ this.type =
+ new EnumWrapper(UserReferenceV2025R0TypeField.USER);
+ }
+
+ public Builder type(UserReferenceV2025R0TypeField type) {
+ this.type = new EnumWrapper(type);
+ return this;
+ }
+
+ public Builder type(EnumWrapper type) {
+ this.type = type;
+ return this;
+ }
+
+ public UserReferenceV2025R0 build() {
+ return new UserReferenceV2025R0(this);
+ }
+ }
+}
diff --git a/src/main/java/com/box/sdkgen/schemas/v2025r0/userreferencev2025r0/UserReferenceV2025R0TypeField.java b/src/main/java/com/box/sdkgen/schemas/v2025r0/userreferencev2025r0/UserReferenceV2025R0TypeField.java
new file mode 100644
index 000000000..e930f325a
--- /dev/null
+++ b/src/main/java/com/box/sdkgen/schemas/v2025r0/userreferencev2025r0/UserReferenceV2025R0TypeField.java
@@ -0,0 +1,62 @@
+package com.box.sdkgen.schemas.v2025r0.userreferencev2025r0;
+
+import com.box.sdkgen.serialization.json.EnumWrapper;
+import com.box.sdkgen.serialization.json.Valuable;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.JsonDeserializer;
+import com.fasterxml.jackson.databind.JsonSerializer;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import java.io.IOException;
+import java.util.Arrays;
+
+public enum UserReferenceV2025R0TypeField implements Valuable {
+ USER("user");
+
+ private final String value;
+
+ UserReferenceV2025R0TypeField(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public static class UserReferenceV2025R0TypeFieldDeserializer
+ extends JsonDeserializer> {
+
+ public UserReferenceV2025R0TypeFieldDeserializer() {
+ super();
+ }
+
+ @Override
+ public EnumWrapper deserialize(
+ JsonParser p, DeserializationContext ctxt) throws IOException {
+ String value = p.getValueAsString();
+ return Arrays.stream(UserReferenceV2025R0TypeField.values())
+ .filter((v) -> v.getValue().equalsIgnoreCase(value))
+ .findFirst()
+ .map(EnumWrapper::new)
+ .orElse(new EnumWrapper(value));
+ }
+ }
+
+ public static class UserReferenceV2025R0TypeFieldSerializer
+ extends JsonSerializer> {
+
+ public UserReferenceV2025R0TypeFieldSerializer() {
+ super();
+ }
+
+ @Override
+ public void serialize(
+ EnumWrapper value,
+ JsonGenerator gen,
+ SerializerProvider serializers)
+ throws IOException {
+ gen.writeString(value.getStringValue());
+ }
+ }
+}
diff --git a/src/test/java/com/box/sdkgen/test/docgen/DocgenITest.java b/src/test/java/com/box/sdkgen/test/docgen/DocgenITest.java
index bc0b96787..dd05c2df5 100644
--- a/src/test/java/com/box/sdkgen/test/docgen/DocgenITest.java
+++ b/src/test/java/com/box/sdkgen/test/docgen/DocgenITest.java
@@ -71,7 +71,7 @@ public void testDocgenBatchAndJobs() {
client
.getDocgen()
.getDocgenJobsV2025R0(
- new GetDocgenJobsV2025R0QueryParams.Builder().limit(500L).build());
+ new GetDocgenJobsV2025R0QueryParams.Builder().limit(10000L).build());
assert docgenJobs.getEntries().size() >= 1;
assert !(docgenJobs.getEntries().get(0).getBatch().getId().equals(""));
assert !(docgenJobs.getEntries().get(0).getCreatedBy().getId().equals(""));
@@ -87,7 +87,7 @@ assert convertToString(docgenJobs.getEntries().get(0).getTemplateFileVersion().g
.equals("file_version");
assert !(docgenJobs.getEntries().get(0).getTemplateFileVersion().getId().equals(""));
assert convertToString(docgenJobs.getEntries().get(0).getType()).equals("docgen_job");
- int indexOfItem = 0;
+ int indexOfItem = docgenJobs.getEntries().size() - 1;
DocGenJobFullV2025R0 docgenJobItemFromList = docgenJobs.getEntries().get(indexOfItem);
DocGenJobV2025R0 docgenJob =
client.getDocgen().getDocgenJobByIdV2025R0(docgenJobItemFromList.getId());