-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathAsyncApiClient.java
More file actions
92 lines (70 loc) · 3.39 KB
/
AsyncApiClient.java
File metadata and controls
92 lines (70 loc) · 3.39 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/**
* This file was auto-generated by Fern from our API Definition.
*/
package com.skyflow.generated.rest;
import com.skyflow.generated.rest.core.ClientOptions;
import com.skyflow.generated.rest.core.Suppliers;
import com.skyflow.generated.rest.resources.audit.AsyncAuditClient;
import com.skyflow.generated.rest.resources.authentication.AsyncAuthenticationClient;
import com.skyflow.generated.rest.resources.binlookup.AsyncBinLookupClient;
import com.skyflow.generated.rest.resources.files.AsyncFilesClient;
import com.skyflow.generated.rest.resources.guardrails.AsyncGuardrailsClient;
import com.skyflow.generated.rest.resources.query.AsyncQueryClient;
import com.skyflow.generated.rest.resources.records.AsyncRecordsClient;
import com.skyflow.generated.rest.resources.strings.AsyncStringsClient;
import com.skyflow.generated.rest.resources.tokens.AsyncTokensClient;
import java.util.function.Supplier;
public class AsyncApiClient {
protected final ClientOptions clientOptions;
protected final Supplier<AsyncAuditClient> auditClient;
protected final Supplier<AsyncBinLookupClient> binLookupClient;
protected final Supplier<AsyncRecordsClient> recordsClient;
protected final Supplier<AsyncTokensClient> tokensClient;
protected final Supplier<AsyncQueryClient> queryClient;
protected final Supplier<AsyncAuthenticationClient> authenticationClient;
protected final Supplier<AsyncGuardrailsClient> guardrailsClient;
protected final Supplier<AsyncStringsClient> stringsClient;
protected final Supplier<AsyncFilesClient> filesClient;
public AsyncApiClient(ClientOptions clientOptions) {
this.clientOptions = clientOptions;
this.auditClient = Suppliers.memoize(() -> new AsyncAuditClient(clientOptions));
this.binLookupClient = Suppliers.memoize(() -> new AsyncBinLookupClient(clientOptions));
this.recordsClient = Suppliers.memoize(() -> new AsyncRecordsClient(clientOptions));
this.tokensClient = Suppliers.memoize(() -> new AsyncTokensClient(clientOptions));
this.queryClient = Suppliers.memoize(() -> new AsyncQueryClient(clientOptions));
this.authenticationClient = Suppliers.memoize(() -> new AsyncAuthenticationClient(clientOptions));
this.guardrailsClient = Suppliers.memoize(() -> new AsyncGuardrailsClient(clientOptions));
this.stringsClient = Suppliers.memoize(() -> new AsyncStringsClient(clientOptions));
this.filesClient = Suppliers.memoize(() -> new AsyncFilesClient(clientOptions));
}
public AsyncAuditClient audit() {
return this.auditClient.get();
}
public AsyncBinLookupClient binLookup() {
return this.binLookupClient.get();
}
public AsyncRecordsClient records() {
return this.recordsClient.get();
}
public AsyncTokensClient tokens() {
return this.tokensClient.get();
}
public AsyncQueryClient query() {
return this.queryClient.get();
}
public AsyncAuthenticationClient authentication() {
return this.authenticationClient.get();
}
public AsyncGuardrailsClient guardrails() {
return this.guardrailsClient.get();
}
public AsyncStringsClient strings() {
return this.stringsClient.get();
}
public AsyncFilesClient files() {
return this.filesClient.get();
}
public static AsyncApiClientBuilder builder() {
return new AsyncApiClientBuilder();
}
}