From b34f195689ea2b6802527104ab3561abcdb13da7 Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Tue, 10 Oct 2023 08:26:53 +0000 Subject: [PATCH] Release 1.0.0 --- build.gradle | 2 +- .../com/squidex/api/SquidexApiClient.java | 196 ++++++++++++++++++ .../squidex/api/SquidexApiClientBuilder.java | 38 ++++ 3 files changed, 235 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/squidex/api/SquidexApiClient.java create mode 100644 src/main/java/com/squidex/api/SquidexApiClientBuilder.java diff --git a/build.gradle b/build.gradle index d70b954..9332d37 100644 --- a/build.gradle +++ b/build.gradle @@ -42,7 +42,7 @@ publishing { maven(MavenPublication) { groupId = 'io.squidex' artifactId = 'squidex' - version = '0.0.18' + version = '1.0.0' from components.java } } diff --git a/src/main/java/com/squidex/api/SquidexApiClient.java b/src/main/java/com/squidex/api/SquidexApiClient.java new file mode 100644 index 0000000..cfc49b5 --- /dev/null +++ b/src/main/java/com/squidex/api/SquidexApiClient.java @@ -0,0 +1,196 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.squidex.api; + +import com.squidex.api.core.ClientOptions; +import com.squidex.api.core.Suppliers; +import com.squidex.api.resources.apps.AppsClient; +import com.squidex.api.resources.assets.AssetsClient; +import com.squidex.api.resources.backups.BackupsClient; +import com.squidex.api.resources.comments.CommentsClient; +import com.squidex.api.resources.contents.ContentsClient; +import com.squidex.api.resources.diagnostics.DiagnosticsClient; +import com.squidex.api.resources.eventconsumers.EventConsumersClient; +import com.squidex.api.resources.history.HistoryClient; +import com.squidex.api.resources.languages.LanguagesClient; +import com.squidex.api.resources.news.NewsClient; +import com.squidex.api.resources.notifications.NotificationsClient; +import com.squidex.api.resources.ping.PingClient; +import com.squidex.api.resources.plans.PlansClient; +import com.squidex.api.resources.rules.RulesClient; +import com.squidex.api.resources.schemas.SchemasClient; +import com.squidex.api.resources.search.SearchClient; +import com.squidex.api.resources.statistics.StatisticsClient; +import com.squidex.api.resources.teams.TeamsClient; +import com.squidex.api.resources.templates.TemplatesClient; +import com.squidex.api.resources.translations.TranslationsClient; +import com.squidex.api.resources.usermanagement.UserManagementClient; +import com.squidex.api.resources.users.UsersClient; +import java.util.function.Supplier; + +public class SquidexApiClient { + protected final ClientOptions clientOptions; + + protected final Supplier userManagementClient; + + protected final Supplier usersClient; + + protected final Supplier translationsClient; + + protected final Supplier templatesClient; + + protected final Supplier teamsClient; + + protected final Supplier statisticsClient; + + protected final Supplier searchClient; + + protected final Supplier schemasClient; + + protected final Supplier rulesClient; + + protected final Supplier plansClient; + + protected final Supplier pingClient; + + protected final Supplier newsClient; + + protected final Supplier languagesClient; + + protected final Supplier historyClient; + + protected final Supplier eventConsumersClient; + + protected final Supplier diagnosticsClient; + + protected final Supplier contentsClient; + + protected final Supplier commentsClient; + + protected final Supplier notificationsClient; + + protected final Supplier backupsClient; + + protected final Supplier assetsClient; + + protected final Supplier appsClient; + + public SquidexApiClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.userManagementClient = Suppliers.memoize(() -> new UserManagementClient(clientOptions)); + this.usersClient = Suppliers.memoize(() -> new UsersClient(clientOptions)); + this.translationsClient = Suppliers.memoize(() -> new TranslationsClient(clientOptions)); + this.templatesClient = Suppliers.memoize(() -> new TemplatesClient(clientOptions)); + this.teamsClient = Suppliers.memoize(() -> new TeamsClient(clientOptions)); + this.statisticsClient = Suppliers.memoize(() -> new StatisticsClient(clientOptions)); + this.searchClient = Suppliers.memoize(() -> new SearchClient(clientOptions)); + this.schemasClient = Suppliers.memoize(() -> new SchemasClient(clientOptions)); + this.rulesClient = Suppliers.memoize(() -> new RulesClient(clientOptions)); + this.plansClient = Suppliers.memoize(() -> new PlansClient(clientOptions)); + this.pingClient = Suppliers.memoize(() -> new PingClient(clientOptions)); + this.newsClient = Suppliers.memoize(() -> new NewsClient(clientOptions)); + this.languagesClient = Suppliers.memoize(() -> new LanguagesClient(clientOptions)); + this.historyClient = Suppliers.memoize(() -> new HistoryClient(clientOptions)); + this.eventConsumersClient = Suppliers.memoize(() -> new EventConsumersClient(clientOptions)); + this.diagnosticsClient = Suppliers.memoize(() -> new DiagnosticsClient(clientOptions)); + this.contentsClient = Suppliers.memoize(() -> new ContentsClient(clientOptions)); + this.commentsClient = Suppliers.memoize(() -> new CommentsClient(clientOptions)); + this.notificationsClient = Suppliers.memoize(() -> new NotificationsClient(clientOptions)); + this.backupsClient = Suppliers.memoize(() -> new BackupsClient(clientOptions)); + this.assetsClient = Suppliers.memoize(() -> new AssetsClient(clientOptions)); + this.appsClient = Suppliers.memoize(() -> new AppsClient(clientOptions)); + } + + public UserManagementClient userManagement() { + return this.userManagementClient.get(); + } + + public UsersClient users() { + return this.usersClient.get(); + } + + public TranslationsClient translations() { + return this.translationsClient.get(); + } + + public TemplatesClient templates() { + return this.templatesClient.get(); + } + + public TeamsClient teams() { + return this.teamsClient.get(); + } + + public StatisticsClient statistics() { + return this.statisticsClient.get(); + } + + public SearchClient search() { + return this.searchClient.get(); + } + + public SchemasClient schemas() { + return this.schemasClient.get(); + } + + public RulesClient rules() { + return this.rulesClient.get(); + } + + public PlansClient plans() { + return this.plansClient.get(); + } + + public PingClient ping() { + return this.pingClient.get(); + } + + public NewsClient news() { + return this.newsClient.get(); + } + + public LanguagesClient languages() { + return this.languagesClient.get(); + } + + public HistoryClient history() { + return this.historyClient.get(); + } + + public EventConsumersClient eventConsumers() { + return this.eventConsumersClient.get(); + } + + public DiagnosticsClient diagnostics() { + return this.diagnosticsClient.get(); + } + + public ContentsClient contents() { + return this.contentsClient.get(); + } + + public CommentsClient comments() { + return this.commentsClient.get(); + } + + public NotificationsClient notifications() { + return this.notificationsClient.get(); + } + + public BackupsClient backups() { + return this.backupsClient.get(); + } + + public AssetsClient assets() { + return this.assetsClient.get(); + } + + public AppsClient apps() { + return this.appsClient.get(); + } + + public static SquidexApiClientBuilder builder() { + return new SquidexApiClientBuilder(); + } +} diff --git a/src/main/java/com/squidex/api/SquidexApiClientBuilder.java b/src/main/java/com/squidex/api/SquidexApiClientBuilder.java new file mode 100644 index 0000000..84455c7 --- /dev/null +++ b/src/main/java/com/squidex/api/SquidexApiClientBuilder.java @@ -0,0 +1,38 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.squidex.api; + +import com.squidex.api.core.ClientOptions; +import com.squidex.api.core.Environment; + +public final class SquidexApiClientBuilder { + private ClientOptions.Builder clientOptionsBuilder = ClientOptions.builder(); + + private Environment environment = Environment.DEFAULT; + + public SquidexApiClientBuilder token(String token) { + this.clientOptionsBuilder.addHeader("Authorization", "Bearer " + token); + return this; + } + + public SquidexApiClientBuilder environment(Environment environment) { + this.environment = environment; + return this; + } + + public SquidexApiClientBuilder url(String url) { + this.environment = Environment.custom(url); + return this; + } + + public SquidexApiClientBuilder appName(String appName) { + clientOptionsBuilder.appName(appName); + return this; + } + + public SquidexApiClient build() { + clientOptionsBuilder.environment(this.environment); + return new SquidexApiClient(clientOptionsBuilder.build()); + } +}