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

box / box-java-sdk / #6242

10 Feb 2026 05:27PM UTC coverage: 35.714% (+11.4%) from 24.324%
#6242

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 20670 relevant lines covered (35.71%)

0.4 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/enterpriseconfigurations/EnterpriseConfigurationsManager.java
1
package com.box.sdkgen.managers.enterpriseconfigurations;
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.enterpriseconfigurationv2025r0.EnterpriseConfigurationV2025R0;
15
import com.box.sdkgen.serialization.json.JsonManager;
16
import java.util.Map;
17

18
public class EnterpriseConfigurationsManager {
19

20
  public Authentication auth;
21

22
  public NetworkSession networkSession;
23

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

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

33
  /**
34
   * Retrieves the configuration for an enterprise.
35
   *
36
   * @param enterpriseId The ID of the enterprise. Example: "3442311"
37
   * @param queryParams Query parameters of getEnterpriseConfigurationByIdV2025R0 method
38
   */
39
  public EnterpriseConfigurationV2025R0 getEnterpriseConfigurationByIdV2025R0(
40
      String enterpriseId, GetEnterpriseConfigurationByIdV2025R0QueryParams queryParams) {
41
    return getEnterpriseConfigurationByIdV2025R0(
×
42
        enterpriseId, queryParams, new GetEnterpriseConfigurationByIdV2025R0Headers());
43
  }
44

45
  /**
46
   * Retrieves the configuration for an enterprise.
47
   *
48
   * @param enterpriseId The ID of the enterprise. Example: "3442311"
49
   * @param queryParams Query parameters of getEnterpriseConfigurationByIdV2025R0 method
50
   * @param headers Headers of getEnterpriseConfigurationByIdV2025R0 method
51
   */
52
  public EnterpriseConfigurationV2025R0 getEnterpriseConfigurationByIdV2025R0(
53
      String enterpriseId,
54
      GetEnterpriseConfigurationByIdV2025R0QueryParams queryParams,
55
      GetEnterpriseConfigurationByIdV2025R0Headers headers) {
56
    Map<String, String> queryParamsMap =
×
57
        prepareParams(mapOf(entryOf("categories", convertToString(queryParams.getCategories()))));
×
58
    Map<String, String> headersMap =
×
59
        prepareParams(
×
60
            mergeMaps(
×
61
                mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))),
×
62
                headers.getExtraHeaders()));
×
63
    FetchResponse response =
×
64
        this.networkSession
65
            .getNetworkClient()
×
66
            .fetch(
×
67
                new FetchOptions.Builder(
68
                        String.join(
×
69
                            "",
70
                            this.networkSession.getBaseUrls().getBaseUrl(),
×
71
                            "/2.0/enterprise_configurations/",
72
                            convertToString(enterpriseId)),
×
73
                        "GET")
74
                    .params(queryParamsMap)
×
75
                    .headers(headersMap)
×
76
                    .responseFormat(ResponseFormat.JSON)
×
77
                    .auth(this.auth)
×
78
                    .networkSession(this.networkSession)
×
79
                    .build());
×
80
    return JsonManager.deserialize(response.getData(), EnterpriseConfigurationV2025R0.class);
×
81
  }
82

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

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

91
  public static class Builder {
92

93
    protected Authentication auth;
94

95
    protected NetworkSession networkSession;
96

NEW
97
    public Builder() {}
×
98

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

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

109
    public EnterpriseConfigurationsManager build() {
NEW
110
      if (this.networkSession == null) {
×
NEW
111
        this.networkSession = new NetworkSession();
×
112
      }
113
      return new EnterpriseConfigurationsManager(this);
×
114
    }
115
  }
116
}
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