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

box / box-java-sdk / #6245

10 Feb 2026 06:10PM UTC coverage: 34.748% (-0.3%) from 35.043%
#6245

push

github

web-flow
chore: Update `.codegen.json` with commit hash of `codegen` and `openapi` spec [skip ci] (#1719)

18637 of 53635 relevant lines covered (34.75%)

0.35 hits per line

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

84.21
/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) {
1✔
29
    this.auth = builder.auth;
1✔
30
    this.networkSession = builder.networkSession;
1✔
31
  }
1✔
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(
1✔
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 =
1✔
57
        prepareParams(mapOf(entryOf("categories", convertToString(queryParams.getCategories()))));
1✔
58
    Map<String, String> headersMap =
1✔
59
        prepareParams(
1✔
60
            mergeMaps(
1✔
61
                mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))),
1✔
62
                headers.getExtraHeaders()));
1✔
63
    FetchResponse response =
1✔
64
        this.networkSession
65
            .getNetworkClient()
1✔
66
            .fetch(
1✔
67
                new FetchOptions.Builder(
68
                        String.join(
1✔
69
                            "",
70
                            this.networkSession.getBaseUrls().getBaseUrl(),
1✔
71
                            "/2.0/enterprise_configurations/",
72
                            convertToString(enterpriseId)),
1✔
73
                        "GET")
74
                    .params(queryParamsMap)
1✔
75
                    .headers(headersMap)
1✔
76
                    .responseFormat(ResponseFormat.JSON)
1✔
77
                    .auth(this.auth)
1✔
78
                    .networkSession(this.networkSession)
1✔
79
                    .build());
1✔
80
    return JsonManager.deserialize(response.getData(), EnterpriseConfigurationV2025R0.class);
1✔
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

97
    public Builder() {}
1✔
98

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

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

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