forked from intercom/intercom-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAsyncIntercom.java
More file actions
180 lines (136 loc) · 6.9 KB
/
Copy pathAsyncIntercom.java
File metadata and controls
180 lines (136 loc) · 6.9 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
/**
* This file was auto-generated by Fern from our API Definition.
*/
package com.intercom.api;
import com.intercom.api.core.ClientOptions;
import com.intercom.api.core.Suppliers;
import com.intercom.api.resources.admins.AsyncAdminsClient;
import com.intercom.api.resources.articles.AsyncArticlesClient;
import com.intercom.api.resources.companies.AsyncCompaniesClient;
import com.intercom.api.resources.contacts.AsyncContactsClient;
import com.intercom.api.resources.conversations.AsyncConversationsClient;
import com.intercom.api.resources.dataattributes.AsyncDataAttributesClient;
import com.intercom.api.resources.dataexport.AsyncDataExportClient;
import com.intercom.api.resources.events.AsyncEventsClient;
import com.intercom.api.resources.helpcenters.AsyncHelpCentersClient;
import com.intercom.api.resources.messages.AsyncMessagesClient;
import com.intercom.api.resources.news.AsyncNewsClient;
import com.intercom.api.resources.notes.AsyncNotesClient;
import com.intercom.api.resources.phonecallredirects.AsyncPhoneCallRedirectsClient;
import com.intercom.api.resources.segments.AsyncSegmentsClient;
import com.intercom.api.resources.subscriptiontypes.AsyncSubscriptionTypesClient;
import com.intercom.api.resources.tags.AsyncTagsClient;
import com.intercom.api.resources.teams.AsyncTeamsClient;
import com.intercom.api.resources.tickets.AsyncTicketsClient;
import com.intercom.api.resources.tickettypes.AsyncTicketTypesClient;
import com.intercom.api.resources.visitors.AsyncVisitorsClient;
import java.util.function.Supplier;
public class AsyncIntercom {
protected final ClientOptions clientOptions;
protected final Supplier<AsyncAdminsClient> adminsClient;
protected final Supplier<AsyncArticlesClient> articlesClient;
protected final Supplier<AsyncHelpCentersClient> helpCentersClient;
protected final Supplier<AsyncCompaniesClient> companiesClient;
protected final Supplier<AsyncContactsClient> contactsClient;
protected final Supplier<AsyncNotesClient> notesClient;
protected final Supplier<AsyncTagsClient> tagsClient;
protected final Supplier<AsyncConversationsClient> conversationsClient;
protected final Supplier<AsyncDataAttributesClient> dataAttributesClient;
protected final Supplier<AsyncEventsClient> eventsClient;
protected final Supplier<AsyncDataExportClient> dataExportClient;
protected final Supplier<AsyncMessagesClient> messagesClient;
protected final Supplier<AsyncSegmentsClient> segmentsClient;
protected final Supplier<AsyncSubscriptionTypesClient> subscriptionTypesClient;
protected final Supplier<AsyncPhoneCallRedirectsClient> phoneCallRedirectsClient;
protected final Supplier<AsyncTeamsClient> teamsClient;
protected final Supplier<AsyncTicketTypesClient> ticketTypesClient;
protected final Supplier<AsyncTicketsClient> ticketsClient;
protected final Supplier<AsyncVisitorsClient> visitorsClient;
protected final Supplier<AsyncNewsClient> newsClient;
public AsyncIntercom(ClientOptions clientOptions) {
this.clientOptions = clientOptions;
this.adminsClient = Suppliers.memoize(() -> new AsyncAdminsClient(clientOptions));
this.articlesClient = Suppliers.memoize(() -> new AsyncArticlesClient(clientOptions));
this.helpCentersClient = Suppliers.memoize(() -> new AsyncHelpCentersClient(clientOptions));
this.companiesClient = Suppliers.memoize(() -> new AsyncCompaniesClient(clientOptions));
this.contactsClient = Suppliers.memoize(() -> new AsyncContactsClient(clientOptions));
this.notesClient = Suppliers.memoize(() -> new AsyncNotesClient(clientOptions));
this.tagsClient = Suppliers.memoize(() -> new AsyncTagsClient(clientOptions));
this.conversationsClient = Suppliers.memoize(() -> new AsyncConversationsClient(clientOptions));
this.dataAttributesClient = Suppliers.memoize(() -> new AsyncDataAttributesClient(clientOptions));
this.eventsClient = Suppliers.memoize(() -> new AsyncEventsClient(clientOptions));
this.dataExportClient = Suppliers.memoize(() -> new AsyncDataExportClient(clientOptions));
this.messagesClient = Suppliers.memoize(() -> new AsyncMessagesClient(clientOptions));
this.segmentsClient = Suppliers.memoize(() -> new AsyncSegmentsClient(clientOptions));
this.subscriptionTypesClient = Suppliers.memoize(() -> new AsyncSubscriptionTypesClient(clientOptions));
this.phoneCallRedirectsClient = Suppliers.memoize(() -> new AsyncPhoneCallRedirectsClient(clientOptions));
this.teamsClient = Suppliers.memoize(() -> new AsyncTeamsClient(clientOptions));
this.ticketTypesClient = Suppliers.memoize(() -> new AsyncTicketTypesClient(clientOptions));
this.ticketsClient = Suppliers.memoize(() -> new AsyncTicketsClient(clientOptions));
this.visitorsClient = Suppliers.memoize(() -> new AsyncVisitorsClient(clientOptions));
this.newsClient = Suppliers.memoize(() -> new AsyncNewsClient(clientOptions));
}
public AsyncAdminsClient admins() {
return this.adminsClient.get();
}
public AsyncArticlesClient articles() {
return this.articlesClient.get();
}
public AsyncHelpCentersClient helpCenters() {
return this.helpCentersClient.get();
}
public AsyncCompaniesClient companies() {
return this.companiesClient.get();
}
public AsyncContactsClient contacts() {
return this.contactsClient.get();
}
public AsyncNotesClient notes() {
return this.notesClient.get();
}
public AsyncTagsClient tags() {
return this.tagsClient.get();
}
public AsyncConversationsClient conversations() {
return this.conversationsClient.get();
}
public AsyncDataAttributesClient dataAttributes() {
return this.dataAttributesClient.get();
}
public AsyncEventsClient events() {
return this.eventsClient.get();
}
public AsyncDataExportClient dataExport() {
return this.dataExportClient.get();
}
public AsyncMessagesClient messages() {
return this.messagesClient.get();
}
public AsyncSegmentsClient segments() {
return this.segmentsClient.get();
}
public AsyncSubscriptionTypesClient subscriptionTypes() {
return this.subscriptionTypesClient.get();
}
public AsyncPhoneCallRedirectsClient phoneCallRedirects() {
return this.phoneCallRedirectsClient.get();
}
public AsyncTeamsClient teams() {
return this.teamsClient.get();
}
public AsyncTicketTypesClient ticketTypes() {
return this.ticketTypesClient.get();
}
public AsyncTicketsClient tickets() {
return this.ticketsClient.get();
}
public AsyncVisitorsClient visitors() {
return this.visitorsClient.get();
}
public AsyncNewsClient news() {
return this.newsClient.get();
}
public static AsyncIntercomBuilder builder() {
return new AsyncIntercomBuilder();
}
}