• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

box / box-java-sdk / #6244

10 Feb 2026 05:27PM UTC coverage: 40.749% (+22.6%) from 18.192%
#6244

push

github

web-flow
fix(boxsdkgen): Move assigning default values from builder constructor to `build()` method (box/box-codegen#922) (#1712)

0 of 1677 new or added lines in 569 files covered. (0.0%)

2146 existing lines in 544 files now uncovered.

7382 of 18116 relevant lines covered (40.75%)

0.46 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/main/java/com/box/sdkgen/managers/externalusers/ExternalUsersManager.java
1
package com.box.sdkgen.managers.externalusers;
2

3
import static com.box.sdkgen.internal.utils.UtilsManager.convertToString;
4
import static com.box.sdkgen.internal.utils.UtilsManager.entryOf;
5
import static com.box.sdkgen.internal.utils.UtilsManager.mapOf;
6
import static com.box.sdkgen.internal.utils.UtilsManager.mergeMaps;
7
import static com.box.sdkgen.internal.utils.UtilsManager.prepareParams;
8

9
import com.box.sdkgen.networking.auth.Authentication;
10
import com.box.sdkgen.networking.fetchoptions.FetchOptions;
11
import com.box.sdkgen.networking.fetchoptions.ResponseFormat;
12
import com.box.sdkgen.networking.fetchresponse.FetchResponse;
13
import com.box.sdkgen.networking.network.NetworkSession;
14
import com.box.sdkgen.schemas.v2025r0.externaluserssubmitdeletejobrequestv2025r0.ExternalUsersSubmitDeleteJobRequestV2025R0;
15
import com.box.sdkgen.schemas.v2025r0.externaluserssubmitdeletejobresponsev2025r0.ExternalUsersSubmitDeleteJobResponseV2025R0;
16
import com.box.sdkgen.serialization.json.JsonManager;
17
import java.util.Map;
18

19
public class ExternalUsersManager {
20

21
  public Authentication auth;
22

23
  public NetworkSession networkSession;
24

25
  public ExternalUsersManager() {
×
26
    this.networkSession = new NetworkSession();
×
27
  }
×
28

29
  protected ExternalUsersManager(Builder builder) {
×
30
    this.auth = builder.auth;
×
31
    this.networkSession = builder.networkSession;
×
32
  }
×
33

34
  /**
35
   * Delete external users from current user enterprise. This will remove each external user from
36
   * all invited collaborations within the current enterprise.
37
   *
38
   * @param requestBody Request body of submitJobToDeleteExternalUsersV2025R0 method
39
   */
40
  public ExternalUsersSubmitDeleteJobResponseV2025R0 submitJobToDeleteExternalUsersV2025R0(
41
      ExternalUsersSubmitDeleteJobRequestV2025R0 requestBody) {
42
    return submitJobToDeleteExternalUsersV2025R0(
×
43
        requestBody, new SubmitJobToDeleteExternalUsersV2025R0Headers());
44
  }
45

46
  /**
47
   * Delete external users from current user enterprise. This will remove each external user from
48
   * all invited collaborations within the current enterprise.
49
   *
50
   * @param requestBody Request body of submitJobToDeleteExternalUsersV2025R0 method
51
   * @param headers Headers of submitJobToDeleteExternalUsersV2025R0 method
52
   */
53
  public ExternalUsersSubmitDeleteJobResponseV2025R0 submitJobToDeleteExternalUsersV2025R0(
54
      ExternalUsersSubmitDeleteJobRequestV2025R0 requestBody,
55
      SubmitJobToDeleteExternalUsersV2025R0Headers headers) {
56
    Map<String, String> headersMap =
×
57
        prepareParams(
×
58
            mergeMaps(
×
59
                mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))),
×
60
                headers.getExtraHeaders()));
×
61
    FetchResponse response =
×
62
        this.networkSession
63
            .getNetworkClient()
×
64
            .fetch(
×
65
                new FetchOptions.Builder(
66
                        String.join(
×
67
                            "",
68
                            this.networkSession.getBaseUrls().getBaseUrl(),
×
69
                            "/2.0/external_users/submit_delete_job"),
70
                        "POST")
71
                    .headers(headersMap)
×
72
                    .data(JsonManager.serialize(requestBody))
×
73
                    .contentType("application/json")
×
74
                    .responseFormat(ResponseFormat.JSON)
×
75
                    .auth(this.auth)
×
76
                    .networkSession(this.networkSession)
×
77
                    .build());
×
78
    return JsonManager.deserialize(
×
79
        response.getData(), ExternalUsersSubmitDeleteJobResponseV2025R0.class);
×
80
  }
81

82
  public Authentication getAuth() {
83
    return auth;
×
84
  }
85

86
  public NetworkSession getNetworkSession() {
87
    return networkSession;
×
88
  }
89

90
  public static class Builder {
91

92
    protected Authentication auth;
93

94
    protected NetworkSession networkSession;
95

NEW
96
    public Builder() {}
×
97

98
    public Builder auth(Authentication auth) {
UNCOV
99
      this.auth = auth;
×
UNCOV
100
      return this;
×
101
    }
102

103
    public Builder networkSession(NetworkSession networkSession) {
UNCOV
104
      this.networkSession = networkSession;
×
UNCOV
105
      return this;
×
106
    }
107

108
    public ExternalUsersManager build() {
NEW
109
      if (this.networkSession == null) {
×
NEW
110
        this.networkSession = new NetworkSession();
×
111
      }
112
      return new ExternalUsersManager(this);
×
113
    }
114
  }
115
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc