-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCloudPDFClient.java
More file actions
60 lines (46 loc) · 1.92 KB
/
Copy pathCloudPDFClient.java
File metadata and controls
60 lines (46 loc) · 1.92 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.DeploymentClient;
import com.cloudpdf.api.resources.doc.DocClient;
import com.cloudpdf.api.resources.documents.DocumentsClient;
import com.cloudpdf.api.resources.tenants.TenantsClient;
import com.cloudpdf.api.resources.tokens.TokensClient;
import java.util.function.Supplier;
public class CloudPDFClient {
protected final ClientOptions clientOptions;
protected final Supplier<DeploymentClient> deploymentClient;
protected final Supplier<DocClient> docClient;
protected final Supplier<TenantsClient> tenantsClient;
protected final Supplier<DocumentsClient> documentsClient;
protected final Supplier<TokensClient> tokensClient;
public CloudPDFClient(ClientOptions clientOptions) {
this.clientOptions = clientOptions;
this.deploymentClient = Suppliers.memoize(() -> new DeploymentClient(clientOptions));
this.docClient = Suppliers.memoize(() -> new DocClient(clientOptions));
this.tenantsClient = Suppliers.memoize(() -> new TenantsClient(clientOptions));
this.documentsClient = Suppliers.memoize(() -> new DocumentsClient(clientOptions));
this.tokensClient = Suppliers.memoize(() -> new TokensClient(clientOptions));
}
public DeploymentClient deployment() {
return this.deploymentClient.get();
}
public DocClient doc() {
return this.docClient.get();
}
public TenantsClient tenants() {
return this.tenantsClient.get();
}
public DocumentsClient documents() {
return this.documentsClient.get();
}
public TokensClient tokens() {
return this.tokensClient.get();
}
public static CloudPDFClientBuilder builder() {
return new CloudPDFClientBuilder();
}
}