|
| 1 | +/** |
| 2 | + * This file was auto-generated by Fern from our API Definition. |
| 3 | + */ |
| 4 | +package com.squidex.api; |
| 5 | + |
| 6 | +import com.squidex.api.core.ClientOptions; |
| 7 | +import com.squidex.api.core.Suppliers; |
| 8 | +import com.squidex.api.resources.apps.AppsClient; |
| 9 | +import com.squidex.api.resources.assets.AssetsClient; |
| 10 | +import com.squidex.api.resources.backups.BackupsClient; |
| 11 | +import com.squidex.api.resources.comments.CommentsClient; |
| 12 | +import com.squidex.api.resources.contents.ContentsClient; |
| 13 | +import com.squidex.api.resources.diagnostics.DiagnosticsClient; |
| 14 | +import com.squidex.api.resources.eventconsumers.EventConsumersClient; |
| 15 | +import com.squidex.api.resources.history.HistoryClient; |
| 16 | +import com.squidex.api.resources.languages.LanguagesClient; |
| 17 | +import com.squidex.api.resources.news.NewsClient; |
| 18 | +import com.squidex.api.resources.notifications.NotificationsClient; |
| 19 | +import com.squidex.api.resources.ping.PingClient; |
| 20 | +import com.squidex.api.resources.plans.PlansClient; |
| 21 | +import com.squidex.api.resources.rules.RulesClient; |
| 22 | +import com.squidex.api.resources.schemas.SchemasClient; |
| 23 | +import com.squidex.api.resources.search.SearchClient; |
| 24 | +import com.squidex.api.resources.statistics.StatisticsClient; |
| 25 | +import com.squidex.api.resources.teams.TeamsClient; |
| 26 | +import com.squidex.api.resources.templates.TemplatesClient; |
| 27 | +import com.squidex.api.resources.translations.TranslationsClient; |
| 28 | +import com.squidex.api.resources.usermanagement.UserManagementClient; |
| 29 | +import com.squidex.api.resources.users.UsersClient; |
| 30 | +import java.util.function.Supplier; |
| 31 | + |
| 32 | +public class SquidexApiClient { |
| 33 | + protected final ClientOptions clientOptions; |
| 34 | + |
| 35 | + protected final Supplier<UserManagementClient> userManagementClient; |
| 36 | + |
| 37 | + protected final Supplier<UsersClient> usersClient; |
| 38 | + |
| 39 | + protected final Supplier<TranslationsClient> translationsClient; |
| 40 | + |
| 41 | + protected final Supplier<TemplatesClient> templatesClient; |
| 42 | + |
| 43 | + protected final Supplier<TeamsClient> teamsClient; |
| 44 | + |
| 45 | + protected final Supplier<StatisticsClient> statisticsClient; |
| 46 | + |
| 47 | + protected final Supplier<SearchClient> searchClient; |
| 48 | + |
| 49 | + protected final Supplier<SchemasClient> schemasClient; |
| 50 | + |
| 51 | + protected final Supplier<RulesClient> rulesClient; |
| 52 | + |
| 53 | + protected final Supplier<PlansClient> plansClient; |
| 54 | + |
| 55 | + protected final Supplier<PingClient> pingClient; |
| 56 | + |
| 57 | + protected final Supplier<NewsClient> newsClient; |
| 58 | + |
| 59 | + protected final Supplier<LanguagesClient> languagesClient; |
| 60 | + |
| 61 | + protected final Supplier<HistoryClient> historyClient; |
| 62 | + |
| 63 | + protected final Supplier<EventConsumersClient> eventConsumersClient; |
| 64 | + |
| 65 | + protected final Supplier<DiagnosticsClient> diagnosticsClient; |
| 66 | + |
| 67 | + protected final Supplier<ContentsClient> contentsClient; |
| 68 | + |
| 69 | + protected final Supplier<CommentsClient> commentsClient; |
| 70 | + |
| 71 | + protected final Supplier<NotificationsClient> notificationsClient; |
| 72 | + |
| 73 | + protected final Supplier<BackupsClient> backupsClient; |
| 74 | + |
| 75 | + protected final Supplier<AssetsClient> assetsClient; |
| 76 | + |
| 77 | + protected final Supplier<AppsClient> appsClient; |
| 78 | + |
| 79 | + public SquidexApiClient(ClientOptions clientOptions) { |
| 80 | + this.clientOptions = clientOptions; |
| 81 | + this.userManagementClient = Suppliers.memoize(() -> new UserManagementClient(clientOptions)); |
| 82 | + this.usersClient = Suppliers.memoize(() -> new UsersClient(clientOptions)); |
| 83 | + this.translationsClient = Suppliers.memoize(() -> new TranslationsClient(clientOptions)); |
| 84 | + this.templatesClient = Suppliers.memoize(() -> new TemplatesClient(clientOptions)); |
| 85 | + this.teamsClient = Suppliers.memoize(() -> new TeamsClient(clientOptions)); |
| 86 | + this.statisticsClient = Suppliers.memoize(() -> new StatisticsClient(clientOptions)); |
| 87 | + this.searchClient = Suppliers.memoize(() -> new SearchClient(clientOptions)); |
| 88 | + this.schemasClient = Suppliers.memoize(() -> new SchemasClient(clientOptions)); |
| 89 | + this.rulesClient = Suppliers.memoize(() -> new RulesClient(clientOptions)); |
| 90 | + this.plansClient = Suppliers.memoize(() -> new PlansClient(clientOptions)); |
| 91 | + this.pingClient = Suppliers.memoize(() -> new PingClient(clientOptions)); |
| 92 | + this.newsClient = Suppliers.memoize(() -> new NewsClient(clientOptions)); |
| 93 | + this.languagesClient = Suppliers.memoize(() -> new LanguagesClient(clientOptions)); |
| 94 | + this.historyClient = Suppliers.memoize(() -> new HistoryClient(clientOptions)); |
| 95 | + this.eventConsumersClient = Suppliers.memoize(() -> new EventConsumersClient(clientOptions)); |
| 96 | + this.diagnosticsClient = Suppliers.memoize(() -> new DiagnosticsClient(clientOptions)); |
| 97 | + this.contentsClient = Suppliers.memoize(() -> new ContentsClient(clientOptions)); |
| 98 | + this.commentsClient = Suppliers.memoize(() -> new CommentsClient(clientOptions)); |
| 99 | + this.notificationsClient = Suppliers.memoize(() -> new NotificationsClient(clientOptions)); |
| 100 | + this.backupsClient = Suppliers.memoize(() -> new BackupsClient(clientOptions)); |
| 101 | + this.assetsClient = Suppliers.memoize(() -> new AssetsClient(clientOptions)); |
| 102 | + this.appsClient = Suppliers.memoize(() -> new AppsClient(clientOptions)); |
| 103 | + } |
| 104 | + |
| 105 | + public UserManagementClient userManagement() { |
| 106 | + return this.userManagementClient.get(); |
| 107 | + } |
| 108 | + |
| 109 | + public UsersClient users() { |
| 110 | + return this.usersClient.get(); |
| 111 | + } |
| 112 | + |
| 113 | + public TranslationsClient translations() { |
| 114 | + return this.translationsClient.get(); |
| 115 | + } |
| 116 | + |
| 117 | + public TemplatesClient templates() { |
| 118 | + return this.templatesClient.get(); |
| 119 | + } |
| 120 | + |
| 121 | + public TeamsClient teams() { |
| 122 | + return this.teamsClient.get(); |
| 123 | + } |
| 124 | + |
| 125 | + public StatisticsClient statistics() { |
| 126 | + return this.statisticsClient.get(); |
| 127 | + } |
| 128 | + |
| 129 | + public SearchClient search() { |
| 130 | + return this.searchClient.get(); |
| 131 | + } |
| 132 | + |
| 133 | + public SchemasClient schemas() { |
| 134 | + return this.schemasClient.get(); |
| 135 | + } |
| 136 | + |
| 137 | + public RulesClient rules() { |
| 138 | + return this.rulesClient.get(); |
| 139 | + } |
| 140 | + |
| 141 | + public PlansClient plans() { |
| 142 | + return this.plansClient.get(); |
| 143 | + } |
| 144 | + |
| 145 | + public PingClient ping() { |
| 146 | + return this.pingClient.get(); |
| 147 | + } |
| 148 | + |
| 149 | + public NewsClient news() { |
| 150 | + return this.newsClient.get(); |
| 151 | + } |
| 152 | + |
| 153 | + public LanguagesClient languages() { |
| 154 | + return this.languagesClient.get(); |
| 155 | + } |
| 156 | + |
| 157 | + public HistoryClient history() { |
| 158 | + return this.historyClient.get(); |
| 159 | + } |
| 160 | + |
| 161 | + public EventConsumersClient eventConsumers() { |
| 162 | + return this.eventConsumersClient.get(); |
| 163 | + } |
| 164 | + |
| 165 | + public DiagnosticsClient diagnostics() { |
| 166 | + return this.diagnosticsClient.get(); |
| 167 | + } |
| 168 | + |
| 169 | + public ContentsClient contents() { |
| 170 | + return this.contentsClient.get(); |
| 171 | + } |
| 172 | + |
| 173 | + public CommentsClient comments() { |
| 174 | + return this.commentsClient.get(); |
| 175 | + } |
| 176 | + |
| 177 | + public NotificationsClient notifications() { |
| 178 | + return this.notificationsClient.get(); |
| 179 | + } |
| 180 | + |
| 181 | + public BackupsClient backups() { |
| 182 | + return this.backupsClient.get(); |
| 183 | + } |
| 184 | + |
| 185 | + public AssetsClient assets() { |
| 186 | + return this.assetsClient.get(); |
| 187 | + } |
| 188 | + |
| 189 | + public AppsClient apps() { |
| 190 | + return this.appsClient.get(); |
| 191 | + } |
| 192 | + |
| 193 | + public static SquidexApiClientBuilder builder() { |
| 194 | + return new SquidexApiClientBuilder(); |
| 195 | + } |
| 196 | +} |
0 commit comments