Skip to content
Closed
2 changes: 1 addition & 1 deletion .codegen.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "engineHash": "12f2054", "specHash": "5bf3652", "version": "0.1.0" }
{ "engineHash": "d914301", "specHash": "9ccadb1", "version": "0.1.0" }
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion .github/workflows/autoupdate-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Autoupdate PR
on:
push:
branches:
- main
- sdk-gen

jobs:
update_pull_requests:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/notify-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"}'
2 changes: 2 additions & 0 deletions .github/workflows/semantic-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
- opened
- edited
- synchronize
branches:
- sdk-gen

jobs:
main:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/spell-check-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request_target:
types: [opened, synchronize, edited]
branches:
- main
- sdk-gen
jobs:
spellcheck-request:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion docs/docgen.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ See the endpoint docs at

<!-- sample get_docgen_jobs_v2025.0 -->
```
client.getDocgen().getDocgenJobsV2025R0(new GetDocgenJobsV2025R0QueryParams.Builder().limit(500L).build())
client.getDocgen().getDocgenJobsV2025R0(new GetDocgenJobsV2025R0QueryParams.Builder().limit(10000L).build())
```

### Arguments
Expand Down
Original file line number Diff line number Diff line change
@@ -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<UserReferenceV2025R0TypeField> type;

protected final String id;

public UserReferenceV2025R0(@JsonProperty("id") String id) {
super();
this.id = id;
this.type = new EnumWrapper<UserReferenceV2025R0TypeField>(UserReferenceV2025R0TypeField.USER);
}

protected UserReferenceV2025R0(Builder builder) {
super();
this.type = builder.type;
this.id = builder.id;
markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
}

public EnumWrapper<UserReferenceV2025R0TypeField> 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<UserReferenceV2025R0TypeField> type;

protected final String id;

public Builder(String id) {
super();
this.id = id;
this.type =
new EnumWrapper<UserReferenceV2025R0TypeField>(UserReferenceV2025R0TypeField.USER);
}

public Builder type(UserReferenceV2025R0TypeField type) {
this.type = new EnumWrapper<UserReferenceV2025R0TypeField>(type);
return this;
}

public Builder type(EnumWrapper<UserReferenceV2025R0TypeField> type) {
this.type = type;
return this;
}

public UserReferenceV2025R0 build() {
return new UserReferenceV2025R0(this);
}
}
}
Original file line number Diff line number Diff line change
@@ -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<EnumWrapper<UserReferenceV2025R0TypeField>> {

public UserReferenceV2025R0TypeFieldDeserializer() {
super();
}

@Override
public EnumWrapper<UserReferenceV2025R0TypeField> 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<UserReferenceV2025R0TypeField>(value));
}
}

public static class UserReferenceV2025R0TypeFieldSerializer
extends JsonSerializer<EnumWrapper<UserReferenceV2025R0TypeField>> {

public UserReferenceV2025R0TypeFieldSerializer() {
super();
}

@Override
public void serialize(
EnumWrapper<UserReferenceV2025R0TypeField> value,
JsonGenerator gen,
SerializerProvider serializers)
throws IOException {
gen.writeString(value.getStringValue());
}
}
}
4 changes: 2 additions & 2 deletions src/test/java/com/box/sdkgen/test/docgen/DocgenITest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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(""));
Expand All @@ -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());
Expand Down