Repository navigation
Expand file tree
/
Copy pathConfiguration.java
More file actions
65 lines (57 loc) · 2.06 KB
/
Copy pathConfiguration.java
File metadata and controls
65 lines (57 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*
* Dropbox Sign API
* Dropbox Sign v3 API
*
* The version of the OpenAPI document: 3.0.0
* Contact: apisupport@hellosign.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.dropbox.sign;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Supplier;
@javax.annotation.Generated(
value = "org.openapitools.codegen.languages.JavaClientCodegen",
comments = "Generator version: 7.26.0")
public class Configuration {
public static final String VERSION = "1.11-dev";
private static final AtomicReference<ApiClient> defaultApiClient = new AtomicReference<>();
private static volatile Supplier<ApiClient> apiClientFactory = ApiClient::new;
/**
* Get the default API client, which would be used when creating API instances without providing
* an API client.
*
* @return Default API client
*/
public static ApiClient getDefaultApiClient() {
ApiClient client = defaultApiClient.get();
if (client == null) {
client =
defaultApiClient.updateAndGet(
val -> {
if (val != null) { // changed by another thread
return val;
}
return apiClientFactory.get();
});
}
return client;
}
/**
* Set the default API client, which would be used when creating API instances without providing
* an API client.
*
* @param apiClient API client
*/
public static void setDefaultApiClient(ApiClient apiClient) {
defaultApiClient.set(apiClient);
}
/** set the callback used to create new ApiClient objects */
public static void setApiClientFactory(Supplier<ApiClient> factory) {
apiClientFactory = Objects.requireNonNull(factory);
}
public Configuration() {}
}