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
The table of contents is too big for display.
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": "9ec9ae4", "specHash": "ccdb456", "version": "5.3.0" }
{ "engineHash": "406023b", "specHash": "ccdb456", "version": "5.3.0" }
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ public Builder(int lastIndex, List<UploadPart> parts, long fileSize, Hash fileHa
this.parts = parts;
this.fileSize = fileSize;
this.fileHash = fileHash;
this.uploadPartUrl = "";
this.uploadSessionId = "";
}

public Builder uploadPartUrl(String uploadPartUrl) {
Expand All @@ -94,6 +92,12 @@ public Builder uploadSessionId(String uploadSessionId) {
}

public TestPartAccumulator build() {
if (this.uploadPartUrl == null) {
this.uploadPartUrl = "";
}
if (this.uploadSessionId == null) {
this.uploadSessionId = "";
}
return new TestPartAccumulator(this);
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/com/box/sdkgen/box/ccgauth/CCGConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ public static class Builder {
public Builder(String clientId, String clientSecret) {
this.clientId = clientId;
this.clientSecret = clientSecret;
this.tokenStorage = new InMemoryTokenStorage();
}

public Builder enterpriseId(String enterpriseId) {
Expand All @@ -94,6 +93,9 @@ public Builder tokenStorage(TokenStorage tokenStorage) {
}

public CCGConfig build() {
if (this.tokenStorage == null) {
this.tokenStorage = new InMemoryTokenStorage();
}
return new CCGConfig(this);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ public static class Builder {

public Builder(String token) {
this.token = token;
this.config = new DeveloperTokenConfig();
}

public Builder config(DeveloperTokenConfig config) {
Expand All @@ -180,6 +179,9 @@ public Builder config(DeveloperTokenConfig config) {
}

public BoxDeveloperTokenAuth build() {
if (this.config == null) {
this.config = new DeveloperTokenConfig();
}
return new BoxDeveloperTokenAuth(this);
}
}
Expand Down
12 changes: 9 additions & 3 deletions src/main/java/com/box/sdkgen/box/jwtauth/JWTConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,6 @@ public Builder(
this.jwtKeyId = jwtKeyId;
this.privateKey = privateKey;
this.privateKeyPassphrase = privateKeyPassphrase;
this.algorithm = new EnumWrapper<JwtAlgorithm>(JwtAlgorithm.RS256);
this.tokenStorage = new InMemoryTokenStorage();
this.privateKeyDecryptor = new DefaultPrivateKeyDecryptor();
}

public Builder enterpriseId(String enterpriseId) {
Expand Down Expand Up @@ -301,6 +298,15 @@ public Builder privateKeyDecryptor(PrivateKeyDecryptor privateKeyDecryptor) {
}

public JWTConfig build() {
if (this.algorithm == null) {
this.algorithm = new EnumWrapper<JwtAlgorithm>(JwtAlgorithm.RS256);
}
if (this.tokenStorage == null) {
this.tokenStorage = new InMemoryTokenStorage();
}
if (this.privateKeyDecryptor == null) {
this.privateKeyDecryptor = new DefaultPrivateKeyDecryptor();
}
return new JWTConfig(this);
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/com/box/sdkgen/box/oauth/OAuthConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public static class Builder {
public Builder(String clientId, String clientSecret) {
this.clientId = clientId;
this.clientSecret = clientSecret;
this.tokenStorage = new InMemoryTokenStorage();
}

public Builder tokenStorage(TokenStorage tokenStorage) {
Expand All @@ -55,6 +54,9 @@ public Builder tokenStorage(TokenStorage tokenStorage) {
}

public OAuthConfig build() {
if (this.tokenStorage == null) {
this.tokenStorage = new InMemoryTokenStorage();
}
return new OAuthConfig(this);
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/com/box/sdkgen/client/BoxClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -1402,7 +1402,6 @@ public static class Builder {

public Builder(Authentication auth) {
this.auth = auth;
this.networkSession = new NetworkSession.Builder().baseUrls(new BaseUrls()).build();
}

public Builder networkSession(NetworkSession networkSession) {
Expand All @@ -1411,6 +1410,9 @@ public Builder networkSession(NetworkSession networkSession) {
}

public BoxClient build() {
if (this.networkSession == null) {
this.networkSession = new NetworkSession.Builder().baseUrls(new BaseUrls()).build();
}
return new BoxClient(this);
}
}
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/com/box/sdkgen/managers/ai/AiManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,7 @@ public static class Builder {

protected NetworkSession networkSession;

public Builder() {
this.networkSession = new NetworkSession();
}
public Builder() {}

public Builder auth(Authentication auth) {
this.auth = auth;
Expand All @@ -291,6 +289,9 @@ public Builder networkSession(NetworkSession networkSession) {
}

public AiManager build() {
if (this.networkSession == null) {
this.networkSession = new NetworkSession();
}
return new AiManager(this);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,17 @@ public static class Builder {

protected Map<String, String> extraHeaders;

public Builder() {
this.extraHeaders = mapOf();
}
public Builder() {}

public Builder extraHeaders(Map<String, String> extraHeaders) {
this.extraHeaders = extraHeaders;
return this;
}

public CreateAiAskHeaders build() {
if (this.extraHeaders == null) {
this.extraHeaders = mapOf();
}
return new CreateAiAskHeaders(this);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,17 @@ public static class Builder {

protected Map<String, String> extraHeaders;

public Builder() {
this.extraHeaders = mapOf();
}
public Builder() {}

public Builder extraHeaders(Map<String, String> extraHeaders) {
this.extraHeaders = extraHeaders;
return this;
}

public CreateAiExtractHeaders build() {
if (this.extraHeaders == null) {
this.extraHeaders = mapOf();
}
return new CreateAiExtractHeaders(this);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,17 @@ public static class Builder {

protected Map<String, String> extraHeaders;

public Builder() {
this.extraHeaders = mapOf();
}
public Builder() {}

public Builder extraHeaders(Map<String, String> extraHeaders) {
this.extraHeaders = extraHeaders;
return this;
}

public CreateAiExtractStructuredHeaders build() {
if (this.extraHeaders == null) {
this.extraHeaders = mapOf();
}
return new CreateAiExtractStructuredHeaders(this);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,17 @@ public static class Builder {

protected Map<String, String> extraHeaders;

public Builder() {
this.extraHeaders = mapOf();
}
public Builder() {}

public Builder extraHeaders(Map<String, String> extraHeaders) {
this.extraHeaders = extraHeaders;
return this;
}

public CreateAiTextGenHeaders build() {
if (this.extraHeaders == null) {
this.extraHeaders = mapOf();
}
return new CreateAiTextGenHeaders(this);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,17 @@ public static class Builder {

protected Map<String, String> extraHeaders;

public Builder() {
this.extraHeaders = mapOf();
}
public Builder() {}

public Builder extraHeaders(Map<String, String> extraHeaders) {
this.extraHeaders = extraHeaders;
return this;
}

public GetAiAgentDefaultConfigHeaders build() {
if (this.extraHeaders == null) {
this.extraHeaders = mapOf();
}
return new GetAiAgentDefaultConfigHeaders(this);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,7 @@ public static class Builder {

protected NetworkSession networkSession;

public Builder() {
this.networkSession = new NetworkSession();
}
public Builder() {}

public Builder auth(Authentication auth) {
this.auth = auth;
Expand All @@ -295,6 +293,9 @@ public Builder networkSession(NetworkSession networkSession) {
}

public AiStudioManager build() {
if (this.networkSession == null) {
this.networkSession = new NetworkSession();
}
return new AiStudioManager(this);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,17 @@ public static class Builder {

protected Map<String, String> extraHeaders;

public Builder() {
this.extraHeaders = mapOf();
}
public Builder() {}

public Builder extraHeaders(Map<String, String> extraHeaders) {
this.extraHeaders = extraHeaders;
return this;
}

public CreateAiAgentHeaders build() {
if (this.extraHeaders == null) {
this.extraHeaders = mapOf();
}
return new CreateAiAgentHeaders(this);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,17 @@ public static class Builder {

protected Map<String, String> extraHeaders;

public Builder() {
this.extraHeaders = mapOf();
}
public Builder() {}

public Builder extraHeaders(Map<String, String> extraHeaders) {
this.extraHeaders = extraHeaders;
return this;
}

public DeleteAiAgentByIdHeaders build() {
if (this.extraHeaders == null) {
this.extraHeaders = mapOf();
}
return new DeleteAiAgentByIdHeaders(this);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,17 @@ public static class Builder {

protected Map<String, String> extraHeaders;

public Builder() {
this.extraHeaders = mapOf();
}
public Builder() {}

public Builder extraHeaders(Map<String, String> extraHeaders) {
this.extraHeaders = extraHeaders;
return this;
}

public GetAiAgentByIdHeaders build() {
if (this.extraHeaders == null) {
this.extraHeaders = mapOf();
}
return new GetAiAgentByIdHeaders(this);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,17 @@ public static class Builder {

protected Map<String, String> extraHeaders;

public Builder() {
this.extraHeaders = mapOf();
}
public Builder() {}

public Builder extraHeaders(Map<String, String> extraHeaders) {
this.extraHeaders = extraHeaders;
return this;
}

public GetAiAgentsHeaders build() {
if (this.extraHeaders == null) {
this.extraHeaders = mapOf();
}
return new GetAiAgentsHeaders(this);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,17 @@ public static class Builder {

protected Map<String, String> extraHeaders;

public Builder() {
this.extraHeaders = mapOf();
}
public Builder() {}

public Builder extraHeaders(Map<String, String> extraHeaders) {
this.extraHeaders = extraHeaders;
return this;
}

public UpdateAiAgentByIdHeaders build() {
if (this.extraHeaders == null) {
this.extraHeaders = mapOf();
}
return new UpdateAiAgentByIdHeaders(this);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,7 @@ public static class Builder {

protected NetworkSession networkSession;

public Builder() {
this.networkSession = new NetworkSession();
}
public Builder() {}

public Builder auth(Authentication auth) {
this.auth = auth;
Expand All @@ -259,6 +257,9 @@ public Builder networkSession(NetworkSession networkSession) {
}

public AppItemAssociationsManager build() {
if (this.networkSession == null) {
this.networkSession = new NetworkSession();
}
return new AppItemAssociationsManager(this);
}
}
Expand Down
Loading