-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAsyncCloudPDFClient.java
More file actions
60 lines (46 loc) · 2.03 KB
/
Copy pathAsyncCloudPDFClient.java
File metadata and controls
60 lines (46 loc) · 2.03 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
/**
* This file was auto-generated by Fern from our API Definition.
*/
package com.cloudpdf.api;
import com.cloudpdf.api.core.ClientOptions;
import com.cloudpdf.api.core.Suppliers;
import com.cloudpdf.api.resources.deployment.AsyncDeploymentClient;
import com.cloudpdf.api.resources.doc.AsyncDocClient;
import com.cloudpdf.api.resources.documents.AsyncDocumentsClient;
import com.cloudpdf.api.resources.tenants.AsyncTenantsClient;
import com.cloudpdf.api.resources.tokens.AsyncTokensClient;
import java.util.function.Supplier;
public class AsyncCloudPDFClient {
protected final ClientOptions clientOptions;
protected final Supplier<AsyncDeploymentClient> deploymentClient;
protected final Supplier<AsyncDocClient> docClient;
protected final Supplier<AsyncTenantsClient> tenantsClient;
protected final Supplier<AsyncDocumentsClient> documentsClient;
protected final Supplier<AsyncTokensClient> tokensClient;
public AsyncCloudPDFClient(ClientOptions clientOptions) {
this.clientOptions = clientOptions;
this.deploymentClient = Suppliers.memoize(() -> new AsyncDeploymentClient(clientOptions));
this.docClient = Suppliers.memoize(() -> new AsyncDocClient(clientOptions));
this.tenantsClient = Suppliers.memoize(() -> new AsyncTenantsClient(clientOptions));
this.documentsClient = Suppliers.memoize(() -> new AsyncDocumentsClient(clientOptions));
this.tokensClient = Suppliers.memoize(() -> new AsyncTokensClient(clientOptions));
}
public AsyncDeploymentClient deployment() {
return this.deploymentClient.get();
}
public AsyncDocClient doc() {
return this.docClient.get();
}
public AsyncTenantsClient tenants() {
return this.tenantsClient.get();
}
public AsyncDocumentsClient documents() {
return this.documentsClient.get();
}
public AsyncTokensClient tokens() {
return this.tokensClient.get();
}
public static AsyncCloudPDFClientBuilder builder() {
return new AsyncCloudPDFClientBuilder();
}
}