Skip to content
Closed
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": "12f2054", "specHash": "5bf3652", "version": "0.1.0" }
{ "engineHash": "47ff60c", "specHash": "d068f97", "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
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ the SDK are available by topic:
* [Downloads](downloads.md)
* [Emailaliases](emailaliases.md)
* [Events](events.md)
* [Externalusers](externalusers.md)
* [Fileclassifications](fileclassifications.md)
* [Filemetadata](filemetadata.md)
* [Filerequests](filerequests.md)
Expand Down
32 changes: 32 additions & 0 deletions docs/externalusers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# ExternalUsersManager


- [Submit job to delete external users](#submit-job-to-delete-external-users)

## Submit job to delete external users

Delete external users from current user enterprise. This will remove each
external user from all invited collaborations within the current enterprise.

This operation is performed by calling function `createExternalUserSubmitDeleteJobV2025R0`.

See the endpoint docs at
[API Reference](https://developer.box.com/reference/v2025.0/post-external-users-submit-delete-job/).

*Currently we don't have an example for calling `createExternalUserSubmitDeleteJobV2025R0` in integration tests*

### Arguments

- requestBody `ExternalUsersSubmitDeleteJobRequestV2025R0`
- Request body of createExternalUserSubmitDeleteJobV2025R0 method
- headers `CreateExternalUserSubmitDeleteJobV2025R0Headers`
- Headers of createExternalUserSubmitDeleteJobV2025R0 method


### Returns

This function returns a value of type `ExternalUsersSubmitDeleteJobResponseV2025R0`.




17 changes: 17 additions & 0 deletions src/main/java/com/box/sdkgen/client/BoxClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import com.box.sdkgen.managers.downloads.DownloadsManager;
import com.box.sdkgen.managers.emailaliases.EmailAliasesManager;
import com.box.sdkgen.managers.events.EventsManager;
import com.box.sdkgen.managers.externalusers.ExternalUsersManager;
import com.box.sdkgen.managers.fileclassifications.FileClassificationsManager;
import com.box.sdkgen.managers.filemetadata.FileMetadataManager;
import com.box.sdkgen.managers.filerequests.FileRequestsManager;
Expand Down Expand Up @@ -256,6 +257,8 @@ public class BoxClient {

public final ArchivesManager archives;

public final ExternalUsersManager externalUsers;

public BoxClient(Authentication auth) {
this.auth = auth;
this.networkSession = new NetworkSession.Builder().baseUrls(new BaseUrls()).build();
Expand Down Expand Up @@ -584,6 +587,11 @@ public BoxClient(Authentication auth) {
.build();
this.archives =
new ArchivesManager.Builder().auth(this.auth).networkSession(this.networkSession).build();
this.externalUsers =
new ExternalUsersManager.Builder()
.auth(this.auth)
.networkSession(this.networkSession)
.build();
}

protected BoxClient(Builder builder) {
Expand Down Expand Up @@ -914,6 +922,11 @@ protected BoxClient(Builder builder) {
.build();
this.archives =
new ArchivesManager.Builder().auth(this.auth).networkSession(this.networkSession).build();
this.externalUsers =
new ExternalUsersManager.Builder()
.auth(this.auth)
.networkSession(this.networkSession)
.build();
}

public FetchResponse makeRequest(FetchOptions fetchOptions) {
Expand Down Expand Up @@ -1299,6 +1312,10 @@ public ArchivesManager getArchives() {
return archives;
}

public ExternalUsersManager getExternalUsers() {
return externalUsers;
}

public static class Builder {

protected final Authentication auth;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
package com.box.sdkgen.managers.externalusers;

import static com.box.sdkgen.internal.utils.UtilsManager.mapOf;

import com.box.sdkgen.parameters.v2025r0.boxversionheaderv2025r0.BoxVersionHeaderV2025R0;
import com.box.sdkgen.serialization.json.EnumWrapper;
import java.util.Map;

public class CreateExternalUserSubmitDeleteJobV2025R0Headers {

public EnumWrapper<BoxVersionHeaderV2025R0> boxVersion;

public Map<String, String> extraHeaders;

public CreateExternalUserSubmitDeleteJobV2025R0Headers() {
this.boxVersion = new EnumWrapper<BoxVersionHeaderV2025R0>(BoxVersionHeaderV2025R0._2025_0);
this.extraHeaders = mapOf();
}

protected CreateExternalUserSubmitDeleteJobV2025R0Headers(Builder builder) {
this.boxVersion = builder.boxVersion;
this.extraHeaders = builder.extraHeaders;
}

public EnumWrapper<BoxVersionHeaderV2025R0> getBoxVersion() {
return boxVersion;
}

public Map<String, String> getExtraHeaders() {
return extraHeaders;
}

public static class Builder {

protected EnumWrapper<BoxVersionHeaderV2025R0> boxVersion;

protected Map<String, String> extraHeaders;

public Builder() {
this.boxVersion = new EnumWrapper<BoxVersionHeaderV2025R0>(BoxVersionHeaderV2025R0._2025_0);
this.extraHeaders = mapOf();
}

public Builder boxVersion(BoxVersionHeaderV2025R0 boxVersion) {
this.boxVersion = new EnumWrapper<BoxVersionHeaderV2025R0>(boxVersion);
return this;
}

public Builder boxVersion(EnumWrapper<BoxVersionHeaderV2025R0> boxVersion) {
this.boxVersion = boxVersion;
return this;
}

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

public CreateExternalUserSubmitDeleteJobV2025R0Headers build() {
return new CreateExternalUserSubmitDeleteJobV2025R0Headers(this);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
package com.box.sdkgen.managers.externalusers;

import static com.box.sdkgen.internal.utils.UtilsManager.convertToString;
import static com.box.sdkgen.internal.utils.UtilsManager.entryOf;
import static com.box.sdkgen.internal.utils.UtilsManager.mapOf;
import static com.box.sdkgen.internal.utils.UtilsManager.mergeMaps;
import static com.box.sdkgen.internal.utils.UtilsManager.prepareParams;

import com.box.sdkgen.networking.auth.Authentication;
import com.box.sdkgen.networking.fetchoptions.FetchOptions;
import com.box.sdkgen.networking.fetchoptions.ResponseFormat;
import com.box.sdkgen.networking.fetchresponse.FetchResponse;
import com.box.sdkgen.networking.network.NetworkSession;
import com.box.sdkgen.schemas.v2025r0.externaluserssubmitdeletejobrequestv2025r0.ExternalUsersSubmitDeleteJobRequestV2025R0;
import com.box.sdkgen.schemas.v2025r0.externaluserssubmitdeletejobresponsev2025r0.ExternalUsersSubmitDeleteJobResponseV2025R0;
import com.box.sdkgen.serialization.json.JsonManager;
import java.util.Map;

public class ExternalUsersManager {

public Authentication auth;

public NetworkSession networkSession;

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

protected ExternalUsersManager(Builder builder) {
this.auth = builder.auth;
this.networkSession = builder.networkSession;
}

public ExternalUsersSubmitDeleteJobResponseV2025R0 createExternalUserSubmitDeleteJobV2025R0(
ExternalUsersSubmitDeleteJobRequestV2025R0 requestBody) {
return createExternalUserSubmitDeleteJobV2025R0(
requestBody, new CreateExternalUserSubmitDeleteJobV2025R0Headers());
}

public ExternalUsersSubmitDeleteJobResponseV2025R0 createExternalUserSubmitDeleteJobV2025R0(
ExternalUsersSubmitDeleteJobRequestV2025R0 requestBody,
CreateExternalUserSubmitDeleteJobV2025R0Headers headers) {
Map<String, String> headersMap =
prepareParams(
mergeMaps(
mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))),
headers.getExtraHeaders()));
FetchResponse response =
this.networkSession
.getNetworkClient()
.fetch(
new FetchOptions.Builder(
String.join(
"",
this.networkSession.getBaseUrls().getBaseUrl(),
"/2.0/external_users/submit_delete_job"),
"POST")
.headers(headersMap)
.data(JsonManager.serialize(requestBody))
.contentType("application/json")
.responseFormat(ResponseFormat.JSON)
.auth(this.auth)
.networkSession(this.networkSession)
.build());
return JsonManager.deserialize(
response.getData(), ExternalUsersSubmitDeleteJobResponseV2025R0.class);
}

public Authentication getAuth() {
return auth;
}

public NetworkSession getNetworkSession() {
return networkSession;
}

public static class Builder {

protected Authentication auth;

protected NetworkSession networkSession;

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

public Builder auth(Authentication auth) {
this.auth = auth;
return this;
}

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

public ExternalUsersManager build() {
return new ExternalUsersManager(this);
}
}
}
Loading
Loading