From 53e3330d18e50f9ea3b36066700c76154b0359d2 Mon Sep 17 00:00:00 2001 From: Takeshi Tsukamoto Date: Wed, 21 Aug 2024 13:28:49 +0900 Subject: [PATCH 01/28] add saasus annotation --- src/main/java/saasus/sdk/modules/SaaSusAPI.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/main/java/saasus/sdk/modules/SaaSusAPI.java diff --git a/src/main/java/saasus/sdk/modules/SaaSusAPI.java b/src/main/java/saasus/sdk/modules/SaaSusAPI.java new file mode 100644 index 00000000..f5db88d3 --- /dev/null +++ b/src/main/java/saasus/sdk/modules/SaaSusAPI.java @@ -0,0 +1,14 @@ +package saasus.sdk.modules; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target({ + ElementType.METHOD +}) +public @interface SaaSusAPI { + String path(); +} From 16541ae96e47c77c15b88d035c87907833842b76 Mon Sep 17 00:00:00 2001 From: takashi-uchida Date: Thu, 3 Oct 2024 19:34:34 +0900 Subject: [PATCH 02/28] add apiserver --- .../saasus/sdk/util/apiserver/ApiServer.java | 176 ++++++++++++++++++ 1 file changed, 176 insertions(+) create mode 100644 src/main/java/saasus/sdk/util/apiserver/ApiServer.java diff --git a/src/main/java/saasus/sdk/util/apiserver/ApiServer.java b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java new file mode 100644 index 00000000..f4b69dd2 --- /dev/null +++ b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java @@ -0,0 +1,176 @@ +package saasus.sdk.util.apiserver; + +import com.sun.net.httpserver.HttpExchange; +import com.sun.net.httpserver.HttpHandler; +import com.sun.net.httpserver.HttpServer; + +import java.io.IOException; +import java.io.OutputStream; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.lang.reflect.Parameter; +import java.net.InetSocketAddress; +import java.net.URI; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class ApiServer { + + public static void start(int port) throws IOException { + HttpServer server = HttpServer.create(new InetSocketAddress(port), 0); + + server.createContext("/", new DynamicHandler()); + server.setExecutor(null); // デフォルトのエグゼキューターを使用 + server.start(); + + System.out.println("#################### Server is listening on port " + port); + } + + static class DynamicHandler implements HttpHandler { + private final Map> classCache = new HashMap<>(); + private final Map methodCache = new HashMap<>(); + + @Override + public void handle(HttpExchange exchange) throws IOException { + + // ここで、API定義を読んで、リクエストと一致するかどうかを判定する + // 一致していたら、パラメータを取得し、コール先の型に変換する + // そして、以下のサンプルのようにリフレクションを使ってコールする + // 戻り値をAPI定義に従ってJSONに変換して返す + // エラー処理は、適切なHTTPステータスコードを返す(要検討) + + String path = exchange.getRequestURI().getPath(); + String[] pathParts = path.split("/"); + + if (pathParts.length < 3) { + sendResponse(exchange, 400, "Invalid path. Use format: /ClassName/methodName"); + return; + } + + String className = pathParts[1]; + String methodName = pathParts[2]; + Map queryParams = parseQueryParams(exchange.getRequestURI()); + + try { + Class clazz = getClass(className); + Method method = getMethod(clazz, methodName); + + if (method != null) { + Object[] args = prepareMethodArguments(method, queryParams); + String response = (String) method.invoke(null, args); + sendResponse(exchange, 200, response); + } else { + sendResponse(exchange, 404, "Method not found: " + methodName); + } + } catch (ClassNotFoundException e) { + sendResponse(exchange, 404, "Class not found: " + className); + } catch (InvocationTargetException | IllegalAccessException e) { + sendResponse(exchange, 500, "Error invoking method: " + e.getMessage()); + } catch (IllegalArgumentException e) { + sendResponse(exchange, 400, "Invalid arguments: " + e.getMessage()); + } catch (Exception e) { + sendResponse(exchange, 500, "Internal server error: " + e.getMessage()); + } + } + + private Class getClass(String className) throws ClassNotFoundException { + return classCache.computeIfAbsent(className, name -> { + try { + return Class.forName(name); + } catch (ClassNotFoundException e) { + throw new RuntimeException(e); + } + }); + } + + private Method getMethod(Class clazz, String methodName) { + String key = clazz.getName() + "#" + methodName; + return methodCache.computeIfAbsent(key, k -> { + Method[] methods = clazz.getMethods(); + for (Method method : methods) { + if (method.getName().equals(methodName)) { + return method; + } + } + return null; + }); + } + + private Map parseQueryParams(URI uri) { + Map queryParams = new HashMap<>(); + String query = uri.getQuery(); + if (query != null) { + String[] pairs = query.split("&"); + for (String pair : pairs) { + int idx = pair.indexOf("="); + queryParams.put(pair.substring(0, idx), pair.substring(idx + 1)); + } + } + return queryParams; + } + + private Object[] prepareMethodArguments(Method method, Map queryParams) { + Parameter[] parameters = method.getParameters(); + List args = new ArrayList<>(); + + for (Parameter parameter : parameters) { + String paramName = parameter.getName(); + String paramValue = queryParams.get(paramName); + + if (paramValue == null) { + throw new IllegalArgumentException("Missing parameter: " + paramName); + } + + Class paramType = parameter.getType(); + args.add(convertParamValue(paramValue, paramType)); + } + + return args.toArray(); + } + + private Object convertParamValue(String value, Class type) { + if (type == String.class) { + return value; + } else if (type == int.class || type == Integer.class) { + return Integer.parseInt(value); + } else if (type == long.class || type == Long.class) { + return Long.parseLong(value); + } else if (type == double.class || type == Double.class) { + return Double.parseDouble(value); + } else if (type == boolean.class || type == Boolean.class) { + return Boolean.parseBoolean(value); + } + throw new IllegalArgumentException("Unsupported parameter type: " + type.getName()); + } + + private void sendResponse(HttpExchange exchange, int statusCode, String response) throws IOException { + exchange.sendResponseHeaders(statusCode, response.length()); + try (OutputStream os = exchange.getResponseBody()) { + os.write(response.getBytes()); + } + } + } + + // サンプルAPIクラス + public static class UserApi { + public static String getUser(int userId) { + return "User info for ID: " + userId; + } + + public static String createUser(String name, int age) { + return "Created user: " + name + " (Age: " + age + ")"; + } + } + + public static class MathApi { + public static String add(int a, int b) { + return "Result: " + (a + b); + } + + public static String multiply(double x, double y) { + return "Result: " + (x * y); + } + } +} \ No newline at end of file From a00770de7a073811fe27edd8b247992cb34066c7 Mon Sep 17 00:00:00 2001 From: Takeshi Tsukamoto Date: Fri, 18 Oct 2024 11:15:23 +0900 Subject: [PATCH 03/28] modify server response --- pom.xml | 7 +++++++ .../saasus/sdk/util/apiserver/ApiServer.java | 16 ++++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 6ff02f61..55e18c9c 100644 --- a/pom.xml +++ b/pom.xml @@ -121,5 +121,12 @@ ${openapi-java-client} compile --> + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + 2.13.0 + + + diff --git a/src/main/java/saasus/sdk/util/apiserver/ApiServer.java b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java index f4b69dd2..07e31ae7 100644 --- a/src/main/java/saasus/sdk/util/apiserver/ApiServer.java +++ b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java @@ -1,5 +1,8 @@ package saasus.sdk.util.apiserver; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; + import com.sun.net.httpserver.HttpExchange; import com.sun.net.httpserver.HttpHandler; import com.sun.net.httpserver.HttpServer; @@ -18,6 +21,8 @@ public class ApiServer { + private static final ObjectMapper objectMapper = new ObjectMapper().registerModule(new JavaTimeModule()); + public static void start(int port) throws IOException { HttpServer server = HttpServer.create(new InetSocketAddress(port), 0); @@ -59,8 +64,9 @@ public void handle(HttpExchange exchange) throws IOException { if (method != null) { Object[] args = prepareMethodArguments(method, queryParams); - String response = (String) method.invoke(null, args); - sendResponse(exchange, 200, response); + Object response = method.invoke(null, args); + String jsonResponse = objectMapper.writeValueAsString(response); + sendResponse(exchange, 200, jsonResponse); } else { sendResponse(exchange, 404, "Method not found: " + methodName); } @@ -146,9 +152,11 @@ private Object convertParamValue(String value, Class type) { } private void sendResponse(HttpExchange exchange, int statusCode, String response) throws IOException { - exchange.sendResponseHeaders(statusCode, response.length()); + exchange.getResponseHeaders().set("Content-Type", "application/json"); + byte[] responseBytes = response.getBytes("UTF-8"); + exchange.sendResponseHeaders(statusCode, responseBytes.length); try (OutputStream os = exchange.getResponseBody()) { - os.write(response.getBytes()); + os.write(responseBytes); } } } From 5f9dd8c47ff1700477cb28039ee5915fb95f7d27 Mon Sep 17 00:00:00 2001 From: Takeshi Tsukamoto Date: Thu, 15 May 2025 16:21:59 +0900 Subject: [PATCH 04/28] add routing path --- docs/apigateway/ApiGatewayInputFile.md | 13 + docs/apigateway/ApiGatewaySettings.md | 35 + docs/apigateway/ApiGatewayTenant.md | 15 + docs/apigateway/ApiKey.md | 17 + docs/apigateway/ApiKeys.md | 13 + .../CloudFormationLaunchStackLink.md | 13 + docs/apigateway/CreateApiKeyParam.md | 15 + docs/apigateway/DnsRecord.md | 24 + docs/apigateway/EndpointSettings.md | 33 + docs/apigateway/Error.md | 14 + docs/apigateway/ErrorApi.md | 71 + docs/apigateway/SmartApiGatewayApi.md | 887 +++++++++ docs/apigateway/TenantRouting.md | 17 + docs/apigateway/TenantRoutingType.md | 17 + docs/apigateway/Throttling.md | 25 + .../UpdateApiGatewaySettingsParam.md | 24 + docs/apigateway/UpdateTenantParam.md | 14 + docs/auth/CreateSaasUserParam.md | 2 +- docs/auth/SaasUserApi.md | 2 +- docs/pricing/PricingFixedUnit.md | 10 +- docs/pricing/PricingFixedUnitForSave.md | 10 +- docs/pricing/PricingTieredUnit.md | 10 +- docs/pricing/PricingTieredUnitForSave.md | 10 +- docs/pricing/PricingTieredUsageUnit.md | 10 +- docs/pricing/PricingTieredUsageUnitForSave.md | 10 +- docs/pricing/PricingUnit.md | 10 +- docs/pricing/PricingUnitBaseProps.md | 1 - docs/pricing/PricingUnitForSave.md | 10 +- docs/pricing/PricingUsageUnit.md | 10 +- docs/pricing/PricingUsageUnitForSave.md | 10 +- generate.sh | 2 +- .../saasus/sdk/apigateway/ApiCallback.java | 62 + .../java/saasus/sdk/apigateway/ApiClient.java | 1575 +++++++++++++++ .../saasus/sdk/apigateway/ApiException.java | 165 ++ .../saasus/sdk/apigateway/ApiResponse.java | 76 + .../saasus/sdk/apigateway/Configuration.java | 41 + .../apigateway/GzipRequestInterceptor.java | 85 + src/main/java/saasus/sdk/apigateway/JSON.java | 414 ++++ src/main/java/saasus/sdk/apigateway/Pair.java | 57 + .../sdk/apigateway/ProgressRequestBody.java | 73 + .../sdk/apigateway/ProgressResponseBody.java | 70 + .../sdk/apigateway/ServerConfiguration.java | 58 + .../saasus/sdk/apigateway/ServerVariable.java | 23 + .../saasus/sdk/apigateway/StringUtil.java | 83 + .../saasus/sdk/apigateway/api/ErrorApi.java | 184 ++ .../apigateway/api/SmartApiGatewayApi.java | 1688 +++++++++++++++++ .../sdk/apigateway/auth/ApiKeyAuth.java | 80 + .../sdk/apigateway/auth/Authentication.java | 36 + .../sdk/apigateway/auth/HttpBasicAuth.java | 57 + .../sdk/apigateway/auth/HttpBearerAuth.java | 75 + .../models/AbstractOpenApiSchema.java | 146 ++ .../models/ApiGatewayInputFile.java | 214 +++ .../apigateway/models/ApiGatewaySettings.java | 895 +++++++++ .../apigateway/models/ApiGatewayTenant.java | 287 +++ .../saasus/sdk/apigateway/models/ApiKey.java | 330 ++++ .../saasus/sdk/apigateway/models/ApiKeys.java | 232 +++ .../models/CloudFormationLaunchStackLink.java | 214 +++ .../apigateway/models/CreateApiKeyParam.java | 270 +++ .../sdk/apigateway/models/DnsRecord.java | 328 ++++ .../apigateway/models/EndpointSettings.java | 383 ++++ .../saasus/sdk/apigateway/models/Error.java | 244 +++ .../sdk/apigateway/models/TenantRouting.java | 293 +++ .../apigateway/models/TenantRoutingType.java | 82 + .../sdk/apigateway/models/Throttling.java | 324 ++++ .../models/UpdateApiGatewaySettingsParam.java | 555 ++++++ .../apigateway/models/UpdateTenantParam.java | 248 +++ .../java/saasus/sdk/apilog/ApiException.java | 2 +- .../java/saasus/sdk/apilog/Configuration.java | 2 +- src/main/java/saasus/sdk/apilog/Pair.java | 2 +- .../java/saasus/sdk/apilog/StringUtil.java | 2 +- .../saasus/sdk/apilog/auth/ApiKeyAuth.java | 2 +- .../sdk/apilog/auth/HttpBearerAuth.java | 2 +- .../apilog/models/AbstractOpenApiSchema.java | 2 +- .../java/saasus/sdk/apilog/models/ApiLog.java | 2 +- .../saasus/sdk/apilog/models/ApiLogs.java | 2 +- .../java/saasus/sdk/apilog/models/Error.java | 2 +- .../java/saasus/sdk/auth/ApiException.java | 2 +- .../java/saasus/sdk/auth/Configuration.java | 2 +- src/main/java/saasus/sdk/auth/Pair.java | 2 +- src/main/java/saasus/sdk/auth/StringUtil.java | 2 +- .../java/saasus/sdk/auth/api/SaasUserApi.java | 6 +- .../java/saasus/sdk/auth/auth/ApiKeyAuth.java | 2 +- .../saasus/sdk/auth/auth/HttpBearerAuth.java | 2 +- .../auth/models/AbstractOpenApiSchema.java | 2 +- .../sdk/auth/models/AccountVerification.java | 2 +- .../java/saasus/sdk/auth/models/ApiKeys.java | 2 +- .../saasus/sdk/auth/models/Attribute.java | 2 +- .../java/saasus/sdk/auth/models/AuthInfo.java | 2 +- .../auth/models/AuthorizationTempCode.java | 2 +- .../saasus/sdk/auth/models/BasicInfo.java | 2 +- .../sdk/auth/models/BillingAddress.java | 2 +- .../saasus/sdk/auth/models/BillingInfo.java | 2 +- .../saasus/sdk/auth/models/ClientSecret.java | 2 +- .../models/CloudFormationLaunchStackLink.java | 2 +- .../auth/models/ConfirmEmailUpdateParam.java | 2 +- .../models/ConfirmExternalUserLinkParam.java | 2 +- .../ConfirmSignUpWithAwsMarketplaceParam.java | 2 +- .../sdk/auth/models/CreateSaasUserParam.java | 7 +- .../auth/models/CreateSecretCodeParam.java | 2 +- .../models/CreateTenantInvitationParam.java | 2 +- .../auth/models/CreateTenantUserParam.java | 2 +- .../models/CreateTenantUserRolesParam.java | 2 +- .../saasus/sdk/auth/models/Credentials.java | 2 +- .../sdk/auth/models/CustomizePageProps.java | 2 +- .../auth/models/CustomizePageSettings.java | 2 +- .../models/CustomizePageSettingsProps.java | 2 +- .../sdk/auth/models/CustomizePages.java | 2 +- .../sdk/auth/models/DeviceConfiguration.java | 2 +- .../saasus/sdk/auth/models/DnsRecord.java | 2 +- src/main/java/saasus/sdk/auth/models/Env.java | 2 +- .../java/saasus/sdk/auth/models/Envs.java | 2 +- .../java/saasus/sdk/auth/models/Error.java | 2 +- .../models/IdentityProviderConfiguration.java | 2 +- .../auth/models/IdentityProviderProps.java | 2 +- .../sdk/auth/models/IdentityProviderSaml.java | 2 +- .../sdk/auth/models/IdentityProviders.java | 2 +- .../saasus/sdk/auth/models/Invitation.java | 2 +- .../sdk/auth/models/InvitationValidity.java | 2 +- .../saasus/sdk/auth/models/Invitations.java | 2 +- ...nvitedUserEnvironmentInformationInner.java | 2 +- .../auth/models/LinkAwsMarketplaceParam.java | 2 +- .../sdk/auth/models/MessageTemplate.java | 2 +- .../sdk/auth/models/MfaConfiguration.java | 2 +- .../saasus/sdk/auth/models/MfaPreference.java | 2 +- .../sdk/auth/models/NotificationMessages.java | 2 +- .../sdk/auth/models/PasswordPolicy.java | 2 +- .../saasus/sdk/auth/models/PlanHistories.java | 2 +- .../saasus/sdk/auth/models/PlanHistory.java | 2 +- .../sdk/auth/models/PlanReservation.java | 2 +- .../sdk/auth/models/RecaptchaProps.java | 2 +- .../auth/models/RequestEmailUpdateParam.java | 2 +- .../models/RequestExternalUserLinkParam.java | 2 +- .../ResendSignUpConfirmationEmailParam.java | 2 +- .../java/saasus/sdk/auth/models/Role.java | 2 +- .../java/saasus/sdk/auth/models/Roles.java | 2 +- .../java/saasus/sdk/auth/models/SaasId.java | 2 +- .../java/saasus/sdk/auth/models/SaasUser.java | 2 +- .../saasus/sdk/auth/models/SaasUsers.java | 2 +- .../saasus/sdk/auth/models/SelfRegist.java | 2 +- .../sdk/auth/models/SignInSettings.java | 2 +- .../saasus/sdk/auth/models/SignUpParam.java | 2 +- .../models/SignUpWithAwsMarketplaceParam.java | 2 +- .../sdk/auth/models/SingleTenantSettings.java | 2 +- .../auth/models/SoftwareTokenSecretCode.java | 2 +- .../java/saasus/sdk/auth/models/Tenant.java | 2 +- .../sdk/auth/models/TenantAttributes.java | 2 +- .../saasus/sdk/auth/models/TenantDetail.java | 2 +- .../models/TenantIdentityProviderProps.java | 2 +- .../auth/models/TenantIdentityProviders.java | 2 +- .../models/TenantIdentityProvidersSaml.java | 2 +- .../saasus/sdk/auth/models/TenantProps.java | 2 +- .../java/saasus/sdk/auth/models/Tenants.java | 2 +- .../sdk/auth/models/UpdateBasicInfoParam.java | 2 +- .../UpdateCustomizePageSettingsParam.java | 2 +- .../models/UpdateCustomizePagesParam.java | 2 +- .../sdk/auth/models/UpdateEnvParam.java | 2 +- .../models/UpdateIdentityProviderParam.java | 2 +- .../UpdateNotificationMessagesParam.java | 2 +- .../models/UpdateSaasUserAttributesParam.java | 2 +- .../auth/models/UpdateSaasUserEmailParam.java | 2 +- .../models/UpdateSaasUserPasswordParam.java | 2 +- .../models/UpdateSignInSettingsParam.java | 2 +- .../UpdateSingleTenantSettingsParam.java | 2 +- .../auth/models/UpdateSoftwareTokenParam.java | 2 +- .../UpdateTenantIdentityProviderParam.java | 2 +- .../auth/models/UpdateTenantUserParam.java | 2 +- .../java/saasus/sdk/auth/models/User.java | 2 +- .../sdk/auth/models/UserAttributes.java | 2 +- .../sdk/auth/models/UserAvailableEnv.java | 2 +- .../sdk/auth/models/UserAvailableTenant.java | 2 +- .../java/saasus/sdk/auth/models/UserInfo.java | 2 +- .../java/saasus/sdk/auth/models/Users.java | 2 +- .../auth/models/ValidateInvitationParam.java | 2 +- .../sdk/awsmarketplace/ApiException.java | 2 +- .../sdk/awsmarketplace/Configuration.java | 2 +- .../java/saasus/sdk/awsmarketplace/Pair.java | 2 +- .../saasus/sdk/awsmarketplace/StringUtil.java | 2 +- .../sdk/awsmarketplace/auth/ApiKeyAuth.java | 2 +- .../awsmarketplace/auth/HttpBearerAuth.java | 2 +- .../models/AbstractOpenApiSchema.java | 2 +- .../models/CatalogEntityVisibility.java | 2 +- .../models/CloudFormationLaunchStackLink.java | 2 +- .../models/CreateCustomerParam.java | 2 +- .../sdk/awsmarketplace/models/Customer.java | 2 +- .../sdk/awsmarketplace/models/Customers.java | 2 +- .../sdk/awsmarketplace/models/Error.java | 2 +- .../models/GetListingStatusResult.java | 2 +- .../sdk/awsmarketplace/models/Plan.java | 2 +- .../sdk/awsmarketplace/models/Plans.java | 2 +- .../awsmarketplace/models/SavePlanParam.java | 2 +- .../sdk/awsmarketplace/models/Settings.java | 2 +- .../models/UpdateListingStatusParam.java | 2 +- .../models/UpdateSettingsParam.java | 2 +- .../models/VerifyRegistrationTokenParam.java | 2 +- .../java/saasus/sdk/billing/ApiException.java | 2 +- .../saasus/sdk/billing/Configuration.java | 2 +- src/main/java/saasus/sdk/billing/Pair.java | 2 +- .../java/saasus/sdk/billing/StringUtil.java | 2 +- .../saasus/sdk/billing/auth/ApiKeyAuth.java | 2 +- .../sdk/billing/auth/HttpBearerAuth.java | 2 +- .../billing/models/AbstractOpenApiSchema.java | 2 +- .../java/saasus/sdk/billing/models/Error.java | 2 +- .../saasus/sdk/billing/models/StripeInfo.java | 2 +- .../billing/models/UpdateStripeInfoParam.java | 2 +- .../sdk/communication/ApiException.java | 2 +- .../sdk/communication/Configuration.java | 2 +- .../java/saasus/sdk/communication/Pair.java | 2 +- .../saasus/sdk/communication/StringUtil.java | 2 +- .../sdk/communication/auth/ApiKeyAuth.java | 2 +- .../communication/auth/HttpBearerAuth.java | 2 +- .../models/AbstractOpenApiSchema.java | 2 +- .../sdk/communication/models/Comment.java | 2 +- .../sdk/communication/models/Comments.java | 2 +- .../models/CreateFeedbackCommentParam.java | 2 +- .../models/CreateFeedbackParam.java | 2 +- .../models/CreateVoteUserParam.java | 2 +- .../sdk/communication/models/Error.java | 2 +- .../sdk/communication/models/Feedback.java | 2 +- .../models/FeedbackSaveProps.java | 2 +- .../sdk/communication/models/Feedbacks.java | 2 +- .../models/UpdateFeedbackCommentParam.java | 2 +- .../models/UpdateFeedbackParam.java | 2 +- .../models/UpdateFeedbackStatusParam.java | 2 +- .../saasus/sdk/communication/models/User.java | 2 +- .../sdk/communication/models/Users.java | 2 +- .../sdk/communication/models/Votes.java | 2 +- .../saasus/sdk/integration/ApiException.java | 2 +- .../saasus/sdk/integration/Configuration.java | 2 +- .../java/saasus/sdk/integration/Pair.java | 2 +- .../saasus/sdk/integration/StringUtil.java | 2 +- .../sdk/integration/auth/ApiKeyAuth.java | 2 +- .../sdk/integration/auth/HttpBearerAuth.java | 2 +- .../models/AbstractOpenApiSchema.java | 2 +- .../models/CreateEventBridgeEventParam.java | 2 +- .../saasus/sdk/integration/models/Error.java | 2 +- .../models/EventBridgeSettings.java | 2 +- .../sdk/integration/models/EventMessage.java | 2 +- .../sdk/modules/ApiGatewayApiClient.java | 65 + .../saasus/sdk/modules/Configuration.java | 6 + .../java/saasus/sdk/pricing/ApiException.java | 2 +- .../saasus/sdk/pricing/Configuration.java | 2 +- src/main/java/saasus/sdk/pricing/JSON.java | 4 +- src/main/java/saasus/sdk/pricing/Pair.java | 2 +- .../java/saasus/sdk/pricing/StringUtil.java | 2 +- .../saasus/sdk/pricing/auth/ApiKeyAuth.java | 2 +- .../sdk/pricing/auth/HttpBearerAuth.java | 2 +- .../pricing/models/AbstractOpenApiSchema.java | 2 +- .../java/saasus/sdk/pricing/models/Error.java | 2 +- .../sdk/pricing/models/MeteringUnit.java | 2 +- .../sdk/pricing/models/MeteringUnitCount.java | 2 +- .../pricing/models/MeteringUnitDateCount.java | 2 +- .../models/MeteringUnitDateCounts.java | 2 +- .../models/MeteringUnitDatePeriodCounts.java | 2 +- .../models/MeteringUnitMonthCount.java | 2 +- .../models/MeteringUnitMonthCounts.java | 2 +- .../sdk/pricing/models/MeteringUnitProps.java | 2 +- .../models/MeteringUnitTimestampCount.java | 2 +- .../sdk/pricing/models/MeteringUnits.java | 2 +- .../sdk/pricing/models/PricingFixedUnit.java | 116 +- .../models/PricingFixedUnitForSave.java | 118 +- .../sdk/pricing/models/PricingMenu.java | 2 +- .../sdk/pricing/models/PricingMenuProps.java | 2 +- .../sdk/pricing/models/PricingMenus.java | 2 +- .../sdk/pricing/models/PricingPlan.java | 2 +- .../sdk/pricing/models/PricingPlanProps.java | 2 +- .../sdk/pricing/models/PricingPlans.java | 2 +- .../sdk/pricing/models/PricingTier.java | 2 +- .../sdk/pricing/models/PricingTieredUnit.java | 116 +- .../models/PricingTieredUnitForSave.java | 118 +- .../models/PricingTieredUsageUnit.java | 116 +- .../models/PricingTieredUsageUnitForSave.java | 118 +- .../sdk/pricing/models/PricingTiers.java | 2 +- .../sdk/pricing/models/PricingUnit.java | 13 +- .../pricing/models/PricingUnitBaseProps.java | 34 +- .../pricing/models/PricingUnitForSave.java | 13 +- .../sdk/pricing/models/PricingUnits.java | 2 +- .../sdk/pricing/models/PricingUsageUnit.java | 116 +- .../models/PricingUsageUnitForSave.java | 118 +- .../pricing/models/SavePricingMenuParam.java | 2 +- .../pricing/models/SavePricingPlanParam.java | 2 +- .../saasus/sdk/pricing/models/TaxRate.java | 2 +- .../sdk/pricing/models/TaxRateProps.java | 2 +- .../saasus/sdk/pricing/models/TaxRates.java | 2 +- ...ateMeteringUnitTimestampCountNowParam.java | 2 +- ...UpdateMeteringUnitTimestampCountParam.java | 2 +- .../models/UpdatePricingPlansUsedParam.java | 2 +- .../pricing/models/UpdateTaxRateParam.java | 2 +- .../saasus/sdk/util/apiserver/ApiServer.java | 128 ++ .../sdk/apigateway/api/ErrorApiTest.java | 47 + .../api/SmartApiGatewayApiTest.java | 224 +++ .../models/ApiGatewayInputFileTest.java | 48 + .../models/ApiGatewaySettingsTest.java | 229 +++ .../models/ApiGatewayTenantTest.java | 67 + .../sdk/apigateway/models/ApiKeyTest.java | 80 + .../sdk/apigateway/models/ApiKeysTest.java | 51 + .../CloudFormationLaunchStackLinkTest.java | 48 + .../models/CreateApiKeyParamTest.java | 64 + .../sdk/apigateway/models/DnsRecordTest.java | 64 + .../models/EndpointSettingsTest.java | 75 + .../sdk/apigateway/models/ErrorTest.java | 56 + .../apigateway/models/TenantRoutingTest.java | 72 + .../models/TenantRoutingTypeTest.java | 32 + .../sdk/apigateway/models/ThrottlingTest.java | 64 + .../UpdateApiGatewaySettingsParamTest.java | 140 ++ .../models/UpdateTenantParamTest.java | 59 + .../saasus/sdk/auth/api/SaasUserApiTest.java | 2 +- .../models/PricingFixedUnitForSaveTest.java | 17 +- .../pricing/models/PricingFixedUnitTest.java | 17 +- .../models/PricingTieredUnitForSaveTest.java | 17 +- .../pricing/models/PricingTieredUnitTest.java | 17 +- .../PricingTieredUsageUnitForSaveTest.java | 17 +- .../models/PricingTieredUsageUnitTest.java | 17 +- .../models/PricingUnitBasePropsTest.java | 9 - .../models/PricingUnitForSaveTest.java | 17 +- .../sdk/pricing/models/PricingUnitTest.java | 17 +- .../models/PricingUsageUnitForSaveTest.java | 17 +- .../pricing/models/PricingUsageUnitTest.java | 17 +- 317 files changed, 13890 insertions(+), 634 deletions(-) create mode 100644 docs/apigateway/ApiGatewayInputFile.md create mode 100644 docs/apigateway/ApiGatewaySettings.md create mode 100644 docs/apigateway/ApiGatewayTenant.md create mode 100644 docs/apigateway/ApiKey.md create mode 100644 docs/apigateway/ApiKeys.md create mode 100644 docs/apigateway/CloudFormationLaunchStackLink.md create mode 100644 docs/apigateway/CreateApiKeyParam.md create mode 100644 docs/apigateway/DnsRecord.md create mode 100644 docs/apigateway/EndpointSettings.md create mode 100644 docs/apigateway/Error.md create mode 100644 docs/apigateway/ErrorApi.md create mode 100644 docs/apigateway/SmartApiGatewayApi.md create mode 100644 docs/apigateway/TenantRouting.md create mode 100644 docs/apigateway/TenantRoutingType.md create mode 100644 docs/apigateway/Throttling.md create mode 100644 docs/apigateway/UpdateApiGatewaySettingsParam.md create mode 100644 docs/apigateway/UpdateTenantParam.md create mode 100644 src/main/java/saasus/sdk/apigateway/ApiCallback.java create mode 100644 src/main/java/saasus/sdk/apigateway/ApiClient.java create mode 100644 src/main/java/saasus/sdk/apigateway/ApiException.java create mode 100644 src/main/java/saasus/sdk/apigateway/ApiResponse.java create mode 100644 src/main/java/saasus/sdk/apigateway/Configuration.java create mode 100644 src/main/java/saasus/sdk/apigateway/GzipRequestInterceptor.java create mode 100644 src/main/java/saasus/sdk/apigateway/JSON.java create mode 100644 src/main/java/saasus/sdk/apigateway/Pair.java create mode 100644 src/main/java/saasus/sdk/apigateway/ProgressRequestBody.java create mode 100644 src/main/java/saasus/sdk/apigateway/ProgressResponseBody.java create mode 100644 src/main/java/saasus/sdk/apigateway/ServerConfiguration.java create mode 100644 src/main/java/saasus/sdk/apigateway/ServerVariable.java create mode 100644 src/main/java/saasus/sdk/apigateway/StringUtil.java create mode 100644 src/main/java/saasus/sdk/apigateway/api/ErrorApi.java create mode 100644 src/main/java/saasus/sdk/apigateway/api/SmartApiGatewayApi.java create mode 100644 src/main/java/saasus/sdk/apigateway/auth/ApiKeyAuth.java create mode 100644 src/main/java/saasus/sdk/apigateway/auth/Authentication.java create mode 100644 src/main/java/saasus/sdk/apigateway/auth/HttpBasicAuth.java create mode 100644 src/main/java/saasus/sdk/apigateway/auth/HttpBearerAuth.java create mode 100644 src/main/java/saasus/sdk/apigateway/models/AbstractOpenApiSchema.java create mode 100644 src/main/java/saasus/sdk/apigateway/models/ApiGatewayInputFile.java create mode 100644 src/main/java/saasus/sdk/apigateway/models/ApiGatewaySettings.java create mode 100644 src/main/java/saasus/sdk/apigateway/models/ApiGatewayTenant.java create mode 100644 src/main/java/saasus/sdk/apigateway/models/ApiKey.java create mode 100644 src/main/java/saasus/sdk/apigateway/models/ApiKeys.java create mode 100644 src/main/java/saasus/sdk/apigateway/models/CloudFormationLaunchStackLink.java create mode 100644 src/main/java/saasus/sdk/apigateway/models/CreateApiKeyParam.java create mode 100644 src/main/java/saasus/sdk/apigateway/models/DnsRecord.java create mode 100644 src/main/java/saasus/sdk/apigateway/models/EndpointSettings.java create mode 100644 src/main/java/saasus/sdk/apigateway/models/Error.java create mode 100644 src/main/java/saasus/sdk/apigateway/models/TenantRouting.java create mode 100644 src/main/java/saasus/sdk/apigateway/models/TenantRoutingType.java create mode 100644 src/main/java/saasus/sdk/apigateway/models/Throttling.java create mode 100644 src/main/java/saasus/sdk/apigateway/models/UpdateApiGatewaySettingsParam.java create mode 100644 src/main/java/saasus/sdk/apigateway/models/UpdateTenantParam.java create mode 100644 src/main/java/saasus/sdk/modules/ApiGatewayApiClient.java create mode 100644 src/test/java/saasus/sdk/apigateway/api/ErrorApiTest.java create mode 100644 src/test/java/saasus/sdk/apigateway/api/SmartApiGatewayApiTest.java create mode 100644 src/test/java/saasus/sdk/apigateway/models/ApiGatewayInputFileTest.java create mode 100644 src/test/java/saasus/sdk/apigateway/models/ApiGatewaySettingsTest.java create mode 100644 src/test/java/saasus/sdk/apigateway/models/ApiGatewayTenantTest.java create mode 100644 src/test/java/saasus/sdk/apigateway/models/ApiKeyTest.java create mode 100644 src/test/java/saasus/sdk/apigateway/models/ApiKeysTest.java create mode 100644 src/test/java/saasus/sdk/apigateway/models/CloudFormationLaunchStackLinkTest.java create mode 100644 src/test/java/saasus/sdk/apigateway/models/CreateApiKeyParamTest.java create mode 100644 src/test/java/saasus/sdk/apigateway/models/DnsRecordTest.java create mode 100644 src/test/java/saasus/sdk/apigateway/models/EndpointSettingsTest.java create mode 100644 src/test/java/saasus/sdk/apigateway/models/ErrorTest.java create mode 100644 src/test/java/saasus/sdk/apigateway/models/TenantRoutingTest.java create mode 100644 src/test/java/saasus/sdk/apigateway/models/TenantRoutingTypeTest.java create mode 100644 src/test/java/saasus/sdk/apigateway/models/ThrottlingTest.java create mode 100644 src/test/java/saasus/sdk/apigateway/models/UpdateApiGatewaySettingsParamTest.java create mode 100644 src/test/java/saasus/sdk/apigateway/models/UpdateTenantParamTest.java diff --git a/docs/apigateway/ApiGatewayInputFile.md b/docs/apigateway/ApiGatewayInputFile.md new file mode 100644 index 00000000..ee6873ce --- /dev/null +++ b/docs/apigateway/ApiGatewayInputFile.md @@ -0,0 +1,13 @@ + + +# ApiGatewayInputFile + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**content** | **String** | The content of the file to be uploaded to create an API Gateway. | | + + + diff --git a/docs/apigateway/ApiGatewaySettings.md b/docs/apigateway/ApiGatewaySettings.md new file mode 100644 index 00000000..9fb6d962 --- /dev/null +++ b/docs/apigateway/ApiGatewaySettings.md @@ -0,0 +1,35 @@ + + +# ApiGatewaySettings + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**generatedFileStatus** | **String** | Status of automatically generated files | | +|**internalEndpointOpenapiDefinitionFileDownloadUrl** | **String** | URL to download the auto-generated openapi definition file, which will be used to build the API Gateway. | | +|**internalEndpointMappingFileDownloadUrl** | **String** | The download URL for the auto-generated internal endpoint mapping file, which will be used to build the API Gateway. | | +|**status** | **String** | API Gateway creation status | | +|**roleArn** | **String** | ARN of the role for SaaSus Platform to AssumeRole | | +|**roleExternalId** | **String** | External id used by SaaSus when AssumeRole to operate SaaS | | +|**internalEndpointHealthCheckPath** | **String** | The path to be used for health checks on the internal endpoint. | | +|**internalEndpointHealthCheckPort** | **Integer** | The port to be used for health checks on the internal endpoint. | | +|**internalEndpointHealthCheckProtocol** | **String** | The protocol to be used for health checks on the internal endpoint. | | +|**internalEndpointHealthStatusCodes** | **String** | The status codes to be used for health checks on the internal endpoint. | | +|**saasSubnetIds** | **List<String>** | Subnet IDs for SaaS | | +|**saasVpcId** | **String** | VPC ID for SaaS | | +|**domainName** | **String** | Domain Name | | +|**isDnsValidated** | **Boolean** | DNS Record Verification Results | | +|**certificateDnsRecord** | [**DnsRecord**](DnsRecord.md) | | | +|**cloudFrontDnsRecord** | [**DnsRecord**](DnsRecord.md) | | | +|**vpcEndpointDnsRecord** | [**DnsRecord**](DnsRecord.md) | | | +|**defaultDomainName** | **String** | Default Domain Name | | +|**saasAlbArn** | **String** | SaaS Application Load Balancer ARN | | +|**restApiEndpoint** | **String** | The endpoint for the REST API | | +|**endpointSettingsList** | [**List<EndpointSettings>**](EndpointSettings.md) | Endpoint Settings List | | +|**tenantRoutingType** | **TenantRoutingType** | | | +|**docsCloudFrontFqdn** | **String** | CloudFront FQDN for Smart API Gateway Documentation | | + + + diff --git a/docs/apigateway/ApiGatewayTenant.md b/docs/apigateway/ApiGatewayTenant.md new file mode 100644 index 00000000..a89fbc6d --- /dev/null +++ b/docs/apigateway/ApiGatewayTenant.md @@ -0,0 +1,15 @@ + + +# ApiGatewayTenant + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | | +|**allowedIps** | **List<String>** | Allowed IP addresses in CIDR format | | +|**routing** | [**TenantRouting**](TenantRouting.md) | | | + + + diff --git a/docs/apigateway/ApiKey.md b/docs/apigateway/ApiKey.md new file mode 100644 index 00000000..e01774bd --- /dev/null +++ b/docs/apigateway/ApiKey.md @@ -0,0 +1,17 @@ + + +# ApiKey + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**apiKey** | **String** | API Key | | +|**clientSecret** | **String** | Client secret | | +|**tenantId** | **String** | | | +|**envId** | **Integer** | | | +|**userId** | **String** | | [optional] | + + + diff --git a/docs/apigateway/ApiKeys.md b/docs/apigateway/ApiKeys.md new file mode 100644 index 00000000..f9243a93 --- /dev/null +++ b/docs/apigateway/ApiKeys.md @@ -0,0 +1,13 @@ + + +# ApiKeys + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**apiKeys** | [**List<ApiKey>**](ApiKey.md) | | | + + + diff --git a/docs/apigateway/CloudFormationLaunchStackLink.md b/docs/apigateway/CloudFormationLaunchStackLink.md new file mode 100644 index 00000000..fed8a033 --- /dev/null +++ b/docs/apigateway/CloudFormationLaunchStackLink.md @@ -0,0 +1,13 @@ + + +# CloudFormationLaunchStackLink + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**link** | **String** | | | + + + diff --git a/docs/apigateway/CreateApiKeyParam.md b/docs/apigateway/CreateApiKeyParam.md new file mode 100644 index 00000000..d94e4483 --- /dev/null +++ b/docs/apigateway/CreateApiKeyParam.md @@ -0,0 +1,15 @@ + + +# CreateApiKeyParam + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**tenantId** | **String** | | | +|**envId** | **Integer** | | | +|**userId** | **String** | | [optional] | + + + diff --git a/docs/apigateway/DnsRecord.md b/docs/apigateway/DnsRecord.md new file mode 100644 index 00000000..a8c795a8 --- /dev/null +++ b/docs/apigateway/DnsRecord.md @@ -0,0 +1,24 @@ + + +# DnsRecord + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | CNAME Resource Record | | +|**name** | **String** | Record Name | | +|**value** | **String** | Value | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| CNAME | "CNAME" | +| TXT | "TXT" | + + + diff --git a/docs/apigateway/EndpointSettings.md b/docs/apigateway/EndpointSettings.md new file mode 100644 index 00000000..572c8d12 --- /dev/null +++ b/docs/apigateway/EndpointSettings.md @@ -0,0 +1,33 @@ + + +# EndpointSettings + +Settings per endpoint + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**path** | **String** | Path | | +|**method** | [**MethodEnum**](#MethodEnum) | Method | | +|**throttling** | [**Throttling**](Throttling.md) | | [optional] | +|**roleNames** | **List<String>** | Role names that can access the endpoint | [optional] | + + + +## Enum: MethodEnum + +| Name | Value | +|---- | -----| +| GET | "GET" | +| HEAD | "HEAD" | +| POST | "POST" | +| PUT | "PUT" | +| PATCH | "PATCH" | +| DELETE | "DELETE" | +| CONNECT | "CONNECT" | +| OPTIONS | "OPTIONS" | +| TRACE | "TRACE" | + + + diff --git a/docs/apigateway/Error.md b/docs/apigateway/Error.md new file mode 100644 index 00000000..f6060afa --- /dev/null +++ b/docs/apigateway/Error.md @@ -0,0 +1,14 @@ + + +# Error + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **String** | | | +|**message** | **String** | | | + + + diff --git a/docs/apigateway/ErrorApi.md b/docs/apigateway/ErrorApi.md new file mode 100644 index 00000000..b45262b5 --- /dev/null +++ b/docs/apigateway/ErrorApi.md @@ -0,0 +1,71 @@ +# ErrorApi + +All URIs are relative to *https://api.saasus.io/v1/apigateway* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**returnInternalServerError**](ErrorApi.md#returnInternalServerError) | **GET** /errors/internal-server-error | Return Internal Server Error | + + + +# **returnInternalServerError** +> returnInternalServerError() + +Return Internal Server Error + +This endpoint is used for testing purposes. Returns a server error with status code 500. + +### Example +```java +// Import classes: +import saasus.sdk.apigateway.ApiClient; +import saasus.sdk.apigateway.ApiException; +import saasus.sdk.apigateway.Configuration; +import saasus.sdk.apigateway.auth.*; +import saasus.sdk.apigateway.models.*; +import saasus.sdk.apigateway.api.ErrorApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.saasus.io/v1/apigateway"); + + // Configure HTTP bearer authorization: Bearer + HttpBearerAuth Bearer = (HttpBearerAuth) defaultClient.getAuthentication("Bearer"); + Bearer.setBearerToken("BEARER TOKEN"); + + ErrorApi apiInstance = new ErrorApi(defaultClient); + try { + apiInstance.returnInternalServerError(); + } catch (ApiException e) { + System.err.println("Exception when calling ErrorApi#returnInternalServerError"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +null (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **500** | Internal Server Error | - | + diff --git a/docs/apigateway/SmartApiGatewayApi.md b/docs/apigateway/SmartApiGatewayApi.md new file mode 100644 index 00000000..2ca99762 --- /dev/null +++ b/docs/apigateway/SmartApiGatewayApi.md @@ -0,0 +1,887 @@ +# SmartApiGatewayApi + +All URIs are relative to *https://api.saasus.io/v1/apigateway* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createApiGateway**](SmartApiGatewayApi.md#createApiGateway) | **POST** /create | Create the API Gateway | +| [**createApiKey**](SmartApiGatewayApi.md#createApiKey) | **POST** /api-keys | Create an API key | +| [**getApiGatewaySettings**](SmartApiGatewayApi.md#getApiGatewaySettings) | **GET** /settings | Obtain configuration information for api gateway function | +| [**getApiKey**](SmartApiGatewayApi.md#getApiKey) | **GET** /api-keys/{api_key} | get API key details by API key | +| [**getApiKeys**](SmartApiGatewayApi.md#getApiKeys) | **GET** /api-keys | API key list or get API key by condition | +| [**getCloudFormationLaunchStackLink**](SmartApiGatewayApi.md#getCloudFormationLaunchStackLink) | **GET** /cloudformation-launch-stack-link | Get the link to create the AWS CloudFormation stack | +| [**getTenant**](SmartApiGatewayApi.md#getTenant) | **GET** /tenants/{tenant_id} | Get tenant information | +| [**publishApiGateway**](SmartApiGatewayApi.md#publishApiGateway) | **POST** /publish | Publish the API Gateway | +| [**refreshClientSecret**](SmartApiGatewayApi.md#refreshClientSecret) | **POST** /api-keys/{api_key}/client-secret | Update the client secret of the API key | +| [**unpublishApiGateway**](SmartApiGatewayApi.md#unpublishApiGateway) | **POST** /unpublish | Unpublish the API Gateway | +| [**updateApiGatewaySettings**](SmartApiGatewayApi.md#updateApiGatewaySettings) | **PATCH** /settings | Update configuration information for api gateway function | +| [**updateTenant**](SmartApiGatewayApi.md#updateTenant) | **PATCH** /tenants/{tenant_id} | Update tenant information | +| [**uploadGenerationFiles**](SmartApiGatewayApi.md#uploadGenerationFiles) | **POST** /upload | Upload files to create an API Gateway | + + + +# **createApiGateway** +> createApiGateway() + +Create the API Gateway + +Create the API Gateway. + +### Example +```java +// Import classes: +import saasus.sdk.apigateway.ApiClient; +import saasus.sdk.apigateway.ApiException; +import saasus.sdk.apigateway.Configuration; +import saasus.sdk.apigateway.auth.*; +import saasus.sdk.apigateway.models.*; +import saasus.sdk.apigateway.api.SmartApiGatewayApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.saasus.io/v1/apigateway"); + + // Configure HTTP bearer authorization: Bearer + HttpBearerAuth Bearer = (HttpBearerAuth) defaultClient.getAuthentication("Bearer"); + Bearer.setBearerToken("BEARER TOKEN"); + + SmartApiGatewayApi apiInstance = new SmartApiGatewayApi(defaultClient); + try { + apiInstance.createApiGateway(); + } catch (ApiException e) { + System.err.println("Exception when calling SmartApiGatewayApi#createApiGateway"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +null (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **500** | Internal Server Error | - | + + +# **createApiKey** +> ApiKey createApiKey(createApiKeyParam) + +Create an API key + +Creates or updates an API key based on the contents of the request body. All parameters are in the request body: - tenant_id, env_id (required) - user_id (optional) + +### Example +```java +// Import classes: +import saasus.sdk.apigateway.ApiClient; +import saasus.sdk.apigateway.ApiException; +import saasus.sdk.apigateway.Configuration; +import saasus.sdk.apigateway.auth.*; +import saasus.sdk.apigateway.models.*; +import saasus.sdk.apigateway.api.SmartApiGatewayApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.saasus.io/v1/apigateway"); + + // Configure HTTP bearer authorization: Bearer + HttpBearerAuth Bearer = (HttpBearerAuth) defaultClient.getAuthentication("Bearer"); + Bearer.setBearerToken("BEARER TOKEN"); + + SmartApiGatewayApi apiInstance = new SmartApiGatewayApi(defaultClient); + CreateApiKeyParam createApiKeyParam = new CreateApiKeyParam(); // CreateApiKeyParam | Payload for API key creation or update. + try { + ApiKey result = apiInstance.createApiKey(createApiKeyParam); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SmartApiGatewayApi#createApiKey"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **createApiKeyParam** | [**CreateApiKeyParam**](CreateApiKeyParam.md)| Payload for API key creation or update. | | + +### Return type + +[**ApiKey**](ApiKey.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | - | +| **500** | Internal Server Error | - | + + +# **getApiGatewaySettings** +> ApiGatewaySettings getApiGatewaySettings() + +Obtain configuration information for api gateway function + +Obtain configuration information for api gateway function. + +### Example +```java +// Import classes: +import saasus.sdk.apigateway.ApiClient; +import saasus.sdk.apigateway.ApiException; +import saasus.sdk.apigateway.Configuration; +import saasus.sdk.apigateway.auth.*; +import saasus.sdk.apigateway.models.*; +import saasus.sdk.apigateway.api.SmartApiGatewayApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.saasus.io/v1/apigateway"); + + // Configure HTTP bearer authorization: Bearer + HttpBearerAuth Bearer = (HttpBearerAuth) defaultClient.getAuthentication("Bearer"); + Bearer.setBearerToken("BEARER TOKEN"); + + SmartApiGatewayApi apiInstance = new SmartApiGatewayApi(defaultClient); + try { + ApiGatewaySettings result = apiInstance.getApiGatewaySettings(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SmartApiGatewayApi#getApiGatewaySettings"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**ApiGatewaySettings**](ApiGatewaySettings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **500** | Internal Server Error | - | + + +# **getApiKey** +> ApiKey getApiKey(apiKey) + +get API key details by API key + +Get the details of the API key by specifying the API key. + +### Example +```java +// Import classes: +import saasus.sdk.apigateway.ApiClient; +import saasus.sdk.apigateway.ApiException; +import saasus.sdk.apigateway.Configuration; +import saasus.sdk.apigateway.auth.*; +import saasus.sdk.apigateway.models.*; +import saasus.sdk.apigateway.api.SmartApiGatewayApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.saasus.io/v1/apigateway"); + + // Configure HTTP bearer authorization: Bearer + HttpBearerAuth Bearer = (HttpBearerAuth) defaultClient.getAuthentication("Bearer"); + Bearer.setBearerToken("BEARER TOKEN"); + + SmartApiGatewayApi apiInstance = new SmartApiGatewayApi(defaultClient); + String apiKey = "1234567890abcdef"; // String | API Key + try { + ApiKey result = apiInstance.getApiKey(apiKey); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SmartApiGatewayApi#getApiKey"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **apiKey** | **String**| API Key | | + +### Return type + +[**ApiKey**](ApiKey.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **500** | Internal Server Error | - | + + +# **getApiKeys** +> ApiKeys getApiKeys(tenantId, envId, userId, tenantOnly) + +API key list or get API key by condition + +The response content changes based on the combination of parameters tenant_id, env_id, and user_id. - If tenant_id is not specified, the full list is returned. - If only tenant_id is specified, the API keys within that tenant are returned. - If tenant_id and env_id are specified, the keys are filtered by the environment. - If tenant_id, env_id, and user_id are specified, a complete match returns the API keys for the target user. - Additionally, searching is supported even when only env_id or only user_id are provided. + +### Example +```java +// Import classes: +import saasus.sdk.apigateway.ApiClient; +import saasus.sdk.apigateway.ApiException; +import saasus.sdk.apigateway.Configuration; +import saasus.sdk.apigateway.auth.*; +import saasus.sdk.apigateway.models.*; +import saasus.sdk.apigateway.api.SmartApiGatewayApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.saasus.io/v1/apigateway"); + + // Configure HTTP bearer authorization: Bearer + HttpBearerAuth Bearer = (HttpBearerAuth) defaultClient.getAuthentication("Bearer"); + Bearer.setBearerToken("BEARER TOKEN"); + + SmartApiGatewayApi apiInstance = new SmartApiGatewayApi(defaultClient); + String tenantId = "tenantId_example"; // String | If specified, the API keys for the target tenant are returned. + Integer envId = 56; // Integer | If specified, the API keys for the target environment are returned. + String userId = "userId_example"; // String | If specified, the API keys for the target user (up to 2) are returned. + Boolean tenantOnly = true; // Boolean | If true, only API keys that do not have a User_id specified are returned. + try { + ApiKeys result = apiInstance.getApiKeys(tenantId, envId, userId, tenantOnly); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SmartApiGatewayApi#getApiKeys"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| If specified, the API keys for the target tenant are returned. | [optional] | +| **envId** | **Integer**| If specified, the API keys for the target environment are returned. | [optional] | +| **userId** | **String**| If specified, the API keys for the target user (up to 2) are returned. | [optional] | +| **tenantOnly** | **Boolean**| If true, only API keys that do not have a User_id specified are returned. | [optional] | + +### Return type + +[**ApiKeys**](ApiKeys.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **500** | Internal Server Error | - | + + +# **getCloudFormationLaunchStackLink** +> CloudFormationLaunchStackLink getCloudFormationLaunchStackLink() + +Get the link to create the AWS CloudFormation stack + +Get the CloudFormation Quick Create link. + +### Example +```java +// Import classes: +import saasus.sdk.apigateway.ApiClient; +import saasus.sdk.apigateway.ApiException; +import saasus.sdk.apigateway.Configuration; +import saasus.sdk.apigateway.auth.*; +import saasus.sdk.apigateway.models.*; +import saasus.sdk.apigateway.api.SmartApiGatewayApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.saasus.io/v1/apigateway"); + + // Configure HTTP bearer authorization: Bearer + HttpBearerAuth Bearer = (HttpBearerAuth) defaultClient.getAuthentication("Bearer"); + Bearer.setBearerToken("BEARER TOKEN"); + + SmartApiGatewayApi apiInstance = new SmartApiGatewayApi(defaultClient); + try { + CloudFormationLaunchStackLink result = apiInstance.getCloudFormationLaunchStackLink(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SmartApiGatewayApi#getCloudFormationLaunchStackLink"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CloudFormationLaunchStackLink**](CloudFormationLaunchStackLink.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **500** | Internal Server Error | - | + + +# **getTenant** +> ApiGatewayTenant getTenant(tenantId) + +Get tenant information + +Get tenant information. + +### Example +```java +// Import classes: +import saasus.sdk.apigateway.ApiClient; +import saasus.sdk.apigateway.ApiException; +import saasus.sdk.apigateway.Configuration; +import saasus.sdk.apigateway.auth.*; +import saasus.sdk.apigateway.models.*; +import saasus.sdk.apigateway.api.SmartApiGatewayApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.saasus.io/v1/apigateway"); + + // Configure HTTP bearer authorization: Bearer + HttpBearerAuth Bearer = (HttpBearerAuth) defaultClient.getAuthentication("Bearer"); + Bearer.setBearerToken("BEARER TOKEN"); + + SmartApiGatewayApi apiInstance = new SmartApiGatewayApi(defaultClient); + String tenantId = "tenantId_example"; // String | Tenant ID + try { + ApiGatewayTenant result = apiInstance.getTenant(tenantId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SmartApiGatewayApi#getTenant"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| Tenant ID | | + +### Return type + +[**ApiGatewayTenant**](ApiGatewayTenant.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **500** | Internal Server Error | - | + + +# **publishApiGateway** +> publishApiGateway() + +Publish the API Gateway + +Publish the API Gateway. + +### Example +```java +// Import classes: +import saasus.sdk.apigateway.ApiClient; +import saasus.sdk.apigateway.ApiException; +import saasus.sdk.apigateway.Configuration; +import saasus.sdk.apigateway.auth.*; +import saasus.sdk.apigateway.models.*; +import saasus.sdk.apigateway.api.SmartApiGatewayApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.saasus.io/v1/apigateway"); + + // Configure HTTP bearer authorization: Bearer + HttpBearerAuth Bearer = (HttpBearerAuth) defaultClient.getAuthentication("Bearer"); + Bearer.setBearerToken("BEARER TOKEN"); + + SmartApiGatewayApi apiInstance = new SmartApiGatewayApi(defaultClient); + try { + apiInstance.publishApiGateway(); + } catch (ApiException e) { + System.err.println("Exception when calling SmartApiGatewayApi#publishApiGateway"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +null (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **500** | Internal Server Error | - | + + +# **refreshClientSecret** +> ApiKey refreshClientSecret(apiKey) + +Update the client secret of the API key + +Update the client secret of the API key. + +### Example +```java +// Import classes: +import saasus.sdk.apigateway.ApiClient; +import saasus.sdk.apigateway.ApiException; +import saasus.sdk.apigateway.Configuration; +import saasus.sdk.apigateway.auth.*; +import saasus.sdk.apigateway.models.*; +import saasus.sdk.apigateway.api.SmartApiGatewayApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.saasus.io/v1/apigateway"); + + // Configure HTTP bearer authorization: Bearer + HttpBearerAuth Bearer = (HttpBearerAuth) defaultClient.getAuthentication("Bearer"); + Bearer.setBearerToken("BEARER TOKEN"); + + SmartApiGatewayApi apiInstance = new SmartApiGatewayApi(defaultClient); + String apiKey = "1234567890abcdef"; // String | API Key + try { + ApiKey result = apiInstance.refreshClientSecret(apiKey); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SmartApiGatewayApi#refreshClientSecret"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **apiKey** | **String**| API Key | | + +### Return type + +[**ApiKey**](ApiKey.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **500** | Internal Server Error | - | + + +# **unpublishApiGateway** +> unpublishApiGateway() + +Unpublish the API Gateway + +Unpublish the API Gateway. + +### Example +```java +// Import classes: +import saasus.sdk.apigateway.ApiClient; +import saasus.sdk.apigateway.ApiException; +import saasus.sdk.apigateway.Configuration; +import saasus.sdk.apigateway.auth.*; +import saasus.sdk.apigateway.models.*; +import saasus.sdk.apigateway.api.SmartApiGatewayApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.saasus.io/v1/apigateway"); + + // Configure HTTP bearer authorization: Bearer + HttpBearerAuth Bearer = (HttpBearerAuth) defaultClient.getAuthentication("Bearer"); + Bearer.setBearerToken("BEARER TOKEN"); + + SmartApiGatewayApi apiInstance = new SmartApiGatewayApi(defaultClient); + try { + apiInstance.unpublishApiGateway(); + } catch (ApiException e) { + System.err.println("Exception when calling SmartApiGatewayApi#unpublishApiGateway"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +null (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **500** | Internal Server Error | - | + + +# **updateApiGatewaySettings** +> updateApiGatewaySettings(updateApiGatewaySettingsParam) + +Update configuration information for api gateway function + +Update configuration information for api gateway function. + +### Example +```java +// Import classes: +import saasus.sdk.apigateway.ApiClient; +import saasus.sdk.apigateway.ApiException; +import saasus.sdk.apigateway.Configuration; +import saasus.sdk.apigateway.auth.*; +import saasus.sdk.apigateway.models.*; +import saasus.sdk.apigateway.api.SmartApiGatewayApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.saasus.io/v1/apigateway"); + + // Configure HTTP bearer authorization: Bearer + HttpBearerAuth Bearer = (HttpBearerAuth) defaultClient.getAuthentication("Bearer"); + Bearer.setBearerToken("BEARER TOKEN"); + + SmartApiGatewayApi apiInstance = new SmartApiGatewayApi(defaultClient); + UpdateApiGatewaySettingsParam updateApiGatewaySettingsParam = new UpdateApiGatewaySettingsParam(); // UpdateApiGatewaySettingsParam | + try { + apiInstance.updateApiGatewaySettings(updateApiGatewaySettingsParam); + } catch (ApiException e) { + System.err.println("Exception when calling SmartApiGatewayApi#updateApiGatewaySettings"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **updateApiGatewaySettingsParam** | [**UpdateApiGatewaySettingsParam**](UpdateApiGatewaySettingsParam.md)| | | + +### Return type + +null (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **500** | Internal Server Error | - | + + +# **updateTenant** +> updateTenant(tenantId, updateTenantParam) + +Update tenant information + +Update tenant information. + +### Example +```java +// Import classes: +import saasus.sdk.apigateway.ApiClient; +import saasus.sdk.apigateway.ApiException; +import saasus.sdk.apigateway.Configuration; +import saasus.sdk.apigateway.auth.*; +import saasus.sdk.apigateway.models.*; +import saasus.sdk.apigateway.api.SmartApiGatewayApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.saasus.io/v1/apigateway"); + + // Configure HTTP bearer authorization: Bearer + HttpBearerAuth Bearer = (HttpBearerAuth) defaultClient.getAuthentication("Bearer"); + Bearer.setBearerToken("BEARER TOKEN"); + + SmartApiGatewayApi apiInstance = new SmartApiGatewayApi(defaultClient); + String tenantId = "tenantId_example"; // String | Tenant ID + UpdateTenantParam updateTenantParam = new UpdateTenantParam(); // UpdateTenantParam | + try { + apiInstance.updateTenant(tenantId, updateTenantParam); + } catch (ApiException e) { + System.err.println("Exception when calling SmartApiGatewayApi#updateTenant"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| Tenant ID | | +| **updateTenantParam** | [**UpdateTenantParam**](UpdateTenantParam.md)| | | + +### Return type + +null (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **500** | Internal Server Error | - | + + +# **uploadGenerationFiles** +> uploadGenerationFiles(apiGatewayInputFile) + +Upload files to create an API Gateway + +Upload files to create an API Gateway + +### Example +```java +// Import classes: +import saasus.sdk.apigateway.ApiClient; +import saasus.sdk.apigateway.ApiException; +import saasus.sdk.apigateway.Configuration; +import saasus.sdk.apigateway.auth.*; +import saasus.sdk.apigateway.models.*; +import saasus.sdk.apigateway.api.SmartApiGatewayApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.saasus.io/v1/apigateway"); + + // Configure HTTP bearer authorization: Bearer + HttpBearerAuth Bearer = (HttpBearerAuth) defaultClient.getAuthentication("Bearer"); + Bearer.setBearerToken("BEARER TOKEN"); + + SmartApiGatewayApi apiInstance = new SmartApiGatewayApi(defaultClient); + ApiGatewayInputFile apiGatewayInputFile = new ApiGatewayInputFile(); // ApiGatewayInputFile | + try { + apiInstance.uploadGenerationFiles(apiGatewayInputFile); + } catch (ApiException e) { + System.err.println("Exception when calling SmartApiGatewayApi#uploadGenerationFiles"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **apiGatewayInputFile** | [**ApiGatewayInputFile**](ApiGatewayInputFile.md)| | [optional] | + +### Return type + +null (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **500** | Internal Server Error | - | + diff --git a/docs/apigateway/TenantRouting.md b/docs/apigateway/TenantRouting.md new file mode 100644 index 00000000..1b8a9a92 --- /dev/null +++ b/docs/apigateway/TenantRouting.md @@ -0,0 +1,17 @@ + + +# TenantRouting + +Information about tenant routing. Refer to the tenant_routing_type in ApiGatewaySettings and route the request. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**path** | **String** | Path for each tenant | [optional] | +|**headerKey** | **String** | Header key to specify the tenant identifier | [optional] | +|**headerValue** | **String** | Tenant identifier set in header key | [optional] | +|**hostName** | **String** | Host Name for each tenant | [optional] | + + + diff --git a/docs/apigateway/TenantRoutingType.md b/docs/apigateway/TenantRoutingType.md new file mode 100644 index 00000000..9865bd4d --- /dev/null +++ b/docs/apigateway/TenantRoutingType.md @@ -0,0 +1,17 @@ + + +# TenantRoutingType + +## Enum + + +* `PATH` (value: `"path"`) + +* `HOSTNAME` (value: `"hostName"`) + +* `HEADERVALUE` (value: `"headerValue"`) + +* `NONE` (value: `"none"`) + + + diff --git a/docs/apigateway/Throttling.md b/docs/apigateway/Throttling.md new file mode 100644 index 00000000..069be9da --- /dev/null +++ b/docs/apigateway/Throttling.md @@ -0,0 +1,25 @@ + + +# Throttling + +Permit requests up to the limit number of times within a range (seconds) time for each target. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**target** | [**TargetEnum**](#TargetEnum) | Target of restriction | | +|**range** | **Integer** | Throttling time range (seconds) | | +|**limit** | **Integer** | Throttling limit | | + + + +## Enum: TargetEnum + +| Name | Value | +|---- | -----| +| TENANT | "tenant" | +| USER | "user" | + + + diff --git a/docs/apigateway/UpdateApiGatewaySettingsParam.md b/docs/apigateway/UpdateApiGatewaySettingsParam.md new file mode 100644 index 00000000..f99235c8 --- /dev/null +++ b/docs/apigateway/UpdateApiGatewaySettingsParam.md @@ -0,0 +1,24 @@ + + +# UpdateApiGatewaySettingsParam + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**roleArn** | **String** | ARN of the role for SaaSus Platform to AssumeRole | [optional] | +|**roleExternalId** | **String** | External id used by SaaSus when AssumeRole to operate SaaS | [optional] | +|**internalEndpointHealthCheckPath** | **String** | The path to be used for health checks on the internal endpoint. | [optional] | +|**internalEndpointHealthCheckPort** | **Integer** | The port to be used for health checks on the internal endpoint. | [optional] | +|**internalEndpointHealthCheckProtocol** | **String** | The protocol to be used for health checks on the internal endpoint. | [optional] | +|**internalEndpointHealthStatusCodes** | **String** | The status codes to be used for health checks on the internal endpoint. | [optional] | +|**saasSubnetIds** | **List<String>** | Subnet IDs for SaaS | [optional] | +|**saasVpcId** | **String** | VPC ID for SaaS | [optional] | +|**domainName** | **String** | Domain Name | [optional] | +|**saasAlbArn** | **String** | SaaS Application Load Balancer ARN | [optional] | +|**endpointSettingsList** | [**List<EndpointSettings>**](EndpointSettings.md) | Endpoint Settings List | [optional] | +|**tenantRoutingType** | **TenantRoutingType** | | [optional] | + + + diff --git a/docs/apigateway/UpdateTenantParam.md b/docs/apigateway/UpdateTenantParam.md new file mode 100644 index 00000000..4a8ea13a --- /dev/null +++ b/docs/apigateway/UpdateTenantParam.md @@ -0,0 +1,14 @@ + + +# UpdateTenantParam + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**allowedIps** | **List<String>** | Allowed IP addresses in CIDR format | [optional] | +|**routing** | [**TenantRouting**](TenantRouting.md) | | [optional] | + + + diff --git a/docs/auth/CreateSaasUserParam.md b/docs/auth/CreateSaasUserParam.md index f8de65d9..1a40f384 100644 --- a/docs/auth/CreateSaasUserParam.md +++ b/docs/auth/CreateSaasUserParam.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**email** | **String** | E-mail | | -|**password** | **String** | Password | | +|**password** | **String** | Password | [optional] | diff --git a/docs/auth/SaasUserApi.md b/docs/auth/SaasUserApi.md index 3ffded18..a76f5a23 100644 --- a/docs/auth/SaasUserApi.md +++ b/docs/auth/SaasUserApi.md @@ -238,7 +238,7 @@ public class Example { Create SaaS User -Create SaaS User. +Create SaaS User. If attributes is empty, a temporary password will be sent to the registered email. ### Example ```java diff --git a/docs/pricing/PricingFixedUnit.md b/docs/pricing/PricingFixedUnit.md index feecf104..e5ff126c 100644 --- a/docs/pricing/PricingFixedUnit.md +++ b/docs/pricing/PricingFixedUnit.md @@ -9,13 +9,21 @@ |------------ | ------------- | ------------- | -------------| |**unitAmount** | **Integer** | Price | | |**recurringInterval** | **RecurringInterval** | | | +|**uType** | [**UTypeEnum**](#UTypeEnum) | | | |**name** | **String** | Name | | |**displayName** | **String** | Display Name | | |**description** | **String** | Description | | -|**type** | **UnitType** | | | |**currency** | **Currency** | | | |**id** | **String** | Universally Unique Identifier | | |**used** | **Boolean** | | | +## Enum: UTypeEnum + +| Name | Value | +|---- | -----| +| FIXED | "fixed" | + + + diff --git a/docs/pricing/PricingFixedUnitForSave.md b/docs/pricing/PricingFixedUnitForSave.md index aa084a17..3534e727 100644 --- a/docs/pricing/PricingFixedUnitForSave.md +++ b/docs/pricing/PricingFixedUnitForSave.md @@ -10,10 +10,18 @@ |**name** | **String** | Name | | |**displayName** | **String** | Display Name | | |**description** | **String** | Description | | -|**type** | **UnitType** | | | |**currency** | **Currency** | | | |**unitAmount** | **Integer** | Price | | |**recurringInterval** | **RecurringInterval** | | | +|**uType** | [**UTypeEnum**](#UTypeEnum) | | | + + + +## Enum: UTypeEnum + +| Name | Value | +|---- | -----| +| FIXED | "fixed" | diff --git a/docs/pricing/PricingTieredUnit.md b/docs/pricing/PricingTieredUnit.md index 3e4e6130..927b922b 100644 --- a/docs/pricing/PricingTieredUnit.md +++ b/docs/pricing/PricingTieredUnit.md @@ -10,10 +10,10 @@ |**upperCount** | **Integer** | Upper limit | | |**meteringUnitName** | **String** | Metering unit name | | |**aggregateUsage** | **AggregateUsage** | | [optional] | +|**uType** | [**UTypeEnum**](#UTypeEnum) | | | |**name** | **String** | Name | | |**displayName** | **String** | Display Name | | |**description** | **String** | Description | | -|**type** | **UnitType** | | | |**currency** | **Currency** | | | |**tiers** | [**List<PricingTier>**](PricingTier.md) | | | |**id** | **String** | Universally Unique Identifier | | @@ -23,3 +23,11 @@ +## Enum: UTypeEnum + +| Name | Value | +|---- | -----| +| TIERED | "tiered" | + + + diff --git a/docs/pricing/PricingTieredUnitForSave.md b/docs/pricing/PricingTieredUnitForSave.md index 92f49f6e..9474a056 100644 --- a/docs/pricing/PricingTieredUnitForSave.md +++ b/docs/pricing/PricingTieredUnitForSave.md @@ -10,12 +10,20 @@ |**name** | **String** | Name | | |**displayName** | **String** | Display Name | | |**description** | **String** | Description | | -|**type** | **UnitType** | | | |**currency** | **Currency** | | | |**tiers** | [**List<PricingTier>**](PricingTier.md) | | | |**upperCount** | **Integer** | Upper limit | | |**meteringUnitName** | **String** | Metering unit name | | |**aggregateUsage** | **AggregateUsage** | | [optional] | +|**uType** | [**UTypeEnum**](#UTypeEnum) | | | + + + +## Enum: UTypeEnum + +| Name | Value | +|---- | -----| +| TIERED | "tiered" | diff --git a/docs/pricing/PricingTieredUsageUnit.md b/docs/pricing/PricingTieredUsageUnit.md index 79e6918a..677e31a7 100644 --- a/docs/pricing/PricingTieredUsageUnit.md +++ b/docs/pricing/PricingTieredUsageUnit.md @@ -10,10 +10,10 @@ |**upperCount** | **Integer** | Upper limit | | |**meteringUnitName** | **String** | Metering unit name | | |**aggregateUsage** | **AggregateUsage** | | [optional] | +|**uType** | [**UTypeEnum**](#UTypeEnum) | | | |**name** | **String** | Name | | |**displayName** | **String** | Display Name | | |**description** | **String** | Description | | -|**type** | **UnitType** | | | |**currency** | **Currency** | | | |**tiers** | [**List<PricingTier>**](PricingTier.md) | | | |**id** | **String** | Universally Unique Identifier | | @@ -23,3 +23,11 @@ +## Enum: UTypeEnum + +| Name | Value | +|---- | -----| +| TIERED_USAGE | "tiered_usage" | + + + diff --git a/docs/pricing/PricingTieredUsageUnitForSave.md b/docs/pricing/PricingTieredUsageUnitForSave.md index e3872827..a334ac41 100644 --- a/docs/pricing/PricingTieredUsageUnitForSave.md +++ b/docs/pricing/PricingTieredUsageUnitForSave.md @@ -10,12 +10,20 @@ |**name** | **String** | Name | | |**displayName** | **String** | Display Name | | |**description** | **String** | Description | | -|**type** | **UnitType** | | | |**currency** | **Currency** | | | |**tiers** | [**List<PricingTier>**](PricingTier.md) | | | |**upperCount** | **Integer** | Upper limit | | |**meteringUnitName** | **String** | Metering unit name | | |**aggregateUsage** | **AggregateUsage** | | [optional] | +|**uType** | [**UTypeEnum**](#UTypeEnum) | | | + + + +## Enum: UTypeEnum + +| Name | Value | +|---- | -----| +| TIERED_USAGE | "tiered_usage" | diff --git a/docs/pricing/PricingUnit.md b/docs/pricing/PricingUnit.md index 8af22a94..90027532 100644 --- a/docs/pricing/PricingUnit.md +++ b/docs/pricing/PricingUnit.md @@ -11,16 +11,24 @@ |**meteringUnitId** | **String** | Universally Unique Identifier | | |**recurringInterval** | **RecurringInterval** | | | |**used** | **Boolean** | | | +|**uType** | [**UTypeEnum**](#UTypeEnum) | | | |**upperCount** | **Integer** | Upper limit | | |**meteringUnitName** | **String** | Metering unit name | | |**aggregateUsage** | **AggregateUsage** | | [optional] | |**name** | **String** | Name | | |**displayName** | **String** | Display Name | | |**description** | **String** | Description | | -|**type** | **UnitType** | | | |**currency** | **Currency** | | | |**tiers** | [**List<PricingTier>**](PricingTier.md) | | | |**unitAmount** | **Integer** | Price | | +## Enum: UTypeEnum + +| Name | Value | +|---- | -----| +| FIXED | "fixed" | + + + diff --git a/docs/pricing/PricingUnitBaseProps.md b/docs/pricing/PricingUnitBaseProps.md index 631397ef..680104b4 100644 --- a/docs/pricing/PricingUnitBaseProps.md +++ b/docs/pricing/PricingUnitBaseProps.md @@ -10,7 +10,6 @@ |**name** | **String** | Name | | |**displayName** | **String** | Display Name | | |**description** | **String** | Description | | -|**type** | **UnitType** | | | |**currency** | **Currency** | | | diff --git a/docs/pricing/PricingUnitForSave.md b/docs/pricing/PricingUnitForSave.md index 07e30b97..53ca53f6 100644 --- a/docs/pricing/PricingUnitForSave.md +++ b/docs/pricing/PricingUnitForSave.md @@ -10,10 +10,10 @@ |**upperCount** | **Integer** | Upper limit | | |**meteringUnitName** | **String** | Metering unit name | | |**aggregateUsage** | **AggregateUsage** | | [optional] | +|**uType** | [**UTypeEnum**](#UTypeEnum) | | | |**name** | **String** | Name | | |**displayName** | **String** | Display Name | | |**description** | **String** | Description | | -|**type** | **UnitType** | | | |**currency** | **Currency** | | | |**tiers** | [**List<PricingTier>**](PricingTier.md) | | | |**unitAmount** | **Integer** | Price | | @@ -21,3 +21,11 @@ +## Enum: UTypeEnum + +| Name | Value | +|---- | -----| +| FIXED | "fixed" | + + + diff --git a/docs/pricing/PricingUsageUnit.md b/docs/pricing/PricingUsageUnit.md index 25bb100e..65d1905b 100644 --- a/docs/pricing/PricingUsageUnit.md +++ b/docs/pricing/PricingUsageUnit.md @@ -11,10 +11,10 @@ |**unitAmount** | **Integer** | Amount per usage | | |**meteringUnitName** | **String** | Metering unit name | | |**aggregateUsage** | **AggregateUsage** | | [optional] | +|**uType** | [**UTypeEnum**](#UTypeEnum) | | | |**name** | **String** | Name | | |**displayName** | **String** | Display Name | | |**description** | **String** | Description | | -|**type** | **UnitType** | | | |**currency** | **Currency** | | | |**id** | **String** | Universally Unique Identifier | | |**meteringUnitId** | **String** | Universally Unique Identifier | | @@ -23,3 +23,11 @@ +## Enum: UTypeEnum + +| Name | Value | +|---- | -----| +| USAGE | "usage" | + + + diff --git a/docs/pricing/PricingUsageUnitForSave.md b/docs/pricing/PricingUsageUnitForSave.md index 3d6d02f4..67007c59 100644 --- a/docs/pricing/PricingUsageUnitForSave.md +++ b/docs/pricing/PricingUsageUnitForSave.md @@ -10,12 +10,20 @@ |**name** | **String** | Name | | |**displayName** | **String** | Display Name | | |**description** | **String** | Description | | -|**type** | **UnitType** | | | |**currency** | **Currency** | | | |**upperCount** | **Integer** | Upper limit | | |**unitAmount** | **Integer** | Amount per usage | | |**meteringUnitName** | **String** | Metering unit name | | |**aggregateUsage** | **AggregateUsage** | | [optional] | +|**uType** | [**UTypeEnum**](#UTypeEnum) | | | + + + +## Enum: UTypeEnum + +| Name | Value | +|---- | -----| +| USAGE | "usage" | diff --git a/generate.sh b/generate.sh index 4a6d7a85..1cd34a52 100755 --- a/generate.sh +++ b/generate.sh @@ -1,7 +1,7 @@ #!/bin/bash # 生成するモジュール名の配列 -MODULES="auth pricing billing awsmarketplace integration apilog communication" +MODULES="auth pricing billing awsmarketplace integration apilog communication apigateway" # sdkに含まれる生成したプログラムを削除 SDK_SRC_DIR="src/main/java/saasus/sdk" diff --git a/src/main/java/saasus/sdk/apigateway/ApiCallback.java b/src/main/java/saasus/sdk/apigateway/ApiCallback.java new file mode 100644 index 00000000..80fdd355 --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/ApiCallback.java @@ -0,0 +1,62 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway; + +import java.io.IOException; + +import java.util.Map; +import java.util.List; + +/** + * Callback for asynchronous API call. + * + * @param The return type + */ +public interface ApiCallback { + /** + * This is called when the API call fails. + * + * @param e The exception causing the failure + * @param statusCode Status code of the response if available, otherwise it would be 0 + * @param responseHeaders Headers of the response if available, otherwise it would be null + */ + void onFailure(ApiException e, int statusCode, Map> responseHeaders); + + /** + * This is called when the API call succeeded. + * + * @param result The result deserialized from response + * @param statusCode Status code of the response + * @param responseHeaders Headers of the response + */ + void onSuccess(T result, int statusCode, Map> responseHeaders); + + /** + * This is called when the API upload processing. + * + * @param bytesWritten bytes Written + * @param contentLength content length of request body + * @param done write end + */ + void onUploadProgress(long bytesWritten, long contentLength, boolean done); + + /** + * This is called when the API download processing. + * + * @param bytesRead bytes Read + * @param contentLength content length of the response + * @param done Read end + */ + void onDownloadProgress(long bytesRead, long contentLength, boolean done); +} diff --git a/src/main/java/saasus/sdk/apigateway/ApiClient.java b/src/main/java/saasus/sdk/apigateway/ApiClient.java new file mode 100644 index 00000000..3c60fc1a --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/ApiClient.java @@ -0,0 +1,1575 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway; + +import okhttp3.*; +import okhttp3.internal.http.HttpMethod; +import okhttp3.internal.tls.OkHostnameVerifier; +import okhttp3.logging.HttpLoggingInterceptor; +import okhttp3.logging.HttpLoggingInterceptor.Level; +import okio.Buffer; +import okio.BufferedSink; +import okio.Okio; + +import javax.net.ssl.*; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.UnsupportedEncodingException; +import java.lang.reflect.Type; +import java.net.URI; +import java.net.URLConnection; +import java.net.URLEncoder; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.security.GeneralSecurityException; +import java.security.KeyStore; +import java.security.SecureRandom; +import java.security.cert.Certificate; +import java.security.cert.CertificateException; +import java.security.cert.CertificateFactory; +import java.security.cert.X509Certificate; +import java.text.DateFormat; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.*; +import java.util.Map.Entry; +import java.util.concurrent.TimeUnit; +import java.util.function.Supplier; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import saasus.sdk.apigateway.auth.Authentication; +import saasus.sdk.apigateway.auth.HttpBasicAuth; +import saasus.sdk.apigateway.auth.HttpBearerAuth; +import saasus.sdk.apigateway.auth.ApiKeyAuth; + +/** + *

ApiClient class.

+ */ +public class ApiClient { + + private String basePath = "https://api.saasus.io/v1/apigateway"; + protected List servers = new ArrayList(Arrays.asList( + new ServerConfiguration( + "https://api.saasus.io/v1/apigateway", + "Production API Server", + new HashMap() + ) + )); + protected Integer serverIndex = 0; + protected Map serverVariables = null; + private boolean debugging = false; + private Map defaultHeaderMap = new HashMap(); + private Map defaultCookieMap = new HashMap(); + private String tempFolderPath = null; + + private Map authentications; + + private DateFormat dateFormat; + private DateFormat datetimeFormat; + private boolean lenientDatetimeFormat; + private int dateLength; + + private InputStream sslCaCert; + private boolean verifyingSsl; + private KeyManager[] keyManagers; + + private OkHttpClient httpClient; + private JSON json; + + private HttpLoggingInterceptor loggingInterceptor; + + /** + * Basic constructor for ApiClient + */ + public ApiClient() { + init(); + initHttpClient(); + + // Setup authentications (key: authentication name, value: authentication). + authentications.put("Bearer", new HttpBearerAuth("bearer")); + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + } + + /** + * Basic constructor with custom OkHttpClient + * + * @param client a {@link okhttp3.OkHttpClient} object + */ + public ApiClient(OkHttpClient client) { + init(); + + httpClient = client; + + // Setup authentications (key: authentication name, value: authentication). + authentications.put("Bearer", new HttpBearerAuth("bearer")); + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + } + + private void initHttpClient() { + initHttpClient(Collections.emptyList()); + } + + private void initHttpClient(List interceptors) { + OkHttpClient.Builder builder = new OkHttpClient.Builder(); + builder.addNetworkInterceptor(getProgressInterceptor()); + for (Interceptor interceptor: interceptors) { + builder.addInterceptor(interceptor); + } + + httpClient = builder.build(); + } + + private void init() { + verifyingSsl = true; + + json = new JSON(); + + // Set default User-Agent. + setUserAgent("OpenAPI-Generator/1.0.0/java"); + + authentications = new HashMap(); + } + + /** + * Get base path + * + * @return Base path + */ + public String getBasePath() { + return basePath; + } + + /** + * Set base path + * + * @param basePath Base path of the URL (e.g https://api.saasus.io/v1/apigateway + * @return An instance of OkHttpClient + */ + public ApiClient setBasePath(String basePath) { + this.basePath = basePath; + this.serverIndex = null; + return this; + } + + public List getServers() { + return servers; + } + + public ApiClient setServers(List servers) { + this.servers = servers; + return this; + } + + public Integer getServerIndex() { + return serverIndex; + } + + public ApiClient setServerIndex(Integer serverIndex) { + this.serverIndex = serverIndex; + return this; + } + + public Map getServerVariables() { + return serverVariables; + } + + public ApiClient setServerVariables(Map serverVariables) { + this.serverVariables = serverVariables; + return this; + } + + /** + * Get HTTP client + * + * @return An instance of OkHttpClient + */ + public OkHttpClient getHttpClient() { + return httpClient; + } + + /** + * Set HTTP client, which must never be null. + * + * @param newHttpClient An instance of OkHttpClient + * @return Api Client + * @throws java.lang.NullPointerException when newHttpClient is null + */ + public ApiClient setHttpClient(OkHttpClient newHttpClient) { + this.httpClient = Objects.requireNonNull(newHttpClient, "HttpClient must not be null!"); + return this; + } + + /** + * Get JSON + * + * @return JSON object + */ + public JSON getJSON() { + return json; + } + + /** + * Set JSON + * + * @param json JSON object + * @return Api client + */ + public ApiClient setJSON(JSON json) { + this.json = json; + return this; + } + + /** + * True if isVerifyingSsl flag is on + * + * @return True if isVerifySsl flag is on + */ + public boolean isVerifyingSsl() { + return verifyingSsl; + } + + /** + * Configure whether to verify certificate and hostname when making https requests. + * Default to true. + * NOTE: Do NOT set to false in production code, otherwise you would face multiple types of cryptographic attacks. + * + * @param verifyingSsl True to verify TLS/SSL connection + * @return ApiClient + */ + public ApiClient setVerifyingSsl(boolean verifyingSsl) { + this.verifyingSsl = verifyingSsl; + applySslSettings(); + return this; + } + + /** + * Get SSL CA cert. + * + * @return Input stream to the SSL CA cert + */ + public InputStream getSslCaCert() { + return sslCaCert; + } + + /** + * Configure the CA certificate to be trusted when making https requests. + * Use null to reset to default. + * + * @param sslCaCert input stream for SSL CA cert + * @return ApiClient + */ + public ApiClient setSslCaCert(InputStream sslCaCert) { + this.sslCaCert = sslCaCert; + applySslSettings(); + return this; + } + + /** + *

Getter for the field keyManagers.

+ * + * @return an array of {@link javax.net.ssl.KeyManager} objects + */ + public KeyManager[] getKeyManagers() { + return keyManagers; + } + + /** + * Configure client keys to use for authorization in an SSL session. + * Use null to reset to default. + * + * @param managers The KeyManagers to use + * @return ApiClient + */ + public ApiClient setKeyManagers(KeyManager[] managers) { + this.keyManagers = managers; + applySslSettings(); + return this; + } + + /** + *

Getter for the field dateFormat.

+ * + * @return a {@link java.text.DateFormat} object + */ + public DateFormat getDateFormat() { + return dateFormat; + } + + /** + *

Setter for the field dateFormat.

+ * + * @param dateFormat a {@link java.text.DateFormat} object + * @return a {@link saasus.sdk.apigateway.ApiClient} object + */ + public ApiClient setDateFormat(DateFormat dateFormat) { + JSON.setDateFormat(dateFormat); + return this; + } + + /** + *

Set SqlDateFormat.

+ * + * @param dateFormat a {@link java.text.DateFormat} object + * @return a {@link saasus.sdk.apigateway.ApiClient} object + */ + public ApiClient setSqlDateFormat(DateFormat dateFormat) { + JSON.setSqlDateFormat(dateFormat); + return this; + } + + /** + *

Set OffsetDateTimeFormat.

+ * + * @param dateFormat a {@link java.time.format.DateTimeFormatter} object + * @return a {@link saasus.sdk.apigateway.ApiClient} object + */ + public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { + JSON.setOffsetDateTimeFormat(dateFormat); + return this; + } + + /** + *

Set LocalDateFormat.

+ * + * @param dateFormat a {@link java.time.format.DateTimeFormatter} object + * @return a {@link saasus.sdk.apigateway.ApiClient} object + */ + public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { + JSON.setLocalDateFormat(dateFormat); + return this; + } + + /** + *

Set LenientOnJson.

+ * + * @param lenientOnJson a boolean + * @return a {@link saasus.sdk.apigateway.ApiClient} object + */ + public ApiClient setLenientOnJson(boolean lenientOnJson) { + JSON.setLenientOnJson(lenientOnJson); + return this; + } + + /** + * Get authentications (key: authentication name, value: authentication). + * + * @return Map of authentication objects + */ + public Map getAuthentications() { + return authentications; + } + + /** + * Get authentication for the given name. + * + * @param authName The authentication name + * @return The authentication, null if not found + */ + public Authentication getAuthentication(String authName) { + return authentications.get(authName); + } + + /** + * Helper method to set access token for the first Bearer authentication. + * @param bearerToken Bearer token + */ + public void setBearerToken(String bearerToken) { + setBearerToken(() -> bearerToken); + } + + /** + * Helper method to set the supplier of access tokens for Bearer authentication. + * + * @param tokenSupplier The supplier of bearer tokens + */ + public void setBearerToken(Supplier tokenSupplier) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBearerAuth) { + ((HttpBearerAuth) auth).setBearerToken(tokenSupplier); + return; + } + } + throw new RuntimeException("No Bearer authentication configured!"); + } + + /** + * Helper method to set username for the first HTTP basic authentication. + * + * @param username Username + */ + public void setUsername(String username) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setUsername(username); + return; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set password for the first HTTP basic authentication. + * + * @param password Password + */ + public void setPassword(String password) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setPassword(password); + return; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set API key value for the first API key authentication. + * + * @param apiKey API key + */ + public void setApiKey(String apiKey) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKey(apiKey); + return; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to set API key prefix for the first API key authentication. + * + * @param apiKeyPrefix API key prefix + */ + public void setApiKeyPrefix(String apiKeyPrefix) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix); + return; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to set access token for the first OAuth2 authentication. + * + * @param accessToken Access token + */ + public void setAccessToken(String accessToken) { + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + /** + * Helper method to set credentials for AWSV4 Signature + * + * @param accessKey Access Key + * @param secretKey Secret Key + * @param region Region + * @param service Service to access to + */ + public void setAWS4Configuration(String accessKey, String secretKey, String region, String service) { + throw new RuntimeException("No AWS4 authentication configured!"); + } + + /** + * Set the User-Agent header's value (by adding to the default header map). + * + * @param userAgent HTTP request's user agent + * @return ApiClient + */ + public ApiClient setUserAgent(String userAgent) { + addDefaultHeader("User-Agent", userAgent); + return this; + } + + /** + * Add a default header. + * + * @param key The header's key + * @param value The header's value + * @return ApiClient + */ + public ApiClient addDefaultHeader(String key, String value) { + defaultHeaderMap.put(key, value); + return this; + } + + /** + * Add a default cookie. + * + * @param key The cookie's key + * @param value The cookie's value + * @return ApiClient + */ + public ApiClient addDefaultCookie(String key, String value) { + defaultCookieMap.put(key, value); + return this; + } + + /** + * Check that whether debugging is enabled for this API client. + * + * @return True if debugging is enabled, false otherwise. + */ + public boolean isDebugging() { + return debugging; + } + + /** + * Enable/disable debugging for this API client. + * + * @param debugging To enable (true) or disable (false) debugging + * @return ApiClient + */ + public ApiClient setDebugging(boolean debugging) { + if (debugging != this.debugging) { + if (debugging) { + loggingInterceptor = new HttpLoggingInterceptor(); + loggingInterceptor.setLevel(Level.BODY); + httpClient = httpClient.newBuilder().addInterceptor(loggingInterceptor).build(); + } else { + final OkHttpClient.Builder builder = httpClient.newBuilder(); + builder.interceptors().remove(loggingInterceptor); + httpClient = builder.build(); + loggingInterceptor = null; + } + } + this.debugging = debugging; + return this; + } + + /** + * The path of temporary folder used to store downloaded files from endpoints + * with file response. The default value is null, i.e. using + * the system's default temporary folder. + * + * @see createTempFile + * @return Temporary folder path + */ + public String getTempFolderPath() { + return tempFolderPath; + } + + /** + * Set the temporary folder path (for downloading files) + * + * @param tempFolderPath Temporary folder path + * @return ApiClient + */ + public ApiClient setTempFolderPath(String tempFolderPath) { + this.tempFolderPath = tempFolderPath; + return this; + } + + /** + * Get connection timeout (in milliseconds). + * + * @return Timeout in milliseconds + */ + public int getConnectTimeout() { + return httpClient.connectTimeoutMillis(); + } + + /** + * Sets the connect timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link java.lang.Integer#MAX_VALUE}. + * + * @param connectionTimeout connection timeout in milliseconds + * @return Api client + */ + public ApiClient setConnectTimeout(int connectionTimeout) { + httpClient = httpClient.newBuilder().connectTimeout(connectionTimeout, TimeUnit.MILLISECONDS).build(); + return this; + } + + /** + * Get read timeout (in milliseconds). + * + * @return Timeout in milliseconds + */ + public int getReadTimeout() { + return httpClient.readTimeoutMillis(); + } + + /** + * Sets the read timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link java.lang.Integer#MAX_VALUE}. + * + * @param readTimeout read timeout in milliseconds + * @return Api client + */ + public ApiClient setReadTimeout(int readTimeout) { + httpClient = httpClient.newBuilder().readTimeout(readTimeout, TimeUnit.MILLISECONDS).build(); + return this; + } + + /** + * Get write timeout (in milliseconds). + * + * @return Timeout in milliseconds + */ + public int getWriteTimeout() { + return httpClient.writeTimeoutMillis(); + } + + /** + * Sets the write timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link java.lang.Integer#MAX_VALUE}. + * + * @param writeTimeout connection timeout in milliseconds + * @return Api client + */ + public ApiClient setWriteTimeout(int writeTimeout) { + httpClient = httpClient.newBuilder().writeTimeout(writeTimeout, TimeUnit.MILLISECONDS).build(); + return this; + } + + + /** + * Format the given parameter object into string. + * + * @param param Parameter + * @return String representation of the parameter + */ + public String parameterToString(Object param) { + if (param == null) { + return ""; + } else if (param instanceof Date || param instanceof OffsetDateTime || param instanceof LocalDate) { + //Serialize to json string and remove the " enclosing characters + String jsonStr = JSON.serialize(param); + return jsonStr.substring(1, jsonStr.length() - 1); + } else if (param instanceof Collection) { + StringBuilder b = new StringBuilder(); + for (Object o : (Collection) param) { + if (b.length() > 0) { + b.append(","); + } + b.append(o); + } + return b.toString(); + } else { + return String.valueOf(param); + } + } + + /** + * Formats the specified query parameter to a list containing a single {@code Pair} object. + * + * Note that {@code value} must not be a collection. + * + * @param name The name of the parameter. + * @param value The value of the parameter. + * @return A list containing a single {@code Pair} object. + */ + public List parameterToPair(String name, Object value) { + List params = new ArrayList(); + + // preconditions + if (name == null || name.isEmpty() || value == null || value instanceof Collection) { + return params; + } + + params.add(new Pair(name, parameterToString(value))); + return params; + } + + /** + * Formats the specified collection query parameters to a list of {@code Pair} objects. + * + * Note that the values of each of the returned Pair objects are percent-encoded. + * + * @param collectionFormat The collection format of the parameter. + * @param name The name of the parameter. + * @param value The value of the parameter. + * @return A list of {@code Pair} objects. + */ + public List parameterToPairs(String collectionFormat, String name, Collection value) { + List params = new ArrayList(); + + // preconditions + if (name == null || name.isEmpty() || value == null || value.isEmpty()) { + return params; + } + + // create the params based on the collection format + if ("multi".equals(collectionFormat)) { + for (Object item : value) { + params.add(new Pair(name, escapeString(parameterToString(item)))); + } + return params; + } + + // collectionFormat is assumed to be "csv" by default + String delimiter = ","; + + // escape all delimiters except commas, which are URI reserved + // characters + if ("ssv".equals(collectionFormat)) { + delimiter = escapeString(" "); + } else if ("tsv".equals(collectionFormat)) { + delimiter = escapeString("\t"); + } else if ("pipes".equals(collectionFormat)) { + delimiter = escapeString("|"); + } + + StringBuilder sb = new StringBuilder(); + for (Object item : value) { + sb.append(delimiter); + sb.append(escapeString(parameterToString(item))); + } + + params.add(new Pair(name, sb.substring(delimiter.length()))); + + return params; + } + + /** + * Formats the specified collection path parameter to a string value. + * + * @param collectionFormat The collection format of the parameter. + * @param value The value of the parameter. + * @return String representation of the parameter + */ + public String collectionPathParameterToString(String collectionFormat, Collection value) { + // create the value based on the collection format + if ("multi".equals(collectionFormat)) { + // not valid for path params + return parameterToString(value); + } + + // collectionFormat is assumed to be "csv" by default + String delimiter = ","; + + if ("ssv".equals(collectionFormat)) { + delimiter = " "; + } else if ("tsv".equals(collectionFormat)) { + delimiter = "\t"; + } else if ("pipes".equals(collectionFormat)) { + delimiter = "|"; + } + + StringBuilder sb = new StringBuilder() ; + for (Object item : value) { + sb.append(delimiter); + sb.append(parameterToString(item)); + } + + return sb.substring(delimiter.length()); + } + + /** + * Sanitize filename by removing path. + * e.g. ../../sun.gif becomes sun.gif + * + * @param filename The filename to be sanitized + * @return The sanitized filename + */ + public String sanitizeFilename(String filename) { + return filename.replaceAll(".*[/\\\\]", ""); + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * "* / *" is also default to JSON + * @param mime MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public boolean isJsonMime(String mime) { + String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"; + return mime != null && (mime.matches(jsonMime) || mime.equals("*/*")); + } + + /** + * Select the Accept header's value from the given accepts array: + * if JSON exists in the given array, use it; + * otherwise use all of them (joining into a string) + * + * @param accepts The accepts array to select from + * @return The Accept header to use. If the given array is empty, + * null will be returned (not to set the Accept header explicitly). + */ + public String selectHeaderAccept(String[] accepts) { + if (accepts.length == 0) { + return null; + } + for (String accept : accepts) { + if (isJsonMime(accept)) { + return accept; + } + } + return StringUtil.join(accepts, ","); + } + + /** + * Select the Content-Type header's value from the given array: + * if JSON exists in the given array, use it; + * otherwise use the first one of the array. + * + * @param contentTypes The Content-Type array to select from + * @return The Content-Type header to use. If the given array is empty, + * returns null. If it matches "any", JSON will be used. + */ + public String selectHeaderContentType(String[] contentTypes) { + if (contentTypes.length == 0) { + return null; + } + + if (contentTypes[0].equals("*/*")) { + return "application/json"; + } + + for (String contentType : contentTypes) { + if (isJsonMime(contentType)) { + return contentType; + } + } + + return contentTypes[0]; + } + + /** + * Escape the given string to be used as URL query value. + * + * @param str String to be escaped + * @return Escaped string + */ + public String escapeString(String str) { + try { + return URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20"); + } catch (UnsupportedEncodingException e) { + return str; + } + } + + /** + * Deserialize response body to Java object, according to the return type and + * the Content-Type response header. + * + * @param Type + * @param response HTTP response + * @param returnType The type of the Java object + * @return The deserialized Java object + * @throws saasus.sdk.apigateway.ApiException If fail to deserialize response body, i.e. cannot read response body + * or the Content-Type of the response is not supported. + */ + @SuppressWarnings("unchecked") + public T deserialize(Response response, Type returnType) throws ApiException { + if (response == null || returnType == null) { + return null; + } + + if ("byte[]".equals(returnType.toString())) { + // Handle binary response (byte array). + try { + return (T) response.body().bytes(); + } catch (IOException e) { + throw new ApiException(e); + } + } else if (returnType.equals(File.class)) { + // Handle file downloading. + return (T) downloadFileFromResponse(response); + } + + String respBody; + try { + if (response.body() != null) + respBody = response.body().string(); + else + respBody = null; + } catch (IOException e) { + throw new ApiException(e); + } + + if (respBody == null || "".equals(respBody)) { + return null; + } + + String contentType = response.headers().get("Content-Type"); + if (contentType == null) { + // ensuring a default content type + contentType = "application/json"; + } + if (isJsonMime(contentType)) { + return JSON.deserialize(respBody, returnType); + } else if (returnType.equals(String.class)) { + // Expecting string, return the raw response body. + return (T) respBody; + } else { + throw new ApiException( + "Content type \"" + contentType + "\" is not supported for type: " + returnType, + response.code(), + response.headers().toMultimap(), + respBody); + } + } + + /** + * Serialize the given Java object into request body according to the object's + * class and the request Content-Type. + * + * @param obj The Java object + * @param contentType The request Content-Type + * @return The serialized request body + * @throws saasus.sdk.apigateway.ApiException If fail to serialize the given object + */ + public RequestBody serialize(Object obj, String contentType) throws ApiException { + if (obj instanceof byte[]) { + // Binary (byte array) body parameter support. + return RequestBody.create((byte[]) obj, MediaType.parse(contentType)); + } else if (obj instanceof File) { + // File body parameter support. + return RequestBody.create((File) obj, MediaType.parse(contentType)); + } else if ("text/plain".equals(contentType) && obj instanceof String) { + return RequestBody.create((String) obj, MediaType.parse(contentType)); + } else if (isJsonMime(contentType)) { + String content; + if (obj != null) { + content = JSON.serialize(obj); + } else { + content = null; + } + return RequestBody.create(content, MediaType.parse(contentType)); + } else if (obj instanceof String) { + return RequestBody.create((String) obj, MediaType.parse(contentType)); + } else { + throw new ApiException("Content type \"" + contentType + "\" is not supported"); + } + } + + /** + * Download file from the given response. + * + * @param response An instance of the Response object + * @throws saasus.sdk.apigateway.ApiException If fail to read file content from response and write to disk + * @return Downloaded file + */ + public File downloadFileFromResponse(Response response) throws ApiException { + try { + File file = prepareDownloadFile(response); + BufferedSink sink = Okio.buffer(Okio.sink(file)); + sink.writeAll(response.body().source()); + sink.close(); + return file; + } catch (IOException e) { + throw new ApiException(e); + } + } + + /** + * Prepare file for download + * + * @param response An instance of the Response object + * @return Prepared file for the download + * @throws java.io.IOException If fail to prepare file for download + */ + public File prepareDownloadFile(Response response) throws IOException { + String filename = null; + String contentDisposition = response.header("Content-Disposition"); + if (contentDisposition != null && !"".equals(contentDisposition)) { + // Get filename from the Content-Disposition header. + Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); + Matcher matcher = pattern.matcher(contentDisposition); + if (matcher.find()) { + filename = sanitizeFilename(matcher.group(1)); + } + } + + String prefix = null; + String suffix = null; + if (filename == null) { + prefix = "download-"; + suffix = ""; + } else { + int pos = filename.lastIndexOf("."); + if (pos == -1) { + prefix = filename + "-"; + } else { + prefix = filename.substring(0, pos) + "-"; + suffix = filename.substring(pos); + } + // Files.createTempFile requires the prefix to be at least three characters long + if (prefix.length() < 3) + prefix = "download-"; + } + + if (tempFolderPath == null) + return Files.createTempFile(prefix, suffix).toFile(); + else + return Files.createTempFile(Paths.get(tempFolderPath), prefix, suffix).toFile(); + } + + /** + * {@link #execute(Call, Type)} + * + * @param Type + * @param call An instance of the Call object + * @return ApiResponse<T> + * @throws saasus.sdk.apigateway.ApiException If fail to execute the call + */ + public ApiResponse execute(Call call) throws ApiException { + return execute(call, null); + } + + /** + * Execute HTTP call and deserialize the HTTP response body into the given return type. + * + * @param returnType The return type used to deserialize HTTP response body + * @param The return type corresponding to (same with) returnType + * @param call Call + * @return ApiResponse object containing response status, headers and + * data, which is a Java object deserialized from response body and would be null + * when returnType is null. + * @throws saasus.sdk.apigateway.ApiException If fail to execute the call + */ + public ApiResponse execute(Call call, Type returnType) throws ApiException { + try { + Response response = call.execute(); + T data = handleResponse(response, returnType); + return new ApiResponse(response.code(), response.headers().toMultimap(), data); + } catch (IOException e) { + throw new ApiException(e); + } + } + + /** + * {@link #executeAsync(Call, Type, ApiCallback)} + * + * @param Type + * @param call An instance of the Call object + * @param callback ApiCallback<T> + */ + public void executeAsync(Call call, ApiCallback callback) { + executeAsync(call, null, callback); + } + + /** + * Execute HTTP call asynchronously. + * + * @param Type + * @param call The callback to be executed when the API call finishes + * @param returnType Return type + * @param callback ApiCallback + * @see #execute(Call, Type) + */ + @SuppressWarnings("unchecked") + public void executeAsync(Call call, final Type returnType, final ApiCallback callback) { + call.enqueue(new Callback() { + @Override + public void onFailure(Call call, IOException e) { + callback.onFailure(new ApiException(e), 0, null); + } + + @Override + public void onResponse(Call call, Response response) throws IOException { + T result; + try { + result = (T) handleResponse(response, returnType); + } catch (ApiException e) { + callback.onFailure(e, response.code(), response.headers().toMultimap()); + return; + } catch (Exception e) { + callback.onFailure(new ApiException(e), response.code(), response.headers().toMultimap()); + return; + } + callback.onSuccess(result, response.code(), response.headers().toMultimap()); + } + }); + } + + /** + * Handle the given response, return the deserialized object when the response is successful. + * + * @param Type + * @param response Response + * @param returnType Return type + * @return Type + * @throws saasus.sdk.apigateway.ApiException If the response has an unsuccessful status code or + * fail to deserialize the response body + */ + public T handleResponse(Response response, Type returnType) throws ApiException { + if (response.isSuccessful()) { + if (returnType == null || response.code() == 204) { + // returning null if the returnType is not defined, + // or the status code is 204 (No Content) + if (response.body() != null) { + try { + response.body().close(); + } catch (Exception e) { + throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap()); + } + } + return null; + } else { + return deserialize(response, returnType); + } + } else { + String respBody = null; + if (response.body() != null) { + try { + respBody = response.body().string(); + } catch (IOException e) { + throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap()); + } + } + throw new ApiException(response.message(), response.code(), response.headers().toMultimap(), respBody); + } + } + + /** + * Build HTTP call with the given options. + * + * @param baseUrl The base URL + * @param path The sub-path of the HTTP URL + * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" + * @param queryParams The query parameters + * @param collectionQueryParams The collection query parameters + * @param body The request body object + * @param headerParams The header parameters + * @param cookieParams The cookie parameters + * @param formParams The form parameters + * @param authNames The authentications to apply + * @param callback Callback for upload/download progress + * @return The HTTP call + * @throws saasus.sdk.apigateway.ApiException If fail to serialize the request body object + */ + public Call buildCall(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { + Request request = buildRequest(baseUrl, path, method, queryParams, collectionQueryParams, body, headerParams, cookieParams, formParams, authNames, callback); + + return httpClient.newCall(request); + } + + /** + * Build an HTTP request with the given options. + * + * @param baseUrl The base URL + * @param path The sub-path of the HTTP URL + * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" + * @param queryParams The query parameters + * @param collectionQueryParams The collection query parameters + * @param body The request body object + * @param headerParams The header parameters + * @param cookieParams The cookie parameters + * @param formParams The form parameters + * @param authNames The authentications to apply + * @param callback Callback for upload/download progress + * @return The HTTP request + * @throws saasus.sdk.apigateway.ApiException If fail to serialize the request body object + */ + public Request buildRequest(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { + // aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams + List allQueryParams = new ArrayList(queryParams); + allQueryParams.addAll(collectionQueryParams); + + final String url = buildUrl(baseUrl, path, queryParams, collectionQueryParams); + + // prepare HTTP request body + RequestBody reqBody; + String contentType = headerParams.get("Content-Type"); + String contentTypePure = contentType; + if (contentTypePure != null && contentTypePure.contains(";")) { + contentTypePure = contentType.substring(0, contentType.indexOf(";")); + } + if (!HttpMethod.permitsRequestBody(method)) { + reqBody = null; + } else if ("application/x-www-form-urlencoded".equals(contentTypePure)) { + reqBody = buildRequestBodyFormEncoding(formParams); + } else if ("multipart/form-data".equals(contentTypePure)) { + reqBody = buildRequestBodyMultipart(formParams); + } else if (body == null) { + if ("DELETE".equals(method)) { + // allow calling DELETE without sending a request body + reqBody = null; + } else { + // use an empty request body (for POST, PUT and PATCH) + reqBody = RequestBody.create("", contentType == null ? null : MediaType.parse(contentType)); + } + } else { + reqBody = serialize(body, contentType); + } + + // update parameters with authentication settings + updateParamsForAuth(authNames, allQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url)); + + final Request.Builder reqBuilder = new Request.Builder().url(url); + processHeaderParams(headerParams, reqBuilder); + processCookieParams(cookieParams, reqBuilder); + + // Associate callback with request (if not null) so interceptor can + // access it when creating ProgressResponseBody + reqBuilder.tag(callback); + + Request request = null; + + if (callback != null && reqBody != null) { + ProgressRequestBody progressRequestBody = new ProgressRequestBody(reqBody, callback); + request = reqBuilder.method(method, progressRequestBody).build(); + } else { + request = reqBuilder.method(method, reqBody).build(); + } + + return request; + } + + /** + * Build full URL by concatenating base path, the given sub path and query parameters. + * + * @param baseUrl The base URL + * @param path The sub path + * @param queryParams The query parameters + * @param collectionQueryParams The collection query parameters + * @return The full URL + */ + public String buildUrl(String baseUrl, String path, List queryParams, List collectionQueryParams) { + final StringBuilder url = new StringBuilder(); + if (baseUrl != null) { + url.append(baseUrl).append(path); + } else { + String baseURL; + if (serverIndex != null) { + if (serverIndex < 0 || serverIndex >= servers.size()) { + throw new ArrayIndexOutOfBoundsException(String.format( + "Invalid index %d when selecting the host settings. Must be less than %d", serverIndex, servers.size() + )); + } + baseURL = servers.get(serverIndex).URL(serverVariables); + } else { + baseURL = basePath; + } + url.append(baseURL).append(path); + } + + if (queryParams != null && !queryParams.isEmpty()) { + // support (constant) query string in `path`, e.g. "/posts?draft=1" + String prefix = path.contains("?") ? "&" : "?"; + for (Pair param : queryParams) { + if (param.getValue() != null) { + if (prefix != null) { + url.append(prefix); + prefix = null; + } else { + url.append("&"); + } + String value = parameterToString(param.getValue()); + url.append(escapeString(param.getName())).append("=").append(escapeString(value)); + } + } + } + + if (collectionQueryParams != null && !collectionQueryParams.isEmpty()) { + String prefix = url.toString().contains("?") ? "&" : "?"; + for (Pair param : collectionQueryParams) { + if (param.getValue() != null) { + if (prefix != null) { + url.append(prefix); + prefix = null; + } else { + url.append("&"); + } + String value = parameterToString(param.getValue()); + // collection query parameter value already escaped as part of parameterToPairs + url.append(escapeString(param.getName())).append("=").append(value); + } + } + } + + return url.toString(); + } + + /** + * Set header parameters to the request builder, including default headers. + * + * @param headerParams Header parameters in the form of Map + * @param reqBuilder Request.Builder + */ + public void processHeaderParams(Map headerParams, Request.Builder reqBuilder) { + for (Entry param : headerParams.entrySet()) { + reqBuilder.header(param.getKey(), parameterToString(param.getValue())); + } + for (Entry header : defaultHeaderMap.entrySet()) { + if (!headerParams.containsKey(header.getKey())) { + reqBuilder.header(header.getKey(), parameterToString(header.getValue())); + } + } + } + + /** + * Set cookie parameters to the request builder, including default cookies. + * + * @param cookieParams Cookie parameters in the form of Map + * @param reqBuilder Request.Builder + */ + public void processCookieParams(Map cookieParams, Request.Builder reqBuilder) { + for (Entry param : cookieParams.entrySet()) { + reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); + } + for (Entry param : defaultCookieMap.entrySet()) { + if (!cookieParams.containsKey(param.getKey())) { + reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); + } + } + } + + /** + * Update query and header parameters based on authentication settings. + * + * @param authNames The authentications to apply + * @param queryParams List of query parameters + * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters + * @param payload HTTP request body + * @param method HTTP method + * @param uri URI + * @throws saasus.sdk.apigateway.ApiException If fails to update the parameters + */ + public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, + Map cookieParams, String payload, String method, URI uri) throws ApiException { + for (String authName : authNames) { + Authentication auth = authentications.get(authName); + if (auth == null) { + throw new RuntimeException("Authentication undefined: " + authName); + } + auth.applyToParams(queryParams, headerParams, cookieParams, payload, method, uri); + } + } + + /** + * Build a form-encoding request body with the given form parameters. + * + * @param formParams Form parameters in the form of Map + * @return RequestBody + */ + public RequestBody buildRequestBodyFormEncoding(Map formParams) { + okhttp3.FormBody.Builder formBuilder = new okhttp3.FormBody.Builder(); + for (Entry param : formParams.entrySet()) { + formBuilder.add(param.getKey(), parameterToString(param.getValue())); + } + return formBuilder.build(); + } + + /** + * Build a multipart (file uploading) request body with the given form parameters, + * which could contain text fields and file fields. + * + * @param formParams Form parameters in the form of Map + * @return RequestBody + */ + public RequestBody buildRequestBodyMultipart(Map formParams) { + MultipartBody.Builder mpBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM); + for (Entry param : formParams.entrySet()) { + if (param.getValue() instanceof File) { + File file = (File) param.getValue(); + addPartToMultiPartBuilder(mpBuilder, param.getKey(), file); + } else if (param.getValue() instanceof List) { + List list = (List) param.getValue(); + for (Object item: list) { + if (item instanceof File) { + addPartToMultiPartBuilder(mpBuilder, param.getKey(), (File) item); + } else { + addPartToMultiPartBuilder(mpBuilder, param.getKey(), param.getValue()); + } + } + } else { + addPartToMultiPartBuilder(mpBuilder, param.getKey(), param.getValue()); + } + } + return mpBuilder.build(); + } + + /** + * Guess Content-Type header from the given file (defaults to "application/octet-stream"). + * + * @param file The given file + * @return The guessed Content-Type + */ + public String guessContentTypeFromFile(File file) { + String contentType = URLConnection.guessContentTypeFromName(file.getName()); + if (contentType == null) { + return "application/octet-stream"; + } else { + return contentType; + } + } + + /** + * Add a Content-Disposition Header for the given key and file to the MultipartBody Builder. + * + * @param mpBuilder MultipartBody.Builder + * @param key The key of the Header element + * @param file The file to add to the Header + */ + private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, File file) { + Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + key + "\"; filename=\"" + file.getName() + "\""); + MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file)); + mpBuilder.addPart(partHeaders, RequestBody.create(file, mediaType)); + } + + /** + * Add a Content-Disposition Header for the given key and complex object to the MultipartBody Builder. + * + * @param mpBuilder MultipartBody.Builder + * @param key The key of the Header element + * @param obj The complex object to add to the Header + */ + private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, Object obj) { + RequestBody requestBody; + if (obj instanceof String) { + requestBody = RequestBody.create((String) obj, MediaType.parse("text/plain")); + } else { + String content; + if (obj != null) { + content = JSON.serialize(obj); + } else { + content = null; + } + requestBody = RequestBody.create(content, MediaType.parse("application/json")); + } + + Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + key + "\""); + mpBuilder.addPart(partHeaders, requestBody); + } + + /** + * Get network interceptor to add it to the httpClient to track download progress for + * async requests. + */ + private Interceptor getProgressInterceptor() { + return new Interceptor() { + @Override + public Response intercept(Interceptor.Chain chain) throws IOException { + final Request request = chain.request(); + final Response originalResponse = chain.proceed(request); + if (request.tag() instanceof ApiCallback) { + final ApiCallback callback = (ApiCallback) request.tag(); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), callback)) + .build(); + } + return originalResponse; + } + }; + } + + /** + * Apply SSL related settings to httpClient according to the current values of + * verifyingSsl and sslCaCert. + */ + private void applySslSettings() { + try { + TrustManager[] trustManagers; + HostnameVerifier hostnameVerifier; + if (!verifyingSsl) { + trustManagers = new TrustManager[]{ + new X509TrustManager() { + @Override + public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException { + } + + @Override + public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException { + } + + @Override + public java.security.cert.X509Certificate[] getAcceptedIssuers() { + return new java.security.cert.X509Certificate[]{}; + } + } + }; + hostnameVerifier = new HostnameVerifier() { + @Override + public boolean verify(String hostname, SSLSession session) { + return true; + } + }; + } else { + TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); + + if (sslCaCert == null) { + trustManagerFactory.init((KeyStore) null); + } else { + char[] password = null; // Any password will work. + CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509"); + Collection certificates = certificateFactory.generateCertificates(sslCaCert); + if (certificates.isEmpty()) { + throw new IllegalArgumentException("expected non-empty set of trusted certificates"); + } + KeyStore caKeyStore = newEmptyKeyStore(password); + int index = 0; + for (Certificate certificate : certificates) { + String certificateAlias = "ca" + (index++); + caKeyStore.setCertificateEntry(certificateAlias, certificate); + } + trustManagerFactory.init(caKeyStore); + } + trustManagers = trustManagerFactory.getTrustManagers(); + hostnameVerifier = OkHostnameVerifier.INSTANCE; + } + + SSLContext sslContext = SSLContext.getInstance("TLS"); + sslContext.init(keyManagers, trustManagers, new SecureRandom()); + httpClient = httpClient.newBuilder() + .sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) trustManagers[0]) + .hostnameVerifier(hostnameVerifier) + .build(); + } catch (GeneralSecurityException e) { + throw new RuntimeException(e); + } + } + + private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException { + try { + KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); + keyStore.load(null, password); + return keyStore; + } catch (IOException e) { + throw new AssertionError(e); + } + } + + /** + * Convert the HTTP request body to a string. + * + * @param requestBody The HTTP request object + * @return The string representation of the HTTP request body + * @throws saasus.sdk.apigateway.ApiException If fail to serialize the request body object into a string + */ + private String requestBodyToString(RequestBody requestBody) throws ApiException { + if (requestBody != null) { + try { + final Buffer buffer = new Buffer(); + requestBody.writeTo(buffer); + return buffer.readUtf8(); + } catch (final IOException e) { + throw new ApiException(e); + } + } + + // empty http request body + return ""; + } +} diff --git a/src/main/java/saasus/sdk/apigateway/ApiException.java b/src/main/java/saasus/sdk/apigateway/ApiException.java new file mode 100644 index 00000000..766be0cf --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/ApiException.java @@ -0,0 +1,165 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway; + +import java.util.Map; +import java.util.List; + + +/** + *

ApiException class.

+ */ +@SuppressWarnings("serial") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +public class ApiException extends Exception { + private int code = 0; + private Map> responseHeaders = null; + private String responseBody = null; + + /** + *

Constructor for ApiException.

+ */ + public ApiException() {} + + /** + *

Constructor for ApiException.

+ * + * @param throwable a {@link java.lang.Throwable} object + */ + public ApiException(Throwable throwable) { + super(throwable); + } + + /** + *

Constructor for ApiException.

+ * + * @param message the error message + */ + public ApiException(String message) { + super(message); + } + + /** + *

Constructor for ApiException.

+ * + * @param message the error message + * @param throwable a {@link java.lang.Throwable} object + * @param code HTTP status code + * @param responseHeaders a {@link java.util.Map} of HTTP response headers + * @param responseBody the response body + */ + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) { + super(message, throwable); + this.code = code; + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + /** + *

Constructor for ApiException.

+ * + * @param message the error message + * @param code HTTP status code + * @param responseHeaders a {@link java.util.Map} of HTTP response headers + * @param responseBody the response body + */ + public ApiException(String message, int code, Map> responseHeaders, String responseBody) { + this(message, (Throwable) null, code, responseHeaders, responseBody); + } + + /** + *

Constructor for ApiException.

+ * + * @param message the error message + * @param throwable a {@link java.lang.Throwable} object + * @param code HTTP status code + * @param responseHeaders a {@link java.util.Map} of HTTP response headers + */ + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) { + this(message, throwable, code, responseHeaders, null); + } + + /** + *

Constructor for ApiException.

+ * + * @param code HTTP status code + * @param responseHeaders a {@link java.util.Map} of HTTP response headers + * @param responseBody the response body + */ + public ApiException(int code, Map> responseHeaders, String responseBody) { + this("Response Code: " + code + " Response Body: " + responseBody, (Throwable) null, code, responseHeaders, responseBody); + } + + /** + *

Constructor for ApiException.

+ * + * @param code HTTP status code + * @param message a {@link java.lang.String} object + */ + public ApiException(int code, String message) { + super(message); + this.code = code; + } + + /** + *

Constructor for ApiException.

+ * + * @param code HTTP status code + * @param message the error message + * @param responseHeaders a {@link java.util.Map} of HTTP response headers + * @param responseBody the response body + */ + public ApiException(int code, String message, Map> responseHeaders, String responseBody) { + this(code, message); + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + /** + * Get the HTTP status code. + * + * @return HTTP status code + */ + public int getCode() { + return code; + } + + /** + * Get the HTTP response headers. + * + * @return A map of list of string + */ + public Map> getResponseHeaders() { + return responseHeaders; + } + + /** + * Get the HTTP response body. + * + * @return Response body in the form of string + */ + public String getResponseBody() { + return responseBody; + } + + /** + * Get the exception message including HTTP response data. + * + * @return The exception message + */ + public String getMessage() { + return String.format("Message: %s%nHTTP response code: %s%nHTTP response body: %s%nHTTP response headers: %s", + super.getMessage(), this.getCode(), this.getResponseBody(), this.getResponseHeaders()); + } +} diff --git a/src/main/java/saasus/sdk/apigateway/ApiResponse.java b/src/main/java/saasus/sdk/apigateway/ApiResponse.java new file mode 100644 index 00000000..e17273b6 --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/ApiResponse.java @@ -0,0 +1,76 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway; + +import java.util.List; +import java.util.Map; + +/** + * API response returned by API call. + */ +public class ApiResponse { + final private int statusCode; + final private Map> headers; + final private T data; + + /** + *

Constructor for ApiResponse.

+ * + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + */ + public ApiResponse(int statusCode, Map> headers) { + this(statusCode, headers, null); + } + + /** + *

Constructor for ApiResponse.

+ * + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + * @param data The object deserialized from response bod + */ + public ApiResponse(int statusCode, Map> headers, T data) { + this.statusCode = statusCode; + this.headers = headers; + this.data = data; + } + + /** + *

Get the status code.

+ * + * @return the status code + */ + public int getStatusCode() { + return statusCode; + } + + /** + *

Get the headers.

+ * + * @return a {@link java.util.Map} of headers + */ + public Map> getHeaders() { + return headers; + } + + /** + *

Get the data.

+ * + * @return the data + */ + public T getData() { + return data; + } +} diff --git a/src/main/java/saasus/sdk/apigateway/Configuration.java b/src/main/java/saasus/sdk/apigateway/Configuration.java new file mode 100644 index 00000000..1ef23cd8 --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/Configuration.java @@ -0,0 +1,41 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +public class Configuration { + public static final String VERSION = "1.0.0"; + + private static ApiClient defaultApiClient = new ApiClient(); + + /** + * Get the default API client, which would be used when creating API + * instances without providing an API client. + * + * @return Default API client + */ + public static ApiClient getDefaultApiClient() { + return defaultApiClient; + } + + /** + * Set the default API client, which would be used when creating API + * instances without providing an API client. + * + * @param apiClient API client + */ + public static void setDefaultApiClient(ApiClient apiClient) { + defaultApiClient = apiClient; + } +} diff --git a/src/main/java/saasus/sdk/apigateway/GzipRequestInterceptor.java b/src/main/java/saasus/sdk/apigateway/GzipRequestInterceptor.java new file mode 100644 index 00000000..71797ec6 --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/GzipRequestInterceptor.java @@ -0,0 +1,85 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway; + +import okhttp3.*; +import okio.Buffer; +import okio.BufferedSink; +import okio.GzipSink; +import okio.Okio; + +import java.io.IOException; + +/** + * Encodes request bodies using gzip. + * + * Taken from https://github.com/square/okhttp/issues/350 + */ +class GzipRequestInterceptor implements Interceptor { + @Override + public Response intercept(Chain chain) throws IOException { + Request originalRequest = chain.request(); + if (originalRequest.body() == null || originalRequest.header("Content-Encoding") != null) { + return chain.proceed(originalRequest); + } + + Request compressedRequest = originalRequest.newBuilder() + .header("Content-Encoding", "gzip") + .method(originalRequest.method(), forceContentLength(gzip(originalRequest.body()))) + .build(); + return chain.proceed(compressedRequest); + } + + private RequestBody forceContentLength(final RequestBody requestBody) throws IOException { + final Buffer buffer = new Buffer(); + requestBody.writeTo(buffer); + return new RequestBody() { + @Override + public MediaType contentType() { + return requestBody.contentType(); + } + + @Override + public long contentLength() { + return buffer.size(); + } + + @Override + public void writeTo(BufferedSink sink) throws IOException { + sink.write(buffer.snapshot()); + } + }; + } + + private RequestBody gzip(final RequestBody body) { + return new RequestBody() { + @Override + public MediaType contentType() { + return body.contentType(); + } + + @Override + public long contentLength() { + return -1; // We don't know the compressed length in advance! + } + + @Override + public void writeTo(BufferedSink sink) throws IOException { + BufferedSink gzipSink = Okio.buffer(new GzipSink(sink)); + body.writeTo(gzipSink); + gzipSink.close(); + } + }; + } +} diff --git a/src/main/java/saasus/sdk/apigateway/JSON.java b/src/main/java/saasus/sdk/apigateway/JSON.java new file mode 100644 index 00000000..ff6bd679 --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/JSON.java @@ -0,0 +1,414 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.internal.bind.util.ISO8601Utils; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonElement; +import io.gsonfire.GsonFireBuilder; +import io.gsonfire.TypeSelector; + +import okio.ByteString; + +import java.io.IOException; +import java.io.StringReader; +import java.lang.reflect.Type; +import java.text.DateFormat; +import java.text.ParseException; +import java.text.ParsePosition; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Date; +import java.util.Locale; +import java.util.Map; +import java.util.HashMap; + +/* + * A JSON utility class + * + * NOTE: in the future, this class may be converted to static, which may break + * backward-compatibility + */ +public class JSON { + private static Gson gson; + private static boolean isLenientOnJson = false; + private static DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); + private static SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); + private static OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(); + private static LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); + private static ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); + + @SuppressWarnings("unchecked") + public static GsonBuilder createGson() { + GsonFireBuilder fireBuilder = new GsonFireBuilder() + ; + GsonBuilder builder = fireBuilder.createGsonBuilder(); + return builder; + } + + private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) { + JsonElement element = readElement.getAsJsonObject().get(discriminatorField); + if (null == element) { + throw new IllegalArgumentException("missing discriminator field: <" + discriminatorField + ">"); + } + return element.getAsString(); + } + + /** + * Returns the Java class that implements the OpenAPI schema for the specified discriminator value. + * + * @param classByDiscriminatorValue The map of discriminator values to Java classes. + * @param discriminatorValue The value of the OpenAPI discriminator in the input data. + * @return The Java class that implements the OpenAPI schema + */ + private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) { + Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue); + if (null == clazz) { + throw new IllegalArgumentException("cannot determine model class of name: <" + discriminatorValue + ">"); + } + return clazz; + } + + { + GsonBuilder gsonBuilder = createGson(); + gsonBuilder.registerTypeAdapter(Date.class, dateTypeAdapter); + gsonBuilder.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter); + gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter); + gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); + gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); + gsonBuilder.registerTypeAdapterFactory(new saasus.sdk.apigateway.models.ApiGatewayInputFile.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new saasus.sdk.apigateway.models.ApiGatewaySettings.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new saasus.sdk.apigateway.models.ApiGatewayTenant.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new saasus.sdk.apigateway.models.ApiKey.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new saasus.sdk.apigateway.models.ApiKeys.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new saasus.sdk.apigateway.models.CloudFormationLaunchStackLink.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new saasus.sdk.apigateway.models.CreateApiKeyParam.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new saasus.sdk.apigateway.models.DnsRecord.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new saasus.sdk.apigateway.models.EndpointSettings.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new saasus.sdk.apigateway.models.Error.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new saasus.sdk.apigateway.models.TenantRouting.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new saasus.sdk.apigateway.models.Throttling.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new saasus.sdk.apigateway.models.UpdateApiGatewaySettingsParam.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new saasus.sdk.apigateway.models.UpdateTenantParam.CustomTypeAdapterFactory()); + gson = gsonBuilder.create(); + } + + /** + * Get Gson. + * + * @return Gson + */ + public static Gson getGson() { + return gson; + } + + /** + * Set Gson. + * + * @param gson Gson + */ + public static void setGson(Gson gson) { + JSON.gson = gson; + } + + public static void setLenientOnJson(boolean lenientOnJson) { + isLenientOnJson = lenientOnJson; + } + + /** + * Serialize the given Java object into JSON string. + * + * @param obj Object + * @return String representation of the JSON + */ + public static String serialize(Object obj) { + return gson.toJson(obj); + } + + /** + * Deserialize the given JSON string to Java object. + * + * @param Type + * @param body The JSON string + * @param returnType The type to deserialize into + * @return The deserialized Java object + */ + @SuppressWarnings("unchecked") + public static T deserialize(String body, Type returnType) { + try { + if (isLenientOnJson) { + JsonReader jsonReader = new JsonReader(new StringReader(body)); + // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) + jsonReader.setLenient(true); + return gson.fromJson(jsonReader, returnType); + } else { + return gson.fromJson(body, returnType); + } + } catch (JsonParseException e) { + // Fallback processing when failed to parse JSON form response body: + // return the response body string directly for the String return type; + if (returnType.equals(String.class)) { + return (T) body; + } else { + throw (e); + } + } + } + + /** + * Gson TypeAdapter for Byte Array type + */ + public static class ByteArrayAdapter extends TypeAdapter { + + @Override + public void write(JsonWriter out, byte[] value) throws IOException { + if (value == null) { + out.nullValue(); + } else { + out.value(ByteString.of(value).base64()); + } + } + + @Override + public byte[] read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String bytesAsBase64 = in.nextString(); + ByteString byteString = ByteString.decodeBase64(bytesAsBase64); + return byteString.toByteArray(); + } + } + } + + /** + * Gson TypeAdapter for JSR310 OffsetDateTime type + */ + public static class OffsetDateTimeTypeAdapter extends TypeAdapter { + + private DateTimeFormatter formatter; + + public OffsetDateTimeTypeAdapter() { + this(DateTimeFormatter.ISO_OFFSET_DATE_TIME); + } + + public OffsetDateTimeTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } + + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } + + @Override + public void write(JsonWriter out, OffsetDateTime date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.format(date)); + } + } + + @Override + public OffsetDateTime read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + if (date.endsWith("+0000")) { + date = date.substring(0, date.length()-5) + "Z"; + } + return OffsetDateTime.parse(date, formatter); + } + } + } + + /** + * Gson TypeAdapter for JSR310 LocalDate type + */ + public static class LocalDateTypeAdapter extends TypeAdapter { + + private DateTimeFormatter formatter; + + public LocalDateTypeAdapter() { + this(DateTimeFormatter.ISO_LOCAL_DATE); + } + + public LocalDateTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } + + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } + + @Override + public void write(JsonWriter out, LocalDate date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.format(date)); + } + } + + @Override + public LocalDate read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + return LocalDate.parse(date, formatter); + } + } + } + + public static void setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { + offsetDateTimeTypeAdapter.setFormat(dateFormat); + } + + public static void setLocalDateFormat(DateTimeFormatter dateFormat) { + localDateTypeAdapter.setFormat(dateFormat); + } + + /** + * Gson TypeAdapter for java.sql.Date type + * If the dateFormat is null, a simple "yyyy-MM-dd" format will be used + * (more efficient than SimpleDateFormat). + */ + public static class SqlDateTypeAdapter extends TypeAdapter { + + private DateFormat dateFormat; + + public SqlDateTypeAdapter() {} + + public SqlDateTypeAdapter(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + public void setFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + @Override + public void write(JsonWriter out, java.sql.Date date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + String value; + if (dateFormat != null) { + value = dateFormat.format(date); + } else { + value = date.toString(); + } + out.value(value); + } + } + + @Override + public java.sql.Date read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + try { + if (dateFormat != null) { + return new java.sql.Date(dateFormat.parse(date).getTime()); + } + return new java.sql.Date(ISO8601Utils.parse(date, new ParsePosition(0)).getTime()); + } catch (ParseException e) { + throw new JsonParseException(e); + } + } + } + } + + /** + * Gson TypeAdapter for java.util.Date type + * If the dateFormat is null, ISO8601Utils will be used. + */ + public static class DateTypeAdapter extends TypeAdapter { + + private DateFormat dateFormat; + + public DateTypeAdapter() {} + + public DateTypeAdapter(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + public void setFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + @Override + public void write(JsonWriter out, Date date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + String value; + if (dateFormat != null) { + value = dateFormat.format(date); + } else { + value = ISO8601Utils.format(date, true); + } + out.value(value); + } + } + + @Override + public Date read(JsonReader in) throws IOException { + try { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + try { + if (dateFormat != null) { + return dateFormat.parse(date); + } + return ISO8601Utils.parse(date, new ParsePosition(0)); + } catch (ParseException e) { + throw new JsonParseException(e); + } + } + } catch (IllegalArgumentException e) { + throw new JsonParseException(e); + } + } + } + + public static void setDateFormat(DateFormat dateFormat) { + dateTypeAdapter.setFormat(dateFormat); + } + + public static void setSqlDateFormat(DateFormat dateFormat) { + sqlDateTypeAdapter.setFormat(dateFormat); + } +} diff --git a/src/main/java/saasus/sdk/apigateway/Pair.java b/src/main/java/saasus/sdk/apigateway/Pair.java new file mode 100644 index 00000000..2cb1cf94 --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/Pair.java @@ -0,0 +1,57 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +public class Pair { + private String name = ""; + private String value = ""; + + public Pair (String name, String value) { + setName(name); + setValue(value); + } + + private void setName(String name) { + if (!isValidString(name)) { + return; + } + + this.name = name; + } + + private void setValue(String value) { + if (!isValidString(value)) { + return; + } + + this.value = value; + } + + public String getName() { + return this.name; + } + + public String getValue() { + return this.value; + } + + private boolean isValidString(String arg) { + if (arg == null) { + return false; + } + + return true; + } +} diff --git a/src/main/java/saasus/sdk/apigateway/ProgressRequestBody.java b/src/main/java/saasus/sdk/apigateway/ProgressRequestBody.java new file mode 100644 index 00000000..d647d0b1 --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/ProgressRequestBody.java @@ -0,0 +1,73 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway; + +import okhttp3.MediaType; +import okhttp3.RequestBody; + +import java.io.IOException; + +import okio.Buffer; +import okio.BufferedSink; +import okio.ForwardingSink; +import okio.Okio; +import okio.Sink; + +public class ProgressRequestBody extends RequestBody { + + private final RequestBody requestBody; + + private final ApiCallback callback; + + public ProgressRequestBody(RequestBody requestBody, ApiCallback callback) { + this.requestBody = requestBody; + this.callback = callback; + } + + @Override + public MediaType contentType() { + return requestBody.contentType(); + } + + @Override + public long contentLength() throws IOException { + return requestBody.contentLength(); + } + + @Override + public void writeTo(BufferedSink sink) throws IOException { + BufferedSink bufferedSink = Okio.buffer(sink(sink)); + requestBody.writeTo(bufferedSink); + bufferedSink.flush(); + } + + private Sink sink(Sink sink) { + return new ForwardingSink(sink) { + + long bytesWritten = 0L; + long contentLength = 0L; + + @Override + public void write(Buffer source, long byteCount) throws IOException { + super.write(source, byteCount); + if (contentLength == 0) { + contentLength = contentLength(); + } + + bytesWritten += byteCount; + callback.onUploadProgress(bytesWritten, contentLength, bytesWritten == contentLength); + } + }; + } +} diff --git a/src/main/java/saasus/sdk/apigateway/ProgressResponseBody.java b/src/main/java/saasus/sdk/apigateway/ProgressResponseBody.java new file mode 100644 index 00000000..a2aa0a95 --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/ProgressResponseBody.java @@ -0,0 +1,70 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway; + +import okhttp3.MediaType; +import okhttp3.ResponseBody; + +import java.io.IOException; + +import okio.Buffer; +import okio.BufferedSource; +import okio.ForwardingSource; +import okio.Okio; +import okio.Source; + +public class ProgressResponseBody extends ResponseBody { + + private final ResponseBody responseBody; + private final ApiCallback callback; + private BufferedSource bufferedSource; + + public ProgressResponseBody(ResponseBody responseBody, ApiCallback callback) { + this.responseBody = responseBody; + this.callback = callback; + } + + @Override + public MediaType contentType() { + return responseBody.contentType(); + } + + @Override + public long contentLength() { + return responseBody.contentLength(); + } + + @Override + public BufferedSource source() { + if (bufferedSource == null) { + bufferedSource = Okio.buffer(source(responseBody.source())); + } + return bufferedSource; + } + + private Source source(Source source) { + return new ForwardingSource(source) { + long totalBytesRead = 0L; + + @Override + public long read(Buffer sink, long byteCount) throws IOException { + long bytesRead = super.read(sink, byteCount); + // read() returns the number of bytes read, or -1 if this source is exhausted. + totalBytesRead += bytesRead != -1 ? bytesRead : 0; + callback.onDownloadProgress(totalBytesRead, responseBody.contentLength(), bytesRead == -1); + return bytesRead; + } + }; + } +} diff --git a/src/main/java/saasus/sdk/apigateway/ServerConfiguration.java b/src/main/java/saasus/sdk/apigateway/ServerConfiguration.java new file mode 100644 index 00000000..9935808c --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/ServerConfiguration.java @@ -0,0 +1,58 @@ +package saasus.sdk.apigateway; + +import java.util.Map; + +/** + * Representing a Server configuration. + */ +public class ServerConfiguration { + public String URL; + public String description; + public Map variables; + + /** + * @param URL A URL to the target host. + * @param description A description of the host designated by the URL. + * @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template. + */ + public ServerConfiguration(String URL, String description, Map variables) { + this.URL = URL; + this.description = description; + this.variables = variables; + } + + /** + * Format URL template using given variables. + * + * @param variables A map between a variable name and its value. + * @return Formatted URL. + */ + public String URL(Map variables) { + String url = this.URL; + + // go through variables and replace placeholders + for (Map.Entry variable: this.variables.entrySet()) { + String name = variable.getKey(); + ServerVariable serverVariable = variable.getValue(); + String value = serverVariable.defaultValue; + + if (variables != null && variables.containsKey(name)) { + value = variables.get(name); + if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); + } + } + url = url.replace("{" + name + "}", value); + } + return url; + } + + /** + * Format URL template using default server variables. + * + * @return Formatted URL. + */ + public String URL() { + return URL(null); + } +} diff --git a/src/main/java/saasus/sdk/apigateway/ServerVariable.java b/src/main/java/saasus/sdk/apigateway/ServerVariable.java new file mode 100644 index 00000000..62e8e54b --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/ServerVariable.java @@ -0,0 +1,23 @@ +package saasus.sdk.apigateway; + +import java.util.HashSet; + +/** + * Representing a Server Variable for server URL template substitution. + */ +public class ServerVariable { + public String description; + public String defaultValue; + public HashSet enumValues = null; + + /** + * @param description A description for the server variable. + * @param defaultValue The default value to use for substitution. + * @param enumValues An enumeration of string values to be used if the substitution options are from a limited set. + */ + public ServerVariable(String description, String defaultValue, HashSet enumValues) { + this.description = description; + this.defaultValue = defaultValue; + this.enumValues = enumValues; + } +} diff --git a/src/main/java/saasus/sdk/apigateway/StringUtil.java b/src/main/java/saasus/sdk/apigateway/StringUtil.java new file mode 100644 index 00000000..95778eed --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/StringUtil.java @@ -0,0 +1,83 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway; + +import java.util.Collection; +import java.util.Iterator; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +public class StringUtil { + /** + * Check if the given array contains the given value (with case-insensitive comparison). + * + * @param array The array + * @param value The value to search + * @return true if the array contains the value + */ + public static boolean containsIgnoreCase(String[] array, String value) { + for (String str : array) { + if (value == null && str == null) { + return true; + } + if (value != null && value.equalsIgnoreCase(str)) { + return true; + } + } + return false; + } + + /** + * Join an array of strings with the given separator. + *

+ * Note: This might be replaced by utility method from commons-lang or guava someday + * if one of those libraries is added as dependency. + *

+ * + * @param array The array of strings + * @param separator The separator + * @return the resulting string + */ + public static String join(String[] array, String separator) { + int len = array.length; + if (len == 0) { + return ""; + } + + StringBuilder out = new StringBuilder(); + out.append(array[0]); + for (int i = 1; i < len; i++) { + out.append(separator).append(array[i]); + } + return out.toString(); + } + + /** + * Join a list of strings with the given separator. + * + * @param list The list of strings + * @param separator The separator + * @return the resulting string + */ + public static String join(Collection list, String separator) { + Iterator iterator = list.iterator(); + StringBuilder out = new StringBuilder(); + if (iterator.hasNext()) { + out.append(iterator.next()); + } + while (iterator.hasNext()) { + out.append(separator).append(iterator.next()); + } + return out.toString(); + } +} diff --git a/src/main/java/saasus/sdk/apigateway/api/ErrorApi.java b/src/main/java/saasus/sdk/apigateway/api/ErrorApi.java new file mode 100644 index 00000000..9b2c8be0 --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/api/ErrorApi.java @@ -0,0 +1,184 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.api; + +import saasus.sdk.apigateway.ApiCallback; +import saasus.sdk.apigateway.ApiClient; +import saasus.sdk.apigateway.ApiException; +import saasus.sdk.apigateway.ApiResponse; +import saasus.sdk.apigateway.Configuration; +import saasus.sdk.apigateway.Pair; +import saasus.sdk.apigateway.ProgressRequestBody; +import saasus.sdk.apigateway.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import saasus.sdk.apigateway.models.Error; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class ErrorApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public ErrorApi() { + this(Configuration.getDefaultApiClient()); + } + + public ErrorApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for returnInternalServerError + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
500 Internal Server Error -
+ */ + public okhttp3.Call returnInternalServerErrorCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/errors/internal-server-error"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "Bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call returnInternalServerErrorValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return returnInternalServerErrorCall(_callback); + + } + + /** + * Return Internal Server Error + * This endpoint is used for testing purposes. Returns a server error with status code 500. + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
500 Internal Server Error -
+ */ + public void returnInternalServerError() throws ApiException { + returnInternalServerErrorWithHttpInfo(); + } + + /** + * Return Internal Server Error + * This endpoint is used for testing purposes. Returns a server error with status code 500. + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
500 Internal Server Error -
+ */ + public ApiResponse returnInternalServerErrorWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = returnInternalServerErrorValidateBeforeCall(null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Return Internal Server Error (asynchronously) + * This endpoint is used for testing purposes. Returns a server error with status code 500. + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
500 Internal Server Error -
+ */ + public okhttp3.Call returnInternalServerErrorAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = returnInternalServerErrorValidateBeforeCall(_callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } +} diff --git a/src/main/java/saasus/sdk/apigateway/api/SmartApiGatewayApi.java b/src/main/java/saasus/sdk/apigateway/api/SmartApiGatewayApi.java new file mode 100644 index 00000000..362a82b4 --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/api/SmartApiGatewayApi.java @@ -0,0 +1,1688 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.api; + +import saasus.sdk.apigateway.ApiCallback; +import saasus.sdk.apigateway.ApiClient; +import saasus.sdk.apigateway.ApiException; +import saasus.sdk.apigateway.ApiResponse; +import saasus.sdk.apigateway.Configuration; +import saasus.sdk.apigateway.Pair; +import saasus.sdk.apigateway.ProgressRequestBody; +import saasus.sdk.apigateway.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import saasus.sdk.apigateway.models.ApiGatewayInputFile; +import saasus.sdk.apigateway.models.ApiGatewaySettings; +import saasus.sdk.apigateway.models.ApiGatewayTenant; +import saasus.sdk.apigateway.models.ApiKey; +import saasus.sdk.apigateway.models.ApiKeys; +import saasus.sdk.apigateway.models.CloudFormationLaunchStackLink; +import saasus.sdk.apigateway.models.CreateApiKeyParam; +import saasus.sdk.apigateway.models.Error; +import saasus.sdk.apigateway.models.UpdateApiGatewaySettingsParam; +import saasus.sdk.apigateway.models.UpdateTenantParam; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class SmartApiGatewayApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public SmartApiGatewayApi() { + this(Configuration.getDefaultApiClient()); + } + + public SmartApiGatewayApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for createApiGateway + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public okhttp3.Call createApiGatewayCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "Bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createApiGatewayValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return createApiGatewayCall(_callback); + + } + + /** + * Create the API Gateway + * Create the API Gateway. + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public void createApiGateway() throws ApiException { + createApiGatewayWithHttpInfo(); + } + + /** + * Create the API Gateway + * Create the API Gateway. + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public ApiResponse createApiGatewayWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = createApiGatewayValidateBeforeCall(null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Create the API Gateway (asynchronously) + * Create the API Gateway. + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public okhttp3.Call createApiGatewayAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createApiGatewayValidateBeforeCall(_callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for createApiKey + * @param createApiKeyParam Payload for API key creation or update. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
201 Created -
500 Internal Server Error -
+ */ + public okhttp3.Call createApiKeyCall(CreateApiKeyParam createApiKeyParam, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createApiKeyParam; + + // create path and map variables + String localVarPath = "/api-keys"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "Bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createApiKeyValidateBeforeCall(CreateApiKeyParam createApiKeyParam, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'createApiKeyParam' is set + if (createApiKeyParam == null) { + throw new ApiException("Missing the required parameter 'createApiKeyParam' when calling createApiKey(Async)"); + } + + return createApiKeyCall(createApiKeyParam, _callback); + + } + + /** + * Create an API key + * Creates or updates an API key based on the contents of the request body. All parameters are in the request body: - tenant_id, env_id (required) - user_id (optional) + * @param createApiKeyParam Payload for API key creation or update. (required) + * @return ApiKey + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
201 Created -
500 Internal Server Error -
+ */ + public ApiKey createApiKey(CreateApiKeyParam createApiKeyParam) throws ApiException { + ApiResponse localVarResp = createApiKeyWithHttpInfo(createApiKeyParam); + return localVarResp.getData(); + } + + /** + * Create an API key + * Creates or updates an API key based on the contents of the request body. All parameters are in the request body: - tenant_id, env_id (required) - user_id (optional) + * @param createApiKeyParam Payload for API key creation or update. (required) + * @return ApiResponse<ApiKey> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
201 Created -
500 Internal Server Error -
+ */ + public ApiResponse createApiKeyWithHttpInfo(CreateApiKeyParam createApiKeyParam) throws ApiException { + okhttp3.Call localVarCall = createApiKeyValidateBeforeCall(createApiKeyParam, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Create an API key (asynchronously) + * Creates or updates an API key based on the contents of the request body. All parameters are in the request body: - tenant_id, env_id (required) - user_id (optional) + * @param createApiKeyParam Payload for API key creation or update. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
201 Created -
500 Internal Server Error -
+ */ + public okhttp3.Call createApiKeyAsync(CreateApiKeyParam createApiKeyParam, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createApiKeyValidateBeforeCall(createApiKeyParam, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getApiGatewaySettings + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public okhttp3.Call getApiGatewaySettingsCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/settings"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "Bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getApiGatewaySettingsValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return getApiGatewaySettingsCall(_callback); + + } + + /** + * Obtain configuration information for api gateway function + * Obtain configuration information for api gateway function. + * @return ApiGatewaySettings + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public ApiGatewaySettings getApiGatewaySettings() throws ApiException { + ApiResponse localVarResp = getApiGatewaySettingsWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Obtain configuration information for api gateway function + * Obtain configuration information for api gateway function. + * @return ApiResponse<ApiGatewaySettings> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public ApiResponse getApiGatewaySettingsWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getApiGatewaySettingsValidateBeforeCall(null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Obtain configuration information for api gateway function (asynchronously) + * Obtain configuration information for api gateway function. + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public okhttp3.Call getApiGatewaySettingsAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getApiGatewaySettingsValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getApiKey + * @param apiKey API Key (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public okhttp3.Call getApiKeyCall(String apiKey, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api-keys/{api_key}" + .replace("{" + "api_key" + "}", localVarApiClient.escapeString(apiKey.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "Bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getApiKeyValidateBeforeCall(String apiKey, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'apiKey' is set + if (apiKey == null) { + throw new ApiException("Missing the required parameter 'apiKey' when calling getApiKey(Async)"); + } + + return getApiKeyCall(apiKey, _callback); + + } + + /** + * get API key details by API key + * Get the details of the API key by specifying the API key. + * @param apiKey API Key (required) + * @return ApiKey + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public ApiKey getApiKey(String apiKey) throws ApiException { + ApiResponse localVarResp = getApiKeyWithHttpInfo(apiKey); + return localVarResp.getData(); + } + + /** + * get API key details by API key + * Get the details of the API key by specifying the API key. + * @param apiKey API Key (required) + * @return ApiResponse<ApiKey> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public ApiResponse getApiKeyWithHttpInfo(String apiKey) throws ApiException { + okhttp3.Call localVarCall = getApiKeyValidateBeforeCall(apiKey, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * get API key details by API key (asynchronously) + * Get the details of the API key by specifying the API key. + * @param apiKey API Key (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public okhttp3.Call getApiKeyAsync(String apiKey, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getApiKeyValidateBeforeCall(apiKey, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getApiKeys + * @param tenantId If specified, the API keys for the target tenant are returned. (optional) + * @param envId If specified, the API keys for the target environment are returned. (optional) + * @param userId If specified, the API keys for the target user (up to 2) are returned. (optional) + * @param tenantOnly If true, only API keys that do not have a User_id specified are returned. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public okhttp3.Call getApiKeysCall(String tenantId, Integer envId, String userId, Boolean tenantOnly, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api-keys"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (tenantId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenant_id", tenantId)); + } + + if (envId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("env_id", envId)); + } + + if (userId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("user_id", userId)); + } + + if (tenantOnly != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("tenant_only", tenantOnly)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "Bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getApiKeysValidateBeforeCall(String tenantId, Integer envId, String userId, Boolean tenantOnly, final ApiCallback _callback) throws ApiException { + return getApiKeysCall(tenantId, envId, userId, tenantOnly, _callback); + + } + + /** + * API key list or get API key by condition + * The response content changes based on the combination of parameters tenant_id, env_id, and user_id. - If tenant_id is not specified, the full list is returned. - If only tenant_id is specified, the API keys within that tenant are returned. - If tenant_id and env_id are specified, the keys are filtered by the environment. - If tenant_id, env_id, and user_id are specified, a complete match returns the API keys for the target user. - Additionally, searching is supported even when only env_id or only user_id are provided. + * @param tenantId If specified, the API keys for the target tenant are returned. (optional) + * @param envId If specified, the API keys for the target environment are returned. (optional) + * @param userId If specified, the API keys for the target user (up to 2) are returned. (optional) + * @param tenantOnly If true, only API keys that do not have a User_id specified are returned. (optional) + * @return ApiKeys + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public ApiKeys getApiKeys(String tenantId, Integer envId, String userId, Boolean tenantOnly) throws ApiException { + ApiResponse localVarResp = getApiKeysWithHttpInfo(tenantId, envId, userId, tenantOnly); + return localVarResp.getData(); + } + + /** + * API key list or get API key by condition + * The response content changes based on the combination of parameters tenant_id, env_id, and user_id. - If tenant_id is not specified, the full list is returned. - If only tenant_id is specified, the API keys within that tenant are returned. - If tenant_id and env_id are specified, the keys are filtered by the environment. - If tenant_id, env_id, and user_id are specified, a complete match returns the API keys for the target user. - Additionally, searching is supported even when only env_id or only user_id are provided. + * @param tenantId If specified, the API keys for the target tenant are returned. (optional) + * @param envId If specified, the API keys for the target environment are returned. (optional) + * @param userId If specified, the API keys for the target user (up to 2) are returned. (optional) + * @param tenantOnly If true, only API keys that do not have a User_id specified are returned. (optional) + * @return ApiResponse<ApiKeys> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public ApiResponse getApiKeysWithHttpInfo(String tenantId, Integer envId, String userId, Boolean tenantOnly) throws ApiException { + okhttp3.Call localVarCall = getApiKeysValidateBeforeCall(tenantId, envId, userId, tenantOnly, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * API key list or get API key by condition (asynchronously) + * The response content changes based on the combination of parameters tenant_id, env_id, and user_id. - If tenant_id is not specified, the full list is returned. - If only tenant_id is specified, the API keys within that tenant are returned. - If tenant_id and env_id are specified, the keys are filtered by the environment. - If tenant_id, env_id, and user_id are specified, a complete match returns the API keys for the target user. - Additionally, searching is supported even when only env_id or only user_id are provided. + * @param tenantId If specified, the API keys for the target tenant are returned. (optional) + * @param envId If specified, the API keys for the target environment are returned. (optional) + * @param userId If specified, the API keys for the target user (up to 2) are returned. (optional) + * @param tenantOnly If true, only API keys that do not have a User_id specified are returned. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public okhttp3.Call getApiKeysAsync(String tenantId, Integer envId, String userId, Boolean tenantOnly, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getApiKeysValidateBeforeCall(tenantId, envId, userId, tenantOnly, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getCloudFormationLaunchStackLink + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public okhttp3.Call getCloudFormationLaunchStackLinkCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/cloudformation-launch-stack-link"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "Bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getCloudFormationLaunchStackLinkValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return getCloudFormationLaunchStackLinkCall(_callback); + + } + + /** + * Get the link to create the AWS CloudFormation stack + * Get the CloudFormation Quick Create link. + * @return CloudFormationLaunchStackLink + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public CloudFormationLaunchStackLink getCloudFormationLaunchStackLink() throws ApiException { + ApiResponse localVarResp = getCloudFormationLaunchStackLinkWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Get the link to create the AWS CloudFormation stack + * Get the CloudFormation Quick Create link. + * @return ApiResponse<CloudFormationLaunchStackLink> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public ApiResponse getCloudFormationLaunchStackLinkWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getCloudFormationLaunchStackLinkValidateBeforeCall(null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get the link to create the AWS CloudFormation stack (asynchronously) + * Get the CloudFormation Quick Create link. + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public okhttp3.Call getCloudFormationLaunchStackLinkAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getCloudFormationLaunchStackLinkValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getTenant + * @param tenantId Tenant ID (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public okhttp3.Call getTenantCall(String tenantId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/tenants/{tenant_id}" + .replace("{" + "tenant_id" + "}", localVarApiClient.escapeString(tenantId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "Bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getTenantValidateBeforeCall(String tenantId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'tenantId' is set + if (tenantId == null) { + throw new ApiException("Missing the required parameter 'tenantId' when calling getTenant(Async)"); + } + + return getTenantCall(tenantId, _callback); + + } + + /** + * Get tenant information + * Get tenant information. + * @param tenantId Tenant ID (required) + * @return ApiGatewayTenant + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public ApiGatewayTenant getTenant(String tenantId) throws ApiException { + ApiResponse localVarResp = getTenantWithHttpInfo(tenantId); + return localVarResp.getData(); + } + + /** + * Get tenant information + * Get tenant information. + * @param tenantId Tenant ID (required) + * @return ApiResponse<ApiGatewayTenant> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public ApiResponse getTenantWithHttpInfo(String tenantId) throws ApiException { + okhttp3.Call localVarCall = getTenantValidateBeforeCall(tenantId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get tenant information (asynchronously) + * Get tenant information. + * @param tenantId Tenant ID (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public okhttp3.Call getTenantAsync(String tenantId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getTenantValidateBeforeCall(tenantId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for publishApiGateway + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public okhttp3.Call publishApiGatewayCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/publish"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "Bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call publishApiGatewayValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return publishApiGatewayCall(_callback); + + } + + /** + * Publish the API Gateway + * Publish the API Gateway. + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public void publishApiGateway() throws ApiException { + publishApiGatewayWithHttpInfo(); + } + + /** + * Publish the API Gateway + * Publish the API Gateway. + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public ApiResponse publishApiGatewayWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = publishApiGatewayValidateBeforeCall(null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Publish the API Gateway (asynchronously) + * Publish the API Gateway. + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public okhttp3.Call publishApiGatewayAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = publishApiGatewayValidateBeforeCall(_callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for refreshClientSecret + * @param apiKey API Key (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public okhttp3.Call refreshClientSecretCall(String apiKey, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api-keys/{api_key}/client-secret" + .replace("{" + "api_key" + "}", localVarApiClient.escapeString(apiKey.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "Bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call refreshClientSecretValidateBeforeCall(String apiKey, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'apiKey' is set + if (apiKey == null) { + throw new ApiException("Missing the required parameter 'apiKey' when calling refreshClientSecret(Async)"); + } + + return refreshClientSecretCall(apiKey, _callback); + + } + + /** + * Update the client secret of the API key + * Update the client secret of the API key. + * @param apiKey API Key (required) + * @return ApiKey + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public ApiKey refreshClientSecret(String apiKey) throws ApiException { + ApiResponse localVarResp = refreshClientSecretWithHttpInfo(apiKey); + return localVarResp.getData(); + } + + /** + * Update the client secret of the API key + * Update the client secret of the API key. + * @param apiKey API Key (required) + * @return ApiResponse<ApiKey> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public ApiResponse refreshClientSecretWithHttpInfo(String apiKey) throws ApiException { + okhttp3.Call localVarCall = refreshClientSecretValidateBeforeCall(apiKey, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Update the client secret of the API key (asynchronously) + * Update the client secret of the API key. + * @param apiKey API Key (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public okhttp3.Call refreshClientSecretAsync(String apiKey, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = refreshClientSecretValidateBeforeCall(apiKey, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for unpublishApiGateway + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public okhttp3.Call unpublishApiGatewayCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/unpublish"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "Bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call unpublishApiGatewayValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return unpublishApiGatewayCall(_callback); + + } + + /** + * Unpublish the API Gateway + * Unpublish the API Gateway. + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public void unpublishApiGateway() throws ApiException { + unpublishApiGatewayWithHttpInfo(); + } + + /** + * Unpublish the API Gateway + * Unpublish the API Gateway. + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public ApiResponse unpublishApiGatewayWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = unpublishApiGatewayValidateBeforeCall(null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Unpublish the API Gateway (asynchronously) + * Unpublish the API Gateway. + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public okhttp3.Call unpublishApiGatewayAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = unpublishApiGatewayValidateBeforeCall(_callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for updateApiGatewaySettings + * @param updateApiGatewaySettingsParam (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public okhttp3.Call updateApiGatewaySettingsCall(UpdateApiGatewaySettingsParam updateApiGatewaySettingsParam, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateApiGatewaySettingsParam; + + // create path and map variables + String localVarPath = "/settings"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "Bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateApiGatewaySettingsValidateBeforeCall(UpdateApiGatewaySettingsParam updateApiGatewaySettingsParam, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'updateApiGatewaySettingsParam' is set + if (updateApiGatewaySettingsParam == null) { + throw new ApiException("Missing the required parameter 'updateApiGatewaySettingsParam' when calling updateApiGatewaySettings(Async)"); + } + + return updateApiGatewaySettingsCall(updateApiGatewaySettingsParam, _callback); + + } + + /** + * Update configuration information for api gateway function + * Update configuration information for api gateway function. + * @param updateApiGatewaySettingsParam (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public void updateApiGatewaySettings(UpdateApiGatewaySettingsParam updateApiGatewaySettingsParam) throws ApiException { + updateApiGatewaySettingsWithHttpInfo(updateApiGatewaySettingsParam); + } + + /** + * Update configuration information for api gateway function + * Update configuration information for api gateway function. + * @param updateApiGatewaySettingsParam (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public ApiResponse updateApiGatewaySettingsWithHttpInfo(UpdateApiGatewaySettingsParam updateApiGatewaySettingsParam) throws ApiException { + okhttp3.Call localVarCall = updateApiGatewaySettingsValidateBeforeCall(updateApiGatewaySettingsParam, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Update configuration information for api gateway function (asynchronously) + * Update configuration information for api gateway function. + * @param updateApiGatewaySettingsParam (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public okhttp3.Call updateApiGatewaySettingsAsync(UpdateApiGatewaySettingsParam updateApiGatewaySettingsParam, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateApiGatewaySettingsValidateBeforeCall(updateApiGatewaySettingsParam, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for updateTenant + * @param tenantId Tenant ID (required) + * @param updateTenantParam (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public okhttp3.Call updateTenantCall(String tenantId, UpdateTenantParam updateTenantParam, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateTenantParam; + + // create path and map variables + String localVarPath = "/tenants/{tenant_id}" + .replace("{" + "tenant_id" + "}", localVarApiClient.escapeString(tenantId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "Bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateTenantValidateBeforeCall(String tenantId, UpdateTenantParam updateTenantParam, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'tenantId' is set + if (tenantId == null) { + throw new ApiException("Missing the required parameter 'tenantId' when calling updateTenant(Async)"); + } + + // verify the required parameter 'updateTenantParam' is set + if (updateTenantParam == null) { + throw new ApiException("Missing the required parameter 'updateTenantParam' when calling updateTenant(Async)"); + } + + return updateTenantCall(tenantId, updateTenantParam, _callback); + + } + + /** + * Update tenant information + * Update tenant information. + * @param tenantId Tenant ID (required) + * @param updateTenantParam (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public void updateTenant(String tenantId, UpdateTenantParam updateTenantParam) throws ApiException { + updateTenantWithHttpInfo(tenantId, updateTenantParam); + } + + /** + * Update tenant information + * Update tenant information. + * @param tenantId Tenant ID (required) + * @param updateTenantParam (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public ApiResponse updateTenantWithHttpInfo(String tenantId, UpdateTenantParam updateTenantParam) throws ApiException { + okhttp3.Call localVarCall = updateTenantValidateBeforeCall(tenantId, updateTenantParam, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Update tenant information (asynchronously) + * Update tenant information. + * @param tenantId Tenant ID (required) + * @param updateTenantParam (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public okhttp3.Call updateTenantAsync(String tenantId, UpdateTenantParam updateTenantParam, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateTenantValidateBeforeCall(tenantId, updateTenantParam, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for uploadGenerationFiles + * @param apiGatewayInputFile (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public okhttp3.Call uploadGenerationFilesCall(ApiGatewayInputFile apiGatewayInputFile, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = apiGatewayInputFile; + + // create path and map variables + String localVarPath = "/upload"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "Bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call uploadGenerationFilesValidateBeforeCall(ApiGatewayInputFile apiGatewayInputFile, final ApiCallback _callback) throws ApiException { + return uploadGenerationFilesCall(apiGatewayInputFile, _callback); + + } + + /** + * Upload files to create an API Gateway + * Upload files to create an API Gateway + * @param apiGatewayInputFile (optional) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public void uploadGenerationFiles(ApiGatewayInputFile apiGatewayInputFile) throws ApiException { + uploadGenerationFilesWithHttpInfo(apiGatewayInputFile); + } + + /** + * Upload files to create an API Gateway + * Upload files to create an API Gateway + * @param apiGatewayInputFile (optional) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public ApiResponse uploadGenerationFilesWithHttpInfo(ApiGatewayInputFile apiGatewayInputFile) throws ApiException { + okhttp3.Call localVarCall = uploadGenerationFilesValidateBeforeCall(apiGatewayInputFile, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Upload files to create an API Gateway (asynchronously) + * Upload files to create an API Gateway + * @param apiGatewayInputFile (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public okhttp3.Call uploadGenerationFilesAsync(ApiGatewayInputFile apiGatewayInputFile, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = uploadGenerationFilesValidateBeforeCall(apiGatewayInputFile, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } +} diff --git a/src/main/java/saasus/sdk/apigateway/auth/ApiKeyAuth.java b/src/main/java/saasus/sdk/apigateway/auth/ApiKeyAuth.java new file mode 100644 index 00000000..967c256a --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/auth/ApiKeyAuth.java @@ -0,0 +1,80 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.auth; + +import saasus.sdk.apigateway.ApiException; +import saasus.sdk.apigateway.Pair; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +public class ApiKeyAuth implements Authentication { + private final String location; + private final String paramName; + + private String apiKey; + private String apiKeyPrefix; + + public ApiKeyAuth(String location, String paramName) { + this.location = location; + this.paramName = paramName; + } + + public String getLocation() { + return location; + } + + public String getParamName() { + return paramName; + } + + public String getApiKey() { + return apiKey; + } + + public void setApiKey(String apiKey) { + this.apiKey = apiKey; + } + + public String getApiKeyPrefix() { + return apiKeyPrefix; + } + + public void setApiKeyPrefix(String apiKeyPrefix) { + this.apiKeyPrefix = apiKeyPrefix; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, + String payload, String method, URI uri) throws ApiException { + if (apiKey == null) { + return; + } + String value; + if (apiKeyPrefix != null) { + value = apiKeyPrefix + " " + apiKey; + } else { + value = apiKey; + } + if ("query".equals(location)) { + queryParams.add(new Pair(paramName, value)); + } else if ("header".equals(location)) { + headerParams.put(paramName, value); + } else if ("cookie".equals(location)) { + cookieParams.put(paramName, value); + } + } +} diff --git a/src/main/java/saasus/sdk/apigateway/auth/Authentication.java b/src/main/java/saasus/sdk/apigateway/auth/Authentication.java new file mode 100644 index 00000000..1af63952 --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/auth/Authentication.java @@ -0,0 +1,36 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.auth; + +import saasus.sdk.apigateway.Pair; +import saasus.sdk.apigateway.ApiException; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +public interface Authentication { + /** + * Apply authentication settings to header and query params. + * + * @param queryParams List of query parameters + * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters + * @param payload HTTP request body + * @param method HTTP method + * @param uri URI + * @throws ApiException if failed to update the parameters + */ + void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException; +} diff --git a/src/main/java/saasus/sdk/apigateway/auth/HttpBasicAuth.java b/src/main/java/saasus/sdk/apigateway/auth/HttpBasicAuth.java new file mode 100644 index 00000000..953fc61a --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/auth/HttpBasicAuth.java @@ -0,0 +1,57 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.auth; + +import saasus.sdk.apigateway.Pair; +import saasus.sdk.apigateway.ApiException; + +import okhttp3.Credentials; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +import java.io.UnsupportedEncodingException; + +public class HttpBasicAuth implements Authentication { + private String username; + private String password; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, + String payload, String method, URI uri) throws ApiException { + if (username == null && password == null) { + return; + } + headerParams.put("Authorization", Credentials.basic( + username == null ? "" : username, + password == null ? "" : password)); + } +} diff --git a/src/main/java/saasus/sdk/apigateway/auth/HttpBearerAuth.java b/src/main/java/saasus/sdk/apigateway/auth/HttpBearerAuth.java new file mode 100644 index 00000000..81111e17 --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/auth/HttpBearerAuth.java @@ -0,0 +1,75 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.auth; + +import saasus.sdk.apigateway.ApiException; +import saasus.sdk.apigateway.Pair; + +import java.net.URI; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.function.Supplier; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +public class HttpBearerAuth implements Authentication { + private final String scheme; + private Supplier tokenSupplier; + + public HttpBearerAuth(String scheme) { + this.scheme = scheme; + } + + /** + * Gets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @return The bearer token + */ + public String getBearerToken() { + return tokenSupplier.get(); + } + + /** + * Sets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @param bearerToken The bearer token to send in the Authorization header + */ + public void setBearerToken(String bearerToken) { + this.tokenSupplier = () -> bearerToken; + } + + /** + * Sets the supplier of tokens, which together with the scheme, will be sent as the value of the Authorization header. + * + * @param tokenSupplier The supplier of bearer tokens to send in the Authorization header + */ + public void setBearerToken(Supplier tokenSupplier) { + this.tokenSupplier = tokenSupplier; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, + String payload, String method, URI uri) throws ApiException { + String bearerToken = Optional.ofNullable(tokenSupplier).map(Supplier::get).orElse(null); + if (bearerToken == null) { + return; + } + + headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); + } + + private static String upperCaseBearer(String scheme) { + return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; + } +} diff --git a/src/main/java/saasus/sdk/apigateway/models/AbstractOpenApiSchema.java b/src/main/java/saasus/sdk/apigateway/models/AbstractOpenApiSchema.java new file mode 100644 index 00000000..321ce5da --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/models/AbstractOpenApiSchema.java @@ -0,0 +1,146 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.models; + +import saasus.sdk.apigateway.ApiException; +import java.util.Objects; +import java.lang.reflect.Type; +import java.util.Map; + +/** + * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +public abstract class AbstractOpenApiSchema { + + // store the actual instance of the schema/object + private Object instance; + + // is nullable + private Boolean isNullable; + + // schema type (e.g. oneOf, anyOf) + private final String schemaType; + + public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { + this.schemaType = schemaType; + this.isNullable = isNullable; + } + + /** + * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object + * + * @return an instance of the actual schema/object + */ + public abstract Map> getSchemas(); + + /** + * Get the actual instance + * + * @return an instance of the actual schema/object + */ + //@JsonValue + public Object getActualInstance() {return instance;} + + /** + * Set the actual instance + * + * @param instance the actual instance of the schema/object + */ + public void setActualInstance(Object instance) {this.instance = instance;} + + /** + * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf schema as well + * + * @return an instance of the actual schema/object + */ + public Object getActualInstanceRecursively() { + return getActualInstanceRecursively(this); + } + + private Object getActualInstanceRecursively(AbstractOpenApiSchema object) { + if (object.getActualInstance() == null) { + return null; + } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) { + return getActualInstanceRecursively((AbstractOpenApiSchema)object.getActualInstance()); + } else { + return object.getActualInstance(); + } + } + + /** + * Get the schema type (e.g. anyOf, oneOf) + * + * @return the schema type + */ + public String getSchemaType() { + return schemaType; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ").append(getClass()).append(" {\n"); + sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); + sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n"); + sb.append(" schemaType: ").append(toIndentedString(schemaType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AbstractOpenApiSchema a = (AbstractOpenApiSchema) o; + return Objects.equals(this.instance, a.instance) && + Objects.equals(this.isNullable, a.isNullable) && + Objects.equals(this.schemaType, a.schemaType); + } + + @Override + public int hashCode() { + return Objects.hash(instance, isNullable, schemaType); + } + + /** + * Is nullable + * + * @return true if it's nullable + */ + public Boolean isNullable() { + if (Boolean.TRUE.equals(isNullable)) { + return Boolean.TRUE; + } else { + return Boolean.FALSE; + } + } + + + +} diff --git a/src/main/java/saasus/sdk/apigateway/models/ApiGatewayInputFile.java b/src/main/java/saasus/sdk/apigateway/models/ApiGatewayInputFile.java new file mode 100644 index 00000000..2a5c8d3b --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/models/ApiGatewayInputFile.java @@ -0,0 +1,214 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.models; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import saasus.sdk.apigateway.JSON; + +/** + * ApiGatewayInputFile + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +public class ApiGatewayInputFile { + public static final String SERIALIZED_NAME_CONTENT = "content"; + @SerializedName(SERIALIZED_NAME_CONTENT) + private String content; + + public ApiGatewayInputFile() { + } + + public ApiGatewayInputFile content(String content) { + this.content = content; + return this; + } + + /** + * The content of the file to be uploaded to create an API Gateway. + * @return content + **/ + @javax.annotation.Nonnull + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApiGatewayInputFile apiGatewayInputFile = (ApiGatewayInputFile) o; + return Objects.equals(this.content, apiGatewayInputFile.content); + } + + @Override + public int hashCode() { + return Objects.hash(content); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApiGatewayInputFile {\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("content"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("content"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ApiGatewayInputFile + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ApiGatewayInputFile.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ApiGatewayInputFile is not found in the empty JSON string", ApiGatewayInputFile.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ApiGatewayInputFile.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApiGatewayInputFile` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ApiGatewayInputFile.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("content").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `content` to be a primitive type in the JSON string but got `%s`", jsonObj.get("content").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ApiGatewayInputFile.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ApiGatewayInputFile' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ApiGatewayInputFile.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ApiGatewayInputFile value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ApiGatewayInputFile read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ApiGatewayInputFile given an JSON string + * + * @param jsonString JSON string + * @return An instance of ApiGatewayInputFile + * @throws IOException if the JSON string is invalid with respect to ApiGatewayInputFile + */ + public static ApiGatewayInputFile fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ApiGatewayInputFile.class); + } + + /** + * Convert an instance of ApiGatewayInputFile to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/saasus/sdk/apigateway/models/ApiGatewaySettings.java b/src/main/java/saasus/sdk/apigateway/models/ApiGatewaySettings.java new file mode 100644 index 00000000..1d7923fd --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/models/ApiGatewaySettings.java @@ -0,0 +1,895 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.models; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import saasus.sdk.apigateway.models.DnsRecord; +import saasus.sdk.apigateway.models.EndpointSettings; +import saasus.sdk.apigateway.models.TenantRoutingType; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import saasus.sdk.apigateway.JSON; + +/** + * ApiGatewaySettings + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +public class ApiGatewaySettings { + public static final String SERIALIZED_NAME_GENERATED_FILE_STATUS = "generated_file_status"; + @SerializedName(SERIALIZED_NAME_GENERATED_FILE_STATUS) + private String generatedFileStatus; + + public static final String SERIALIZED_NAME_INTERNAL_ENDPOINT_OPENAPI_DEFINITION_FILE_DOWNLOAD_URL = "internal_endpoint_openapi_definition_file_download_url"; + @SerializedName(SERIALIZED_NAME_INTERNAL_ENDPOINT_OPENAPI_DEFINITION_FILE_DOWNLOAD_URL) + private String internalEndpointOpenapiDefinitionFileDownloadUrl; + + public static final String SERIALIZED_NAME_INTERNAL_ENDPOINT_MAPPING_FILE_DOWNLOAD_URL = "internal_endpoint_mapping_file_download_url"; + @SerializedName(SERIALIZED_NAME_INTERNAL_ENDPOINT_MAPPING_FILE_DOWNLOAD_URL) + private String internalEndpointMappingFileDownloadUrl; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_ROLE_ARN = "role_arn"; + @SerializedName(SERIALIZED_NAME_ROLE_ARN) + private String roleArn; + + public static final String SERIALIZED_NAME_ROLE_EXTERNAL_ID = "role_external_id"; + @SerializedName(SERIALIZED_NAME_ROLE_EXTERNAL_ID) + private String roleExternalId; + + public static final String SERIALIZED_NAME_INTERNAL_ENDPOINT_HEALTH_CHECK_PATH = "internal_endpoint_health_check_path"; + @SerializedName(SERIALIZED_NAME_INTERNAL_ENDPOINT_HEALTH_CHECK_PATH) + private String internalEndpointHealthCheckPath; + + public static final String SERIALIZED_NAME_INTERNAL_ENDPOINT_HEALTH_CHECK_PORT = "internal_endpoint_health_check_port"; + @SerializedName(SERIALIZED_NAME_INTERNAL_ENDPOINT_HEALTH_CHECK_PORT) + private Integer internalEndpointHealthCheckPort; + + public static final String SERIALIZED_NAME_INTERNAL_ENDPOINT_HEALTH_CHECK_PROTOCOL = "internal_endpoint_health_check_protocol"; + @SerializedName(SERIALIZED_NAME_INTERNAL_ENDPOINT_HEALTH_CHECK_PROTOCOL) + private String internalEndpointHealthCheckProtocol; + + public static final String SERIALIZED_NAME_INTERNAL_ENDPOINT_HEALTH_STATUS_CODES = "internal_endpoint_health_status_codes"; + @SerializedName(SERIALIZED_NAME_INTERNAL_ENDPOINT_HEALTH_STATUS_CODES) + private String internalEndpointHealthStatusCodes; + + public static final String SERIALIZED_NAME_SAAS_SUBNET_IDS = "saas_subnet_ids"; + @SerializedName(SERIALIZED_NAME_SAAS_SUBNET_IDS) + private List saasSubnetIds = new ArrayList<>(); + + public static final String SERIALIZED_NAME_SAAS_VPC_ID = "saas_vpc_id"; + @SerializedName(SERIALIZED_NAME_SAAS_VPC_ID) + private String saasVpcId; + + public static final String SERIALIZED_NAME_DOMAIN_NAME = "domain_name"; + @SerializedName(SERIALIZED_NAME_DOMAIN_NAME) + private String domainName; + + public static final String SERIALIZED_NAME_IS_DNS_VALIDATED = "is_dns_validated"; + @SerializedName(SERIALIZED_NAME_IS_DNS_VALIDATED) + private Boolean isDnsValidated; + + public static final String SERIALIZED_NAME_CERTIFICATE_DNS_RECORD = "certificate_dns_record"; + @SerializedName(SERIALIZED_NAME_CERTIFICATE_DNS_RECORD) + private DnsRecord certificateDnsRecord; + + public static final String SERIALIZED_NAME_CLOUD_FRONT_DNS_RECORD = "cloud_front_dns_record"; + @SerializedName(SERIALIZED_NAME_CLOUD_FRONT_DNS_RECORD) + private DnsRecord cloudFrontDnsRecord; + + public static final String SERIALIZED_NAME_VPC_ENDPOINT_DNS_RECORD = "vpc_endpoint_dns_record"; + @SerializedName(SERIALIZED_NAME_VPC_ENDPOINT_DNS_RECORD) + private DnsRecord vpcEndpointDnsRecord; + + public static final String SERIALIZED_NAME_DEFAULT_DOMAIN_NAME = "default_domain_name"; + @SerializedName(SERIALIZED_NAME_DEFAULT_DOMAIN_NAME) + private String defaultDomainName; + + public static final String SERIALIZED_NAME_SAAS_ALB_ARN = "saas_alb_arn"; + @SerializedName(SERIALIZED_NAME_SAAS_ALB_ARN) + private String saasAlbArn; + + public static final String SERIALIZED_NAME_REST_API_ENDPOINT = "rest_api_endpoint"; + @SerializedName(SERIALIZED_NAME_REST_API_ENDPOINT) + private String restApiEndpoint; + + public static final String SERIALIZED_NAME_ENDPOINT_SETTINGS_LIST = "endpoint_settings_list"; + @SerializedName(SERIALIZED_NAME_ENDPOINT_SETTINGS_LIST) + private List endpointSettingsList = new ArrayList<>(); + + public static final String SERIALIZED_NAME_TENANT_ROUTING_TYPE = "tenant_routing_type"; + @SerializedName(SERIALIZED_NAME_TENANT_ROUTING_TYPE) + private TenantRoutingType tenantRoutingType; + + public static final String SERIALIZED_NAME_DOCS_CLOUD_FRONT_FQDN = "docs_cloud_front_fqdn"; + @SerializedName(SERIALIZED_NAME_DOCS_CLOUD_FRONT_FQDN) + private String docsCloudFrontFqdn; + + public ApiGatewaySettings() { + } + + public ApiGatewaySettings generatedFileStatus(String generatedFileStatus) { + this.generatedFileStatus = generatedFileStatus; + return this; + } + + /** + * Status of automatically generated files + * @return generatedFileStatus + **/ + @javax.annotation.Nonnull + public String getGeneratedFileStatus() { + return generatedFileStatus; + } + + public void setGeneratedFileStatus(String generatedFileStatus) { + this.generatedFileStatus = generatedFileStatus; + } + + + public ApiGatewaySettings internalEndpointOpenapiDefinitionFileDownloadUrl(String internalEndpointOpenapiDefinitionFileDownloadUrl) { + this.internalEndpointOpenapiDefinitionFileDownloadUrl = internalEndpointOpenapiDefinitionFileDownloadUrl; + return this; + } + + /** + * URL to download the auto-generated openapi definition file, which will be used to build the API Gateway. + * @return internalEndpointOpenapiDefinitionFileDownloadUrl + **/ + @javax.annotation.Nonnull + public String getInternalEndpointOpenapiDefinitionFileDownloadUrl() { + return internalEndpointOpenapiDefinitionFileDownloadUrl; + } + + public void setInternalEndpointOpenapiDefinitionFileDownloadUrl(String internalEndpointOpenapiDefinitionFileDownloadUrl) { + this.internalEndpointOpenapiDefinitionFileDownloadUrl = internalEndpointOpenapiDefinitionFileDownloadUrl; + } + + + public ApiGatewaySettings internalEndpointMappingFileDownloadUrl(String internalEndpointMappingFileDownloadUrl) { + this.internalEndpointMappingFileDownloadUrl = internalEndpointMappingFileDownloadUrl; + return this; + } + + /** + * The download URL for the auto-generated internal endpoint mapping file, which will be used to build the API Gateway. + * @return internalEndpointMappingFileDownloadUrl + **/ + @javax.annotation.Nonnull + public String getInternalEndpointMappingFileDownloadUrl() { + return internalEndpointMappingFileDownloadUrl; + } + + public void setInternalEndpointMappingFileDownloadUrl(String internalEndpointMappingFileDownloadUrl) { + this.internalEndpointMappingFileDownloadUrl = internalEndpointMappingFileDownloadUrl; + } + + + public ApiGatewaySettings status(String status) { + this.status = status; + return this; + } + + /** + * API Gateway creation status + * @return status + **/ + @javax.annotation.Nonnull + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + + public ApiGatewaySettings roleArn(String roleArn) { + this.roleArn = roleArn; + return this; + } + + /** + * ARN of the role for SaaSus Platform to AssumeRole + * @return roleArn + **/ + @javax.annotation.Nonnull + public String getRoleArn() { + return roleArn; + } + + public void setRoleArn(String roleArn) { + this.roleArn = roleArn; + } + + + public ApiGatewaySettings roleExternalId(String roleExternalId) { + this.roleExternalId = roleExternalId; + return this; + } + + /** + * External id used by SaaSus when AssumeRole to operate SaaS + * @return roleExternalId + **/ + @javax.annotation.Nonnull + public String getRoleExternalId() { + return roleExternalId; + } + + public void setRoleExternalId(String roleExternalId) { + this.roleExternalId = roleExternalId; + } + + + public ApiGatewaySettings internalEndpointHealthCheckPath(String internalEndpointHealthCheckPath) { + this.internalEndpointHealthCheckPath = internalEndpointHealthCheckPath; + return this; + } + + /** + * The path to be used for health checks on the internal endpoint. + * @return internalEndpointHealthCheckPath + **/ + @javax.annotation.Nonnull + public String getInternalEndpointHealthCheckPath() { + return internalEndpointHealthCheckPath; + } + + public void setInternalEndpointHealthCheckPath(String internalEndpointHealthCheckPath) { + this.internalEndpointHealthCheckPath = internalEndpointHealthCheckPath; + } + + + public ApiGatewaySettings internalEndpointHealthCheckPort(Integer internalEndpointHealthCheckPort) { + this.internalEndpointHealthCheckPort = internalEndpointHealthCheckPort; + return this; + } + + /** + * The port to be used for health checks on the internal endpoint. + * @return internalEndpointHealthCheckPort + **/ + @javax.annotation.Nonnull + public Integer getInternalEndpointHealthCheckPort() { + return internalEndpointHealthCheckPort; + } + + public void setInternalEndpointHealthCheckPort(Integer internalEndpointHealthCheckPort) { + this.internalEndpointHealthCheckPort = internalEndpointHealthCheckPort; + } + + + public ApiGatewaySettings internalEndpointHealthCheckProtocol(String internalEndpointHealthCheckProtocol) { + this.internalEndpointHealthCheckProtocol = internalEndpointHealthCheckProtocol; + return this; + } + + /** + * The protocol to be used for health checks on the internal endpoint. + * @return internalEndpointHealthCheckProtocol + **/ + @javax.annotation.Nonnull + public String getInternalEndpointHealthCheckProtocol() { + return internalEndpointHealthCheckProtocol; + } + + public void setInternalEndpointHealthCheckProtocol(String internalEndpointHealthCheckProtocol) { + this.internalEndpointHealthCheckProtocol = internalEndpointHealthCheckProtocol; + } + + + public ApiGatewaySettings internalEndpointHealthStatusCodes(String internalEndpointHealthStatusCodes) { + this.internalEndpointHealthStatusCodes = internalEndpointHealthStatusCodes; + return this; + } + + /** + * The status codes to be used for health checks on the internal endpoint. + * @return internalEndpointHealthStatusCodes + **/ + @javax.annotation.Nonnull + public String getInternalEndpointHealthStatusCodes() { + return internalEndpointHealthStatusCodes; + } + + public void setInternalEndpointHealthStatusCodes(String internalEndpointHealthStatusCodes) { + this.internalEndpointHealthStatusCodes = internalEndpointHealthStatusCodes; + } + + + public ApiGatewaySettings saasSubnetIds(List saasSubnetIds) { + this.saasSubnetIds = saasSubnetIds; + return this; + } + + public ApiGatewaySettings addSaasSubnetIdsItem(String saasSubnetIdsItem) { + if (this.saasSubnetIds == null) { + this.saasSubnetIds = new ArrayList<>(); + } + this.saasSubnetIds.add(saasSubnetIdsItem); + return this; + } + + /** + * Subnet IDs for SaaS + * @return saasSubnetIds + **/ + @javax.annotation.Nonnull + public List getSaasSubnetIds() { + return saasSubnetIds; + } + + public void setSaasSubnetIds(List saasSubnetIds) { + this.saasSubnetIds = saasSubnetIds; + } + + + public ApiGatewaySettings saasVpcId(String saasVpcId) { + this.saasVpcId = saasVpcId; + return this; + } + + /** + * VPC ID for SaaS + * @return saasVpcId + **/ + @javax.annotation.Nonnull + public String getSaasVpcId() { + return saasVpcId; + } + + public void setSaasVpcId(String saasVpcId) { + this.saasVpcId = saasVpcId; + } + + + public ApiGatewaySettings domainName(String domainName) { + this.domainName = domainName; + return this; + } + + /** + * Domain Name + * @return domainName + **/ + @javax.annotation.Nonnull + public String getDomainName() { + return domainName; + } + + public void setDomainName(String domainName) { + this.domainName = domainName; + } + + + public ApiGatewaySettings isDnsValidated(Boolean isDnsValidated) { + this.isDnsValidated = isDnsValidated; + return this; + } + + /** + * DNS Record Verification Results + * @return isDnsValidated + **/ + @javax.annotation.Nonnull + public Boolean getIsDnsValidated() { + return isDnsValidated; + } + + public void setIsDnsValidated(Boolean isDnsValidated) { + this.isDnsValidated = isDnsValidated; + } + + + public ApiGatewaySettings certificateDnsRecord(DnsRecord certificateDnsRecord) { + this.certificateDnsRecord = certificateDnsRecord; + return this; + } + + /** + * Get certificateDnsRecord + * @return certificateDnsRecord + **/ + @javax.annotation.Nonnull + public DnsRecord getCertificateDnsRecord() { + return certificateDnsRecord; + } + + public void setCertificateDnsRecord(DnsRecord certificateDnsRecord) { + this.certificateDnsRecord = certificateDnsRecord; + } + + + public ApiGatewaySettings cloudFrontDnsRecord(DnsRecord cloudFrontDnsRecord) { + this.cloudFrontDnsRecord = cloudFrontDnsRecord; + return this; + } + + /** + * Get cloudFrontDnsRecord + * @return cloudFrontDnsRecord + **/ + @javax.annotation.Nonnull + public DnsRecord getCloudFrontDnsRecord() { + return cloudFrontDnsRecord; + } + + public void setCloudFrontDnsRecord(DnsRecord cloudFrontDnsRecord) { + this.cloudFrontDnsRecord = cloudFrontDnsRecord; + } + + + public ApiGatewaySettings vpcEndpointDnsRecord(DnsRecord vpcEndpointDnsRecord) { + this.vpcEndpointDnsRecord = vpcEndpointDnsRecord; + return this; + } + + /** + * Get vpcEndpointDnsRecord + * @return vpcEndpointDnsRecord + **/ + @javax.annotation.Nonnull + public DnsRecord getVpcEndpointDnsRecord() { + return vpcEndpointDnsRecord; + } + + public void setVpcEndpointDnsRecord(DnsRecord vpcEndpointDnsRecord) { + this.vpcEndpointDnsRecord = vpcEndpointDnsRecord; + } + + + public ApiGatewaySettings defaultDomainName(String defaultDomainName) { + this.defaultDomainName = defaultDomainName; + return this; + } + + /** + * Default Domain Name + * @return defaultDomainName + **/ + @javax.annotation.Nonnull + public String getDefaultDomainName() { + return defaultDomainName; + } + + public void setDefaultDomainName(String defaultDomainName) { + this.defaultDomainName = defaultDomainName; + } + + + public ApiGatewaySettings saasAlbArn(String saasAlbArn) { + this.saasAlbArn = saasAlbArn; + return this; + } + + /** + * SaaS Application Load Balancer ARN + * @return saasAlbArn + **/ + @javax.annotation.Nonnull + public String getSaasAlbArn() { + return saasAlbArn; + } + + public void setSaasAlbArn(String saasAlbArn) { + this.saasAlbArn = saasAlbArn; + } + + + public ApiGatewaySettings restApiEndpoint(String restApiEndpoint) { + this.restApiEndpoint = restApiEndpoint; + return this; + } + + /** + * The endpoint for the REST API + * @return restApiEndpoint + **/ + @javax.annotation.Nonnull + public String getRestApiEndpoint() { + return restApiEndpoint; + } + + public void setRestApiEndpoint(String restApiEndpoint) { + this.restApiEndpoint = restApiEndpoint; + } + + + public ApiGatewaySettings endpointSettingsList(List endpointSettingsList) { + this.endpointSettingsList = endpointSettingsList; + return this; + } + + public ApiGatewaySettings addEndpointSettingsListItem(EndpointSettings endpointSettingsListItem) { + if (this.endpointSettingsList == null) { + this.endpointSettingsList = new ArrayList<>(); + } + this.endpointSettingsList.add(endpointSettingsListItem); + return this; + } + + /** + * Endpoint Settings List + * @return endpointSettingsList + **/ + @javax.annotation.Nonnull + public List getEndpointSettingsList() { + return endpointSettingsList; + } + + public void setEndpointSettingsList(List endpointSettingsList) { + this.endpointSettingsList = endpointSettingsList; + } + + + public ApiGatewaySettings tenantRoutingType(TenantRoutingType tenantRoutingType) { + this.tenantRoutingType = tenantRoutingType; + return this; + } + + /** + * Get tenantRoutingType + * @return tenantRoutingType + **/ + @javax.annotation.Nonnull + public TenantRoutingType getTenantRoutingType() { + return tenantRoutingType; + } + + public void setTenantRoutingType(TenantRoutingType tenantRoutingType) { + this.tenantRoutingType = tenantRoutingType; + } + + + public ApiGatewaySettings docsCloudFrontFqdn(String docsCloudFrontFqdn) { + this.docsCloudFrontFqdn = docsCloudFrontFqdn; + return this; + } + + /** + * CloudFront FQDN for Smart API Gateway Documentation + * @return docsCloudFrontFqdn + **/ + @javax.annotation.Nonnull + public String getDocsCloudFrontFqdn() { + return docsCloudFrontFqdn; + } + + public void setDocsCloudFrontFqdn(String docsCloudFrontFqdn) { + this.docsCloudFrontFqdn = docsCloudFrontFqdn; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApiGatewaySettings apiGatewaySettings = (ApiGatewaySettings) o; + return Objects.equals(this.generatedFileStatus, apiGatewaySettings.generatedFileStatus) && + Objects.equals(this.internalEndpointOpenapiDefinitionFileDownloadUrl, apiGatewaySettings.internalEndpointOpenapiDefinitionFileDownloadUrl) && + Objects.equals(this.internalEndpointMappingFileDownloadUrl, apiGatewaySettings.internalEndpointMappingFileDownloadUrl) && + Objects.equals(this.status, apiGatewaySettings.status) && + Objects.equals(this.roleArn, apiGatewaySettings.roleArn) && + Objects.equals(this.roleExternalId, apiGatewaySettings.roleExternalId) && + Objects.equals(this.internalEndpointHealthCheckPath, apiGatewaySettings.internalEndpointHealthCheckPath) && + Objects.equals(this.internalEndpointHealthCheckPort, apiGatewaySettings.internalEndpointHealthCheckPort) && + Objects.equals(this.internalEndpointHealthCheckProtocol, apiGatewaySettings.internalEndpointHealthCheckProtocol) && + Objects.equals(this.internalEndpointHealthStatusCodes, apiGatewaySettings.internalEndpointHealthStatusCodes) && + Objects.equals(this.saasSubnetIds, apiGatewaySettings.saasSubnetIds) && + Objects.equals(this.saasVpcId, apiGatewaySettings.saasVpcId) && + Objects.equals(this.domainName, apiGatewaySettings.domainName) && + Objects.equals(this.isDnsValidated, apiGatewaySettings.isDnsValidated) && + Objects.equals(this.certificateDnsRecord, apiGatewaySettings.certificateDnsRecord) && + Objects.equals(this.cloudFrontDnsRecord, apiGatewaySettings.cloudFrontDnsRecord) && + Objects.equals(this.vpcEndpointDnsRecord, apiGatewaySettings.vpcEndpointDnsRecord) && + Objects.equals(this.defaultDomainName, apiGatewaySettings.defaultDomainName) && + Objects.equals(this.saasAlbArn, apiGatewaySettings.saasAlbArn) && + Objects.equals(this.restApiEndpoint, apiGatewaySettings.restApiEndpoint) && + Objects.equals(this.endpointSettingsList, apiGatewaySettings.endpointSettingsList) && + Objects.equals(this.tenantRoutingType, apiGatewaySettings.tenantRoutingType) && + Objects.equals(this.docsCloudFrontFqdn, apiGatewaySettings.docsCloudFrontFqdn); + } + + @Override + public int hashCode() { + return Objects.hash(generatedFileStatus, internalEndpointOpenapiDefinitionFileDownloadUrl, internalEndpointMappingFileDownloadUrl, status, roleArn, roleExternalId, internalEndpointHealthCheckPath, internalEndpointHealthCheckPort, internalEndpointHealthCheckProtocol, internalEndpointHealthStatusCodes, saasSubnetIds, saasVpcId, domainName, isDnsValidated, certificateDnsRecord, cloudFrontDnsRecord, vpcEndpointDnsRecord, defaultDomainName, saasAlbArn, restApiEndpoint, endpointSettingsList, tenantRoutingType, docsCloudFrontFqdn); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApiGatewaySettings {\n"); + sb.append(" generatedFileStatus: ").append(toIndentedString(generatedFileStatus)).append("\n"); + sb.append(" internalEndpointOpenapiDefinitionFileDownloadUrl: ").append(toIndentedString(internalEndpointOpenapiDefinitionFileDownloadUrl)).append("\n"); + sb.append(" internalEndpointMappingFileDownloadUrl: ").append(toIndentedString(internalEndpointMappingFileDownloadUrl)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" roleArn: ").append(toIndentedString(roleArn)).append("\n"); + sb.append(" roleExternalId: ").append(toIndentedString(roleExternalId)).append("\n"); + sb.append(" internalEndpointHealthCheckPath: ").append(toIndentedString(internalEndpointHealthCheckPath)).append("\n"); + sb.append(" internalEndpointHealthCheckPort: ").append(toIndentedString(internalEndpointHealthCheckPort)).append("\n"); + sb.append(" internalEndpointHealthCheckProtocol: ").append(toIndentedString(internalEndpointHealthCheckProtocol)).append("\n"); + sb.append(" internalEndpointHealthStatusCodes: ").append(toIndentedString(internalEndpointHealthStatusCodes)).append("\n"); + sb.append(" saasSubnetIds: ").append(toIndentedString(saasSubnetIds)).append("\n"); + sb.append(" saasVpcId: ").append(toIndentedString(saasVpcId)).append("\n"); + sb.append(" domainName: ").append(toIndentedString(domainName)).append("\n"); + sb.append(" isDnsValidated: ").append(toIndentedString(isDnsValidated)).append("\n"); + sb.append(" certificateDnsRecord: ").append(toIndentedString(certificateDnsRecord)).append("\n"); + sb.append(" cloudFrontDnsRecord: ").append(toIndentedString(cloudFrontDnsRecord)).append("\n"); + sb.append(" vpcEndpointDnsRecord: ").append(toIndentedString(vpcEndpointDnsRecord)).append("\n"); + sb.append(" defaultDomainName: ").append(toIndentedString(defaultDomainName)).append("\n"); + sb.append(" saasAlbArn: ").append(toIndentedString(saasAlbArn)).append("\n"); + sb.append(" restApiEndpoint: ").append(toIndentedString(restApiEndpoint)).append("\n"); + sb.append(" endpointSettingsList: ").append(toIndentedString(endpointSettingsList)).append("\n"); + sb.append(" tenantRoutingType: ").append(toIndentedString(tenantRoutingType)).append("\n"); + sb.append(" docsCloudFrontFqdn: ").append(toIndentedString(docsCloudFrontFqdn)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("generated_file_status"); + openapiFields.add("internal_endpoint_openapi_definition_file_download_url"); + openapiFields.add("internal_endpoint_mapping_file_download_url"); + openapiFields.add("status"); + openapiFields.add("role_arn"); + openapiFields.add("role_external_id"); + openapiFields.add("internal_endpoint_health_check_path"); + openapiFields.add("internal_endpoint_health_check_port"); + openapiFields.add("internal_endpoint_health_check_protocol"); + openapiFields.add("internal_endpoint_health_status_codes"); + openapiFields.add("saas_subnet_ids"); + openapiFields.add("saas_vpc_id"); + openapiFields.add("domain_name"); + openapiFields.add("is_dns_validated"); + openapiFields.add("certificate_dns_record"); + openapiFields.add("cloud_front_dns_record"); + openapiFields.add("vpc_endpoint_dns_record"); + openapiFields.add("default_domain_name"); + openapiFields.add("saas_alb_arn"); + openapiFields.add("rest_api_endpoint"); + openapiFields.add("endpoint_settings_list"); + openapiFields.add("tenant_routing_type"); + openapiFields.add("docs_cloud_front_fqdn"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("generated_file_status"); + openapiRequiredFields.add("internal_endpoint_openapi_definition_file_download_url"); + openapiRequiredFields.add("internal_endpoint_mapping_file_download_url"); + openapiRequiredFields.add("status"); + openapiRequiredFields.add("role_arn"); + openapiRequiredFields.add("role_external_id"); + openapiRequiredFields.add("internal_endpoint_health_check_path"); + openapiRequiredFields.add("internal_endpoint_health_check_port"); + openapiRequiredFields.add("internal_endpoint_health_check_protocol"); + openapiRequiredFields.add("internal_endpoint_health_status_codes"); + openapiRequiredFields.add("saas_subnet_ids"); + openapiRequiredFields.add("saas_vpc_id"); + openapiRequiredFields.add("domain_name"); + openapiRequiredFields.add("is_dns_validated"); + openapiRequiredFields.add("certificate_dns_record"); + openapiRequiredFields.add("cloud_front_dns_record"); + openapiRequiredFields.add("vpc_endpoint_dns_record"); + openapiRequiredFields.add("default_domain_name"); + openapiRequiredFields.add("saas_alb_arn"); + openapiRequiredFields.add("rest_api_endpoint"); + openapiRequiredFields.add("endpoint_settings_list"); + openapiRequiredFields.add("tenant_routing_type"); + openapiRequiredFields.add("docs_cloud_front_fqdn"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ApiGatewaySettings + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ApiGatewaySettings.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ApiGatewaySettings is not found in the empty JSON string", ApiGatewaySettings.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ApiGatewaySettings.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApiGatewaySettings` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ApiGatewaySettings.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("generated_file_status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `generated_file_status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("generated_file_status").toString())); + } + if (!jsonObj.get("internal_endpoint_openapi_definition_file_download_url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `internal_endpoint_openapi_definition_file_download_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internal_endpoint_openapi_definition_file_download_url").toString())); + } + if (!jsonObj.get("internal_endpoint_mapping_file_download_url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `internal_endpoint_mapping_file_download_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internal_endpoint_mapping_file_download_url").toString())); + } + if (!jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if (!jsonObj.get("role_arn").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `role_arn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("role_arn").toString())); + } + if (!jsonObj.get("role_external_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `role_external_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("role_external_id").toString())); + } + if (!jsonObj.get("internal_endpoint_health_check_path").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `internal_endpoint_health_check_path` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internal_endpoint_health_check_path").toString())); + } + if (!jsonObj.get("internal_endpoint_health_check_protocol").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `internal_endpoint_health_check_protocol` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internal_endpoint_health_check_protocol").toString())); + } + if (!jsonObj.get("internal_endpoint_health_status_codes").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `internal_endpoint_health_status_codes` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internal_endpoint_health_status_codes").toString())); + } + // ensure the required json array is present + if (jsonObj.get("saas_subnet_ids") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("saas_subnet_ids").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `saas_subnet_ids` to be an array in the JSON string but got `%s`", jsonObj.get("saas_subnet_ids").toString())); + } + if (!jsonObj.get("saas_vpc_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `saas_vpc_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("saas_vpc_id").toString())); + } + if (!jsonObj.get("domain_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `domain_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("domain_name").toString())); + } + // validate the required field `certificate_dns_record` + DnsRecord.validateJsonElement(jsonObj.get("certificate_dns_record")); + // validate the required field `cloud_front_dns_record` + DnsRecord.validateJsonElement(jsonObj.get("cloud_front_dns_record")); + // validate the required field `vpc_endpoint_dns_record` + DnsRecord.validateJsonElement(jsonObj.get("vpc_endpoint_dns_record")); + if (!jsonObj.get("default_domain_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `default_domain_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("default_domain_name").toString())); + } + if (!jsonObj.get("saas_alb_arn").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `saas_alb_arn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("saas_alb_arn").toString())); + } + if (!jsonObj.get("rest_api_endpoint").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `rest_api_endpoint` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rest_api_endpoint").toString())); + } + // ensure the json data is an array + if (!jsonObj.get("endpoint_settings_list").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `endpoint_settings_list` to be an array in the JSON string but got `%s`", jsonObj.get("endpoint_settings_list").toString())); + } + + JsonArray jsonArrayendpointSettingsList = jsonObj.getAsJsonArray("endpoint_settings_list"); + // validate the required field `endpoint_settings_list` (array) + for (int i = 0; i < jsonArrayendpointSettingsList.size(); i++) { + EndpointSettings.validateJsonElement(jsonArrayendpointSettingsList.get(i)); + }; + // validate the required field `tenant_routing_type` + TenantRoutingType.validateJsonElement(jsonObj.get("tenant_routing_type")); + if (!jsonObj.get("docs_cloud_front_fqdn").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `docs_cloud_front_fqdn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("docs_cloud_front_fqdn").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ApiGatewaySettings.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ApiGatewaySettings' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ApiGatewaySettings.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ApiGatewaySettings value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ApiGatewaySettings read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ApiGatewaySettings given an JSON string + * + * @param jsonString JSON string + * @return An instance of ApiGatewaySettings + * @throws IOException if the JSON string is invalid with respect to ApiGatewaySettings + */ + public static ApiGatewaySettings fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ApiGatewaySettings.class); + } + + /** + * Convert an instance of ApiGatewaySettings to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/saasus/sdk/apigateway/models/ApiGatewayTenant.java b/src/main/java/saasus/sdk/apigateway/models/ApiGatewayTenant.java new file mode 100644 index 00000000..0d4213ba --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/models/ApiGatewayTenant.java @@ -0,0 +1,287 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.models; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import saasus.sdk.apigateway.models.TenantRouting; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import saasus.sdk.apigateway.JSON; + +/** + * ApiGatewayTenant + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +public class ApiGatewayTenant { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_ALLOWED_IPS = "allowed_ips"; + @SerializedName(SERIALIZED_NAME_ALLOWED_IPS) + private List allowedIps = new ArrayList<>(); + + public static final String SERIALIZED_NAME_ROUTING = "routing"; + @SerializedName(SERIALIZED_NAME_ROUTING) + private TenantRouting routing; + + public ApiGatewayTenant() { + } + + public ApiGatewayTenant id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + + public ApiGatewayTenant allowedIps(List allowedIps) { + this.allowedIps = allowedIps; + return this; + } + + public ApiGatewayTenant addAllowedIpsItem(String allowedIpsItem) { + if (this.allowedIps == null) { + this.allowedIps = new ArrayList<>(); + } + this.allowedIps.add(allowedIpsItem); + return this; + } + + /** + * Allowed IP addresses in CIDR format + * @return allowedIps + **/ + @javax.annotation.Nonnull + public List getAllowedIps() { + return allowedIps; + } + + public void setAllowedIps(List allowedIps) { + this.allowedIps = allowedIps; + } + + + public ApiGatewayTenant routing(TenantRouting routing) { + this.routing = routing; + return this; + } + + /** + * Get routing + * @return routing + **/ + @javax.annotation.Nonnull + public TenantRouting getRouting() { + return routing; + } + + public void setRouting(TenantRouting routing) { + this.routing = routing; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApiGatewayTenant apiGatewayTenant = (ApiGatewayTenant) o; + return Objects.equals(this.id, apiGatewayTenant.id) && + Objects.equals(this.allowedIps, apiGatewayTenant.allowedIps) && + Objects.equals(this.routing, apiGatewayTenant.routing); + } + + @Override + public int hashCode() { + return Objects.hash(id, allowedIps, routing); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApiGatewayTenant {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" allowedIps: ").append(toIndentedString(allowedIps)).append("\n"); + sb.append(" routing: ").append(toIndentedString(routing)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("allowed_ips"); + openapiFields.add("routing"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("allowed_ips"); + openapiRequiredFields.add("routing"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ApiGatewayTenant + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ApiGatewayTenant.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ApiGatewayTenant is not found in the empty JSON string", ApiGatewayTenant.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ApiGatewayTenant.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApiGatewayTenant` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ApiGatewayTenant.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + // ensure the required json array is present + if (jsonObj.get("allowed_ips") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("allowed_ips").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `allowed_ips` to be an array in the JSON string but got `%s`", jsonObj.get("allowed_ips").toString())); + } + // validate the required field `routing` + TenantRouting.validateJsonElement(jsonObj.get("routing")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ApiGatewayTenant.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ApiGatewayTenant' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ApiGatewayTenant.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ApiGatewayTenant value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ApiGatewayTenant read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ApiGatewayTenant given an JSON string + * + * @param jsonString JSON string + * @return An instance of ApiGatewayTenant + * @throws IOException if the JSON string is invalid with respect to ApiGatewayTenant + */ + public static ApiGatewayTenant fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ApiGatewayTenant.class); + } + + /** + * Convert an instance of ApiGatewayTenant to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/saasus/sdk/apigateway/models/ApiKey.java b/src/main/java/saasus/sdk/apigateway/models/ApiKey.java new file mode 100644 index 00000000..e9194537 --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/models/ApiKey.java @@ -0,0 +1,330 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.models; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import saasus.sdk.apigateway.JSON; + +/** + * ApiKey + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +public class ApiKey { + public static final String SERIALIZED_NAME_API_KEY = "api_key"; + @SerializedName(SERIALIZED_NAME_API_KEY) + private String apiKey; + + public static final String SERIALIZED_NAME_CLIENT_SECRET = "client_secret"; + @SerializedName(SERIALIZED_NAME_CLIENT_SECRET) + private String clientSecret; + + public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; + @SerializedName(SERIALIZED_NAME_TENANT_ID) + private String tenantId; + + public static final String SERIALIZED_NAME_ENV_ID = "env_id"; + @SerializedName(SERIALIZED_NAME_ENV_ID) + private Integer envId; + + public static final String SERIALIZED_NAME_USER_ID = "user_id"; + @SerializedName(SERIALIZED_NAME_USER_ID) + private String userId; + + public ApiKey() { + } + + public ApiKey apiKey(String apiKey) { + this.apiKey = apiKey; + return this; + } + + /** + * API Key + * @return apiKey + **/ + @javax.annotation.Nonnull + public String getApiKey() { + return apiKey; + } + + public void setApiKey(String apiKey) { + this.apiKey = apiKey; + } + + + public ApiKey clientSecret(String clientSecret) { + this.clientSecret = clientSecret; + return this; + } + + /** + * Client secret + * @return clientSecret + **/ + @javax.annotation.Nonnull + public String getClientSecret() { + return clientSecret; + } + + public void setClientSecret(String clientSecret) { + this.clientSecret = clientSecret; + } + + + public ApiKey tenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get tenantId + * @return tenantId + **/ + @javax.annotation.Nonnull + public String getTenantId() { + return tenantId; + } + + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + } + + + public ApiKey envId(Integer envId) { + this.envId = envId; + return this; + } + + /** + * Get envId + * @return envId + **/ + @javax.annotation.Nonnull + public Integer getEnvId() { + return envId; + } + + public void setEnvId(Integer envId) { + this.envId = envId; + } + + + public ApiKey userId(String userId) { + this.userId = userId; + return this; + } + + /** + * Get userId + * @return userId + **/ + @javax.annotation.Nullable + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApiKey apiKey = (ApiKey) o; + return Objects.equals(this.apiKey, apiKey.apiKey) && + Objects.equals(this.clientSecret, apiKey.clientSecret) && + Objects.equals(this.tenantId, apiKey.tenantId) && + Objects.equals(this.envId, apiKey.envId) && + Objects.equals(this.userId, apiKey.userId); + } + + @Override + public int hashCode() { + return Objects.hash(apiKey, clientSecret, tenantId, envId, userId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApiKey {\n"); + sb.append(" apiKey: ").append(toIndentedString(apiKey)).append("\n"); + sb.append(" clientSecret: ").append(toIndentedString(clientSecret)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" envId: ").append(toIndentedString(envId)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("api_key"); + openapiFields.add("client_secret"); + openapiFields.add("tenant_id"); + openapiFields.add("env_id"); + openapiFields.add("user_id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("api_key"); + openapiRequiredFields.add("client_secret"); + openapiRequiredFields.add("tenant_id"); + openapiRequiredFields.add("env_id"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ApiKey + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ApiKey.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ApiKey is not found in the empty JSON string", ApiKey.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ApiKey.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApiKey` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ApiKey.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("api_key").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `api_key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("api_key").toString())); + } + if (!jsonObj.get("client_secret").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `client_secret` to be a primitive type in the JSON string but got `%s`", jsonObj.get("client_secret").toString())); + } + if (!jsonObj.get("tenant_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tenant_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tenant_id").toString())); + } + if ((jsonObj.get("user_id") != null && !jsonObj.get("user_id").isJsonNull()) && !jsonObj.get("user_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `user_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ApiKey.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ApiKey' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ApiKey.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ApiKey value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ApiKey read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ApiKey given an JSON string + * + * @param jsonString JSON string + * @return An instance of ApiKey + * @throws IOException if the JSON string is invalid with respect to ApiKey + */ + public static ApiKey fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ApiKey.class); + } + + /** + * Convert an instance of ApiKey to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/saasus/sdk/apigateway/models/ApiKeys.java b/src/main/java/saasus/sdk/apigateway/models/ApiKeys.java new file mode 100644 index 00000000..6cb07bbb --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/models/ApiKeys.java @@ -0,0 +1,232 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.models; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import saasus.sdk.apigateway.models.ApiKey; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import saasus.sdk.apigateway.JSON; + +/** + * ApiKeys + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +public class ApiKeys { + public static final String SERIALIZED_NAME_API_KEYS = "api_keys"; + @SerializedName(SERIALIZED_NAME_API_KEYS) + private List apiKeys = new ArrayList<>(); + + public ApiKeys() { + } + + public ApiKeys apiKeys(List apiKeys) { + this.apiKeys = apiKeys; + return this; + } + + public ApiKeys addApiKeysItem(ApiKey apiKeysItem) { + if (this.apiKeys == null) { + this.apiKeys = new ArrayList<>(); + } + this.apiKeys.add(apiKeysItem); + return this; + } + + /** + * Get apiKeys + * @return apiKeys + **/ + @javax.annotation.Nonnull + public List getApiKeys() { + return apiKeys; + } + + public void setApiKeys(List apiKeys) { + this.apiKeys = apiKeys; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApiKeys apiKeys = (ApiKeys) o; + return Objects.equals(this.apiKeys, apiKeys.apiKeys); + } + + @Override + public int hashCode() { + return Objects.hash(apiKeys); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApiKeys {\n"); + sb.append(" apiKeys: ").append(toIndentedString(apiKeys)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("api_keys"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("api_keys"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ApiKeys + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ApiKeys.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ApiKeys is not found in the empty JSON string", ApiKeys.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ApiKeys.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApiKeys` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ApiKeys.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("api_keys").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `api_keys` to be an array in the JSON string but got `%s`", jsonObj.get("api_keys").toString())); + } + + JsonArray jsonArrayapiKeys = jsonObj.getAsJsonArray("api_keys"); + // validate the required field `api_keys` (array) + for (int i = 0; i < jsonArrayapiKeys.size(); i++) { + ApiKey.validateJsonElement(jsonArrayapiKeys.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ApiKeys.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ApiKeys' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ApiKeys.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ApiKeys value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ApiKeys read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ApiKeys given an JSON string + * + * @param jsonString JSON string + * @return An instance of ApiKeys + * @throws IOException if the JSON string is invalid with respect to ApiKeys + */ + public static ApiKeys fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ApiKeys.class); + } + + /** + * Convert an instance of ApiKeys to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/saasus/sdk/apigateway/models/CloudFormationLaunchStackLink.java b/src/main/java/saasus/sdk/apigateway/models/CloudFormationLaunchStackLink.java new file mode 100644 index 00000000..53c4ea0d --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/models/CloudFormationLaunchStackLink.java @@ -0,0 +1,214 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.models; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import saasus.sdk.apigateway.JSON; + +/** + * CloudFormationLaunchStackLink + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +public class CloudFormationLaunchStackLink { + public static final String SERIALIZED_NAME_LINK = "link"; + @SerializedName(SERIALIZED_NAME_LINK) + private String link; + + public CloudFormationLaunchStackLink() { + } + + public CloudFormationLaunchStackLink link(String link) { + this.link = link; + return this; + } + + /** + * Get link + * @return link + **/ + @javax.annotation.Nonnull + public String getLink() { + return link; + } + + public void setLink(String link) { + this.link = link; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CloudFormationLaunchStackLink cloudFormationLaunchStackLink = (CloudFormationLaunchStackLink) o; + return Objects.equals(this.link, cloudFormationLaunchStackLink.link); + } + + @Override + public int hashCode() { + return Objects.hash(link); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CloudFormationLaunchStackLink {\n"); + sb.append(" link: ").append(toIndentedString(link)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("link"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("link"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CloudFormationLaunchStackLink + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CloudFormationLaunchStackLink.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CloudFormationLaunchStackLink is not found in the empty JSON string", CloudFormationLaunchStackLink.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CloudFormationLaunchStackLink.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CloudFormationLaunchStackLink` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CloudFormationLaunchStackLink.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("link").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `link` to be a primitive type in the JSON string but got `%s`", jsonObj.get("link").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CloudFormationLaunchStackLink.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CloudFormationLaunchStackLink' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CloudFormationLaunchStackLink.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CloudFormationLaunchStackLink value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CloudFormationLaunchStackLink read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CloudFormationLaunchStackLink given an JSON string + * + * @param jsonString JSON string + * @return An instance of CloudFormationLaunchStackLink + * @throws IOException if the JSON string is invalid with respect to CloudFormationLaunchStackLink + */ + public static CloudFormationLaunchStackLink fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CloudFormationLaunchStackLink.class); + } + + /** + * Convert an instance of CloudFormationLaunchStackLink to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/saasus/sdk/apigateway/models/CreateApiKeyParam.java b/src/main/java/saasus/sdk/apigateway/models/CreateApiKeyParam.java new file mode 100644 index 00000000..969f3c2e --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/models/CreateApiKeyParam.java @@ -0,0 +1,270 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.models; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import saasus.sdk.apigateway.JSON; + +/** + * CreateApiKeyParam + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +public class CreateApiKeyParam { + public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; + @SerializedName(SERIALIZED_NAME_TENANT_ID) + private String tenantId; + + public static final String SERIALIZED_NAME_ENV_ID = "env_id"; + @SerializedName(SERIALIZED_NAME_ENV_ID) + private Integer envId; + + public static final String SERIALIZED_NAME_USER_ID = "user_id"; + @SerializedName(SERIALIZED_NAME_USER_ID) + private String userId; + + public CreateApiKeyParam() { + } + + public CreateApiKeyParam tenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get tenantId + * @return tenantId + **/ + @javax.annotation.Nonnull + public String getTenantId() { + return tenantId; + } + + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + } + + + public CreateApiKeyParam envId(Integer envId) { + this.envId = envId; + return this; + } + + /** + * Get envId + * @return envId + **/ + @javax.annotation.Nonnull + public Integer getEnvId() { + return envId; + } + + public void setEnvId(Integer envId) { + this.envId = envId; + } + + + public CreateApiKeyParam userId(String userId) { + this.userId = userId; + return this; + } + + /** + * Get userId + * @return userId + **/ + @javax.annotation.Nullable + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateApiKeyParam createApiKeyParam = (CreateApiKeyParam) o; + return Objects.equals(this.tenantId, createApiKeyParam.tenantId) && + Objects.equals(this.envId, createApiKeyParam.envId) && + Objects.equals(this.userId, createApiKeyParam.userId); + } + + @Override + public int hashCode() { + return Objects.hash(tenantId, envId, userId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateApiKeyParam {\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" envId: ").append(toIndentedString(envId)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("tenant_id"); + openapiFields.add("env_id"); + openapiFields.add("user_id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("tenant_id"); + openapiRequiredFields.add("env_id"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateApiKeyParam + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateApiKeyParam.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateApiKeyParam is not found in the empty JSON string", CreateApiKeyParam.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateApiKeyParam.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateApiKeyParam` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateApiKeyParam.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("tenant_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tenant_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tenant_id").toString())); + } + if ((jsonObj.get("user_id") != null && !jsonObj.get("user_id").isJsonNull()) && !jsonObj.get("user_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `user_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateApiKeyParam.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateApiKeyParam' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateApiKeyParam.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateApiKeyParam value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateApiKeyParam read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateApiKeyParam given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateApiKeyParam + * @throws IOException if the JSON string is invalid with respect to CreateApiKeyParam + */ + public static CreateApiKeyParam fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateApiKeyParam.class); + } + + /** + * Convert an instance of CreateApiKeyParam to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/saasus/sdk/apigateway/models/DnsRecord.java b/src/main/java/saasus/sdk/apigateway/models/DnsRecord.java new file mode 100644 index 00000000..dc6b23ce --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/models/DnsRecord.java @@ -0,0 +1,328 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.models; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import saasus.sdk.apigateway.JSON; + +/** + * DnsRecord + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +public class DnsRecord { + /** + * CNAME Resource Record + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + CNAME("CNAME"), + + TXT("TXT"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private TypeEnum type; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + private String value; + + public DnsRecord() { + } + + public DnsRecord type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * CNAME Resource Record + * @return type + **/ + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + + public DnsRecord name(String name) { + this.name = name; + return this; + } + + /** + * Record Name + * @return name + **/ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + public DnsRecord value(String value) { + this.value = value; + return this; + } + + /** + * Value + * @return value + **/ + @javax.annotation.Nonnull + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DnsRecord dnsRecord = (DnsRecord) o; + return Objects.equals(this.type, dnsRecord.type) && + Objects.equals(this.name, dnsRecord.name) && + Objects.equals(this.value, dnsRecord.value); + } + + @Override + public int hashCode() { + return Objects.hash(type, name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DnsRecord {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("name"); + openapiFields.add("value"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("value"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DnsRecord + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DnsRecord.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DnsRecord is not found in the empty JSON string", DnsRecord.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!DnsRecord.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DnsRecord` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DnsRecord.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (!jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DnsRecord.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DnsRecord' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DnsRecord.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DnsRecord value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DnsRecord read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of DnsRecord given an JSON string + * + * @param jsonString JSON string + * @return An instance of DnsRecord + * @throws IOException if the JSON string is invalid with respect to DnsRecord + */ + public static DnsRecord fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DnsRecord.class); + } + + /** + * Convert an instance of DnsRecord to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/saasus/sdk/apigateway/models/EndpointSettings.java b/src/main/java/saasus/sdk/apigateway/models/EndpointSettings.java new file mode 100644 index 00000000..09104a7c --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/models/EndpointSettings.java @@ -0,0 +1,383 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.models; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import saasus.sdk.apigateway.models.Throttling; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import saasus.sdk.apigateway.JSON; + +/** + * Settings per endpoint + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +public class EndpointSettings { + public static final String SERIALIZED_NAME_PATH = "path"; + @SerializedName(SERIALIZED_NAME_PATH) + private String path; + + /** + * Method + */ + @JsonAdapter(MethodEnum.Adapter.class) + public enum MethodEnum { + GET("GET"), + + HEAD("HEAD"), + + POST("POST"), + + PUT("PUT"), + + PATCH("PATCH"), + + DELETE("DELETE"), + + CONNECT("CONNECT"), + + OPTIONS("OPTIONS"), + + TRACE("TRACE"); + + private String value; + + MethodEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static MethodEnum fromValue(String value) { + for (MethodEnum b : MethodEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MethodEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MethodEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MethodEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MethodEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_METHOD = "method"; + @SerializedName(SERIALIZED_NAME_METHOD) + private MethodEnum method; + + public static final String SERIALIZED_NAME_THROTTLING = "throttling"; + @SerializedName(SERIALIZED_NAME_THROTTLING) + private Throttling throttling; + + public static final String SERIALIZED_NAME_ROLE_NAMES = "role_names"; + @SerializedName(SERIALIZED_NAME_ROLE_NAMES) + private List roleNames; + + public EndpointSettings() { + } + + public EndpointSettings path(String path) { + this.path = path; + return this; + } + + /** + * Path + * @return path + **/ + @javax.annotation.Nonnull + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path; + } + + + public EndpointSettings method(MethodEnum method) { + this.method = method; + return this; + } + + /** + * Method + * @return method + **/ + @javax.annotation.Nonnull + public MethodEnum getMethod() { + return method; + } + + public void setMethod(MethodEnum method) { + this.method = method; + } + + + public EndpointSettings throttling(Throttling throttling) { + this.throttling = throttling; + return this; + } + + /** + * Get throttling + * @return throttling + **/ + @javax.annotation.Nullable + public Throttling getThrottling() { + return throttling; + } + + public void setThrottling(Throttling throttling) { + this.throttling = throttling; + } + + + public EndpointSettings roleNames(List roleNames) { + this.roleNames = roleNames; + return this; + } + + public EndpointSettings addRoleNamesItem(String roleNamesItem) { + if (this.roleNames == null) { + this.roleNames = new ArrayList<>(); + } + this.roleNames.add(roleNamesItem); + return this; + } + + /** + * Role names that can access the endpoint + * @return roleNames + **/ + @javax.annotation.Nullable + public List getRoleNames() { + return roleNames; + } + + public void setRoleNames(List roleNames) { + this.roleNames = roleNames; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EndpointSettings endpointSettings = (EndpointSettings) o; + return Objects.equals(this.path, endpointSettings.path) && + Objects.equals(this.method, endpointSettings.method) && + Objects.equals(this.throttling, endpointSettings.throttling) && + Objects.equals(this.roleNames, endpointSettings.roleNames); + } + + @Override + public int hashCode() { + return Objects.hash(path, method, throttling, roleNames); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EndpointSettings {\n"); + sb.append(" path: ").append(toIndentedString(path)).append("\n"); + sb.append(" method: ").append(toIndentedString(method)).append("\n"); + sb.append(" throttling: ").append(toIndentedString(throttling)).append("\n"); + sb.append(" roleNames: ").append(toIndentedString(roleNames)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("path"); + openapiFields.add("method"); + openapiFields.add("throttling"); + openapiFields.add("role_names"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("path"); + openapiRequiredFields.add("method"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EndpointSettings + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EndpointSettings.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in EndpointSettings is not found in the empty JSON string", EndpointSettings.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!EndpointSettings.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EndpointSettings` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : EndpointSettings.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("path").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `path` to be a primitive type in the JSON string but got `%s`", jsonObj.get("path").toString())); + } + if (!jsonObj.get("method").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `method` to be a primitive type in the JSON string but got `%s`", jsonObj.get("method").toString())); + } + // validate the required field `method` + MethodEnum.validateJsonElement(jsonObj.get("method")); + // validate the optional field `throttling` + if (jsonObj.get("throttling") != null && !jsonObj.get("throttling").isJsonNull()) { + Throttling.validateJsonElement(jsonObj.get("throttling")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("role_names") != null && !jsonObj.get("role_names").isJsonNull() && !jsonObj.get("role_names").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `role_names` to be an array in the JSON string but got `%s`", jsonObj.get("role_names").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EndpointSettings.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EndpointSettings' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EndpointSettings.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EndpointSettings value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EndpointSettings read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of EndpointSettings given an JSON string + * + * @param jsonString JSON string + * @return An instance of EndpointSettings + * @throws IOException if the JSON string is invalid with respect to EndpointSettings + */ + public static EndpointSettings fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EndpointSettings.class); + } + + /** + * Convert an instance of EndpointSettings to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/saasus/sdk/apigateway/models/Error.java b/src/main/java/saasus/sdk/apigateway/models/Error.java new file mode 100644 index 00000000..df281a83 --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/models/Error.java @@ -0,0 +1,244 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.models; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import saasus.sdk.apigateway.JSON; + +/** + * Error + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +public class Error { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + private String message; + + public Error() { + } + + public Error type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nonnull + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + + public Error message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + **/ + @javax.annotation.Nonnull + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Error error = (Error) o; + return Objects.equals(this.type, error.type) && + Objects.equals(this.message, error.message); + } + + @Override + public int hashCode() { + return Objects.hash(type, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Error {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("message"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("message"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Error + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Error.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Error is not found in the empty JSON string", Error.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Error.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Error` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Error.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if (!jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Error.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Error' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Error.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Error value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Error read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Error given an JSON string + * + * @param jsonString JSON string + * @return An instance of Error + * @throws IOException if the JSON string is invalid with respect to Error + */ + public static Error fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Error.class); + } + + /** + * Convert an instance of Error to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/saasus/sdk/apigateway/models/TenantRouting.java b/src/main/java/saasus/sdk/apigateway/models/TenantRouting.java new file mode 100644 index 00000000..ccad649c --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/models/TenantRouting.java @@ -0,0 +1,293 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.models; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import saasus.sdk.apigateway.JSON; + +/** + * Information about tenant routing. Refer to the tenant_routing_type in ApiGatewaySettings and route the request. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +public class TenantRouting { + public static final String SERIALIZED_NAME_PATH = "path"; + @SerializedName(SERIALIZED_NAME_PATH) + private String path; + + public static final String SERIALIZED_NAME_HEADER_KEY = "header_key"; + @SerializedName(SERIALIZED_NAME_HEADER_KEY) + private String headerKey; + + public static final String SERIALIZED_NAME_HEADER_VALUE = "header_value"; + @SerializedName(SERIALIZED_NAME_HEADER_VALUE) + private String headerValue; + + public static final String SERIALIZED_NAME_HOST_NAME = "host_name"; + @SerializedName(SERIALIZED_NAME_HOST_NAME) + private String hostName; + + public TenantRouting() { + } + + public TenantRouting path(String path) { + this.path = path; + return this; + } + + /** + * Path for each tenant + * @return path + **/ + @javax.annotation.Nullable + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path; + } + + + public TenantRouting headerKey(String headerKey) { + this.headerKey = headerKey; + return this; + } + + /** + * Header key to specify the tenant identifier + * @return headerKey + **/ + @javax.annotation.Nullable + public String getHeaderKey() { + return headerKey; + } + + public void setHeaderKey(String headerKey) { + this.headerKey = headerKey; + } + + + public TenantRouting headerValue(String headerValue) { + this.headerValue = headerValue; + return this; + } + + /** + * Tenant identifier set in header key + * @return headerValue + **/ + @javax.annotation.Nullable + public String getHeaderValue() { + return headerValue; + } + + public void setHeaderValue(String headerValue) { + this.headerValue = headerValue; + } + + + public TenantRouting hostName(String hostName) { + this.hostName = hostName; + return this; + } + + /** + * Host Name for each tenant + * @return hostName + **/ + @javax.annotation.Nullable + public String getHostName() { + return hostName; + } + + public void setHostName(String hostName) { + this.hostName = hostName; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TenantRouting tenantRouting = (TenantRouting) o; + return Objects.equals(this.path, tenantRouting.path) && + Objects.equals(this.headerKey, tenantRouting.headerKey) && + Objects.equals(this.headerValue, tenantRouting.headerValue) && + Objects.equals(this.hostName, tenantRouting.hostName); + } + + @Override + public int hashCode() { + return Objects.hash(path, headerKey, headerValue, hostName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TenantRouting {\n"); + sb.append(" path: ").append(toIndentedString(path)).append("\n"); + sb.append(" headerKey: ").append(toIndentedString(headerKey)).append("\n"); + sb.append(" headerValue: ").append(toIndentedString(headerValue)).append("\n"); + sb.append(" hostName: ").append(toIndentedString(hostName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("path"); + openapiFields.add("header_key"); + openapiFields.add("header_value"); + openapiFields.add("host_name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TenantRouting + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TenantRouting.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in TenantRouting is not found in the empty JSON string", TenantRouting.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TenantRouting.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TenantRouting` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("path") != null && !jsonObj.get("path").isJsonNull()) && !jsonObj.get("path").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `path` to be a primitive type in the JSON string but got `%s`", jsonObj.get("path").toString())); + } + if ((jsonObj.get("header_key") != null && !jsonObj.get("header_key").isJsonNull()) && !jsonObj.get("header_key").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `header_key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("header_key").toString())); + } + if ((jsonObj.get("header_value") != null && !jsonObj.get("header_value").isJsonNull()) && !jsonObj.get("header_value").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `header_value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("header_value").toString())); + } + if ((jsonObj.get("host_name") != null && !jsonObj.get("host_name").isJsonNull()) && !jsonObj.get("host_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `host_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("host_name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TenantRouting.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TenantRouting' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(TenantRouting.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, TenantRouting value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TenantRouting read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of TenantRouting given an JSON string + * + * @param jsonString JSON string + * @return An instance of TenantRouting + * @throws IOException if the JSON string is invalid with respect to TenantRouting + */ + public static TenantRouting fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, TenantRouting.class); + } + + /** + * Convert an instance of TenantRouting to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/saasus/sdk/apigateway/models/TenantRoutingType.java b/src/main/java/saasus/sdk/apigateway/models/TenantRoutingType.java new file mode 100644 index 00000000..5ccd0b4c --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/models/TenantRoutingType.java @@ -0,0 +1,82 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.models; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Tenant Routing Type + */ +@JsonAdapter(TenantRoutingType.Adapter.class) +public enum TenantRoutingType { + + PATH("path"), + + HOSTNAME("hostName"), + + HEADERVALUE("headerValue"), + + NONE("none"); + + private String value; + + TenantRoutingType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TenantRoutingType fromValue(String value) { + for (TenantRoutingType b : TenantRoutingType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TenantRoutingType enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TenantRoutingType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TenantRoutingType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TenantRoutingType.fromValue(value); + } +} + diff --git a/src/main/java/saasus/sdk/apigateway/models/Throttling.java b/src/main/java/saasus/sdk/apigateway/models/Throttling.java new file mode 100644 index 00000000..005752f3 --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/models/Throttling.java @@ -0,0 +1,324 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.models; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import saasus.sdk.apigateway.JSON; + +/** + * Permit requests up to the limit number of times within a range (seconds) time for each target. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +public class Throttling { + /** + * Target of restriction + */ + @JsonAdapter(TargetEnum.Adapter.class) + public enum TargetEnum { + TENANT("tenant"), + + USER("user"); + + private String value; + + TargetEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TargetEnum fromValue(String value) { + for (TargetEnum b : TargetEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TargetEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TargetEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TargetEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TargetEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TARGET = "target"; + @SerializedName(SERIALIZED_NAME_TARGET) + private TargetEnum target; + + public static final String SERIALIZED_NAME_RANGE = "range"; + @SerializedName(SERIALIZED_NAME_RANGE) + private Integer range; + + public static final String SERIALIZED_NAME_LIMIT = "limit"; + @SerializedName(SERIALIZED_NAME_LIMIT) + private Integer limit; + + public Throttling() { + } + + public Throttling target(TargetEnum target) { + this.target = target; + return this; + } + + /** + * Target of restriction + * @return target + **/ + @javax.annotation.Nonnull + public TargetEnum getTarget() { + return target; + } + + public void setTarget(TargetEnum target) { + this.target = target; + } + + + public Throttling range(Integer range) { + this.range = range; + return this; + } + + /** + * Throttling time range (seconds) + * minimum: 60 + * maximum: 31536000 + * @return range + **/ + @javax.annotation.Nonnull + public Integer getRange() { + return range; + } + + public void setRange(Integer range) { + this.range = range; + } + + + public Throttling limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * Throttling limit + * @return limit + **/ + @javax.annotation.Nonnull + public Integer getLimit() { + return limit; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Throttling throttling = (Throttling) o; + return Objects.equals(this.target, throttling.target) && + Objects.equals(this.range, throttling.range) && + Objects.equals(this.limit, throttling.limit); + } + + @Override + public int hashCode() { + return Objects.hash(target, range, limit); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Throttling {\n"); + sb.append(" target: ").append(toIndentedString(target)).append("\n"); + sb.append(" range: ").append(toIndentedString(range)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("target"); + openapiFields.add("range"); + openapiFields.add("limit"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("target"); + openapiRequiredFields.add("range"); + openapiRequiredFields.add("limit"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Throttling + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Throttling.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Throttling is not found in the empty JSON string", Throttling.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Throttling.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Throttling` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Throttling.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("target").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `target` to be a primitive type in the JSON string but got `%s`", jsonObj.get("target").toString())); + } + // validate the required field `target` + TargetEnum.validateJsonElement(jsonObj.get("target")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Throttling.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Throttling' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Throttling.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Throttling value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Throttling read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Throttling given an JSON string + * + * @param jsonString JSON string + * @return An instance of Throttling + * @throws IOException if the JSON string is invalid with respect to Throttling + */ + public static Throttling fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Throttling.class); + } + + /** + * Convert an instance of Throttling to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/saasus/sdk/apigateway/models/UpdateApiGatewaySettingsParam.java b/src/main/java/saasus/sdk/apigateway/models/UpdateApiGatewaySettingsParam.java new file mode 100644 index 00000000..4c9e7a27 --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/models/UpdateApiGatewaySettingsParam.java @@ -0,0 +1,555 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.models; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import saasus.sdk.apigateway.models.EndpointSettings; +import saasus.sdk.apigateway.models.TenantRoutingType; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import saasus.sdk.apigateway.JSON; + +/** + * UpdateApiGatewaySettingsParam + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +public class UpdateApiGatewaySettingsParam { + public static final String SERIALIZED_NAME_ROLE_ARN = "role_arn"; + @SerializedName(SERIALIZED_NAME_ROLE_ARN) + private String roleArn; + + public static final String SERIALIZED_NAME_ROLE_EXTERNAL_ID = "role_external_id"; + @SerializedName(SERIALIZED_NAME_ROLE_EXTERNAL_ID) + private String roleExternalId; + + public static final String SERIALIZED_NAME_INTERNAL_ENDPOINT_HEALTH_CHECK_PATH = "internal_endpoint_health_check_path"; + @SerializedName(SERIALIZED_NAME_INTERNAL_ENDPOINT_HEALTH_CHECK_PATH) + private String internalEndpointHealthCheckPath; + + public static final String SERIALIZED_NAME_INTERNAL_ENDPOINT_HEALTH_CHECK_PORT = "internal_endpoint_health_check_port"; + @SerializedName(SERIALIZED_NAME_INTERNAL_ENDPOINT_HEALTH_CHECK_PORT) + private Integer internalEndpointHealthCheckPort; + + public static final String SERIALIZED_NAME_INTERNAL_ENDPOINT_HEALTH_CHECK_PROTOCOL = "internal_endpoint_health_check_protocol"; + @SerializedName(SERIALIZED_NAME_INTERNAL_ENDPOINT_HEALTH_CHECK_PROTOCOL) + private String internalEndpointHealthCheckProtocol; + + public static final String SERIALIZED_NAME_INTERNAL_ENDPOINT_HEALTH_STATUS_CODES = "internal_endpoint_health_status_codes"; + @SerializedName(SERIALIZED_NAME_INTERNAL_ENDPOINT_HEALTH_STATUS_CODES) + private String internalEndpointHealthStatusCodes; + + public static final String SERIALIZED_NAME_SAAS_SUBNET_IDS = "saas_subnet_ids"; + @SerializedName(SERIALIZED_NAME_SAAS_SUBNET_IDS) + private List saasSubnetIds; + + public static final String SERIALIZED_NAME_SAAS_VPC_ID = "saas_vpc_id"; + @SerializedName(SERIALIZED_NAME_SAAS_VPC_ID) + private String saasVpcId; + + public static final String SERIALIZED_NAME_DOMAIN_NAME = "domain_name"; + @SerializedName(SERIALIZED_NAME_DOMAIN_NAME) + private String domainName; + + public static final String SERIALIZED_NAME_SAAS_ALB_ARN = "saas_alb_arn"; + @SerializedName(SERIALIZED_NAME_SAAS_ALB_ARN) + private String saasAlbArn; + + public static final String SERIALIZED_NAME_ENDPOINT_SETTINGS_LIST = "endpoint_settings_list"; + @SerializedName(SERIALIZED_NAME_ENDPOINT_SETTINGS_LIST) + private List endpointSettingsList; + + public static final String SERIALIZED_NAME_TENANT_ROUTING_TYPE = "tenant_routing_type"; + @SerializedName(SERIALIZED_NAME_TENANT_ROUTING_TYPE) + private TenantRoutingType tenantRoutingType; + + public UpdateApiGatewaySettingsParam() { + } + + public UpdateApiGatewaySettingsParam roleArn(String roleArn) { + this.roleArn = roleArn; + return this; + } + + /** + * ARN of the role for SaaSus Platform to AssumeRole + * @return roleArn + **/ + @javax.annotation.Nullable + public String getRoleArn() { + return roleArn; + } + + public void setRoleArn(String roleArn) { + this.roleArn = roleArn; + } + + + public UpdateApiGatewaySettingsParam roleExternalId(String roleExternalId) { + this.roleExternalId = roleExternalId; + return this; + } + + /** + * External id used by SaaSus when AssumeRole to operate SaaS + * @return roleExternalId + **/ + @javax.annotation.Nullable + public String getRoleExternalId() { + return roleExternalId; + } + + public void setRoleExternalId(String roleExternalId) { + this.roleExternalId = roleExternalId; + } + + + public UpdateApiGatewaySettingsParam internalEndpointHealthCheckPath(String internalEndpointHealthCheckPath) { + this.internalEndpointHealthCheckPath = internalEndpointHealthCheckPath; + return this; + } + + /** + * The path to be used for health checks on the internal endpoint. + * @return internalEndpointHealthCheckPath + **/ + @javax.annotation.Nullable + public String getInternalEndpointHealthCheckPath() { + return internalEndpointHealthCheckPath; + } + + public void setInternalEndpointHealthCheckPath(String internalEndpointHealthCheckPath) { + this.internalEndpointHealthCheckPath = internalEndpointHealthCheckPath; + } + + + public UpdateApiGatewaySettingsParam internalEndpointHealthCheckPort(Integer internalEndpointHealthCheckPort) { + this.internalEndpointHealthCheckPort = internalEndpointHealthCheckPort; + return this; + } + + /** + * The port to be used for health checks on the internal endpoint. + * @return internalEndpointHealthCheckPort + **/ + @javax.annotation.Nullable + public Integer getInternalEndpointHealthCheckPort() { + return internalEndpointHealthCheckPort; + } + + public void setInternalEndpointHealthCheckPort(Integer internalEndpointHealthCheckPort) { + this.internalEndpointHealthCheckPort = internalEndpointHealthCheckPort; + } + + + public UpdateApiGatewaySettingsParam internalEndpointHealthCheckProtocol(String internalEndpointHealthCheckProtocol) { + this.internalEndpointHealthCheckProtocol = internalEndpointHealthCheckProtocol; + return this; + } + + /** + * The protocol to be used for health checks on the internal endpoint. + * @return internalEndpointHealthCheckProtocol + **/ + @javax.annotation.Nullable + public String getInternalEndpointHealthCheckProtocol() { + return internalEndpointHealthCheckProtocol; + } + + public void setInternalEndpointHealthCheckProtocol(String internalEndpointHealthCheckProtocol) { + this.internalEndpointHealthCheckProtocol = internalEndpointHealthCheckProtocol; + } + + + public UpdateApiGatewaySettingsParam internalEndpointHealthStatusCodes(String internalEndpointHealthStatusCodes) { + this.internalEndpointHealthStatusCodes = internalEndpointHealthStatusCodes; + return this; + } + + /** + * The status codes to be used for health checks on the internal endpoint. + * @return internalEndpointHealthStatusCodes + **/ + @javax.annotation.Nullable + public String getInternalEndpointHealthStatusCodes() { + return internalEndpointHealthStatusCodes; + } + + public void setInternalEndpointHealthStatusCodes(String internalEndpointHealthStatusCodes) { + this.internalEndpointHealthStatusCodes = internalEndpointHealthStatusCodes; + } + + + public UpdateApiGatewaySettingsParam saasSubnetIds(List saasSubnetIds) { + this.saasSubnetIds = saasSubnetIds; + return this; + } + + public UpdateApiGatewaySettingsParam addSaasSubnetIdsItem(String saasSubnetIdsItem) { + if (this.saasSubnetIds == null) { + this.saasSubnetIds = new ArrayList<>(); + } + this.saasSubnetIds.add(saasSubnetIdsItem); + return this; + } + + /** + * Subnet IDs for SaaS + * @return saasSubnetIds + **/ + @javax.annotation.Nullable + public List getSaasSubnetIds() { + return saasSubnetIds; + } + + public void setSaasSubnetIds(List saasSubnetIds) { + this.saasSubnetIds = saasSubnetIds; + } + + + public UpdateApiGatewaySettingsParam saasVpcId(String saasVpcId) { + this.saasVpcId = saasVpcId; + return this; + } + + /** + * VPC ID for SaaS + * @return saasVpcId + **/ + @javax.annotation.Nullable + public String getSaasVpcId() { + return saasVpcId; + } + + public void setSaasVpcId(String saasVpcId) { + this.saasVpcId = saasVpcId; + } + + + public UpdateApiGatewaySettingsParam domainName(String domainName) { + this.domainName = domainName; + return this; + } + + /** + * Domain Name + * @return domainName + **/ + @javax.annotation.Nullable + public String getDomainName() { + return domainName; + } + + public void setDomainName(String domainName) { + this.domainName = domainName; + } + + + public UpdateApiGatewaySettingsParam saasAlbArn(String saasAlbArn) { + this.saasAlbArn = saasAlbArn; + return this; + } + + /** + * SaaS Application Load Balancer ARN + * @return saasAlbArn + **/ + @javax.annotation.Nullable + public String getSaasAlbArn() { + return saasAlbArn; + } + + public void setSaasAlbArn(String saasAlbArn) { + this.saasAlbArn = saasAlbArn; + } + + + public UpdateApiGatewaySettingsParam endpointSettingsList(List endpointSettingsList) { + this.endpointSettingsList = endpointSettingsList; + return this; + } + + public UpdateApiGatewaySettingsParam addEndpointSettingsListItem(EndpointSettings endpointSettingsListItem) { + if (this.endpointSettingsList == null) { + this.endpointSettingsList = new ArrayList<>(); + } + this.endpointSettingsList.add(endpointSettingsListItem); + return this; + } + + /** + * Endpoint Settings List + * @return endpointSettingsList + **/ + @javax.annotation.Nullable + public List getEndpointSettingsList() { + return endpointSettingsList; + } + + public void setEndpointSettingsList(List endpointSettingsList) { + this.endpointSettingsList = endpointSettingsList; + } + + + public UpdateApiGatewaySettingsParam tenantRoutingType(TenantRoutingType tenantRoutingType) { + this.tenantRoutingType = tenantRoutingType; + return this; + } + + /** + * Get tenantRoutingType + * @return tenantRoutingType + **/ + @javax.annotation.Nullable + public TenantRoutingType getTenantRoutingType() { + return tenantRoutingType; + } + + public void setTenantRoutingType(TenantRoutingType tenantRoutingType) { + this.tenantRoutingType = tenantRoutingType; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateApiGatewaySettingsParam updateApiGatewaySettingsParam = (UpdateApiGatewaySettingsParam) o; + return Objects.equals(this.roleArn, updateApiGatewaySettingsParam.roleArn) && + Objects.equals(this.roleExternalId, updateApiGatewaySettingsParam.roleExternalId) && + Objects.equals(this.internalEndpointHealthCheckPath, updateApiGatewaySettingsParam.internalEndpointHealthCheckPath) && + Objects.equals(this.internalEndpointHealthCheckPort, updateApiGatewaySettingsParam.internalEndpointHealthCheckPort) && + Objects.equals(this.internalEndpointHealthCheckProtocol, updateApiGatewaySettingsParam.internalEndpointHealthCheckProtocol) && + Objects.equals(this.internalEndpointHealthStatusCodes, updateApiGatewaySettingsParam.internalEndpointHealthStatusCodes) && + Objects.equals(this.saasSubnetIds, updateApiGatewaySettingsParam.saasSubnetIds) && + Objects.equals(this.saasVpcId, updateApiGatewaySettingsParam.saasVpcId) && + Objects.equals(this.domainName, updateApiGatewaySettingsParam.domainName) && + Objects.equals(this.saasAlbArn, updateApiGatewaySettingsParam.saasAlbArn) && + Objects.equals(this.endpointSettingsList, updateApiGatewaySettingsParam.endpointSettingsList) && + Objects.equals(this.tenantRoutingType, updateApiGatewaySettingsParam.tenantRoutingType); + } + + @Override + public int hashCode() { + return Objects.hash(roleArn, roleExternalId, internalEndpointHealthCheckPath, internalEndpointHealthCheckPort, internalEndpointHealthCheckProtocol, internalEndpointHealthStatusCodes, saasSubnetIds, saasVpcId, domainName, saasAlbArn, endpointSettingsList, tenantRoutingType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateApiGatewaySettingsParam {\n"); + sb.append(" roleArn: ").append(toIndentedString(roleArn)).append("\n"); + sb.append(" roleExternalId: ").append(toIndentedString(roleExternalId)).append("\n"); + sb.append(" internalEndpointHealthCheckPath: ").append(toIndentedString(internalEndpointHealthCheckPath)).append("\n"); + sb.append(" internalEndpointHealthCheckPort: ").append(toIndentedString(internalEndpointHealthCheckPort)).append("\n"); + sb.append(" internalEndpointHealthCheckProtocol: ").append(toIndentedString(internalEndpointHealthCheckProtocol)).append("\n"); + sb.append(" internalEndpointHealthStatusCodes: ").append(toIndentedString(internalEndpointHealthStatusCodes)).append("\n"); + sb.append(" saasSubnetIds: ").append(toIndentedString(saasSubnetIds)).append("\n"); + sb.append(" saasVpcId: ").append(toIndentedString(saasVpcId)).append("\n"); + sb.append(" domainName: ").append(toIndentedString(domainName)).append("\n"); + sb.append(" saasAlbArn: ").append(toIndentedString(saasAlbArn)).append("\n"); + sb.append(" endpointSettingsList: ").append(toIndentedString(endpointSettingsList)).append("\n"); + sb.append(" tenantRoutingType: ").append(toIndentedString(tenantRoutingType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("role_arn"); + openapiFields.add("role_external_id"); + openapiFields.add("internal_endpoint_health_check_path"); + openapiFields.add("internal_endpoint_health_check_port"); + openapiFields.add("internal_endpoint_health_check_protocol"); + openapiFields.add("internal_endpoint_health_status_codes"); + openapiFields.add("saas_subnet_ids"); + openapiFields.add("saas_vpc_id"); + openapiFields.add("domain_name"); + openapiFields.add("saas_alb_arn"); + openapiFields.add("endpoint_settings_list"); + openapiFields.add("tenant_routing_type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateApiGatewaySettingsParam + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateApiGatewaySettingsParam.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateApiGatewaySettingsParam is not found in the empty JSON string", UpdateApiGatewaySettingsParam.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateApiGatewaySettingsParam.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateApiGatewaySettingsParam` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("role_arn") != null && !jsonObj.get("role_arn").isJsonNull()) && !jsonObj.get("role_arn").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `role_arn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("role_arn").toString())); + } + if ((jsonObj.get("role_external_id") != null && !jsonObj.get("role_external_id").isJsonNull()) && !jsonObj.get("role_external_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `role_external_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("role_external_id").toString())); + } + if ((jsonObj.get("internal_endpoint_health_check_path") != null && !jsonObj.get("internal_endpoint_health_check_path").isJsonNull()) && !jsonObj.get("internal_endpoint_health_check_path").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `internal_endpoint_health_check_path` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internal_endpoint_health_check_path").toString())); + } + if ((jsonObj.get("internal_endpoint_health_check_protocol") != null && !jsonObj.get("internal_endpoint_health_check_protocol").isJsonNull()) && !jsonObj.get("internal_endpoint_health_check_protocol").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `internal_endpoint_health_check_protocol` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internal_endpoint_health_check_protocol").toString())); + } + if ((jsonObj.get("internal_endpoint_health_status_codes") != null && !jsonObj.get("internal_endpoint_health_status_codes").isJsonNull()) && !jsonObj.get("internal_endpoint_health_status_codes").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `internal_endpoint_health_status_codes` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internal_endpoint_health_status_codes").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("saas_subnet_ids") != null && !jsonObj.get("saas_subnet_ids").isJsonNull() && !jsonObj.get("saas_subnet_ids").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `saas_subnet_ids` to be an array in the JSON string but got `%s`", jsonObj.get("saas_subnet_ids").toString())); + } + if ((jsonObj.get("saas_vpc_id") != null && !jsonObj.get("saas_vpc_id").isJsonNull()) && !jsonObj.get("saas_vpc_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `saas_vpc_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("saas_vpc_id").toString())); + } + if ((jsonObj.get("domain_name") != null && !jsonObj.get("domain_name").isJsonNull()) && !jsonObj.get("domain_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `domain_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("domain_name").toString())); + } + if ((jsonObj.get("saas_alb_arn") != null && !jsonObj.get("saas_alb_arn").isJsonNull()) && !jsonObj.get("saas_alb_arn").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `saas_alb_arn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("saas_alb_arn").toString())); + } + if (jsonObj.get("endpoint_settings_list") != null && !jsonObj.get("endpoint_settings_list").isJsonNull()) { + JsonArray jsonArrayendpointSettingsList = jsonObj.getAsJsonArray("endpoint_settings_list"); + if (jsonArrayendpointSettingsList != null) { + // ensure the json data is an array + if (!jsonObj.get("endpoint_settings_list").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `endpoint_settings_list` to be an array in the JSON string but got `%s`", jsonObj.get("endpoint_settings_list").toString())); + } + + // validate the optional field `endpoint_settings_list` (array) + for (int i = 0; i < jsonArrayendpointSettingsList.size(); i++) { + EndpointSettings.validateJsonElement(jsonArrayendpointSettingsList.get(i)); + }; + } + } + // validate the optional field `tenant_routing_type` + if (jsonObj.get("tenant_routing_type") != null && !jsonObj.get("tenant_routing_type").isJsonNull()) { + TenantRoutingType.validateJsonElement(jsonObj.get("tenant_routing_type")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateApiGatewaySettingsParam.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateApiGatewaySettingsParam' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateApiGatewaySettingsParam.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateApiGatewaySettingsParam value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateApiGatewaySettingsParam read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateApiGatewaySettingsParam given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateApiGatewaySettingsParam + * @throws IOException if the JSON string is invalid with respect to UpdateApiGatewaySettingsParam + */ + public static UpdateApiGatewaySettingsParam fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateApiGatewaySettingsParam.class); + } + + /** + * Convert an instance of UpdateApiGatewaySettingsParam to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/saasus/sdk/apigateway/models/UpdateTenantParam.java b/src/main/java/saasus/sdk/apigateway/models/UpdateTenantParam.java new file mode 100644 index 00000000..277be855 --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/models/UpdateTenantParam.java @@ -0,0 +1,248 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.models; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import saasus.sdk.apigateway.models.TenantRouting; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import saasus.sdk.apigateway.JSON; + +/** + * UpdateTenantParam + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +public class UpdateTenantParam { + public static final String SERIALIZED_NAME_ALLOWED_IPS = "allowed_ips"; + @SerializedName(SERIALIZED_NAME_ALLOWED_IPS) + private List allowedIps; + + public static final String SERIALIZED_NAME_ROUTING = "routing"; + @SerializedName(SERIALIZED_NAME_ROUTING) + private TenantRouting routing; + + public UpdateTenantParam() { + } + + public UpdateTenantParam allowedIps(List allowedIps) { + this.allowedIps = allowedIps; + return this; + } + + public UpdateTenantParam addAllowedIpsItem(String allowedIpsItem) { + if (this.allowedIps == null) { + this.allowedIps = new ArrayList<>(); + } + this.allowedIps.add(allowedIpsItem); + return this; + } + + /** + * Allowed IP addresses in CIDR format + * @return allowedIps + **/ + @javax.annotation.Nullable + public List getAllowedIps() { + return allowedIps; + } + + public void setAllowedIps(List allowedIps) { + this.allowedIps = allowedIps; + } + + + public UpdateTenantParam routing(TenantRouting routing) { + this.routing = routing; + return this; + } + + /** + * Get routing + * @return routing + **/ + @javax.annotation.Nullable + public TenantRouting getRouting() { + return routing; + } + + public void setRouting(TenantRouting routing) { + this.routing = routing; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateTenantParam updateTenantParam = (UpdateTenantParam) o; + return Objects.equals(this.allowedIps, updateTenantParam.allowedIps) && + Objects.equals(this.routing, updateTenantParam.routing); + } + + @Override + public int hashCode() { + return Objects.hash(allowedIps, routing); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateTenantParam {\n"); + sb.append(" allowedIps: ").append(toIndentedString(allowedIps)).append("\n"); + sb.append(" routing: ").append(toIndentedString(routing)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("allowed_ips"); + openapiFields.add("routing"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateTenantParam + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateTenantParam.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateTenantParam is not found in the empty JSON string", UpdateTenantParam.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateTenantParam.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateTenantParam` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("allowed_ips") != null && !jsonObj.get("allowed_ips").isJsonNull() && !jsonObj.get("allowed_ips").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `allowed_ips` to be an array in the JSON string but got `%s`", jsonObj.get("allowed_ips").toString())); + } + // validate the optional field `routing` + if (jsonObj.get("routing") != null && !jsonObj.get("routing").isJsonNull()) { + TenantRouting.validateJsonElement(jsonObj.get("routing")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateTenantParam.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateTenantParam' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateTenantParam.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateTenantParam value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateTenantParam read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateTenantParam given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateTenantParam + * @throws IOException if the JSON string is invalid with respect to UpdateTenantParam + */ + public static UpdateTenantParam fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateTenantParam.class); + } + + /** + * Convert an instance of UpdateTenantParam to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/saasus/sdk/apilog/ApiException.java b/src/main/java/saasus/sdk/apilog/ApiException.java index 56d99e14..c00621e7 100644 --- a/src/main/java/saasus/sdk/apilog/ApiException.java +++ b/src/main/java/saasus/sdk/apilog/ApiException.java @@ -21,7 +21,7 @@ *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:40.405574501Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:00.704121638Z[Etc/UTC]") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; diff --git a/src/main/java/saasus/sdk/apilog/Configuration.java b/src/main/java/saasus/sdk/apilog/Configuration.java index d01fb3e0..5509c70d 100644 --- a/src/main/java/saasus/sdk/apilog/Configuration.java +++ b/src/main/java/saasus/sdk/apilog/Configuration.java @@ -13,7 +13,7 @@ package saasus.sdk.apilog; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:40.405574501Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:00.704121638Z[Etc/UTC]") public class Configuration { public static final String VERSION = "1.0.0"; diff --git a/src/main/java/saasus/sdk/apilog/Pair.java b/src/main/java/saasus/sdk/apilog/Pair.java index d7f922bf..05ea14b2 100644 --- a/src/main/java/saasus/sdk/apilog/Pair.java +++ b/src/main/java/saasus/sdk/apilog/Pair.java @@ -13,7 +13,7 @@ package saasus.sdk.apilog; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:40.405574501Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:00.704121638Z[Etc/UTC]") public class Pair { private String name = ""; private String value = ""; diff --git a/src/main/java/saasus/sdk/apilog/StringUtil.java b/src/main/java/saasus/sdk/apilog/StringUtil.java index ed14f572..4028f15a 100644 --- a/src/main/java/saasus/sdk/apilog/StringUtil.java +++ b/src/main/java/saasus/sdk/apilog/StringUtil.java @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:40.405574501Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:00.704121638Z[Etc/UTC]") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/saasus/sdk/apilog/auth/ApiKeyAuth.java b/src/main/java/saasus/sdk/apilog/auth/ApiKeyAuth.java index 8271eba1..f2285fde 100644 --- a/src/main/java/saasus/sdk/apilog/auth/ApiKeyAuth.java +++ b/src/main/java/saasus/sdk/apilog/auth/ApiKeyAuth.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:40.405574501Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:00.704121638Z[Etc/UTC]") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/saasus/sdk/apilog/auth/HttpBearerAuth.java b/src/main/java/saasus/sdk/apilog/auth/HttpBearerAuth.java index daa36959..d6f24a86 100644 --- a/src/main/java/saasus/sdk/apilog/auth/HttpBearerAuth.java +++ b/src/main/java/saasus/sdk/apilog/auth/HttpBearerAuth.java @@ -22,7 +22,7 @@ import java.util.Optional; import java.util.function.Supplier; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:40.405574501Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:00.704121638Z[Etc/UTC]") public class HttpBearerAuth implements Authentication { private final String scheme; private Supplier tokenSupplier; diff --git a/src/main/java/saasus/sdk/apilog/models/AbstractOpenApiSchema.java b/src/main/java/saasus/sdk/apilog/models/AbstractOpenApiSchema.java index 8a01401b..5e35a947 100644 --- a/src/main/java/saasus/sdk/apilog/models/AbstractOpenApiSchema.java +++ b/src/main/java/saasus/sdk/apilog/models/AbstractOpenApiSchema.java @@ -21,7 +21,7 @@ /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:40.405574501Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:00.704121638Z[Etc/UTC]") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/src/main/java/saasus/sdk/apilog/models/ApiLog.java b/src/main/java/saasus/sdk/apilog/models/ApiLog.java index 9464bd23..b63137a4 100644 --- a/src/main/java/saasus/sdk/apilog/models/ApiLog.java +++ b/src/main/java/saasus/sdk/apilog/models/ApiLog.java @@ -49,7 +49,7 @@ /** * ApiLog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:40.405574501Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:00.704121638Z[Etc/UTC]") public class ApiLog { public static final String SERIALIZED_NAME_TRACE_ID = "trace_id"; @SerializedName(SERIALIZED_NAME_TRACE_ID) diff --git a/src/main/java/saasus/sdk/apilog/models/ApiLogs.java b/src/main/java/saasus/sdk/apilog/models/ApiLogs.java index f6c31734..6f8c7d85 100644 --- a/src/main/java/saasus/sdk/apilog/models/ApiLogs.java +++ b/src/main/java/saasus/sdk/apilog/models/ApiLogs.java @@ -52,7 +52,7 @@ /** * ApiLogs */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:40.405574501Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:00.704121638Z[Etc/UTC]") public class ApiLogs { public static final String SERIALIZED_NAME_API_LOGS = "api_logs"; @SerializedName(SERIALIZED_NAME_API_LOGS) diff --git a/src/main/java/saasus/sdk/apilog/models/Error.java b/src/main/java/saasus/sdk/apilog/models/Error.java index f1a63a25..214a8bb3 100644 --- a/src/main/java/saasus/sdk/apilog/models/Error.java +++ b/src/main/java/saasus/sdk/apilog/models/Error.java @@ -49,7 +49,7 @@ /** * Error */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:40.405574501Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:00.704121638Z[Etc/UTC]") public class Error { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/src/main/java/saasus/sdk/auth/ApiException.java b/src/main/java/saasus/sdk/auth/ApiException.java index ca3528f3..a946d8c7 100644 --- a/src/main/java/saasus/sdk/auth/ApiException.java +++ b/src/main/java/saasus/sdk/auth/ApiException.java @@ -21,7 +21,7 @@ *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; diff --git a/src/main/java/saasus/sdk/auth/Configuration.java b/src/main/java/saasus/sdk/auth/Configuration.java index 81cc9f07..4af3add3 100644 --- a/src/main/java/saasus/sdk/auth/Configuration.java +++ b/src/main/java/saasus/sdk/auth/Configuration.java @@ -13,7 +13,7 @@ package saasus.sdk.auth; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class Configuration { public static final String VERSION = "1.0.0"; diff --git a/src/main/java/saasus/sdk/auth/Pair.java b/src/main/java/saasus/sdk/auth/Pair.java index 743623a7..0a49d601 100644 --- a/src/main/java/saasus/sdk/auth/Pair.java +++ b/src/main/java/saasus/sdk/auth/Pair.java @@ -13,7 +13,7 @@ package saasus.sdk.auth; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class Pair { private String name = ""; private String value = ""; diff --git a/src/main/java/saasus/sdk/auth/StringUtil.java b/src/main/java/saasus/sdk/auth/StringUtil.java index 588dcc42..b248d6f8 100644 --- a/src/main/java/saasus/sdk/auth/StringUtil.java +++ b/src/main/java/saasus/sdk/auth/StringUtil.java @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/saasus/sdk/auth/api/SaasUserApi.java b/src/main/java/saasus/sdk/auth/api/SaasUserApi.java index c4df417c..87c2225b 100644 --- a/src/main/java/saasus/sdk/auth/api/SaasUserApi.java +++ b/src/main/java/saasus/sdk/auth/api/SaasUserApi.java @@ -531,7 +531,7 @@ private okhttp3.Call createSaasUserValidateBeforeCall(CreateSaasUserParam create /** * Create SaaS User - * Create SaaS User. + * Create SaaS User. If attributes is empty, a temporary password will be sent to the registered email. * @param createSaasUserParam (optional) * @return SaasUser * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -550,7 +550,7 @@ public SaasUser createSaasUser(CreateSaasUserParam createSaasUserParam) throws A /** * Create SaaS User - * Create SaaS User. + * Create SaaS User. If attributes is empty, a temporary password will be sent to the registered email. * @param createSaasUserParam (optional) * @return ApiResponse<SaasUser> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -570,7 +570,7 @@ public ApiResponse createSaasUserWithHttpInfo(CreateSaasUserParam crea /** * Create SaaS User (asynchronously) - * Create SaaS User. + * Create SaaS User. If attributes is empty, a temporary password will be sent to the registered email. * @param createSaasUserParam (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call diff --git a/src/main/java/saasus/sdk/auth/auth/ApiKeyAuth.java b/src/main/java/saasus/sdk/auth/auth/ApiKeyAuth.java index 08581d06..64806e64 100644 --- a/src/main/java/saasus/sdk/auth/auth/ApiKeyAuth.java +++ b/src/main/java/saasus/sdk/auth/auth/ApiKeyAuth.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/saasus/sdk/auth/auth/HttpBearerAuth.java b/src/main/java/saasus/sdk/auth/auth/HttpBearerAuth.java index 7c72344f..be7c42fa 100644 --- a/src/main/java/saasus/sdk/auth/auth/HttpBearerAuth.java +++ b/src/main/java/saasus/sdk/auth/auth/HttpBearerAuth.java @@ -22,7 +22,7 @@ import java.util.Optional; import java.util.function.Supplier; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class HttpBearerAuth implements Authentication { private final String scheme; private Supplier tokenSupplier; diff --git a/src/main/java/saasus/sdk/auth/models/AbstractOpenApiSchema.java b/src/main/java/saasus/sdk/auth/models/AbstractOpenApiSchema.java index c210edbf..c886ed92 100644 --- a/src/main/java/saasus/sdk/auth/models/AbstractOpenApiSchema.java +++ b/src/main/java/saasus/sdk/auth/models/AbstractOpenApiSchema.java @@ -21,7 +21,7 @@ /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/src/main/java/saasus/sdk/auth/models/AccountVerification.java b/src/main/java/saasus/sdk/auth/models/AccountVerification.java index d7f49785..f94917f5 100644 --- a/src/main/java/saasus/sdk/auth/models/AccountVerification.java +++ b/src/main/java/saasus/sdk/auth/models/AccountVerification.java @@ -49,7 +49,7 @@ /** * Account authentication settings ※ This function is not yet provided, so it cannot be changed or saved. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class AccountVerification { /** * code: verification code link: verification link ※ This function is not yet provided, so it cannot be changed or saved. diff --git a/src/main/java/saasus/sdk/auth/models/ApiKeys.java b/src/main/java/saasus/sdk/auth/models/ApiKeys.java index ed3efc79..b53bccaa 100644 --- a/src/main/java/saasus/sdk/auth/models/ApiKeys.java +++ b/src/main/java/saasus/sdk/auth/models/ApiKeys.java @@ -51,7 +51,7 @@ /** * ApiKeys */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class ApiKeys { public static final String SERIALIZED_NAME_API_KEYS = "api_keys"; @SerializedName(SERIALIZED_NAME_API_KEYS) diff --git a/src/main/java/saasus/sdk/auth/models/Attribute.java b/src/main/java/saasus/sdk/auth/models/Attribute.java index 718bf846..868a7735 100644 --- a/src/main/java/saasus/sdk/auth/models/Attribute.java +++ b/src/main/java/saasus/sdk/auth/models/Attribute.java @@ -50,7 +50,7 @@ /** * Attribute */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class Attribute { public static final String SERIALIZED_NAME_ATTRIBUTE_NAME = "attribute_name"; @SerializedName(SERIALIZED_NAME_ATTRIBUTE_NAME) diff --git a/src/main/java/saasus/sdk/auth/models/AuthInfo.java b/src/main/java/saasus/sdk/auth/models/AuthInfo.java index e8be2e1d..e2bdf67a 100644 --- a/src/main/java/saasus/sdk/auth/models/AuthInfo.java +++ b/src/main/java/saasus/sdk/auth/models/AuthInfo.java @@ -49,7 +49,7 @@ /** * AuthInfo */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class AuthInfo { public static final String SERIALIZED_NAME_CALLBACK_URL = "callback_url"; @SerializedName(SERIALIZED_NAME_CALLBACK_URL) diff --git a/src/main/java/saasus/sdk/auth/models/AuthorizationTempCode.java b/src/main/java/saasus/sdk/auth/models/AuthorizationTempCode.java index 264a6d47..74e60544 100644 --- a/src/main/java/saasus/sdk/auth/models/AuthorizationTempCode.java +++ b/src/main/java/saasus/sdk/auth/models/AuthorizationTempCode.java @@ -49,7 +49,7 @@ /** * AuthorizationTempCode */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class AuthorizationTempCode { public static final String SERIALIZED_NAME_CODE = "code"; @SerializedName(SERIALIZED_NAME_CODE) diff --git a/src/main/java/saasus/sdk/auth/models/BasicInfo.java b/src/main/java/saasus/sdk/auth/models/BasicInfo.java index 53d449d8..6a4ef4d9 100644 --- a/src/main/java/saasus/sdk/auth/models/BasicInfo.java +++ b/src/main/java/saasus/sdk/auth/models/BasicInfo.java @@ -52,7 +52,7 @@ /** * BasicInfo */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class BasicInfo { public static final String SERIALIZED_NAME_DOMAIN_NAME = "domain_name"; @SerializedName(SERIALIZED_NAME_DOMAIN_NAME) diff --git a/src/main/java/saasus/sdk/auth/models/BillingAddress.java b/src/main/java/saasus/sdk/auth/models/BillingAddress.java index f483146b..38f89926 100644 --- a/src/main/java/saasus/sdk/auth/models/BillingAddress.java +++ b/src/main/java/saasus/sdk/auth/models/BillingAddress.java @@ -49,7 +49,7 @@ /** * BillingAddress */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class BillingAddress { public static final String SERIALIZED_NAME_STREET = "street"; @SerializedName(SERIALIZED_NAME_STREET) diff --git a/src/main/java/saasus/sdk/auth/models/BillingInfo.java b/src/main/java/saasus/sdk/auth/models/BillingInfo.java index 92ebc622..392c8dea 100644 --- a/src/main/java/saasus/sdk/auth/models/BillingInfo.java +++ b/src/main/java/saasus/sdk/auth/models/BillingInfo.java @@ -51,7 +51,7 @@ /** * BillingInfo */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class BillingInfo { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/saasus/sdk/auth/models/ClientSecret.java b/src/main/java/saasus/sdk/auth/models/ClientSecret.java index d8ba0b18..b98a45a2 100644 --- a/src/main/java/saasus/sdk/auth/models/ClientSecret.java +++ b/src/main/java/saasus/sdk/auth/models/ClientSecret.java @@ -49,7 +49,7 @@ /** * ClientSecret */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class ClientSecret { public static final String SERIALIZED_NAME_CLIENT_SECRET = "client_secret"; @SerializedName(SERIALIZED_NAME_CLIENT_SECRET) diff --git a/src/main/java/saasus/sdk/auth/models/CloudFormationLaunchStackLink.java b/src/main/java/saasus/sdk/auth/models/CloudFormationLaunchStackLink.java index 641c1556..194c7dd0 100644 --- a/src/main/java/saasus/sdk/auth/models/CloudFormationLaunchStackLink.java +++ b/src/main/java/saasus/sdk/auth/models/CloudFormationLaunchStackLink.java @@ -49,7 +49,7 @@ /** * CloudFormationLaunchStackLink */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class CloudFormationLaunchStackLink { public static final String SERIALIZED_NAME_LINK = "link"; @SerializedName(SERIALIZED_NAME_LINK) diff --git a/src/main/java/saasus/sdk/auth/models/ConfirmEmailUpdateParam.java b/src/main/java/saasus/sdk/auth/models/ConfirmEmailUpdateParam.java index 729c7720..6abfb0f2 100644 --- a/src/main/java/saasus/sdk/auth/models/ConfirmEmailUpdateParam.java +++ b/src/main/java/saasus/sdk/auth/models/ConfirmEmailUpdateParam.java @@ -49,7 +49,7 @@ /** * ConfirmEmailUpdateParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class ConfirmEmailUpdateParam { public static final String SERIALIZED_NAME_CODE = "code"; @SerializedName(SERIALIZED_NAME_CODE) diff --git a/src/main/java/saasus/sdk/auth/models/ConfirmExternalUserLinkParam.java b/src/main/java/saasus/sdk/auth/models/ConfirmExternalUserLinkParam.java index 97002a50..9f9c47ab 100644 --- a/src/main/java/saasus/sdk/auth/models/ConfirmExternalUserLinkParam.java +++ b/src/main/java/saasus/sdk/auth/models/ConfirmExternalUserLinkParam.java @@ -49,7 +49,7 @@ /** * ConfirmExternalUserLinkParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class ConfirmExternalUserLinkParam { public static final String SERIALIZED_NAME_ACCESS_TOKEN = "access_token"; @SerializedName(SERIALIZED_NAME_ACCESS_TOKEN) diff --git a/src/main/java/saasus/sdk/auth/models/ConfirmSignUpWithAwsMarketplaceParam.java b/src/main/java/saasus/sdk/auth/models/ConfirmSignUpWithAwsMarketplaceParam.java index a73de51d..c448a8b9 100644 --- a/src/main/java/saasus/sdk/auth/models/ConfirmSignUpWithAwsMarketplaceParam.java +++ b/src/main/java/saasus/sdk/auth/models/ConfirmSignUpWithAwsMarketplaceParam.java @@ -49,7 +49,7 @@ /** * ConfirmSignUpWithAwsMarketplaceParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class ConfirmSignUpWithAwsMarketplaceParam { public static final String SERIALIZED_NAME_TENANT_NAME = "tenant_name"; @SerializedName(SERIALIZED_NAME_TENANT_NAME) diff --git a/src/main/java/saasus/sdk/auth/models/CreateSaasUserParam.java b/src/main/java/saasus/sdk/auth/models/CreateSaasUserParam.java index e45ff43c..3aad1854 100644 --- a/src/main/java/saasus/sdk/auth/models/CreateSaasUserParam.java +++ b/src/main/java/saasus/sdk/auth/models/CreateSaasUserParam.java @@ -49,7 +49,7 @@ /** * CreateSaasUserParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class CreateSaasUserParam { public static final String SERIALIZED_NAME_EMAIL = "email"; @SerializedName(SERIALIZED_NAME_EMAIL) @@ -90,7 +90,7 @@ public CreateSaasUserParam password(String password) { * Password * @return password **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getPassword() { return password; } @@ -153,7 +153,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("email"); - openapiRequiredFields.add("password"); } /** @@ -187,7 +186,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("email").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); } - if (!jsonObj.get("password").isJsonPrimitive()) { + if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); } } diff --git a/src/main/java/saasus/sdk/auth/models/CreateSecretCodeParam.java b/src/main/java/saasus/sdk/auth/models/CreateSecretCodeParam.java index b4efeab4..d008eb5c 100644 --- a/src/main/java/saasus/sdk/auth/models/CreateSecretCodeParam.java +++ b/src/main/java/saasus/sdk/auth/models/CreateSecretCodeParam.java @@ -49,7 +49,7 @@ /** * CreateSecretCodeParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class CreateSecretCodeParam { public static final String SERIALIZED_NAME_ACCESS_TOKEN = "access_token"; @SerializedName(SERIALIZED_NAME_ACCESS_TOKEN) diff --git a/src/main/java/saasus/sdk/auth/models/CreateTenantInvitationParam.java b/src/main/java/saasus/sdk/auth/models/CreateTenantInvitationParam.java index d20b0741..b6544023 100644 --- a/src/main/java/saasus/sdk/auth/models/CreateTenantInvitationParam.java +++ b/src/main/java/saasus/sdk/auth/models/CreateTenantInvitationParam.java @@ -52,7 +52,7 @@ /** * CreateTenantInvitationParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class CreateTenantInvitationParam { public static final String SERIALIZED_NAME_EMAIL = "email"; @SerializedName(SERIALIZED_NAME_EMAIL) diff --git a/src/main/java/saasus/sdk/auth/models/CreateTenantUserParam.java b/src/main/java/saasus/sdk/auth/models/CreateTenantUserParam.java index bf7ff620..8784cdd5 100644 --- a/src/main/java/saasus/sdk/auth/models/CreateTenantUserParam.java +++ b/src/main/java/saasus/sdk/auth/models/CreateTenantUserParam.java @@ -51,7 +51,7 @@ /** * CreateTenantUserParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class CreateTenantUserParam { public static final String SERIALIZED_NAME_EMAIL = "email"; @SerializedName(SERIALIZED_NAME_EMAIL) diff --git a/src/main/java/saasus/sdk/auth/models/CreateTenantUserRolesParam.java b/src/main/java/saasus/sdk/auth/models/CreateTenantUserRolesParam.java index 81f263ee..d3435c29 100644 --- a/src/main/java/saasus/sdk/auth/models/CreateTenantUserRolesParam.java +++ b/src/main/java/saasus/sdk/auth/models/CreateTenantUserRolesParam.java @@ -51,7 +51,7 @@ /** * CreateTenantUserRolesParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class CreateTenantUserRolesParam { public static final String SERIALIZED_NAME_ROLE_NAMES = "role_names"; @SerializedName(SERIALIZED_NAME_ROLE_NAMES) diff --git a/src/main/java/saasus/sdk/auth/models/Credentials.java b/src/main/java/saasus/sdk/auth/models/Credentials.java index 3a5a8144..55a0624a 100644 --- a/src/main/java/saasus/sdk/auth/models/Credentials.java +++ b/src/main/java/saasus/sdk/auth/models/Credentials.java @@ -49,7 +49,7 @@ /** * Credentials */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class Credentials { public static final String SERIALIZED_NAME_ID_TOKEN = "id_token"; @SerializedName(SERIALIZED_NAME_ID_TOKEN) diff --git a/src/main/java/saasus/sdk/auth/models/CustomizePageProps.java b/src/main/java/saasus/sdk/auth/models/CustomizePageProps.java index fee6b0ea..e32fb490 100644 --- a/src/main/java/saasus/sdk/auth/models/CustomizePageProps.java +++ b/src/main/java/saasus/sdk/auth/models/CustomizePageProps.java @@ -49,7 +49,7 @@ /** * CustomizePageProps */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class CustomizePageProps { public static final String SERIALIZED_NAME_HTML_CONTENTS = "html_contents"; @SerializedName(SERIALIZED_NAME_HTML_CONTENTS) diff --git a/src/main/java/saasus/sdk/auth/models/CustomizePageSettings.java b/src/main/java/saasus/sdk/auth/models/CustomizePageSettings.java index df3d0bd5..136f7b68 100644 --- a/src/main/java/saasus/sdk/auth/models/CustomizePageSettings.java +++ b/src/main/java/saasus/sdk/auth/models/CustomizePageSettings.java @@ -49,7 +49,7 @@ /** * CustomizePageSettings */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class CustomizePageSettings { public static final String SERIALIZED_NAME_TITLE = "title"; @SerializedName(SERIALIZED_NAME_TITLE) diff --git a/src/main/java/saasus/sdk/auth/models/CustomizePageSettingsProps.java b/src/main/java/saasus/sdk/auth/models/CustomizePageSettingsProps.java index 46f36acd..633a5b26 100644 --- a/src/main/java/saasus/sdk/auth/models/CustomizePageSettingsProps.java +++ b/src/main/java/saasus/sdk/auth/models/CustomizePageSettingsProps.java @@ -49,7 +49,7 @@ /** * CustomizePageSettingsProps */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class CustomizePageSettingsProps { public static final String SERIALIZED_NAME_TITLE = "title"; @SerializedName(SERIALIZED_NAME_TITLE) diff --git a/src/main/java/saasus/sdk/auth/models/CustomizePages.java b/src/main/java/saasus/sdk/auth/models/CustomizePages.java index 3f15fc09..9526ae15 100644 --- a/src/main/java/saasus/sdk/auth/models/CustomizePages.java +++ b/src/main/java/saasus/sdk/auth/models/CustomizePages.java @@ -50,7 +50,7 @@ /** * CustomizePages */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class CustomizePages { public static final String SERIALIZED_NAME_SIGN_UP_PAGE = "sign_up_page"; @SerializedName(SERIALIZED_NAME_SIGN_UP_PAGE) diff --git a/src/main/java/saasus/sdk/auth/models/DeviceConfiguration.java b/src/main/java/saasus/sdk/auth/models/DeviceConfiguration.java index 2bc4b007..50621fe6 100644 --- a/src/main/java/saasus/sdk/auth/models/DeviceConfiguration.java +++ b/src/main/java/saasus/sdk/auth/models/DeviceConfiguration.java @@ -49,7 +49,7 @@ /** * Settings for remembering trusted devices */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class DeviceConfiguration { /** * always: always remember userOptIn: user opt-in no: don't save diff --git a/src/main/java/saasus/sdk/auth/models/DnsRecord.java b/src/main/java/saasus/sdk/auth/models/DnsRecord.java index 15600cc9..25819c47 100644 --- a/src/main/java/saasus/sdk/auth/models/DnsRecord.java +++ b/src/main/java/saasus/sdk/auth/models/DnsRecord.java @@ -49,7 +49,7 @@ /** * DnsRecord */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class DnsRecord { /** * CNAME Resource Record diff --git a/src/main/java/saasus/sdk/auth/models/Env.java b/src/main/java/saasus/sdk/auth/models/Env.java index 67e28e7f..7b16c4d9 100644 --- a/src/main/java/saasus/sdk/auth/models/Env.java +++ b/src/main/java/saasus/sdk/auth/models/Env.java @@ -49,7 +49,7 @@ /** * env info */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class Env { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/saasus/sdk/auth/models/Envs.java b/src/main/java/saasus/sdk/auth/models/Envs.java index c5b874a9..14563230 100644 --- a/src/main/java/saasus/sdk/auth/models/Envs.java +++ b/src/main/java/saasus/sdk/auth/models/Envs.java @@ -52,7 +52,7 @@ /** * env list */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class Envs { public static final String SERIALIZED_NAME_ENVS = "envs"; @SerializedName(SERIALIZED_NAME_ENVS) diff --git a/src/main/java/saasus/sdk/auth/models/Error.java b/src/main/java/saasus/sdk/auth/models/Error.java index 397f988b..5ed473dd 100644 --- a/src/main/java/saasus/sdk/auth/models/Error.java +++ b/src/main/java/saasus/sdk/auth/models/Error.java @@ -51,7 +51,7 @@ /** * Error */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class Error { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/src/main/java/saasus/sdk/auth/models/IdentityProviderConfiguration.java b/src/main/java/saasus/sdk/auth/models/IdentityProviderConfiguration.java index ad78531f..61ff23b4 100644 --- a/src/main/java/saasus/sdk/auth/models/IdentityProviderConfiguration.java +++ b/src/main/java/saasus/sdk/auth/models/IdentityProviderConfiguration.java @@ -49,7 +49,7 @@ /** * This information is required to set up sign-in using an external identity provider. It cannot be changed. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class IdentityProviderConfiguration { public static final String SERIALIZED_NAME_DOMAIN = "domain"; @SerializedName(SERIALIZED_NAME_DOMAIN) diff --git a/src/main/java/saasus/sdk/auth/models/IdentityProviderProps.java b/src/main/java/saasus/sdk/auth/models/IdentityProviderProps.java index 8ccb7918..20ccbf90 100644 --- a/src/main/java/saasus/sdk/auth/models/IdentityProviderProps.java +++ b/src/main/java/saasus/sdk/auth/models/IdentityProviderProps.java @@ -49,7 +49,7 @@ /** * IdentityProviderProps */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class IdentityProviderProps { public static final String SERIALIZED_NAME_APPLICATION_ID = "application_id"; @SerializedName(SERIALIZED_NAME_APPLICATION_ID) diff --git a/src/main/java/saasus/sdk/auth/models/IdentityProviderSaml.java b/src/main/java/saasus/sdk/auth/models/IdentityProviderSaml.java index 74df485a..81e8bf1b 100644 --- a/src/main/java/saasus/sdk/auth/models/IdentityProviderSaml.java +++ b/src/main/java/saasus/sdk/auth/models/IdentityProviderSaml.java @@ -49,7 +49,7 @@ /** * IdentityProviderSaml */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class IdentityProviderSaml { public static final String SERIALIZED_NAME_METADATA_URL = "metadata_url"; @SerializedName(SERIALIZED_NAME_METADATA_URL) diff --git a/src/main/java/saasus/sdk/auth/models/IdentityProviders.java b/src/main/java/saasus/sdk/auth/models/IdentityProviders.java index 4f252b16..4f00afd7 100644 --- a/src/main/java/saasus/sdk/auth/models/IdentityProviders.java +++ b/src/main/java/saasus/sdk/auth/models/IdentityProviders.java @@ -50,7 +50,7 @@ /** * IdentityProviders */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class IdentityProviders { public static final String SERIALIZED_NAME_GOOGLE = "google"; @SerializedName(SERIALIZED_NAME_GOOGLE) diff --git a/src/main/java/saasus/sdk/auth/models/Invitation.java b/src/main/java/saasus/sdk/auth/models/Invitation.java index 705e1d2b..cbbdacb6 100644 --- a/src/main/java/saasus/sdk/auth/models/Invitation.java +++ b/src/main/java/saasus/sdk/auth/models/Invitation.java @@ -53,7 +53,7 @@ /** * Invitation */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class Invitation { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/saasus/sdk/auth/models/InvitationValidity.java b/src/main/java/saasus/sdk/auth/models/InvitationValidity.java index abb0af21..3851d450 100644 --- a/src/main/java/saasus/sdk/auth/models/InvitationValidity.java +++ b/src/main/java/saasus/sdk/auth/models/InvitationValidity.java @@ -49,7 +49,7 @@ /** * Invitation validity */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class InvitationValidity { public static final String SERIALIZED_NAME_IS_VALID = "is_valid"; @SerializedName(SERIALIZED_NAME_IS_VALID) diff --git a/src/main/java/saasus/sdk/auth/models/Invitations.java b/src/main/java/saasus/sdk/auth/models/Invitations.java index bc012d82..14ad4b30 100644 --- a/src/main/java/saasus/sdk/auth/models/Invitations.java +++ b/src/main/java/saasus/sdk/auth/models/Invitations.java @@ -52,7 +52,7 @@ /** * Invitations */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class Invitations { public static final String SERIALIZED_NAME_INVITATIONS = "invitations"; @SerializedName(SERIALIZED_NAME_INVITATIONS) diff --git a/src/main/java/saasus/sdk/auth/models/InvitedUserEnvironmentInformationInner.java b/src/main/java/saasus/sdk/auth/models/InvitedUserEnvironmentInformationInner.java index 6db7c51d..3e405138 100644 --- a/src/main/java/saasus/sdk/auth/models/InvitedUserEnvironmentInformationInner.java +++ b/src/main/java/saasus/sdk/auth/models/InvitedUserEnvironmentInformationInner.java @@ -51,7 +51,7 @@ /** * InvitedUserEnvironmentInformationInner */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class InvitedUserEnvironmentInformationInner { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/saasus/sdk/auth/models/LinkAwsMarketplaceParam.java b/src/main/java/saasus/sdk/auth/models/LinkAwsMarketplaceParam.java index e31af93b..1b08bc79 100644 --- a/src/main/java/saasus/sdk/auth/models/LinkAwsMarketplaceParam.java +++ b/src/main/java/saasus/sdk/auth/models/LinkAwsMarketplaceParam.java @@ -49,7 +49,7 @@ /** * LinkAwsMarketplaceParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class LinkAwsMarketplaceParam { public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; @SerializedName(SERIALIZED_NAME_TENANT_ID) diff --git a/src/main/java/saasus/sdk/auth/models/MessageTemplate.java b/src/main/java/saasus/sdk/auth/models/MessageTemplate.java index 3f5967b9..49d8995a 100644 --- a/src/main/java/saasus/sdk/auth/models/MessageTemplate.java +++ b/src/main/java/saasus/sdk/auth/models/MessageTemplate.java @@ -49,7 +49,7 @@ /** * MessageTemplate */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class MessageTemplate { public static final String SERIALIZED_NAME_SUBJECT = "subject"; @SerializedName(SERIALIZED_NAME_SUBJECT) diff --git a/src/main/java/saasus/sdk/auth/models/MfaConfiguration.java b/src/main/java/saasus/sdk/auth/models/MfaConfiguration.java index 90f1ff2d..d25fbaf4 100644 --- a/src/main/java/saasus/sdk/auth/models/MfaConfiguration.java +++ b/src/main/java/saasus/sdk/auth/models/MfaConfiguration.java @@ -49,7 +49,7 @@ /** * MFA device authentication settings ※ This function is not yet provided, so it cannot be changed or saved. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class MfaConfiguration { /** * on: apply when all users log in optional: apply to individual users with MFA factor enabled ※ The parameter is currently optional and fixed. diff --git a/src/main/java/saasus/sdk/auth/models/MfaPreference.java b/src/main/java/saasus/sdk/auth/models/MfaPreference.java index 78ed0fbb..572ac696 100644 --- a/src/main/java/saasus/sdk/auth/models/MfaPreference.java +++ b/src/main/java/saasus/sdk/auth/models/MfaPreference.java @@ -49,7 +49,7 @@ /** * MfaPreference */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class MfaPreference { public static final String SERIALIZED_NAME_ENABLED = "enabled"; @SerializedName(SERIALIZED_NAME_ENABLED) diff --git a/src/main/java/saasus/sdk/auth/models/NotificationMessages.java b/src/main/java/saasus/sdk/auth/models/NotificationMessages.java index bd3644d0..7c255f10 100644 --- a/src/main/java/saasus/sdk/auth/models/NotificationMessages.java +++ b/src/main/java/saasus/sdk/auth/models/NotificationMessages.java @@ -50,7 +50,7 @@ /** * NotificationMessages */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class NotificationMessages { public static final String SERIALIZED_NAME_SIGN_UP = "sign_up"; @SerializedName(SERIALIZED_NAME_SIGN_UP) diff --git a/src/main/java/saasus/sdk/auth/models/PasswordPolicy.java b/src/main/java/saasus/sdk/auth/models/PasswordPolicy.java index 326f054f..47eae813 100644 --- a/src/main/java/saasus/sdk/auth/models/PasswordPolicy.java +++ b/src/main/java/saasus/sdk/auth/models/PasswordPolicy.java @@ -49,7 +49,7 @@ /** * Password Policy */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class PasswordPolicy { public static final String SERIALIZED_NAME_MINIMUM_LENGTH = "minimum_length"; @SerializedName(SERIALIZED_NAME_MINIMUM_LENGTH) diff --git a/src/main/java/saasus/sdk/auth/models/PlanHistories.java b/src/main/java/saasus/sdk/auth/models/PlanHistories.java index 70d82aca..266e976b 100644 --- a/src/main/java/saasus/sdk/auth/models/PlanHistories.java +++ b/src/main/java/saasus/sdk/auth/models/PlanHistories.java @@ -52,7 +52,7 @@ /** * PlanHistories */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class PlanHistories { public static final String SERIALIZED_NAME_PLAN_HISTORIES = "plan_histories"; @SerializedName(SERIALIZED_NAME_PLAN_HISTORIES) diff --git a/src/main/java/saasus/sdk/auth/models/PlanHistory.java b/src/main/java/saasus/sdk/auth/models/PlanHistory.java index 9c97b16b..ef6c4395 100644 --- a/src/main/java/saasus/sdk/auth/models/PlanHistory.java +++ b/src/main/java/saasus/sdk/auth/models/PlanHistory.java @@ -50,7 +50,7 @@ /** * PlanHistory */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class PlanHistory { public static final String SERIALIZED_NAME_PLAN_ID = "plan_id"; @SerializedName(SERIALIZED_NAME_PLAN_ID) diff --git a/src/main/java/saasus/sdk/auth/models/PlanReservation.java b/src/main/java/saasus/sdk/auth/models/PlanReservation.java index f80e2bd5..77c92f88 100644 --- a/src/main/java/saasus/sdk/auth/models/PlanReservation.java +++ b/src/main/java/saasus/sdk/auth/models/PlanReservation.java @@ -50,7 +50,7 @@ /** * PlanReservation */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class PlanReservation { public static final String SERIALIZED_NAME_NEXT_PLAN_ID = "next_plan_id"; @SerializedName(SERIALIZED_NAME_NEXT_PLAN_ID) diff --git a/src/main/java/saasus/sdk/auth/models/RecaptchaProps.java b/src/main/java/saasus/sdk/auth/models/RecaptchaProps.java index ec8d5aa2..1cb356c6 100644 --- a/src/main/java/saasus/sdk/auth/models/RecaptchaProps.java +++ b/src/main/java/saasus/sdk/auth/models/RecaptchaProps.java @@ -49,7 +49,7 @@ /** * reCAPTCHA authentication settings ※ This function is not yet provided, so it cannot be changed or saved. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class RecaptchaProps { public static final String SERIALIZED_NAME_SITE_KEY = "site_key"; @SerializedName(SERIALIZED_NAME_SITE_KEY) diff --git a/src/main/java/saasus/sdk/auth/models/RequestEmailUpdateParam.java b/src/main/java/saasus/sdk/auth/models/RequestEmailUpdateParam.java index 10b51613..d3c54932 100644 --- a/src/main/java/saasus/sdk/auth/models/RequestEmailUpdateParam.java +++ b/src/main/java/saasus/sdk/auth/models/RequestEmailUpdateParam.java @@ -49,7 +49,7 @@ /** * RequestEmailUpdateParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class RequestEmailUpdateParam { public static final String SERIALIZED_NAME_EMAIL = "email"; @SerializedName(SERIALIZED_NAME_EMAIL) diff --git a/src/main/java/saasus/sdk/auth/models/RequestExternalUserLinkParam.java b/src/main/java/saasus/sdk/auth/models/RequestExternalUserLinkParam.java index 56775e97..a976bd7e 100644 --- a/src/main/java/saasus/sdk/auth/models/RequestExternalUserLinkParam.java +++ b/src/main/java/saasus/sdk/auth/models/RequestExternalUserLinkParam.java @@ -49,7 +49,7 @@ /** * RequestExternalUserLinkParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class RequestExternalUserLinkParam { public static final String SERIALIZED_NAME_ACCESS_TOKEN = "access_token"; @SerializedName(SERIALIZED_NAME_ACCESS_TOKEN) diff --git a/src/main/java/saasus/sdk/auth/models/ResendSignUpConfirmationEmailParam.java b/src/main/java/saasus/sdk/auth/models/ResendSignUpConfirmationEmailParam.java index 9fad3ad7..008f1d2d 100644 --- a/src/main/java/saasus/sdk/auth/models/ResendSignUpConfirmationEmailParam.java +++ b/src/main/java/saasus/sdk/auth/models/ResendSignUpConfirmationEmailParam.java @@ -49,7 +49,7 @@ /** * ResendSignUpConfirmationEmailParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class ResendSignUpConfirmationEmailParam { public static final String SERIALIZED_NAME_EMAIL = "email"; @SerializedName(SERIALIZED_NAME_EMAIL) diff --git a/src/main/java/saasus/sdk/auth/models/Role.java b/src/main/java/saasus/sdk/auth/models/Role.java index 0636e3a6..ea79a261 100644 --- a/src/main/java/saasus/sdk/auth/models/Role.java +++ b/src/main/java/saasus/sdk/auth/models/Role.java @@ -49,7 +49,7 @@ /** * role info */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class Role { public static final String SERIALIZED_NAME_ROLE_NAME = "role_name"; @SerializedName(SERIALIZED_NAME_ROLE_NAME) diff --git a/src/main/java/saasus/sdk/auth/models/Roles.java b/src/main/java/saasus/sdk/auth/models/Roles.java index 11109c99..af1c7ab7 100644 --- a/src/main/java/saasus/sdk/auth/models/Roles.java +++ b/src/main/java/saasus/sdk/auth/models/Roles.java @@ -52,7 +52,7 @@ /** * Roles */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class Roles { public static final String SERIALIZED_NAME_ROLES = "roles"; @SerializedName(SERIALIZED_NAME_ROLES) diff --git a/src/main/java/saasus/sdk/auth/models/SaasId.java b/src/main/java/saasus/sdk/auth/models/SaasId.java index 5cf8c724..802a693e 100644 --- a/src/main/java/saasus/sdk/auth/models/SaasId.java +++ b/src/main/java/saasus/sdk/auth/models/SaasId.java @@ -49,7 +49,7 @@ /** * SaasId */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class SaasId { public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; @SerializedName(SERIALIZED_NAME_TENANT_ID) diff --git a/src/main/java/saasus/sdk/auth/models/SaasUser.java b/src/main/java/saasus/sdk/auth/models/SaasUser.java index ea7273c1..821c5aac 100644 --- a/src/main/java/saasus/sdk/auth/models/SaasUser.java +++ b/src/main/java/saasus/sdk/auth/models/SaasUser.java @@ -51,7 +51,7 @@ /** * SaasUser */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class SaasUser { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/saasus/sdk/auth/models/SaasUsers.java b/src/main/java/saasus/sdk/auth/models/SaasUsers.java index 93f38f7f..3101fb93 100644 --- a/src/main/java/saasus/sdk/auth/models/SaasUsers.java +++ b/src/main/java/saasus/sdk/auth/models/SaasUsers.java @@ -52,7 +52,7 @@ /** * SaasUsers */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class SaasUsers { public static final String SERIALIZED_NAME_USERS = "users"; @SerializedName(SERIALIZED_NAME_USERS) diff --git a/src/main/java/saasus/sdk/auth/models/SelfRegist.java b/src/main/java/saasus/sdk/auth/models/SelfRegist.java index af3c9300..beb3dcd3 100644 --- a/src/main/java/saasus/sdk/auth/models/SelfRegist.java +++ b/src/main/java/saasus/sdk/auth/models/SelfRegist.java @@ -49,7 +49,7 @@ /** * self sign-up permission */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class SelfRegist { public static final String SERIALIZED_NAME_ENABLE = "enable"; @SerializedName(SERIALIZED_NAME_ENABLE) diff --git a/src/main/java/saasus/sdk/auth/models/SignInSettings.java b/src/main/java/saasus/sdk/auth/models/SignInSettings.java index ba93ba06..700ef7cb 100644 --- a/src/main/java/saasus/sdk/auth/models/SignInSettings.java +++ b/src/main/java/saasus/sdk/auth/models/SignInSettings.java @@ -56,7 +56,7 @@ /** * SignInSettings */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class SignInSettings { public static final String SERIALIZED_NAME_PASSWORD_POLICY = "password_policy"; @SerializedName(SERIALIZED_NAME_PASSWORD_POLICY) diff --git a/src/main/java/saasus/sdk/auth/models/SignUpParam.java b/src/main/java/saasus/sdk/auth/models/SignUpParam.java index a33550df..523ea52c 100644 --- a/src/main/java/saasus/sdk/auth/models/SignUpParam.java +++ b/src/main/java/saasus/sdk/auth/models/SignUpParam.java @@ -49,7 +49,7 @@ /** * SignUpParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class SignUpParam { public static final String SERIALIZED_NAME_EMAIL = "email"; @SerializedName(SERIALIZED_NAME_EMAIL) diff --git a/src/main/java/saasus/sdk/auth/models/SignUpWithAwsMarketplaceParam.java b/src/main/java/saasus/sdk/auth/models/SignUpWithAwsMarketplaceParam.java index b8a27de1..696ee7a8 100644 --- a/src/main/java/saasus/sdk/auth/models/SignUpWithAwsMarketplaceParam.java +++ b/src/main/java/saasus/sdk/auth/models/SignUpWithAwsMarketplaceParam.java @@ -49,7 +49,7 @@ /** * SignUpWithAwsMarketplaceParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class SignUpWithAwsMarketplaceParam { public static final String SERIALIZED_NAME_EMAIL = "email"; @SerializedName(SERIALIZED_NAME_EMAIL) diff --git a/src/main/java/saasus/sdk/auth/models/SingleTenantSettings.java b/src/main/java/saasus/sdk/auth/models/SingleTenantSettings.java index 593ff051..29cf3cdd 100644 --- a/src/main/java/saasus/sdk/auth/models/SingleTenantSettings.java +++ b/src/main/java/saasus/sdk/auth/models/SingleTenantSettings.java @@ -49,7 +49,7 @@ /** * SingleTenantSettings */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class SingleTenantSettings { public static final String SERIALIZED_NAME_ENABLED = "enabled"; @SerializedName(SERIALIZED_NAME_ENABLED) diff --git a/src/main/java/saasus/sdk/auth/models/SoftwareTokenSecretCode.java b/src/main/java/saasus/sdk/auth/models/SoftwareTokenSecretCode.java index 2a45af5d..05dc0e45 100644 --- a/src/main/java/saasus/sdk/auth/models/SoftwareTokenSecretCode.java +++ b/src/main/java/saasus/sdk/auth/models/SoftwareTokenSecretCode.java @@ -49,7 +49,7 @@ /** * SoftwareTokenSecretCode */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class SoftwareTokenSecretCode { public static final String SERIALIZED_NAME_SECRET_CODE = "secret_code"; @SerializedName(SERIALIZED_NAME_SECRET_CODE) diff --git a/src/main/java/saasus/sdk/auth/models/Tenant.java b/src/main/java/saasus/sdk/auth/models/Tenant.java index 34875b08..5088bbd8 100644 --- a/src/main/java/saasus/sdk/auth/models/Tenant.java +++ b/src/main/java/saasus/sdk/auth/models/Tenant.java @@ -56,7 +56,7 @@ /** * Tenant */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class Tenant { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/saasus/sdk/auth/models/TenantAttributes.java b/src/main/java/saasus/sdk/auth/models/TenantAttributes.java index 0558394f..30ce3fe1 100644 --- a/src/main/java/saasus/sdk/auth/models/TenantAttributes.java +++ b/src/main/java/saasus/sdk/auth/models/TenantAttributes.java @@ -52,7 +52,7 @@ /** * TenantAttributes */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class TenantAttributes { public static final String SERIALIZED_NAME_TENANT_ATTRIBUTES = "tenant_attributes"; @SerializedName(SERIALIZED_NAME_TENANT_ATTRIBUTES) diff --git a/src/main/java/saasus/sdk/auth/models/TenantDetail.java b/src/main/java/saasus/sdk/auth/models/TenantDetail.java index c21b7803..a0cad7be 100644 --- a/src/main/java/saasus/sdk/auth/models/TenantDetail.java +++ b/src/main/java/saasus/sdk/auth/models/TenantDetail.java @@ -56,7 +56,7 @@ /** * TenantDetail */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class TenantDetail { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/saasus/sdk/auth/models/TenantIdentityProviderProps.java b/src/main/java/saasus/sdk/auth/models/TenantIdentityProviderProps.java index 55e7c9c8..4decd135 100644 --- a/src/main/java/saasus/sdk/auth/models/TenantIdentityProviderProps.java +++ b/src/main/java/saasus/sdk/auth/models/TenantIdentityProviderProps.java @@ -58,7 +58,7 @@ import saasus.sdk.auth.JSON; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class TenantIdentityProviderProps extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(TenantIdentityProviderProps.class.getName()); diff --git a/src/main/java/saasus/sdk/auth/models/TenantIdentityProviders.java b/src/main/java/saasus/sdk/auth/models/TenantIdentityProviders.java index d35f6952..3ed3ddc4 100644 --- a/src/main/java/saasus/sdk/auth/models/TenantIdentityProviders.java +++ b/src/main/java/saasus/sdk/auth/models/TenantIdentityProviders.java @@ -50,7 +50,7 @@ /** * TenantIdentityProviders */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class TenantIdentityProviders { public static final String SERIALIZED_NAME_SAML = "saml"; @SerializedName(SERIALIZED_NAME_SAML) diff --git a/src/main/java/saasus/sdk/auth/models/TenantIdentityProvidersSaml.java b/src/main/java/saasus/sdk/auth/models/TenantIdentityProvidersSaml.java index fe6e621b..4b22de62 100644 --- a/src/main/java/saasus/sdk/auth/models/TenantIdentityProvidersSaml.java +++ b/src/main/java/saasus/sdk/auth/models/TenantIdentityProvidersSaml.java @@ -49,7 +49,7 @@ /** * TenantIdentityProvidersSaml */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class TenantIdentityProvidersSaml { public static final String SERIALIZED_NAME_METADATA_URL = "metadata_url"; @SerializedName(SERIALIZED_NAME_METADATA_URL) diff --git a/src/main/java/saasus/sdk/auth/models/TenantProps.java b/src/main/java/saasus/sdk/auth/models/TenantProps.java index 1e34fa1e..f24cc0b6 100644 --- a/src/main/java/saasus/sdk/auth/models/TenantProps.java +++ b/src/main/java/saasus/sdk/auth/models/TenantProps.java @@ -51,7 +51,7 @@ /** * TenantProps */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class TenantProps { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/saasus/sdk/auth/models/Tenants.java b/src/main/java/saasus/sdk/auth/models/Tenants.java index e12afb89..8304e558 100644 --- a/src/main/java/saasus/sdk/auth/models/Tenants.java +++ b/src/main/java/saasus/sdk/auth/models/Tenants.java @@ -52,7 +52,7 @@ /** * Tenant Info */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class Tenants { public static final String SERIALIZED_NAME_TENANTS = "tenants"; @SerializedName(SERIALIZED_NAME_TENANTS) diff --git a/src/main/java/saasus/sdk/auth/models/UpdateBasicInfoParam.java b/src/main/java/saasus/sdk/auth/models/UpdateBasicInfoParam.java index b324da40..4209404f 100644 --- a/src/main/java/saasus/sdk/auth/models/UpdateBasicInfoParam.java +++ b/src/main/java/saasus/sdk/auth/models/UpdateBasicInfoParam.java @@ -49,7 +49,7 @@ /** * UpdateBasicInfoParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class UpdateBasicInfoParam { public static final String SERIALIZED_NAME_DOMAIN_NAME = "domain_name"; @SerializedName(SERIALIZED_NAME_DOMAIN_NAME) diff --git a/src/main/java/saasus/sdk/auth/models/UpdateCustomizePageSettingsParam.java b/src/main/java/saasus/sdk/auth/models/UpdateCustomizePageSettingsParam.java index a0605538..49c31608 100644 --- a/src/main/java/saasus/sdk/auth/models/UpdateCustomizePageSettingsParam.java +++ b/src/main/java/saasus/sdk/auth/models/UpdateCustomizePageSettingsParam.java @@ -49,7 +49,7 @@ /** * UpdateCustomizePageSettingsParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class UpdateCustomizePageSettingsParam { public static final String SERIALIZED_NAME_TITLE = "title"; @SerializedName(SERIALIZED_NAME_TITLE) diff --git a/src/main/java/saasus/sdk/auth/models/UpdateCustomizePagesParam.java b/src/main/java/saasus/sdk/auth/models/UpdateCustomizePagesParam.java index 1e85986d..7bda55f0 100644 --- a/src/main/java/saasus/sdk/auth/models/UpdateCustomizePagesParam.java +++ b/src/main/java/saasus/sdk/auth/models/UpdateCustomizePagesParam.java @@ -50,7 +50,7 @@ /** * UpdateCustomizePagesParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class UpdateCustomizePagesParam { public static final String SERIALIZED_NAME_SIGN_UP_PAGE = "sign_up_page"; @SerializedName(SERIALIZED_NAME_SIGN_UP_PAGE) diff --git a/src/main/java/saasus/sdk/auth/models/UpdateEnvParam.java b/src/main/java/saasus/sdk/auth/models/UpdateEnvParam.java index bdc74d35..8cf69449 100644 --- a/src/main/java/saasus/sdk/auth/models/UpdateEnvParam.java +++ b/src/main/java/saasus/sdk/auth/models/UpdateEnvParam.java @@ -49,7 +49,7 @@ /** * UpdateEnvParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class UpdateEnvParam { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/saasus/sdk/auth/models/UpdateIdentityProviderParam.java b/src/main/java/saasus/sdk/auth/models/UpdateIdentityProviderParam.java index bb9ee2cd..f07b4862 100644 --- a/src/main/java/saasus/sdk/auth/models/UpdateIdentityProviderParam.java +++ b/src/main/java/saasus/sdk/auth/models/UpdateIdentityProviderParam.java @@ -51,7 +51,7 @@ /** * UpdateIdentityProviderParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class UpdateIdentityProviderParam { public static final String SERIALIZED_NAME_PROVIDER = "provider"; @SerializedName(SERIALIZED_NAME_PROVIDER) diff --git a/src/main/java/saasus/sdk/auth/models/UpdateNotificationMessagesParam.java b/src/main/java/saasus/sdk/auth/models/UpdateNotificationMessagesParam.java index 2cff150c..24e3bf2b 100644 --- a/src/main/java/saasus/sdk/auth/models/UpdateNotificationMessagesParam.java +++ b/src/main/java/saasus/sdk/auth/models/UpdateNotificationMessagesParam.java @@ -50,7 +50,7 @@ /** * UpdateNotificationMessagesParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class UpdateNotificationMessagesParam { public static final String SERIALIZED_NAME_SIGN_UP = "sign_up"; @SerializedName(SERIALIZED_NAME_SIGN_UP) diff --git a/src/main/java/saasus/sdk/auth/models/UpdateSaasUserAttributesParam.java b/src/main/java/saasus/sdk/auth/models/UpdateSaasUserAttributesParam.java index 7d26d3dd..7fcb83b1 100644 --- a/src/main/java/saasus/sdk/auth/models/UpdateSaasUserAttributesParam.java +++ b/src/main/java/saasus/sdk/auth/models/UpdateSaasUserAttributesParam.java @@ -51,7 +51,7 @@ /** * UpdateSaasUserAttributesParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class UpdateSaasUserAttributesParam { public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; @SerializedName(SERIALIZED_NAME_ATTRIBUTES) diff --git a/src/main/java/saasus/sdk/auth/models/UpdateSaasUserEmailParam.java b/src/main/java/saasus/sdk/auth/models/UpdateSaasUserEmailParam.java index 7a851efa..c32445f5 100644 --- a/src/main/java/saasus/sdk/auth/models/UpdateSaasUserEmailParam.java +++ b/src/main/java/saasus/sdk/auth/models/UpdateSaasUserEmailParam.java @@ -49,7 +49,7 @@ /** * UpdateSaasUserEmailParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class UpdateSaasUserEmailParam { public static final String SERIALIZED_NAME_EMAIL = "email"; @SerializedName(SERIALIZED_NAME_EMAIL) diff --git a/src/main/java/saasus/sdk/auth/models/UpdateSaasUserPasswordParam.java b/src/main/java/saasus/sdk/auth/models/UpdateSaasUserPasswordParam.java index 7280438d..274ee021 100644 --- a/src/main/java/saasus/sdk/auth/models/UpdateSaasUserPasswordParam.java +++ b/src/main/java/saasus/sdk/auth/models/UpdateSaasUserPasswordParam.java @@ -49,7 +49,7 @@ /** * UpdateSaasUserPasswordParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class UpdateSaasUserPasswordParam { public static final String SERIALIZED_NAME_PASSWORD = "password"; @SerializedName(SERIALIZED_NAME_PASSWORD) diff --git a/src/main/java/saasus/sdk/auth/models/UpdateSignInSettingsParam.java b/src/main/java/saasus/sdk/auth/models/UpdateSignInSettingsParam.java index 0fb201c2..f1f4df4b 100644 --- a/src/main/java/saasus/sdk/auth/models/UpdateSignInSettingsParam.java +++ b/src/main/java/saasus/sdk/auth/models/UpdateSignInSettingsParam.java @@ -55,7 +55,7 @@ /** * UpdateSignInSettingsParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class UpdateSignInSettingsParam { public static final String SERIALIZED_NAME_PASSWORD_POLICY = "password_policy"; @SerializedName(SERIALIZED_NAME_PASSWORD_POLICY) diff --git a/src/main/java/saasus/sdk/auth/models/UpdateSingleTenantSettingsParam.java b/src/main/java/saasus/sdk/auth/models/UpdateSingleTenantSettingsParam.java index c43df0df..e3c6541f 100644 --- a/src/main/java/saasus/sdk/auth/models/UpdateSingleTenantSettingsParam.java +++ b/src/main/java/saasus/sdk/auth/models/UpdateSingleTenantSettingsParam.java @@ -49,7 +49,7 @@ /** * UpdateSingleTenantSettingsParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class UpdateSingleTenantSettingsParam { public static final String SERIALIZED_NAME_ENABLED = "enabled"; @SerializedName(SERIALIZED_NAME_ENABLED) diff --git a/src/main/java/saasus/sdk/auth/models/UpdateSoftwareTokenParam.java b/src/main/java/saasus/sdk/auth/models/UpdateSoftwareTokenParam.java index 5f971231..c5bbff99 100644 --- a/src/main/java/saasus/sdk/auth/models/UpdateSoftwareTokenParam.java +++ b/src/main/java/saasus/sdk/auth/models/UpdateSoftwareTokenParam.java @@ -49,7 +49,7 @@ /** * UpdateSoftwareTokenParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class UpdateSoftwareTokenParam { public static final String SERIALIZED_NAME_ACCESS_TOKEN = "access_token"; @SerializedName(SERIALIZED_NAME_ACCESS_TOKEN) diff --git a/src/main/java/saasus/sdk/auth/models/UpdateTenantIdentityProviderParam.java b/src/main/java/saasus/sdk/auth/models/UpdateTenantIdentityProviderParam.java index 09923888..1559256e 100644 --- a/src/main/java/saasus/sdk/auth/models/UpdateTenantIdentityProviderParam.java +++ b/src/main/java/saasus/sdk/auth/models/UpdateTenantIdentityProviderParam.java @@ -51,7 +51,7 @@ /** * If identity_provider_props is null, the sign-in information for the external identity provider specified in provider_type is disabled. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class UpdateTenantIdentityProviderParam { public static final String SERIALIZED_NAME_PROVIDER_TYPE = "provider_type"; @SerializedName(SERIALIZED_NAME_PROVIDER_TYPE) diff --git a/src/main/java/saasus/sdk/auth/models/UpdateTenantUserParam.java b/src/main/java/saasus/sdk/auth/models/UpdateTenantUserParam.java index 29bc6c0a..743b88d3 100644 --- a/src/main/java/saasus/sdk/auth/models/UpdateTenantUserParam.java +++ b/src/main/java/saasus/sdk/auth/models/UpdateTenantUserParam.java @@ -51,7 +51,7 @@ /** * UpdateTenantUserParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class UpdateTenantUserParam { public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; @SerializedName(SERIALIZED_NAME_ATTRIBUTES) diff --git a/src/main/java/saasus/sdk/auth/models/User.java b/src/main/java/saasus/sdk/auth/models/User.java index d01baa84..c597887d 100644 --- a/src/main/java/saasus/sdk/auth/models/User.java +++ b/src/main/java/saasus/sdk/auth/models/User.java @@ -54,7 +54,7 @@ /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class User { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/saasus/sdk/auth/models/UserAttributes.java b/src/main/java/saasus/sdk/auth/models/UserAttributes.java index 1a43b8c5..cdd371dd 100644 --- a/src/main/java/saasus/sdk/auth/models/UserAttributes.java +++ b/src/main/java/saasus/sdk/auth/models/UserAttributes.java @@ -52,7 +52,7 @@ /** * UserAttributes */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class UserAttributes { public static final String SERIALIZED_NAME_USER_ATTRIBUTES = "user_attributes"; @SerializedName(SERIALIZED_NAME_USER_ATTRIBUTES) diff --git a/src/main/java/saasus/sdk/auth/models/UserAvailableEnv.java b/src/main/java/saasus/sdk/auth/models/UserAvailableEnv.java index 1caaaec8..52acd2a2 100644 --- a/src/main/java/saasus/sdk/auth/models/UserAvailableEnv.java +++ b/src/main/java/saasus/sdk/auth/models/UserAvailableEnv.java @@ -52,7 +52,7 @@ /** * UserAvailableEnv */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class UserAvailableEnv { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/saasus/sdk/auth/models/UserAvailableTenant.java b/src/main/java/saasus/sdk/auth/models/UserAvailableTenant.java index 5c489e09..3f0246e9 100644 --- a/src/main/java/saasus/sdk/auth/models/UserAvailableTenant.java +++ b/src/main/java/saasus/sdk/auth/models/UserAvailableTenant.java @@ -54,7 +54,7 @@ /** * UserAvailableTenant */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class UserAvailableTenant { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/saasus/sdk/auth/models/UserInfo.java b/src/main/java/saasus/sdk/auth/models/UserInfo.java index 1f0f661e..b88539c9 100644 --- a/src/main/java/saasus/sdk/auth/models/UserInfo.java +++ b/src/main/java/saasus/sdk/auth/models/UserInfo.java @@ -54,7 +54,7 @@ /** * UserInfo */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class UserInfo { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/saasus/sdk/auth/models/Users.java b/src/main/java/saasus/sdk/auth/models/Users.java index b4aead38..835f19f4 100644 --- a/src/main/java/saasus/sdk/auth/models/Users.java +++ b/src/main/java/saasus/sdk/auth/models/Users.java @@ -52,7 +52,7 @@ /** * Users */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class Users { public static final String SERIALIZED_NAME_USERS = "users"; @SerializedName(SERIALIZED_NAME_USERS) diff --git a/src/main/java/saasus/sdk/auth/models/ValidateInvitationParam.java b/src/main/java/saasus/sdk/auth/models/ValidateInvitationParam.java index 40cd27ad..7cd48259 100644 --- a/src/main/java/saasus/sdk/auth/models/ValidateInvitationParam.java +++ b/src/main/java/saasus/sdk/auth/models/ValidateInvitationParam.java @@ -49,7 +49,7 @@ /** * Access token is required for existing users, and email and password is required for new users. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:21.529968105Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") public class ValidateInvitationParam { public static final String SERIALIZED_NAME_ACCESS_TOKEN = "access_token"; @SerializedName(SERIALIZED_NAME_ACCESS_TOKEN) diff --git a/src/main/java/saasus/sdk/awsmarketplace/ApiException.java b/src/main/java/saasus/sdk/awsmarketplace/ApiException.java index 59a874b1..3264dd02 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/ApiException.java +++ b/src/main/java/saasus/sdk/awsmarketplace/ApiException.java @@ -21,7 +21,7 @@ *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:34.280462778Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; diff --git a/src/main/java/saasus/sdk/awsmarketplace/Configuration.java b/src/main/java/saasus/sdk/awsmarketplace/Configuration.java index 04383cb2..f525b090 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/Configuration.java +++ b/src/main/java/saasus/sdk/awsmarketplace/Configuration.java @@ -13,7 +13,7 @@ package saasus.sdk.awsmarketplace; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:34.280462778Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") public class Configuration { public static final String VERSION = "1.0.0"; diff --git a/src/main/java/saasus/sdk/awsmarketplace/Pair.java b/src/main/java/saasus/sdk/awsmarketplace/Pair.java index 0443e27e..7ae46bbf 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/Pair.java +++ b/src/main/java/saasus/sdk/awsmarketplace/Pair.java @@ -13,7 +13,7 @@ package saasus.sdk.awsmarketplace; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:34.280462778Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") public class Pair { private String name = ""; private String value = ""; diff --git a/src/main/java/saasus/sdk/awsmarketplace/StringUtil.java b/src/main/java/saasus/sdk/awsmarketplace/StringUtil.java index a75a4dd3..454d17e2 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/StringUtil.java +++ b/src/main/java/saasus/sdk/awsmarketplace/StringUtil.java @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:34.280462778Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/saasus/sdk/awsmarketplace/auth/ApiKeyAuth.java b/src/main/java/saasus/sdk/awsmarketplace/auth/ApiKeyAuth.java index 84f5dfcb..6b76bb7e 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/auth/ApiKeyAuth.java +++ b/src/main/java/saasus/sdk/awsmarketplace/auth/ApiKeyAuth.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:34.280462778Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/saasus/sdk/awsmarketplace/auth/HttpBearerAuth.java b/src/main/java/saasus/sdk/awsmarketplace/auth/HttpBearerAuth.java index 48cd7f0f..72cc327d 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/auth/HttpBearerAuth.java +++ b/src/main/java/saasus/sdk/awsmarketplace/auth/HttpBearerAuth.java @@ -22,7 +22,7 @@ import java.util.Optional; import java.util.function.Supplier; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:34.280462778Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") public class HttpBearerAuth implements Authentication { private final String scheme; private Supplier tokenSupplier; diff --git a/src/main/java/saasus/sdk/awsmarketplace/models/AbstractOpenApiSchema.java b/src/main/java/saasus/sdk/awsmarketplace/models/AbstractOpenApiSchema.java index 922e961d..4e7278f1 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/models/AbstractOpenApiSchema.java +++ b/src/main/java/saasus/sdk/awsmarketplace/models/AbstractOpenApiSchema.java @@ -21,7 +21,7 @@ /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:34.280462778Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/src/main/java/saasus/sdk/awsmarketplace/models/CatalogEntityVisibility.java b/src/main/java/saasus/sdk/awsmarketplace/models/CatalogEntityVisibility.java index 74aadf15..721e9b96 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/models/CatalogEntityVisibility.java +++ b/src/main/java/saasus/sdk/awsmarketplace/models/CatalogEntityVisibility.java @@ -50,7 +50,7 @@ /** * CatalogEntityVisibility */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:34.280462778Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") public class CatalogEntityVisibility { public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; @SerializedName(SERIALIZED_NAME_VISIBILITY) diff --git a/src/main/java/saasus/sdk/awsmarketplace/models/CloudFormationLaunchStackLink.java b/src/main/java/saasus/sdk/awsmarketplace/models/CloudFormationLaunchStackLink.java index c5f5edb1..f914e97b 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/models/CloudFormationLaunchStackLink.java +++ b/src/main/java/saasus/sdk/awsmarketplace/models/CloudFormationLaunchStackLink.java @@ -49,7 +49,7 @@ /** * CloudFormationLaunchStackLink */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:34.280462778Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") public class CloudFormationLaunchStackLink { public static final String SERIALIZED_NAME_LINK = "link"; @SerializedName(SERIALIZED_NAME_LINK) diff --git a/src/main/java/saasus/sdk/awsmarketplace/models/CreateCustomerParam.java b/src/main/java/saasus/sdk/awsmarketplace/models/CreateCustomerParam.java index 12d6eaea..f4eb2aff 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/models/CreateCustomerParam.java +++ b/src/main/java/saasus/sdk/awsmarketplace/models/CreateCustomerParam.java @@ -49,7 +49,7 @@ /** * CreateCustomerParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:34.280462778Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") public class CreateCustomerParam { public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; @SerializedName(SERIALIZED_NAME_TENANT_ID) diff --git a/src/main/java/saasus/sdk/awsmarketplace/models/Customer.java b/src/main/java/saasus/sdk/awsmarketplace/models/Customer.java index bbfe3e54..b320655e 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/models/Customer.java +++ b/src/main/java/saasus/sdk/awsmarketplace/models/Customer.java @@ -49,7 +49,7 @@ /** * Customer */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:34.280462778Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") public class Customer { public static final String SERIALIZED_NAME_CUSTOMER_IDENTIFIER = "customer_identifier"; @SerializedName(SERIALIZED_NAME_CUSTOMER_IDENTIFIER) diff --git a/src/main/java/saasus/sdk/awsmarketplace/models/Customers.java b/src/main/java/saasus/sdk/awsmarketplace/models/Customers.java index 415fcdd1..ca1d7c4c 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/models/Customers.java +++ b/src/main/java/saasus/sdk/awsmarketplace/models/Customers.java @@ -52,7 +52,7 @@ /** * Customers */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:34.280462778Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") public class Customers { public static final String SERIALIZED_NAME_CUSTOMERS = "customers"; @SerializedName(SERIALIZED_NAME_CUSTOMERS) diff --git a/src/main/java/saasus/sdk/awsmarketplace/models/Error.java b/src/main/java/saasus/sdk/awsmarketplace/models/Error.java index 11aa8d00..8e005575 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/models/Error.java +++ b/src/main/java/saasus/sdk/awsmarketplace/models/Error.java @@ -49,7 +49,7 @@ /** * Error */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:34.280462778Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") public class Error { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/src/main/java/saasus/sdk/awsmarketplace/models/GetListingStatusResult.java b/src/main/java/saasus/sdk/awsmarketplace/models/GetListingStatusResult.java index 8584f878..2dd871d1 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/models/GetListingStatusResult.java +++ b/src/main/java/saasus/sdk/awsmarketplace/models/GetListingStatusResult.java @@ -50,7 +50,7 @@ /** * GetListingStatusResult */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:34.280462778Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") public class GetListingStatusResult { public static final String SERIALIZED_NAME_LISTING_STATUS = "listing_status"; @SerializedName(SERIALIZED_NAME_LISTING_STATUS) diff --git a/src/main/java/saasus/sdk/awsmarketplace/models/Plan.java b/src/main/java/saasus/sdk/awsmarketplace/models/Plan.java index 01a231dd..cef9d285 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/models/Plan.java +++ b/src/main/java/saasus/sdk/awsmarketplace/models/Plan.java @@ -49,7 +49,7 @@ /** * Plan */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:34.280462778Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") public class Plan { public static final String SERIALIZED_NAME_PLAN_ID = "plan_id"; @SerializedName(SERIALIZED_NAME_PLAN_ID) diff --git a/src/main/java/saasus/sdk/awsmarketplace/models/Plans.java b/src/main/java/saasus/sdk/awsmarketplace/models/Plans.java index 69efb7e1..58e8b37c 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/models/Plans.java +++ b/src/main/java/saasus/sdk/awsmarketplace/models/Plans.java @@ -52,7 +52,7 @@ /** * Plans */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:34.280462778Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") public class Plans { public static final String SERIALIZED_NAME_PLANS = "plans"; @SerializedName(SERIALIZED_NAME_PLANS) diff --git a/src/main/java/saasus/sdk/awsmarketplace/models/SavePlanParam.java b/src/main/java/saasus/sdk/awsmarketplace/models/SavePlanParam.java index 0f740d5f..e12320c3 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/models/SavePlanParam.java +++ b/src/main/java/saasus/sdk/awsmarketplace/models/SavePlanParam.java @@ -49,7 +49,7 @@ /** * SavePlanParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:34.280462778Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") public class SavePlanParam { public static final String SERIALIZED_NAME_PLAN_ID = "plan_id"; @SerializedName(SERIALIZED_NAME_PLAN_ID) diff --git a/src/main/java/saasus/sdk/awsmarketplace/models/Settings.java b/src/main/java/saasus/sdk/awsmarketplace/models/Settings.java index a3e2775b..a6612dd4 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/models/Settings.java +++ b/src/main/java/saasus/sdk/awsmarketplace/models/Settings.java @@ -49,7 +49,7 @@ /** * Settings */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:34.280462778Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") public class Settings { public static final String SERIALIZED_NAME_PRODUCT_CODE = "product_code"; @SerializedName(SERIALIZED_NAME_PRODUCT_CODE) diff --git a/src/main/java/saasus/sdk/awsmarketplace/models/UpdateListingStatusParam.java b/src/main/java/saasus/sdk/awsmarketplace/models/UpdateListingStatusParam.java index 7bbc1290..3e2cab0d 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/models/UpdateListingStatusParam.java +++ b/src/main/java/saasus/sdk/awsmarketplace/models/UpdateListingStatusParam.java @@ -50,7 +50,7 @@ /** * UpdateListingStatusParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:34.280462778Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") public class UpdateListingStatusParam { public static final String SERIALIZED_NAME_LISTING_STATUS = "listing_status"; @SerializedName(SERIALIZED_NAME_LISTING_STATUS) diff --git a/src/main/java/saasus/sdk/awsmarketplace/models/UpdateSettingsParam.java b/src/main/java/saasus/sdk/awsmarketplace/models/UpdateSettingsParam.java index 7dd9c1ab..9d4928bd 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/models/UpdateSettingsParam.java +++ b/src/main/java/saasus/sdk/awsmarketplace/models/UpdateSettingsParam.java @@ -49,7 +49,7 @@ /** * UpdateSettingsParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:34.280462778Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") public class UpdateSettingsParam { public static final String SERIALIZED_NAME_PRODUCT_CODE = "product_code"; @SerializedName(SERIALIZED_NAME_PRODUCT_CODE) diff --git a/src/main/java/saasus/sdk/awsmarketplace/models/VerifyRegistrationTokenParam.java b/src/main/java/saasus/sdk/awsmarketplace/models/VerifyRegistrationTokenParam.java index c3a64ce5..58f8d103 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/models/VerifyRegistrationTokenParam.java +++ b/src/main/java/saasus/sdk/awsmarketplace/models/VerifyRegistrationTokenParam.java @@ -49,7 +49,7 @@ /** * VerifyRegistrationTokenParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:34.280462778Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") public class VerifyRegistrationTokenParam { public static final String SERIALIZED_NAME_REGISTRATION_TOKEN = "registration_token"; @SerializedName(SERIALIZED_NAME_REGISTRATION_TOKEN) diff --git a/src/main/java/saasus/sdk/billing/ApiException.java b/src/main/java/saasus/sdk/billing/ApiException.java index 00c9fa55..44213575 100644 --- a/src/main/java/saasus/sdk/billing/ApiException.java +++ b/src/main/java/saasus/sdk/billing/ApiException.java @@ -21,7 +21,7 @@ *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:31.552713001Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:57.462492303Z[Etc/UTC]") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; diff --git a/src/main/java/saasus/sdk/billing/Configuration.java b/src/main/java/saasus/sdk/billing/Configuration.java index 9fc43586..0c48e3d4 100644 --- a/src/main/java/saasus/sdk/billing/Configuration.java +++ b/src/main/java/saasus/sdk/billing/Configuration.java @@ -13,7 +13,7 @@ package saasus.sdk.billing; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:31.552713001Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:57.462492303Z[Etc/UTC]") public class Configuration { public static final String VERSION = "1.0.0"; diff --git a/src/main/java/saasus/sdk/billing/Pair.java b/src/main/java/saasus/sdk/billing/Pair.java index fb86f357..04f3095b 100644 --- a/src/main/java/saasus/sdk/billing/Pair.java +++ b/src/main/java/saasus/sdk/billing/Pair.java @@ -13,7 +13,7 @@ package saasus.sdk.billing; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:31.552713001Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:57.462492303Z[Etc/UTC]") public class Pair { private String name = ""; private String value = ""; diff --git a/src/main/java/saasus/sdk/billing/StringUtil.java b/src/main/java/saasus/sdk/billing/StringUtil.java index 62c72d40..f77d4ac1 100644 --- a/src/main/java/saasus/sdk/billing/StringUtil.java +++ b/src/main/java/saasus/sdk/billing/StringUtil.java @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:31.552713001Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:57.462492303Z[Etc/UTC]") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/saasus/sdk/billing/auth/ApiKeyAuth.java b/src/main/java/saasus/sdk/billing/auth/ApiKeyAuth.java index 94495206..489b177c 100644 --- a/src/main/java/saasus/sdk/billing/auth/ApiKeyAuth.java +++ b/src/main/java/saasus/sdk/billing/auth/ApiKeyAuth.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:31.552713001Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:57.462492303Z[Etc/UTC]") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/saasus/sdk/billing/auth/HttpBearerAuth.java b/src/main/java/saasus/sdk/billing/auth/HttpBearerAuth.java index 63707f08..9ac25222 100644 --- a/src/main/java/saasus/sdk/billing/auth/HttpBearerAuth.java +++ b/src/main/java/saasus/sdk/billing/auth/HttpBearerAuth.java @@ -22,7 +22,7 @@ import java.util.Optional; import java.util.function.Supplier; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:31.552713001Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:57.462492303Z[Etc/UTC]") public class HttpBearerAuth implements Authentication { private final String scheme; private Supplier tokenSupplier; diff --git a/src/main/java/saasus/sdk/billing/models/AbstractOpenApiSchema.java b/src/main/java/saasus/sdk/billing/models/AbstractOpenApiSchema.java index 98f976a0..ec0fd2b3 100644 --- a/src/main/java/saasus/sdk/billing/models/AbstractOpenApiSchema.java +++ b/src/main/java/saasus/sdk/billing/models/AbstractOpenApiSchema.java @@ -21,7 +21,7 @@ /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:31.552713001Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:57.462492303Z[Etc/UTC]") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/src/main/java/saasus/sdk/billing/models/Error.java b/src/main/java/saasus/sdk/billing/models/Error.java index 2971849c..4cd338d0 100644 --- a/src/main/java/saasus/sdk/billing/models/Error.java +++ b/src/main/java/saasus/sdk/billing/models/Error.java @@ -49,7 +49,7 @@ /** * Error */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:31.552713001Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:57.462492303Z[Etc/UTC]") public class Error { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/src/main/java/saasus/sdk/billing/models/StripeInfo.java b/src/main/java/saasus/sdk/billing/models/StripeInfo.java index 06c8a3c5..b1a9e5f0 100644 --- a/src/main/java/saasus/sdk/billing/models/StripeInfo.java +++ b/src/main/java/saasus/sdk/billing/models/StripeInfo.java @@ -49,7 +49,7 @@ /** * StripeInfo */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:31.552713001Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:57.462492303Z[Etc/UTC]") public class StripeInfo { public static final String SERIALIZED_NAME_IS_REGISTERED = "is_registered"; @SerializedName(SERIALIZED_NAME_IS_REGISTERED) diff --git a/src/main/java/saasus/sdk/billing/models/UpdateStripeInfoParam.java b/src/main/java/saasus/sdk/billing/models/UpdateStripeInfoParam.java index fa1a411e..7fc8dcda 100644 --- a/src/main/java/saasus/sdk/billing/models/UpdateStripeInfoParam.java +++ b/src/main/java/saasus/sdk/billing/models/UpdateStripeInfoParam.java @@ -49,7 +49,7 @@ /** * UpdateStripeInfoParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:31.552713001Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:57.462492303Z[Etc/UTC]") public class UpdateStripeInfoParam { public static final String SERIALIZED_NAME_SECRET_KEY = "secret_key"; @SerializedName(SERIALIZED_NAME_SECRET_KEY) diff --git a/src/main/java/saasus/sdk/communication/ApiException.java b/src/main/java/saasus/sdk/communication/ApiException.java index 809f7ed4..be0c464a 100644 --- a/src/main/java/saasus/sdk/communication/ApiException.java +++ b/src/main/java/saasus/sdk/communication/ApiException.java @@ -21,7 +21,7 @@ *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:43.518804990Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; diff --git a/src/main/java/saasus/sdk/communication/Configuration.java b/src/main/java/saasus/sdk/communication/Configuration.java index 60fd9836..41fa5774 100644 --- a/src/main/java/saasus/sdk/communication/Configuration.java +++ b/src/main/java/saasus/sdk/communication/Configuration.java @@ -13,7 +13,7 @@ package saasus.sdk.communication; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:43.518804990Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") public class Configuration { public static final String VERSION = "1.0.0"; diff --git a/src/main/java/saasus/sdk/communication/Pair.java b/src/main/java/saasus/sdk/communication/Pair.java index 1b1e4593..67c749da 100644 --- a/src/main/java/saasus/sdk/communication/Pair.java +++ b/src/main/java/saasus/sdk/communication/Pair.java @@ -13,7 +13,7 @@ package saasus.sdk.communication; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:43.518804990Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") public class Pair { private String name = ""; private String value = ""; diff --git a/src/main/java/saasus/sdk/communication/StringUtil.java b/src/main/java/saasus/sdk/communication/StringUtil.java index 4d6c31d4..e76cc9e6 100644 --- a/src/main/java/saasus/sdk/communication/StringUtil.java +++ b/src/main/java/saasus/sdk/communication/StringUtil.java @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:43.518804990Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/saasus/sdk/communication/auth/ApiKeyAuth.java b/src/main/java/saasus/sdk/communication/auth/ApiKeyAuth.java index 9eae7cd1..6b1155e3 100644 --- a/src/main/java/saasus/sdk/communication/auth/ApiKeyAuth.java +++ b/src/main/java/saasus/sdk/communication/auth/ApiKeyAuth.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:43.518804990Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/saasus/sdk/communication/auth/HttpBearerAuth.java b/src/main/java/saasus/sdk/communication/auth/HttpBearerAuth.java index 7a994a12..d9582aa6 100644 --- a/src/main/java/saasus/sdk/communication/auth/HttpBearerAuth.java +++ b/src/main/java/saasus/sdk/communication/auth/HttpBearerAuth.java @@ -22,7 +22,7 @@ import java.util.Optional; import java.util.function.Supplier; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:43.518804990Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") public class HttpBearerAuth implements Authentication { private final String scheme; private Supplier tokenSupplier; diff --git a/src/main/java/saasus/sdk/communication/models/AbstractOpenApiSchema.java b/src/main/java/saasus/sdk/communication/models/AbstractOpenApiSchema.java index 2db044a5..deee71ea 100644 --- a/src/main/java/saasus/sdk/communication/models/AbstractOpenApiSchema.java +++ b/src/main/java/saasus/sdk/communication/models/AbstractOpenApiSchema.java @@ -21,7 +21,7 @@ /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:43.518804990Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/src/main/java/saasus/sdk/communication/models/Comment.java b/src/main/java/saasus/sdk/communication/models/Comment.java index 6db183cf..fe8e5765 100644 --- a/src/main/java/saasus/sdk/communication/models/Comment.java +++ b/src/main/java/saasus/sdk/communication/models/Comment.java @@ -49,7 +49,7 @@ /** * Comment */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:43.518804990Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") public class Comment { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/saasus/sdk/communication/models/Comments.java b/src/main/java/saasus/sdk/communication/models/Comments.java index 8c59438f..7d7af5cc 100644 --- a/src/main/java/saasus/sdk/communication/models/Comments.java +++ b/src/main/java/saasus/sdk/communication/models/Comments.java @@ -52,7 +52,7 @@ /** * Comments */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:43.518804990Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") public class Comments { public static final String SERIALIZED_NAME_COMMENTS = "comments"; @SerializedName(SERIALIZED_NAME_COMMENTS) diff --git a/src/main/java/saasus/sdk/communication/models/CreateFeedbackCommentParam.java b/src/main/java/saasus/sdk/communication/models/CreateFeedbackCommentParam.java index c0b438a9..edd8dcfe 100644 --- a/src/main/java/saasus/sdk/communication/models/CreateFeedbackCommentParam.java +++ b/src/main/java/saasus/sdk/communication/models/CreateFeedbackCommentParam.java @@ -49,7 +49,7 @@ /** * CreateFeedbackCommentParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:43.518804990Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") public class CreateFeedbackCommentParam { public static final String SERIALIZED_NAME_BODY = "body"; @SerializedName(SERIALIZED_NAME_BODY) diff --git a/src/main/java/saasus/sdk/communication/models/CreateFeedbackParam.java b/src/main/java/saasus/sdk/communication/models/CreateFeedbackParam.java index bbbe9729..93bbc0e9 100644 --- a/src/main/java/saasus/sdk/communication/models/CreateFeedbackParam.java +++ b/src/main/java/saasus/sdk/communication/models/CreateFeedbackParam.java @@ -49,7 +49,7 @@ /** * CreateFeedbackParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:43.518804990Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") public class CreateFeedbackParam { public static final String SERIALIZED_NAME_FEEDBACK_TITLE = "feedback_title"; @SerializedName(SERIALIZED_NAME_FEEDBACK_TITLE) diff --git a/src/main/java/saasus/sdk/communication/models/CreateVoteUserParam.java b/src/main/java/saasus/sdk/communication/models/CreateVoteUserParam.java index e15875a0..2e361aaf 100644 --- a/src/main/java/saasus/sdk/communication/models/CreateVoteUserParam.java +++ b/src/main/java/saasus/sdk/communication/models/CreateVoteUserParam.java @@ -49,7 +49,7 @@ /** * CreateVoteUserParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:43.518804990Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") public class CreateVoteUserParam { public static final String SERIALIZED_NAME_USER_ID = "user_id"; @SerializedName(SERIALIZED_NAME_USER_ID) diff --git a/src/main/java/saasus/sdk/communication/models/Error.java b/src/main/java/saasus/sdk/communication/models/Error.java index fe58e533..27067473 100644 --- a/src/main/java/saasus/sdk/communication/models/Error.java +++ b/src/main/java/saasus/sdk/communication/models/Error.java @@ -49,7 +49,7 @@ /** * Error */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:43.518804990Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") public class Error { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/src/main/java/saasus/sdk/communication/models/Feedback.java b/src/main/java/saasus/sdk/communication/models/Feedback.java index 1091703b..9f8bda22 100644 --- a/src/main/java/saasus/sdk/communication/models/Feedback.java +++ b/src/main/java/saasus/sdk/communication/models/Feedback.java @@ -53,7 +53,7 @@ /** * Feedback */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:43.518804990Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") public class Feedback { public static final String SERIALIZED_NAME_FEEDBACK_TITLE = "feedback_title"; @SerializedName(SERIALIZED_NAME_FEEDBACK_TITLE) diff --git a/src/main/java/saasus/sdk/communication/models/FeedbackSaveProps.java b/src/main/java/saasus/sdk/communication/models/FeedbackSaveProps.java index 9a200e07..09ccccda 100644 --- a/src/main/java/saasus/sdk/communication/models/FeedbackSaveProps.java +++ b/src/main/java/saasus/sdk/communication/models/FeedbackSaveProps.java @@ -49,7 +49,7 @@ /** * FeedbackSaveProps */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:43.518804990Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") public class FeedbackSaveProps { public static final String SERIALIZED_NAME_FEEDBACK_TITLE = "feedback_title"; @SerializedName(SERIALIZED_NAME_FEEDBACK_TITLE) diff --git a/src/main/java/saasus/sdk/communication/models/Feedbacks.java b/src/main/java/saasus/sdk/communication/models/Feedbacks.java index 1eca26ab..36691f07 100644 --- a/src/main/java/saasus/sdk/communication/models/Feedbacks.java +++ b/src/main/java/saasus/sdk/communication/models/Feedbacks.java @@ -52,7 +52,7 @@ /** * Feedbacks */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:43.518804990Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") public class Feedbacks { public static final String SERIALIZED_NAME_FEEDBACKS = "feedbacks"; @SerializedName(SERIALIZED_NAME_FEEDBACKS) diff --git a/src/main/java/saasus/sdk/communication/models/UpdateFeedbackCommentParam.java b/src/main/java/saasus/sdk/communication/models/UpdateFeedbackCommentParam.java index ffbee104..5b3be7f8 100644 --- a/src/main/java/saasus/sdk/communication/models/UpdateFeedbackCommentParam.java +++ b/src/main/java/saasus/sdk/communication/models/UpdateFeedbackCommentParam.java @@ -49,7 +49,7 @@ /** * UpdateFeedbackCommentParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:43.518804990Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") public class UpdateFeedbackCommentParam { public static final String SERIALIZED_NAME_BODY = "body"; @SerializedName(SERIALIZED_NAME_BODY) diff --git a/src/main/java/saasus/sdk/communication/models/UpdateFeedbackParam.java b/src/main/java/saasus/sdk/communication/models/UpdateFeedbackParam.java index e8aefd6a..2a701841 100644 --- a/src/main/java/saasus/sdk/communication/models/UpdateFeedbackParam.java +++ b/src/main/java/saasus/sdk/communication/models/UpdateFeedbackParam.java @@ -49,7 +49,7 @@ /** * UpdateFeedbackParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:43.518804990Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") public class UpdateFeedbackParam { public static final String SERIALIZED_NAME_FEEDBACK_TITLE = "feedback_title"; @SerializedName(SERIALIZED_NAME_FEEDBACK_TITLE) diff --git a/src/main/java/saasus/sdk/communication/models/UpdateFeedbackStatusParam.java b/src/main/java/saasus/sdk/communication/models/UpdateFeedbackStatusParam.java index 3ba1a0a9..4e2ef67f 100644 --- a/src/main/java/saasus/sdk/communication/models/UpdateFeedbackStatusParam.java +++ b/src/main/java/saasus/sdk/communication/models/UpdateFeedbackStatusParam.java @@ -49,7 +49,7 @@ /** * UpdateFeedbackStatusParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:43.518804990Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") public class UpdateFeedbackStatusParam { public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) diff --git a/src/main/java/saasus/sdk/communication/models/User.java b/src/main/java/saasus/sdk/communication/models/User.java index 03e2a059..f1dfd629 100644 --- a/src/main/java/saasus/sdk/communication/models/User.java +++ b/src/main/java/saasus/sdk/communication/models/User.java @@ -49,7 +49,7 @@ /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:43.518804990Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") public class User { public static final String SERIALIZED_NAME_USER_ID = "user_id"; @SerializedName(SERIALIZED_NAME_USER_ID) diff --git a/src/main/java/saasus/sdk/communication/models/Users.java b/src/main/java/saasus/sdk/communication/models/Users.java index 6e0582f4..707ef0db 100644 --- a/src/main/java/saasus/sdk/communication/models/Users.java +++ b/src/main/java/saasus/sdk/communication/models/Users.java @@ -52,7 +52,7 @@ /** * Users */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:43.518804990Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") public class Users { public static final String SERIALIZED_NAME_USERS = "users"; @SerializedName(SERIALIZED_NAME_USERS) diff --git a/src/main/java/saasus/sdk/communication/models/Votes.java b/src/main/java/saasus/sdk/communication/models/Votes.java index 5fa2c777..8ada17b5 100644 --- a/src/main/java/saasus/sdk/communication/models/Votes.java +++ b/src/main/java/saasus/sdk/communication/models/Votes.java @@ -52,7 +52,7 @@ /** * Votes */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:43.518804990Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") public class Votes { public static final String SERIALIZED_NAME_USERS = "users"; @SerializedName(SERIALIZED_NAME_USERS) diff --git a/src/main/java/saasus/sdk/integration/ApiException.java b/src/main/java/saasus/sdk/integration/ApiException.java index 5e4bdd8b..46890bfa 100644 --- a/src/main/java/saasus/sdk/integration/ApiException.java +++ b/src/main/java/saasus/sdk/integration/ApiException.java @@ -21,7 +21,7 @@ *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:37.438939707Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:59.623524638Z[Etc/UTC]") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; diff --git a/src/main/java/saasus/sdk/integration/Configuration.java b/src/main/java/saasus/sdk/integration/Configuration.java index d7d81044..9388e98a 100644 --- a/src/main/java/saasus/sdk/integration/Configuration.java +++ b/src/main/java/saasus/sdk/integration/Configuration.java @@ -13,7 +13,7 @@ package saasus.sdk.integration; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:37.438939707Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:59.623524638Z[Etc/UTC]") public class Configuration { public static final String VERSION = "1.0.0"; diff --git a/src/main/java/saasus/sdk/integration/Pair.java b/src/main/java/saasus/sdk/integration/Pair.java index b1274435..78627912 100644 --- a/src/main/java/saasus/sdk/integration/Pair.java +++ b/src/main/java/saasus/sdk/integration/Pair.java @@ -13,7 +13,7 @@ package saasus.sdk.integration; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:37.438939707Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:59.623524638Z[Etc/UTC]") public class Pair { private String name = ""; private String value = ""; diff --git a/src/main/java/saasus/sdk/integration/StringUtil.java b/src/main/java/saasus/sdk/integration/StringUtil.java index c01545ed..d044084c 100644 --- a/src/main/java/saasus/sdk/integration/StringUtil.java +++ b/src/main/java/saasus/sdk/integration/StringUtil.java @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:37.438939707Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:59.623524638Z[Etc/UTC]") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/saasus/sdk/integration/auth/ApiKeyAuth.java b/src/main/java/saasus/sdk/integration/auth/ApiKeyAuth.java index 86c87975..07dc4a8b 100644 --- a/src/main/java/saasus/sdk/integration/auth/ApiKeyAuth.java +++ b/src/main/java/saasus/sdk/integration/auth/ApiKeyAuth.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:37.438939707Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:59.623524638Z[Etc/UTC]") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/saasus/sdk/integration/auth/HttpBearerAuth.java b/src/main/java/saasus/sdk/integration/auth/HttpBearerAuth.java index 15817b9c..83e088b5 100644 --- a/src/main/java/saasus/sdk/integration/auth/HttpBearerAuth.java +++ b/src/main/java/saasus/sdk/integration/auth/HttpBearerAuth.java @@ -22,7 +22,7 @@ import java.util.Optional; import java.util.function.Supplier; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:37.438939707Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:59.623524638Z[Etc/UTC]") public class HttpBearerAuth implements Authentication { private final String scheme; private Supplier tokenSupplier; diff --git a/src/main/java/saasus/sdk/integration/models/AbstractOpenApiSchema.java b/src/main/java/saasus/sdk/integration/models/AbstractOpenApiSchema.java index 809767e5..c323c940 100644 --- a/src/main/java/saasus/sdk/integration/models/AbstractOpenApiSchema.java +++ b/src/main/java/saasus/sdk/integration/models/AbstractOpenApiSchema.java @@ -21,7 +21,7 @@ /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:37.438939707Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:59.623524638Z[Etc/UTC]") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/src/main/java/saasus/sdk/integration/models/CreateEventBridgeEventParam.java b/src/main/java/saasus/sdk/integration/models/CreateEventBridgeEventParam.java index a64f288a..5d5fd268 100644 --- a/src/main/java/saasus/sdk/integration/models/CreateEventBridgeEventParam.java +++ b/src/main/java/saasus/sdk/integration/models/CreateEventBridgeEventParam.java @@ -52,7 +52,7 @@ /** * CreateEventBridgeEventParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:37.438939707Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:59.623524638Z[Etc/UTC]") public class CreateEventBridgeEventParam { public static final String SERIALIZED_NAME_EVENT_MESSAGES = "event_messages"; @SerializedName(SERIALIZED_NAME_EVENT_MESSAGES) diff --git a/src/main/java/saasus/sdk/integration/models/Error.java b/src/main/java/saasus/sdk/integration/models/Error.java index e45e543e..a4fb6830 100644 --- a/src/main/java/saasus/sdk/integration/models/Error.java +++ b/src/main/java/saasus/sdk/integration/models/Error.java @@ -49,7 +49,7 @@ /** * Error */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:37.438939707Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:59.623524638Z[Etc/UTC]") public class Error { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/src/main/java/saasus/sdk/integration/models/EventBridgeSettings.java b/src/main/java/saasus/sdk/integration/models/EventBridgeSettings.java index 574f71d8..8387fe5a 100644 --- a/src/main/java/saasus/sdk/integration/models/EventBridgeSettings.java +++ b/src/main/java/saasus/sdk/integration/models/EventBridgeSettings.java @@ -50,7 +50,7 @@ /** * EventBridgeSettings */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:37.438939707Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:59.623524638Z[Etc/UTC]") public class EventBridgeSettings { public static final String SERIALIZED_NAME_AWS_ACCOUNT_ID = "aws_account_id"; @SerializedName(SERIALIZED_NAME_AWS_ACCOUNT_ID) diff --git a/src/main/java/saasus/sdk/integration/models/EventMessage.java b/src/main/java/saasus/sdk/integration/models/EventMessage.java index 182ddf15..693a6893 100644 --- a/src/main/java/saasus/sdk/integration/models/EventMessage.java +++ b/src/main/java/saasus/sdk/integration/models/EventMessage.java @@ -49,7 +49,7 @@ /** * EventMessage */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:37.438939707Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:59.623524638Z[Etc/UTC]") public class EventMessage { public static final String SERIALIZED_NAME_EVENT_TYPE = "event_type"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) diff --git a/src/main/java/saasus/sdk/modules/ApiGatewayApiClient.java b/src/main/java/saasus/sdk/modules/ApiGatewayApiClient.java new file mode 100644 index 00000000..9d5dfcc5 --- /dev/null +++ b/src/main/java/saasus/sdk/modules/ApiGatewayApiClient.java @@ -0,0 +1,65 @@ +package saasus.sdk.modules; + +import saasus.sdk.apigateway.ApiClient; +import saasus.sdk.apigateway.ApiException; +import saasus.sdk.apigateway.ApiResponse; +import okhttp3.Call; +import okhttp3.OkHttpClient; +import okhttp3.Request; + +import java.lang.reflect.Type; + +public class ApiGatewayApiClient extends ApiClient { + + private String referer; + private String xSaasusReferer; + + @Override + public ApiResponse execute(Call call, Type returnType) throws ApiException { + String signature = ""; + try { + signature = Utils.withSaasusSigV1(call); + } catch (Exception e) { + throw new ApiException(e); + } + + OkHttpClient httpClient = getHttpClient(); + Request request = call.request(); + Request.Builder requestBuilder = request.newBuilder() + .header("Authorization", signature); + + if (this.referer != null) { + requestBuilder.header("Referer", this.referer); + } + + if (this.xSaasusReferer != null) { + requestBuilder.header("X-SaaSus-Referer", this.xSaasusReferer); + } + + Request newRequest = requestBuilder.build(); + Call newCall = httpClient.newCall(newRequest); + return super.execute(newCall, returnType); + } + + private String getReferer() { + if (referer == null) { + return ""; + } + return referer; + } + + public void setReferer(String referer) { + this.referer = referer; + } + + private String getXSaasusReferer() { + if (xSaasusReferer == null) { + return ""; + } + return xSaasusReferer; + } + + public void setXSaasusReferer(String xSaasusReferer) { + this.xSaasusReferer = xSaasusReferer; + } +} diff --git a/src/main/java/saasus/sdk/modules/Configuration.java b/src/main/java/saasus/sdk/modules/Configuration.java index 2ef1d69b..c1782748 100644 --- a/src/main/java/saasus/sdk/modules/Configuration.java +++ b/src/main/java/saasus/sdk/modules/Configuration.java @@ -9,6 +9,7 @@ public class Configuration { private static final BillingApiClient billingApiClient = new BillingApiClient(); private static final CommunicationApiClient communicationApiClient = new CommunicationApiClient(); private static final IntegrationApiClient integrationApiClient = new IntegrationApiClient(); + private static final ApiGatewayApiClient apiGatewayApiClient = new ApiGatewayApiClient(); public Configuration() { String urlBase = System.getenv("SAASUS_API_URL_BASE"); @@ -20,6 +21,7 @@ public Configuration() { billingApiClient.setBasePath(urlBase + "/v1/billing"); communicationApiClient.setBasePath(urlBase + "/v1/communication"); integrationApiClient.setBasePath(urlBase + "/v1/integration"); + apiGatewayApiClient.setBasePath(urlBase + "/v1/apigateway"); } } @@ -50,4 +52,8 @@ public CommunicationApiClient getCommunicationApiClient() { public IntegrationApiClient getIntegrationApiClient() { return integrationApiClient; } + + public ApiGatewayApiClient getApiGatewayApiClient() { + return apiGatewayApiClient; + } } diff --git a/src/main/java/saasus/sdk/pricing/ApiException.java b/src/main/java/saasus/sdk/pricing/ApiException.java index c06041c9..a43ac981 100644 --- a/src/main/java/saasus/sdk/pricing/ApiException.java +++ b/src/main/java/saasus/sdk/pricing/ApiException.java @@ -21,7 +21,7 @@ *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; diff --git a/src/main/java/saasus/sdk/pricing/Configuration.java b/src/main/java/saasus/sdk/pricing/Configuration.java index d915b306..3cfd2900 100644 --- a/src/main/java/saasus/sdk/pricing/Configuration.java +++ b/src/main/java/saasus/sdk/pricing/Configuration.java @@ -13,7 +13,7 @@ package saasus.sdk.pricing; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class Configuration { public static final String VERSION = "1.0.0"; diff --git a/src/main/java/saasus/sdk/pricing/JSON.java b/src/main/java/saasus/sdk/pricing/JSON.java index d65abaf3..fb0867be 100644 --- a/src/main/java/saasus/sdk/pricing/JSON.java +++ b/src/main/java/saasus/sdk/pricing/JSON.java @@ -72,7 +72,7 @@ public Class getClassForElement classByDiscriminatorValue.put("PricingUsageUnit", saasus.sdk.pricing.models.PricingUsageUnit.class); classByDiscriminatorValue.put("PricingUnit", saasus.sdk.pricing.models.PricingUnit.class); return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); + getDiscriminatorValue(readElement, "u_type")); } }) .registerTypeSelector(saasus.sdk.pricing.models.PricingUnitForSave.class, new TypeSelector() { @@ -89,7 +89,7 @@ public Class getClassFor classByDiscriminatorValue.put("PricingUsageUnitForSave", saasus.sdk.pricing.models.PricingUsageUnitForSave.class); classByDiscriminatorValue.put("PricingUnitForSave", saasus.sdk.pricing.models.PricingUnitForSave.class); return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); + getDiscriminatorValue(readElement, "u_type")); } }) ; diff --git a/src/main/java/saasus/sdk/pricing/Pair.java b/src/main/java/saasus/sdk/pricing/Pair.java index ad563bd2..1c76ebf3 100644 --- a/src/main/java/saasus/sdk/pricing/Pair.java +++ b/src/main/java/saasus/sdk/pricing/Pair.java @@ -13,7 +13,7 @@ package saasus.sdk.pricing; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class Pair { private String name = ""; private String value = ""; diff --git a/src/main/java/saasus/sdk/pricing/StringUtil.java b/src/main/java/saasus/sdk/pricing/StringUtil.java index e30b6a1f..9a8264b4 100644 --- a/src/main/java/saasus/sdk/pricing/StringUtil.java +++ b/src/main/java/saasus/sdk/pricing/StringUtil.java @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/saasus/sdk/pricing/auth/ApiKeyAuth.java b/src/main/java/saasus/sdk/pricing/auth/ApiKeyAuth.java index f72d740e..5ade052b 100644 --- a/src/main/java/saasus/sdk/pricing/auth/ApiKeyAuth.java +++ b/src/main/java/saasus/sdk/pricing/auth/ApiKeyAuth.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/saasus/sdk/pricing/auth/HttpBearerAuth.java b/src/main/java/saasus/sdk/pricing/auth/HttpBearerAuth.java index c66cf1e8..36c18751 100644 --- a/src/main/java/saasus/sdk/pricing/auth/HttpBearerAuth.java +++ b/src/main/java/saasus/sdk/pricing/auth/HttpBearerAuth.java @@ -22,7 +22,7 @@ import java.util.Optional; import java.util.function.Supplier; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class HttpBearerAuth implements Authentication { private final String scheme; private Supplier tokenSupplier; diff --git a/src/main/java/saasus/sdk/pricing/models/AbstractOpenApiSchema.java b/src/main/java/saasus/sdk/pricing/models/AbstractOpenApiSchema.java index 5177723a..7c187b29 100644 --- a/src/main/java/saasus/sdk/pricing/models/AbstractOpenApiSchema.java +++ b/src/main/java/saasus/sdk/pricing/models/AbstractOpenApiSchema.java @@ -21,7 +21,7 @@ /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/src/main/java/saasus/sdk/pricing/models/Error.java b/src/main/java/saasus/sdk/pricing/models/Error.java index cf69d770..5d40fabd 100644 --- a/src/main/java/saasus/sdk/pricing/models/Error.java +++ b/src/main/java/saasus/sdk/pricing/models/Error.java @@ -49,7 +49,7 @@ /** * Error */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class Error { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/src/main/java/saasus/sdk/pricing/models/MeteringUnit.java b/src/main/java/saasus/sdk/pricing/models/MeteringUnit.java index 47c349c3..8b88febd 100644 --- a/src/main/java/saasus/sdk/pricing/models/MeteringUnit.java +++ b/src/main/java/saasus/sdk/pricing/models/MeteringUnit.java @@ -50,7 +50,7 @@ /** * MeteringUnit */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class MeteringUnit { public static final String SERIALIZED_NAME_UNIT_NAME = "unit_name"; @SerializedName(SERIALIZED_NAME_UNIT_NAME) diff --git a/src/main/java/saasus/sdk/pricing/models/MeteringUnitCount.java b/src/main/java/saasus/sdk/pricing/models/MeteringUnitCount.java index c68f3d0e..badeba3a 100644 --- a/src/main/java/saasus/sdk/pricing/models/MeteringUnitCount.java +++ b/src/main/java/saasus/sdk/pricing/models/MeteringUnitCount.java @@ -49,7 +49,7 @@ /** * MeteringUnitCount */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class MeteringUnitCount { public static final String SERIALIZED_NAME_TIMESTAMP = "timestamp"; @SerializedName(SERIALIZED_NAME_TIMESTAMP) diff --git a/src/main/java/saasus/sdk/pricing/models/MeteringUnitDateCount.java b/src/main/java/saasus/sdk/pricing/models/MeteringUnitDateCount.java index ce26b762..d88d5ebd 100644 --- a/src/main/java/saasus/sdk/pricing/models/MeteringUnitDateCount.java +++ b/src/main/java/saasus/sdk/pricing/models/MeteringUnitDateCount.java @@ -49,7 +49,7 @@ /** * MeteringUnitDateCount */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class MeteringUnitDateCount { public static final String SERIALIZED_NAME_METERING_UNIT_NAME = "metering_unit_name"; @SerializedName(SERIALIZED_NAME_METERING_UNIT_NAME) diff --git a/src/main/java/saasus/sdk/pricing/models/MeteringUnitDateCounts.java b/src/main/java/saasus/sdk/pricing/models/MeteringUnitDateCounts.java index 47b118ff..a59f871d 100644 --- a/src/main/java/saasus/sdk/pricing/models/MeteringUnitDateCounts.java +++ b/src/main/java/saasus/sdk/pricing/models/MeteringUnitDateCounts.java @@ -52,7 +52,7 @@ /** * MeteringUnitDateCounts */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class MeteringUnitDateCounts { public static final String SERIALIZED_NAME_COUNTS = "counts"; @SerializedName(SERIALIZED_NAME_COUNTS) diff --git a/src/main/java/saasus/sdk/pricing/models/MeteringUnitDatePeriodCounts.java b/src/main/java/saasus/sdk/pricing/models/MeteringUnitDatePeriodCounts.java index 6cca313e..cf95f9d6 100644 --- a/src/main/java/saasus/sdk/pricing/models/MeteringUnitDatePeriodCounts.java +++ b/src/main/java/saasus/sdk/pricing/models/MeteringUnitDatePeriodCounts.java @@ -52,7 +52,7 @@ /** * MeteringUnitDatePeriodCounts */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class MeteringUnitDatePeriodCounts { public static final String SERIALIZED_NAME_METERING_UNIT_NAME = "metering_unit_name"; @SerializedName(SERIALIZED_NAME_METERING_UNIT_NAME) diff --git a/src/main/java/saasus/sdk/pricing/models/MeteringUnitMonthCount.java b/src/main/java/saasus/sdk/pricing/models/MeteringUnitMonthCount.java index 58e05084..bb03fc5a 100644 --- a/src/main/java/saasus/sdk/pricing/models/MeteringUnitMonthCount.java +++ b/src/main/java/saasus/sdk/pricing/models/MeteringUnitMonthCount.java @@ -49,7 +49,7 @@ /** * MeteringUnitMonthCount */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class MeteringUnitMonthCount { public static final String SERIALIZED_NAME_METERING_UNIT_NAME = "metering_unit_name"; @SerializedName(SERIALIZED_NAME_METERING_UNIT_NAME) diff --git a/src/main/java/saasus/sdk/pricing/models/MeteringUnitMonthCounts.java b/src/main/java/saasus/sdk/pricing/models/MeteringUnitMonthCounts.java index c481a7cd..e67a1566 100644 --- a/src/main/java/saasus/sdk/pricing/models/MeteringUnitMonthCounts.java +++ b/src/main/java/saasus/sdk/pricing/models/MeteringUnitMonthCounts.java @@ -52,7 +52,7 @@ /** * MeteringUnitMonthCounts */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class MeteringUnitMonthCounts { public static final String SERIALIZED_NAME_COUNTS = "counts"; @SerializedName(SERIALIZED_NAME_COUNTS) diff --git a/src/main/java/saasus/sdk/pricing/models/MeteringUnitProps.java b/src/main/java/saasus/sdk/pricing/models/MeteringUnitProps.java index 9a38392e..91e6fe6a 100644 --- a/src/main/java/saasus/sdk/pricing/models/MeteringUnitProps.java +++ b/src/main/java/saasus/sdk/pricing/models/MeteringUnitProps.java @@ -50,7 +50,7 @@ /** * MeteringUnitProps */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class MeteringUnitProps { public static final String SERIALIZED_NAME_UNIT_NAME = "unit_name"; @SerializedName(SERIALIZED_NAME_UNIT_NAME) diff --git a/src/main/java/saasus/sdk/pricing/models/MeteringUnitTimestampCount.java b/src/main/java/saasus/sdk/pricing/models/MeteringUnitTimestampCount.java index d650a128..82a9eb5c 100644 --- a/src/main/java/saasus/sdk/pricing/models/MeteringUnitTimestampCount.java +++ b/src/main/java/saasus/sdk/pricing/models/MeteringUnitTimestampCount.java @@ -49,7 +49,7 @@ /** * MeteringUnitTimestampCount */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class MeteringUnitTimestampCount { public static final String SERIALIZED_NAME_METERING_UNIT_NAME = "metering_unit_name"; @SerializedName(SERIALIZED_NAME_METERING_UNIT_NAME) diff --git a/src/main/java/saasus/sdk/pricing/models/MeteringUnits.java b/src/main/java/saasus/sdk/pricing/models/MeteringUnits.java index ac759c43..22269043 100644 --- a/src/main/java/saasus/sdk/pricing/models/MeteringUnits.java +++ b/src/main/java/saasus/sdk/pricing/models/MeteringUnits.java @@ -52,7 +52,7 @@ /** * MeteringUnits */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class MeteringUnits { public static final String SERIALIZED_NAME_UNITS = "units"; @SerializedName(SERIALIZED_NAME_UNITS) diff --git a/src/main/java/saasus/sdk/pricing/models/PricingFixedUnit.java b/src/main/java/saasus/sdk/pricing/models/PricingFixedUnit.java index 1fc334dc..c28eebe3 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingFixedUnit.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingFixedUnit.java @@ -23,7 +23,6 @@ import java.util.Arrays; import saasus.sdk.pricing.models.Currency; import saasus.sdk.pricing.models.RecurringInterval; -import saasus.sdk.pricing.models.UnitType; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -52,7 +51,7 @@ /** * PricingFixedUnit */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class PricingFixedUnit { public static final String SERIALIZED_NAME_UNIT_AMOUNT = "unit_amount"; @SerializedName(SERIALIZED_NAME_UNIT_AMOUNT) @@ -62,6 +61,60 @@ public class PricingFixedUnit { @SerializedName(SERIALIZED_NAME_RECURRING_INTERVAL) private RecurringInterval recurringInterval; + /** + * Gets or Sets uType + */ + @JsonAdapter(UTypeEnum.Adapter.class) + public enum UTypeEnum { + FIXED("fixed"); + + private String value; + + UTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static UTypeEnum fromValue(String value) { + for (UTypeEnum b : UTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final UTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public UTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return UTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + UTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_U_TYPE = "u_type"; + @SerializedName(SERIALIZED_NAME_U_TYPE) + private UTypeEnum uType; + public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) private String name; @@ -74,10 +127,6 @@ public class PricingFixedUnit { @SerializedName(SERIALIZED_NAME_DESCRIPTION) private String description; - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private UnitType type; - public static final String SERIALIZED_NAME_CURRENCY = "currency"; @SerializedName(SERIALIZED_NAME_CURRENCY) private Currency currency; @@ -131,6 +180,25 @@ public void setRecurringInterval(RecurringInterval recurringInterval) { } + public PricingFixedUnit uType(UTypeEnum uType) { + this.uType = uType; + return this; + } + + /** + * Get uType + * @return uType + **/ + @javax.annotation.Nonnull + public UTypeEnum getuType() { + return uType; + } + + public void setuType(UTypeEnum uType) { + this.uType = uType; + } + + public PricingFixedUnit name(String name) { this.name = name; return this; @@ -188,25 +256,6 @@ public void setDescription(String description) { } - public PricingFixedUnit type(UnitType type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public UnitType getType() { - return type; - } - - public void setType(UnitType type) { - this.type = type; - } - - public PricingFixedUnit currency(Currency currency) { this.currency = currency; return this; @@ -276,10 +325,10 @@ public boolean equals(Object o) { PricingFixedUnit pricingFixedUnit = (PricingFixedUnit) o; return Objects.equals(this.unitAmount, pricingFixedUnit.unitAmount) && Objects.equals(this.recurringInterval, pricingFixedUnit.recurringInterval) && + Objects.equals(this.uType, pricingFixedUnit.uType) && Objects.equals(this.name, pricingFixedUnit.name) && Objects.equals(this.displayName, pricingFixedUnit.displayName) && Objects.equals(this.description, pricingFixedUnit.description) && - Objects.equals(this.type, pricingFixedUnit.type) && Objects.equals(this.currency, pricingFixedUnit.currency) && Objects.equals(this.id, pricingFixedUnit.id) && Objects.equals(this.used, pricingFixedUnit.used); @@ -287,7 +336,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(unitAmount, recurringInterval, name, displayName, description, type, currency, id, used); + return Objects.hash(unitAmount, recurringInterval, uType, name, displayName, description, currency, id, used); } @Override @@ -296,10 +345,10 @@ public String toString() { sb.append("class PricingFixedUnit {\n"); sb.append(" unitAmount: ").append(toIndentedString(unitAmount)).append("\n"); sb.append(" recurringInterval: ").append(toIndentedString(recurringInterval)).append("\n"); + sb.append(" uType: ").append(toIndentedString(uType)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" used: ").append(toIndentedString(used)).append("\n"); @@ -327,10 +376,10 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("unit_amount"); openapiFields.add("recurring_interval"); + openapiFields.add("u_type"); openapiFields.add("name"); openapiFields.add("display_name"); openapiFields.add("description"); - openapiFields.add("type"); openapiFields.add("currency"); openapiFields.add("id"); openapiFields.add("used"); @@ -339,10 +388,10 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); openapiRequiredFields.add("unit_amount"); openapiRequiredFields.add("recurring_interval"); + openapiRequiredFields.add("u_type"); openapiRequiredFields.add("name"); openapiRequiredFields.add("display_name"); openapiRequiredFields.add("description"); - openapiRequiredFields.add("type"); openapiRequiredFields.add("currency"); openapiRequiredFields.add("id"); openapiRequiredFields.add("used"); @@ -378,6 +427,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `recurring_interval` RecurringInterval.validateJsonElement(jsonObj.get("recurring_interval")); + if (!jsonObj.get("u_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `u_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("u_type").toString())); + } + // validate the required field `u_type` + UTypeEnum.validateJsonElement(jsonObj.get("u_type")); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -387,8 +441,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } - // validate the required field `type` - UnitType.validateJsonElement(jsonObj.get("type")); // validate the required field `currency` Currency.validateJsonElement(jsonObj.get("currency")); if (!jsonObj.get("id").isJsonPrimitive()) { diff --git a/src/main/java/saasus/sdk/pricing/models/PricingFixedUnitForSave.java b/src/main/java/saasus/sdk/pricing/models/PricingFixedUnitForSave.java index f95e85cf..2d69fc5b 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingFixedUnitForSave.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingFixedUnitForSave.java @@ -23,7 +23,6 @@ import java.util.Arrays; import saasus.sdk.pricing.models.Currency; import saasus.sdk.pricing.models.RecurringInterval; -import saasus.sdk.pricing.models.UnitType; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -52,7 +51,7 @@ /** * PricingFixedUnitForSave */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class PricingFixedUnitForSave { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -66,10 +65,6 @@ public class PricingFixedUnitForSave { @SerializedName(SERIALIZED_NAME_DESCRIPTION) private String description; - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private UnitType type; - public static final String SERIALIZED_NAME_CURRENCY = "currency"; @SerializedName(SERIALIZED_NAME_CURRENCY) private Currency currency; @@ -82,6 +77,60 @@ public class PricingFixedUnitForSave { @SerializedName(SERIALIZED_NAME_RECURRING_INTERVAL) private RecurringInterval recurringInterval; + /** + * Gets or Sets uType + */ + @JsonAdapter(UTypeEnum.Adapter.class) + public enum UTypeEnum { + FIXED("fixed"); + + private String value; + + UTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static UTypeEnum fromValue(String value) { + for (UTypeEnum b : UTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final UTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public UTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return UTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + UTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_U_TYPE = "u_type"; + @SerializedName(SERIALIZED_NAME_U_TYPE) + private UTypeEnum uType; + public PricingFixedUnitForSave() { } @@ -142,25 +191,6 @@ public void setDescription(String description) { } - public PricingFixedUnitForSave type(UnitType type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public UnitType getType() { - return type; - } - - public void setType(UnitType type) { - this.type = type; - } - - public PricingFixedUnitForSave currency(Currency currency) { this.currency = currency; return this; @@ -218,6 +248,25 @@ public void setRecurringInterval(RecurringInterval recurringInterval) { } + public PricingFixedUnitForSave uType(UTypeEnum uType) { + this.uType = uType; + return this; + } + + /** + * Get uType + * @return uType + **/ + @javax.annotation.Nonnull + public UTypeEnum getuType() { + return uType; + } + + public void setuType(UTypeEnum uType) { + this.uType = uType; + } + + @Override public boolean equals(Object o) { @@ -231,15 +280,15 @@ public boolean equals(Object o) { return Objects.equals(this.name, pricingFixedUnitForSave.name) && Objects.equals(this.displayName, pricingFixedUnitForSave.displayName) && Objects.equals(this.description, pricingFixedUnitForSave.description) && - Objects.equals(this.type, pricingFixedUnitForSave.type) && Objects.equals(this.currency, pricingFixedUnitForSave.currency) && Objects.equals(this.unitAmount, pricingFixedUnitForSave.unitAmount) && - Objects.equals(this.recurringInterval, pricingFixedUnitForSave.recurringInterval); + Objects.equals(this.recurringInterval, pricingFixedUnitForSave.recurringInterval) && + Objects.equals(this.uType, pricingFixedUnitForSave.uType); } @Override public int hashCode() { - return Objects.hash(name, displayName, description, type, currency, unitAmount, recurringInterval); + return Objects.hash(name, displayName, description, currency, unitAmount, recurringInterval, uType); } @Override @@ -249,10 +298,10 @@ public String toString() { sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); sb.append(" unitAmount: ").append(toIndentedString(unitAmount)).append("\n"); sb.append(" recurringInterval: ").append(toIndentedString(recurringInterval)).append("\n"); + sb.append(" uType: ").append(toIndentedString(uType)).append("\n"); sb.append("}"); return sb.toString(); } @@ -278,20 +327,20 @@ private String toIndentedString(Object o) { openapiFields.add("name"); openapiFields.add("display_name"); openapiFields.add("description"); - openapiFields.add("type"); openapiFields.add("currency"); openapiFields.add("unit_amount"); openapiFields.add("recurring_interval"); + openapiFields.add("u_type"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("name"); openapiRequiredFields.add("display_name"); openapiRequiredFields.add("description"); - openapiRequiredFields.add("type"); openapiRequiredFields.add("currency"); openapiRequiredFields.add("unit_amount"); openapiRequiredFields.add("recurring_interval"); + openapiRequiredFields.add("u_type"); } /** @@ -331,12 +380,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } - // validate the required field `type` - UnitType.validateJsonElement(jsonObj.get("type")); // validate the required field `currency` Currency.validateJsonElement(jsonObj.get("currency")); // validate the required field `recurring_interval` RecurringInterval.validateJsonElement(jsonObj.get("recurring_interval")); + if (!jsonObj.get("u_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `u_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("u_type").toString())); + } + // validate the required field `u_type` + UTypeEnum.validateJsonElement(jsonObj.get("u_type")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/saasus/sdk/pricing/models/PricingMenu.java b/src/main/java/saasus/sdk/pricing/models/PricingMenu.java index d4f90905..ed72f83b 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingMenu.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingMenu.java @@ -52,7 +52,7 @@ /** * PricingMenu */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class PricingMenu { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/saasus/sdk/pricing/models/PricingMenuProps.java b/src/main/java/saasus/sdk/pricing/models/PricingMenuProps.java index 183edcef..48dcdbde 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingMenuProps.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingMenuProps.java @@ -52,7 +52,7 @@ /** * PricingMenuProps */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class PricingMenuProps { public static final String SERIALIZED_NAME_UNITS = "units"; @SerializedName(SERIALIZED_NAME_UNITS) diff --git a/src/main/java/saasus/sdk/pricing/models/PricingMenus.java b/src/main/java/saasus/sdk/pricing/models/PricingMenus.java index 62d22f2c..195a4635 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingMenus.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingMenus.java @@ -52,7 +52,7 @@ /** * PricingMenus */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class PricingMenus { public static final String SERIALIZED_NAME_PRICING_MENUS = "pricing_menus"; @SerializedName(SERIALIZED_NAME_PRICING_MENUS) diff --git a/src/main/java/saasus/sdk/pricing/models/PricingPlan.java b/src/main/java/saasus/sdk/pricing/models/PricingPlan.java index a2a43273..121f4ea1 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingPlan.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingPlan.java @@ -52,7 +52,7 @@ /** * PricingPlan */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class PricingPlan { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/saasus/sdk/pricing/models/PricingPlanProps.java b/src/main/java/saasus/sdk/pricing/models/PricingPlanProps.java index e6c45625..83d56d4f 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingPlanProps.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingPlanProps.java @@ -52,7 +52,7 @@ /** * PricingPlanProps */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class PricingPlanProps { public static final String SERIALIZED_NAME_PRICING_MENUS = "pricing_menus"; @SerializedName(SERIALIZED_NAME_PRICING_MENUS) diff --git a/src/main/java/saasus/sdk/pricing/models/PricingPlans.java b/src/main/java/saasus/sdk/pricing/models/PricingPlans.java index c467ec47..1159096f 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingPlans.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingPlans.java @@ -52,7 +52,7 @@ /** * PricingPlans */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class PricingPlans { public static final String SERIALIZED_NAME_PRICING_PLANS = "pricing_plans"; @SerializedName(SERIALIZED_NAME_PRICING_PLANS) diff --git a/src/main/java/saasus/sdk/pricing/models/PricingTier.java b/src/main/java/saasus/sdk/pricing/models/PricingTier.java index 37e33394..147b458c 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingTier.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingTier.java @@ -49,7 +49,7 @@ /** * PricingTier */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class PricingTier { public static final String SERIALIZED_NAME_UP_TO = "up_to"; @SerializedName(SERIALIZED_NAME_UP_TO) diff --git a/src/main/java/saasus/sdk/pricing/models/PricingTieredUnit.java b/src/main/java/saasus/sdk/pricing/models/PricingTieredUnit.java index 2cba6dd7..b90322be 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingTieredUnit.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingTieredUnit.java @@ -27,7 +27,6 @@ import saasus.sdk.pricing.models.Currency; import saasus.sdk.pricing.models.PricingTier; import saasus.sdk.pricing.models.RecurringInterval; -import saasus.sdk.pricing.models.UnitType; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -56,7 +55,7 @@ /** * PricingTieredUnit */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class PricingTieredUnit { public static final String SERIALIZED_NAME_UPPER_COUNT = "upper_count"; @SerializedName(SERIALIZED_NAME_UPPER_COUNT) @@ -70,6 +69,60 @@ public class PricingTieredUnit { @SerializedName(SERIALIZED_NAME_AGGREGATE_USAGE) private AggregateUsage aggregateUsage; + /** + * Gets or Sets uType + */ + @JsonAdapter(UTypeEnum.Adapter.class) + public enum UTypeEnum { + TIERED("tiered"); + + private String value; + + UTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static UTypeEnum fromValue(String value) { + for (UTypeEnum b : UTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final UTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public UTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return UTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + UTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_U_TYPE = "u_type"; + @SerializedName(SERIALIZED_NAME_U_TYPE) + private UTypeEnum uType; + public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) private String name; @@ -82,10 +135,6 @@ public class PricingTieredUnit { @SerializedName(SERIALIZED_NAME_DESCRIPTION) private String description; - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private UnitType type; - public static final String SERIALIZED_NAME_CURRENCY = "currency"; @SerializedName(SERIALIZED_NAME_CURRENCY) private Currency currency; @@ -170,6 +219,25 @@ public void setAggregateUsage(AggregateUsage aggregateUsage) { } + public PricingTieredUnit uType(UTypeEnum uType) { + this.uType = uType; + return this; + } + + /** + * Get uType + * @return uType + **/ + @javax.annotation.Nonnull + public UTypeEnum getuType() { + return uType; + } + + public void setuType(UTypeEnum uType) { + this.uType = uType; + } + + public PricingTieredUnit name(String name) { this.name = name; return this; @@ -227,25 +295,6 @@ public void setDescription(String description) { } - public PricingTieredUnit type(UnitType type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public UnitType getType() { - return type; - } - - public void setType(UnitType type) { - this.type = type; - } - - public PricingTieredUnit currency(Currency currency) { this.currency = currency; return this; @@ -381,10 +430,10 @@ public boolean equals(Object o) { return Objects.equals(this.upperCount, pricingTieredUnit.upperCount) && Objects.equals(this.meteringUnitName, pricingTieredUnit.meteringUnitName) && Objects.equals(this.aggregateUsage, pricingTieredUnit.aggregateUsage) && + Objects.equals(this.uType, pricingTieredUnit.uType) && Objects.equals(this.name, pricingTieredUnit.name) && Objects.equals(this.displayName, pricingTieredUnit.displayName) && Objects.equals(this.description, pricingTieredUnit.description) && - Objects.equals(this.type, pricingTieredUnit.type) && Objects.equals(this.currency, pricingTieredUnit.currency) && Objects.equals(this.tiers, pricingTieredUnit.tiers) && Objects.equals(this.id, pricingTieredUnit.id) && @@ -395,7 +444,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(upperCount, meteringUnitName, aggregateUsage, name, displayName, description, type, currency, tiers, id, meteringUnitId, recurringInterval, used); + return Objects.hash(upperCount, meteringUnitName, aggregateUsage, uType, name, displayName, description, currency, tiers, id, meteringUnitId, recurringInterval, used); } @Override @@ -405,10 +454,10 @@ public String toString() { sb.append(" upperCount: ").append(toIndentedString(upperCount)).append("\n"); sb.append(" meteringUnitName: ").append(toIndentedString(meteringUnitName)).append("\n"); sb.append(" aggregateUsage: ").append(toIndentedString(aggregateUsage)).append("\n"); + sb.append(" uType: ").append(toIndentedString(uType)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); sb.append(" tiers: ").append(toIndentedString(tiers)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); @@ -440,10 +489,10 @@ private String toIndentedString(Object o) { openapiFields.add("upper_count"); openapiFields.add("metering_unit_name"); openapiFields.add("aggregate_usage"); + openapiFields.add("u_type"); openapiFields.add("name"); openapiFields.add("display_name"); openapiFields.add("description"); - openapiFields.add("type"); openapiFields.add("currency"); openapiFields.add("tiers"); openapiFields.add("id"); @@ -455,10 +504,10 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); openapiRequiredFields.add("upper_count"); openapiRequiredFields.add("metering_unit_name"); + openapiRequiredFields.add("u_type"); openapiRequiredFields.add("name"); openapiRequiredFields.add("display_name"); openapiRequiredFields.add("description"); - openapiRequiredFields.add("type"); openapiRequiredFields.add("currency"); openapiRequiredFields.add("tiers"); openapiRequiredFields.add("id"); @@ -502,6 +551,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("aggregate_usage") != null && !jsonObj.get("aggregate_usage").isJsonNull()) { AggregateUsage.validateJsonElement(jsonObj.get("aggregate_usage")); } + if (!jsonObj.get("u_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `u_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("u_type").toString())); + } + // validate the required field `u_type` + UTypeEnum.validateJsonElement(jsonObj.get("u_type")); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -511,8 +565,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } - // validate the required field `type` - UnitType.validateJsonElement(jsonObj.get("type")); // validate the required field `currency` Currency.validateJsonElement(jsonObj.get("currency")); // ensure the json data is an array diff --git a/src/main/java/saasus/sdk/pricing/models/PricingTieredUnitForSave.java b/src/main/java/saasus/sdk/pricing/models/PricingTieredUnitForSave.java index c33398af..6a9b2943 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingTieredUnitForSave.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingTieredUnitForSave.java @@ -26,7 +26,6 @@ import saasus.sdk.pricing.models.AggregateUsage; import saasus.sdk.pricing.models.Currency; import saasus.sdk.pricing.models.PricingTier; -import saasus.sdk.pricing.models.UnitType; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -55,7 +54,7 @@ /** * PricingTieredUnitForSave */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class PricingTieredUnitForSave { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -69,10 +68,6 @@ public class PricingTieredUnitForSave { @SerializedName(SERIALIZED_NAME_DESCRIPTION) private String description; - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private UnitType type; - public static final String SERIALIZED_NAME_CURRENCY = "currency"; @SerializedName(SERIALIZED_NAME_CURRENCY) private Currency currency; @@ -93,6 +88,60 @@ public class PricingTieredUnitForSave { @SerializedName(SERIALIZED_NAME_AGGREGATE_USAGE) private AggregateUsage aggregateUsage; + /** + * Gets or Sets uType + */ + @JsonAdapter(UTypeEnum.Adapter.class) + public enum UTypeEnum { + TIERED("tiered"); + + private String value; + + UTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static UTypeEnum fromValue(String value) { + for (UTypeEnum b : UTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final UTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public UTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return UTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + UTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_U_TYPE = "u_type"; + @SerializedName(SERIALIZED_NAME_U_TYPE) + private UTypeEnum uType; + public PricingTieredUnitForSave() { } @@ -153,25 +202,6 @@ public void setDescription(String description) { } - public PricingTieredUnitForSave type(UnitType type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public UnitType getType() { - return type; - } - - public void setType(UnitType type) { - this.type = type; - } - - public PricingTieredUnitForSave currency(Currency currency) { this.currency = currency; return this; @@ -275,6 +305,25 @@ public void setAggregateUsage(AggregateUsage aggregateUsage) { } + public PricingTieredUnitForSave uType(UTypeEnum uType) { + this.uType = uType; + return this; + } + + /** + * Get uType + * @return uType + **/ + @javax.annotation.Nonnull + public UTypeEnum getuType() { + return uType; + } + + public void setuType(UTypeEnum uType) { + this.uType = uType; + } + + @Override public boolean equals(Object o) { @@ -288,17 +337,17 @@ public boolean equals(Object o) { return Objects.equals(this.name, pricingTieredUnitForSave.name) && Objects.equals(this.displayName, pricingTieredUnitForSave.displayName) && Objects.equals(this.description, pricingTieredUnitForSave.description) && - Objects.equals(this.type, pricingTieredUnitForSave.type) && Objects.equals(this.currency, pricingTieredUnitForSave.currency) && Objects.equals(this.tiers, pricingTieredUnitForSave.tiers) && Objects.equals(this.upperCount, pricingTieredUnitForSave.upperCount) && Objects.equals(this.meteringUnitName, pricingTieredUnitForSave.meteringUnitName) && - Objects.equals(this.aggregateUsage, pricingTieredUnitForSave.aggregateUsage); + Objects.equals(this.aggregateUsage, pricingTieredUnitForSave.aggregateUsage) && + Objects.equals(this.uType, pricingTieredUnitForSave.uType); } @Override public int hashCode() { - return Objects.hash(name, displayName, description, type, currency, tiers, upperCount, meteringUnitName, aggregateUsage); + return Objects.hash(name, displayName, description, currency, tiers, upperCount, meteringUnitName, aggregateUsage, uType); } @Override @@ -308,12 +357,12 @@ public String toString() { sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); sb.append(" tiers: ").append(toIndentedString(tiers)).append("\n"); sb.append(" upperCount: ").append(toIndentedString(upperCount)).append("\n"); sb.append(" meteringUnitName: ").append(toIndentedString(meteringUnitName)).append("\n"); sb.append(" aggregateUsage: ").append(toIndentedString(aggregateUsage)).append("\n"); + sb.append(" uType: ").append(toIndentedString(uType)).append("\n"); sb.append("}"); return sb.toString(); } @@ -339,23 +388,23 @@ private String toIndentedString(Object o) { openapiFields.add("name"); openapiFields.add("display_name"); openapiFields.add("description"); - openapiFields.add("type"); openapiFields.add("currency"); openapiFields.add("tiers"); openapiFields.add("upper_count"); openapiFields.add("metering_unit_name"); openapiFields.add("aggregate_usage"); + openapiFields.add("u_type"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("name"); openapiRequiredFields.add("display_name"); openapiRequiredFields.add("description"); - openapiRequiredFields.add("type"); openapiRequiredFields.add("currency"); openapiRequiredFields.add("tiers"); openapiRequiredFields.add("upper_count"); openapiRequiredFields.add("metering_unit_name"); + openapiRequiredFields.add("u_type"); } /** @@ -395,8 +444,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } - // validate the required field `type` - UnitType.validateJsonElement(jsonObj.get("type")); // validate the required field `currency` Currency.validateJsonElement(jsonObj.get("currency")); // ensure the json data is an array @@ -416,6 +463,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("aggregate_usage") != null && !jsonObj.get("aggregate_usage").isJsonNull()) { AggregateUsage.validateJsonElement(jsonObj.get("aggregate_usage")); } + if (!jsonObj.get("u_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `u_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("u_type").toString())); + } + // validate the required field `u_type` + UTypeEnum.validateJsonElement(jsonObj.get("u_type")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/saasus/sdk/pricing/models/PricingTieredUsageUnit.java b/src/main/java/saasus/sdk/pricing/models/PricingTieredUsageUnit.java index f6c857c3..801f1999 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingTieredUsageUnit.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingTieredUsageUnit.java @@ -27,7 +27,6 @@ import saasus.sdk.pricing.models.Currency; import saasus.sdk.pricing.models.PricingTier; import saasus.sdk.pricing.models.RecurringInterval; -import saasus.sdk.pricing.models.UnitType; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -56,7 +55,7 @@ /** * PricingTieredUsageUnit */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class PricingTieredUsageUnit { public static final String SERIALIZED_NAME_UPPER_COUNT = "upper_count"; @SerializedName(SERIALIZED_NAME_UPPER_COUNT) @@ -70,6 +69,60 @@ public class PricingTieredUsageUnit { @SerializedName(SERIALIZED_NAME_AGGREGATE_USAGE) private AggregateUsage aggregateUsage; + /** + * Gets or Sets uType + */ + @JsonAdapter(UTypeEnum.Adapter.class) + public enum UTypeEnum { + TIERED_USAGE("tiered_usage"); + + private String value; + + UTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static UTypeEnum fromValue(String value) { + for (UTypeEnum b : UTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final UTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public UTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return UTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + UTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_U_TYPE = "u_type"; + @SerializedName(SERIALIZED_NAME_U_TYPE) + private UTypeEnum uType; + public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) private String name; @@ -82,10 +135,6 @@ public class PricingTieredUsageUnit { @SerializedName(SERIALIZED_NAME_DESCRIPTION) private String description; - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private UnitType type; - public static final String SERIALIZED_NAME_CURRENCY = "currency"; @SerializedName(SERIALIZED_NAME_CURRENCY) private Currency currency; @@ -170,6 +219,25 @@ public void setAggregateUsage(AggregateUsage aggregateUsage) { } + public PricingTieredUsageUnit uType(UTypeEnum uType) { + this.uType = uType; + return this; + } + + /** + * Get uType + * @return uType + **/ + @javax.annotation.Nonnull + public UTypeEnum getuType() { + return uType; + } + + public void setuType(UTypeEnum uType) { + this.uType = uType; + } + + public PricingTieredUsageUnit name(String name) { this.name = name; return this; @@ -227,25 +295,6 @@ public void setDescription(String description) { } - public PricingTieredUsageUnit type(UnitType type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public UnitType getType() { - return type; - } - - public void setType(UnitType type) { - this.type = type; - } - - public PricingTieredUsageUnit currency(Currency currency) { this.currency = currency; return this; @@ -381,10 +430,10 @@ public boolean equals(Object o) { return Objects.equals(this.upperCount, pricingTieredUsageUnit.upperCount) && Objects.equals(this.meteringUnitName, pricingTieredUsageUnit.meteringUnitName) && Objects.equals(this.aggregateUsage, pricingTieredUsageUnit.aggregateUsage) && + Objects.equals(this.uType, pricingTieredUsageUnit.uType) && Objects.equals(this.name, pricingTieredUsageUnit.name) && Objects.equals(this.displayName, pricingTieredUsageUnit.displayName) && Objects.equals(this.description, pricingTieredUsageUnit.description) && - Objects.equals(this.type, pricingTieredUsageUnit.type) && Objects.equals(this.currency, pricingTieredUsageUnit.currency) && Objects.equals(this.tiers, pricingTieredUsageUnit.tiers) && Objects.equals(this.id, pricingTieredUsageUnit.id) && @@ -395,7 +444,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(upperCount, meteringUnitName, aggregateUsage, name, displayName, description, type, currency, tiers, id, meteringUnitId, recurringInterval, used); + return Objects.hash(upperCount, meteringUnitName, aggregateUsage, uType, name, displayName, description, currency, tiers, id, meteringUnitId, recurringInterval, used); } @Override @@ -405,10 +454,10 @@ public String toString() { sb.append(" upperCount: ").append(toIndentedString(upperCount)).append("\n"); sb.append(" meteringUnitName: ").append(toIndentedString(meteringUnitName)).append("\n"); sb.append(" aggregateUsage: ").append(toIndentedString(aggregateUsage)).append("\n"); + sb.append(" uType: ").append(toIndentedString(uType)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); sb.append(" tiers: ").append(toIndentedString(tiers)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); @@ -440,10 +489,10 @@ private String toIndentedString(Object o) { openapiFields.add("upper_count"); openapiFields.add("metering_unit_name"); openapiFields.add("aggregate_usage"); + openapiFields.add("u_type"); openapiFields.add("name"); openapiFields.add("display_name"); openapiFields.add("description"); - openapiFields.add("type"); openapiFields.add("currency"); openapiFields.add("tiers"); openapiFields.add("id"); @@ -455,10 +504,10 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); openapiRequiredFields.add("upper_count"); openapiRequiredFields.add("metering_unit_name"); + openapiRequiredFields.add("u_type"); openapiRequiredFields.add("name"); openapiRequiredFields.add("display_name"); openapiRequiredFields.add("description"); - openapiRequiredFields.add("type"); openapiRequiredFields.add("currency"); openapiRequiredFields.add("tiers"); openapiRequiredFields.add("id"); @@ -502,6 +551,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("aggregate_usage") != null && !jsonObj.get("aggregate_usage").isJsonNull()) { AggregateUsage.validateJsonElement(jsonObj.get("aggregate_usage")); } + if (!jsonObj.get("u_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `u_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("u_type").toString())); + } + // validate the required field `u_type` + UTypeEnum.validateJsonElement(jsonObj.get("u_type")); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -511,8 +565,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } - // validate the required field `type` - UnitType.validateJsonElement(jsonObj.get("type")); // validate the required field `currency` Currency.validateJsonElement(jsonObj.get("currency")); // ensure the json data is an array diff --git a/src/main/java/saasus/sdk/pricing/models/PricingTieredUsageUnitForSave.java b/src/main/java/saasus/sdk/pricing/models/PricingTieredUsageUnitForSave.java index 762e3bcf..4e00f542 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingTieredUsageUnitForSave.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingTieredUsageUnitForSave.java @@ -26,7 +26,6 @@ import saasus.sdk.pricing.models.AggregateUsage; import saasus.sdk.pricing.models.Currency; import saasus.sdk.pricing.models.PricingTier; -import saasus.sdk.pricing.models.UnitType; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -55,7 +54,7 @@ /** * PricingTieredUsageUnitForSave */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class PricingTieredUsageUnitForSave { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -69,10 +68,6 @@ public class PricingTieredUsageUnitForSave { @SerializedName(SERIALIZED_NAME_DESCRIPTION) private String description; - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private UnitType type; - public static final String SERIALIZED_NAME_CURRENCY = "currency"; @SerializedName(SERIALIZED_NAME_CURRENCY) private Currency currency; @@ -93,6 +88,60 @@ public class PricingTieredUsageUnitForSave { @SerializedName(SERIALIZED_NAME_AGGREGATE_USAGE) private AggregateUsage aggregateUsage; + /** + * Gets or Sets uType + */ + @JsonAdapter(UTypeEnum.Adapter.class) + public enum UTypeEnum { + TIERED_USAGE("tiered_usage"); + + private String value; + + UTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static UTypeEnum fromValue(String value) { + for (UTypeEnum b : UTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final UTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public UTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return UTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + UTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_U_TYPE = "u_type"; + @SerializedName(SERIALIZED_NAME_U_TYPE) + private UTypeEnum uType; + public PricingTieredUsageUnitForSave() { } @@ -153,25 +202,6 @@ public void setDescription(String description) { } - public PricingTieredUsageUnitForSave type(UnitType type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public UnitType getType() { - return type; - } - - public void setType(UnitType type) { - this.type = type; - } - - public PricingTieredUsageUnitForSave currency(Currency currency) { this.currency = currency; return this; @@ -275,6 +305,25 @@ public void setAggregateUsage(AggregateUsage aggregateUsage) { } + public PricingTieredUsageUnitForSave uType(UTypeEnum uType) { + this.uType = uType; + return this; + } + + /** + * Get uType + * @return uType + **/ + @javax.annotation.Nonnull + public UTypeEnum getuType() { + return uType; + } + + public void setuType(UTypeEnum uType) { + this.uType = uType; + } + + @Override public boolean equals(Object o) { @@ -288,17 +337,17 @@ public boolean equals(Object o) { return Objects.equals(this.name, pricingTieredUsageUnitForSave.name) && Objects.equals(this.displayName, pricingTieredUsageUnitForSave.displayName) && Objects.equals(this.description, pricingTieredUsageUnitForSave.description) && - Objects.equals(this.type, pricingTieredUsageUnitForSave.type) && Objects.equals(this.currency, pricingTieredUsageUnitForSave.currency) && Objects.equals(this.tiers, pricingTieredUsageUnitForSave.tiers) && Objects.equals(this.upperCount, pricingTieredUsageUnitForSave.upperCount) && Objects.equals(this.meteringUnitName, pricingTieredUsageUnitForSave.meteringUnitName) && - Objects.equals(this.aggregateUsage, pricingTieredUsageUnitForSave.aggregateUsage); + Objects.equals(this.aggregateUsage, pricingTieredUsageUnitForSave.aggregateUsage) && + Objects.equals(this.uType, pricingTieredUsageUnitForSave.uType); } @Override public int hashCode() { - return Objects.hash(name, displayName, description, type, currency, tiers, upperCount, meteringUnitName, aggregateUsage); + return Objects.hash(name, displayName, description, currency, tiers, upperCount, meteringUnitName, aggregateUsage, uType); } @Override @@ -308,12 +357,12 @@ public String toString() { sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); sb.append(" tiers: ").append(toIndentedString(tiers)).append("\n"); sb.append(" upperCount: ").append(toIndentedString(upperCount)).append("\n"); sb.append(" meteringUnitName: ").append(toIndentedString(meteringUnitName)).append("\n"); sb.append(" aggregateUsage: ").append(toIndentedString(aggregateUsage)).append("\n"); + sb.append(" uType: ").append(toIndentedString(uType)).append("\n"); sb.append("}"); return sb.toString(); } @@ -339,23 +388,23 @@ private String toIndentedString(Object o) { openapiFields.add("name"); openapiFields.add("display_name"); openapiFields.add("description"); - openapiFields.add("type"); openapiFields.add("currency"); openapiFields.add("tiers"); openapiFields.add("upper_count"); openapiFields.add("metering_unit_name"); openapiFields.add("aggregate_usage"); + openapiFields.add("u_type"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("name"); openapiRequiredFields.add("display_name"); openapiRequiredFields.add("description"); - openapiRequiredFields.add("type"); openapiRequiredFields.add("currency"); openapiRequiredFields.add("tiers"); openapiRequiredFields.add("upper_count"); openapiRequiredFields.add("metering_unit_name"); + openapiRequiredFields.add("u_type"); } /** @@ -395,8 +444,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } - // validate the required field `type` - UnitType.validateJsonElement(jsonObj.get("type")); // validate the required field `currency` Currency.validateJsonElement(jsonObj.get("currency")); // ensure the json data is an array @@ -416,6 +463,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("aggregate_usage") != null && !jsonObj.get("aggregate_usage").isJsonNull()) { AggregateUsage.validateJsonElement(jsonObj.get("aggregate_usage")); } + if (!jsonObj.get("u_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `u_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("u_type").toString())); + } + // validate the required field `u_type` + UTypeEnum.validateJsonElement(jsonObj.get("u_type")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/saasus/sdk/pricing/models/PricingTiers.java b/src/main/java/saasus/sdk/pricing/models/PricingTiers.java index 4529b92c..0871bc1c 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingTiers.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingTiers.java @@ -52,7 +52,7 @@ /** * PricingTiers */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class PricingTiers { public static final String SERIALIZED_NAME_TIERS = "tiers"; @SerializedName(SERIALIZED_NAME_TIERS) diff --git a/src/main/java/saasus/sdk/pricing/models/PricingUnit.java b/src/main/java/saasus/sdk/pricing/models/PricingUnit.java index eb5b8dbf..96832234 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingUnit.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingUnit.java @@ -31,7 +31,6 @@ import saasus.sdk.pricing.models.PricingTieredUsageUnit; import saasus.sdk.pricing.models.PricingUsageUnit; import saasus.sdk.pricing.models.RecurringInterval; -import saasus.sdk.pricing.models.UnitType; @@ -68,7 +67,7 @@ import saasus.sdk.pricing.JSON; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class PricingUnit extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(PricingUnit.class.getName()); @@ -129,11 +128,11 @@ public PricingUnit read(JsonReader in) throws IOException { // use discriminator value for faster oneOf lookup PricingUnit newPricingUnit = new PricingUnit(); - if (jsonObject.get("type") == null) { - log.log(Level.WARNING, "Failed to lookup discriminator value for PricingUnit as `type` was not found in the payload or the payload is empty."); + if (jsonObject.get("u_type") == null) { + log.log(Level.WARNING, "Failed to lookup discriminator value for PricingUnit as `u_type` was not found in the payload or the payload is empty."); } else { - // look up the discriminator value in the field `type` - switch (jsonObject.get("type").getAsString()) { + // look up the discriminator value in the field `u_type` + switch (jsonObject.get("u_type").getAsString()) { case "fixed": deserialized = adapterPricingFixedUnit.fromJsonTree(jsonObject); newPricingUnit.setActualInstance(deserialized); @@ -167,7 +166,7 @@ public PricingUnit read(JsonReader in) throws IOException { newPricingUnit.setActualInstance(deserialized); return newPricingUnit; default: - log.log(Level.WARNING, String.format("Failed to lookup discriminator value `%s` for PricingUnit. Possible values: fixed tiered tiered_usage usage PricingFixedUnit PricingTieredUnit PricingTieredUsageUnit PricingUsageUnit", jsonObject.get("type").getAsString())); + log.log(Level.WARNING, String.format("Failed to lookup discriminator value `%s` for PricingUnit. Possible values: fixed tiered tiered_usage usage PricingFixedUnit PricingTieredUnit PricingTieredUsageUnit PricingUsageUnit", jsonObject.get("u_type").getAsString())); } } diff --git a/src/main/java/saasus/sdk/pricing/models/PricingUnitBaseProps.java b/src/main/java/saasus/sdk/pricing/models/PricingUnitBaseProps.java index 36aa5231..49961494 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingUnitBaseProps.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingUnitBaseProps.java @@ -22,7 +22,6 @@ import java.io.IOException; import java.util.Arrays; import saasus.sdk.pricing.models.Currency; -import saasus.sdk.pricing.models.UnitType; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -51,7 +50,7 @@ /** * PricingUnitBaseProps */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class PricingUnitBaseProps { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -65,10 +64,6 @@ public class PricingUnitBaseProps { @SerializedName(SERIALIZED_NAME_DESCRIPTION) private String description; - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private UnitType type; - public static final String SERIALIZED_NAME_CURRENCY = "currency"; @SerializedName(SERIALIZED_NAME_CURRENCY) private Currency currency; @@ -133,25 +128,6 @@ public void setDescription(String description) { } - public PricingUnitBaseProps type(UnitType type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public UnitType getType() { - return type; - } - - public void setType(UnitType type) { - this.type = type; - } - - public PricingUnitBaseProps currency(Currency currency) { this.currency = currency; return this; @@ -184,13 +160,12 @@ public boolean equals(Object o) { return Objects.equals(this.name, pricingUnitBaseProps.name) && Objects.equals(this.displayName, pricingUnitBaseProps.displayName) && Objects.equals(this.description, pricingUnitBaseProps.description) && - Objects.equals(this.type, pricingUnitBaseProps.type) && Objects.equals(this.currency, pricingUnitBaseProps.currency); } @Override public int hashCode() { - return Objects.hash(name, displayName, description, type, currency); + return Objects.hash(name, displayName, description, currency); } @Override @@ -200,7 +175,6 @@ public String toString() { sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); sb.append("}"); return sb.toString(); @@ -227,7 +201,6 @@ private String toIndentedString(Object o) { openapiFields.add("name"); openapiFields.add("display_name"); openapiFields.add("description"); - openapiFields.add("type"); openapiFields.add("currency"); // a set of required properties/fields (JSON key names) @@ -235,7 +208,6 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("name"); openapiRequiredFields.add("display_name"); openapiRequiredFields.add("description"); - openapiRequiredFields.add("type"); openapiRequiredFields.add("currency"); } @@ -276,8 +248,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } - // validate the required field `type` - UnitType.validateJsonElement(jsonObj.get("type")); // validate the required field `currency` Currency.validateJsonElement(jsonObj.get("currency")); } diff --git a/src/main/java/saasus/sdk/pricing/models/PricingUnitForSave.java b/src/main/java/saasus/sdk/pricing/models/PricingUnitForSave.java index a49481ff..0e9af6c3 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingUnitForSave.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingUnitForSave.java @@ -31,7 +31,6 @@ import saasus.sdk.pricing.models.PricingTieredUsageUnitForSave; import saasus.sdk.pricing.models.PricingUsageUnitForSave; import saasus.sdk.pricing.models.RecurringInterval; -import saasus.sdk.pricing.models.UnitType; @@ -68,7 +67,7 @@ import saasus.sdk.pricing.JSON; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class PricingUnitForSave extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(PricingUnitForSave.class.getName()); @@ -129,11 +128,11 @@ public PricingUnitForSave read(JsonReader in) throws IOException { // use discriminator value for faster oneOf lookup PricingUnitForSave newPricingUnitForSave = new PricingUnitForSave(); - if (jsonObject.get("type") == null) { - log.log(Level.WARNING, "Failed to lookup discriminator value for PricingUnitForSave as `type` was not found in the payload or the payload is empty."); + if (jsonObject.get("u_type") == null) { + log.log(Level.WARNING, "Failed to lookup discriminator value for PricingUnitForSave as `u_type` was not found in the payload or the payload is empty."); } else { - // look up the discriminator value in the field `type` - switch (jsonObject.get("type").getAsString()) { + // look up the discriminator value in the field `u_type` + switch (jsonObject.get("u_type").getAsString()) { case "fixed": deserialized = adapterPricingFixedUnitForSave.fromJsonTree(jsonObject); newPricingUnitForSave.setActualInstance(deserialized); @@ -167,7 +166,7 @@ public PricingUnitForSave read(JsonReader in) throws IOException { newPricingUnitForSave.setActualInstance(deserialized); return newPricingUnitForSave; default: - log.log(Level.WARNING, String.format("Failed to lookup discriminator value `%s` for PricingUnitForSave. Possible values: fixed tiered tiered_usage usage PricingFixedUnitForSave PricingTieredUnitForSave PricingTieredUsageUnitForSave PricingUsageUnitForSave", jsonObject.get("type").getAsString())); + log.log(Level.WARNING, String.format("Failed to lookup discriminator value `%s` for PricingUnitForSave. Possible values: fixed tiered tiered_usage usage PricingFixedUnitForSave PricingTieredUnitForSave PricingTieredUsageUnitForSave PricingUsageUnitForSave", jsonObject.get("u_type").getAsString())); } } diff --git a/src/main/java/saasus/sdk/pricing/models/PricingUnits.java b/src/main/java/saasus/sdk/pricing/models/PricingUnits.java index 873572c7..f889f798 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingUnits.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingUnits.java @@ -52,7 +52,7 @@ /** * PricingUnits */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class PricingUnits { public static final String SERIALIZED_NAME_UNITS = "units"; @SerializedName(SERIALIZED_NAME_UNITS) diff --git a/src/main/java/saasus/sdk/pricing/models/PricingUsageUnit.java b/src/main/java/saasus/sdk/pricing/models/PricingUsageUnit.java index 40309216..0228a1e0 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingUsageUnit.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingUsageUnit.java @@ -24,7 +24,6 @@ import saasus.sdk.pricing.models.AggregateUsage; import saasus.sdk.pricing.models.Currency; import saasus.sdk.pricing.models.RecurringInterval; -import saasus.sdk.pricing.models.UnitType; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -53,7 +52,7 @@ /** * PricingUsageUnit */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class PricingUsageUnit { public static final String SERIALIZED_NAME_UPPER_COUNT = "upper_count"; @SerializedName(SERIALIZED_NAME_UPPER_COUNT) @@ -71,6 +70,60 @@ public class PricingUsageUnit { @SerializedName(SERIALIZED_NAME_AGGREGATE_USAGE) private AggregateUsage aggregateUsage; + /** + * Gets or Sets uType + */ + @JsonAdapter(UTypeEnum.Adapter.class) + public enum UTypeEnum { + USAGE("usage"); + + private String value; + + UTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static UTypeEnum fromValue(String value) { + for (UTypeEnum b : UTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final UTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public UTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return UTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + UTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_U_TYPE = "u_type"; + @SerializedName(SERIALIZED_NAME_U_TYPE) + private UTypeEnum uType; + public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) private String name; @@ -83,10 +136,6 @@ public class PricingUsageUnit { @SerializedName(SERIALIZED_NAME_DESCRIPTION) private String description; - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private UnitType type; - public static final String SERIALIZED_NAME_CURRENCY = "currency"; @SerializedName(SERIALIZED_NAME_CURRENCY) private Currency currency; @@ -186,6 +235,25 @@ public void setAggregateUsage(AggregateUsage aggregateUsage) { } + public PricingUsageUnit uType(UTypeEnum uType) { + this.uType = uType; + return this; + } + + /** + * Get uType + * @return uType + **/ + @javax.annotation.Nonnull + public UTypeEnum getuType() { + return uType; + } + + public void setuType(UTypeEnum uType) { + this.uType = uType; + } + + public PricingUsageUnit name(String name) { this.name = name; return this; @@ -243,25 +311,6 @@ public void setDescription(String description) { } - public PricingUsageUnit type(UnitType type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public UnitType getType() { - return type; - } - - public void setType(UnitType type) { - this.type = type; - } - - public PricingUsageUnit currency(Currency currency) { this.currency = currency; return this; @@ -371,10 +420,10 @@ public boolean equals(Object o) { Objects.equals(this.unitAmount, pricingUsageUnit.unitAmount) && Objects.equals(this.meteringUnitName, pricingUsageUnit.meteringUnitName) && Objects.equals(this.aggregateUsage, pricingUsageUnit.aggregateUsage) && + Objects.equals(this.uType, pricingUsageUnit.uType) && Objects.equals(this.name, pricingUsageUnit.name) && Objects.equals(this.displayName, pricingUsageUnit.displayName) && Objects.equals(this.description, pricingUsageUnit.description) && - Objects.equals(this.type, pricingUsageUnit.type) && Objects.equals(this.currency, pricingUsageUnit.currency) && Objects.equals(this.id, pricingUsageUnit.id) && Objects.equals(this.meteringUnitId, pricingUsageUnit.meteringUnitId) && @@ -384,7 +433,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(upperCount, unitAmount, meteringUnitName, aggregateUsage, name, displayName, description, type, currency, id, meteringUnitId, recurringInterval, used); + return Objects.hash(upperCount, unitAmount, meteringUnitName, aggregateUsage, uType, name, displayName, description, currency, id, meteringUnitId, recurringInterval, used); } @Override @@ -395,10 +444,10 @@ public String toString() { sb.append(" unitAmount: ").append(toIndentedString(unitAmount)).append("\n"); sb.append(" meteringUnitName: ").append(toIndentedString(meteringUnitName)).append("\n"); sb.append(" aggregateUsage: ").append(toIndentedString(aggregateUsage)).append("\n"); + sb.append(" uType: ").append(toIndentedString(uType)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" meteringUnitId: ").append(toIndentedString(meteringUnitId)).append("\n"); @@ -430,10 +479,10 @@ private String toIndentedString(Object o) { openapiFields.add("unit_amount"); openapiFields.add("metering_unit_name"); openapiFields.add("aggregate_usage"); + openapiFields.add("u_type"); openapiFields.add("name"); openapiFields.add("display_name"); openapiFields.add("description"); - openapiFields.add("type"); openapiFields.add("currency"); openapiFields.add("id"); openapiFields.add("metering_unit_id"); @@ -445,10 +494,10 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("upper_count"); openapiRequiredFields.add("unit_amount"); openapiRequiredFields.add("metering_unit_name"); + openapiRequiredFields.add("u_type"); openapiRequiredFields.add("name"); openapiRequiredFields.add("display_name"); openapiRequiredFields.add("description"); - openapiRequiredFields.add("type"); openapiRequiredFields.add("currency"); openapiRequiredFields.add("id"); openapiRequiredFields.add("metering_unit_id"); @@ -491,6 +540,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("aggregate_usage") != null && !jsonObj.get("aggregate_usage").isJsonNull()) { AggregateUsage.validateJsonElement(jsonObj.get("aggregate_usage")); } + if (!jsonObj.get("u_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `u_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("u_type").toString())); + } + // validate the required field `u_type` + UTypeEnum.validateJsonElement(jsonObj.get("u_type")); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -500,8 +554,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } - // validate the required field `type` - UnitType.validateJsonElement(jsonObj.get("type")); // validate the required field `currency` Currency.validateJsonElement(jsonObj.get("currency")); if (!jsonObj.get("id").isJsonPrimitive()) { diff --git a/src/main/java/saasus/sdk/pricing/models/PricingUsageUnitForSave.java b/src/main/java/saasus/sdk/pricing/models/PricingUsageUnitForSave.java index ad624973..60de1f1a 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingUsageUnitForSave.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingUsageUnitForSave.java @@ -23,7 +23,6 @@ import java.util.Arrays; import saasus.sdk.pricing.models.AggregateUsage; import saasus.sdk.pricing.models.Currency; -import saasus.sdk.pricing.models.UnitType; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -52,7 +51,7 @@ /** * PricingUsageUnitForSave */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class PricingUsageUnitForSave { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -66,10 +65,6 @@ public class PricingUsageUnitForSave { @SerializedName(SERIALIZED_NAME_DESCRIPTION) private String description; - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private UnitType type; - public static final String SERIALIZED_NAME_CURRENCY = "currency"; @SerializedName(SERIALIZED_NAME_CURRENCY) private Currency currency; @@ -90,6 +85,60 @@ public class PricingUsageUnitForSave { @SerializedName(SERIALIZED_NAME_AGGREGATE_USAGE) private AggregateUsage aggregateUsage; + /** + * Gets or Sets uType + */ + @JsonAdapter(UTypeEnum.Adapter.class) + public enum UTypeEnum { + USAGE("usage"); + + private String value; + + UTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static UTypeEnum fromValue(String value) { + for (UTypeEnum b : UTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final UTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public UTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return UTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + UTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_U_TYPE = "u_type"; + @SerializedName(SERIALIZED_NAME_U_TYPE) + private UTypeEnum uType; + public PricingUsageUnitForSave() { } @@ -150,25 +199,6 @@ public void setDescription(String description) { } - public PricingUsageUnitForSave type(UnitType type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public UnitType getType() { - return type; - } - - public void setType(UnitType type) { - this.type = type; - } - - public PricingUsageUnitForSave currency(Currency currency) { this.currency = currency; return this; @@ -264,6 +294,25 @@ public void setAggregateUsage(AggregateUsage aggregateUsage) { } + public PricingUsageUnitForSave uType(UTypeEnum uType) { + this.uType = uType; + return this; + } + + /** + * Get uType + * @return uType + **/ + @javax.annotation.Nonnull + public UTypeEnum getuType() { + return uType; + } + + public void setuType(UTypeEnum uType) { + this.uType = uType; + } + + @Override public boolean equals(Object o) { @@ -277,17 +326,17 @@ public boolean equals(Object o) { return Objects.equals(this.name, pricingUsageUnitForSave.name) && Objects.equals(this.displayName, pricingUsageUnitForSave.displayName) && Objects.equals(this.description, pricingUsageUnitForSave.description) && - Objects.equals(this.type, pricingUsageUnitForSave.type) && Objects.equals(this.currency, pricingUsageUnitForSave.currency) && Objects.equals(this.upperCount, pricingUsageUnitForSave.upperCount) && Objects.equals(this.unitAmount, pricingUsageUnitForSave.unitAmount) && Objects.equals(this.meteringUnitName, pricingUsageUnitForSave.meteringUnitName) && - Objects.equals(this.aggregateUsage, pricingUsageUnitForSave.aggregateUsage); + Objects.equals(this.aggregateUsage, pricingUsageUnitForSave.aggregateUsage) && + Objects.equals(this.uType, pricingUsageUnitForSave.uType); } @Override public int hashCode() { - return Objects.hash(name, displayName, description, type, currency, upperCount, unitAmount, meteringUnitName, aggregateUsage); + return Objects.hash(name, displayName, description, currency, upperCount, unitAmount, meteringUnitName, aggregateUsage, uType); } @Override @@ -297,12 +346,12 @@ public String toString() { sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); sb.append(" upperCount: ").append(toIndentedString(upperCount)).append("\n"); sb.append(" unitAmount: ").append(toIndentedString(unitAmount)).append("\n"); sb.append(" meteringUnitName: ").append(toIndentedString(meteringUnitName)).append("\n"); sb.append(" aggregateUsage: ").append(toIndentedString(aggregateUsage)).append("\n"); + sb.append(" uType: ").append(toIndentedString(uType)).append("\n"); sb.append("}"); return sb.toString(); } @@ -328,23 +377,23 @@ private String toIndentedString(Object o) { openapiFields.add("name"); openapiFields.add("display_name"); openapiFields.add("description"); - openapiFields.add("type"); openapiFields.add("currency"); openapiFields.add("upper_count"); openapiFields.add("unit_amount"); openapiFields.add("metering_unit_name"); openapiFields.add("aggregate_usage"); + openapiFields.add("u_type"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("name"); openapiRequiredFields.add("display_name"); openapiRequiredFields.add("description"); - openapiRequiredFields.add("type"); openapiRequiredFields.add("currency"); openapiRequiredFields.add("upper_count"); openapiRequiredFields.add("unit_amount"); openapiRequiredFields.add("metering_unit_name"); + openapiRequiredFields.add("u_type"); } /** @@ -384,8 +433,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } - // validate the required field `type` - UnitType.validateJsonElement(jsonObj.get("type")); // validate the required field `currency` Currency.validateJsonElement(jsonObj.get("currency")); if (!jsonObj.get("metering_unit_name").isJsonPrimitive()) { @@ -395,6 +442,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("aggregate_usage") != null && !jsonObj.get("aggregate_usage").isJsonNull()) { AggregateUsage.validateJsonElement(jsonObj.get("aggregate_usage")); } + if (!jsonObj.get("u_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `u_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("u_type").toString())); + } + // validate the required field `u_type` + UTypeEnum.validateJsonElement(jsonObj.get("u_type")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/saasus/sdk/pricing/models/SavePricingMenuParam.java b/src/main/java/saasus/sdk/pricing/models/SavePricingMenuParam.java index 3295fb0b..14e4ef31 100644 --- a/src/main/java/saasus/sdk/pricing/models/SavePricingMenuParam.java +++ b/src/main/java/saasus/sdk/pricing/models/SavePricingMenuParam.java @@ -51,7 +51,7 @@ /** * SavePricingMenuParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class SavePricingMenuParam { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/saasus/sdk/pricing/models/SavePricingPlanParam.java b/src/main/java/saasus/sdk/pricing/models/SavePricingPlanParam.java index 22349a5e..d36f1df2 100644 --- a/src/main/java/saasus/sdk/pricing/models/SavePricingPlanParam.java +++ b/src/main/java/saasus/sdk/pricing/models/SavePricingPlanParam.java @@ -51,7 +51,7 @@ /** * SavePricingPlanParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class SavePricingPlanParam { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/saasus/sdk/pricing/models/TaxRate.java b/src/main/java/saasus/sdk/pricing/models/TaxRate.java index bbf50c33..bbf497bc 100644 --- a/src/main/java/saasus/sdk/pricing/models/TaxRate.java +++ b/src/main/java/saasus/sdk/pricing/models/TaxRate.java @@ -50,7 +50,7 @@ /** * TaxRate */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class TaxRate { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/saasus/sdk/pricing/models/TaxRateProps.java b/src/main/java/saasus/sdk/pricing/models/TaxRateProps.java index c7fd2262..e6fd95c8 100644 --- a/src/main/java/saasus/sdk/pricing/models/TaxRateProps.java +++ b/src/main/java/saasus/sdk/pricing/models/TaxRateProps.java @@ -50,7 +50,7 @@ /** * TaxRateProps */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class TaxRateProps { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/saasus/sdk/pricing/models/TaxRates.java b/src/main/java/saasus/sdk/pricing/models/TaxRates.java index 7d66aae4..7a45e4c8 100644 --- a/src/main/java/saasus/sdk/pricing/models/TaxRates.java +++ b/src/main/java/saasus/sdk/pricing/models/TaxRates.java @@ -52,7 +52,7 @@ /** * TaxRates */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class TaxRates { public static final String SERIALIZED_NAME_TAX_RATES = "tax_rates"; @SerializedName(SERIALIZED_NAME_TAX_RATES) diff --git a/src/main/java/saasus/sdk/pricing/models/UpdateMeteringUnitTimestampCountNowParam.java b/src/main/java/saasus/sdk/pricing/models/UpdateMeteringUnitTimestampCountNowParam.java index 6ff8b491..cb5db6d8 100644 --- a/src/main/java/saasus/sdk/pricing/models/UpdateMeteringUnitTimestampCountNowParam.java +++ b/src/main/java/saasus/sdk/pricing/models/UpdateMeteringUnitTimestampCountNowParam.java @@ -50,7 +50,7 @@ /** * UpdateMeteringUnitTimestampCountNowParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class UpdateMeteringUnitTimestampCountNowParam { public static final String SERIALIZED_NAME_METHOD = "method"; @SerializedName(SERIALIZED_NAME_METHOD) diff --git a/src/main/java/saasus/sdk/pricing/models/UpdateMeteringUnitTimestampCountParam.java b/src/main/java/saasus/sdk/pricing/models/UpdateMeteringUnitTimestampCountParam.java index 8c7128d4..a998fc27 100644 --- a/src/main/java/saasus/sdk/pricing/models/UpdateMeteringUnitTimestampCountParam.java +++ b/src/main/java/saasus/sdk/pricing/models/UpdateMeteringUnitTimestampCountParam.java @@ -50,7 +50,7 @@ /** * UpdateMeteringUnitTimestampCountParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class UpdateMeteringUnitTimestampCountParam { public static final String SERIALIZED_NAME_METHOD = "method"; @SerializedName(SERIALIZED_NAME_METHOD) diff --git a/src/main/java/saasus/sdk/pricing/models/UpdatePricingPlansUsedParam.java b/src/main/java/saasus/sdk/pricing/models/UpdatePricingPlansUsedParam.java index cf893eda..774c24f4 100644 --- a/src/main/java/saasus/sdk/pricing/models/UpdatePricingPlansUsedParam.java +++ b/src/main/java/saasus/sdk/pricing/models/UpdatePricingPlansUsedParam.java @@ -51,7 +51,7 @@ /** * UpdatePricingPlansUsedParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class UpdatePricingPlansUsedParam { public static final String SERIALIZED_NAME_PLAN_IDS = "plan_ids"; @SerializedName(SERIALIZED_NAME_PLAN_IDS) diff --git a/src/main/java/saasus/sdk/pricing/models/UpdateTaxRateParam.java b/src/main/java/saasus/sdk/pricing/models/UpdateTaxRateParam.java index 226c26a1..cb1f2ce2 100644 --- a/src/main/java/saasus/sdk/pricing/models/UpdateTaxRateParam.java +++ b/src/main/java/saasus/sdk/pricing/models/UpdateTaxRateParam.java @@ -49,7 +49,7 @@ /** * UpdateTaxRateParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-16T05:09:27.364679080Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") public class UpdateTaxRateParam { public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) diff --git a/src/main/java/saasus/sdk/util/apiserver/ApiServer.java b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java index 07e31ae7..6e53f81d 100644 --- a/src/main/java/saasus/sdk/util/apiserver/ApiServer.java +++ b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java @@ -1,14 +1,30 @@ package saasus.sdk.util.apiserver; +import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import com.sun.net.httpserver.HttpExchange; import com.sun.net.httpserver.HttpHandler; import com.sun.net.httpserver.HttpServer; +import saasus.sdk.modules.Configuration; +import saasus.sdk.apigateway.ApiException; +import saasus.sdk.apigateway.api.SmartApiGatewayApi; +import saasus.sdk.apigateway.models.ApiGatewaySettings; +import saasus.sdk.apigateway.models.ApiGatewayTenant; +import saasus.sdk.apigateway.models.ApiKey; +import saasus.sdk.apigateway.models.TenantRouting; +import saasus.sdk.apigateway.models.TenantRoutingType; +import saasus.sdk.auth.api.CredentialApi; +import saasus.sdk.modules.ApiGatewayApiClient; +import saasus.sdk.modules.AuthApiClient; + import java.io.IOException; import java.io.OutputStream; +import java.io.PrintWriter; +import java.io.StringWriter; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Parameter; @@ -46,6 +62,12 @@ public void handle(HttpExchange exchange) throws IOException { // 戻り値をAPI定義に従ってJSONに変換して返す // エラー処理は、適切なHTTPステータスコードを返す(要検討) + // TODO: 変更あり + String apiKey = exchange.getRequestHeaders().getFirst("x-api-key"); + if (apiKey == null || apiKey.isEmpty()) { + sendResponse(exchange, 401, "Missing API key in x-api-key header"); + return; + } String path = exchange.getRequestURI().getPath(); String[] pathParts = path.split("/"); @@ -54,8 +76,55 @@ public void handle(HttpExchange exchange) throws IOException { return; } + System.out.println("Path parts: " + String.join(", ", pathParts)); + // set default value String className = pathParts[1]; String methodName = pathParts[2]; + + // custom routing + String routingValue = null; + try { + routingValue = getRoutingValue(apiKey); + System.out.println("Routing value: " + routingValue); + } catch (ApiException e) { + System.out.println("API Error: " + e.getMessage()); + e.printStackTrace(); + sendResponse(exchange, 500, "API Error: " + e.getMessage()); + return; + } catch (Exception e) { + System.out.println("Error getting routing value: " + e.getMessage()); + e.printStackTrace(); + sendResponse(exchange, 500, "Error getting routing value: " + e.getMessage()); + return; + } + + // routing is required + if (routingValue != null && !routingValue.isEmpty()) { + System.out.println("Routing value found: " + routingValue); + + if (path.contains("/" + routingValue + "/")) { + // パスからルーティング値を削除して再分割 + String newPath = path.replace("/" + routingValue, ""); + String[] newPathParts = newPath.split("/"); + + if (newPathParts.length >= 3) { + className = newPathParts[1]; + methodName = newPathParts[2]; + System.out.println("Updated class name: " + className + ", method name: " + methodName); + } else { + sendResponse(exchange, 400, "Invalid path after routing: " + newPath); + return; + } + } else { + // routing value not found in URL + sendResponse(exchange, 403, "Access denied: Required routing path '" + routingValue + "' not found in URL"); + return; + } + } else { + // default class and method + System.out.println("No routing value found, using default class and method"); + } + Map queryParams = parseQueryParams(exchange.getRequestURI()); try { @@ -71,12 +140,16 @@ public void handle(HttpExchange exchange) throws IOException { sendResponse(exchange, 404, "Method not found: " + methodName); } } catch (ClassNotFoundException e) { + e.printStackTrace(); sendResponse(exchange, 404, "Class not found: " + className); } catch (InvocationTargetException | IllegalAccessException e) { + e.printStackTrace(); sendResponse(exchange, 500, "Error invoking method: " + e.getMessage()); } catch (IllegalArgumentException e) { + e.printStackTrace(); sendResponse(exchange, 400, "Invalid arguments: " + e.getMessage()); } catch (Exception e) { + e.printStackTrace(); sendResponse(exchange, 500, "Internal server error: " + e.getMessage()); } } @@ -159,6 +232,61 @@ private void sendResponse(HttpExchange exchange, int statusCode, String response os.write(responseBytes); } } + + private String getRoutingValue(String apiKey) throws ApiException { + ApiGatewayApiClient apiClient = new Configuration().getApiGatewayApiClient(); + SmartApiGatewayApi apiInstance = new SmartApiGatewayApi(apiClient); + + ApiGatewaySettings settings = apiInstance.getApiGatewaySettings(); + if (settings == null) { + System.out.println("API Gateway Settings not found"); + throw new ApiException("API Gateway Settings not found"); + } + + String tenantRoutingType = settings.getTenantRoutingType().getValue(); + if (tenantRoutingType == null || tenantRoutingType.isEmpty()) { + System.out.println("Tenant Routing Type not found"); + throw new ApiException("Tenant Routing Type not found"); + } + + // APIキーからテナント情報を取得(全ルーティングタイプで必要) + ApiKey apiKeyObj = apiInstance.getApiKey(apiKey); + if (apiKeyObj == null) { + System.out.println("API Key not found: " + apiKey); + throw new ApiException("API Key not found: " + apiKey); + } + + // テナント設定情報を取得 + ApiGatewayTenant tenant = apiInstance.getTenant(apiKeyObj.getTenantId()); + if (tenant == null) { + System.out.println("Tenant not found for ID: " + apiKeyObj.getTenantId()); + throw new ApiException("Tenant not found for ID: " + apiKeyObj.getTenantId()); + } + + TenantRouting routing = tenant.getRouting(); + if (routing == null) { + System.out.println("Routing not found for tenant: " + apiKeyObj.getTenantId()); + throw new ApiException("Routing not found for tenant: " + apiKeyObj.getTenantId()); + } + switch (tenantRoutingType.toLowerCase()) { + case "none": + System.out.println("Tenant Routing Type is none"); + return null; + case "path": + System.out.println("Tenant Routing Type is path"); + return routing.getPath(); + case "hostname": + System.out.println("Tenant Routing Type is hostname"); + // not implemented + return null; + case "headervalue": + System.out.println("Tenant Routing Type is headervalue"); + // not implemented + return null; + default: + throw new ApiException("Invalid tenantRoutingType: " + tenantRoutingType); + } + } } // サンプルAPIクラス diff --git a/src/test/java/saasus/sdk/apigateway/api/ErrorApiTest.java b/src/test/java/saasus/sdk/apigateway/api/ErrorApiTest.java new file mode 100644 index 00000000..998d050c --- /dev/null +++ b/src/test/java/saasus/sdk/apigateway/api/ErrorApiTest.java @@ -0,0 +1,47 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.api; + +import saasus.sdk.apigateway.ApiException; +import saasus.sdk.apigateway.models.Error; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for ErrorApi + */ +@Disabled +public class ErrorApiTest { + + private final ErrorApi api = new ErrorApi(); + + /** + * Return Internal Server Error + * + * This endpoint is used for testing purposes. Returns a server error with status code 500. + * + * @throws ApiException if the Api call fails + */ + @Test + public void returnInternalServerErrorTest() throws ApiException { + api.returnInternalServerError(); + // TODO: test validations + } + +} diff --git a/src/test/java/saasus/sdk/apigateway/api/SmartApiGatewayApiTest.java b/src/test/java/saasus/sdk/apigateway/api/SmartApiGatewayApiTest.java new file mode 100644 index 00000000..c8de485d --- /dev/null +++ b/src/test/java/saasus/sdk/apigateway/api/SmartApiGatewayApiTest.java @@ -0,0 +1,224 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.api; + +import saasus.sdk.apigateway.ApiException; +import saasus.sdk.apigateway.models.ApiGatewayInputFile; +import saasus.sdk.apigateway.models.ApiGatewaySettings; +import saasus.sdk.apigateway.models.ApiGatewayTenant; +import saasus.sdk.apigateway.models.ApiKey; +import saasus.sdk.apigateway.models.ApiKeys; +import saasus.sdk.apigateway.models.CloudFormationLaunchStackLink; +import saasus.sdk.apigateway.models.CreateApiKeyParam; +import saasus.sdk.apigateway.models.Error; +import saasus.sdk.apigateway.models.UpdateApiGatewaySettingsParam; +import saasus.sdk.apigateway.models.UpdateTenantParam; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for SmartApiGatewayApi + */ +@Disabled +public class SmartApiGatewayApiTest { + + private final SmartApiGatewayApi api = new SmartApiGatewayApi(); + + /** + * Create the API Gateway + * + * Create the API Gateway. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createApiGatewayTest() throws ApiException { + api.createApiGateway(); + // TODO: test validations + } + + /** + * Create an API key + * + * Creates or updates an API key based on the contents of the request body. All parameters are in the request body: - tenant_id, env_id (required) - user_id (optional) + * + * @throws ApiException if the Api call fails + */ + @Test + public void createApiKeyTest() throws ApiException { + CreateApiKeyParam createApiKeyParam = null; + ApiKey response = api.createApiKey(createApiKeyParam); + // TODO: test validations + } + + /** + * Obtain configuration information for api gateway function + * + * Obtain configuration information for api gateway function. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getApiGatewaySettingsTest() throws ApiException { + ApiGatewaySettings response = api.getApiGatewaySettings(); + // TODO: test validations + } + + /** + * get API key details by API key + * + * Get the details of the API key by specifying the API key. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getApiKeyTest() throws ApiException { + String apiKey = null; + ApiKey response = api.getApiKey(apiKey); + // TODO: test validations + } + + /** + * API key list or get API key by condition + * + * The response content changes based on the combination of parameters tenant_id, env_id, and user_id. - If tenant_id is not specified, the full list is returned. - If only tenant_id is specified, the API keys within that tenant are returned. - If tenant_id and env_id are specified, the keys are filtered by the environment. - If tenant_id, env_id, and user_id are specified, a complete match returns the API keys for the target user. - Additionally, searching is supported even when only env_id or only user_id are provided. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getApiKeysTest() throws ApiException { + String tenantId = null; + Integer envId = null; + String userId = null; + Boolean tenantOnly = null; + ApiKeys response = api.getApiKeys(tenantId, envId, userId, tenantOnly); + // TODO: test validations + } + + /** + * Get the link to create the AWS CloudFormation stack + * + * Get the CloudFormation Quick Create link. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getCloudFormationLaunchStackLinkTest() throws ApiException { + CloudFormationLaunchStackLink response = api.getCloudFormationLaunchStackLink(); + // TODO: test validations + } + + /** + * Get tenant information + * + * Get tenant information. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getTenantTest() throws ApiException { + String tenantId = null; + ApiGatewayTenant response = api.getTenant(tenantId); + // TODO: test validations + } + + /** + * Publish the API Gateway + * + * Publish the API Gateway. + * + * @throws ApiException if the Api call fails + */ + @Test + public void publishApiGatewayTest() throws ApiException { + api.publishApiGateway(); + // TODO: test validations + } + + /** + * Update the client secret of the API key + * + * Update the client secret of the API key. + * + * @throws ApiException if the Api call fails + */ + @Test + public void refreshClientSecretTest() throws ApiException { + String apiKey = null; + ApiKey response = api.refreshClientSecret(apiKey); + // TODO: test validations + } + + /** + * Unpublish the API Gateway + * + * Unpublish the API Gateway. + * + * @throws ApiException if the Api call fails + */ + @Test + public void unpublishApiGatewayTest() throws ApiException { + api.unpublishApiGateway(); + // TODO: test validations + } + + /** + * Update configuration information for api gateway function + * + * Update configuration information for api gateway function. + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateApiGatewaySettingsTest() throws ApiException { + UpdateApiGatewaySettingsParam updateApiGatewaySettingsParam = null; + api.updateApiGatewaySettings(updateApiGatewaySettingsParam); + // TODO: test validations + } + + /** + * Update tenant information + * + * Update tenant information. + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateTenantTest() throws ApiException { + String tenantId = null; + UpdateTenantParam updateTenantParam = null; + api.updateTenant(tenantId, updateTenantParam); + // TODO: test validations + } + + /** + * Upload files to create an API Gateway + * + * Upload files to create an API Gateway + * + * @throws ApiException if the Api call fails + */ + @Test + public void uploadGenerationFilesTest() throws ApiException { + ApiGatewayInputFile apiGatewayInputFile = null; + api.uploadGenerationFiles(apiGatewayInputFile); + // TODO: test validations + } + +} diff --git a/src/test/java/saasus/sdk/apigateway/models/ApiGatewayInputFileTest.java b/src/test/java/saasus/sdk/apigateway/models/ApiGatewayInputFileTest.java new file mode 100644 index 00000000..d111918a --- /dev/null +++ b/src/test/java/saasus/sdk/apigateway/models/ApiGatewayInputFileTest.java @@ -0,0 +1,48 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.models; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ApiGatewayInputFile + */ +public class ApiGatewayInputFileTest { + private final ApiGatewayInputFile model = new ApiGatewayInputFile(); + + /** + * Model tests for ApiGatewayInputFile + */ + @Test + public void testApiGatewayInputFile() { + // TODO: test ApiGatewayInputFile + } + + /** + * Test the property 'content' + */ + @Test + public void contentTest() { + // TODO: test content + } + +} diff --git a/src/test/java/saasus/sdk/apigateway/models/ApiGatewaySettingsTest.java b/src/test/java/saasus/sdk/apigateway/models/ApiGatewaySettingsTest.java new file mode 100644 index 00000000..6d245a56 --- /dev/null +++ b/src/test/java/saasus/sdk/apigateway/models/ApiGatewaySettingsTest.java @@ -0,0 +1,229 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.models; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import saasus.sdk.apigateway.models.DnsRecord; +import saasus.sdk.apigateway.models.EndpointSettings; +import saasus.sdk.apigateway.models.TenantRoutingType; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ApiGatewaySettings + */ +public class ApiGatewaySettingsTest { + private final ApiGatewaySettings model = new ApiGatewaySettings(); + + /** + * Model tests for ApiGatewaySettings + */ + @Test + public void testApiGatewaySettings() { + // TODO: test ApiGatewaySettings + } + + /** + * Test the property 'generatedFileStatus' + */ + @Test + public void generatedFileStatusTest() { + // TODO: test generatedFileStatus + } + + /** + * Test the property 'internalEndpointOpenapiDefinitionFileDownloadUrl' + */ + @Test + public void internalEndpointOpenapiDefinitionFileDownloadUrlTest() { + // TODO: test internalEndpointOpenapiDefinitionFileDownloadUrl + } + + /** + * Test the property 'internalEndpointMappingFileDownloadUrl' + */ + @Test + public void internalEndpointMappingFileDownloadUrlTest() { + // TODO: test internalEndpointMappingFileDownloadUrl + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'roleArn' + */ + @Test + public void roleArnTest() { + // TODO: test roleArn + } + + /** + * Test the property 'roleExternalId' + */ + @Test + public void roleExternalIdTest() { + // TODO: test roleExternalId + } + + /** + * Test the property 'internalEndpointHealthCheckPath' + */ + @Test + public void internalEndpointHealthCheckPathTest() { + // TODO: test internalEndpointHealthCheckPath + } + + /** + * Test the property 'internalEndpointHealthCheckPort' + */ + @Test + public void internalEndpointHealthCheckPortTest() { + // TODO: test internalEndpointHealthCheckPort + } + + /** + * Test the property 'internalEndpointHealthCheckProtocol' + */ + @Test + public void internalEndpointHealthCheckProtocolTest() { + // TODO: test internalEndpointHealthCheckProtocol + } + + /** + * Test the property 'internalEndpointHealthStatusCodes' + */ + @Test + public void internalEndpointHealthStatusCodesTest() { + // TODO: test internalEndpointHealthStatusCodes + } + + /** + * Test the property 'saasSubnetIds' + */ + @Test + public void saasSubnetIdsTest() { + // TODO: test saasSubnetIds + } + + /** + * Test the property 'saasVpcId' + */ + @Test + public void saasVpcIdTest() { + // TODO: test saasVpcId + } + + /** + * Test the property 'domainName' + */ + @Test + public void domainNameTest() { + // TODO: test domainName + } + + /** + * Test the property 'isDnsValidated' + */ + @Test + public void isDnsValidatedTest() { + // TODO: test isDnsValidated + } + + /** + * Test the property 'certificateDnsRecord' + */ + @Test + public void certificateDnsRecordTest() { + // TODO: test certificateDnsRecord + } + + /** + * Test the property 'cloudFrontDnsRecord' + */ + @Test + public void cloudFrontDnsRecordTest() { + // TODO: test cloudFrontDnsRecord + } + + /** + * Test the property 'vpcEndpointDnsRecord' + */ + @Test + public void vpcEndpointDnsRecordTest() { + // TODO: test vpcEndpointDnsRecord + } + + /** + * Test the property 'defaultDomainName' + */ + @Test + public void defaultDomainNameTest() { + // TODO: test defaultDomainName + } + + /** + * Test the property 'saasAlbArn' + */ + @Test + public void saasAlbArnTest() { + // TODO: test saasAlbArn + } + + /** + * Test the property 'restApiEndpoint' + */ + @Test + public void restApiEndpointTest() { + // TODO: test restApiEndpoint + } + + /** + * Test the property 'endpointSettingsList' + */ + @Test + public void endpointSettingsListTest() { + // TODO: test endpointSettingsList + } + + /** + * Test the property 'tenantRoutingType' + */ + @Test + public void tenantRoutingTypeTest() { + // TODO: test tenantRoutingType + } + + /** + * Test the property 'docsCloudFrontFqdn' + */ + @Test + public void docsCloudFrontFqdnTest() { + // TODO: test docsCloudFrontFqdn + } + +} diff --git a/src/test/java/saasus/sdk/apigateway/models/ApiGatewayTenantTest.java b/src/test/java/saasus/sdk/apigateway/models/ApiGatewayTenantTest.java new file mode 100644 index 00000000..5e16ed65 --- /dev/null +++ b/src/test/java/saasus/sdk/apigateway/models/ApiGatewayTenantTest.java @@ -0,0 +1,67 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.models; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import saasus.sdk.apigateway.models.TenantRouting; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ApiGatewayTenant + */ +public class ApiGatewayTenantTest { + private final ApiGatewayTenant model = new ApiGatewayTenant(); + + /** + * Model tests for ApiGatewayTenant + */ + @Test + public void testApiGatewayTenant() { + // TODO: test ApiGatewayTenant + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'allowedIps' + */ + @Test + public void allowedIpsTest() { + // TODO: test allowedIps + } + + /** + * Test the property 'routing' + */ + @Test + public void routingTest() { + // TODO: test routing + } + +} diff --git a/src/test/java/saasus/sdk/apigateway/models/ApiKeyTest.java b/src/test/java/saasus/sdk/apigateway/models/ApiKeyTest.java new file mode 100644 index 00000000..257d11cd --- /dev/null +++ b/src/test/java/saasus/sdk/apigateway/models/ApiKeyTest.java @@ -0,0 +1,80 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.models; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ApiKey + */ +public class ApiKeyTest { + private final ApiKey model = new ApiKey(); + + /** + * Model tests for ApiKey + */ + @Test + public void testApiKey() { + // TODO: test ApiKey + } + + /** + * Test the property 'apiKey' + */ + @Test + public void apiKeyTest() { + // TODO: test apiKey + } + + /** + * Test the property 'clientSecret' + */ + @Test + public void clientSecretTest() { + // TODO: test clientSecret + } + + /** + * Test the property 'tenantId' + */ + @Test + public void tenantIdTest() { + // TODO: test tenantId + } + + /** + * Test the property 'envId' + */ + @Test + public void envIdTest() { + // TODO: test envId + } + + /** + * Test the property 'userId' + */ + @Test + public void userIdTest() { + // TODO: test userId + } + +} diff --git a/src/test/java/saasus/sdk/apigateway/models/ApiKeysTest.java b/src/test/java/saasus/sdk/apigateway/models/ApiKeysTest.java new file mode 100644 index 00000000..bccadb4d --- /dev/null +++ b/src/test/java/saasus/sdk/apigateway/models/ApiKeysTest.java @@ -0,0 +1,51 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.models; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import saasus.sdk.apigateway.models.ApiKey; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ApiKeys + */ +public class ApiKeysTest { + private final ApiKeys model = new ApiKeys(); + + /** + * Model tests for ApiKeys + */ + @Test + public void testApiKeys() { + // TODO: test ApiKeys + } + + /** + * Test the property 'apiKeys' + */ + @Test + public void apiKeysTest() { + // TODO: test apiKeys + } + +} diff --git a/src/test/java/saasus/sdk/apigateway/models/CloudFormationLaunchStackLinkTest.java b/src/test/java/saasus/sdk/apigateway/models/CloudFormationLaunchStackLinkTest.java new file mode 100644 index 00000000..cbb909ed --- /dev/null +++ b/src/test/java/saasus/sdk/apigateway/models/CloudFormationLaunchStackLinkTest.java @@ -0,0 +1,48 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.models; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CloudFormationLaunchStackLink + */ +public class CloudFormationLaunchStackLinkTest { + private final CloudFormationLaunchStackLink model = new CloudFormationLaunchStackLink(); + + /** + * Model tests for CloudFormationLaunchStackLink + */ + @Test + public void testCloudFormationLaunchStackLink() { + // TODO: test CloudFormationLaunchStackLink + } + + /** + * Test the property 'link' + */ + @Test + public void linkTest() { + // TODO: test link + } + +} diff --git a/src/test/java/saasus/sdk/apigateway/models/CreateApiKeyParamTest.java b/src/test/java/saasus/sdk/apigateway/models/CreateApiKeyParamTest.java new file mode 100644 index 00000000..ee48c6a1 --- /dev/null +++ b/src/test/java/saasus/sdk/apigateway/models/CreateApiKeyParamTest.java @@ -0,0 +1,64 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.models; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CreateApiKeyParam + */ +public class CreateApiKeyParamTest { + private final CreateApiKeyParam model = new CreateApiKeyParam(); + + /** + * Model tests for CreateApiKeyParam + */ + @Test + public void testCreateApiKeyParam() { + // TODO: test CreateApiKeyParam + } + + /** + * Test the property 'tenantId' + */ + @Test + public void tenantIdTest() { + // TODO: test tenantId + } + + /** + * Test the property 'envId' + */ + @Test + public void envIdTest() { + // TODO: test envId + } + + /** + * Test the property 'userId' + */ + @Test + public void userIdTest() { + // TODO: test userId + } + +} diff --git a/src/test/java/saasus/sdk/apigateway/models/DnsRecordTest.java b/src/test/java/saasus/sdk/apigateway/models/DnsRecordTest.java new file mode 100644 index 00000000..aa898a37 --- /dev/null +++ b/src/test/java/saasus/sdk/apigateway/models/DnsRecordTest.java @@ -0,0 +1,64 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.models; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for DnsRecord + */ +public class DnsRecordTest { + private final DnsRecord model = new DnsRecord(); + + /** + * Model tests for DnsRecord + */ + @Test + public void testDnsRecord() { + // TODO: test DnsRecord + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'value' + */ + @Test + public void valueTest() { + // TODO: test value + } + +} diff --git a/src/test/java/saasus/sdk/apigateway/models/EndpointSettingsTest.java b/src/test/java/saasus/sdk/apigateway/models/EndpointSettingsTest.java new file mode 100644 index 00000000..09961336 --- /dev/null +++ b/src/test/java/saasus/sdk/apigateway/models/EndpointSettingsTest.java @@ -0,0 +1,75 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.models; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import saasus.sdk.apigateway.models.Throttling; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for EndpointSettings + */ +public class EndpointSettingsTest { + private final EndpointSettings model = new EndpointSettings(); + + /** + * Model tests for EndpointSettings + */ + @Test + public void testEndpointSettings() { + // TODO: test EndpointSettings + } + + /** + * Test the property 'path' + */ + @Test + public void pathTest() { + // TODO: test path + } + + /** + * Test the property 'method' + */ + @Test + public void methodTest() { + // TODO: test method + } + + /** + * Test the property 'throttling' + */ + @Test + public void throttlingTest() { + // TODO: test throttling + } + + /** + * Test the property 'roleNames' + */ + @Test + public void roleNamesTest() { + // TODO: test roleNames + } + +} diff --git a/src/test/java/saasus/sdk/apigateway/models/ErrorTest.java b/src/test/java/saasus/sdk/apigateway/models/ErrorTest.java new file mode 100644 index 00000000..16808a99 --- /dev/null +++ b/src/test/java/saasus/sdk/apigateway/models/ErrorTest.java @@ -0,0 +1,56 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.models; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Error + */ +public class ErrorTest { + private final Error model = new Error(); + + /** + * Model tests for Error + */ + @Test + public void testError() { + // TODO: test Error + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'message' + */ + @Test + public void messageTest() { + // TODO: test message + } + +} diff --git a/src/test/java/saasus/sdk/apigateway/models/TenantRoutingTest.java b/src/test/java/saasus/sdk/apigateway/models/TenantRoutingTest.java new file mode 100644 index 00000000..c809ecd7 --- /dev/null +++ b/src/test/java/saasus/sdk/apigateway/models/TenantRoutingTest.java @@ -0,0 +1,72 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.models; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for TenantRouting + */ +public class TenantRoutingTest { + private final TenantRouting model = new TenantRouting(); + + /** + * Model tests for TenantRouting + */ + @Test + public void testTenantRouting() { + // TODO: test TenantRouting + } + + /** + * Test the property 'path' + */ + @Test + public void pathTest() { + // TODO: test path + } + + /** + * Test the property 'headerKey' + */ + @Test + public void headerKeyTest() { + // TODO: test headerKey + } + + /** + * Test the property 'headerValue' + */ + @Test + public void headerValueTest() { + // TODO: test headerValue + } + + /** + * Test the property 'hostName' + */ + @Test + public void hostNameTest() { + // TODO: test hostName + } + +} diff --git a/src/test/java/saasus/sdk/apigateway/models/TenantRoutingTypeTest.java b/src/test/java/saasus/sdk/apigateway/models/TenantRoutingTypeTest.java new file mode 100644 index 00000000..93322f7b --- /dev/null +++ b/src/test/java/saasus/sdk/apigateway/models/TenantRoutingTypeTest.java @@ -0,0 +1,32 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.models; + +import com.google.gson.annotations.SerializedName; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for TenantRoutingType + */ +public class TenantRoutingTypeTest { + /** + * Model tests for TenantRoutingType + */ + @Test + public void testTenantRoutingType() { + // TODO: test TenantRoutingType + } + +} diff --git a/src/test/java/saasus/sdk/apigateway/models/ThrottlingTest.java b/src/test/java/saasus/sdk/apigateway/models/ThrottlingTest.java new file mode 100644 index 00000000..5c11a175 --- /dev/null +++ b/src/test/java/saasus/sdk/apigateway/models/ThrottlingTest.java @@ -0,0 +1,64 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.models; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Throttling + */ +public class ThrottlingTest { + private final Throttling model = new Throttling(); + + /** + * Model tests for Throttling + */ + @Test + public void testThrottling() { + // TODO: test Throttling + } + + /** + * Test the property 'target' + */ + @Test + public void targetTest() { + // TODO: test target + } + + /** + * Test the property 'range' + */ + @Test + public void rangeTest() { + // TODO: test range + } + + /** + * Test the property 'limit' + */ + @Test + public void limitTest() { + // TODO: test limit + } + +} diff --git a/src/test/java/saasus/sdk/apigateway/models/UpdateApiGatewaySettingsParamTest.java b/src/test/java/saasus/sdk/apigateway/models/UpdateApiGatewaySettingsParamTest.java new file mode 100644 index 00000000..92c5f797 --- /dev/null +++ b/src/test/java/saasus/sdk/apigateway/models/UpdateApiGatewaySettingsParamTest.java @@ -0,0 +1,140 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.models; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import saasus.sdk.apigateway.models.EndpointSettings; +import saasus.sdk.apigateway.models.TenantRoutingType; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for UpdateApiGatewaySettingsParam + */ +public class UpdateApiGatewaySettingsParamTest { + private final UpdateApiGatewaySettingsParam model = new UpdateApiGatewaySettingsParam(); + + /** + * Model tests for UpdateApiGatewaySettingsParam + */ + @Test + public void testUpdateApiGatewaySettingsParam() { + // TODO: test UpdateApiGatewaySettingsParam + } + + /** + * Test the property 'roleArn' + */ + @Test + public void roleArnTest() { + // TODO: test roleArn + } + + /** + * Test the property 'roleExternalId' + */ + @Test + public void roleExternalIdTest() { + // TODO: test roleExternalId + } + + /** + * Test the property 'internalEndpointHealthCheckPath' + */ + @Test + public void internalEndpointHealthCheckPathTest() { + // TODO: test internalEndpointHealthCheckPath + } + + /** + * Test the property 'internalEndpointHealthCheckPort' + */ + @Test + public void internalEndpointHealthCheckPortTest() { + // TODO: test internalEndpointHealthCheckPort + } + + /** + * Test the property 'internalEndpointHealthCheckProtocol' + */ + @Test + public void internalEndpointHealthCheckProtocolTest() { + // TODO: test internalEndpointHealthCheckProtocol + } + + /** + * Test the property 'internalEndpointHealthStatusCodes' + */ + @Test + public void internalEndpointHealthStatusCodesTest() { + // TODO: test internalEndpointHealthStatusCodes + } + + /** + * Test the property 'saasSubnetIds' + */ + @Test + public void saasSubnetIdsTest() { + // TODO: test saasSubnetIds + } + + /** + * Test the property 'saasVpcId' + */ + @Test + public void saasVpcIdTest() { + // TODO: test saasVpcId + } + + /** + * Test the property 'domainName' + */ + @Test + public void domainNameTest() { + // TODO: test domainName + } + + /** + * Test the property 'saasAlbArn' + */ + @Test + public void saasAlbArnTest() { + // TODO: test saasAlbArn + } + + /** + * Test the property 'endpointSettingsList' + */ + @Test + public void endpointSettingsListTest() { + // TODO: test endpointSettingsList + } + + /** + * Test the property 'tenantRoutingType' + */ + @Test + public void tenantRoutingTypeTest() { + // TODO: test tenantRoutingType + } + +} diff --git a/src/test/java/saasus/sdk/apigateway/models/UpdateTenantParamTest.java b/src/test/java/saasus/sdk/apigateway/models/UpdateTenantParamTest.java new file mode 100644 index 00000000..ef8089b2 --- /dev/null +++ b/src/test/java/saasus/sdk/apigateway/models/UpdateTenantParamTest.java @@ -0,0 +1,59 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.models; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import saasus.sdk.apigateway.models.TenantRouting; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for UpdateTenantParam + */ +public class UpdateTenantParamTest { + private final UpdateTenantParam model = new UpdateTenantParam(); + + /** + * Model tests for UpdateTenantParam + */ + @Test + public void testUpdateTenantParam() { + // TODO: test UpdateTenantParam + } + + /** + * Test the property 'allowedIps' + */ + @Test + public void allowedIpsTest() { + // TODO: test allowedIps + } + + /** + * Test the property 'routing' + */ + @Test + public void routingTest() { + // TODO: test routing + } + +} diff --git a/src/test/java/saasus/sdk/auth/api/SaasUserApiTest.java b/src/test/java/saasus/sdk/auth/api/SaasUserApiTest.java index 11155f93..38afd35e 100644 --- a/src/test/java/saasus/sdk/auth/api/SaasUserApiTest.java +++ b/src/test/java/saasus/sdk/auth/api/SaasUserApiTest.java @@ -97,7 +97,7 @@ public void confirmSignUpWithAwsMarketplaceTest() throws ApiException { /** * Create SaaS User * - * Create SaaS User. + * Create SaaS User. If attributes is empty, a temporary password will be sent to the registered email. * * @throws ApiException if the Api call fails */ diff --git a/src/test/java/saasus/sdk/pricing/models/PricingFixedUnitForSaveTest.java b/src/test/java/saasus/sdk/pricing/models/PricingFixedUnitForSaveTest.java index adc797a3..d95ea8c4 100644 --- a/src/test/java/saasus/sdk/pricing/models/PricingFixedUnitForSaveTest.java +++ b/src/test/java/saasus/sdk/pricing/models/PricingFixedUnitForSaveTest.java @@ -22,7 +22,6 @@ import java.util.Arrays; import saasus.sdk.pricing.models.Currency; import saasus.sdk.pricing.models.RecurringInterval; -import saasus.sdk.pricing.models.UnitType; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -64,14 +63,6 @@ public void descriptionTest() { // TODO: test description } - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - /** * Test the property 'currency' */ @@ -96,4 +87,12 @@ public void recurringIntervalTest() { // TODO: test recurringInterval } + /** + * Test the property 'uType' + */ + @Test + public void uTypeTest() { + // TODO: test uType + } + } diff --git a/src/test/java/saasus/sdk/pricing/models/PricingFixedUnitTest.java b/src/test/java/saasus/sdk/pricing/models/PricingFixedUnitTest.java index d59c784e..58ed64ca 100644 --- a/src/test/java/saasus/sdk/pricing/models/PricingFixedUnitTest.java +++ b/src/test/java/saasus/sdk/pricing/models/PricingFixedUnitTest.java @@ -22,7 +22,6 @@ import java.util.Arrays; import saasus.sdk.pricing.models.Currency; import saasus.sdk.pricing.models.RecurringInterval; -import saasus.sdk.pricing.models.UnitType; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -56,6 +55,14 @@ public void recurringIntervalTest() { // TODO: test recurringInterval } + /** + * Test the property 'uType' + */ + @Test + public void uTypeTest() { + // TODO: test uType + } + /** * Test the property 'name' */ @@ -80,14 +87,6 @@ public void descriptionTest() { // TODO: test description } - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - /** * Test the property 'currency' */ diff --git a/src/test/java/saasus/sdk/pricing/models/PricingTieredUnitForSaveTest.java b/src/test/java/saasus/sdk/pricing/models/PricingTieredUnitForSaveTest.java index 553c1509..1a485222 100644 --- a/src/test/java/saasus/sdk/pricing/models/PricingTieredUnitForSaveTest.java +++ b/src/test/java/saasus/sdk/pricing/models/PricingTieredUnitForSaveTest.java @@ -25,7 +25,6 @@ import saasus.sdk.pricing.models.AggregateUsage; import saasus.sdk.pricing.models.Currency; import saasus.sdk.pricing.models.PricingTier; -import saasus.sdk.pricing.models.UnitType; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -67,14 +66,6 @@ public void descriptionTest() { // TODO: test description } - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - /** * Test the property 'currency' */ @@ -115,4 +106,12 @@ public void aggregateUsageTest() { // TODO: test aggregateUsage } + /** + * Test the property 'uType' + */ + @Test + public void uTypeTest() { + // TODO: test uType + } + } diff --git a/src/test/java/saasus/sdk/pricing/models/PricingTieredUnitTest.java b/src/test/java/saasus/sdk/pricing/models/PricingTieredUnitTest.java index 9729b52c..7916314f 100644 --- a/src/test/java/saasus/sdk/pricing/models/PricingTieredUnitTest.java +++ b/src/test/java/saasus/sdk/pricing/models/PricingTieredUnitTest.java @@ -26,7 +26,6 @@ import saasus.sdk.pricing.models.Currency; import saasus.sdk.pricing.models.PricingTier; import saasus.sdk.pricing.models.RecurringInterval; -import saasus.sdk.pricing.models.UnitType; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -68,6 +67,14 @@ public void aggregateUsageTest() { // TODO: test aggregateUsage } + /** + * Test the property 'uType' + */ + @Test + public void uTypeTest() { + // TODO: test uType + } + /** * Test the property 'name' */ @@ -92,14 +99,6 @@ public void descriptionTest() { // TODO: test description } - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - /** * Test the property 'currency' */ diff --git a/src/test/java/saasus/sdk/pricing/models/PricingTieredUsageUnitForSaveTest.java b/src/test/java/saasus/sdk/pricing/models/PricingTieredUsageUnitForSaveTest.java index e2fc5841..e64356be 100644 --- a/src/test/java/saasus/sdk/pricing/models/PricingTieredUsageUnitForSaveTest.java +++ b/src/test/java/saasus/sdk/pricing/models/PricingTieredUsageUnitForSaveTest.java @@ -25,7 +25,6 @@ import saasus.sdk.pricing.models.AggregateUsage; import saasus.sdk.pricing.models.Currency; import saasus.sdk.pricing.models.PricingTier; -import saasus.sdk.pricing.models.UnitType; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -67,14 +66,6 @@ public void descriptionTest() { // TODO: test description } - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - /** * Test the property 'currency' */ @@ -115,4 +106,12 @@ public void aggregateUsageTest() { // TODO: test aggregateUsage } + /** + * Test the property 'uType' + */ + @Test + public void uTypeTest() { + // TODO: test uType + } + } diff --git a/src/test/java/saasus/sdk/pricing/models/PricingTieredUsageUnitTest.java b/src/test/java/saasus/sdk/pricing/models/PricingTieredUsageUnitTest.java index 7bef37ec..501091e4 100644 --- a/src/test/java/saasus/sdk/pricing/models/PricingTieredUsageUnitTest.java +++ b/src/test/java/saasus/sdk/pricing/models/PricingTieredUsageUnitTest.java @@ -26,7 +26,6 @@ import saasus.sdk.pricing.models.Currency; import saasus.sdk.pricing.models.PricingTier; import saasus.sdk.pricing.models.RecurringInterval; -import saasus.sdk.pricing.models.UnitType; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -68,6 +67,14 @@ public void aggregateUsageTest() { // TODO: test aggregateUsage } + /** + * Test the property 'uType' + */ + @Test + public void uTypeTest() { + // TODO: test uType + } + /** * Test the property 'name' */ @@ -92,14 +99,6 @@ public void descriptionTest() { // TODO: test description } - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - /** * Test the property 'currency' */ diff --git a/src/test/java/saasus/sdk/pricing/models/PricingUnitBasePropsTest.java b/src/test/java/saasus/sdk/pricing/models/PricingUnitBasePropsTest.java index 270939e0..24117491 100644 --- a/src/test/java/saasus/sdk/pricing/models/PricingUnitBasePropsTest.java +++ b/src/test/java/saasus/sdk/pricing/models/PricingUnitBasePropsTest.java @@ -21,7 +21,6 @@ import java.io.IOException; import java.util.Arrays; import saasus.sdk.pricing.models.Currency; -import saasus.sdk.pricing.models.UnitType; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -63,14 +62,6 @@ public void descriptionTest() { // TODO: test description } - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - /** * Test the property 'currency' */ diff --git a/src/test/java/saasus/sdk/pricing/models/PricingUnitForSaveTest.java b/src/test/java/saasus/sdk/pricing/models/PricingUnitForSaveTest.java index 5fc3e10e..18402d6d 100644 --- a/src/test/java/saasus/sdk/pricing/models/PricingUnitForSaveTest.java +++ b/src/test/java/saasus/sdk/pricing/models/PricingUnitForSaveTest.java @@ -30,7 +30,6 @@ import saasus.sdk.pricing.models.PricingTieredUsageUnitForSave; import saasus.sdk.pricing.models.PricingUsageUnitForSave; import saasus.sdk.pricing.models.RecurringInterval; -import saasus.sdk.pricing.models.UnitType; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -72,6 +71,14 @@ public void aggregateUsageTest() { // TODO: test aggregateUsage } + /** + * Test the property 'uType' + */ + @Test + public void uTypeTest() { + // TODO: test uType + } + /** * Test the property 'name' */ @@ -96,14 +103,6 @@ public void descriptionTest() { // TODO: test description } - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - /** * Test the property 'currency' */ diff --git a/src/test/java/saasus/sdk/pricing/models/PricingUnitTest.java b/src/test/java/saasus/sdk/pricing/models/PricingUnitTest.java index 878da36c..85c60ecd 100644 --- a/src/test/java/saasus/sdk/pricing/models/PricingUnitTest.java +++ b/src/test/java/saasus/sdk/pricing/models/PricingUnitTest.java @@ -30,7 +30,6 @@ import saasus.sdk.pricing.models.PricingTieredUsageUnit; import saasus.sdk.pricing.models.PricingUsageUnit; import saasus.sdk.pricing.models.RecurringInterval; -import saasus.sdk.pricing.models.UnitType; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -80,6 +79,14 @@ public void usedTest() { // TODO: test used } + /** + * Test the property 'uType' + */ + @Test + public void uTypeTest() { + // TODO: test uType + } + /** * Test the property 'upperCount' */ @@ -128,14 +135,6 @@ public void descriptionTest() { // TODO: test description } - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - /** * Test the property 'currency' */ diff --git a/src/test/java/saasus/sdk/pricing/models/PricingUsageUnitForSaveTest.java b/src/test/java/saasus/sdk/pricing/models/PricingUsageUnitForSaveTest.java index 9fa524c7..c3002a4f 100644 --- a/src/test/java/saasus/sdk/pricing/models/PricingUsageUnitForSaveTest.java +++ b/src/test/java/saasus/sdk/pricing/models/PricingUsageUnitForSaveTest.java @@ -22,7 +22,6 @@ import java.util.Arrays; import saasus.sdk.pricing.models.AggregateUsage; import saasus.sdk.pricing.models.Currency; -import saasus.sdk.pricing.models.UnitType; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -64,14 +63,6 @@ public void descriptionTest() { // TODO: test description } - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - /** * Test the property 'currency' */ @@ -112,4 +103,12 @@ public void aggregateUsageTest() { // TODO: test aggregateUsage } + /** + * Test the property 'uType' + */ + @Test + public void uTypeTest() { + // TODO: test uType + } + } diff --git a/src/test/java/saasus/sdk/pricing/models/PricingUsageUnitTest.java b/src/test/java/saasus/sdk/pricing/models/PricingUsageUnitTest.java index 2fc8882b..f64f5edd 100644 --- a/src/test/java/saasus/sdk/pricing/models/PricingUsageUnitTest.java +++ b/src/test/java/saasus/sdk/pricing/models/PricingUsageUnitTest.java @@ -23,7 +23,6 @@ import saasus.sdk.pricing.models.AggregateUsage; import saasus.sdk.pricing.models.Currency; import saasus.sdk.pricing.models.RecurringInterval; -import saasus.sdk.pricing.models.UnitType; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -73,6 +72,14 @@ public void aggregateUsageTest() { // TODO: test aggregateUsage } + /** + * Test the property 'uType' + */ + @Test + public void uTypeTest() { + // TODO: test uType + } + /** * Test the property 'name' */ @@ -97,14 +104,6 @@ public void descriptionTest() { // TODO: test description } - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - /** * Test the property 'currency' */ From da10b672035a30613759e2fce41f4aa15e88874c Mon Sep 17 00:00:00 2001 From: Takeshi Tsukamoto Date: Thu, 15 May 2025 16:45:28 +0900 Subject: [PATCH 05/28] bug fix --- src/main/java/saasus/sdk/util/apiserver/ApiServer.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/saasus/sdk/util/apiserver/ApiServer.java b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java index 6e53f81d..5702a25c 100644 --- a/src/main/java/saasus/sdk/util/apiserver/ApiServer.java +++ b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java @@ -121,8 +121,14 @@ public void handle(HttpExchange exchange) throws IOException { return; } } else { - // default class and method - System.out.println("No routing value found, using default class and method"); + if (pathParts.length >= 4) { + className = pathParts[2]; + methodName = pathParts[3]; + System.out.println("No explicit routing found, assuming " + pathParts[1] + " is routing, class: " + className + ", method: " + methodName); + } else { + sendResponse(exchange, 400, "Invalid path format. Expected /routing/ClassName/methodName"); + return; + } } Map queryParams = parseQueryParams(exchange.getRequestURI()); From 12419cc930cc20f34afbc2eb7911c160416886d0 Mon Sep 17 00:00:00 2001 From: Takeshi Tsukamoto Date: Fri, 16 May 2025 17:05:46 +0900 Subject: [PATCH 06/28] latest api definition --- docs/apigateway/EndpointSettings.md | 2 +- .../saasus/sdk/apigateway/ApiException.java | 2 +- .../saasus/sdk/apigateway/Configuration.java | 2 +- src/main/java/saasus/sdk/apigateway/Pair.java | 2 +- .../saasus/sdk/apigateway/StringUtil.java | 2 +- .../sdk/apigateway/auth/ApiKeyAuth.java | 2 +- .../sdk/apigateway/auth/HttpBearerAuth.java | 2 +- .../models/AbstractOpenApiSchema.java | 2 +- .../models/ApiGatewayInputFile.java | 2 +- .../apigateway/models/ApiGatewaySettings.java | 2 +- .../apigateway/models/ApiGatewayTenant.java | 2 +- .../saasus/sdk/apigateway/models/ApiKey.java | 2 +- .../saasus/sdk/apigateway/models/ApiKeys.java | 2 +- .../models/CloudFormationLaunchStackLink.java | 2 +- .../apigateway/models/CreateApiKeyParam.java | 2 +- .../sdk/apigateway/models/DnsRecord.java | 2 +- .../apigateway/models/EndpointSettings.java | 55 ++++++++++++------- .../saasus/sdk/apigateway/models/Error.java | 2 +- .../sdk/apigateway/models/TenantRouting.java | 2 +- .../sdk/apigateway/models/Throttling.java | 2 +- .../models/UpdateApiGatewaySettingsParam.java | 2 +- .../apigateway/models/UpdateTenantParam.java | 2 +- .../java/saasus/sdk/apilog/ApiException.java | 2 +- .../java/saasus/sdk/apilog/Configuration.java | 2 +- src/main/java/saasus/sdk/apilog/Pair.java | 2 +- .../java/saasus/sdk/apilog/StringUtil.java | 2 +- .../saasus/sdk/apilog/auth/ApiKeyAuth.java | 2 +- .../sdk/apilog/auth/HttpBearerAuth.java | 2 +- .../apilog/models/AbstractOpenApiSchema.java | 2 +- .../java/saasus/sdk/apilog/models/ApiLog.java | 2 +- .../saasus/sdk/apilog/models/ApiLogs.java | 2 +- .../java/saasus/sdk/apilog/models/Error.java | 2 +- .../java/saasus/sdk/auth/ApiException.java | 2 +- .../java/saasus/sdk/auth/Configuration.java | 2 +- src/main/java/saasus/sdk/auth/Pair.java | 2 +- src/main/java/saasus/sdk/auth/StringUtil.java | 2 +- .../java/saasus/sdk/auth/auth/ApiKeyAuth.java | 2 +- .../saasus/sdk/auth/auth/HttpBearerAuth.java | 2 +- .../auth/models/AbstractOpenApiSchema.java | 2 +- .../sdk/auth/models/AccountVerification.java | 2 +- .../java/saasus/sdk/auth/models/ApiKeys.java | 2 +- .../saasus/sdk/auth/models/Attribute.java | 2 +- .../java/saasus/sdk/auth/models/AuthInfo.java | 2 +- .../auth/models/AuthorizationTempCode.java | 2 +- .../saasus/sdk/auth/models/BasicInfo.java | 2 +- .../sdk/auth/models/BillingAddress.java | 2 +- .../saasus/sdk/auth/models/BillingInfo.java | 2 +- .../saasus/sdk/auth/models/ClientSecret.java | 2 +- .../models/CloudFormationLaunchStackLink.java | 2 +- .../auth/models/ConfirmEmailUpdateParam.java | 2 +- .../models/ConfirmExternalUserLinkParam.java | 2 +- .../ConfirmSignUpWithAwsMarketplaceParam.java | 2 +- .../sdk/auth/models/CreateSaasUserParam.java | 2 +- .../auth/models/CreateSecretCodeParam.java | 2 +- .../models/CreateTenantInvitationParam.java | 2 +- .../auth/models/CreateTenantUserParam.java | 2 +- .../models/CreateTenantUserRolesParam.java | 2 +- .../saasus/sdk/auth/models/Credentials.java | 2 +- .../sdk/auth/models/CustomizePageProps.java | 2 +- .../auth/models/CustomizePageSettings.java | 2 +- .../models/CustomizePageSettingsProps.java | 2 +- .../sdk/auth/models/CustomizePages.java | 2 +- .../sdk/auth/models/DeviceConfiguration.java | 2 +- .../saasus/sdk/auth/models/DnsRecord.java | 2 +- src/main/java/saasus/sdk/auth/models/Env.java | 2 +- .../java/saasus/sdk/auth/models/Envs.java | 2 +- .../java/saasus/sdk/auth/models/Error.java | 2 +- .../models/IdentityProviderConfiguration.java | 2 +- .../auth/models/IdentityProviderProps.java | 2 +- .../sdk/auth/models/IdentityProviderSaml.java | 2 +- .../sdk/auth/models/IdentityProviders.java | 2 +- .../saasus/sdk/auth/models/Invitation.java | 2 +- .../sdk/auth/models/InvitationValidity.java | 2 +- .../saasus/sdk/auth/models/Invitations.java | 2 +- ...nvitedUserEnvironmentInformationInner.java | 2 +- .../auth/models/LinkAwsMarketplaceParam.java | 2 +- .../sdk/auth/models/MessageTemplate.java | 2 +- .../sdk/auth/models/MfaConfiguration.java | 2 +- .../saasus/sdk/auth/models/MfaPreference.java | 2 +- .../sdk/auth/models/NotificationMessages.java | 2 +- .../sdk/auth/models/PasswordPolicy.java | 2 +- .../saasus/sdk/auth/models/PlanHistories.java | 2 +- .../saasus/sdk/auth/models/PlanHistory.java | 2 +- .../sdk/auth/models/PlanReservation.java | 2 +- .../sdk/auth/models/RecaptchaProps.java | 2 +- .../auth/models/RequestEmailUpdateParam.java | 2 +- .../models/RequestExternalUserLinkParam.java | 2 +- .../ResendSignUpConfirmationEmailParam.java | 2 +- .../java/saasus/sdk/auth/models/Role.java | 2 +- .../java/saasus/sdk/auth/models/Roles.java | 2 +- .../java/saasus/sdk/auth/models/SaasId.java | 2 +- .../java/saasus/sdk/auth/models/SaasUser.java | 2 +- .../saasus/sdk/auth/models/SaasUsers.java | 2 +- .../saasus/sdk/auth/models/SelfRegist.java | 2 +- .../sdk/auth/models/SignInSettings.java | 2 +- .../saasus/sdk/auth/models/SignUpParam.java | 2 +- .../models/SignUpWithAwsMarketplaceParam.java | 2 +- .../sdk/auth/models/SingleTenantSettings.java | 2 +- .../auth/models/SoftwareTokenSecretCode.java | 2 +- .../java/saasus/sdk/auth/models/Tenant.java | 2 +- .../sdk/auth/models/TenantAttributes.java | 2 +- .../saasus/sdk/auth/models/TenantDetail.java | 2 +- .../models/TenantIdentityProviderProps.java | 2 +- .../auth/models/TenantIdentityProviders.java | 2 +- .../models/TenantIdentityProvidersSaml.java | 2 +- .../saasus/sdk/auth/models/TenantProps.java | 2 +- .../java/saasus/sdk/auth/models/Tenants.java | 2 +- .../sdk/auth/models/UpdateBasicInfoParam.java | 2 +- .../UpdateCustomizePageSettingsParam.java | 2 +- .../models/UpdateCustomizePagesParam.java | 2 +- .../sdk/auth/models/UpdateEnvParam.java | 2 +- .../models/UpdateIdentityProviderParam.java | 2 +- .../UpdateNotificationMessagesParam.java | 2 +- .../models/UpdateSaasUserAttributesParam.java | 2 +- .../auth/models/UpdateSaasUserEmailParam.java | 2 +- .../models/UpdateSaasUserPasswordParam.java | 2 +- .../models/UpdateSignInSettingsParam.java | 2 +- .../UpdateSingleTenantSettingsParam.java | 2 +- .../auth/models/UpdateSoftwareTokenParam.java | 2 +- .../UpdateTenantIdentityProviderParam.java | 2 +- .../auth/models/UpdateTenantUserParam.java | 2 +- .../java/saasus/sdk/auth/models/User.java | 2 +- .../sdk/auth/models/UserAttributes.java | 2 +- .../sdk/auth/models/UserAvailableEnv.java | 2 +- .../sdk/auth/models/UserAvailableTenant.java | 2 +- .../java/saasus/sdk/auth/models/UserInfo.java | 2 +- .../java/saasus/sdk/auth/models/Users.java | 2 +- .../auth/models/ValidateInvitationParam.java | 2 +- .../sdk/awsmarketplace/ApiException.java | 2 +- .../sdk/awsmarketplace/Configuration.java | 2 +- .../java/saasus/sdk/awsmarketplace/Pair.java | 2 +- .../saasus/sdk/awsmarketplace/StringUtil.java | 2 +- .../sdk/awsmarketplace/auth/ApiKeyAuth.java | 2 +- .../awsmarketplace/auth/HttpBearerAuth.java | 2 +- .../models/AbstractOpenApiSchema.java | 2 +- .../models/CatalogEntityVisibility.java | 2 +- .../models/CloudFormationLaunchStackLink.java | 2 +- .../models/CreateCustomerParam.java | 2 +- .../sdk/awsmarketplace/models/Customer.java | 2 +- .../sdk/awsmarketplace/models/Customers.java | 2 +- .../sdk/awsmarketplace/models/Error.java | 2 +- .../models/GetListingStatusResult.java | 2 +- .../sdk/awsmarketplace/models/Plan.java | 2 +- .../sdk/awsmarketplace/models/Plans.java | 2 +- .../awsmarketplace/models/SavePlanParam.java | 2 +- .../sdk/awsmarketplace/models/Settings.java | 2 +- .../models/UpdateListingStatusParam.java | 2 +- .../models/UpdateSettingsParam.java | 2 +- .../models/VerifyRegistrationTokenParam.java | 2 +- .../java/saasus/sdk/billing/ApiException.java | 2 +- .../saasus/sdk/billing/Configuration.java | 2 +- src/main/java/saasus/sdk/billing/Pair.java | 2 +- .../java/saasus/sdk/billing/StringUtil.java | 2 +- .../saasus/sdk/billing/auth/ApiKeyAuth.java | 2 +- .../sdk/billing/auth/HttpBearerAuth.java | 2 +- .../billing/models/AbstractOpenApiSchema.java | 2 +- .../java/saasus/sdk/billing/models/Error.java | 2 +- .../saasus/sdk/billing/models/StripeInfo.java | 2 +- .../billing/models/UpdateStripeInfoParam.java | 2 +- .../sdk/communication/ApiException.java | 2 +- .../sdk/communication/Configuration.java | 2 +- .../java/saasus/sdk/communication/Pair.java | 2 +- .../saasus/sdk/communication/StringUtil.java | 2 +- .../sdk/communication/auth/ApiKeyAuth.java | 2 +- .../communication/auth/HttpBearerAuth.java | 2 +- .../models/AbstractOpenApiSchema.java | 2 +- .../sdk/communication/models/Comment.java | 2 +- .../sdk/communication/models/Comments.java | 2 +- .../models/CreateFeedbackCommentParam.java | 2 +- .../models/CreateFeedbackParam.java | 2 +- .../models/CreateVoteUserParam.java | 2 +- .../sdk/communication/models/Error.java | 2 +- .../sdk/communication/models/Feedback.java | 2 +- .../models/FeedbackSaveProps.java | 2 +- .../sdk/communication/models/Feedbacks.java | 2 +- .../models/UpdateFeedbackCommentParam.java | 2 +- .../models/UpdateFeedbackParam.java | 2 +- .../models/UpdateFeedbackStatusParam.java | 2 +- .../saasus/sdk/communication/models/User.java | 2 +- .../sdk/communication/models/Users.java | 2 +- .../sdk/communication/models/Votes.java | 2 +- .../saasus/sdk/integration/ApiException.java | 2 +- .../saasus/sdk/integration/Configuration.java | 2 +- .../java/saasus/sdk/integration/Pair.java | 2 +- .../saasus/sdk/integration/StringUtil.java | 2 +- .../sdk/integration/auth/ApiKeyAuth.java | 2 +- .../sdk/integration/auth/HttpBearerAuth.java | 2 +- .../models/AbstractOpenApiSchema.java | 2 +- .../models/CreateEventBridgeEventParam.java | 2 +- .../saasus/sdk/integration/models/Error.java | 2 +- .../models/EventBridgeSettings.java | 2 +- .../sdk/integration/models/EventMessage.java | 2 +- .../java/saasus/sdk/pricing/ApiException.java | 2 +- .../saasus/sdk/pricing/Configuration.java | 2 +- src/main/java/saasus/sdk/pricing/Pair.java | 2 +- .../java/saasus/sdk/pricing/StringUtil.java | 2 +- .../saasus/sdk/pricing/auth/ApiKeyAuth.java | 2 +- .../sdk/pricing/auth/HttpBearerAuth.java | 2 +- .../pricing/models/AbstractOpenApiSchema.java | 2 +- .../java/saasus/sdk/pricing/models/Error.java | 2 +- .../sdk/pricing/models/MeteringUnit.java | 2 +- .../sdk/pricing/models/MeteringUnitCount.java | 2 +- .../pricing/models/MeteringUnitDateCount.java | 2 +- .../models/MeteringUnitDateCounts.java | 2 +- .../models/MeteringUnitDatePeriodCounts.java | 2 +- .../models/MeteringUnitMonthCount.java | 2 +- .../models/MeteringUnitMonthCounts.java | 2 +- .../sdk/pricing/models/MeteringUnitProps.java | 2 +- .../models/MeteringUnitTimestampCount.java | 2 +- .../sdk/pricing/models/MeteringUnits.java | 2 +- .../sdk/pricing/models/PricingFixedUnit.java | 2 +- .../models/PricingFixedUnitForSave.java | 2 +- .../sdk/pricing/models/PricingMenu.java | 2 +- .../sdk/pricing/models/PricingMenuProps.java | 2 +- .../sdk/pricing/models/PricingMenus.java | 2 +- .../sdk/pricing/models/PricingPlan.java | 2 +- .../sdk/pricing/models/PricingPlanProps.java | 2 +- .../sdk/pricing/models/PricingPlans.java | 2 +- .../sdk/pricing/models/PricingTier.java | 2 +- .../sdk/pricing/models/PricingTieredUnit.java | 2 +- .../models/PricingTieredUnitForSave.java | 2 +- .../models/PricingTieredUsageUnit.java | 2 +- .../models/PricingTieredUsageUnitForSave.java | 2 +- .../sdk/pricing/models/PricingTiers.java | 2 +- .../sdk/pricing/models/PricingUnit.java | 2 +- .../pricing/models/PricingUnitBaseProps.java | 2 +- .../pricing/models/PricingUnitForSave.java | 2 +- .../sdk/pricing/models/PricingUnits.java | 2 +- .../sdk/pricing/models/PricingUsageUnit.java | 2 +- .../models/PricingUsageUnitForSave.java | 2 +- .../pricing/models/SavePricingMenuParam.java | 2 +- .../pricing/models/SavePricingPlanParam.java | 2 +- .../saasus/sdk/pricing/models/TaxRate.java | 2 +- .../sdk/pricing/models/TaxRateProps.java | 2 +- .../saasus/sdk/pricing/models/TaxRates.java | 2 +- ...ateMeteringUnitTimestampCountNowParam.java | 2 +- ...UpdateMeteringUnitTimestampCountParam.java | 2 +- .../models/UpdatePricingPlansUsedParam.java | 2 +- .../pricing/models/UpdateTaxRateParam.java | 2 +- .../models/EndpointSettingsTest.java | 6 +- 240 files changed, 276 insertions(+), 261 deletions(-) diff --git a/docs/apigateway/EndpointSettings.md b/docs/apigateway/EndpointSettings.md index 572c8d12..788ae831 100644 --- a/docs/apigateway/EndpointSettings.md +++ b/docs/apigateway/EndpointSettings.md @@ -10,7 +10,7 @@ Settings per endpoint |------------ | ------------- | ------------- | -------------| |**path** | **String** | Path | | |**method** | [**MethodEnum**](#MethodEnum) | Method | | -|**throttling** | [**Throttling**](Throttling.md) | | [optional] | +|**throttlings** | [**List<Throttling>**](Throttling.md) | Throttling settings for each target TODO: Make it possible to set multiple settings in the future | | |**roleNames** | **List<String>** | Role names that can access the endpoint | [optional] | diff --git a/src/main/java/saasus/sdk/apigateway/ApiException.java b/src/main/java/saasus/sdk/apigateway/ApiException.java index 766be0cf..38cbf323 100644 --- a/src/main/java/saasus/sdk/apigateway/ApiException.java +++ b/src/main/java/saasus/sdk/apigateway/ApiException.java @@ -21,7 +21,7 @@ *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; diff --git a/src/main/java/saasus/sdk/apigateway/Configuration.java b/src/main/java/saasus/sdk/apigateway/Configuration.java index 1ef23cd8..ce6c342c 100644 --- a/src/main/java/saasus/sdk/apigateway/Configuration.java +++ b/src/main/java/saasus/sdk/apigateway/Configuration.java @@ -13,7 +13,7 @@ package saasus.sdk.apigateway; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") public class Configuration { public static final String VERSION = "1.0.0"; diff --git a/src/main/java/saasus/sdk/apigateway/Pair.java b/src/main/java/saasus/sdk/apigateway/Pair.java index 2cb1cf94..c215bce3 100644 --- a/src/main/java/saasus/sdk/apigateway/Pair.java +++ b/src/main/java/saasus/sdk/apigateway/Pair.java @@ -13,7 +13,7 @@ package saasus.sdk.apigateway; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") public class Pair { private String name = ""; private String value = ""; diff --git a/src/main/java/saasus/sdk/apigateway/StringUtil.java b/src/main/java/saasus/sdk/apigateway/StringUtil.java index 95778eed..3565756f 100644 --- a/src/main/java/saasus/sdk/apigateway/StringUtil.java +++ b/src/main/java/saasus/sdk/apigateway/StringUtil.java @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/saasus/sdk/apigateway/auth/ApiKeyAuth.java b/src/main/java/saasus/sdk/apigateway/auth/ApiKeyAuth.java index 967c256a..873eab70 100644 --- a/src/main/java/saasus/sdk/apigateway/auth/ApiKeyAuth.java +++ b/src/main/java/saasus/sdk/apigateway/auth/ApiKeyAuth.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/saasus/sdk/apigateway/auth/HttpBearerAuth.java b/src/main/java/saasus/sdk/apigateway/auth/HttpBearerAuth.java index 81111e17..05eb7c0b 100644 --- a/src/main/java/saasus/sdk/apigateway/auth/HttpBearerAuth.java +++ b/src/main/java/saasus/sdk/apigateway/auth/HttpBearerAuth.java @@ -22,7 +22,7 @@ import java.util.Optional; import java.util.function.Supplier; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") public class HttpBearerAuth implements Authentication { private final String scheme; private Supplier tokenSupplier; diff --git a/src/main/java/saasus/sdk/apigateway/models/AbstractOpenApiSchema.java b/src/main/java/saasus/sdk/apigateway/models/AbstractOpenApiSchema.java index 321ce5da..0ef34690 100644 --- a/src/main/java/saasus/sdk/apigateway/models/AbstractOpenApiSchema.java +++ b/src/main/java/saasus/sdk/apigateway/models/AbstractOpenApiSchema.java @@ -21,7 +21,7 @@ /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/src/main/java/saasus/sdk/apigateway/models/ApiGatewayInputFile.java b/src/main/java/saasus/sdk/apigateway/models/ApiGatewayInputFile.java index 2a5c8d3b..de718143 100644 --- a/src/main/java/saasus/sdk/apigateway/models/ApiGatewayInputFile.java +++ b/src/main/java/saasus/sdk/apigateway/models/ApiGatewayInputFile.java @@ -49,7 +49,7 @@ /** * ApiGatewayInputFile */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") public class ApiGatewayInputFile { public static final String SERIALIZED_NAME_CONTENT = "content"; @SerializedName(SERIALIZED_NAME_CONTENT) diff --git a/src/main/java/saasus/sdk/apigateway/models/ApiGatewaySettings.java b/src/main/java/saasus/sdk/apigateway/models/ApiGatewaySettings.java index 1d7923fd..5124d589 100644 --- a/src/main/java/saasus/sdk/apigateway/models/ApiGatewaySettings.java +++ b/src/main/java/saasus/sdk/apigateway/models/ApiGatewaySettings.java @@ -54,7 +54,7 @@ /** * ApiGatewaySettings */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") public class ApiGatewaySettings { public static final String SERIALIZED_NAME_GENERATED_FILE_STATUS = "generated_file_status"; @SerializedName(SERIALIZED_NAME_GENERATED_FILE_STATUS) diff --git a/src/main/java/saasus/sdk/apigateway/models/ApiGatewayTenant.java b/src/main/java/saasus/sdk/apigateway/models/ApiGatewayTenant.java index 0d4213ba..48105b92 100644 --- a/src/main/java/saasus/sdk/apigateway/models/ApiGatewayTenant.java +++ b/src/main/java/saasus/sdk/apigateway/models/ApiGatewayTenant.java @@ -52,7 +52,7 @@ /** * ApiGatewayTenant */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") public class ApiGatewayTenant { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/saasus/sdk/apigateway/models/ApiKey.java b/src/main/java/saasus/sdk/apigateway/models/ApiKey.java index e9194537..bf042567 100644 --- a/src/main/java/saasus/sdk/apigateway/models/ApiKey.java +++ b/src/main/java/saasus/sdk/apigateway/models/ApiKey.java @@ -49,7 +49,7 @@ /** * ApiKey */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") public class ApiKey { public static final String SERIALIZED_NAME_API_KEY = "api_key"; @SerializedName(SERIALIZED_NAME_API_KEY) diff --git a/src/main/java/saasus/sdk/apigateway/models/ApiKeys.java b/src/main/java/saasus/sdk/apigateway/models/ApiKeys.java index 6cb07bbb..8264d19c 100644 --- a/src/main/java/saasus/sdk/apigateway/models/ApiKeys.java +++ b/src/main/java/saasus/sdk/apigateway/models/ApiKeys.java @@ -52,7 +52,7 @@ /** * ApiKeys */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") public class ApiKeys { public static final String SERIALIZED_NAME_API_KEYS = "api_keys"; @SerializedName(SERIALIZED_NAME_API_KEYS) diff --git a/src/main/java/saasus/sdk/apigateway/models/CloudFormationLaunchStackLink.java b/src/main/java/saasus/sdk/apigateway/models/CloudFormationLaunchStackLink.java index 53c4ea0d..5208e99e 100644 --- a/src/main/java/saasus/sdk/apigateway/models/CloudFormationLaunchStackLink.java +++ b/src/main/java/saasus/sdk/apigateway/models/CloudFormationLaunchStackLink.java @@ -49,7 +49,7 @@ /** * CloudFormationLaunchStackLink */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") public class CloudFormationLaunchStackLink { public static final String SERIALIZED_NAME_LINK = "link"; @SerializedName(SERIALIZED_NAME_LINK) diff --git a/src/main/java/saasus/sdk/apigateway/models/CreateApiKeyParam.java b/src/main/java/saasus/sdk/apigateway/models/CreateApiKeyParam.java index 969f3c2e..c09553bd 100644 --- a/src/main/java/saasus/sdk/apigateway/models/CreateApiKeyParam.java +++ b/src/main/java/saasus/sdk/apigateway/models/CreateApiKeyParam.java @@ -49,7 +49,7 @@ /** * CreateApiKeyParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") public class CreateApiKeyParam { public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; @SerializedName(SERIALIZED_NAME_TENANT_ID) diff --git a/src/main/java/saasus/sdk/apigateway/models/DnsRecord.java b/src/main/java/saasus/sdk/apigateway/models/DnsRecord.java index dc6b23ce..7daa91a8 100644 --- a/src/main/java/saasus/sdk/apigateway/models/DnsRecord.java +++ b/src/main/java/saasus/sdk/apigateway/models/DnsRecord.java @@ -49,7 +49,7 @@ /** * DnsRecord */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") public class DnsRecord { /** * CNAME Resource Record diff --git a/src/main/java/saasus/sdk/apigateway/models/EndpointSettings.java b/src/main/java/saasus/sdk/apigateway/models/EndpointSettings.java index 09104a7c..499dce9e 100644 --- a/src/main/java/saasus/sdk/apigateway/models/EndpointSettings.java +++ b/src/main/java/saasus/sdk/apigateway/models/EndpointSettings.java @@ -52,7 +52,7 @@ /** * Settings per endpoint */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") public class EndpointSettings { public static final String SERIALIZED_NAME_PATH = "path"; @SerializedName(SERIALIZED_NAME_PATH) @@ -128,9 +128,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_METHOD) private MethodEnum method; - public static final String SERIALIZED_NAME_THROTTLING = "throttling"; - @SerializedName(SERIALIZED_NAME_THROTTLING) - private Throttling throttling; + public static final String SERIALIZED_NAME_THROTTLINGS = "throttlings"; + @SerializedName(SERIALIZED_NAME_THROTTLINGS) + private List throttlings = new ArrayList<>(); public static final String SERIALIZED_NAME_ROLE_NAMES = "role_names"; @SerializedName(SERIALIZED_NAME_ROLE_NAMES) @@ -177,22 +177,30 @@ public void setMethod(MethodEnum method) { } - public EndpointSettings throttling(Throttling throttling) { - this.throttling = throttling; + public EndpointSettings throttlings(List throttlings) { + this.throttlings = throttlings; + return this; + } + + public EndpointSettings addThrottlingsItem(Throttling throttlingsItem) { + if (this.throttlings == null) { + this.throttlings = new ArrayList<>(); + } + this.throttlings.add(throttlingsItem); return this; } /** - * Get throttling - * @return throttling + * Throttling settings for each target TODO: Make it possible to set multiple settings in the future + * @return throttlings **/ - @javax.annotation.Nullable - public Throttling getThrottling() { - return throttling; + @javax.annotation.Nonnull + public List getThrottlings() { + return throttlings; } - public void setThrottling(Throttling throttling) { - this.throttling = throttling; + public void setThrottlings(List throttlings) { + this.throttlings = throttlings; } @@ -235,13 +243,13 @@ public boolean equals(Object o) { EndpointSettings endpointSettings = (EndpointSettings) o; return Objects.equals(this.path, endpointSettings.path) && Objects.equals(this.method, endpointSettings.method) && - Objects.equals(this.throttling, endpointSettings.throttling) && + Objects.equals(this.throttlings, endpointSettings.throttlings) && Objects.equals(this.roleNames, endpointSettings.roleNames); } @Override public int hashCode() { - return Objects.hash(path, method, throttling, roleNames); + return Objects.hash(path, method, throttlings, roleNames); } @Override @@ -250,7 +258,7 @@ public String toString() { sb.append("class EndpointSettings {\n"); sb.append(" path: ").append(toIndentedString(path)).append("\n"); sb.append(" method: ").append(toIndentedString(method)).append("\n"); - sb.append(" throttling: ").append(toIndentedString(throttling)).append("\n"); + sb.append(" throttlings: ").append(toIndentedString(throttlings)).append("\n"); sb.append(" roleNames: ").append(toIndentedString(roleNames)).append("\n"); sb.append("}"); return sb.toString(); @@ -276,13 +284,14 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("path"); openapiFields.add("method"); - openapiFields.add("throttling"); + openapiFields.add("throttlings"); openapiFields.add("role_names"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("path"); openapiRequiredFields.add("method"); + openapiRequiredFields.add("throttlings"); } /** @@ -321,10 +330,16 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // validate the required field `method` MethodEnum.validateJsonElement(jsonObj.get("method")); - // validate the optional field `throttling` - if (jsonObj.get("throttling") != null && !jsonObj.get("throttling").isJsonNull()) { - Throttling.validateJsonElement(jsonObj.get("throttling")); + // ensure the json data is an array + if (!jsonObj.get("throttlings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `throttlings` to be an array in the JSON string but got `%s`", jsonObj.get("throttlings").toString())); } + + JsonArray jsonArraythrottlings = jsonObj.getAsJsonArray("throttlings"); + // validate the required field `throttlings` (array) + for (int i = 0; i < jsonArraythrottlings.size(); i++) { + Throttling.validateJsonElement(jsonArraythrottlings.get(i)); + }; // ensure the optional json data is an array if present if (jsonObj.get("role_names") != null && !jsonObj.get("role_names").isJsonNull() && !jsonObj.get("role_names").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `role_names` to be an array in the JSON string but got `%s`", jsonObj.get("role_names").toString())); diff --git a/src/main/java/saasus/sdk/apigateway/models/Error.java b/src/main/java/saasus/sdk/apigateway/models/Error.java index df281a83..668f2824 100644 --- a/src/main/java/saasus/sdk/apigateway/models/Error.java +++ b/src/main/java/saasus/sdk/apigateway/models/Error.java @@ -49,7 +49,7 @@ /** * Error */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") public class Error { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/src/main/java/saasus/sdk/apigateway/models/TenantRouting.java b/src/main/java/saasus/sdk/apigateway/models/TenantRouting.java index ccad649c..9153cc45 100644 --- a/src/main/java/saasus/sdk/apigateway/models/TenantRouting.java +++ b/src/main/java/saasus/sdk/apigateway/models/TenantRouting.java @@ -49,7 +49,7 @@ /** * Information about tenant routing. Refer to the tenant_routing_type in ApiGatewaySettings and route the request. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") public class TenantRouting { public static final String SERIALIZED_NAME_PATH = "path"; @SerializedName(SERIALIZED_NAME_PATH) diff --git a/src/main/java/saasus/sdk/apigateway/models/Throttling.java b/src/main/java/saasus/sdk/apigateway/models/Throttling.java index 005752f3..391cb310 100644 --- a/src/main/java/saasus/sdk/apigateway/models/Throttling.java +++ b/src/main/java/saasus/sdk/apigateway/models/Throttling.java @@ -49,7 +49,7 @@ /** * Permit requests up to the limit number of times within a range (seconds) time for each target. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") public class Throttling { /** * Target of restriction diff --git a/src/main/java/saasus/sdk/apigateway/models/UpdateApiGatewaySettingsParam.java b/src/main/java/saasus/sdk/apigateway/models/UpdateApiGatewaySettingsParam.java index 4c9e7a27..bb5407ba 100644 --- a/src/main/java/saasus/sdk/apigateway/models/UpdateApiGatewaySettingsParam.java +++ b/src/main/java/saasus/sdk/apigateway/models/UpdateApiGatewaySettingsParam.java @@ -53,7 +53,7 @@ /** * UpdateApiGatewaySettingsParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") public class UpdateApiGatewaySettingsParam { public static final String SERIALIZED_NAME_ROLE_ARN = "role_arn"; @SerializedName(SERIALIZED_NAME_ROLE_ARN) diff --git a/src/main/java/saasus/sdk/apigateway/models/UpdateTenantParam.java b/src/main/java/saasus/sdk/apigateway/models/UpdateTenantParam.java index 277be855..805c1a64 100644 --- a/src/main/java/saasus/sdk/apigateway/models/UpdateTenantParam.java +++ b/src/main/java/saasus/sdk/apigateway/models/UpdateTenantParam.java @@ -52,7 +52,7 @@ /** * UpdateTenantParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:02.925274292Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") public class UpdateTenantParam { public static final String SERIALIZED_NAME_ALLOWED_IPS = "allowed_ips"; @SerializedName(SERIALIZED_NAME_ALLOWED_IPS) diff --git a/src/main/java/saasus/sdk/apilog/ApiException.java b/src/main/java/saasus/sdk/apilog/ApiException.java index c00621e7..23e67bba 100644 --- a/src/main/java/saasus/sdk/apilog/ApiException.java +++ b/src/main/java/saasus/sdk/apilog/ApiException.java @@ -21,7 +21,7 @@ *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:00.704121638Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:39.149123550Z[Etc/UTC]") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; diff --git a/src/main/java/saasus/sdk/apilog/Configuration.java b/src/main/java/saasus/sdk/apilog/Configuration.java index 5509c70d..4047637f 100644 --- a/src/main/java/saasus/sdk/apilog/Configuration.java +++ b/src/main/java/saasus/sdk/apilog/Configuration.java @@ -13,7 +13,7 @@ package saasus.sdk.apilog; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:00.704121638Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:39.149123550Z[Etc/UTC]") public class Configuration { public static final String VERSION = "1.0.0"; diff --git a/src/main/java/saasus/sdk/apilog/Pair.java b/src/main/java/saasus/sdk/apilog/Pair.java index 05ea14b2..53682302 100644 --- a/src/main/java/saasus/sdk/apilog/Pair.java +++ b/src/main/java/saasus/sdk/apilog/Pair.java @@ -13,7 +13,7 @@ package saasus.sdk.apilog; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:00.704121638Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:39.149123550Z[Etc/UTC]") public class Pair { private String name = ""; private String value = ""; diff --git a/src/main/java/saasus/sdk/apilog/StringUtil.java b/src/main/java/saasus/sdk/apilog/StringUtil.java index 4028f15a..5fb3d709 100644 --- a/src/main/java/saasus/sdk/apilog/StringUtil.java +++ b/src/main/java/saasus/sdk/apilog/StringUtil.java @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:00.704121638Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:39.149123550Z[Etc/UTC]") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/saasus/sdk/apilog/auth/ApiKeyAuth.java b/src/main/java/saasus/sdk/apilog/auth/ApiKeyAuth.java index f2285fde..a3a3ee9e 100644 --- a/src/main/java/saasus/sdk/apilog/auth/ApiKeyAuth.java +++ b/src/main/java/saasus/sdk/apilog/auth/ApiKeyAuth.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:00.704121638Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:39.149123550Z[Etc/UTC]") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/saasus/sdk/apilog/auth/HttpBearerAuth.java b/src/main/java/saasus/sdk/apilog/auth/HttpBearerAuth.java index d6f24a86..d169d635 100644 --- a/src/main/java/saasus/sdk/apilog/auth/HttpBearerAuth.java +++ b/src/main/java/saasus/sdk/apilog/auth/HttpBearerAuth.java @@ -22,7 +22,7 @@ import java.util.Optional; import java.util.function.Supplier; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:00.704121638Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:39.149123550Z[Etc/UTC]") public class HttpBearerAuth implements Authentication { private final String scheme; private Supplier tokenSupplier; diff --git a/src/main/java/saasus/sdk/apilog/models/AbstractOpenApiSchema.java b/src/main/java/saasus/sdk/apilog/models/AbstractOpenApiSchema.java index 5e35a947..f6538851 100644 --- a/src/main/java/saasus/sdk/apilog/models/AbstractOpenApiSchema.java +++ b/src/main/java/saasus/sdk/apilog/models/AbstractOpenApiSchema.java @@ -21,7 +21,7 @@ /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:00.704121638Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:39.149123550Z[Etc/UTC]") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/src/main/java/saasus/sdk/apilog/models/ApiLog.java b/src/main/java/saasus/sdk/apilog/models/ApiLog.java index b63137a4..0ecfc14a 100644 --- a/src/main/java/saasus/sdk/apilog/models/ApiLog.java +++ b/src/main/java/saasus/sdk/apilog/models/ApiLog.java @@ -49,7 +49,7 @@ /** * ApiLog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:00.704121638Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:39.149123550Z[Etc/UTC]") public class ApiLog { public static final String SERIALIZED_NAME_TRACE_ID = "trace_id"; @SerializedName(SERIALIZED_NAME_TRACE_ID) diff --git a/src/main/java/saasus/sdk/apilog/models/ApiLogs.java b/src/main/java/saasus/sdk/apilog/models/ApiLogs.java index 6f8c7d85..2f9ff986 100644 --- a/src/main/java/saasus/sdk/apilog/models/ApiLogs.java +++ b/src/main/java/saasus/sdk/apilog/models/ApiLogs.java @@ -52,7 +52,7 @@ /** * ApiLogs */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:00.704121638Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:39.149123550Z[Etc/UTC]") public class ApiLogs { public static final String SERIALIZED_NAME_API_LOGS = "api_logs"; @SerializedName(SERIALIZED_NAME_API_LOGS) diff --git a/src/main/java/saasus/sdk/apilog/models/Error.java b/src/main/java/saasus/sdk/apilog/models/Error.java index 214a8bb3..96d2ad86 100644 --- a/src/main/java/saasus/sdk/apilog/models/Error.java +++ b/src/main/java/saasus/sdk/apilog/models/Error.java @@ -49,7 +49,7 @@ /** * Error */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:00.704121638Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:39.149123550Z[Etc/UTC]") public class Error { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/src/main/java/saasus/sdk/auth/ApiException.java b/src/main/java/saasus/sdk/auth/ApiException.java index a946d8c7..83c2ddd4 100644 --- a/src/main/java/saasus/sdk/auth/ApiException.java +++ b/src/main/java/saasus/sdk/auth/ApiException.java @@ -21,7 +21,7 @@ *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; diff --git a/src/main/java/saasus/sdk/auth/Configuration.java b/src/main/java/saasus/sdk/auth/Configuration.java index 4af3add3..04f6e209 100644 --- a/src/main/java/saasus/sdk/auth/Configuration.java +++ b/src/main/java/saasus/sdk/auth/Configuration.java @@ -13,7 +13,7 @@ package saasus.sdk.auth; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class Configuration { public static final String VERSION = "1.0.0"; diff --git a/src/main/java/saasus/sdk/auth/Pair.java b/src/main/java/saasus/sdk/auth/Pair.java index 0a49d601..f7093b93 100644 --- a/src/main/java/saasus/sdk/auth/Pair.java +++ b/src/main/java/saasus/sdk/auth/Pair.java @@ -13,7 +13,7 @@ package saasus.sdk.auth; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class Pair { private String name = ""; private String value = ""; diff --git a/src/main/java/saasus/sdk/auth/StringUtil.java b/src/main/java/saasus/sdk/auth/StringUtil.java index b248d6f8..3edab423 100644 --- a/src/main/java/saasus/sdk/auth/StringUtil.java +++ b/src/main/java/saasus/sdk/auth/StringUtil.java @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/saasus/sdk/auth/auth/ApiKeyAuth.java b/src/main/java/saasus/sdk/auth/auth/ApiKeyAuth.java index 64806e64..461d10e2 100644 --- a/src/main/java/saasus/sdk/auth/auth/ApiKeyAuth.java +++ b/src/main/java/saasus/sdk/auth/auth/ApiKeyAuth.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/saasus/sdk/auth/auth/HttpBearerAuth.java b/src/main/java/saasus/sdk/auth/auth/HttpBearerAuth.java index be7c42fa..c52d5965 100644 --- a/src/main/java/saasus/sdk/auth/auth/HttpBearerAuth.java +++ b/src/main/java/saasus/sdk/auth/auth/HttpBearerAuth.java @@ -22,7 +22,7 @@ import java.util.Optional; import java.util.function.Supplier; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class HttpBearerAuth implements Authentication { private final String scheme; private Supplier tokenSupplier; diff --git a/src/main/java/saasus/sdk/auth/models/AbstractOpenApiSchema.java b/src/main/java/saasus/sdk/auth/models/AbstractOpenApiSchema.java index c886ed92..f117168d 100644 --- a/src/main/java/saasus/sdk/auth/models/AbstractOpenApiSchema.java +++ b/src/main/java/saasus/sdk/auth/models/AbstractOpenApiSchema.java @@ -21,7 +21,7 @@ /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/src/main/java/saasus/sdk/auth/models/AccountVerification.java b/src/main/java/saasus/sdk/auth/models/AccountVerification.java index f94917f5..ecde0d96 100644 --- a/src/main/java/saasus/sdk/auth/models/AccountVerification.java +++ b/src/main/java/saasus/sdk/auth/models/AccountVerification.java @@ -49,7 +49,7 @@ /** * Account authentication settings ※ This function is not yet provided, so it cannot be changed or saved. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class AccountVerification { /** * code: verification code link: verification link ※ This function is not yet provided, so it cannot be changed or saved. diff --git a/src/main/java/saasus/sdk/auth/models/ApiKeys.java b/src/main/java/saasus/sdk/auth/models/ApiKeys.java index b53bccaa..30520c5f 100644 --- a/src/main/java/saasus/sdk/auth/models/ApiKeys.java +++ b/src/main/java/saasus/sdk/auth/models/ApiKeys.java @@ -51,7 +51,7 @@ /** * ApiKeys */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class ApiKeys { public static final String SERIALIZED_NAME_API_KEYS = "api_keys"; @SerializedName(SERIALIZED_NAME_API_KEYS) diff --git a/src/main/java/saasus/sdk/auth/models/Attribute.java b/src/main/java/saasus/sdk/auth/models/Attribute.java index 868a7735..e64b415e 100644 --- a/src/main/java/saasus/sdk/auth/models/Attribute.java +++ b/src/main/java/saasus/sdk/auth/models/Attribute.java @@ -50,7 +50,7 @@ /** * Attribute */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class Attribute { public static final String SERIALIZED_NAME_ATTRIBUTE_NAME = "attribute_name"; @SerializedName(SERIALIZED_NAME_ATTRIBUTE_NAME) diff --git a/src/main/java/saasus/sdk/auth/models/AuthInfo.java b/src/main/java/saasus/sdk/auth/models/AuthInfo.java index e2bdf67a..7455680d 100644 --- a/src/main/java/saasus/sdk/auth/models/AuthInfo.java +++ b/src/main/java/saasus/sdk/auth/models/AuthInfo.java @@ -49,7 +49,7 @@ /** * AuthInfo */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class AuthInfo { public static final String SERIALIZED_NAME_CALLBACK_URL = "callback_url"; @SerializedName(SERIALIZED_NAME_CALLBACK_URL) diff --git a/src/main/java/saasus/sdk/auth/models/AuthorizationTempCode.java b/src/main/java/saasus/sdk/auth/models/AuthorizationTempCode.java index 74e60544..1bf628d0 100644 --- a/src/main/java/saasus/sdk/auth/models/AuthorizationTempCode.java +++ b/src/main/java/saasus/sdk/auth/models/AuthorizationTempCode.java @@ -49,7 +49,7 @@ /** * AuthorizationTempCode */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class AuthorizationTempCode { public static final String SERIALIZED_NAME_CODE = "code"; @SerializedName(SERIALIZED_NAME_CODE) diff --git a/src/main/java/saasus/sdk/auth/models/BasicInfo.java b/src/main/java/saasus/sdk/auth/models/BasicInfo.java index 6a4ef4d9..a79bc8f5 100644 --- a/src/main/java/saasus/sdk/auth/models/BasicInfo.java +++ b/src/main/java/saasus/sdk/auth/models/BasicInfo.java @@ -52,7 +52,7 @@ /** * BasicInfo */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class BasicInfo { public static final String SERIALIZED_NAME_DOMAIN_NAME = "domain_name"; @SerializedName(SERIALIZED_NAME_DOMAIN_NAME) diff --git a/src/main/java/saasus/sdk/auth/models/BillingAddress.java b/src/main/java/saasus/sdk/auth/models/BillingAddress.java index 38f89926..fc28bd63 100644 --- a/src/main/java/saasus/sdk/auth/models/BillingAddress.java +++ b/src/main/java/saasus/sdk/auth/models/BillingAddress.java @@ -49,7 +49,7 @@ /** * BillingAddress */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class BillingAddress { public static final String SERIALIZED_NAME_STREET = "street"; @SerializedName(SERIALIZED_NAME_STREET) diff --git a/src/main/java/saasus/sdk/auth/models/BillingInfo.java b/src/main/java/saasus/sdk/auth/models/BillingInfo.java index 392c8dea..f38cfc71 100644 --- a/src/main/java/saasus/sdk/auth/models/BillingInfo.java +++ b/src/main/java/saasus/sdk/auth/models/BillingInfo.java @@ -51,7 +51,7 @@ /** * BillingInfo */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class BillingInfo { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/saasus/sdk/auth/models/ClientSecret.java b/src/main/java/saasus/sdk/auth/models/ClientSecret.java index b98a45a2..271bd909 100644 --- a/src/main/java/saasus/sdk/auth/models/ClientSecret.java +++ b/src/main/java/saasus/sdk/auth/models/ClientSecret.java @@ -49,7 +49,7 @@ /** * ClientSecret */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class ClientSecret { public static final String SERIALIZED_NAME_CLIENT_SECRET = "client_secret"; @SerializedName(SERIALIZED_NAME_CLIENT_SECRET) diff --git a/src/main/java/saasus/sdk/auth/models/CloudFormationLaunchStackLink.java b/src/main/java/saasus/sdk/auth/models/CloudFormationLaunchStackLink.java index 194c7dd0..843a484b 100644 --- a/src/main/java/saasus/sdk/auth/models/CloudFormationLaunchStackLink.java +++ b/src/main/java/saasus/sdk/auth/models/CloudFormationLaunchStackLink.java @@ -49,7 +49,7 @@ /** * CloudFormationLaunchStackLink */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class CloudFormationLaunchStackLink { public static final String SERIALIZED_NAME_LINK = "link"; @SerializedName(SERIALIZED_NAME_LINK) diff --git a/src/main/java/saasus/sdk/auth/models/ConfirmEmailUpdateParam.java b/src/main/java/saasus/sdk/auth/models/ConfirmEmailUpdateParam.java index 6abfb0f2..94338e36 100644 --- a/src/main/java/saasus/sdk/auth/models/ConfirmEmailUpdateParam.java +++ b/src/main/java/saasus/sdk/auth/models/ConfirmEmailUpdateParam.java @@ -49,7 +49,7 @@ /** * ConfirmEmailUpdateParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class ConfirmEmailUpdateParam { public static final String SERIALIZED_NAME_CODE = "code"; @SerializedName(SERIALIZED_NAME_CODE) diff --git a/src/main/java/saasus/sdk/auth/models/ConfirmExternalUserLinkParam.java b/src/main/java/saasus/sdk/auth/models/ConfirmExternalUserLinkParam.java index 9f9c47ab..47728ebd 100644 --- a/src/main/java/saasus/sdk/auth/models/ConfirmExternalUserLinkParam.java +++ b/src/main/java/saasus/sdk/auth/models/ConfirmExternalUserLinkParam.java @@ -49,7 +49,7 @@ /** * ConfirmExternalUserLinkParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class ConfirmExternalUserLinkParam { public static final String SERIALIZED_NAME_ACCESS_TOKEN = "access_token"; @SerializedName(SERIALIZED_NAME_ACCESS_TOKEN) diff --git a/src/main/java/saasus/sdk/auth/models/ConfirmSignUpWithAwsMarketplaceParam.java b/src/main/java/saasus/sdk/auth/models/ConfirmSignUpWithAwsMarketplaceParam.java index c448a8b9..5b1c6d6d 100644 --- a/src/main/java/saasus/sdk/auth/models/ConfirmSignUpWithAwsMarketplaceParam.java +++ b/src/main/java/saasus/sdk/auth/models/ConfirmSignUpWithAwsMarketplaceParam.java @@ -49,7 +49,7 @@ /** * ConfirmSignUpWithAwsMarketplaceParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class ConfirmSignUpWithAwsMarketplaceParam { public static final String SERIALIZED_NAME_TENANT_NAME = "tenant_name"; @SerializedName(SERIALIZED_NAME_TENANT_NAME) diff --git a/src/main/java/saasus/sdk/auth/models/CreateSaasUserParam.java b/src/main/java/saasus/sdk/auth/models/CreateSaasUserParam.java index 3aad1854..3f3d86ca 100644 --- a/src/main/java/saasus/sdk/auth/models/CreateSaasUserParam.java +++ b/src/main/java/saasus/sdk/auth/models/CreateSaasUserParam.java @@ -49,7 +49,7 @@ /** * CreateSaasUserParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class CreateSaasUserParam { public static final String SERIALIZED_NAME_EMAIL = "email"; @SerializedName(SERIALIZED_NAME_EMAIL) diff --git a/src/main/java/saasus/sdk/auth/models/CreateSecretCodeParam.java b/src/main/java/saasus/sdk/auth/models/CreateSecretCodeParam.java index d008eb5c..788efd46 100644 --- a/src/main/java/saasus/sdk/auth/models/CreateSecretCodeParam.java +++ b/src/main/java/saasus/sdk/auth/models/CreateSecretCodeParam.java @@ -49,7 +49,7 @@ /** * CreateSecretCodeParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class CreateSecretCodeParam { public static final String SERIALIZED_NAME_ACCESS_TOKEN = "access_token"; @SerializedName(SERIALIZED_NAME_ACCESS_TOKEN) diff --git a/src/main/java/saasus/sdk/auth/models/CreateTenantInvitationParam.java b/src/main/java/saasus/sdk/auth/models/CreateTenantInvitationParam.java index b6544023..4c99f2f7 100644 --- a/src/main/java/saasus/sdk/auth/models/CreateTenantInvitationParam.java +++ b/src/main/java/saasus/sdk/auth/models/CreateTenantInvitationParam.java @@ -52,7 +52,7 @@ /** * CreateTenantInvitationParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class CreateTenantInvitationParam { public static final String SERIALIZED_NAME_EMAIL = "email"; @SerializedName(SERIALIZED_NAME_EMAIL) diff --git a/src/main/java/saasus/sdk/auth/models/CreateTenantUserParam.java b/src/main/java/saasus/sdk/auth/models/CreateTenantUserParam.java index 8784cdd5..6fdb62b4 100644 --- a/src/main/java/saasus/sdk/auth/models/CreateTenantUserParam.java +++ b/src/main/java/saasus/sdk/auth/models/CreateTenantUserParam.java @@ -51,7 +51,7 @@ /** * CreateTenantUserParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class CreateTenantUserParam { public static final String SERIALIZED_NAME_EMAIL = "email"; @SerializedName(SERIALIZED_NAME_EMAIL) diff --git a/src/main/java/saasus/sdk/auth/models/CreateTenantUserRolesParam.java b/src/main/java/saasus/sdk/auth/models/CreateTenantUserRolesParam.java index d3435c29..2283dd53 100644 --- a/src/main/java/saasus/sdk/auth/models/CreateTenantUserRolesParam.java +++ b/src/main/java/saasus/sdk/auth/models/CreateTenantUserRolesParam.java @@ -51,7 +51,7 @@ /** * CreateTenantUserRolesParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class CreateTenantUserRolesParam { public static final String SERIALIZED_NAME_ROLE_NAMES = "role_names"; @SerializedName(SERIALIZED_NAME_ROLE_NAMES) diff --git a/src/main/java/saasus/sdk/auth/models/Credentials.java b/src/main/java/saasus/sdk/auth/models/Credentials.java index 55a0624a..3a444f86 100644 --- a/src/main/java/saasus/sdk/auth/models/Credentials.java +++ b/src/main/java/saasus/sdk/auth/models/Credentials.java @@ -49,7 +49,7 @@ /** * Credentials */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class Credentials { public static final String SERIALIZED_NAME_ID_TOKEN = "id_token"; @SerializedName(SERIALIZED_NAME_ID_TOKEN) diff --git a/src/main/java/saasus/sdk/auth/models/CustomizePageProps.java b/src/main/java/saasus/sdk/auth/models/CustomizePageProps.java index e32fb490..1df37615 100644 --- a/src/main/java/saasus/sdk/auth/models/CustomizePageProps.java +++ b/src/main/java/saasus/sdk/auth/models/CustomizePageProps.java @@ -49,7 +49,7 @@ /** * CustomizePageProps */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class CustomizePageProps { public static final String SERIALIZED_NAME_HTML_CONTENTS = "html_contents"; @SerializedName(SERIALIZED_NAME_HTML_CONTENTS) diff --git a/src/main/java/saasus/sdk/auth/models/CustomizePageSettings.java b/src/main/java/saasus/sdk/auth/models/CustomizePageSettings.java index 136f7b68..4d1f0a11 100644 --- a/src/main/java/saasus/sdk/auth/models/CustomizePageSettings.java +++ b/src/main/java/saasus/sdk/auth/models/CustomizePageSettings.java @@ -49,7 +49,7 @@ /** * CustomizePageSettings */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class CustomizePageSettings { public static final String SERIALIZED_NAME_TITLE = "title"; @SerializedName(SERIALIZED_NAME_TITLE) diff --git a/src/main/java/saasus/sdk/auth/models/CustomizePageSettingsProps.java b/src/main/java/saasus/sdk/auth/models/CustomizePageSettingsProps.java index 633a5b26..f4ca4587 100644 --- a/src/main/java/saasus/sdk/auth/models/CustomizePageSettingsProps.java +++ b/src/main/java/saasus/sdk/auth/models/CustomizePageSettingsProps.java @@ -49,7 +49,7 @@ /** * CustomizePageSettingsProps */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class CustomizePageSettingsProps { public static final String SERIALIZED_NAME_TITLE = "title"; @SerializedName(SERIALIZED_NAME_TITLE) diff --git a/src/main/java/saasus/sdk/auth/models/CustomizePages.java b/src/main/java/saasus/sdk/auth/models/CustomizePages.java index 9526ae15..341c9fa7 100644 --- a/src/main/java/saasus/sdk/auth/models/CustomizePages.java +++ b/src/main/java/saasus/sdk/auth/models/CustomizePages.java @@ -50,7 +50,7 @@ /** * CustomizePages */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class CustomizePages { public static final String SERIALIZED_NAME_SIGN_UP_PAGE = "sign_up_page"; @SerializedName(SERIALIZED_NAME_SIGN_UP_PAGE) diff --git a/src/main/java/saasus/sdk/auth/models/DeviceConfiguration.java b/src/main/java/saasus/sdk/auth/models/DeviceConfiguration.java index 50621fe6..616d6627 100644 --- a/src/main/java/saasus/sdk/auth/models/DeviceConfiguration.java +++ b/src/main/java/saasus/sdk/auth/models/DeviceConfiguration.java @@ -49,7 +49,7 @@ /** * Settings for remembering trusted devices */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class DeviceConfiguration { /** * always: always remember userOptIn: user opt-in no: don't save diff --git a/src/main/java/saasus/sdk/auth/models/DnsRecord.java b/src/main/java/saasus/sdk/auth/models/DnsRecord.java index 25819c47..12d263aa 100644 --- a/src/main/java/saasus/sdk/auth/models/DnsRecord.java +++ b/src/main/java/saasus/sdk/auth/models/DnsRecord.java @@ -49,7 +49,7 @@ /** * DnsRecord */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class DnsRecord { /** * CNAME Resource Record diff --git a/src/main/java/saasus/sdk/auth/models/Env.java b/src/main/java/saasus/sdk/auth/models/Env.java index 7b16c4d9..78d3fe63 100644 --- a/src/main/java/saasus/sdk/auth/models/Env.java +++ b/src/main/java/saasus/sdk/auth/models/Env.java @@ -49,7 +49,7 @@ /** * env info */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class Env { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/saasus/sdk/auth/models/Envs.java b/src/main/java/saasus/sdk/auth/models/Envs.java index 14563230..deddc35f 100644 --- a/src/main/java/saasus/sdk/auth/models/Envs.java +++ b/src/main/java/saasus/sdk/auth/models/Envs.java @@ -52,7 +52,7 @@ /** * env list */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class Envs { public static final String SERIALIZED_NAME_ENVS = "envs"; @SerializedName(SERIALIZED_NAME_ENVS) diff --git a/src/main/java/saasus/sdk/auth/models/Error.java b/src/main/java/saasus/sdk/auth/models/Error.java index 5ed473dd..1e83f408 100644 --- a/src/main/java/saasus/sdk/auth/models/Error.java +++ b/src/main/java/saasus/sdk/auth/models/Error.java @@ -51,7 +51,7 @@ /** * Error */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class Error { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/src/main/java/saasus/sdk/auth/models/IdentityProviderConfiguration.java b/src/main/java/saasus/sdk/auth/models/IdentityProviderConfiguration.java index 61ff23b4..2364c9f0 100644 --- a/src/main/java/saasus/sdk/auth/models/IdentityProviderConfiguration.java +++ b/src/main/java/saasus/sdk/auth/models/IdentityProviderConfiguration.java @@ -49,7 +49,7 @@ /** * This information is required to set up sign-in using an external identity provider. It cannot be changed. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class IdentityProviderConfiguration { public static final String SERIALIZED_NAME_DOMAIN = "domain"; @SerializedName(SERIALIZED_NAME_DOMAIN) diff --git a/src/main/java/saasus/sdk/auth/models/IdentityProviderProps.java b/src/main/java/saasus/sdk/auth/models/IdentityProviderProps.java index 20ccbf90..59e5e99f 100644 --- a/src/main/java/saasus/sdk/auth/models/IdentityProviderProps.java +++ b/src/main/java/saasus/sdk/auth/models/IdentityProviderProps.java @@ -49,7 +49,7 @@ /** * IdentityProviderProps */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class IdentityProviderProps { public static final String SERIALIZED_NAME_APPLICATION_ID = "application_id"; @SerializedName(SERIALIZED_NAME_APPLICATION_ID) diff --git a/src/main/java/saasus/sdk/auth/models/IdentityProviderSaml.java b/src/main/java/saasus/sdk/auth/models/IdentityProviderSaml.java index 81e8bf1b..9cbf3222 100644 --- a/src/main/java/saasus/sdk/auth/models/IdentityProviderSaml.java +++ b/src/main/java/saasus/sdk/auth/models/IdentityProviderSaml.java @@ -49,7 +49,7 @@ /** * IdentityProviderSaml */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class IdentityProviderSaml { public static final String SERIALIZED_NAME_METADATA_URL = "metadata_url"; @SerializedName(SERIALIZED_NAME_METADATA_URL) diff --git a/src/main/java/saasus/sdk/auth/models/IdentityProviders.java b/src/main/java/saasus/sdk/auth/models/IdentityProviders.java index 4f00afd7..c03ed885 100644 --- a/src/main/java/saasus/sdk/auth/models/IdentityProviders.java +++ b/src/main/java/saasus/sdk/auth/models/IdentityProviders.java @@ -50,7 +50,7 @@ /** * IdentityProviders */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class IdentityProviders { public static final String SERIALIZED_NAME_GOOGLE = "google"; @SerializedName(SERIALIZED_NAME_GOOGLE) diff --git a/src/main/java/saasus/sdk/auth/models/Invitation.java b/src/main/java/saasus/sdk/auth/models/Invitation.java index cbbdacb6..3207976c 100644 --- a/src/main/java/saasus/sdk/auth/models/Invitation.java +++ b/src/main/java/saasus/sdk/auth/models/Invitation.java @@ -53,7 +53,7 @@ /** * Invitation */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class Invitation { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/saasus/sdk/auth/models/InvitationValidity.java b/src/main/java/saasus/sdk/auth/models/InvitationValidity.java index 3851d450..a44c7b42 100644 --- a/src/main/java/saasus/sdk/auth/models/InvitationValidity.java +++ b/src/main/java/saasus/sdk/auth/models/InvitationValidity.java @@ -49,7 +49,7 @@ /** * Invitation validity */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class InvitationValidity { public static final String SERIALIZED_NAME_IS_VALID = "is_valid"; @SerializedName(SERIALIZED_NAME_IS_VALID) diff --git a/src/main/java/saasus/sdk/auth/models/Invitations.java b/src/main/java/saasus/sdk/auth/models/Invitations.java index 14ad4b30..9d15c21d 100644 --- a/src/main/java/saasus/sdk/auth/models/Invitations.java +++ b/src/main/java/saasus/sdk/auth/models/Invitations.java @@ -52,7 +52,7 @@ /** * Invitations */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class Invitations { public static final String SERIALIZED_NAME_INVITATIONS = "invitations"; @SerializedName(SERIALIZED_NAME_INVITATIONS) diff --git a/src/main/java/saasus/sdk/auth/models/InvitedUserEnvironmentInformationInner.java b/src/main/java/saasus/sdk/auth/models/InvitedUserEnvironmentInformationInner.java index 3e405138..7176da13 100644 --- a/src/main/java/saasus/sdk/auth/models/InvitedUserEnvironmentInformationInner.java +++ b/src/main/java/saasus/sdk/auth/models/InvitedUserEnvironmentInformationInner.java @@ -51,7 +51,7 @@ /** * InvitedUserEnvironmentInformationInner */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class InvitedUserEnvironmentInformationInner { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/saasus/sdk/auth/models/LinkAwsMarketplaceParam.java b/src/main/java/saasus/sdk/auth/models/LinkAwsMarketplaceParam.java index 1b08bc79..32a9dea6 100644 --- a/src/main/java/saasus/sdk/auth/models/LinkAwsMarketplaceParam.java +++ b/src/main/java/saasus/sdk/auth/models/LinkAwsMarketplaceParam.java @@ -49,7 +49,7 @@ /** * LinkAwsMarketplaceParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class LinkAwsMarketplaceParam { public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; @SerializedName(SERIALIZED_NAME_TENANT_ID) diff --git a/src/main/java/saasus/sdk/auth/models/MessageTemplate.java b/src/main/java/saasus/sdk/auth/models/MessageTemplate.java index 49d8995a..5192ecce 100644 --- a/src/main/java/saasus/sdk/auth/models/MessageTemplate.java +++ b/src/main/java/saasus/sdk/auth/models/MessageTemplate.java @@ -49,7 +49,7 @@ /** * MessageTemplate */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class MessageTemplate { public static final String SERIALIZED_NAME_SUBJECT = "subject"; @SerializedName(SERIALIZED_NAME_SUBJECT) diff --git a/src/main/java/saasus/sdk/auth/models/MfaConfiguration.java b/src/main/java/saasus/sdk/auth/models/MfaConfiguration.java index d25fbaf4..7915bceb 100644 --- a/src/main/java/saasus/sdk/auth/models/MfaConfiguration.java +++ b/src/main/java/saasus/sdk/auth/models/MfaConfiguration.java @@ -49,7 +49,7 @@ /** * MFA device authentication settings ※ This function is not yet provided, so it cannot be changed or saved. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class MfaConfiguration { /** * on: apply when all users log in optional: apply to individual users with MFA factor enabled ※ The parameter is currently optional and fixed. diff --git a/src/main/java/saasus/sdk/auth/models/MfaPreference.java b/src/main/java/saasus/sdk/auth/models/MfaPreference.java index 572ac696..bf8caafb 100644 --- a/src/main/java/saasus/sdk/auth/models/MfaPreference.java +++ b/src/main/java/saasus/sdk/auth/models/MfaPreference.java @@ -49,7 +49,7 @@ /** * MfaPreference */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class MfaPreference { public static final String SERIALIZED_NAME_ENABLED = "enabled"; @SerializedName(SERIALIZED_NAME_ENABLED) diff --git a/src/main/java/saasus/sdk/auth/models/NotificationMessages.java b/src/main/java/saasus/sdk/auth/models/NotificationMessages.java index 7c255f10..ea69b19d 100644 --- a/src/main/java/saasus/sdk/auth/models/NotificationMessages.java +++ b/src/main/java/saasus/sdk/auth/models/NotificationMessages.java @@ -50,7 +50,7 @@ /** * NotificationMessages */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class NotificationMessages { public static final String SERIALIZED_NAME_SIGN_UP = "sign_up"; @SerializedName(SERIALIZED_NAME_SIGN_UP) diff --git a/src/main/java/saasus/sdk/auth/models/PasswordPolicy.java b/src/main/java/saasus/sdk/auth/models/PasswordPolicy.java index 47eae813..2bcaf711 100644 --- a/src/main/java/saasus/sdk/auth/models/PasswordPolicy.java +++ b/src/main/java/saasus/sdk/auth/models/PasswordPolicy.java @@ -49,7 +49,7 @@ /** * Password Policy */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class PasswordPolicy { public static final String SERIALIZED_NAME_MINIMUM_LENGTH = "minimum_length"; @SerializedName(SERIALIZED_NAME_MINIMUM_LENGTH) diff --git a/src/main/java/saasus/sdk/auth/models/PlanHistories.java b/src/main/java/saasus/sdk/auth/models/PlanHistories.java index 266e976b..f2ac6e01 100644 --- a/src/main/java/saasus/sdk/auth/models/PlanHistories.java +++ b/src/main/java/saasus/sdk/auth/models/PlanHistories.java @@ -52,7 +52,7 @@ /** * PlanHistories */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class PlanHistories { public static final String SERIALIZED_NAME_PLAN_HISTORIES = "plan_histories"; @SerializedName(SERIALIZED_NAME_PLAN_HISTORIES) diff --git a/src/main/java/saasus/sdk/auth/models/PlanHistory.java b/src/main/java/saasus/sdk/auth/models/PlanHistory.java index ef6c4395..7f49b8be 100644 --- a/src/main/java/saasus/sdk/auth/models/PlanHistory.java +++ b/src/main/java/saasus/sdk/auth/models/PlanHistory.java @@ -50,7 +50,7 @@ /** * PlanHistory */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class PlanHistory { public static final String SERIALIZED_NAME_PLAN_ID = "plan_id"; @SerializedName(SERIALIZED_NAME_PLAN_ID) diff --git a/src/main/java/saasus/sdk/auth/models/PlanReservation.java b/src/main/java/saasus/sdk/auth/models/PlanReservation.java index 77c92f88..cddd3309 100644 --- a/src/main/java/saasus/sdk/auth/models/PlanReservation.java +++ b/src/main/java/saasus/sdk/auth/models/PlanReservation.java @@ -50,7 +50,7 @@ /** * PlanReservation */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class PlanReservation { public static final String SERIALIZED_NAME_NEXT_PLAN_ID = "next_plan_id"; @SerializedName(SERIALIZED_NAME_NEXT_PLAN_ID) diff --git a/src/main/java/saasus/sdk/auth/models/RecaptchaProps.java b/src/main/java/saasus/sdk/auth/models/RecaptchaProps.java index 1cb356c6..a41add06 100644 --- a/src/main/java/saasus/sdk/auth/models/RecaptchaProps.java +++ b/src/main/java/saasus/sdk/auth/models/RecaptchaProps.java @@ -49,7 +49,7 @@ /** * reCAPTCHA authentication settings ※ This function is not yet provided, so it cannot be changed or saved. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class RecaptchaProps { public static final String SERIALIZED_NAME_SITE_KEY = "site_key"; @SerializedName(SERIALIZED_NAME_SITE_KEY) diff --git a/src/main/java/saasus/sdk/auth/models/RequestEmailUpdateParam.java b/src/main/java/saasus/sdk/auth/models/RequestEmailUpdateParam.java index d3c54932..e9e561e8 100644 --- a/src/main/java/saasus/sdk/auth/models/RequestEmailUpdateParam.java +++ b/src/main/java/saasus/sdk/auth/models/RequestEmailUpdateParam.java @@ -49,7 +49,7 @@ /** * RequestEmailUpdateParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class RequestEmailUpdateParam { public static final String SERIALIZED_NAME_EMAIL = "email"; @SerializedName(SERIALIZED_NAME_EMAIL) diff --git a/src/main/java/saasus/sdk/auth/models/RequestExternalUserLinkParam.java b/src/main/java/saasus/sdk/auth/models/RequestExternalUserLinkParam.java index a976bd7e..540e20bd 100644 --- a/src/main/java/saasus/sdk/auth/models/RequestExternalUserLinkParam.java +++ b/src/main/java/saasus/sdk/auth/models/RequestExternalUserLinkParam.java @@ -49,7 +49,7 @@ /** * RequestExternalUserLinkParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class RequestExternalUserLinkParam { public static final String SERIALIZED_NAME_ACCESS_TOKEN = "access_token"; @SerializedName(SERIALIZED_NAME_ACCESS_TOKEN) diff --git a/src/main/java/saasus/sdk/auth/models/ResendSignUpConfirmationEmailParam.java b/src/main/java/saasus/sdk/auth/models/ResendSignUpConfirmationEmailParam.java index 008f1d2d..8777bd96 100644 --- a/src/main/java/saasus/sdk/auth/models/ResendSignUpConfirmationEmailParam.java +++ b/src/main/java/saasus/sdk/auth/models/ResendSignUpConfirmationEmailParam.java @@ -49,7 +49,7 @@ /** * ResendSignUpConfirmationEmailParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class ResendSignUpConfirmationEmailParam { public static final String SERIALIZED_NAME_EMAIL = "email"; @SerializedName(SERIALIZED_NAME_EMAIL) diff --git a/src/main/java/saasus/sdk/auth/models/Role.java b/src/main/java/saasus/sdk/auth/models/Role.java index ea79a261..36da2e27 100644 --- a/src/main/java/saasus/sdk/auth/models/Role.java +++ b/src/main/java/saasus/sdk/auth/models/Role.java @@ -49,7 +49,7 @@ /** * role info */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class Role { public static final String SERIALIZED_NAME_ROLE_NAME = "role_name"; @SerializedName(SERIALIZED_NAME_ROLE_NAME) diff --git a/src/main/java/saasus/sdk/auth/models/Roles.java b/src/main/java/saasus/sdk/auth/models/Roles.java index af1c7ab7..e3b4481a 100644 --- a/src/main/java/saasus/sdk/auth/models/Roles.java +++ b/src/main/java/saasus/sdk/auth/models/Roles.java @@ -52,7 +52,7 @@ /** * Roles */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class Roles { public static final String SERIALIZED_NAME_ROLES = "roles"; @SerializedName(SERIALIZED_NAME_ROLES) diff --git a/src/main/java/saasus/sdk/auth/models/SaasId.java b/src/main/java/saasus/sdk/auth/models/SaasId.java index 802a693e..522a5542 100644 --- a/src/main/java/saasus/sdk/auth/models/SaasId.java +++ b/src/main/java/saasus/sdk/auth/models/SaasId.java @@ -49,7 +49,7 @@ /** * SaasId */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class SaasId { public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; @SerializedName(SERIALIZED_NAME_TENANT_ID) diff --git a/src/main/java/saasus/sdk/auth/models/SaasUser.java b/src/main/java/saasus/sdk/auth/models/SaasUser.java index 821c5aac..8887f79d 100644 --- a/src/main/java/saasus/sdk/auth/models/SaasUser.java +++ b/src/main/java/saasus/sdk/auth/models/SaasUser.java @@ -51,7 +51,7 @@ /** * SaasUser */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class SaasUser { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/saasus/sdk/auth/models/SaasUsers.java b/src/main/java/saasus/sdk/auth/models/SaasUsers.java index 3101fb93..d7282374 100644 --- a/src/main/java/saasus/sdk/auth/models/SaasUsers.java +++ b/src/main/java/saasus/sdk/auth/models/SaasUsers.java @@ -52,7 +52,7 @@ /** * SaasUsers */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class SaasUsers { public static final String SERIALIZED_NAME_USERS = "users"; @SerializedName(SERIALIZED_NAME_USERS) diff --git a/src/main/java/saasus/sdk/auth/models/SelfRegist.java b/src/main/java/saasus/sdk/auth/models/SelfRegist.java index beb3dcd3..766816c5 100644 --- a/src/main/java/saasus/sdk/auth/models/SelfRegist.java +++ b/src/main/java/saasus/sdk/auth/models/SelfRegist.java @@ -49,7 +49,7 @@ /** * self sign-up permission */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class SelfRegist { public static final String SERIALIZED_NAME_ENABLE = "enable"; @SerializedName(SERIALIZED_NAME_ENABLE) diff --git a/src/main/java/saasus/sdk/auth/models/SignInSettings.java b/src/main/java/saasus/sdk/auth/models/SignInSettings.java index 700ef7cb..d44f6ce0 100644 --- a/src/main/java/saasus/sdk/auth/models/SignInSettings.java +++ b/src/main/java/saasus/sdk/auth/models/SignInSettings.java @@ -56,7 +56,7 @@ /** * SignInSettings */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class SignInSettings { public static final String SERIALIZED_NAME_PASSWORD_POLICY = "password_policy"; @SerializedName(SERIALIZED_NAME_PASSWORD_POLICY) diff --git a/src/main/java/saasus/sdk/auth/models/SignUpParam.java b/src/main/java/saasus/sdk/auth/models/SignUpParam.java index 523ea52c..1bccb323 100644 --- a/src/main/java/saasus/sdk/auth/models/SignUpParam.java +++ b/src/main/java/saasus/sdk/auth/models/SignUpParam.java @@ -49,7 +49,7 @@ /** * SignUpParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class SignUpParam { public static final String SERIALIZED_NAME_EMAIL = "email"; @SerializedName(SERIALIZED_NAME_EMAIL) diff --git a/src/main/java/saasus/sdk/auth/models/SignUpWithAwsMarketplaceParam.java b/src/main/java/saasus/sdk/auth/models/SignUpWithAwsMarketplaceParam.java index 696ee7a8..6a6f6f4e 100644 --- a/src/main/java/saasus/sdk/auth/models/SignUpWithAwsMarketplaceParam.java +++ b/src/main/java/saasus/sdk/auth/models/SignUpWithAwsMarketplaceParam.java @@ -49,7 +49,7 @@ /** * SignUpWithAwsMarketplaceParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class SignUpWithAwsMarketplaceParam { public static final String SERIALIZED_NAME_EMAIL = "email"; @SerializedName(SERIALIZED_NAME_EMAIL) diff --git a/src/main/java/saasus/sdk/auth/models/SingleTenantSettings.java b/src/main/java/saasus/sdk/auth/models/SingleTenantSettings.java index 29cf3cdd..06469480 100644 --- a/src/main/java/saasus/sdk/auth/models/SingleTenantSettings.java +++ b/src/main/java/saasus/sdk/auth/models/SingleTenantSettings.java @@ -49,7 +49,7 @@ /** * SingleTenantSettings */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class SingleTenantSettings { public static final String SERIALIZED_NAME_ENABLED = "enabled"; @SerializedName(SERIALIZED_NAME_ENABLED) diff --git a/src/main/java/saasus/sdk/auth/models/SoftwareTokenSecretCode.java b/src/main/java/saasus/sdk/auth/models/SoftwareTokenSecretCode.java index 05dc0e45..2935c4b5 100644 --- a/src/main/java/saasus/sdk/auth/models/SoftwareTokenSecretCode.java +++ b/src/main/java/saasus/sdk/auth/models/SoftwareTokenSecretCode.java @@ -49,7 +49,7 @@ /** * SoftwareTokenSecretCode */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class SoftwareTokenSecretCode { public static final String SERIALIZED_NAME_SECRET_CODE = "secret_code"; @SerializedName(SERIALIZED_NAME_SECRET_CODE) diff --git a/src/main/java/saasus/sdk/auth/models/Tenant.java b/src/main/java/saasus/sdk/auth/models/Tenant.java index 5088bbd8..bd969c25 100644 --- a/src/main/java/saasus/sdk/auth/models/Tenant.java +++ b/src/main/java/saasus/sdk/auth/models/Tenant.java @@ -56,7 +56,7 @@ /** * Tenant */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class Tenant { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/saasus/sdk/auth/models/TenantAttributes.java b/src/main/java/saasus/sdk/auth/models/TenantAttributes.java index 30ce3fe1..79df98f6 100644 --- a/src/main/java/saasus/sdk/auth/models/TenantAttributes.java +++ b/src/main/java/saasus/sdk/auth/models/TenantAttributes.java @@ -52,7 +52,7 @@ /** * TenantAttributes */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class TenantAttributes { public static final String SERIALIZED_NAME_TENANT_ATTRIBUTES = "tenant_attributes"; @SerializedName(SERIALIZED_NAME_TENANT_ATTRIBUTES) diff --git a/src/main/java/saasus/sdk/auth/models/TenantDetail.java b/src/main/java/saasus/sdk/auth/models/TenantDetail.java index a0cad7be..40f3e3f7 100644 --- a/src/main/java/saasus/sdk/auth/models/TenantDetail.java +++ b/src/main/java/saasus/sdk/auth/models/TenantDetail.java @@ -56,7 +56,7 @@ /** * TenantDetail */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class TenantDetail { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/saasus/sdk/auth/models/TenantIdentityProviderProps.java b/src/main/java/saasus/sdk/auth/models/TenantIdentityProviderProps.java index 4decd135..e4740294 100644 --- a/src/main/java/saasus/sdk/auth/models/TenantIdentityProviderProps.java +++ b/src/main/java/saasus/sdk/auth/models/TenantIdentityProviderProps.java @@ -58,7 +58,7 @@ import saasus.sdk.auth.JSON; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class TenantIdentityProviderProps extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(TenantIdentityProviderProps.class.getName()); diff --git a/src/main/java/saasus/sdk/auth/models/TenantIdentityProviders.java b/src/main/java/saasus/sdk/auth/models/TenantIdentityProviders.java index 3ed3ddc4..c8f1a717 100644 --- a/src/main/java/saasus/sdk/auth/models/TenantIdentityProviders.java +++ b/src/main/java/saasus/sdk/auth/models/TenantIdentityProviders.java @@ -50,7 +50,7 @@ /** * TenantIdentityProviders */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class TenantIdentityProviders { public static final String SERIALIZED_NAME_SAML = "saml"; @SerializedName(SERIALIZED_NAME_SAML) diff --git a/src/main/java/saasus/sdk/auth/models/TenantIdentityProvidersSaml.java b/src/main/java/saasus/sdk/auth/models/TenantIdentityProvidersSaml.java index 4b22de62..2f0e70af 100644 --- a/src/main/java/saasus/sdk/auth/models/TenantIdentityProvidersSaml.java +++ b/src/main/java/saasus/sdk/auth/models/TenantIdentityProvidersSaml.java @@ -49,7 +49,7 @@ /** * TenantIdentityProvidersSaml */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class TenantIdentityProvidersSaml { public static final String SERIALIZED_NAME_METADATA_URL = "metadata_url"; @SerializedName(SERIALIZED_NAME_METADATA_URL) diff --git a/src/main/java/saasus/sdk/auth/models/TenantProps.java b/src/main/java/saasus/sdk/auth/models/TenantProps.java index f24cc0b6..4e6e19ac 100644 --- a/src/main/java/saasus/sdk/auth/models/TenantProps.java +++ b/src/main/java/saasus/sdk/auth/models/TenantProps.java @@ -51,7 +51,7 @@ /** * TenantProps */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class TenantProps { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/saasus/sdk/auth/models/Tenants.java b/src/main/java/saasus/sdk/auth/models/Tenants.java index 8304e558..d870ee44 100644 --- a/src/main/java/saasus/sdk/auth/models/Tenants.java +++ b/src/main/java/saasus/sdk/auth/models/Tenants.java @@ -52,7 +52,7 @@ /** * Tenant Info */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class Tenants { public static final String SERIALIZED_NAME_TENANTS = "tenants"; @SerializedName(SERIALIZED_NAME_TENANTS) diff --git a/src/main/java/saasus/sdk/auth/models/UpdateBasicInfoParam.java b/src/main/java/saasus/sdk/auth/models/UpdateBasicInfoParam.java index 4209404f..2bc87262 100644 --- a/src/main/java/saasus/sdk/auth/models/UpdateBasicInfoParam.java +++ b/src/main/java/saasus/sdk/auth/models/UpdateBasicInfoParam.java @@ -49,7 +49,7 @@ /** * UpdateBasicInfoParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class UpdateBasicInfoParam { public static final String SERIALIZED_NAME_DOMAIN_NAME = "domain_name"; @SerializedName(SERIALIZED_NAME_DOMAIN_NAME) diff --git a/src/main/java/saasus/sdk/auth/models/UpdateCustomizePageSettingsParam.java b/src/main/java/saasus/sdk/auth/models/UpdateCustomizePageSettingsParam.java index 49c31608..3fd97344 100644 --- a/src/main/java/saasus/sdk/auth/models/UpdateCustomizePageSettingsParam.java +++ b/src/main/java/saasus/sdk/auth/models/UpdateCustomizePageSettingsParam.java @@ -49,7 +49,7 @@ /** * UpdateCustomizePageSettingsParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class UpdateCustomizePageSettingsParam { public static final String SERIALIZED_NAME_TITLE = "title"; @SerializedName(SERIALIZED_NAME_TITLE) diff --git a/src/main/java/saasus/sdk/auth/models/UpdateCustomizePagesParam.java b/src/main/java/saasus/sdk/auth/models/UpdateCustomizePagesParam.java index 7bda55f0..fdfb6fe2 100644 --- a/src/main/java/saasus/sdk/auth/models/UpdateCustomizePagesParam.java +++ b/src/main/java/saasus/sdk/auth/models/UpdateCustomizePagesParam.java @@ -50,7 +50,7 @@ /** * UpdateCustomizePagesParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class UpdateCustomizePagesParam { public static final String SERIALIZED_NAME_SIGN_UP_PAGE = "sign_up_page"; @SerializedName(SERIALIZED_NAME_SIGN_UP_PAGE) diff --git a/src/main/java/saasus/sdk/auth/models/UpdateEnvParam.java b/src/main/java/saasus/sdk/auth/models/UpdateEnvParam.java index 8cf69449..5ceade7f 100644 --- a/src/main/java/saasus/sdk/auth/models/UpdateEnvParam.java +++ b/src/main/java/saasus/sdk/auth/models/UpdateEnvParam.java @@ -49,7 +49,7 @@ /** * UpdateEnvParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class UpdateEnvParam { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/saasus/sdk/auth/models/UpdateIdentityProviderParam.java b/src/main/java/saasus/sdk/auth/models/UpdateIdentityProviderParam.java index f07b4862..e1ea6055 100644 --- a/src/main/java/saasus/sdk/auth/models/UpdateIdentityProviderParam.java +++ b/src/main/java/saasus/sdk/auth/models/UpdateIdentityProviderParam.java @@ -51,7 +51,7 @@ /** * UpdateIdentityProviderParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class UpdateIdentityProviderParam { public static final String SERIALIZED_NAME_PROVIDER = "provider"; @SerializedName(SERIALIZED_NAME_PROVIDER) diff --git a/src/main/java/saasus/sdk/auth/models/UpdateNotificationMessagesParam.java b/src/main/java/saasus/sdk/auth/models/UpdateNotificationMessagesParam.java index 24e3bf2b..a4b94ff1 100644 --- a/src/main/java/saasus/sdk/auth/models/UpdateNotificationMessagesParam.java +++ b/src/main/java/saasus/sdk/auth/models/UpdateNotificationMessagesParam.java @@ -50,7 +50,7 @@ /** * UpdateNotificationMessagesParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class UpdateNotificationMessagesParam { public static final String SERIALIZED_NAME_SIGN_UP = "sign_up"; @SerializedName(SERIALIZED_NAME_SIGN_UP) diff --git a/src/main/java/saasus/sdk/auth/models/UpdateSaasUserAttributesParam.java b/src/main/java/saasus/sdk/auth/models/UpdateSaasUserAttributesParam.java index 7fcb83b1..3ca71d48 100644 --- a/src/main/java/saasus/sdk/auth/models/UpdateSaasUserAttributesParam.java +++ b/src/main/java/saasus/sdk/auth/models/UpdateSaasUserAttributesParam.java @@ -51,7 +51,7 @@ /** * UpdateSaasUserAttributesParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class UpdateSaasUserAttributesParam { public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; @SerializedName(SERIALIZED_NAME_ATTRIBUTES) diff --git a/src/main/java/saasus/sdk/auth/models/UpdateSaasUserEmailParam.java b/src/main/java/saasus/sdk/auth/models/UpdateSaasUserEmailParam.java index c32445f5..dd41daf6 100644 --- a/src/main/java/saasus/sdk/auth/models/UpdateSaasUserEmailParam.java +++ b/src/main/java/saasus/sdk/auth/models/UpdateSaasUserEmailParam.java @@ -49,7 +49,7 @@ /** * UpdateSaasUserEmailParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class UpdateSaasUserEmailParam { public static final String SERIALIZED_NAME_EMAIL = "email"; @SerializedName(SERIALIZED_NAME_EMAIL) diff --git a/src/main/java/saasus/sdk/auth/models/UpdateSaasUserPasswordParam.java b/src/main/java/saasus/sdk/auth/models/UpdateSaasUserPasswordParam.java index 274ee021..6b3fe572 100644 --- a/src/main/java/saasus/sdk/auth/models/UpdateSaasUserPasswordParam.java +++ b/src/main/java/saasus/sdk/auth/models/UpdateSaasUserPasswordParam.java @@ -49,7 +49,7 @@ /** * UpdateSaasUserPasswordParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class UpdateSaasUserPasswordParam { public static final String SERIALIZED_NAME_PASSWORD = "password"; @SerializedName(SERIALIZED_NAME_PASSWORD) diff --git a/src/main/java/saasus/sdk/auth/models/UpdateSignInSettingsParam.java b/src/main/java/saasus/sdk/auth/models/UpdateSignInSettingsParam.java index f1f4df4b..8f9c48ab 100644 --- a/src/main/java/saasus/sdk/auth/models/UpdateSignInSettingsParam.java +++ b/src/main/java/saasus/sdk/auth/models/UpdateSignInSettingsParam.java @@ -55,7 +55,7 @@ /** * UpdateSignInSettingsParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class UpdateSignInSettingsParam { public static final String SERIALIZED_NAME_PASSWORD_POLICY = "password_policy"; @SerializedName(SERIALIZED_NAME_PASSWORD_POLICY) diff --git a/src/main/java/saasus/sdk/auth/models/UpdateSingleTenantSettingsParam.java b/src/main/java/saasus/sdk/auth/models/UpdateSingleTenantSettingsParam.java index e3c6541f..7733c055 100644 --- a/src/main/java/saasus/sdk/auth/models/UpdateSingleTenantSettingsParam.java +++ b/src/main/java/saasus/sdk/auth/models/UpdateSingleTenantSettingsParam.java @@ -49,7 +49,7 @@ /** * UpdateSingleTenantSettingsParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class UpdateSingleTenantSettingsParam { public static final String SERIALIZED_NAME_ENABLED = "enabled"; @SerializedName(SERIALIZED_NAME_ENABLED) diff --git a/src/main/java/saasus/sdk/auth/models/UpdateSoftwareTokenParam.java b/src/main/java/saasus/sdk/auth/models/UpdateSoftwareTokenParam.java index c5bbff99..ab233ffb 100644 --- a/src/main/java/saasus/sdk/auth/models/UpdateSoftwareTokenParam.java +++ b/src/main/java/saasus/sdk/auth/models/UpdateSoftwareTokenParam.java @@ -49,7 +49,7 @@ /** * UpdateSoftwareTokenParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class UpdateSoftwareTokenParam { public static final String SERIALIZED_NAME_ACCESS_TOKEN = "access_token"; @SerializedName(SERIALIZED_NAME_ACCESS_TOKEN) diff --git a/src/main/java/saasus/sdk/auth/models/UpdateTenantIdentityProviderParam.java b/src/main/java/saasus/sdk/auth/models/UpdateTenantIdentityProviderParam.java index 1559256e..166c63ab 100644 --- a/src/main/java/saasus/sdk/auth/models/UpdateTenantIdentityProviderParam.java +++ b/src/main/java/saasus/sdk/auth/models/UpdateTenantIdentityProviderParam.java @@ -51,7 +51,7 @@ /** * If identity_provider_props is null, the sign-in information for the external identity provider specified in provider_type is disabled. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class UpdateTenantIdentityProviderParam { public static final String SERIALIZED_NAME_PROVIDER_TYPE = "provider_type"; @SerializedName(SERIALIZED_NAME_PROVIDER_TYPE) diff --git a/src/main/java/saasus/sdk/auth/models/UpdateTenantUserParam.java b/src/main/java/saasus/sdk/auth/models/UpdateTenantUserParam.java index 743b88d3..3e1ce728 100644 --- a/src/main/java/saasus/sdk/auth/models/UpdateTenantUserParam.java +++ b/src/main/java/saasus/sdk/auth/models/UpdateTenantUserParam.java @@ -51,7 +51,7 @@ /** * UpdateTenantUserParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class UpdateTenantUserParam { public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; @SerializedName(SERIALIZED_NAME_ATTRIBUTES) diff --git a/src/main/java/saasus/sdk/auth/models/User.java b/src/main/java/saasus/sdk/auth/models/User.java index c597887d..1d8df67c 100644 --- a/src/main/java/saasus/sdk/auth/models/User.java +++ b/src/main/java/saasus/sdk/auth/models/User.java @@ -54,7 +54,7 @@ /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class User { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/saasus/sdk/auth/models/UserAttributes.java b/src/main/java/saasus/sdk/auth/models/UserAttributes.java index cdd371dd..c8b4058a 100644 --- a/src/main/java/saasus/sdk/auth/models/UserAttributes.java +++ b/src/main/java/saasus/sdk/auth/models/UserAttributes.java @@ -52,7 +52,7 @@ /** * UserAttributes */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class UserAttributes { public static final String SERIALIZED_NAME_USER_ATTRIBUTES = "user_attributes"; @SerializedName(SERIALIZED_NAME_USER_ATTRIBUTES) diff --git a/src/main/java/saasus/sdk/auth/models/UserAvailableEnv.java b/src/main/java/saasus/sdk/auth/models/UserAvailableEnv.java index 52acd2a2..fc23757c 100644 --- a/src/main/java/saasus/sdk/auth/models/UserAvailableEnv.java +++ b/src/main/java/saasus/sdk/auth/models/UserAvailableEnv.java @@ -52,7 +52,7 @@ /** * UserAvailableEnv */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class UserAvailableEnv { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/saasus/sdk/auth/models/UserAvailableTenant.java b/src/main/java/saasus/sdk/auth/models/UserAvailableTenant.java index 3f0246e9..0521cf41 100644 --- a/src/main/java/saasus/sdk/auth/models/UserAvailableTenant.java +++ b/src/main/java/saasus/sdk/auth/models/UserAvailableTenant.java @@ -54,7 +54,7 @@ /** * UserAvailableTenant */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class UserAvailableTenant { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/saasus/sdk/auth/models/UserInfo.java b/src/main/java/saasus/sdk/auth/models/UserInfo.java index b88539c9..3b3a48ae 100644 --- a/src/main/java/saasus/sdk/auth/models/UserInfo.java +++ b/src/main/java/saasus/sdk/auth/models/UserInfo.java @@ -54,7 +54,7 @@ /** * UserInfo */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class UserInfo { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/saasus/sdk/auth/models/Users.java b/src/main/java/saasus/sdk/auth/models/Users.java index 835f19f4..9c7edf2a 100644 --- a/src/main/java/saasus/sdk/auth/models/Users.java +++ b/src/main/java/saasus/sdk/auth/models/Users.java @@ -52,7 +52,7 @@ /** * Users */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class Users { public static final String SERIALIZED_NAME_USERS = "users"; @SerializedName(SERIALIZED_NAME_USERS) diff --git a/src/main/java/saasus/sdk/auth/models/ValidateInvitationParam.java b/src/main/java/saasus/sdk/auth/models/ValidateInvitationParam.java index 7cd48259..0e1c0b3b 100644 --- a/src/main/java/saasus/sdk/auth/models/ValidateInvitationParam.java +++ b/src/main/java/saasus/sdk/auth/models/ValidateInvitationParam.java @@ -49,7 +49,7 @@ /** * Access token is required for existing users, and email and password is required for new users. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:53.852773010Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:32.469023713Z[Etc/UTC]") public class ValidateInvitationParam { public static final String SERIALIZED_NAME_ACCESS_TOKEN = "access_token"; @SerializedName(SERIALIZED_NAME_ACCESS_TOKEN) diff --git a/src/main/java/saasus/sdk/awsmarketplace/ApiException.java b/src/main/java/saasus/sdk/awsmarketplace/ApiException.java index 3264dd02..7414d460 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/ApiException.java +++ b/src/main/java/saasus/sdk/awsmarketplace/ApiException.java @@ -21,7 +21,7 @@ *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:36.931963715Z[Etc/UTC]") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; diff --git a/src/main/java/saasus/sdk/awsmarketplace/Configuration.java b/src/main/java/saasus/sdk/awsmarketplace/Configuration.java index f525b090..84ef21c6 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/Configuration.java +++ b/src/main/java/saasus/sdk/awsmarketplace/Configuration.java @@ -13,7 +13,7 @@ package saasus.sdk.awsmarketplace; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:36.931963715Z[Etc/UTC]") public class Configuration { public static final String VERSION = "1.0.0"; diff --git a/src/main/java/saasus/sdk/awsmarketplace/Pair.java b/src/main/java/saasus/sdk/awsmarketplace/Pair.java index 7ae46bbf..b686f0dd 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/Pair.java +++ b/src/main/java/saasus/sdk/awsmarketplace/Pair.java @@ -13,7 +13,7 @@ package saasus.sdk.awsmarketplace; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:36.931963715Z[Etc/UTC]") public class Pair { private String name = ""; private String value = ""; diff --git a/src/main/java/saasus/sdk/awsmarketplace/StringUtil.java b/src/main/java/saasus/sdk/awsmarketplace/StringUtil.java index 454d17e2..01fa5af1 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/StringUtil.java +++ b/src/main/java/saasus/sdk/awsmarketplace/StringUtil.java @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:36.931963715Z[Etc/UTC]") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/saasus/sdk/awsmarketplace/auth/ApiKeyAuth.java b/src/main/java/saasus/sdk/awsmarketplace/auth/ApiKeyAuth.java index 6b76bb7e..deafa4d2 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/auth/ApiKeyAuth.java +++ b/src/main/java/saasus/sdk/awsmarketplace/auth/ApiKeyAuth.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:36.931963715Z[Etc/UTC]") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/saasus/sdk/awsmarketplace/auth/HttpBearerAuth.java b/src/main/java/saasus/sdk/awsmarketplace/auth/HttpBearerAuth.java index 72cc327d..d31a192b 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/auth/HttpBearerAuth.java +++ b/src/main/java/saasus/sdk/awsmarketplace/auth/HttpBearerAuth.java @@ -22,7 +22,7 @@ import java.util.Optional; import java.util.function.Supplier; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:36.931963715Z[Etc/UTC]") public class HttpBearerAuth implements Authentication { private final String scheme; private Supplier tokenSupplier; diff --git a/src/main/java/saasus/sdk/awsmarketplace/models/AbstractOpenApiSchema.java b/src/main/java/saasus/sdk/awsmarketplace/models/AbstractOpenApiSchema.java index 4e7278f1..73bc5469 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/models/AbstractOpenApiSchema.java +++ b/src/main/java/saasus/sdk/awsmarketplace/models/AbstractOpenApiSchema.java @@ -21,7 +21,7 @@ /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:36.931963715Z[Etc/UTC]") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/src/main/java/saasus/sdk/awsmarketplace/models/CatalogEntityVisibility.java b/src/main/java/saasus/sdk/awsmarketplace/models/CatalogEntityVisibility.java index 721e9b96..0b0451da 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/models/CatalogEntityVisibility.java +++ b/src/main/java/saasus/sdk/awsmarketplace/models/CatalogEntityVisibility.java @@ -50,7 +50,7 @@ /** * CatalogEntityVisibility */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:36.931963715Z[Etc/UTC]") public class CatalogEntityVisibility { public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; @SerializedName(SERIALIZED_NAME_VISIBILITY) diff --git a/src/main/java/saasus/sdk/awsmarketplace/models/CloudFormationLaunchStackLink.java b/src/main/java/saasus/sdk/awsmarketplace/models/CloudFormationLaunchStackLink.java index f914e97b..7b6182b8 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/models/CloudFormationLaunchStackLink.java +++ b/src/main/java/saasus/sdk/awsmarketplace/models/CloudFormationLaunchStackLink.java @@ -49,7 +49,7 @@ /** * CloudFormationLaunchStackLink */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:36.931963715Z[Etc/UTC]") public class CloudFormationLaunchStackLink { public static final String SERIALIZED_NAME_LINK = "link"; @SerializedName(SERIALIZED_NAME_LINK) diff --git a/src/main/java/saasus/sdk/awsmarketplace/models/CreateCustomerParam.java b/src/main/java/saasus/sdk/awsmarketplace/models/CreateCustomerParam.java index f4eb2aff..c0cb37cf 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/models/CreateCustomerParam.java +++ b/src/main/java/saasus/sdk/awsmarketplace/models/CreateCustomerParam.java @@ -49,7 +49,7 @@ /** * CreateCustomerParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:36.931963715Z[Etc/UTC]") public class CreateCustomerParam { public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; @SerializedName(SERIALIZED_NAME_TENANT_ID) diff --git a/src/main/java/saasus/sdk/awsmarketplace/models/Customer.java b/src/main/java/saasus/sdk/awsmarketplace/models/Customer.java index b320655e..63bd0b28 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/models/Customer.java +++ b/src/main/java/saasus/sdk/awsmarketplace/models/Customer.java @@ -49,7 +49,7 @@ /** * Customer */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:36.931963715Z[Etc/UTC]") public class Customer { public static final String SERIALIZED_NAME_CUSTOMER_IDENTIFIER = "customer_identifier"; @SerializedName(SERIALIZED_NAME_CUSTOMER_IDENTIFIER) diff --git a/src/main/java/saasus/sdk/awsmarketplace/models/Customers.java b/src/main/java/saasus/sdk/awsmarketplace/models/Customers.java index ca1d7c4c..09f66d85 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/models/Customers.java +++ b/src/main/java/saasus/sdk/awsmarketplace/models/Customers.java @@ -52,7 +52,7 @@ /** * Customers */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:36.931963715Z[Etc/UTC]") public class Customers { public static final String SERIALIZED_NAME_CUSTOMERS = "customers"; @SerializedName(SERIALIZED_NAME_CUSTOMERS) diff --git a/src/main/java/saasus/sdk/awsmarketplace/models/Error.java b/src/main/java/saasus/sdk/awsmarketplace/models/Error.java index 8e005575..da3b883c 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/models/Error.java +++ b/src/main/java/saasus/sdk/awsmarketplace/models/Error.java @@ -49,7 +49,7 @@ /** * Error */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:36.931963715Z[Etc/UTC]") public class Error { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/src/main/java/saasus/sdk/awsmarketplace/models/GetListingStatusResult.java b/src/main/java/saasus/sdk/awsmarketplace/models/GetListingStatusResult.java index 2dd871d1..993ad686 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/models/GetListingStatusResult.java +++ b/src/main/java/saasus/sdk/awsmarketplace/models/GetListingStatusResult.java @@ -50,7 +50,7 @@ /** * GetListingStatusResult */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:36.931963715Z[Etc/UTC]") public class GetListingStatusResult { public static final String SERIALIZED_NAME_LISTING_STATUS = "listing_status"; @SerializedName(SERIALIZED_NAME_LISTING_STATUS) diff --git a/src/main/java/saasus/sdk/awsmarketplace/models/Plan.java b/src/main/java/saasus/sdk/awsmarketplace/models/Plan.java index cef9d285..efa99ddb 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/models/Plan.java +++ b/src/main/java/saasus/sdk/awsmarketplace/models/Plan.java @@ -49,7 +49,7 @@ /** * Plan */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:36.931963715Z[Etc/UTC]") public class Plan { public static final String SERIALIZED_NAME_PLAN_ID = "plan_id"; @SerializedName(SERIALIZED_NAME_PLAN_ID) diff --git a/src/main/java/saasus/sdk/awsmarketplace/models/Plans.java b/src/main/java/saasus/sdk/awsmarketplace/models/Plans.java index 58e8b37c..db64f273 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/models/Plans.java +++ b/src/main/java/saasus/sdk/awsmarketplace/models/Plans.java @@ -52,7 +52,7 @@ /** * Plans */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:36.931963715Z[Etc/UTC]") public class Plans { public static final String SERIALIZED_NAME_PLANS = "plans"; @SerializedName(SERIALIZED_NAME_PLANS) diff --git a/src/main/java/saasus/sdk/awsmarketplace/models/SavePlanParam.java b/src/main/java/saasus/sdk/awsmarketplace/models/SavePlanParam.java index e12320c3..65d12e44 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/models/SavePlanParam.java +++ b/src/main/java/saasus/sdk/awsmarketplace/models/SavePlanParam.java @@ -49,7 +49,7 @@ /** * SavePlanParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:36.931963715Z[Etc/UTC]") public class SavePlanParam { public static final String SERIALIZED_NAME_PLAN_ID = "plan_id"; @SerializedName(SERIALIZED_NAME_PLAN_ID) diff --git a/src/main/java/saasus/sdk/awsmarketplace/models/Settings.java b/src/main/java/saasus/sdk/awsmarketplace/models/Settings.java index a6612dd4..0440a375 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/models/Settings.java +++ b/src/main/java/saasus/sdk/awsmarketplace/models/Settings.java @@ -49,7 +49,7 @@ /** * Settings */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:36.931963715Z[Etc/UTC]") public class Settings { public static final String SERIALIZED_NAME_PRODUCT_CODE = "product_code"; @SerializedName(SERIALIZED_NAME_PRODUCT_CODE) diff --git a/src/main/java/saasus/sdk/awsmarketplace/models/UpdateListingStatusParam.java b/src/main/java/saasus/sdk/awsmarketplace/models/UpdateListingStatusParam.java index 3e2cab0d..012cecf5 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/models/UpdateListingStatusParam.java +++ b/src/main/java/saasus/sdk/awsmarketplace/models/UpdateListingStatusParam.java @@ -50,7 +50,7 @@ /** * UpdateListingStatusParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:36.931963715Z[Etc/UTC]") public class UpdateListingStatusParam { public static final String SERIALIZED_NAME_LISTING_STATUS = "listing_status"; @SerializedName(SERIALIZED_NAME_LISTING_STATUS) diff --git a/src/main/java/saasus/sdk/awsmarketplace/models/UpdateSettingsParam.java b/src/main/java/saasus/sdk/awsmarketplace/models/UpdateSettingsParam.java index 9d4928bd..e926f784 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/models/UpdateSettingsParam.java +++ b/src/main/java/saasus/sdk/awsmarketplace/models/UpdateSettingsParam.java @@ -49,7 +49,7 @@ /** * UpdateSettingsParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:36.931963715Z[Etc/UTC]") public class UpdateSettingsParam { public static final String SERIALIZED_NAME_PRODUCT_CODE = "product_code"; @SerializedName(SERIALIZED_NAME_PRODUCT_CODE) diff --git a/src/main/java/saasus/sdk/awsmarketplace/models/VerifyRegistrationTokenParam.java b/src/main/java/saasus/sdk/awsmarketplace/models/VerifyRegistrationTokenParam.java index 58f8d103..d1721398 100644 --- a/src/main/java/saasus/sdk/awsmarketplace/models/VerifyRegistrationTokenParam.java +++ b/src/main/java/saasus/sdk/awsmarketplace/models/VerifyRegistrationTokenParam.java @@ -49,7 +49,7 @@ /** * VerifyRegistrationTokenParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:58.469497345Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:36.931963715Z[Etc/UTC]") public class VerifyRegistrationTokenParam { public static final String SERIALIZED_NAME_REGISTRATION_TOKEN = "registration_token"; @SerializedName(SERIALIZED_NAME_REGISTRATION_TOKEN) diff --git a/src/main/java/saasus/sdk/billing/ApiException.java b/src/main/java/saasus/sdk/billing/ApiException.java index 44213575..5cf98506 100644 --- a/src/main/java/saasus/sdk/billing/ApiException.java +++ b/src/main/java/saasus/sdk/billing/ApiException.java @@ -21,7 +21,7 @@ *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:57.462492303Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:35.919659798Z[Etc/UTC]") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; diff --git a/src/main/java/saasus/sdk/billing/Configuration.java b/src/main/java/saasus/sdk/billing/Configuration.java index 0c48e3d4..798bb939 100644 --- a/src/main/java/saasus/sdk/billing/Configuration.java +++ b/src/main/java/saasus/sdk/billing/Configuration.java @@ -13,7 +13,7 @@ package saasus.sdk.billing; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:57.462492303Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:35.919659798Z[Etc/UTC]") public class Configuration { public static final String VERSION = "1.0.0"; diff --git a/src/main/java/saasus/sdk/billing/Pair.java b/src/main/java/saasus/sdk/billing/Pair.java index 04f3095b..87c3f0e2 100644 --- a/src/main/java/saasus/sdk/billing/Pair.java +++ b/src/main/java/saasus/sdk/billing/Pair.java @@ -13,7 +13,7 @@ package saasus.sdk.billing; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:57.462492303Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:35.919659798Z[Etc/UTC]") public class Pair { private String name = ""; private String value = ""; diff --git a/src/main/java/saasus/sdk/billing/StringUtil.java b/src/main/java/saasus/sdk/billing/StringUtil.java index f77d4ac1..1a16fe18 100644 --- a/src/main/java/saasus/sdk/billing/StringUtil.java +++ b/src/main/java/saasus/sdk/billing/StringUtil.java @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:57.462492303Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:35.919659798Z[Etc/UTC]") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/saasus/sdk/billing/auth/ApiKeyAuth.java b/src/main/java/saasus/sdk/billing/auth/ApiKeyAuth.java index 489b177c..48c196c7 100644 --- a/src/main/java/saasus/sdk/billing/auth/ApiKeyAuth.java +++ b/src/main/java/saasus/sdk/billing/auth/ApiKeyAuth.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:57.462492303Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:35.919659798Z[Etc/UTC]") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/saasus/sdk/billing/auth/HttpBearerAuth.java b/src/main/java/saasus/sdk/billing/auth/HttpBearerAuth.java index 9ac25222..667ca300 100644 --- a/src/main/java/saasus/sdk/billing/auth/HttpBearerAuth.java +++ b/src/main/java/saasus/sdk/billing/auth/HttpBearerAuth.java @@ -22,7 +22,7 @@ import java.util.Optional; import java.util.function.Supplier; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:57.462492303Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:35.919659798Z[Etc/UTC]") public class HttpBearerAuth implements Authentication { private final String scheme; private Supplier tokenSupplier; diff --git a/src/main/java/saasus/sdk/billing/models/AbstractOpenApiSchema.java b/src/main/java/saasus/sdk/billing/models/AbstractOpenApiSchema.java index ec0fd2b3..64fd7415 100644 --- a/src/main/java/saasus/sdk/billing/models/AbstractOpenApiSchema.java +++ b/src/main/java/saasus/sdk/billing/models/AbstractOpenApiSchema.java @@ -21,7 +21,7 @@ /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:57.462492303Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:35.919659798Z[Etc/UTC]") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/src/main/java/saasus/sdk/billing/models/Error.java b/src/main/java/saasus/sdk/billing/models/Error.java index 4cd338d0..9c2ea0cc 100644 --- a/src/main/java/saasus/sdk/billing/models/Error.java +++ b/src/main/java/saasus/sdk/billing/models/Error.java @@ -49,7 +49,7 @@ /** * Error */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:57.462492303Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:35.919659798Z[Etc/UTC]") public class Error { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/src/main/java/saasus/sdk/billing/models/StripeInfo.java b/src/main/java/saasus/sdk/billing/models/StripeInfo.java index b1a9e5f0..2e3d0e72 100644 --- a/src/main/java/saasus/sdk/billing/models/StripeInfo.java +++ b/src/main/java/saasus/sdk/billing/models/StripeInfo.java @@ -49,7 +49,7 @@ /** * StripeInfo */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:57.462492303Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:35.919659798Z[Etc/UTC]") public class StripeInfo { public static final String SERIALIZED_NAME_IS_REGISTERED = "is_registered"; @SerializedName(SERIALIZED_NAME_IS_REGISTERED) diff --git a/src/main/java/saasus/sdk/billing/models/UpdateStripeInfoParam.java b/src/main/java/saasus/sdk/billing/models/UpdateStripeInfoParam.java index 7fc8dcda..acf5d9fe 100644 --- a/src/main/java/saasus/sdk/billing/models/UpdateStripeInfoParam.java +++ b/src/main/java/saasus/sdk/billing/models/UpdateStripeInfoParam.java @@ -49,7 +49,7 @@ /** * UpdateStripeInfoParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:57.462492303Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:35.919659798Z[Etc/UTC]") public class UpdateStripeInfoParam { public static final String SERIALIZED_NAME_SECRET_KEY = "secret_key"; @SerializedName(SERIALIZED_NAME_SECRET_KEY) diff --git a/src/main/java/saasus/sdk/communication/ApiException.java b/src/main/java/saasus/sdk/communication/ApiException.java index be0c464a..eb44d338 100644 --- a/src/main/java/saasus/sdk/communication/ApiException.java +++ b/src/main/java/saasus/sdk/communication/ApiException.java @@ -21,7 +21,7 @@ *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:40.244373550Z[Etc/UTC]") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; diff --git a/src/main/java/saasus/sdk/communication/Configuration.java b/src/main/java/saasus/sdk/communication/Configuration.java index 41fa5774..463c7b5c 100644 --- a/src/main/java/saasus/sdk/communication/Configuration.java +++ b/src/main/java/saasus/sdk/communication/Configuration.java @@ -13,7 +13,7 @@ package saasus.sdk.communication; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:40.244373550Z[Etc/UTC]") public class Configuration { public static final String VERSION = "1.0.0"; diff --git a/src/main/java/saasus/sdk/communication/Pair.java b/src/main/java/saasus/sdk/communication/Pair.java index 67c749da..46b1c868 100644 --- a/src/main/java/saasus/sdk/communication/Pair.java +++ b/src/main/java/saasus/sdk/communication/Pair.java @@ -13,7 +13,7 @@ package saasus.sdk.communication; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:40.244373550Z[Etc/UTC]") public class Pair { private String name = ""; private String value = ""; diff --git a/src/main/java/saasus/sdk/communication/StringUtil.java b/src/main/java/saasus/sdk/communication/StringUtil.java index e76cc9e6..b2be13c9 100644 --- a/src/main/java/saasus/sdk/communication/StringUtil.java +++ b/src/main/java/saasus/sdk/communication/StringUtil.java @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:40.244373550Z[Etc/UTC]") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/saasus/sdk/communication/auth/ApiKeyAuth.java b/src/main/java/saasus/sdk/communication/auth/ApiKeyAuth.java index 6b1155e3..93e8ca03 100644 --- a/src/main/java/saasus/sdk/communication/auth/ApiKeyAuth.java +++ b/src/main/java/saasus/sdk/communication/auth/ApiKeyAuth.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:40.244373550Z[Etc/UTC]") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/saasus/sdk/communication/auth/HttpBearerAuth.java b/src/main/java/saasus/sdk/communication/auth/HttpBearerAuth.java index d9582aa6..00f06958 100644 --- a/src/main/java/saasus/sdk/communication/auth/HttpBearerAuth.java +++ b/src/main/java/saasus/sdk/communication/auth/HttpBearerAuth.java @@ -22,7 +22,7 @@ import java.util.Optional; import java.util.function.Supplier; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:40.244373550Z[Etc/UTC]") public class HttpBearerAuth implements Authentication { private final String scheme; private Supplier tokenSupplier; diff --git a/src/main/java/saasus/sdk/communication/models/AbstractOpenApiSchema.java b/src/main/java/saasus/sdk/communication/models/AbstractOpenApiSchema.java index deee71ea..4c247656 100644 --- a/src/main/java/saasus/sdk/communication/models/AbstractOpenApiSchema.java +++ b/src/main/java/saasus/sdk/communication/models/AbstractOpenApiSchema.java @@ -21,7 +21,7 @@ /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:40.244373550Z[Etc/UTC]") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/src/main/java/saasus/sdk/communication/models/Comment.java b/src/main/java/saasus/sdk/communication/models/Comment.java index fe8e5765..923c21bc 100644 --- a/src/main/java/saasus/sdk/communication/models/Comment.java +++ b/src/main/java/saasus/sdk/communication/models/Comment.java @@ -49,7 +49,7 @@ /** * Comment */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:40.244373550Z[Etc/UTC]") public class Comment { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/saasus/sdk/communication/models/Comments.java b/src/main/java/saasus/sdk/communication/models/Comments.java index 7d7af5cc..55d97024 100644 --- a/src/main/java/saasus/sdk/communication/models/Comments.java +++ b/src/main/java/saasus/sdk/communication/models/Comments.java @@ -52,7 +52,7 @@ /** * Comments */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:40.244373550Z[Etc/UTC]") public class Comments { public static final String SERIALIZED_NAME_COMMENTS = "comments"; @SerializedName(SERIALIZED_NAME_COMMENTS) diff --git a/src/main/java/saasus/sdk/communication/models/CreateFeedbackCommentParam.java b/src/main/java/saasus/sdk/communication/models/CreateFeedbackCommentParam.java index edd8dcfe..201865a9 100644 --- a/src/main/java/saasus/sdk/communication/models/CreateFeedbackCommentParam.java +++ b/src/main/java/saasus/sdk/communication/models/CreateFeedbackCommentParam.java @@ -49,7 +49,7 @@ /** * CreateFeedbackCommentParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:40.244373550Z[Etc/UTC]") public class CreateFeedbackCommentParam { public static final String SERIALIZED_NAME_BODY = "body"; @SerializedName(SERIALIZED_NAME_BODY) diff --git a/src/main/java/saasus/sdk/communication/models/CreateFeedbackParam.java b/src/main/java/saasus/sdk/communication/models/CreateFeedbackParam.java index 93bbc0e9..7cfd71ef 100644 --- a/src/main/java/saasus/sdk/communication/models/CreateFeedbackParam.java +++ b/src/main/java/saasus/sdk/communication/models/CreateFeedbackParam.java @@ -49,7 +49,7 @@ /** * CreateFeedbackParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:40.244373550Z[Etc/UTC]") public class CreateFeedbackParam { public static final String SERIALIZED_NAME_FEEDBACK_TITLE = "feedback_title"; @SerializedName(SERIALIZED_NAME_FEEDBACK_TITLE) diff --git a/src/main/java/saasus/sdk/communication/models/CreateVoteUserParam.java b/src/main/java/saasus/sdk/communication/models/CreateVoteUserParam.java index 2e361aaf..c8451301 100644 --- a/src/main/java/saasus/sdk/communication/models/CreateVoteUserParam.java +++ b/src/main/java/saasus/sdk/communication/models/CreateVoteUserParam.java @@ -49,7 +49,7 @@ /** * CreateVoteUserParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:40.244373550Z[Etc/UTC]") public class CreateVoteUserParam { public static final String SERIALIZED_NAME_USER_ID = "user_id"; @SerializedName(SERIALIZED_NAME_USER_ID) diff --git a/src/main/java/saasus/sdk/communication/models/Error.java b/src/main/java/saasus/sdk/communication/models/Error.java index 27067473..3dbc39ca 100644 --- a/src/main/java/saasus/sdk/communication/models/Error.java +++ b/src/main/java/saasus/sdk/communication/models/Error.java @@ -49,7 +49,7 @@ /** * Error */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:40.244373550Z[Etc/UTC]") public class Error { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/src/main/java/saasus/sdk/communication/models/Feedback.java b/src/main/java/saasus/sdk/communication/models/Feedback.java index 9f8bda22..f62b9868 100644 --- a/src/main/java/saasus/sdk/communication/models/Feedback.java +++ b/src/main/java/saasus/sdk/communication/models/Feedback.java @@ -53,7 +53,7 @@ /** * Feedback */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:40.244373550Z[Etc/UTC]") public class Feedback { public static final String SERIALIZED_NAME_FEEDBACK_TITLE = "feedback_title"; @SerializedName(SERIALIZED_NAME_FEEDBACK_TITLE) diff --git a/src/main/java/saasus/sdk/communication/models/FeedbackSaveProps.java b/src/main/java/saasus/sdk/communication/models/FeedbackSaveProps.java index 09ccccda..37f8256c 100644 --- a/src/main/java/saasus/sdk/communication/models/FeedbackSaveProps.java +++ b/src/main/java/saasus/sdk/communication/models/FeedbackSaveProps.java @@ -49,7 +49,7 @@ /** * FeedbackSaveProps */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:40.244373550Z[Etc/UTC]") public class FeedbackSaveProps { public static final String SERIALIZED_NAME_FEEDBACK_TITLE = "feedback_title"; @SerializedName(SERIALIZED_NAME_FEEDBACK_TITLE) diff --git a/src/main/java/saasus/sdk/communication/models/Feedbacks.java b/src/main/java/saasus/sdk/communication/models/Feedbacks.java index 36691f07..d550069c 100644 --- a/src/main/java/saasus/sdk/communication/models/Feedbacks.java +++ b/src/main/java/saasus/sdk/communication/models/Feedbacks.java @@ -52,7 +52,7 @@ /** * Feedbacks */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:40.244373550Z[Etc/UTC]") public class Feedbacks { public static final String SERIALIZED_NAME_FEEDBACKS = "feedbacks"; @SerializedName(SERIALIZED_NAME_FEEDBACKS) diff --git a/src/main/java/saasus/sdk/communication/models/UpdateFeedbackCommentParam.java b/src/main/java/saasus/sdk/communication/models/UpdateFeedbackCommentParam.java index 5b3be7f8..db21df9e 100644 --- a/src/main/java/saasus/sdk/communication/models/UpdateFeedbackCommentParam.java +++ b/src/main/java/saasus/sdk/communication/models/UpdateFeedbackCommentParam.java @@ -49,7 +49,7 @@ /** * UpdateFeedbackCommentParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:40.244373550Z[Etc/UTC]") public class UpdateFeedbackCommentParam { public static final String SERIALIZED_NAME_BODY = "body"; @SerializedName(SERIALIZED_NAME_BODY) diff --git a/src/main/java/saasus/sdk/communication/models/UpdateFeedbackParam.java b/src/main/java/saasus/sdk/communication/models/UpdateFeedbackParam.java index 2a701841..58ec4907 100644 --- a/src/main/java/saasus/sdk/communication/models/UpdateFeedbackParam.java +++ b/src/main/java/saasus/sdk/communication/models/UpdateFeedbackParam.java @@ -49,7 +49,7 @@ /** * UpdateFeedbackParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:40.244373550Z[Etc/UTC]") public class UpdateFeedbackParam { public static final String SERIALIZED_NAME_FEEDBACK_TITLE = "feedback_title"; @SerializedName(SERIALIZED_NAME_FEEDBACK_TITLE) diff --git a/src/main/java/saasus/sdk/communication/models/UpdateFeedbackStatusParam.java b/src/main/java/saasus/sdk/communication/models/UpdateFeedbackStatusParam.java index 4e2ef67f..1448280c 100644 --- a/src/main/java/saasus/sdk/communication/models/UpdateFeedbackStatusParam.java +++ b/src/main/java/saasus/sdk/communication/models/UpdateFeedbackStatusParam.java @@ -49,7 +49,7 @@ /** * UpdateFeedbackStatusParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:40.244373550Z[Etc/UTC]") public class UpdateFeedbackStatusParam { public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) diff --git a/src/main/java/saasus/sdk/communication/models/User.java b/src/main/java/saasus/sdk/communication/models/User.java index f1dfd629..2ee0830d 100644 --- a/src/main/java/saasus/sdk/communication/models/User.java +++ b/src/main/java/saasus/sdk/communication/models/User.java @@ -49,7 +49,7 @@ /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:40.244373550Z[Etc/UTC]") public class User { public static final String SERIALIZED_NAME_USER_ID = "user_id"; @SerializedName(SERIALIZED_NAME_USER_ID) diff --git a/src/main/java/saasus/sdk/communication/models/Users.java b/src/main/java/saasus/sdk/communication/models/Users.java index 707ef0db..7d2670dd 100644 --- a/src/main/java/saasus/sdk/communication/models/Users.java +++ b/src/main/java/saasus/sdk/communication/models/Users.java @@ -52,7 +52,7 @@ /** * Users */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:40.244373550Z[Etc/UTC]") public class Users { public static final String SERIALIZED_NAME_USERS = "users"; @SerializedName(SERIALIZED_NAME_USERS) diff --git a/src/main/java/saasus/sdk/communication/models/Votes.java b/src/main/java/saasus/sdk/communication/models/Votes.java index 8ada17b5..5ddc4379 100644 --- a/src/main/java/saasus/sdk/communication/models/Votes.java +++ b/src/main/java/saasus/sdk/communication/models/Votes.java @@ -52,7 +52,7 @@ /** * Votes */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:23:01.769443764Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:40.244373550Z[Etc/UTC]") public class Votes { public static final String SERIALIZED_NAME_USERS = "users"; @SerializedName(SERIALIZED_NAME_USERS) diff --git a/src/main/java/saasus/sdk/integration/ApiException.java b/src/main/java/saasus/sdk/integration/ApiException.java index 46890bfa..dd92cdfd 100644 --- a/src/main/java/saasus/sdk/integration/ApiException.java +++ b/src/main/java/saasus/sdk/integration/ApiException.java @@ -21,7 +21,7 @@ *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:59.623524638Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:38.091397091Z[Etc/UTC]") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; diff --git a/src/main/java/saasus/sdk/integration/Configuration.java b/src/main/java/saasus/sdk/integration/Configuration.java index 9388e98a..c38ba4fb 100644 --- a/src/main/java/saasus/sdk/integration/Configuration.java +++ b/src/main/java/saasus/sdk/integration/Configuration.java @@ -13,7 +13,7 @@ package saasus.sdk.integration; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:59.623524638Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:38.091397091Z[Etc/UTC]") public class Configuration { public static final String VERSION = "1.0.0"; diff --git a/src/main/java/saasus/sdk/integration/Pair.java b/src/main/java/saasus/sdk/integration/Pair.java index 78627912..aca8330f 100644 --- a/src/main/java/saasus/sdk/integration/Pair.java +++ b/src/main/java/saasus/sdk/integration/Pair.java @@ -13,7 +13,7 @@ package saasus.sdk.integration; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:59.623524638Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:38.091397091Z[Etc/UTC]") public class Pair { private String name = ""; private String value = ""; diff --git a/src/main/java/saasus/sdk/integration/StringUtil.java b/src/main/java/saasus/sdk/integration/StringUtil.java index d044084c..44ee4f48 100644 --- a/src/main/java/saasus/sdk/integration/StringUtil.java +++ b/src/main/java/saasus/sdk/integration/StringUtil.java @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:59.623524638Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:38.091397091Z[Etc/UTC]") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/saasus/sdk/integration/auth/ApiKeyAuth.java b/src/main/java/saasus/sdk/integration/auth/ApiKeyAuth.java index 07dc4a8b..38900aa4 100644 --- a/src/main/java/saasus/sdk/integration/auth/ApiKeyAuth.java +++ b/src/main/java/saasus/sdk/integration/auth/ApiKeyAuth.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:59.623524638Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:38.091397091Z[Etc/UTC]") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/saasus/sdk/integration/auth/HttpBearerAuth.java b/src/main/java/saasus/sdk/integration/auth/HttpBearerAuth.java index 83e088b5..e0cc4b47 100644 --- a/src/main/java/saasus/sdk/integration/auth/HttpBearerAuth.java +++ b/src/main/java/saasus/sdk/integration/auth/HttpBearerAuth.java @@ -22,7 +22,7 @@ import java.util.Optional; import java.util.function.Supplier; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:59.623524638Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:38.091397091Z[Etc/UTC]") public class HttpBearerAuth implements Authentication { private final String scheme; private Supplier tokenSupplier; diff --git a/src/main/java/saasus/sdk/integration/models/AbstractOpenApiSchema.java b/src/main/java/saasus/sdk/integration/models/AbstractOpenApiSchema.java index c323c940..378d7ebb 100644 --- a/src/main/java/saasus/sdk/integration/models/AbstractOpenApiSchema.java +++ b/src/main/java/saasus/sdk/integration/models/AbstractOpenApiSchema.java @@ -21,7 +21,7 @@ /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:59.623524638Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:38.091397091Z[Etc/UTC]") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/src/main/java/saasus/sdk/integration/models/CreateEventBridgeEventParam.java b/src/main/java/saasus/sdk/integration/models/CreateEventBridgeEventParam.java index 5d5fd268..19c32ec1 100644 --- a/src/main/java/saasus/sdk/integration/models/CreateEventBridgeEventParam.java +++ b/src/main/java/saasus/sdk/integration/models/CreateEventBridgeEventParam.java @@ -52,7 +52,7 @@ /** * CreateEventBridgeEventParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:59.623524638Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:38.091397091Z[Etc/UTC]") public class CreateEventBridgeEventParam { public static final String SERIALIZED_NAME_EVENT_MESSAGES = "event_messages"; @SerializedName(SERIALIZED_NAME_EVENT_MESSAGES) diff --git a/src/main/java/saasus/sdk/integration/models/Error.java b/src/main/java/saasus/sdk/integration/models/Error.java index a4fb6830..3cc060be 100644 --- a/src/main/java/saasus/sdk/integration/models/Error.java +++ b/src/main/java/saasus/sdk/integration/models/Error.java @@ -49,7 +49,7 @@ /** * Error */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:59.623524638Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:38.091397091Z[Etc/UTC]") public class Error { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/src/main/java/saasus/sdk/integration/models/EventBridgeSettings.java b/src/main/java/saasus/sdk/integration/models/EventBridgeSettings.java index 8387fe5a..9072a0b4 100644 --- a/src/main/java/saasus/sdk/integration/models/EventBridgeSettings.java +++ b/src/main/java/saasus/sdk/integration/models/EventBridgeSettings.java @@ -50,7 +50,7 @@ /** * EventBridgeSettings */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:59.623524638Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:38.091397091Z[Etc/UTC]") public class EventBridgeSettings { public static final String SERIALIZED_NAME_AWS_ACCOUNT_ID = "aws_account_id"; @SerializedName(SERIALIZED_NAME_AWS_ACCOUNT_ID) diff --git a/src/main/java/saasus/sdk/integration/models/EventMessage.java b/src/main/java/saasus/sdk/integration/models/EventMessage.java index 693a6893..7115e278 100644 --- a/src/main/java/saasus/sdk/integration/models/EventMessage.java +++ b/src/main/java/saasus/sdk/integration/models/EventMessage.java @@ -49,7 +49,7 @@ /** * EventMessage */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:59.623524638Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:38.091397091Z[Etc/UTC]") public class EventMessage { public static final String SERIALIZED_NAME_EVENT_TYPE = "event_type"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) diff --git a/src/main/java/saasus/sdk/pricing/ApiException.java b/src/main/java/saasus/sdk/pricing/ApiException.java index a43ac981..6d897e1f 100644 --- a/src/main/java/saasus/sdk/pricing/ApiException.java +++ b/src/main/java/saasus/sdk/pricing/ApiException.java @@ -21,7 +21,7 @@ *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; diff --git a/src/main/java/saasus/sdk/pricing/Configuration.java b/src/main/java/saasus/sdk/pricing/Configuration.java index 3cfd2900..14ed4205 100644 --- a/src/main/java/saasus/sdk/pricing/Configuration.java +++ b/src/main/java/saasus/sdk/pricing/Configuration.java @@ -13,7 +13,7 @@ package saasus.sdk.pricing; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class Configuration { public static final String VERSION = "1.0.0"; diff --git a/src/main/java/saasus/sdk/pricing/Pair.java b/src/main/java/saasus/sdk/pricing/Pair.java index 1c76ebf3..9ad61bab 100644 --- a/src/main/java/saasus/sdk/pricing/Pair.java +++ b/src/main/java/saasus/sdk/pricing/Pair.java @@ -13,7 +13,7 @@ package saasus.sdk.pricing; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class Pair { private String name = ""; private String value = ""; diff --git a/src/main/java/saasus/sdk/pricing/StringUtil.java b/src/main/java/saasus/sdk/pricing/StringUtil.java index 9a8264b4..6b20d32c 100644 --- a/src/main/java/saasus/sdk/pricing/StringUtil.java +++ b/src/main/java/saasus/sdk/pricing/StringUtil.java @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/saasus/sdk/pricing/auth/ApiKeyAuth.java b/src/main/java/saasus/sdk/pricing/auth/ApiKeyAuth.java index 5ade052b..5d48756d 100644 --- a/src/main/java/saasus/sdk/pricing/auth/ApiKeyAuth.java +++ b/src/main/java/saasus/sdk/pricing/auth/ApiKeyAuth.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/saasus/sdk/pricing/auth/HttpBearerAuth.java b/src/main/java/saasus/sdk/pricing/auth/HttpBearerAuth.java index 36c18751..0dd026e4 100644 --- a/src/main/java/saasus/sdk/pricing/auth/HttpBearerAuth.java +++ b/src/main/java/saasus/sdk/pricing/auth/HttpBearerAuth.java @@ -22,7 +22,7 @@ import java.util.Optional; import java.util.function.Supplier; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class HttpBearerAuth implements Authentication { private final String scheme; private Supplier tokenSupplier; diff --git a/src/main/java/saasus/sdk/pricing/models/AbstractOpenApiSchema.java b/src/main/java/saasus/sdk/pricing/models/AbstractOpenApiSchema.java index 7c187b29..26f26b23 100644 --- a/src/main/java/saasus/sdk/pricing/models/AbstractOpenApiSchema.java +++ b/src/main/java/saasus/sdk/pricing/models/AbstractOpenApiSchema.java @@ -21,7 +21,7 @@ /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/src/main/java/saasus/sdk/pricing/models/Error.java b/src/main/java/saasus/sdk/pricing/models/Error.java index 5d40fabd..efc874ac 100644 --- a/src/main/java/saasus/sdk/pricing/models/Error.java +++ b/src/main/java/saasus/sdk/pricing/models/Error.java @@ -49,7 +49,7 @@ /** * Error */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class Error { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/src/main/java/saasus/sdk/pricing/models/MeteringUnit.java b/src/main/java/saasus/sdk/pricing/models/MeteringUnit.java index 8b88febd..63717a75 100644 --- a/src/main/java/saasus/sdk/pricing/models/MeteringUnit.java +++ b/src/main/java/saasus/sdk/pricing/models/MeteringUnit.java @@ -50,7 +50,7 @@ /** * MeteringUnit */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class MeteringUnit { public static final String SERIALIZED_NAME_UNIT_NAME = "unit_name"; @SerializedName(SERIALIZED_NAME_UNIT_NAME) diff --git a/src/main/java/saasus/sdk/pricing/models/MeteringUnitCount.java b/src/main/java/saasus/sdk/pricing/models/MeteringUnitCount.java index badeba3a..b1c805c6 100644 --- a/src/main/java/saasus/sdk/pricing/models/MeteringUnitCount.java +++ b/src/main/java/saasus/sdk/pricing/models/MeteringUnitCount.java @@ -49,7 +49,7 @@ /** * MeteringUnitCount */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class MeteringUnitCount { public static final String SERIALIZED_NAME_TIMESTAMP = "timestamp"; @SerializedName(SERIALIZED_NAME_TIMESTAMP) diff --git a/src/main/java/saasus/sdk/pricing/models/MeteringUnitDateCount.java b/src/main/java/saasus/sdk/pricing/models/MeteringUnitDateCount.java index d88d5ebd..016a55d6 100644 --- a/src/main/java/saasus/sdk/pricing/models/MeteringUnitDateCount.java +++ b/src/main/java/saasus/sdk/pricing/models/MeteringUnitDateCount.java @@ -49,7 +49,7 @@ /** * MeteringUnitDateCount */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class MeteringUnitDateCount { public static final String SERIALIZED_NAME_METERING_UNIT_NAME = "metering_unit_name"; @SerializedName(SERIALIZED_NAME_METERING_UNIT_NAME) diff --git a/src/main/java/saasus/sdk/pricing/models/MeteringUnitDateCounts.java b/src/main/java/saasus/sdk/pricing/models/MeteringUnitDateCounts.java index a59f871d..6d0e6e74 100644 --- a/src/main/java/saasus/sdk/pricing/models/MeteringUnitDateCounts.java +++ b/src/main/java/saasus/sdk/pricing/models/MeteringUnitDateCounts.java @@ -52,7 +52,7 @@ /** * MeteringUnitDateCounts */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class MeteringUnitDateCounts { public static final String SERIALIZED_NAME_COUNTS = "counts"; @SerializedName(SERIALIZED_NAME_COUNTS) diff --git a/src/main/java/saasus/sdk/pricing/models/MeteringUnitDatePeriodCounts.java b/src/main/java/saasus/sdk/pricing/models/MeteringUnitDatePeriodCounts.java index cf95f9d6..974f318f 100644 --- a/src/main/java/saasus/sdk/pricing/models/MeteringUnitDatePeriodCounts.java +++ b/src/main/java/saasus/sdk/pricing/models/MeteringUnitDatePeriodCounts.java @@ -52,7 +52,7 @@ /** * MeteringUnitDatePeriodCounts */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class MeteringUnitDatePeriodCounts { public static final String SERIALIZED_NAME_METERING_UNIT_NAME = "metering_unit_name"; @SerializedName(SERIALIZED_NAME_METERING_UNIT_NAME) diff --git a/src/main/java/saasus/sdk/pricing/models/MeteringUnitMonthCount.java b/src/main/java/saasus/sdk/pricing/models/MeteringUnitMonthCount.java index bb03fc5a..5286435c 100644 --- a/src/main/java/saasus/sdk/pricing/models/MeteringUnitMonthCount.java +++ b/src/main/java/saasus/sdk/pricing/models/MeteringUnitMonthCount.java @@ -49,7 +49,7 @@ /** * MeteringUnitMonthCount */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class MeteringUnitMonthCount { public static final String SERIALIZED_NAME_METERING_UNIT_NAME = "metering_unit_name"; @SerializedName(SERIALIZED_NAME_METERING_UNIT_NAME) diff --git a/src/main/java/saasus/sdk/pricing/models/MeteringUnitMonthCounts.java b/src/main/java/saasus/sdk/pricing/models/MeteringUnitMonthCounts.java index e67a1566..274b863d 100644 --- a/src/main/java/saasus/sdk/pricing/models/MeteringUnitMonthCounts.java +++ b/src/main/java/saasus/sdk/pricing/models/MeteringUnitMonthCounts.java @@ -52,7 +52,7 @@ /** * MeteringUnitMonthCounts */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class MeteringUnitMonthCounts { public static final String SERIALIZED_NAME_COUNTS = "counts"; @SerializedName(SERIALIZED_NAME_COUNTS) diff --git a/src/main/java/saasus/sdk/pricing/models/MeteringUnitProps.java b/src/main/java/saasus/sdk/pricing/models/MeteringUnitProps.java index 91e6fe6a..72325a67 100644 --- a/src/main/java/saasus/sdk/pricing/models/MeteringUnitProps.java +++ b/src/main/java/saasus/sdk/pricing/models/MeteringUnitProps.java @@ -50,7 +50,7 @@ /** * MeteringUnitProps */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class MeteringUnitProps { public static final String SERIALIZED_NAME_UNIT_NAME = "unit_name"; @SerializedName(SERIALIZED_NAME_UNIT_NAME) diff --git a/src/main/java/saasus/sdk/pricing/models/MeteringUnitTimestampCount.java b/src/main/java/saasus/sdk/pricing/models/MeteringUnitTimestampCount.java index 82a9eb5c..4b0dec17 100644 --- a/src/main/java/saasus/sdk/pricing/models/MeteringUnitTimestampCount.java +++ b/src/main/java/saasus/sdk/pricing/models/MeteringUnitTimestampCount.java @@ -49,7 +49,7 @@ /** * MeteringUnitTimestampCount */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class MeteringUnitTimestampCount { public static final String SERIALIZED_NAME_METERING_UNIT_NAME = "metering_unit_name"; @SerializedName(SERIALIZED_NAME_METERING_UNIT_NAME) diff --git a/src/main/java/saasus/sdk/pricing/models/MeteringUnits.java b/src/main/java/saasus/sdk/pricing/models/MeteringUnits.java index 22269043..eaa5ed3b 100644 --- a/src/main/java/saasus/sdk/pricing/models/MeteringUnits.java +++ b/src/main/java/saasus/sdk/pricing/models/MeteringUnits.java @@ -52,7 +52,7 @@ /** * MeteringUnits */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class MeteringUnits { public static final String SERIALIZED_NAME_UNITS = "units"; @SerializedName(SERIALIZED_NAME_UNITS) diff --git a/src/main/java/saasus/sdk/pricing/models/PricingFixedUnit.java b/src/main/java/saasus/sdk/pricing/models/PricingFixedUnit.java index c28eebe3..2e00eb9a 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingFixedUnit.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingFixedUnit.java @@ -51,7 +51,7 @@ /** * PricingFixedUnit */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class PricingFixedUnit { public static final String SERIALIZED_NAME_UNIT_AMOUNT = "unit_amount"; @SerializedName(SERIALIZED_NAME_UNIT_AMOUNT) diff --git a/src/main/java/saasus/sdk/pricing/models/PricingFixedUnitForSave.java b/src/main/java/saasus/sdk/pricing/models/PricingFixedUnitForSave.java index 2d69fc5b..0f25debe 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingFixedUnitForSave.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingFixedUnitForSave.java @@ -51,7 +51,7 @@ /** * PricingFixedUnitForSave */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class PricingFixedUnitForSave { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/saasus/sdk/pricing/models/PricingMenu.java b/src/main/java/saasus/sdk/pricing/models/PricingMenu.java index ed72f83b..2240d525 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingMenu.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingMenu.java @@ -52,7 +52,7 @@ /** * PricingMenu */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class PricingMenu { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/saasus/sdk/pricing/models/PricingMenuProps.java b/src/main/java/saasus/sdk/pricing/models/PricingMenuProps.java index 48dcdbde..9bf028c8 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingMenuProps.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingMenuProps.java @@ -52,7 +52,7 @@ /** * PricingMenuProps */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class PricingMenuProps { public static final String SERIALIZED_NAME_UNITS = "units"; @SerializedName(SERIALIZED_NAME_UNITS) diff --git a/src/main/java/saasus/sdk/pricing/models/PricingMenus.java b/src/main/java/saasus/sdk/pricing/models/PricingMenus.java index 195a4635..39e35355 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingMenus.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingMenus.java @@ -52,7 +52,7 @@ /** * PricingMenus */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class PricingMenus { public static final String SERIALIZED_NAME_PRICING_MENUS = "pricing_menus"; @SerializedName(SERIALIZED_NAME_PRICING_MENUS) diff --git a/src/main/java/saasus/sdk/pricing/models/PricingPlan.java b/src/main/java/saasus/sdk/pricing/models/PricingPlan.java index 121f4ea1..904bee4f 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingPlan.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingPlan.java @@ -52,7 +52,7 @@ /** * PricingPlan */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class PricingPlan { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/saasus/sdk/pricing/models/PricingPlanProps.java b/src/main/java/saasus/sdk/pricing/models/PricingPlanProps.java index 83d56d4f..e5a5cce4 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingPlanProps.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingPlanProps.java @@ -52,7 +52,7 @@ /** * PricingPlanProps */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class PricingPlanProps { public static final String SERIALIZED_NAME_PRICING_MENUS = "pricing_menus"; @SerializedName(SERIALIZED_NAME_PRICING_MENUS) diff --git a/src/main/java/saasus/sdk/pricing/models/PricingPlans.java b/src/main/java/saasus/sdk/pricing/models/PricingPlans.java index 1159096f..408a20b1 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingPlans.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingPlans.java @@ -52,7 +52,7 @@ /** * PricingPlans */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class PricingPlans { public static final String SERIALIZED_NAME_PRICING_PLANS = "pricing_plans"; @SerializedName(SERIALIZED_NAME_PRICING_PLANS) diff --git a/src/main/java/saasus/sdk/pricing/models/PricingTier.java b/src/main/java/saasus/sdk/pricing/models/PricingTier.java index 147b458c..0a70e8e5 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingTier.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingTier.java @@ -49,7 +49,7 @@ /** * PricingTier */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class PricingTier { public static final String SERIALIZED_NAME_UP_TO = "up_to"; @SerializedName(SERIALIZED_NAME_UP_TO) diff --git a/src/main/java/saasus/sdk/pricing/models/PricingTieredUnit.java b/src/main/java/saasus/sdk/pricing/models/PricingTieredUnit.java index b90322be..c0da3bc9 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingTieredUnit.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingTieredUnit.java @@ -55,7 +55,7 @@ /** * PricingTieredUnit */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class PricingTieredUnit { public static final String SERIALIZED_NAME_UPPER_COUNT = "upper_count"; @SerializedName(SERIALIZED_NAME_UPPER_COUNT) diff --git a/src/main/java/saasus/sdk/pricing/models/PricingTieredUnitForSave.java b/src/main/java/saasus/sdk/pricing/models/PricingTieredUnitForSave.java index 6a9b2943..37d315a1 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingTieredUnitForSave.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingTieredUnitForSave.java @@ -54,7 +54,7 @@ /** * PricingTieredUnitForSave */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class PricingTieredUnitForSave { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/saasus/sdk/pricing/models/PricingTieredUsageUnit.java b/src/main/java/saasus/sdk/pricing/models/PricingTieredUsageUnit.java index 801f1999..a612a290 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingTieredUsageUnit.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingTieredUsageUnit.java @@ -55,7 +55,7 @@ /** * PricingTieredUsageUnit */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class PricingTieredUsageUnit { public static final String SERIALIZED_NAME_UPPER_COUNT = "upper_count"; @SerializedName(SERIALIZED_NAME_UPPER_COUNT) diff --git a/src/main/java/saasus/sdk/pricing/models/PricingTieredUsageUnitForSave.java b/src/main/java/saasus/sdk/pricing/models/PricingTieredUsageUnitForSave.java index 4e00f542..f8a74f76 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingTieredUsageUnitForSave.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingTieredUsageUnitForSave.java @@ -54,7 +54,7 @@ /** * PricingTieredUsageUnitForSave */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class PricingTieredUsageUnitForSave { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/saasus/sdk/pricing/models/PricingTiers.java b/src/main/java/saasus/sdk/pricing/models/PricingTiers.java index 0871bc1c..eb1dec77 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingTiers.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingTiers.java @@ -52,7 +52,7 @@ /** * PricingTiers */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class PricingTiers { public static final String SERIALIZED_NAME_TIERS = "tiers"; @SerializedName(SERIALIZED_NAME_TIERS) diff --git a/src/main/java/saasus/sdk/pricing/models/PricingUnit.java b/src/main/java/saasus/sdk/pricing/models/PricingUnit.java index 96832234..0ae8bc7c 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingUnit.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingUnit.java @@ -67,7 +67,7 @@ import saasus.sdk.pricing.JSON; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class PricingUnit extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(PricingUnit.class.getName()); diff --git a/src/main/java/saasus/sdk/pricing/models/PricingUnitBaseProps.java b/src/main/java/saasus/sdk/pricing/models/PricingUnitBaseProps.java index 49961494..11a2a9c0 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingUnitBaseProps.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingUnitBaseProps.java @@ -50,7 +50,7 @@ /** * PricingUnitBaseProps */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class PricingUnitBaseProps { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/saasus/sdk/pricing/models/PricingUnitForSave.java b/src/main/java/saasus/sdk/pricing/models/PricingUnitForSave.java index 0e9af6c3..dadd9ef5 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingUnitForSave.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingUnitForSave.java @@ -67,7 +67,7 @@ import saasus.sdk.pricing.JSON; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class PricingUnitForSave extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(PricingUnitForSave.class.getName()); diff --git a/src/main/java/saasus/sdk/pricing/models/PricingUnits.java b/src/main/java/saasus/sdk/pricing/models/PricingUnits.java index f889f798..0b834f63 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingUnits.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingUnits.java @@ -52,7 +52,7 @@ /** * PricingUnits */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class PricingUnits { public static final String SERIALIZED_NAME_UNITS = "units"; @SerializedName(SERIALIZED_NAME_UNITS) diff --git a/src/main/java/saasus/sdk/pricing/models/PricingUsageUnit.java b/src/main/java/saasus/sdk/pricing/models/PricingUsageUnit.java index 0228a1e0..86edfdf5 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingUsageUnit.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingUsageUnit.java @@ -52,7 +52,7 @@ /** * PricingUsageUnit */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class PricingUsageUnit { public static final String SERIALIZED_NAME_UPPER_COUNT = "upper_count"; @SerializedName(SERIALIZED_NAME_UPPER_COUNT) diff --git a/src/main/java/saasus/sdk/pricing/models/PricingUsageUnitForSave.java b/src/main/java/saasus/sdk/pricing/models/PricingUsageUnitForSave.java index 60de1f1a..f69f7256 100644 --- a/src/main/java/saasus/sdk/pricing/models/PricingUsageUnitForSave.java +++ b/src/main/java/saasus/sdk/pricing/models/PricingUsageUnitForSave.java @@ -51,7 +51,7 @@ /** * PricingUsageUnitForSave */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class PricingUsageUnitForSave { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/saasus/sdk/pricing/models/SavePricingMenuParam.java b/src/main/java/saasus/sdk/pricing/models/SavePricingMenuParam.java index 14e4ef31..73c1eaa0 100644 --- a/src/main/java/saasus/sdk/pricing/models/SavePricingMenuParam.java +++ b/src/main/java/saasus/sdk/pricing/models/SavePricingMenuParam.java @@ -51,7 +51,7 @@ /** * SavePricingMenuParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class SavePricingMenuParam { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/saasus/sdk/pricing/models/SavePricingPlanParam.java b/src/main/java/saasus/sdk/pricing/models/SavePricingPlanParam.java index d36f1df2..dbf8d473 100644 --- a/src/main/java/saasus/sdk/pricing/models/SavePricingPlanParam.java +++ b/src/main/java/saasus/sdk/pricing/models/SavePricingPlanParam.java @@ -51,7 +51,7 @@ /** * SavePricingPlanParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class SavePricingPlanParam { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/saasus/sdk/pricing/models/TaxRate.java b/src/main/java/saasus/sdk/pricing/models/TaxRate.java index bbf497bc..cd43a37d 100644 --- a/src/main/java/saasus/sdk/pricing/models/TaxRate.java +++ b/src/main/java/saasus/sdk/pricing/models/TaxRate.java @@ -50,7 +50,7 @@ /** * TaxRate */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class TaxRate { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/saasus/sdk/pricing/models/TaxRateProps.java b/src/main/java/saasus/sdk/pricing/models/TaxRateProps.java index e6fd95c8..d49323a0 100644 --- a/src/main/java/saasus/sdk/pricing/models/TaxRateProps.java +++ b/src/main/java/saasus/sdk/pricing/models/TaxRateProps.java @@ -50,7 +50,7 @@ /** * TaxRateProps */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class TaxRateProps { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/saasus/sdk/pricing/models/TaxRates.java b/src/main/java/saasus/sdk/pricing/models/TaxRates.java index 7a45e4c8..2c8374b2 100644 --- a/src/main/java/saasus/sdk/pricing/models/TaxRates.java +++ b/src/main/java/saasus/sdk/pricing/models/TaxRates.java @@ -52,7 +52,7 @@ /** * TaxRates */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class TaxRates { public static final String SERIALIZED_NAME_TAX_RATES = "tax_rates"; @SerializedName(SERIALIZED_NAME_TAX_RATES) diff --git a/src/main/java/saasus/sdk/pricing/models/UpdateMeteringUnitTimestampCountNowParam.java b/src/main/java/saasus/sdk/pricing/models/UpdateMeteringUnitTimestampCountNowParam.java index cb5db6d8..face4b13 100644 --- a/src/main/java/saasus/sdk/pricing/models/UpdateMeteringUnitTimestampCountNowParam.java +++ b/src/main/java/saasus/sdk/pricing/models/UpdateMeteringUnitTimestampCountNowParam.java @@ -50,7 +50,7 @@ /** * UpdateMeteringUnitTimestampCountNowParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class UpdateMeteringUnitTimestampCountNowParam { public static final String SERIALIZED_NAME_METHOD = "method"; @SerializedName(SERIALIZED_NAME_METHOD) diff --git a/src/main/java/saasus/sdk/pricing/models/UpdateMeteringUnitTimestampCountParam.java b/src/main/java/saasus/sdk/pricing/models/UpdateMeteringUnitTimestampCountParam.java index a998fc27..4d307871 100644 --- a/src/main/java/saasus/sdk/pricing/models/UpdateMeteringUnitTimestampCountParam.java +++ b/src/main/java/saasus/sdk/pricing/models/UpdateMeteringUnitTimestampCountParam.java @@ -50,7 +50,7 @@ /** * UpdateMeteringUnitTimestampCountParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class UpdateMeteringUnitTimestampCountParam { public static final String SERIALIZED_NAME_METHOD = "method"; @SerializedName(SERIALIZED_NAME_METHOD) diff --git a/src/main/java/saasus/sdk/pricing/models/UpdatePricingPlansUsedParam.java b/src/main/java/saasus/sdk/pricing/models/UpdatePricingPlansUsedParam.java index 774c24f4..a8e6b43b 100644 --- a/src/main/java/saasus/sdk/pricing/models/UpdatePricingPlansUsedParam.java +++ b/src/main/java/saasus/sdk/pricing/models/UpdatePricingPlansUsedParam.java @@ -51,7 +51,7 @@ /** * UpdatePricingPlansUsedParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class UpdatePricingPlansUsedParam { public static final String SERIALIZED_NAME_PLAN_IDS = "plan_ids"; @SerializedName(SERIALIZED_NAME_PLAN_IDS) diff --git a/src/main/java/saasus/sdk/pricing/models/UpdateTaxRateParam.java b/src/main/java/saasus/sdk/pricing/models/UpdateTaxRateParam.java index cb1f2ce2..8761659f 100644 --- a/src/main/java/saasus/sdk/pricing/models/UpdateTaxRateParam.java +++ b/src/main/java/saasus/sdk/pricing/models/UpdateTaxRateParam.java @@ -49,7 +49,7 @@ /** * UpdateTaxRateParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-15T05:22:55.932611594Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:34.475188381Z[Etc/UTC]") public class UpdateTaxRateParam { public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) diff --git a/src/test/java/saasus/sdk/apigateway/models/EndpointSettingsTest.java b/src/test/java/saasus/sdk/apigateway/models/EndpointSettingsTest.java index 09961336..df8385b5 100644 --- a/src/test/java/saasus/sdk/apigateway/models/EndpointSettingsTest.java +++ b/src/test/java/saasus/sdk/apigateway/models/EndpointSettingsTest.java @@ -57,11 +57,11 @@ public void methodTest() { } /** - * Test the property 'throttling' + * Test the property 'throttlings' */ @Test - public void throttlingTest() { - // TODO: test throttling + public void throttlingsTest() { + // TODO: test throttlings } /** From fb444d10dff80359bb2aae26dd6bc192833bdb21 Mon Sep 17 00:00:00 2001 From: takashi-uchida Date: Tue, 20 May 2025 15:43:37 +0900 Subject: [PATCH 07/28] =?UTF-8?q?=E7=BD=B2=E5=90=8D=E4=BB=98=E3=81=8DAPI?= =?UTF-8?q?=E3=81=AE=E5=AE=9F=E8=A3=85=E6=BA=96=E5=82=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../saasus/sdk/util/apiserver/ApiServer.java | 349 +++++++++++++++--- 1 file changed, 306 insertions(+), 43 deletions(-) diff --git a/src/main/java/saasus/sdk/util/apiserver/ApiServer.java b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java index 5702a25c..9510702f 100644 --- a/src/main/java/saasus/sdk/util/apiserver/ApiServer.java +++ b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java @@ -1,51 +1,83 @@ package saasus.sdk.util.apiserver; -import com.fasterxml.jackson.databind.DeserializationFeature; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.lang.reflect.Parameter; +import java.net.InetSocketAddress; +import java.net.URI; +import java.nio.charset.StandardCharsets; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.TimeZone; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import javax.crypto.Mac; +import javax.crypto.spec.SecretKeySpec; + import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; - import com.sun.net.httpserver.HttpExchange; import com.sun.net.httpserver.HttpHandler; import com.sun.net.httpserver.HttpServer; -import saasus.sdk.modules.Configuration; import saasus.sdk.apigateway.ApiException; import saasus.sdk.apigateway.api.SmartApiGatewayApi; import saasus.sdk.apigateway.models.ApiGatewaySettings; import saasus.sdk.apigateway.models.ApiGatewayTenant; import saasus.sdk.apigateway.models.ApiKey; import saasus.sdk.apigateway.models.TenantRouting; -import saasus.sdk.apigateway.models.TenantRoutingType; -import saasus.sdk.auth.api.CredentialApi; import saasus.sdk.modules.ApiGatewayApiClient; -import saasus.sdk.modules.AuthApiClient; - -import java.io.IOException; -import java.io.OutputStream; -import java.io.PrintWriter; -import java.io.StringWriter; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.lang.reflect.Parameter; -import java.net.InetSocketAddress; -import java.net.URI; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import saasus.sdk.modules.Configuration; public class ApiServer { + private static String clientSecret; + + private static String fetchClientSecret(String apiKey) { + if (apiKey == null || apiKey.trim().isEmpty()) { + return null; + } + + if (clientSecret != null) { + return clientSecret; + } + + try { + ApiGatewayApiClient apiClient = new Configuration().getApiGatewayApiClient(); + SmartApiGatewayApi apiInstance = new SmartApiGatewayApi(apiClient); + + ApiKey response = apiInstance.getApiKey(apiKey); + + clientSecret = response.getClientSecret(); + return clientSecret; + + } catch (Exception e) { + System.out.println("クライアントシークレットの取得に失敗しました:"); + System.out.println(" エラータイプ: " + e.getClass().getName()); + System.out.println(" メッセージ: " + e.getMessage()); + e.printStackTrace(); + return null; + } + } private static final ObjectMapper objectMapper = new ObjectMapper().registerModule(new JavaTimeModule()); public static void start(int port) throws IOException { HttpServer server = HttpServer.create(new InetSocketAddress(port), 0); - + server.createContext("/", new DynamicHandler()); server.setExecutor(null); // デフォルトのエグゼキューターを使用 server.start(); - + System.out.println("#################### Server is listening on port " + port); } @@ -53,24 +85,253 @@ static class DynamicHandler implements HttpHandler { private final Map> classCache = new HashMap<>(); private final Map methodCache = new HashMap<>(); - @Override - public void handle(HttpExchange exchange) throws IOException { + private boolean verifySignature(HttpExchange exchange) { + System.out.println("\n=== 署名検証開始 ==="); + String method = exchange.getRequestMethod(); + String requestHost = exchange.getRequestHeaders().getFirst("Host"); + String rawPath = exchange.getRequestURI().getRawPath(); + String query = exchange.getRequestURI().getRawQuery(); + + System.out.println("検証情報:"); + System.out.println(" Method: " + method); + System.out.println(" Host: " + requestHost); + System.out.println(" Path: " + rawPath); + System.out.println(" Query: " + query); + String pathWithQuery = query != null && !query.isEmpty() ? rawPath + "?" + query : rawPath; + + // 初期値として現在のホストとパスを使用 + String verificationPath = requestHost + pathWithQuery; + System.out.println("verificationPath: " + verificationPath); + + System.out.println("\n=== API Gateway設定取得処理 ==="); + + System.out.println("1. ApiGatewayApiClient構築"); + Configuration config = new Configuration(); + ApiGatewayApiClient apiClient = config.getApiGatewayApiClient(); + System.out.println(" ベースURL: " + apiClient.getBasePath()); + System.out.println(" タイムアウト設定: " + apiClient.getReadTimeout() + "ms"); + try { + System.out.println(" 認証情報: " + apiClient.getAuthentication("Bearer")); + } catch (Exception e) { + System.out.println(" 認証情報の取得に失敗: " + e.getMessage()); + } + + System.out.println("\n2. SmartApiGatewayApiインスタンス作成"); + SmartApiGatewayApi apiInstance = new SmartApiGatewayApi(apiClient); + + System.out.println("\n3. getApiGatewaySettings呼び出し"); + ApiGatewaySettings settings = null; + try { + settings = apiInstance.getApiGatewaySettings(); + + if (settings == null) { + System.out.println("❌ API Gateway設定が見つかりません(レスポンスがnull)"); + return false; + } + + System.out.println("✅ API Gateway設定の取得に成功"); + System.out.println("設定内容:"); + System.out.println(" テナントルーティングタイプ: " + + (settings.getTenantRoutingType() != null ? settings.getTenantRoutingType().getValue() + : "null")); + System.out.println(" RestApiEndpoint: " + settings.getRestApiEndpoint()); + System.out.println(" DomainName: " + settings.getDomainName()); + System.out.println(" CloudFrontDnsRecord: " + + (settings.getCloudFrontDnsRecord() != null ? settings.getCloudFrontDnsRecord().getValue() + : "null")); + System.out + .println(" InternalEndpointHealthCheckPort: " + settings.getInternalEndpointHealthCheckPort()); + + // ここで変換後のpathから変換前のpathを取得する必要がある + System.out.println("endpoint list: " + settings.getEndpointSettingsList()); + + Integer healthCheckPort = settings.getInternalEndpointHealthCheckPort(); + + // 候補となるホストを取得 + List possibleHosts = new ArrayList<>(); + if (settings.getCloudFrontDnsRecord() != null && settings.getCloudFrontDnsRecord().getValue() != null) { + possibleHosts.add(settings.getCloudFrontDnsRecord().getValue()); + } + if (settings.getRestApiEndpoint() != null) { + possibleHosts.add(settings.getRestApiEndpoint()); + } + if (settings.getDomainName() != null) { + possibleHosts.add(settings.getDomainName()); + } + System.out.println("possibleHosts: " + possibleHosts); + + // 要求されたホストが候補のいずれかにマッチするか確認 + for (String host : possibleHosts) { + System.out.println("path" + host + healthCheckPort + pathWithQuery); + if (requestHost != null && requestHost.equals(host)) { + verificationPath = host + healthCheckPort + pathWithQuery; + System.out.println("マッチしたホスト " + host + " で署名を検証します"); + break; + } + } + + } catch (ApiException e) { + System.out.println("❌ API呼び出しでエラー発生:"); + System.out.println(" ステータスコード: " + e.getCode()); + System.out.println(" レスポンスボディ: " + e.getResponseBody()); + System.out.println(" エラーメッセージ: " + e.getMessage()); + e.printStackTrace(); + return false; + } + + // 署名検証のためのホストとパスの組み合わせを確認 + System.out.println("署名検証に使用するホストとパス: " + verificationPath); + + System.out.println("\n=== Authorization ヘッダー解析 ==="); + String authHeader = exchange.getRequestHeaders().getFirst("Authorization"); + System.out.println("Authorization ヘッダー: " + authHeader); + + if (authHeader == null || authHeader.isEmpty()) { + System.err.println("❌ Authorization ヘッダーが存在しないか空です"); + return false; + } + + Pattern pattern = Pattern.compile("^SAASUSSIGV1 Sig=([^,]+),\\s*APIKey=([^,]+)$"); + Matcher matcher = pattern.matcher(authHeader); + if (!matcher.matches()) { + System.err.println("❌ Authorization ヘッダーのフォーマットが不正です"); + System.err.println("期待されるフォーマット: SAASUSSIGV1 Sig=,APIKey="); + return false; + } + + String signature = matcher.group(1); + String headerApiKey = matcher.group(2); - // ここで、API定義を読んで、リクエストと一致するかどうかを判定する - // 一致していたら、パラメータを取得し、コール先の型に変換する - // そして、以下のサンプルのようにリフレクションを使ってコールする - // 戻り値をAPI定義に従ってJSONに変換して返す - // エラー処理は、適切なHTTPステータスコードを返す(要検討) + System.out.println("ヘッダー解析結果:"); + System.out.println(" 署名: " + signature); + System.out.println(" APIキー: " + headerApiKey); - // TODO: 変更あり + String apiKey = exchange.getRequestHeaders().getFirst("x-api-key"); + System.out.println("\nAPIキー検証:"); + System.out.println(" Authorization内のAPIキー: " + headerApiKey); + System.out.println(" x-api-keyヘッダーの値: " + apiKey); + + if (!headerApiKey.equals(apiKey)) { + System.err.println("❌ APIキーが一致しません"); + return false; + } + System.out.println("✅ APIキーの検証成功"); + + try { + clientSecret = fetchClientSecret(apiKey); + if (clientSecret == null) { + System.out.println("\n警告: クライアントシークレットが利用できません"); + System.out.println("APIキー: " + apiKey); + System.out.println("署名検証をスキップします"); + return true; + } + System.out.println("クライアントシークレットの取得に成功しました"); + } catch (Exception e) { + System.out.println("Error fetching client secret: " + e.getMessage()); + return true; + } + + if (clientSecret == null) { + System.out.println("No client secret available"); + return true; + } + + Date now = new Date(); + int timeWindow = 1; + + for (int i = -timeWindow; i <= timeWindow; i++) { + Calendar cal = Calendar.getInstance(); + cal.setTime(now); + cal.add(Calendar.MINUTE, i); + Date adjustedTime = cal.getTime(); + + SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmm"); + sdf.setTimeZone(TimeZone.getTimeZone("UTC")); + String timestamp = sdf.format(adjustedTime); + + try { + System.out.println("\n=== 署名計算(タイムスタンプ: " + timestamp + ")==="); + System.out.println("署名計算に使用する値:"); + System.out.println(" タイムスタンプ: " + timestamp); + System.out.println(" APIキー: " + apiKey); + System.out.println(" メソッド: " + method.toUpperCase()); + System.out.println(" 検証パス: " + verificationPath); + + Mac mac = Mac.getInstance("HmacSHA256"); + SecretKeySpec keySpec = new SecretKeySpec(clientSecret.getBytes(StandardCharsets.UTF_8), + "HmacSHA256"); + mac.init(keySpec); + + System.out.println("\n署名計算の順序:"); + // バイト配列にデータを書き込む + mac.update(timestamp.getBytes(StandardCharsets.UTF_8)); + System.out.println("1. タイムスタンプ更新"); + mac.update(apiKey.getBytes(StandardCharsets.UTF_8)); + System.out.println("2. APIキー更新"); + mac.update(method.toUpperCase().getBytes(StandardCharsets.UTF_8)); + System.out.println("3. メソッド更新"); + mac.update(verificationPath.getBytes(StandardCharsets.UTF_8)); + System.out.println("4. 検証パス更新"); + + // リクエストボディが存在する場合は追加 + InputStream is = exchange.getRequestBody(); + ByteArrayOutputStream buffer = new ByteArrayOutputStream(); + int nRead; + byte[] data = new byte[16384]; + while ((nRead = is.read(data, 0, data.length)) != -1) { + buffer.write(data, 0, nRead); + } + buffer.flush(); + byte[] requestBody = buffer.toByteArray(); + if (requestBody.length > 0) { + mac.update(requestBody); + System.out.println("5. リクエストボディ更新 (長さ: " + requestBody.length + " bytes)"); + System.out.println(" ボディ内容: " + new String(requestBody, StandardCharsets.UTF_8)); + } + + String calculatedSignature = bytesToHex(mac.doFinal()); + System.out.println("\n署名比較:"); + System.out.println(" 期待される署名: " + signature); + System.out.println(" 計算された署名: " + calculatedSignature); + System.out.println(" 一致: " + calculatedSignature.equals(signature)); + + if (calculatedSignature.equals(signature)) { + System.out.println("\n✅ 署名検証成功"); + return true; + } else { + System.out.println("\n❌ 署名検証失敗"); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + System.err.println("Signature verification failed for all time windows"); + return false; + } + + private String bytesToHex(byte[] bytes) { + StringBuilder hexString = new StringBuilder(); + for (byte aByte : bytes) { + hexString.append(String.format("%02x", aByte)); + } + return hexString.toString(); + } + + @Override + public void handle(HttpExchange exchange) throws IOException { String apiKey = exchange.getRequestHeaders().getFirst("x-api-key"); if (apiKey == null || apiKey.isEmpty()) { - sendResponse(exchange, 401, "Missing API key in x-api-key header"); + sendResponse(exchange, 401, "{\"message\": \"x-api-key header is required\"}"); + return; + } + + if (!verifySignature(exchange)) { + sendResponse(exchange, 401, "{\"message\": \"Invalid signature\"}"); return; } String path = exchange.getRequestURI().getPath(); String[] pathParts = path.split("/"); - + if (pathParts.length < 3) { sendResponse(exchange, 400, "Invalid path. Use format: /ClassName/methodName"); return; @@ -101,12 +362,12 @@ public void handle(HttpExchange exchange) throws IOException { // routing is required if (routingValue != null && !routingValue.isEmpty()) { System.out.println("Routing value found: " + routingValue); - + if (path.contains("/" + routingValue + "/")) { // パスからルーティング値を削除して再分割 String newPath = path.replace("/" + routingValue, ""); String[] newPathParts = newPath.split("/"); - + if (newPathParts.length >= 3) { className = newPathParts[1]; methodName = newPathParts[2]; @@ -117,26 +378,28 @@ public void handle(HttpExchange exchange) throws IOException { } } else { // routing value not found in URL - sendResponse(exchange, 403, "Access denied: Required routing path '" + routingValue + "' not found in URL"); + sendResponse(exchange, 403, + "Access denied: Required routing path '" + routingValue + "' not found in URL"); return; } } else { if (pathParts.length >= 4) { className = pathParts[2]; methodName = pathParts[3]; - System.out.println("No explicit routing found, assuming " + pathParts[1] + " is routing, class: " + className + ", method: " + methodName); + System.out.println("No explicit routing found, assuming " + pathParts[1] + " is routing, class: " + + className + ", method: " + methodName); } else { sendResponse(exchange, 400, "Invalid path format. Expected /routing/ClassName/methodName"); return; } } - + Map queryParams = parseQueryParams(exchange.getRequestURI()); - + try { Class clazz = getClass(className); Method method = getMethod(clazz, methodName); - + if (method != null) { Object[] args = prepareMethodArguments(method, queryParams); Object response = method.invoke(null, args); @@ -203,7 +466,7 @@ private Object[] prepareMethodArguments(Method method, Map query for (Parameter parameter : parameters) { String paramName = parameter.getName(); String paramValue = queryParams.get(paramName); - + if (paramValue == null) { throw new IllegalArgumentException("Missing parameter: " + paramName); } @@ -240,7 +503,7 @@ private void sendResponse(HttpExchange exchange, int statusCode, String response } private String getRoutingValue(String apiKey) throws ApiException { - ApiGatewayApiClient apiClient = new Configuration().getApiGatewayApiClient(); + ApiGatewayApiClient apiClient = new Configuration().getApiGatewayApiClient(); SmartApiGatewayApi apiInstance = new SmartApiGatewayApi(apiClient); ApiGatewaySettings settings = apiInstance.getApiGatewaySettings(); @@ -268,7 +531,7 @@ private String getRoutingValue(String apiKey) throws ApiException { System.out.println("Tenant not found for ID: " + apiKeyObj.getTenantId()); throw new ApiException("Tenant not found for ID: " + apiKeyObj.getTenantId()); } - + TenantRouting routing = tenant.getRouting(); if (routing == null) { System.out.println("Routing not found for tenant: " + apiKeyObj.getTenantId()); From f6cb81dbfd3b4665d0c00ba5f6ef340e51c8b66c Mon Sep 17 00:00:00 2001 From: takashi-uchida Date: Mon, 26 May 2025 09:30:36 +0900 Subject: [PATCH 08/28] =?UTF-8?q?OpenAPI=E5=AE=9A=E7=BE=A9=E3=81=AE?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E3=81=A8=E6=96=B0=E3=81=97=E3=81=84=E3=83=97?= =?UTF-8?q?=E3=83=AD=E3=83=91=E3=83=86=E3=82=A3=E3=81=AE=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/apigateway/EndpointSettings.md | 1 + docs/apigateway/SmartApiGatewayApi.md | 68 ++++++ .../UpdateOpenApiDefinitionParam.md | 13 ++ .../saasus/sdk/apigateway/ApiException.java | 2 +- .../saasus/sdk/apigateway/Configuration.java | 2 +- src/main/java/saasus/sdk/apigateway/JSON.java | 1 + src/main/java/saasus/sdk/apigateway/Pair.java | 2 +- .../saasus/sdk/apigateway/StringUtil.java | 2 +- .../apigateway/api/SmartApiGatewayApi.java | 124 ++++++++++ .../sdk/apigateway/auth/ApiKeyAuth.java | 2 +- .../sdk/apigateway/auth/HttpBearerAuth.java | 2 +- .../models/AbstractOpenApiSchema.java | 2 +- .../models/ApiGatewayInputFile.java | 2 +- .../apigateway/models/ApiGatewaySettings.java | 2 +- .../apigateway/models/ApiGatewayTenant.java | 2 +- .../saasus/sdk/apigateway/models/ApiKey.java | 2 +- .../saasus/sdk/apigateway/models/ApiKeys.java | 2 +- .../models/CloudFormationLaunchStackLink.java | 2 +- .../apigateway/models/CreateApiKeyParam.java | 2 +- .../sdk/apigateway/models/DnsRecord.java | 2 +- .../apigateway/models/EndpointSettings.java | 36 ++- .../saasus/sdk/apigateway/models/Error.java | 2 +- .../sdk/apigateway/models/TenantRouting.java | 2 +- .../sdk/apigateway/models/Throttling.java | 2 +- .../models/UpdateApiGatewaySettingsParam.java | 2 +- .../models/UpdateOpenApiDefinitionParam.java | 214 ++++++++++++++++++ .../apigateway/models/UpdateTenantParam.java | 2 +- .../api/SmartApiGatewayApiTest.java | 15 ++ .../models/EndpointSettingsTest.java | 8 + .../UpdateOpenApiDefinitionParamTest.java | 48 ++++ 30 files changed, 545 insertions(+), 23 deletions(-) create mode 100644 docs/apigateway/UpdateOpenApiDefinitionParam.md create mode 100644 src/main/java/saasus/sdk/apigateway/models/UpdateOpenApiDefinitionParam.java create mode 100644 src/test/java/saasus/sdk/apigateway/models/UpdateOpenApiDefinitionParamTest.java diff --git a/docs/apigateway/EndpointSettings.md b/docs/apigateway/EndpointSettings.md index 788ae831..f0d2429f 100644 --- a/docs/apigateway/EndpointSettings.md +++ b/docs/apigateway/EndpointSettings.md @@ -12,6 +12,7 @@ Settings per endpoint |**method** | [**MethodEnum**](#MethodEnum) | Method | | |**throttlings** | [**List<Throttling>**](Throttling.md) | Throttling settings for each target TODO: Make it possible to set multiple settings in the future | | |**roleNames** | **List<String>** | Role names that can access the endpoint | [optional] | +|**mappingEndpointId** | **String** | Identifier for the function to be executed when calling the API | | diff --git a/docs/apigateway/SmartApiGatewayApi.md b/docs/apigateway/SmartApiGatewayApi.md index 2ca99762..ccface76 100644 --- a/docs/apigateway/SmartApiGatewayApi.md +++ b/docs/apigateway/SmartApiGatewayApi.md @@ -15,6 +15,7 @@ All URIs are relative to *https://api.saasus.io/v1/apigateway* | [**refreshClientSecret**](SmartApiGatewayApi.md#refreshClientSecret) | **POST** /api-keys/{api_key}/client-secret | Update the client secret of the API key | | [**unpublishApiGateway**](SmartApiGatewayApi.md#unpublishApiGateway) | **POST** /unpublish | Unpublish the API Gateway | | [**updateApiGatewaySettings**](SmartApiGatewayApi.md#updateApiGatewaySettings) | **PATCH** /settings | Update configuration information for api gateway function | +| [**updateOpenApiDefinition**](SmartApiGatewayApi.md#updateOpenApiDefinition) | **PUT** /settings/open-api-definition | Update OpenAPI definition file | | [**updateTenant**](SmartApiGatewayApi.md#updateTenant) | **PATCH** /tenants/{tenant_id} | Update tenant information | | [**uploadGenerationFiles**](SmartApiGatewayApi.md#uploadGenerationFiles) | **POST** /upload | Upload files to create an API Gateway | @@ -749,6 +750,73 @@ null (empty response body) | **200** | OK | - | | **500** | Internal Server Error | - | + +# **updateOpenApiDefinition** +> updateOpenApiDefinition(updateOpenApiDefinitionParam) + +Update OpenAPI definition file + +Update OpenAPI definition file. The OpenAPI definition file is used for automatically generated documentation. + +### Example +```java +// Import classes: +import saasus.sdk.apigateway.ApiClient; +import saasus.sdk.apigateway.ApiException; +import saasus.sdk.apigateway.Configuration; +import saasus.sdk.apigateway.auth.*; +import saasus.sdk.apigateway.models.*; +import saasus.sdk.apigateway.api.SmartApiGatewayApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.saasus.io/v1/apigateway"); + + // Configure HTTP bearer authorization: Bearer + HttpBearerAuth Bearer = (HttpBearerAuth) defaultClient.getAuthentication("Bearer"); + Bearer.setBearerToken("BEARER TOKEN"); + + SmartApiGatewayApi apiInstance = new SmartApiGatewayApi(defaultClient); + UpdateOpenApiDefinitionParam updateOpenApiDefinitionParam = new UpdateOpenApiDefinitionParam(); // UpdateOpenApiDefinitionParam | + try { + apiInstance.updateOpenApiDefinition(updateOpenApiDefinitionParam); + } catch (ApiException e) { + System.err.println("Exception when calling SmartApiGatewayApi#updateOpenApiDefinition"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **updateOpenApiDefinitionParam** | [**UpdateOpenApiDefinitionParam**](UpdateOpenApiDefinitionParam.md)| | | + +### Return type + +null (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **500** | Internal Server Error | - | + # **updateTenant** > updateTenant(tenantId, updateTenantParam) diff --git a/docs/apigateway/UpdateOpenApiDefinitionParam.md b/docs/apigateway/UpdateOpenApiDefinitionParam.md new file mode 100644 index 00000000..245cd668 --- /dev/null +++ b/docs/apigateway/UpdateOpenApiDefinitionParam.md @@ -0,0 +1,13 @@ + + +# UpdateOpenApiDefinitionParam + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**content** | **String** | OpenAPI definition file content | | + + + diff --git a/src/main/java/saasus/sdk/apigateway/ApiException.java b/src/main/java/saasus/sdk/apigateway/ApiException.java index 38cbf323..89cef8f2 100644 --- a/src/main/java/saasus/sdk/apigateway/ApiException.java +++ b/src/main/java/saasus/sdk/apigateway/ApiException.java @@ -21,7 +21,7 @@ *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; diff --git a/src/main/java/saasus/sdk/apigateway/Configuration.java b/src/main/java/saasus/sdk/apigateway/Configuration.java index ce6c342c..5a25a008 100644 --- a/src/main/java/saasus/sdk/apigateway/Configuration.java +++ b/src/main/java/saasus/sdk/apigateway/Configuration.java @@ -13,7 +13,7 @@ package saasus.sdk.apigateway; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") public class Configuration { public static final String VERSION = "1.0.0"; diff --git a/src/main/java/saasus/sdk/apigateway/JSON.java b/src/main/java/saasus/sdk/apigateway/JSON.java index ff6bd679..70886329 100644 --- a/src/main/java/saasus/sdk/apigateway/JSON.java +++ b/src/main/java/saasus/sdk/apigateway/JSON.java @@ -106,6 +106,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new saasus.sdk.apigateway.models.TenantRouting.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new saasus.sdk.apigateway.models.Throttling.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new saasus.sdk.apigateway.models.UpdateApiGatewaySettingsParam.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new saasus.sdk.apigateway.models.UpdateOpenApiDefinitionParam.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new saasus.sdk.apigateway.models.UpdateTenantParam.CustomTypeAdapterFactory()); gson = gsonBuilder.create(); } diff --git a/src/main/java/saasus/sdk/apigateway/Pair.java b/src/main/java/saasus/sdk/apigateway/Pair.java index c215bce3..801087a1 100644 --- a/src/main/java/saasus/sdk/apigateway/Pair.java +++ b/src/main/java/saasus/sdk/apigateway/Pair.java @@ -13,7 +13,7 @@ package saasus.sdk.apigateway; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") public class Pair { private String name = ""; private String value = ""; diff --git a/src/main/java/saasus/sdk/apigateway/StringUtil.java b/src/main/java/saasus/sdk/apigateway/StringUtil.java index 3565756f..56b9ce1a 100644 --- a/src/main/java/saasus/sdk/apigateway/StringUtil.java +++ b/src/main/java/saasus/sdk/apigateway/StringUtil.java @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/saasus/sdk/apigateway/api/SmartApiGatewayApi.java b/src/main/java/saasus/sdk/apigateway/api/SmartApiGatewayApi.java index 362a82b4..38984695 100644 --- a/src/main/java/saasus/sdk/apigateway/api/SmartApiGatewayApi.java +++ b/src/main/java/saasus/sdk/apigateway/api/SmartApiGatewayApi.java @@ -36,6 +36,7 @@ import saasus.sdk.apigateway.models.CreateApiKeyParam; import saasus.sdk.apigateway.models.Error; import saasus.sdk.apigateway.models.UpdateApiGatewaySettingsParam; +import saasus.sdk.apigateway.models.UpdateOpenApiDefinitionParam; import saasus.sdk.apigateway.models.UpdateTenantParam; import java.lang.reflect.Type; @@ -1434,6 +1435,129 @@ public okhttp3.Call updateApiGatewaySettingsAsync(UpdateApiGatewaySettingsParam localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } + /** + * Build call for updateOpenApiDefinition + * @param updateOpenApiDefinitionParam (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public okhttp3.Call updateOpenApiDefinitionCall(UpdateOpenApiDefinitionParam updateOpenApiDefinitionParam, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateOpenApiDefinitionParam; + + // create path and map variables + String localVarPath = "/settings/open-api-definition"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "Bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateOpenApiDefinitionValidateBeforeCall(UpdateOpenApiDefinitionParam updateOpenApiDefinitionParam, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'updateOpenApiDefinitionParam' is set + if (updateOpenApiDefinitionParam == null) { + throw new ApiException("Missing the required parameter 'updateOpenApiDefinitionParam' when calling updateOpenApiDefinition(Async)"); + } + + return updateOpenApiDefinitionCall(updateOpenApiDefinitionParam, _callback); + + } + + /** + * Update OpenAPI definition file + * Update OpenAPI definition file. The OpenAPI definition file is used for automatically generated documentation. + * @param updateOpenApiDefinitionParam (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public void updateOpenApiDefinition(UpdateOpenApiDefinitionParam updateOpenApiDefinitionParam) throws ApiException { + updateOpenApiDefinitionWithHttpInfo(updateOpenApiDefinitionParam); + } + + /** + * Update OpenAPI definition file + * Update OpenAPI definition file. The OpenAPI definition file is used for automatically generated documentation. + * @param updateOpenApiDefinitionParam (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public ApiResponse updateOpenApiDefinitionWithHttpInfo(UpdateOpenApiDefinitionParam updateOpenApiDefinitionParam) throws ApiException { + okhttp3.Call localVarCall = updateOpenApiDefinitionValidateBeforeCall(updateOpenApiDefinitionParam, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Update OpenAPI definition file (asynchronously) + * Update OpenAPI definition file. The OpenAPI definition file is used for automatically generated documentation. + * @param updateOpenApiDefinitionParam (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public okhttp3.Call updateOpenApiDefinitionAsync(UpdateOpenApiDefinitionParam updateOpenApiDefinitionParam, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateOpenApiDefinitionValidateBeforeCall(updateOpenApiDefinitionParam, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } /** * Build call for updateTenant * @param tenantId Tenant ID (required) diff --git a/src/main/java/saasus/sdk/apigateway/auth/ApiKeyAuth.java b/src/main/java/saasus/sdk/apigateway/auth/ApiKeyAuth.java index 873eab70..d56aa42f 100644 --- a/src/main/java/saasus/sdk/apigateway/auth/ApiKeyAuth.java +++ b/src/main/java/saasus/sdk/apigateway/auth/ApiKeyAuth.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/saasus/sdk/apigateway/auth/HttpBearerAuth.java b/src/main/java/saasus/sdk/apigateway/auth/HttpBearerAuth.java index 05eb7c0b..7be17ff5 100644 --- a/src/main/java/saasus/sdk/apigateway/auth/HttpBearerAuth.java +++ b/src/main/java/saasus/sdk/apigateway/auth/HttpBearerAuth.java @@ -22,7 +22,7 @@ import java.util.Optional; import java.util.function.Supplier; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") public class HttpBearerAuth implements Authentication { private final String scheme; private Supplier tokenSupplier; diff --git a/src/main/java/saasus/sdk/apigateway/models/AbstractOpenApiSchema.java b/src/main/java/saasus/sdk/apigateway/models/AbstractOpenApiSchema.java index 0ef34690..5581f78b 100644 --- a/src/main/java/saasus/sdk/apigateway/models/AbstractOpenApiSchema.java +++ b/src/main/java/saasus/sdk/apigateway/models/AbstractOpenApiSchema.java @@ -21,7 +21,7 @@ /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/src/main/java/saasus/sdk/apigateway/models/ApiGatewayInputFile.java b/src/main/java/saasus/sdk/apigateway/models/ApiGatewayInputFile.java index de718143..86586015 100644 --- a/src/main/java/saasus/sdk/apigateway/models/ApiGatewayInputFile.java +++ b/src/main/java/saasus/sdk/apigateway/models/ApiGatewayInputFile.java @@ -49,7 +49,7 @@ /** * ApiGatewayInputFile */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") public class ApiGatewayInputFile { public static final String SERIALIZED_NAME_CONTENT = "content"; @SerializedName(SERIALIZED_NAME_CONTENT) diff --git a/src/main/java/saasus/sdk/apigateway/models/ApiGatewaySettings.java b/src/main/java/saasus/sdk/apigateway/models/ApiGatewaySettings.java index 5124d589..9ff77da6 100644 --- a/src/main/java/saasus/sdk/apigateway/models/ApiGatewaySettings.java +++ b/src/main/java/saasus/sdk/apigateway/models/ApiGatewaySettings.java @@ -54,7 +54,7 @@ /** * ApiGatewaySettings */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") public class ApiGatewaySettings { public static final String SERIALIZED_NAME_GENERATED_FILE_STATUS = "generated_file_status"; @SerializedName(SERIALIZED_NAME_GENERATED_FILE_STATUS) diff --git a/src/main/java/saasus/sdk/apigateway/models/ApiGatewayTenant.java b/src/main/java/saasus/sdk/apigateway/models/ApiGatewayTenant.java index 48105b92..d3e93382 100644 --- a/src/main/java/saasus/sdk/apigateway/models/ApiGatewayTenant.java +++ b/src/main/java/saasus/sdk/apigateway/models/ApiGatewayTenant.java @@ -52,7 +52,7 @@ /** * ApiGatewayTenant */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") public class ApiGatewayTenant { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/saasus/sdk/apigateway/models/ApiKey.java b/src/main/java/saasus/sdk/apigateway/models/ApiKey.java index bf042567..c51be334 100644 --- a/src/main/java/saasus/sdk/apigateway/models/ApiKey.java +++ b/src/main/java/saasus/sdk/apigateway/models/ApiKey.java @@ -49,7 +49,7 @@ /** * ApiKey */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") public class ApiKey { public static final String SERIALIZED_NAME_API_KEY = "api_key"; @SerializedName(SERIALIZED_NAME_API_KEY) diff --git a/src/main/java/saasus/sdk/apigateway/models/ApiKeys.java b/src/main/java/saasus/sdk/apigateway/models/ApiKeys.java index 8264d19c..c0a01af3 100644 --- a/src/main/java/saasus/sdk/apigateway/models/ApiKeys.java +++ b/src/main/java/saasus/sdk/apigateway/models/ApiKeys.java @@ -52,7 +52,7 @@ /** * ApiKeys */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") public class ApiKeys { public static final String SERIALIZED_NAME_API_KEYS = "api_keys"; @SerializedName(SERIALIZED_NAME_API_KEYS) diff --git a/src/main/java/saasus/sdk/apigateway/models/CloudFormationLaunchStackLink.java b/src/main/java/saasus/sdk/apigateway/models/CloudFormationLaunchStackLink.java index 5208e99e..929fb2a0 100644 --- a/src/main/java/saasus/sdk/apigateway/models/CloudFormationLaunchStackLink.java +++ b/src/main/java/saasus/sdk/apigateway/models/CloudFormationLaunchStackLink.java @@ -49,7 +49,7 @@ /** * CloudFormationLaunchStackLink */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") public class CloudFormationLaunchStackLink { public static final String SERIALIZED_NAME_LINK = "link"; @SerializedName(SERIALIZED_NAME_LINK) diff --git a/src/main/java/saasus/sdk/apigateway/models/CreateApiKeyParam.java b/src/main/java/saasus/sdk/apigateway/models/CreateApiKeyParam.java index c09553bd..e7a7231a 100644 --- a/src/main/java/saasus/sdk/apigateway/models/CreateApiKeyParam.java +++ b/src/main/java/saasus/sdk/apigateway/models/CreateApiKeyParam.java @@ -49,7 +49,7 @@ /** * CreateApiKeyParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") public class CreateApiKeyParam { public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; @SerializedName(SERIALIZED_NAME_TENANT_ID) diff --git a/src/main/java/saasus/sdk/apigateway/models/DnsRecord.java b/src/main/java/saasus/sdk/apigateway/models/DnsRecord.java index 7daa91a8..09741f59 100644 --- a/src/main/java/saasus/sdk/apigateway/models/DnsRecord.java +++ b/src/main/java/saasus/sdk/apigateway/models/DnsRecord.java @@ -49,7 +49,7 @@ /** * DnsRecord */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") public class DnsRecord { /** * CNAME Resource Record diff --git a/src/main/java/saasus/sdk/apigateway/models/EndpointSettings.java b/src/main/java/saasus/sdk/apigateway/models/EndpointSettings.java index 499dce9e..3687bd8b 100644 --- a/src/main/java/saasus/sdk/apigateway/models/EndpointSettings.java +++ b/src/main/java/saasus/sdk/apigateway/models/EndpointSettings.java @@ -52,7 +52,7 @@ /** * Settings per endpoint */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") public class EndpointSettings { public static final String SERIALIZED_NAME_PATH = "path"; @SerializedName(SERIALIZED_NAME_PATH) @@ -136,6 +136,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_ROLE_NAMES) private List roleNames; + public static final String SERIALIZED_NAME_MAPPING_ENDPOINT_ID = "mapping_endpoint_id"; + @SerializedName(SERIALIZED_NAME_MAPPING_ENDPOINT_ID) + private String mappingEndpointId; + public EndpointSettings() { } @@ -231,6 +235,25 @@ public void setRoleNames(List roleNames) { } + public EndpointSettings mappingEndpointId(String mappingEndpointId) { + this.mappingEndpointId = mappingEndpointId; + return this; + } + + /** + * Identifier for the function to be executed when calling the API + * @return mappingEndpointId + **/ + @javax.annotation.Nonnull + public String getMappingEndpointId() { + return mappingEndpointId; + } + + public void setMappingEndpointId(String mappingEndpointId) { + this.mappingEndpointId = mappingEndpointId; + } + + @Override public boolean equals(Object o) { @@ -244,12 +267,13 @@ public boolean equals(Object o) { return Objects.equals(this.path, endpointSettings.path) && Objects.equals(this.method, endpointSettings.method) && Objects.equals(this.throttlings, endpointSettings.throttlings) && - Objects.equals(this.roleNames, endpointSettings.roleNames); + Objects.equals(this.roleNames, endpointSettings.roleNames) && + Objects.equals(this.mappingEndpointId, endpointSettings.mappingEndpointId); } @Override public int hashCode() { - return Objects.hash(path, method, throttlings, roleNames); + return Objects.hash(path, method, throttlings, roleNames, mappingEndpointId); } @Override @@ -260,6 +284,7 @@ public String toString() { sb.append(" method: ").append(toIndentedString(method)).append("\n"); sb.append(" throttlings: ").append(toIndentedString(throttlings)).append("\n"); sb.append(" roleNames: ").append(toIndentedString(roleNames)).append("\n"); + sb.append(" mappingEndpointId: ").append(toIndentedString(mappingEndpointId)).append("\n"); sb.append("}"); return sb.toString(); } @@ -286,12 +311,14 @@ private String toIndentedString(Object o) { openapiFields.add("method"); openapiFields.add("throttlings"); openapiFields.add("role_names"); + openapiFields.add("mapping_endpoint_id"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("path"); openapiRequiredFields.add("method"); openapiRequiredFields.add("throttlings"); + openapiRequiredFields.add("mapping_endpoint_id"); } /** @@ -344,6 +371,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("role_names") != null && !jsonObj.get("role_names").isJsonNull() && !jsonObj.get("role_names").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `role_names` to be an array in the JSON string but got `%s`", jsonObj.get("role_names").toString())); } + if (!jsonObj.get("mapping_endpoint_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `mapping_endpoint_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mapping_endpoint_id").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/saasus/sdk/apigateway/models/Error.java b/src/main/java/saasus/sdk/apigateway/models/Error.java index 668f2824..f9c03f23 100644 --- a/src/main/java/saasus/sdk/apigateway/models/Error.java +++ b/src/main/java/saasus/sdk/apigateway/models/Error.java @@ -49,7 +49,7 @@ /** * Error */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") public class Error { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/src/main/java/saasus/sdk/apigateway/models/TenantRouting.java b/src/main/java/saasus/sdk/apigateway/models/TenantRouting.java index 9153cc45..8797adda 100644 --- a/src/main/java/saasus/sdk/apigateway/models/TenantRouting.java +++ b/src/main/java/saasus/sdk/apigateway/models/TenantRouting.java @@ -49,7 +49,7 @@ /** * Information about tenant routing. Refer to the tenant_routing_type in ApiGatewaySettings and route the request. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") public class TenantRouting { public static final String SERIALIZED_NAME_PATH = "path"; @SerializedName(SERIALIZED_NAME_PATH) diff --git a/src/main/java/saasus/sdk/apigateway/models/Throttling.java b/src/main/java/saasus/sdk/apigateway/models/Throttling.java index 391cb310..17631611 100644 --- a/src/main/java/saasus/sdk/apigateway/models/Throttling.java +++ b/src/main/java/saasus/sdk/apigateway/models/Throttling.java @@ -49,7 +49,7 @@ /** * Permit requests up to the limit number of times within a range (seconds) time for each target. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") public class Throttling { /** * Target of restriction diff --git a/src/main/java/saasus/sdk/apigateway/models/UpdateApiGatewaySettingsParam.java b/src/main/java/saasus/sdk/apigateway/models/UpdateApiGatewaySettingsParam.java index bb5407ba..d2925b50 100644 --- a/src/main/java/saasus/sdk/apigateway/models/UpdateApiGatewaySettingsParam.java +++ b/src/main/java/saasus/sdk/apigateway/models/UpdateApiGatewaySettingsParam.java @@ -53,7 +53,7 @@ /** * UpdateApiGatewaySettingsParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") public class UpdateApiGatewaySettingsParam { public static final String SERIALIZED_NAME_ROLE_ARN = "role_arn"; @SerializedName(SERIALIZED_NAME_ROLE_ARN) diff --git a/src/main/java/saasus/sdk/apigateway/models/UpdateOpenApiDefinitionParam.java b/src/main/java/saasus/sdk/apigateway/models/UpdateOpenApiDefinitionParam.java new file mode 100644 index 00000000..0aa6a83c --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/models/UpdateOpenApiDefinitionParam.java @@ -0,0 +1,214 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.models; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import saasus.sdk.apigateway.JSON; + +/** + * UpdateOpenApiDefinitionParam + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") +public class UpdateOpenApiDefinitionParam { + public static final String SERIALIZED_NAME_CONTENT = "content"; + @SerializedName(SERIALIZED_NAME_CONTENT) + private String content; + + public UpdateOpenApiDefinitionParam() { + } + + public UpdateOpenApiDefinitionParam content(String content) { + this.content = content; + return this; + } + + /** + * OpenAPI definition file content + * @return content + **/ + @javax.annotation.Nonnull + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateOpenApiDefinitionParam updateOpenApiDefinitionParam = (UpdateOpenApiDefinitionParam) o; + return Objects.equals(this.content, updateOpenApiDefinitionParam.content); + } + + @Override + public int hashCode() { + return Objects.hash(content); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateOpenApiDefinitionParam {\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("content"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("content"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateOpenApiDefinitionParam + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateOpenApiDefinitionParam.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateOpenApiDefinitionParam is not found in the empty JSON string", UpdateOpenApiDefinitionParam.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateOpenApiDefinitionParam.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateOpenApiDefinitionParam` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UpdateOpenApiDefinitionParam.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("content").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `content` to be a primitive type in the JSON string but got `%s`", jsonObj.get("content").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateOpenApiDefinitionParam.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateOpenApiDefinitionParam' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateOpenApiDefinitionParam.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateOpenApiDefinitionParam value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateOpenApiDefinitionParam read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateOpenApiDefinitionParam given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateOpenApiDefinitionParam + * @throws IOException if the JSON string is invalid with respect to UpdateOpenApiDefinitionParam + */ + public static UpdateOpenApiDefinitionParam fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateOpenApiDefinitionParam.class); + } + + /** + * Convert an instance of UpdateOpenApiDefinitionParam to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/saasus/sdk/apigateway/models/UpdateTenantParam.java b/src/main/java/saasus/sdk/apigateway/models/UpdateTenantParam.java index 805c1a64..b2acf176 100644 --- a/src/main/java/saasus/sdk/apigateway/models/UpdateTenantParam.java +++ b/src/main/java/saasus/sdk/apigateway/models/UpdateTenantParam.java @@ -52,7 +52,7 @@ /** * UpdateTenantParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-16T05:24:41.421804217Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") public class UpdateTenantParam { public static final String SERIALIZED_NAME_ALLOWED_IPS = "allowed_ips"; @SerializedName(SERIALIZED_NAME_ALLOWED_IPS) diff --git a/src/test/java/saasus/sdk/apigateway/api/SmartApiGatewayApiTest.java b/src/test/java/saasus/sdk/apigateway/api/SmartApiGatewayApiTest.java index c8de485d..4213adb9 100644 --- a/src/test/java/saasus/sdk/apigateway/api/SmartApiGatewayApiTest.java +++ b/src/test/java/saasus/sdk/apigateway/api/SmartApiGatewayApiTest.java @@ -23,6 +23,7 @@ import saasus.sdk.apigateway.models.CreateApiKeyParam; import saasus.sdk.apigateway.models.Error; import saasus.sdk.apigateway.models.UpdateApiGatewaySettingsParam; +import saasus.sdk.apigateway.models.UpdateOpenApiDefinitionParam; import saasus.sdk.apigateway.models.UpdateTenantParam; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -192,6 +193,20 @@ public void updateApiGatewaySettingsTest() throws ApiException { // TODO: test validations } + /** + * Update OpenAPI definition file + * + * Update OpenAPI definition file. The OpenAPI definition file is used for automatically generated documentation. + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateOpenApiDefinitionTest() throws ApiException { + UpdateOpenApiDefinitionParam updateOpenApiDefinitionParam = null; + api.updateOpenApiDefinition(updateOpenApiDefinitionParam); + // TODO: test validations + } + /** * Update tenant information * diff --git a/src/test/java/saasus/sdk/apigateway/models/EndpointSettingsTest.java b/src/test/java/saasus/sdk/apigateway/models/EndpointSettingsTest.java index df8385b5..4e0b7c8c 100644 --- a/src/test/java/saasus/sdk/apigateway/models/EndpointSettingsTest.java +++ b/src/test/java/saasus/sdk/apigateway/models/EndpointSettingsTest.java @@ -72,4 +72,12 @@ public void roleNamesTest() { // TODO: test roleNames } + /** + * Test the property 'mappingEndpointId' + */ + @Test + public void mappingEndpointIdTest() { + // TODO: test mappingEndpointId + } + } diff --git a/src/test/java/saasus/sdk/apigateway/models/UpdateOpenApiDefinitionParamTest.java b/src/test/java/saasus/sdk/apigateway/models/UpdateOpenApiDefinitionParamTest.java new file mode 100644 index 00000000..c215e830 --- /dev/null +++ b/src/test/java/saasus/sdk/apigateway/models/UpdateOpenApiDefinitionParamTest.java @@ -0,0 +1,48 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.models; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for UpdateOpenApiDefinitionParam + */ +public class UpdateOpenApiDefinitionParamTest { + private final UpdateOpenApiDefinitionParam model = new UpdateOpenApiDefinitionParam(); + + /** + * Model tests for UpdateOpenApiDefinitionParam + */ + @Test + public void testUpdateOpenApiDefinitionParam() { + // TODO: test UpdateOpenApiDefinitionParam + } + + /** + * Test the property 'content' + */ + @Test + public void contentTest() { + // TODO: test content + } + +} From fb1cd5a0706023ab74317e0f1d063c148c859c0b Mon Sep 17 00:00:00 2001 From: takashi-uchida Date: Fri, 30 May 2025 04:06:17 +0900 Subject: [PATCH 09/28] =?UTF-8?q?API=E3=82=B5=E3=83=BC=E3=83=90=E3=83=BC?= =?UTF-8?q?=E3=81=AE=E3=83=87=E3=83=90=E3=83=83=E3=82=B0=E6=83=85=E5=A0=B1?= =?UTF-8?q?=E3=82=92=E5=BC=B7=E5=8C=96=E3=81=97=E3=80=81=E8=AA=8D=E8=A8=BC?= =?UTF-8?q?=E6=83=85=E5=A0=B1=E3=81=A8=E7=92=B0=E5=A2=83=E5=A4=89=E6=95=B0?= =?UTF-8?q?=E3=81=AE=E8=A9=B3=E7=B4=B0=E3=82=92=E8=A1=A8=E7=A4=BA=E3=81=99?= =?UTF-8?q?=E3=82=8B=E6=A9=9F=E8=83=BD=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../saasus/sdk/util/apiserver/ApiServer.java | 268 +++++++++++++++--- 1 file changed, 226 insertions(+), 42 deletions(-) diff --git a/src/main/java/saasus/sdk/util/apiserver/ApiServer.java b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java index 9510702f..ff2a5b6f 100644 --- a/src/main/java/saasus/sdk/util/apiserver/ApiServer.java +++ b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java @@ -110,19 +110,72 @@ private boolean verifySignature(HttpExchange exchange) { ApiGatewayApiClient apiClient = config.getApiGatewayApiClient(); System.out.println(" ベースURL: " + apiClient.getBasePath()); System.out.println(" タイムアウト設定: " + apiClient.getReadTimeout() + "ms"); + System.out.println(" 接続タイムアウト: " + apiClient.getConnectTimeout() + "ms"); + + // 認証情報の詳細確認 try { - System.out.println(" 認証情報: " + apiClient.getAuthentication("Bearer")); + saasus.sdk.apigateway.auth.Authentication auth = apiClient.getAuthentication("Bearer"); + System.out.println(" 認証情報: " + auth); + if (auth instanceof saasus.sdk.apigateway.auth.HttpBearerAuth) { + saasus.sdk.apigateway.auth.HttpBearerAuth bearerAuth = (saasus.sdk.apigateway.auth.HttpBearerAuth) auth; + String token = bearerAuth.getBearerToken(); + if (token != null && !token.isEmpty()) { + System.out.println(" Bearerトークン: " + token.substring(0, Math.min(token.length(), 20)) + "..."); + } else { + System.out.println(" ⚠️ Bearerトークンが設定されていません"); + } + } } catch (Exception e) { System.out.println(" 認証情報の取得に失敗: " + e.getMessage()); + e.printStackTrace(); } + // 環境変数の確認 + System.out.println("\n環境変数確認:"); + System.out.println(" SAASUS_API_KEY: " + (System.getenv("SAASUS_API_KEY") != null ? "設定済み" : "未設定")); + System.out.println(" SAASUS_SECRET_KEY: " + (System.getenv("SAASUS_SECRET_KEY") != null ? "設定済み" : "未設定")); + System.out.println(" SAASUS_SAAS_ID: " + (System.getenv("SAASUS_SAAS_ID") != null ? "設定済み" : "未設定")); + System.out.println("\n2. SmartApiGatewayApiインスタンス作成"); SmartApiGatewayApi apiInstance = new SmartApiGatewayApi(apiClient); - System.out.println("\n3. getApiGatewaySettings呼び出し"); + System.out.println("\n3. getApiGatewaySettings呼び出し開始"); + System.out.println(" 呼び出しURL: " + apiClient.getBasePath() + "/api-gateway/settings"); ApiGatewaySettings settings = null; try { + // まず別メソッドでgetRoutingValueを試してみる + System.out.println("\n🔬 DEBUG: getRoutingValueとの比較テスト"); + String apiKey = exchange.getRequestHeaders().getFirst("x-api-key"); + try { + String testRoutingValue = testGetRoutingValue(apiKey); + System.out.println(" ✅ getRoutingValueテスト成功: " + testRoutingValue); + System.out.println(" 📝 getRoutingValueでは正常に設定を取得できました"); + } catch (Exception testE) { + System.out.println(" ❌ getRoutingValueテストも失敗: " + testE.getMessage()); + // エラーメッセージからendpoint_settings_listを抽出を試行 + String errorMessage = testE.getMessage(); + if (errorMessage != null && errorMessage.contains("endpoint_settings_list")) { + System.out.println(" 🔍 エラーメッセージからエンドポイント設定を抽出中..."); + try { + String extractedMapping = extractEndpointMappingFromError(errorMessage, rawPath); + if (extractedMapping != null) { + System.out.println(" ✅ エラーから元のパスを抽出成功: " + extractedMapping); + String originalPathWithQuery = query != null && !query.isEmpty() + ? extractedMapping + "?" + query + : extractedMapping; + verificationPath = requestHost + originalPathWithQuery; + System.out.println(" 🔄 抽出した元のパスで検証パスを更新: " + verificationPath); + } + } catch (Exception extractE) { + System.out.println(" ⚠️ エンドポイント抽出に失敗: " + extractE.getMessage()); + } + } + } + + long startTime = System.currentTimeMillis(); settings = apiInstance.getApiGatewaySettings(); + long endTime = System.currentTimeMillis(); + System.out.println(" API呼び出し完了時間: " + (endTime - startTime) + "ms"); if (settings == null) { System.out.println("❌ API Gateway設定が見つかりません(レスポンスがnull)"); @@ -142,8 +195,34 @@ private boolean verifySignature(HttpExchange exchange) { System.out .println(" InternalEndpointHealthCheckPort: " + settings.getInternalEndpointHealthCheckPort()); - // ここで変換後のpathから変換前のpathを取得する必要がある - System.out.println("endpoint list: " + settings.getEndpointSettingsList()); + // ここで変換後のpathから変換前のpathを取得する + String originalPath = null; + List endpointSettingsList = settings + .getEndpointSettingsList(); + System.out.println("endpoint list: " + endpointSettingsList); + + // 現在のrawPathに対応するEndpointSettingsを検索 + for (saasus.sdk.apigateway.models.EndpointSettings endpoint : endpointSettingsList) { + if (endpoint.getMappingEndpointId().equals(rawPath) || + rawPath.startsWith(endpoint.getMappingEndpointId())) { + originalPath = endpoint.getPath(); + System.out.println("マッピング発見:"); + System.out.println(" 変換後のpath (mappingEndpointId): " + endpoint.getMappingEndpointId()); + System.out.println(" 変換前のpath (path): " + originalPath); + System.out.println(" メソッド: " + endpoint.getMethod().getValue()); + break; + } + } + + // 元のパスが見つかった場合、検証パスを更新 + if (originalPath != null) { + String originalPathWithQuery = query != null && !query.isEmpty() ? originalPath + "?" + query + : originalPath; + verificationPath = requestHost + originalPathWithQuery; + System.out.println("元のパスを使用した検証パス: " + verificationPath); + } else { + System.out.println("警告: 変換前のパスが見つかりませんでした。現在のパスを使用します: " + rawPath); + } Integer healthCheckPort = settings.getInternalEndpointHealthCheckPort(); @@ -175,8 +254,49 @@ private boolean verifySignature(HttpExchange exchange) { System.out.println(" ステータスコード: " + e.getCode()); System.out.println(" レスポンスボディ: " + e.getResponseBody()); System.out.println(" エラーメッセージ: " + e.getMessage()); + + // レスポンスヘッダーの詳細表示 + System.out.println(" レスポンスヘッダー:"); + if (e.getResponseHeaders() != null) { + for (Map.Entry> header : e.getResponseHeaders().entrySet()) { + System.out.println(" " + header.getKey() + ": " + header.getValue()); + } + } else { + System.out.println(" ヘッダー情報なし"); + } + + // 詳細なエラー解析 + System.out.println("\n詳細なエラー解析:"); + if (e.getCode() == 401) { + System.out.println(" 🔐 認証エラー: APIキーまたはトークンが無効です"); + System.out.println(" - SAASUS_API_KEY環境変数が正しく設定されているか確認してください"); + System.out.println(" - APIキーの有効期限が切れていないか確認してください"); + return false; + } else if (e.getCode() == 403) { + System.out.println(" 🚫 認可エラー: このリソースへのアクセス権限がありません"); + System.out.println(" - SaaS IDが正しく設定されているか確認してください"); + System.out.println(" - APIキーに適切な権限が付与されているか確認してください"); + return false; + } else if (e.getCode() == 404) { + System.out.println(" 🔍 リソースが見つかりません"); + System.out.println(" - API Gatewayの設定が存在しない可能性があります"); + System.out.println(" ⚠️ エンドポイントマッピングなしで署名検証を続行します"); + } else if (e.getCode() == 500) { + System.out.println(" 🔥 サーバー内部エラー: SaaSus側でエラーが発生しています"); + return false; + } else if (e.getCode() == 501) { + System.out.println(" ⚠️ API Gateway設定が利用できません(501 Not Implemented)"); + System.out.println(" - この機能がまだ実装されていない可能性があります"); + System.out.println(" ⚠️ エンドポイントマッピングなしで署名検証を続行します"); + } else if (e.getCode() == 502 || e.getCode() == 503 || e.getCode() == 504) { + System.out.println(" 🌐 ネットワークエラー: SaaSusサービスへの接続に問題があります"); + System.out.println(" - インターネット接続を確認してください"); + System.out.println(" - ファイアウォール設定を確認してください"); + return false; + } + + System.out.println(" 現在のパスを使用して署名検証を続行: " + rawPath); e.printStackTrace(); - return false; } // 署名検証のためのホストとパスの組み合わせを確認 @@ -309,6 +429,95 @@ private boolean verifySignature(HttpExchange exchange) { return false; } + private String extractEndpointMappingFromError(String errorMessage, String rawPath) { + try { + // エラーメッセージからJSONを抽出 + int jsonStart = errorMessage.indexOf("{"); + if (jsonStart == -1) + return null; + + String jsonStr = errorMessage.substring(jsonStart); + System.out.println(" 📄 抽出したJSON: " + jsonStr.substring(0, Math.min(200, jsonStr.length())) + "..."); + + // 簡易的なJSONパースでendpoint_settings_listを抽出 + String searchPattern = "\"endpoint_settings_list\":["; + int listStart = jsonStr.indexOf(searchPattern); + if (listStart == -1) + return null; + + // endpoint_settings_listの開始位置 + int arrayStart = listStart + searchPattern.length() - 1; + int bracketCount = 0; + int arrayEnd = arrayStart; + + // 配列の終了位置を見つける + for (int i = arrayStart; i < jsonStr.length(); i++) { + char c = jsonStr.charAt(i); + if (c == '[') + bracketCount++; + else if (c == ']') { + bracketCount--; + if (bracketCount == 0) { + arrayEnd = i + 1; + break; + } + } + } + + String endpointsArray = jsonStr.substring(arrayStart, arrayEnd); + System.out.println(" 🎯 endpoint_settings_list: " + endpointsArray); + + // 現在のrawPathにマッチするmapping_endpoint_idを探す + String mappingPattern = "\"mapping_endpoint_id\":\"" + rawPath.replace("/", "\\/") + "\""; + int mappingIndex = endpointsArray.indexOf(mappingPattern); + if (mappingIndex == -1) + return null; + + // そのオブジェクト内でpathを探す + int objStart = endpointsArray.lastIndexOf("{", mappingIndex); + int objEnd = endpointsArray.indexOf("}", mappingIndex) + 1; + String endpointObj = endpointsArray.substring(objStart, objEnd); + + System.out.println(" 🔍 マッチしたエンドポイントオブジェクト: " + endpointObj); + + // pathの値を抽出 + String pathPattern = "\"path\":\""; + int pathStart = endpointObj.indexOf(pathPattern); + if (pathStart == -1) + return null; + + pathStart += pathPattern.length(); + int pathEnd = endpointObj.indexOf("\"", pathStart); + if (pathEnd == -1) + return null; + + String extractedPath = endpointObj.substring(pathStart, pathEnd); + System.out.println(" ✅ 抽出されたパス: " + extractedPath); + + return extractedPath; + + } catch (Exception e) { + System.out.println(" ❌ JSON抽出エラー: " + e.getMessage()); + return null; + } + } + + private String testGetRoutingValue(String apiKey) throws ApiException { + System.out.println("🔬 testGetRoutingValue開始"); + ApiGatewayApiClient apiClient = new Configuration().getApiGatewayApiClient(); + SmartApiGatewayApi apiInstance = new SmartApiGatewayApi(apiClient); + + System.out.println(" testGetRoutingValue用のgetApiGatewaySettings呼び出し"); + ApiGatewaySettings settings = apiInstance.getApiGatewaySettings(); + if (settings == null) { + throw new ApiException("API Gateway Settings not found in test"); + } + System.out.println(" testGetRoutingValue: getApiGatewaySettings成功"); + + String tenantRoutingType = settings.getTenantRoutingType().getValue(); + return tenantRoutingType; // 簡易版テスト + } + private String bytesToHex(byte[] bytes) { StringBuilder hexString = new StringBuilder(); for (byte aByte : bytes) { @@ -528,54 +737,29 @@ private String getRoutingValue(String apiKey) throws ApiException { // テナント設定情報を取得 ApiGatewayTenant tenant = apiInstance.getTenant(apiKeyObj.getTenantId()); if (tenant == null) { - System.out.println("Tenant not found for ID: " + apiKeyObj.getTenantId()); - throw new ApiException("Tenant not found for ID: " + apiKeyObj.getTenantId()); + System.out.println("Tenant not found: " + apiKeyObj.getTenantId()); + throw new ApiException("Tenant not found: " + apiKeyObj.getTenantId()); } - TenantRouting routing = tenant.getRouting(); - if (routing == null) { - System.out.println("Routing not found for tenant: " + apiKeyObj.getTenantId()); - throw new ApiException("Routing not found for tenant: " + apiKeyObj.getTenantId()); - } - switch (tenantRoutingType.toLowerCase()) { - case "none": - System.out.println("Tenant Routing Type is none"); - return null; - case "path": - System.out.println("Tenant Routing Type is path"); - return routing.getPath(); - case "hostname": - System.out.println("Tenant Routing Type is hostname"); - // not implemented - return null; - case "headervalue": - System.out.println("Tenant Routing Type is headervalue"); - // not implemented - return null; - default: - throw new ApiException("Invalid tenantRoutingType: " + tenantRoutingType); + TenantRouting tenantRouting = tenant.getRouting(); + if (tenantRouting == null) { + System.out.println("Tenant Routing not found for tenant: " + apiKeyObj.getTenantId()); + throw new ApiException("Tenant Routing not found for tenant: " + apiKeyObj.getTenantId()); } + + return tenantRouting.getPath(); } } - // サンプルAPIクラス public static class UserApi { - public static String getUser(int userId) { - return "User info for ID: " + userId; - } - - public static String createUser(String name, int age) { - return "Created user: " + name + " (Age: " + age + ")"; + public static String getUser(String id) { + return "User " + id; } } public static class MathApi { - public static String add(int a, int b) { - return "Result: " + (a + b); - } - - public static String multiply(double x, double y) { - return "Result: " + (x * y); + public static int add(int a, int b) { + return a + b; } } } \ No newline at end of file From d64b3cb3b4a32e91bb202752b55305e224979fc1 Mon Sep 17 00:00:00 2001 From: takashi-uchida Date: Fri, 30 May 2025 04:12:41 +0900 Subject: [PATCH 10/28] feat: Add support for additional undeclared properties in API models - Updated Error, TenantRouting, Throttling, UpdateApiGatewaySettingsParam, UpdateOpenApiDefinitionParam, and UpdateTenantParam classes to include a Map for additional properties. - Implemented methods to set, get, and manage additional properties in each model. - Modified JSON serialization and deserialization processes to handle additional properties correctly. - Removed unnecessary checks for undeclared fields in JSON during deserialization. --- generate.sh | 2 +- .../saasus/sdk/apigateway/ApiException.java | 2 +- .../saasus/sdk/apigateway/Configuration.java | 2 +- src/main/java/saasus/sdk/apigateway/Pair.java | 2 +- .../saasus/sdk/apigateway/StringUtil.java | 2 +- .../sdk/apigateway/auth/ApiKeyAuth.java | 2 +- .../sdk/apigateway/auth/HttpBearerAuth.java | 2 +- .../models/AbstractOpenApiSchema.java | 2 +- .../models/ApiGatewayInputFile.java | 100 +++++++++++++++--- .../apigateway/models/ApiGatewaySettings.java | 100 +++++++++++++++--- .../apigateway/models/ApiGatewayTenant.java | 100 +++++++++++++++--- .../saasus/sdk/apigateway/models/ApiKey.java | 100 +++++++++++++++--- .../saasus/sdk/apigateway/models/ApiKeys.java | 100 +++++++++++++++--- .../models/CloudFormationLaunchStackLink.java | 100 +++++++++++++++--- .../apigateway/models/CreateApiKeyParam.java | 100 +++++++++++++++--- .../sdk/apigateway/models/DnsRecord.java | 100 +++++++++++++++--- .../apigateway/models/EndpointSettings.java | 100 +++++++++++++++--- .../saasus/sdk/apigateway/models/Error.java | 100 +++++++++++++++--- .../sdk/apigateway/models/TenantRouting.java | 100 +++++++++++++++--- .../sdk/apigateway/models/Throttling.java | 100 +++++++++++++++--- .../models/UpdateApiGatewaySettingsParam.java | 100 +++++++++++++++--- .../models/UpdateOpenApiDefinitionParam.java | 100 +++++++++++++++--- .../apigateway/models/UpdateTenantParam.java | 100 +++++++++++++++--- 23 files changed, 1328 insertions(+), 188 deletions(-) diff --git a/generate.sh b/generate.sh index 1cd34a52..26227417 100755 --- a/generate.sh +++ b/generate.sh @@ -47,7 +47,7 @@ do -g java \ --additional-properties=modelPackage=saasus.sdk.${module}.models,apiPackage=saasus.sdk.${module}.api \ -o /local/generated/${module} \ - --additional-properties useOneOfDiscriminatorLookup=true + --additional-properties useOneOfDiscriminatorLookup=true,disallowAdditionalPropertiesIfNotPresent=false done for module in ${MODULES} diff --git a/src/main/java/saasus/sdk/apigateway/ApiException.java b/src/main/java/saasus/sdk/apigateway/ApiException.java index 89cef8f2..9f81dd44 100644 --- a/src/main/java/saasus/sdk/apigateway/ApiException.java +++ b/src/main/java/saasus/sdk/apigateway/ApiException.java @@ -21,7 +21,7 @@ *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; diff --git a/src/main/java/saasus/sdk/apigateway/Configuration.java b/src/main/java/saasus/sdk/apigateway/Configuration.java index 5a25a008..539a810d 100644 --- a/src/main/java/saasus/sdk/apigateway/Configuration.java +++ b/src/main/java/saasus/sdk/apigateway/Configuration.java @@ -13,7 +13,7 @@ package saasus.sdk.apigateway; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") public class Configuration { public static final String VERSION = "1.0.0"; diff --git a/src/main/java/saasus/sdk/apigateway/Pair.java b/src/main/java/saasus/sdk/apigateway/Pair.java index 801087a1..d336496b 100644 --- a/src/main/java/saasus/sdk/apigateway/Pair.java +++ b/src/main/java/saasus/sdk/apigateway/Pair.java @@ -13,7 +13,7 @@ package saasus.sdk.apigateway; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") public class Pair { private String name = ""; private String value = ""; diff --git a/src/main/java/saasus/sdk/apigateway/StringUtil.java b/src/main/java/saasus/sdk/apigateway/StringUtil.java index 56b9ce1a..94adcefa 100644 --- a/src/main/java/saasus/sdk/apigateway/StringUtil.java +++ b/src/main/java/saasus/sdk/apigateway/StringUtil.java @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/saasus/sdk/apigateway/auth/ApiKeyAuth.java b/src/main/java/saasus/sdk/apigateway/auth/ApiKeyAuth.java index d56aa42f..36c6d618 100644 --- a/src/main/java/saasus/sdk/apigateway/auth/ApiKeyAuth.java +++ b/src/main/java/saasus/sdk/apigateway/auth/ApiKeyAuth.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/saasus/sdk/apigateway/auth/HttpBearerAuth.java b/src/main/java/saasus/sdk/apigateway/auth/HttpBearerAuth.java index 7be17ff5..67d998ac 100644 --- a/src/main/java/saasus/sdk/apigateway/auth/HttpBearerAuth.java +++ b/src/main/java/saasus/sdk/apigateway/auth/HttpBearerAuth.java @@ -22,7 +22,7 @@ import java.util.Optional; import java.util.function.Supplier; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") public class HttpBearerAuth implements Authentication { private final String scheme; private Supplier tokenSupplier; diff --git a/src/main/java/saasus/sdk/apigateway/models/AbstractOpenApiSchema.java b/src/main/java/saasus/sdk/apigateway/models/AbstractOpenApiSchema.java index 5581f78b..d7532452 100644 --- a/src/main/java/saasus/sdk/apigateway/models/AbstractOpenApiSchema.java +++ b/src/main/java/saasus/sdk/apigateway/models/AbstractOpenApiSchema.java @@ -21,7 +21,7 @@ /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/src/main/java/saasus/sdk/apigateway/models/ApiGatewayInputFile.java b/src/main/java/saasus/sdk/apigateway/models/ApiGatewayInputFile.java index 86586015..d22e1e0d 100644 --- a/src/main/java/saasus/sdk/apigateway/models/ApiGatewayInputFile.java +++ b/src/main/java/saasus/sdk/apigateway/models/ApiGatewayInputFile.java @@ -49,7 +49,7 @@ /** * ApiGatewayInputFile */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") public class ApiGatewayInputFile { public static final String SERIALIZED_NAME_CONTENT = "content"; @SerializedName(SERIALIZED_NAME_CONTENT) @@ -76,6 +76,50 @@ public void setContent(String content) { this.content = content; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ApiGatewayInputFile instance itself + */ + public ApiGatewayInputFile putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } @Override @@ -87,12 +131,13 @@ public boolean equals(Object o) { return false; } ApiGatewayInputFile apiGatewayInputFile = (ApiGatewayInputFile) o; - return Objects.equals(this.content, apiGatewayInputFile.content); + return Objects.equals(this.content, apiGatewayInputFile.content)&& + Objects.equals(this.additionalProperties, apiGatewayInputFile.additionalProperties); } @Override public int hashCode() { - return Objects.hash(content); + return Objects.hash(content, additionalProperties); } @Override @@ -100,6 +145,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ApiGatewayInputFile {\n"); sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -142,14 +188,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ApiGatewayInputFile.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApiGatewayInputFile` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - // check to make sure all required properties/fields are present in the JSON string for (String requiredField : ApiGatewayInputFile.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { @@ -177,6 +215,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ApiGatewayInputFile value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -184,7 +239,28 @@ public void write(JsonWriter out, ApiGatewayInputFile value) throws IOException public ApiGatewayInputFile read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ApiGatewayInputFile instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/src/main/java/saasus/sdk/apigateway/models/ApiGatewaySettings.java b/src/main/java/saasus/sdk/apigateway/models/ApiGatewaySettings.java index 9ff77da6..3dc17571 100644 --- a/src/main/java/saasus/sdk/apigateway/models/ApiGatewaySettings.java +++ b/src/main/java/saasus/sdk/apigateway/models/ApiGatewaySettings.java @@ -54,7 +54,7 @@ /** * ApiGatewaySettings */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") public class ApiGatewaySettings { public static final String SERIALIZED_NAME_GENERATED_FILE_STATUS = "generated_file_status"; @SerializedName(SERIALIZED_NAME_GENERATED_FILE_STATUS) @@ -603,6 +603,50 @@ public void setDocsCloudFrontFqdn(String docsCloudFrontFqdn) { this.docsCloudFrontFqdn = docsCloudFrontFqdn; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ApiGatewaySettings instance itself + */ + public ApiGatewaySettings putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } @Override @@ -636,12 +680,13 @@ public boolean equals(Object o) { Objects.equals(this.restApiEndpoint, apiGatewaySettings.restApiEndpoint) && Objects.equals(this.endpointSettingsList, apiGatewaySettings.endpointSettingsList) && Objects.equals(this.tenantRoutingType, apiGatewaySettings.tenantRoutingType) && - Objects.equals(this.docsCloudFrontFqdn, apiGatewaySettings.docsCloudFrontFqdn); + Objects.equals(this.docsCloudFrontFqdn, apiGatewaySettings.docsCloudFrontFqdn)&& + Objects.equals(this.additionalProperties, apiGatewaySettings.additionalProperties); } @Override public int hashCode() { - return Objects.hash(generatedFileStatus, internalEndpointOpenapiDefinitionFileDownloadUrl, internalEndpointMappingFileDownloadUrl, status, roleArn, roleExternalId, internalEndpointHealthCheckPath, internalEndpointHealthCheckPort, internalEndpointHealthCheckProtocol, internalEndpointHealthStatusCodes, saasSubnetIds, saasVpcId, domainName, isDnsValidated, certificateDnsRecord, cloudFrontDnsRecord, vpcEndpointDnsRecord, defaultDomainName, saasAlbArn, restApiEndpoint, endpointSettingsList, tenantRoutingType, docsCloudFrontFqdn); + return Objects.hash(generatedFileStatus, internalEndpointOpenapiDefinitionFileDownloadUrl, internalEndpointMappingFileDownloadUrl, status, roleArn, roleExternalId, internalEndpointHealthCheckPath, internalEndpointHealthCheckPort, internalEndpointHealthCheckProtocol, internalEndpointHealthStatusCodes, saasSubnetIds, saasVpcId, domainName, isDnsValidated, certificateDnsRecord, cloudFrontDnsRecord, vpcEndpointDnsRecord, defaultDomainName, saasAlbArn, restApiEndpoint, endpointSettingsList, tenantRoutingType, docsCloudFrontFqdn, additionalProperties); } @Override @@ -671,6 +716,7 @@ public String toString() { sb.append(" endpointSettingsList: ").append(toIndentedString(endpointSettingsList)).append("\n"); sb.append(" tenantRoutingType: ").append(toIndentedString(tenantRoutingType)).append("\n"); sb.append(" docsCloudFrontFqdn: ").append(toIndentedString(docsCloudFrontFqdn)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -757,14 +803,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ApiGatewaySettings.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApiGatewaySettings` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - // check to make sure all required properties/fields are present in the JSON string for (String requiredField : ApiGatewaySettings.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { @@ -858,6 +896,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ApiGatewaySettings value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -865,7 +920,28 @@ public void write(JsonWriter out, ApiGatewaySettings value) throws IOException { public ApiGatewaySettings read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ApiGatewaySettings instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/src/main/java/saasus/sdk/apigateway/models/ApiGatewayTenant.java b/src/main/java/saasus/sdk/apigateway/models/ApiGatewayTenant.java index d3e93382..6e1b238c 100644 --- a/src/main/java/saasus/sdk/apigateway/models/ApiGatewayTenant.java +++ b/src/main/java/saasus/sdk/apigateway/models/ApiGatewayTenant.java @@ -52,7 +52,7 @@ /** * ApiGatewayTenant */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") public class ApiGatewayTenant { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -133,6 +133,50 @@ public void setRouting(TenantRouting routing) { this.routing = routing; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ApiGatewayTenant instance itself + */ + public ApiGatewayTenant putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } @Override @@ -146,12 +190,13 @@ public boolean equals(Object o) { ApiGatewayTenant apiGatewayTenant = (ApiGatewayTenant) o; return Objects.equals(this.id, apiGatewayTenant.id) && Objects.equals(this.allowedIps, apiGatewayTenant.allowedIps) && - Objects.equals(this.routing, apiGatewayTenant.routing); + Objects.equals(this.routing, apiGatewayTenant.routing)&& + Objects.equals(this.additionalProperties, apiGatewayTenant.additionalProperties); } @Override public int hashCode() { - return Objects.hash(id, allowedIps, routing); + return Objects.hash(id, allowedIps, routing, additionalProperties); } @Override @@ -161,6 +206,7 @@ public String toString() { sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" allowedIps: ").append(toIndentedString(allowedIps)).append("\n"); sb.append(" routing: ").append(toIndentedString(routing)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -207,14 +253,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ApiGatewayTenant.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApiGatewayTenant` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - // check to make sure all required properties/fields are present in the JSON string for (String requiredField : ApiGatewayTenant.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { @@ -250,6 +288,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ApiGatewayTenant value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -257,7 +312,28 @@ public void write(JsonWriter out, ApiGatewayTenant value) throws IOException { public ApiGatewayTenant read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ApiGatewayTenant instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/src/main/java/saasus/sdk/apigateway/models/ApiKey.java b/src/main/java/saasus/sdk/apigateway/models/ApiKey.java index c51be334..3435db60 100644 --- a/src/main/java/saasus/sdk/apigateway/models/ApiKey.java +++ b/src/main/java/saasus/sdk/apigateway/models/ApiKey.java @@ -49,7 +49,7 @@ /** * ApiKey */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") public class ApiKey { public static final String SERIALIZED_NAME_API_KEY = "api_key"; @SerializedName(SERIALIZED_NAME_API_KEY) @@ -168,6 +168,50 @@ public void setUserId(String userId) { this.userId = userId; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ApiKey instance itself + */ + public ApiKey putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } @Override @@ -183,12 +227,13 @@ public boolean equals(Object o) { Objects.equals(this.clientSecret, apiKey.clientSecret) && Objects.equals(this.tenantId, apiKey.tenantId) && Objects.equals(this.envId, apiKey.envId) && - Objects.equals(this.userId, apiKey.userId); + Objects.equals(this.userId, apiKey.userId)&& + Objects.equals(this.additionalProperties, apiKey.additionalProperties); } @Override public int hashCode() { - return Objects.hash(apiKey, clientSecret, tenantId, envId, userId); + return Objects.hash(apiKey, clientSecret, tenantId, envId, userId, additionalProperties); } @Override @@ -200,6 +245,7 @@ public String toString() { sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); sb.append(" envId: ").append(toIndentedString(envId)).append("\n"); sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -249,14 +295,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ApiKey.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApiKey` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - // check to make sure all required properties/fields are present in the JSON string for (String requiredField : ApiKey.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { @@ -293,6 +331,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ApiKey value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -300,7 +355,28 @@ public void write(JsonWriter out, ApiKey value) throws IOException { public ApiKey read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ApiKey instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/src/main/java/saasus/sdk/apigateway/models/ApiKeys.java b/src/main/java/saasus/sdk/apigateway/models/ApiKeys.java index c0a01af3..aaa540db 100644 --- a/src/main/java/saasus/sdk/apigateway/models/ApiKeys.java +++ b/src/main/java/saasus/sdk/apigateway/models/ApiKeys.java @@ -52,7 +52,7 @@ /** * ApiKeys */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") public class ApiKeys { public static final String SERIALIZED_NAME_API_KEYS = "api_keys"; @SerializedName(SERIALIZED_NAME_API_KEYS) @@ -87,6 +87,50 @@ public void setApiKeys(List apiKeys) { this.apiKeys = apiKeys; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ApiKeys instance itself + */ + public ApiKeys putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } @Override @@ -98,12 +142,13 @@ public boolean equals(Object o) { return false; } ApiKeys apiKeys = (ApiKeys) o; - return Objects.equals(this.apiKeys, apiKeys.apiKeys); + return Objects.equals(this.apiKeys, apiKeys.apiKeys)&& + Objects.equals(this.additionalProperties, apiKeys.additionalProperties); } @Override public int hashCode() { - return Objects.hash(apiKeys); + return Objects.hash(apiKeys, additionalProperties); } @Override @@ -111,6 +156,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ApiKeys {\n"); sb.append(" apiKeys: ").append(toIndentedString(apiKeys)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -153,14 +199,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ApiKeys.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApiKeys` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - // check to make sure all required properties/fields are present in the JSON string for (String requiredField : ApiKeys.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { @@ -195,6 +233,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ApiKeys value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -202,7 +257,28 @@ public void write(JsonWriter out, ApiKeys value) throws IOException { public ApiKeys read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ApiKeys instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/src/main/java/saasus/sdk/apigateway/models/CloudFormationLaunchStackLink.java b/src/main/java/saasus/sdk/apigateway/models/CloudFormationLaunchStackLink.java index 929fb2a0..c918ae4e 100644 --- a/src/main/java/saasus/sdk/apigateway/models/CloudFormationLaunchStackLink.java +++ b/src/main/java/saasus/sdk/apigateway/models/CloudFormationLaunchStackLink.java @@ -49,7 +49,7 @@ /** * CloudFormationLaunchStackLink */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") public class CloudFormationLaunchStackLink { public static final String SERIALIZED_NAME_LINK = "link"; @SerializedName(SERIALIZED_NAME_LINK) @@ -76,6 +76,50 @@ public void setLink(String link) { this.link = link; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CloudFormationLaunchStackLink instance itself + */ + public CloudFormationLaunchStackLink putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } @Override @@ -87,12 +131,13 @@ public boolean equals(Object o) { return false; } CloudFormationLaunchStackLink cloudFormationLaunchStackLink = (CloudFormationLaunchStackLink) o; - return Objects.equals(this.link, cloudFormationLaunchStackLink.link); + return Objects.equals(this.link, cloudFormationLaunchStackLink.link)&& + Objects.equals(this.additionalProperties, cloudFormationLaunchStackLink.additionalProperties); } @Override public int hashCode() { - return Objects.hash(link); + return Objects.hash(link, additionalProperties); } @Override @@ -100,6 +145,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CloudFormationLaunchStackLink {\n"); sb.append(" link: ").append(toIndentedString(link)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -142,14 +188,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CloudFormationLaunchStackLink.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CloudFormationLaunchStackLink` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CloudFormationLaunchStackLink.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { @@ -177,6 +215,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, CloudFormationLaunchStackLink value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -184,7 +239,28 @@ public void write(JsonWriter out, CloudFormationLaunchStackLink value) throws IO public CloudFormationLaunchStackLink read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CloudFormationLaunchStackLink instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/src/main/java/saasus/sdk/apigateway/models/CreateApiKeyParam.java b/src/main/java/saasus/sdk/apigateway/models/CreateApiKeyParam.java index e7a7231a..cb10f1f6 100644 --- a/src/main/java/saasus/sdk/apigateway/models/CreateApiKeyParam.java +++ b/src/main/java/saasus/sdk/apigateway/models/CreateApiKeyParam.java @@ -49,7 +49,7 @@ /** * CreateApiKeyParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") public class CreateApiKeyParam { public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; @SerializedName(SERIALIZED_NAME_TENANT_ID) @@ -122,6 +122,50 @@ public void setUserId(String userId) { this.userId = userId; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateApiKeyParam instance itself + */ + public CreateApiKeyParam putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } @Override @@ -135,12 +179,13 @@ public boolean equals(Object o) { CreateApiKeyParam createApiKeyParam = (CreateApiKeyParam) o; return Objects.equals(this.tenantId, createApiKeyParam.tenantId) && Objects.equals(this.envId, createApiKeyParam.envId) && - Objects.equals(this.userId, createApiKeyParam.userId); + Objects.equals(this.userId, createApiKeyParam.userId)&& + Objects.equals(this.additionalProperties, createApiKeyParam.additionalProperties); } @Override public int hashCode() { - return Objects.hash(tenantId, envId, userId); + return Objects.hash(tenantId, envId, userId, additionalProperties); } @Override @@ -150,6 +195,7 @@ public String toString() { sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); sb.append(" envId: ").append(toIndentedString(envId)).append("\n"); sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -195,14 +241,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateApiKeyParam.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateApiKeyParam` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateApiKeyParam.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { @@ -233,6 +271,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, CreateApiKeyParam value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -240,7 +295,28 @@ public void write(JsonWriter out, CreateApiKeyParam value) throws IOException { public CreateApiKeyParam read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CreateApiKeyParam instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/src/main/java/saasus/sdk/apigateway/models/DnsRecord.java b/src/main/java/saasus/sdk/apigateway/models/DnsRecord.java index 09741f59..d822fb95 100644 --- a/src/main/java/saasus/sdk/apigateway/models/DnsRecord.java +++ b/src/main/java/saasus/sdk/apigateway/models/DnsRecord.java @@ -49,7 +49,7 @@ /** * DnsRecord */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") public class DnsRecord { /** * CNAME Resource Record @@ -174,6 +174,50 @@ public void setValue(String value) { this.value = value; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the DnsRecord instance itself + */ + public DnsRecord putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } @Override @@ -187,12 +231,13 @@ public boolean equals(Object o) { DnsRecord dnsRecord = (DnsRecord) o; return Objects.equals(this.type, dnsRecord.type) && Objects.equals(this.name, dnsRecord.name) && - Objects.equals(this.value, dnsRecord.value); + Objects.equals(this.value, dnsRecord.value)&& + Objects.equals(this.additionalProperties, dnsRecord.additionalProperties); } @Override public int hashCode() { - return Objects.hash(type, name, value); + return Objects.hash(type, name, value, additionalProperties); } @Override @@ -202,6 +247,7 @@ public String toString() { sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -248,14 +294,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DnsRecord.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DnsRecord` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - // check to make sure all required properties/fields are present in the JSON string for (String requiredField : DnsRecord.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { @@ -291,6 +329,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, DnsRecord value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -298,7 +353,28 @@ public void write(JsonWriter out, DnsRecord value) throws IOException { public DnsRecord read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + DnsRecord instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/src/main/java/saasus/sdk/apigateway/models/EndpointSettings.java b/src/main/java/saasus/sdk/apigateway/models/EndpointSettings.java index 3687bd8b..2c1f3058 100644 --- a/src/main/java/saasus/sdk/apigateway/models/EndpointSettings.java +++ b/src/main/java/saasus/sdk/apigateway/models/EndpointSettings.java @@ -52,7 +52,7 @@ /** * Settings per endpoint */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") public class EndpointSettings { public static final String SERIALIZED_NAME_PATH = "path"; @SerializedName(SERIALIZED_NAME_PATH) @@ -253,6 +253,50 @@ public void setMappingEndpointId(String mappingEndpointId) { this.mappingEndpointId = mappingEndpointId; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the EndpointSettings instance itself + */ + public EndpointSettings putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } @Override @@ -268,12 +312,13 @@ public boolean equals(Object o) { Objects.equals(this.method, endpointSettings.method) && Objects.equals(this.throttlings, endpointSettings.throttlings) && Objects.equals(this.roleNames, endpointSettings.roleNames) && - Objects.equals(this.mappingEndpointId, endpointSettings.mappingEndpointId); + Objects.equals(this.mappingEndpointId, endpointSettings.mappingEndpointId)&& + Objects.equals(this.additionalProperties, endpointSettings.additionalProperties); } @Override public int hashCode() { - return Objects.hash(path, method, throttlings, roleNames, mappingEndpointId); + return Objects.hash(path, method, throttlings, roleNames, mappingEndpointId, additionalProperties); } @Override @@ -285,6 +330,7 @@ public String toString() { sb.append(" throttlings: ").append(toIndentedString(throttlings)).append("\n"); sb.append(" roleNames: ").append(toIndentedString(roleNames)).append("\n"); sb.append(" mappingEndpointId: ").append(toIndentedString(mappingEndpointId)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -334,14 +380,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!EndpointSettings.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EndpointSettings` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - // check to make sure all required properties/fields are present in the JSON string for (String requiredField : EndpointSettings.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { @@ -391,6 +429,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, EndpointSettings value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -398,7 +453,28 @@ public void write(JsonWriter out, EndpointSettings value) throws IOException { public EndpointSettings read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + EndpointSettings instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/src/main/java/saasus/sdk/apigateway/models/Error.java b/src/main/java/saasus/sdk/apigateway/models/Error.java index f9c03f23..0351f675 100644 --- a/src/main/java/saasus/sdk/apigateway/models/Error.java +++ b/src/main/java/saasus/sdk/apigateway/models/Error.java @@ -49,7 +49,7 @@ /** * Error */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") public class Error { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -99,6 +99,50 @@ public void setMessage(String message) { this.message = message; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Error instance itself + */ + public Error putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } @Override @@ -111,12 +155,13 @@ public boolean equals(Object o) { } Error error = (Error) o; return Objects.equals(this.type, error.type) && - Objects.equals(this.message, error.message); + Objects.equals(this.message, error.message)&& + Objects.equals(this.additionalProperties, error.additionalProperties); } @Override public int hashCode() { - return Objects.hash(type, message); + return Objects.hash(type, message, additionalProperties); } @Override @@ -125,6 +170,7 @@ public String toString() { sb.append("class Error {\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -169,14 +215,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Error.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Error` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Error.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { @@ -207,6 +245,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, Error value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -214,7 +269,28 @@ public void write(JsonWriter out, Error value) throws IOException { public Error read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + Error instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/src/main/java/saasus/sdk/apigateway/models/TenantRouting.java b/src/main/java/saasus/sdk/apigateway/models/TenantRouting.java index 8797adda..695315d9 100644 --- a/src/main/java/saasus/sdk/apigateway/models/TenantRouting.java +++ b/src/main/java/saasus/sdk/apigateway/models/TenantRouting.java @@ -49,7 +49,7 @@ /** * Information about tenant routing. Refer to the tenant_routing_type in ApiGatewaySettings and route the request. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") public class TenantRouting { public static final String SERIALIZED_NAME_PATH = "path"; @SerializedName(SERIALIZED_NAME_PATH) @@ -145,6 +145,50 @@ public void setHostName(String hostName) { this.hostName = hostName; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the TenantRouting instance itself + */ + public TenantRouting putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } @Override @@ -159,12 +203,13 @@ public boolean equals(Object o) { return Objects.equals(this.path, tenantRouting.path) && Objects.equals(this.headerKey, tenantRouting.headerKey) && Objects.equals(this.headerValue, tenantRouting.headerValue) && - Objects.equals(this.hostName, tenantRouting.hostName); + Objects.equals(this.hostName, tenantRouting.hostName)&& + Objects.equals(this.additionalProperties, tenantRouting.additionalProperties); } @Override public int hashCode() { - return Objects.hash(path, headerKey, headerValue, hostName); + return Objects.hash(path, headerKey, headerValue, hostName, additionalProperties); } @Override @@ -175,6 +220,7 @@ public String toString() { sb.append(" headerKey: ").append(toIndentedString(headerKey)).append("\n"); sb.append(" headerValue: ").append(toIndentedString(headerValue)).append("\n"); sb.append(" hostName: ").append(toIndentedString(hostName)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -218,14 +264,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in TenantRouting is not found in the empty JSON string", TenantRouting.openapiRequiredFields.toString())); } } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!TenantRouting.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TenantRouting` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("path") != null && !jsonObj.get("path").isJsonNull()) && !jsonObj.get("path").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `path` to be a primitive type in the JSON string but got `%s`", jsonObj.get("path").toString())); @@ -256,6 +294,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, TenantRouting value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -263,7 +318,28 @@ public void write(JsonWriter out, TenantRouting value) throws IOException { public TenantRouting read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + TenantRouting instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/src/main/java/saasus/sdk/apigateway/models/Throttling.java b/src/main/java/saasus/sdk/apigateway/models/Throttling.java index 17631611..18fa23d0 100644 --- a/src/main/java/saasus/sdk/apigateway/models/Throttling.java +++ b/src/main/java/saasus/sdk/apigateway/models/Throttling.java @@ -49,7 +49,7 @@ /** * Permit requests up to the limit number of times within a range (seconds) time for each target. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") public class Throttling { /** * Target of restriction @@ -176,6 +176,50 @@ public void setLimit(Integer limit) { this.limit = limit; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Throttling instance itself + */ + public Throttling putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } @Override @@ -189,12 +233,13 @@ public boolean equals(Object o) { Throttling throttling = (Throttling) o; return Objects.equals(this.target, throttling.target) && Objects.equals(this.range, throttling.range) && - Objects.equals(this.limit, throttling.limit); + Objects.equals(this.limit, throttling.limit)&& + Objects.equals(this.additionalProperties, throttling.additionalProperties); } @Override public int hashCode() { - return Objects.hash(target, range, limit); + return Objects.hash(target, range, limit, additionalProperties); } @Override @@ -204,6 +249,7 @@ public String toString() { sb.append(" target: ").append(toIndentedString(target)).append("\n"); sb.append(" range: ").append(toIndentedString(range)).append("\n"); sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -250,14 +296,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Throttling.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Throttling` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Throttling.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { @@ -287,6 +325,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, Throttling value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -294,7 +349,28 @@ public void write(JsonWriter out, Throttling value) throws IOException { public Throttling read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + Throttling instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/src/main/java/saasus/sdk/apigateway/models/UpdateApiGatewaySettingsParam.java b/src/main/java/saasus/sdk/apigateway/models/UpdateApiGatewaySettingsParam.java index d2925b50..e05528a3 100644 --- a/src/main/java/saasus/sdk/apigateway/models/UpdateApiGatewaySettingsParam.java +++ b/src/main/java/saasus/sdk/apigateway/models/UpdateApiGatewaySettingsParam.java @@ -53,7 +53,7 @@ /** * UpdateApiGatewaySettingsParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") public class UpdateApiGatewaySettingsParam { public static final String SERIALIZED_NAME_ROLE_ARN = "role_arn"; @SerializedName(SERIALIZED_NAME_ROLE_ARN) @@ -349,6 +349,50 @@ public void setTenantRoutingType(TenantRoutingType tenantRoutingType) { this.tenantRoutingType = tenantRoutingType; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdateApiGatewaySettingsParam instance itself + */ + public UpdateApiGatewaySettingsParam putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } @Override @@ -371,12 +415,13 @@ public boolean equals(Object o) { Objects.equals(this.domainName, updateApiGatewaySettingsParam.domainName) && Objects.equals(this.saasAlbArn, updateApiGatewaySettingsParam.saasAlbArn) && Objects.equals(this.endpointSettingsList, updateApiGatewaySettingsParam.endpointSettingsList) && - Objects.equals(this.tenantRoutingType, updateApiGatewaySettingsParam.tenantRoutingType); + Objects.equals(this.tenantRoutingType, updateApiGatewaySettingsParam.tenantRoutingType)&& + Objects.equals(this.additionalProperties, updateApiGatewaySettingsParam.additionalProperties); } @Override public int hashCode() { - return Objects.hash(roleArn, roleExternalId, internalEndpointHealthCheckPath, internalEndpointHealthCheckPort, internalEndpointHealthCheckProtocol, internalEndpointHealthStatusCodes, saasSubnetIds, saasVpcId, domainName, saasAlbArn, endpointSettingsList, tenantRoutingType); + return Objects.hash(roleArn, roleExternalId, internalEndpointHealthCheckPath, internalEndpointHealthCheckPort, internalEndpointHealthCheckProtocol, internalEndpointHealthStatusCodes, saasSubnetIds, saasVpcId, domainName, saasAlbArn, endpointSettingsList, tenantRoutingType, additionalProperties); } @Override @@ -395,6 +440,7 @@ public String toString() { sb.append(" saasAlbArn: ").append(toIndentedString(saasAlbArn)).append("\n"); sb.append(" endpointSettingsList: ").append(toIndentedString(endpointSettingsList)).append("\n"); sb.append(" tenantRoutingType: ").append(toIndentedString(tenantRoutingType)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -446,14 +492,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateApiGatewaySettingsParam is not found in the empty JSON string", UpdateApiGatewaySettingsParam.openapiRequiredFields.toString())); } } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateApiGatewaySettingsParam.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateApiGatewaySettingsParam` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("role_arn") != null && !jsonObj.get("role_arn").isJsonNull()) && !jsonObj.get("role_arn").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `role_arn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("role_arn").toString())); @@ -518,6 +556,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, UpdateApiGatewaySettingsParam value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -525,7 +580,28 @@ public void write(JsonWriter out, UpdateApiGatewaySettingsParam value) throws IO public UpdateApiGatewaySettingsParam read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UpdateApiGatewaySettingsParam instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/src/main/java/saasus/sdk/apigateway/models/UpdateOpenApiDefinitionParam.java b/src/main/java/saasus/sdk/apigateway/models/UpdateOpenApiDefinitionParam.java index 0aa6a83c..29bb74b8 100644 --- a/src/main/java/saasus/sdk/apigateway/models/UpdateOpenApiDefinitionParam.java +++ b/src/main/java/saasus/sdk/apigateway/models/UpdateOpenApiDefinitionParam.java @@ -49,7 +49,7 @@ /** * UpdateOpenApiDefinitionParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") public class UpdateOpenApiDefinitionParam { public static final String SERIALIZED_NAME_CONTENT = "content"; @SerializedName(SERIALIZED_NAME_CONTENT) @@ -76,6 +76,50 @@ public void setContent(String content) { this.content = content; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdateOpenApiDefinitionParam instance itself + */ + public UpdateOpenApiDefinitionParam putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } @Override @@ -87,12 +131,13 @@ public boolean equals(Object o) { return false; } UpdateOpenApiDefinitionParam updateOpenApiDefinitionParam = (UpdateOpenApiDefinitionParam) o; - return Objects.equals(this.content, updateOpenApiDefinitionParam.content); + return Objects.equals(this.content, updateOpenApiDefinitionParam.content)&& + Objects.equals(this.additionalProperties, updateOpenApiDefinitionParam.additionalProperties); } @Override public int hashCode() { - return Objects.hash(content); + return Objects.hash(content, additionalProperties); } @Override @@ -100,6 +145,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UpdateOpenApiDefinitionParam {\n"); sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -142,14 +188,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateOpenApiDefinitionParam.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateOpenApiDefinitionParam` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - // check to make sure all required properties/fields are present in the JSON string for (String requiredField : UpdateOpenApiDefinitionParam.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { @@ -177,6 +215,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, UpdateOpenApiDefinitionParam value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -184,7 +239,28 @@ public void write(JsonWriter out, UpdateOpenApiDefinitionParam value) throws IOE public UpdateOpenApiDefinitionParam read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UpdateOpenApiDefinitionParam instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); diff --git a/src/main/java/saasus/sdk/apigateway/models/UpdateTenantParam.java b/src/main/java/saasus/sdk/apigateway/models/UpdateTenantParam.java index b2acf176..76d126ab 100644 --- a/src/main/java/saasus/sdk/apigateway/models/UpdateTenantParam.java +++ b/src/main/java/saasus/sdk/apigateway/models/UpdateTenantParam.java @@ -52,7 +52,7 @@ /** * UpdateTenantParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-26T00:29:00.145193009Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") public class UpdateTenantParam { public static final String SERIALIZED_NAME_ALLOWED_IPS = "allowed_ips"; @SerializedName(SERIALIZED_NAME_ALLOWED_IPS) @@ -110,6 +110,50 @@ public void setRouting(TenantRouting routing) { this.routing = routing; } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdateTenantParam instance itself + */ + public UpdateTenantParam putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } @Override @@ -122,12 +166,13 @@ public boolean equals(Object o) { } UpdateTenantParam updateTenantParam = (UpdateTenantParam) o; return Objects.equals(this.allowedIps, updateTenantParam.allowedIps) && - Objects.equals(this.routing, updateTenantParam.routing); + Objects.equals(this.routing, updateTenantParam.routing)&& + Objects.equals(this.additionalProperties, updateTenantParam.additionalProperties); } @Override public int hashCode() { - return Objects.hash(allowedIps, routing); + return Objects.hash(allowedIps, routing, additionalProperties); } @Override @@ -136,6 +181,7 @@ public String toString() { sb.append("class UpdateTenantParam {\n"); sb.append(" allowedIps: ").append(toIndentedString(allowedIps)).append("\n"); sb.append(" routing: ").append(toIndentedString(routing)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -177,14 +223,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateTenantParam is not found in the empty JSON string", UpdateTenantParam.openapiRequiredFields.toString())); } } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateTenantParam.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateTenantParam` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present if (jsonObj.get("allowed_ips") != null && !jsonObj.get("allowed_ips").isJsonNull() && !jsonObj.get("allowed_ips").isJsonArray()) { @@ -211,6 +249,23 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, UpdateTenantParam value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } elementAdapter.write(out, obj); } @@ -218,7 +273,28 @@ public void write(JsonWriter out, UpdateTenantParam value) throws IOException { public UpdateTenantParam read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UpdateTenantParam instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; } }.nullSafe(); From ce63c61614e674220d1aefd35619d641430dd41d Mon Sep 17 00:00:00 2001 From: takashi-uchida Date: Fri, 30 May 2025 06:02:46 +0900 Subject: [PATCH 11/28] =?UTF-8?q?feat:=20=E7=BD=B2=E5=90=8D=E6=A4=9C?= =?UTF-8?q?=E8=A8=BC=E3=81=AE=E5=80=99=E8=A3=9C=E3=83=91=E3=82=B9=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0=E3=81=97=E3=80=81API=E5=91=BC=E3=81=B3?= =?UTF-8?q?=E5=87=BA=E3=81=97=E3=81=AE=E6=99=82=E9=96=93=E8=A8=88=E6=B8=AC?= =?UTF-8?q?=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../saasus/sdk/util/apiserver/ApiServer.java | 351 ++++++++---------- 1 file changed, 155 insertions(+), 196 deletions(-) diff --git a/src/main/java/saasus/sdk/util/apiserver/ApiServer.java b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java index ff2a5b6f..d2220da6 100644 --- a/src/main/java/saasus/sdk/util/apiserver/ApiServer.java +++ b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java @@ -103,6 +103,9 @@ private boolean verifySignature(HttpExchange exchange) { String verificationPath = requestHost + pathWithQuery; System.out.println("verificationPath: " + verificationPath); + // 署名検証候補パスのリスト(スコープを広げるためここで宣言) + List candidateVerificationPaths = new ArrayList<>(); + System.out.println("\n=== API Gateway設定取得処理 ==="); System.out.println("1. ApiGatewayApiClient構築"); @@ -143,35 +146,7 @@ private boolean verifySignature(HttpExchange exchange) { System.out.println(" 呼び出しURL: " + apiClient.getBasePath() + "/api-gateway/settings"); ApiGatewaySettings settings = null; try { - // まず別メソッドでgetRoutingValueを試してみる - System.out.println("\n🔬 DEBUG: getRoutingValueとの比較テスト"); - String apiKey = exchange.getRequestHeaders().getFirst("x-api-key"); - try { - String testRoutingValue = testGetRoutingValue(apiKey); - System.out.println(" ✅ getRoutingValueテスト成功: " + testRoutingValue); - System.out.println(" 📝 getRoutingValueでは正常に設定を取得できました"); - } catch (Exception testE) { - System.out.println(" ❌ getRoutingValueテストも失敗: " + testE.getMessage()); - // エラーメッセージからendpoint_settings_listを抽出を試行 - String errorMessage = testE.getMessage(); - if (errorMessage != null && errorMessage.contains("endpoint_settings_list")) { - System.out.println(" 🔍 エラーメッセージからエンドポイント設定を抽出中..."); - try { - String extractedMapping = extractEndpointMappingFromError(errorMessage, rawPath); - if (extractedMapping != null) { - System.out.println(" ✅ エラーから元のパスを抽出成功: " + extractedMapping); - String originalPathWithQuery = query != null && !query.isEmpty() - ? extractedMapping + "?" + query - : extractedMapping; - verificationPath = requestHost + originalPathWithQuery; - System.out.println(" 🔄 抽出した元のパスで検証パスを更新: " + verificationPath); - } - } catch (Exception extractE) { - System.out.println(" ⚠️ エンドポイント抽出に失敗: " + extractE.getMessage()); - } - } - } - + // API呼び出しの時間計測 long startTime = System.currentTimeMillis(); settings = apiInstance.getApiGatewaySettings(); long endTime = System.currentTimeMillis(); @@ -202,9 +177,17 @@ private boolean verifySignature(HttpExchange exchange) { System.out.println("endpoint list: " + endpointSettingsList); // 現在のrawPathに対応するEndpointSettingsを検索 + System.out.println("🔍 マッピング検索中:"); + System.out.println(" 検索対象rawPath: '" + rawPath + "'"); for (saasus.sdk.apigateway.models.EndpointSettings endpoint : endpointSettingsList) { - if (endpoint.getMappingEndpointId().equals(rawPath) || - rawPath.startsWith(endpoint.getMappingEndpointId())) { + String mappingId = endpoint.getMappingEndpointId(); + System.out.println(" 比較対象mappingEndpointId: '" + mappingId + "'"); + + // rawPathから先頭の「/」を除去して比較 + String normalizedRawPath = rawPath.startsWith("/") ? rawPath.substring(1) : rawPath; + System.out.println(" 正規化されたrawPath: '" + normalizedRawPath + "'"); + + if (mappingId.equals(normalizedRawPath) || normalizedRawPath.startsWith(mappingId)) { originalPath = endpoint.getPath(); System.out.println("マッピング発見:"); System.out.println(" 変換後のpath (mappingEndpointId): " + endpoint.getMappingEndpointId()); @@ -226,6 +209,16 @@ private boolean verifySignature(HttpExchange exchange) { Integer healthCheckPort = settings.getInternalEndpointHealthCheckPort(); + // マッピング後のパスを使用してpathWithQueryを再構築 + String finalPathWithQuery; + if (originalPath != null) { + finalPathWithQuery = query != null && !query.isEmpty() ? originalPath + "?" + query : originalPath; + System.out.println("🔄 マッピング適用後のpathWithQuery: " + finalPathWithQuery); + } else { + finalPathWithQuery = pathWithQuery; + System.out.println("📝 マッピングなし、元のpathWithQueryを使用: " + finalPathWithQuery); + } + // 候補となるホストを取得 List possibleHosts = new ArrayList<>(); if (settings.getCloudFrontDnsRecord() != null && settings.getCloudFrontDnsRecord().getValue() != null) { @@ -239,14 +232,28 @@ private boolean verifySignature(HttpExchange exchange) { } System.out.println("possibleHosts: " + possibleHosts); - // 要求されたホストが候補のいずれかにマッチするか確認 + // 全てのホスト候補で署名検証を試行 + candidateVerificationPaths.add(requestHost + finalPathWithQuery); // 元のリクエストホスト + for (String host : possibleHosts) { - System.out.println("path" + host + healthCheckPort + pathWithQuery); - if (requestHost != null && requestHost.equals(host)) { - verificationPath = host + healthCheckPort + pathWithQuery; - System.out.println("マッチしたホスト " + host + " で署名を検証します"); - break; + String candidatePath; + // CloudFrontドメイン、REST API + // エンドポイント、カスタムドメイン(getDomainName)の場合はHTTPSとして扱い、ポート番号を付加しない + if (host.contains(settings.getCloudFrontDnsRecord().getValue()) || + host.contains(settings.getRestApiEndpoint()) || + host.contains(settings.getDomainName())) { + candidatePath = host + finalPathWithQuery; + System.out.println("🌐 HTTPS Endpoint(ポート番号なし): " + candidatePath); + } else { + candidatePath = host + healthCheckPort + finalPathWithQuery; + System.out.println("🔍 内部エンドポイント(ポート番号付き): " + candidatePath); } + candidateVerificationPaths.add(candidatePath); + } + + System.out.println("📋 署名検証候補パス一覧:"); + for (int i = 0; i < candidateVerificationPaths.size(); i++) { + System.out.println(" " + (i + 1) + ". " + candidateVerificationPaths.get(i)); } } catch (ApiException e) { @@ -356,166 +363,101 @@ private boolean verifySignature(HttpExchange exchange) { return true; } - Date now = new Date(); - int timeWindow = 1; - - for (int i = -timeWindow; i <= timeWindow; i++) { - Calendar cal = Calendar.getInstance(); - cal.setTime(now); - cal.add(Calendar.MINUTE, i); - Date adjustedTime = cal.getTime(); - - SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmm"); - sdf.setTimeZone(TimeZone.getTimeZone("UTC")); - String timestamp = sdf.format(adjustedTime); - - try { - System.out.println("\n=== 署名計算(タイムスタンプ: " + timestamp + ")==="); - System.out.println("署名計算に使用する値:"); - System.out.println(" タイムスタンプ: " + timestamp); - System.out.println(" APIキー: " + apiKey); - System.out.println(" メソッド: " + method.toUpperCase()); - System.out.println(" 検証パス: " + verificationPath); - - Mac mac = Mac.getInstance("HmacSHA256"); - SecretKeySpec keySpec = new SecretKeySpec(clientSecret.getBytes(StandardCharsets.UTF_8), - "HmacSHA256"); - mac.init(keySpec); - - System.out.println("\n署名計算の順序:"); - // バイト配列にデータを書き込む - mac.update(timestamp.getBytes(StandardCharsets.UTF_8)); - System.out.println("1. タイムスタンプ更新"); - mac.update(apiKey.getBytes(StandardCharsets.UTF_8)); - System.out.println("2. APIキー更新"); - mac.update(method.toUpperCase().getBytes(StandardCharsets.UTF_8)); - System.out.println("3. メソッド更新"); - mac.update(verificationPath.getBytes(StandardCharsets.UTF_8)); - System.out.println("4. 検証パス更新"); - - // リクエストボディが存在する場合は追加 - InputStream is = exchange.getRequestBody(); - ByteArrayOutputStream buffer = new ByteArrayOutputStream(); - int nRead; - byte[] data = new byte[16384]; - while ((nRead = is.read(data, 0, data.length)) != -1) { - buffer.write(data, 0, nRead); - } - buffer.flush(); - byte[] requestBody = buffer.toByteArray(); - if (requestBody.length > 0) { - mac.update(requestBody); - System.out.println("5. リクエストボディ更新 (長さ: " + requestBody.length + " bytes)"); - System.out.println(" ボディ内容: " + new String(requestBody, StandardCharsets.UTF_8)); - } - - String calculatedSignature = bytesToHex(mac.doFinal()); - System.out.println("\n署名比較:"); - System.out.println(" 期待される署名: " + signature); - System.out.println(" 計算された署名: " + calculatedSignature); - System.out.println(" 一致: " + calculatedSignature.equals(signature)); + // 既に上の部分でcandidateVerificationPathsが定義されているので、それを使用 + // フォールバックとして現在のverificationPathが含まれていることを確認 + if (!candidateVerificationPaths.contains(verificationPath)) { + candidateVerificationPaths.add(verificationPath); + System.out.println("🔍 フォールバック用に現在の検証パスを追加: " + verificationPath); + } - if (calculatedSignature.equals(signature)) { - System.out.println("\n✅ 署名検証成功"); - return true; - } else { - System.out.println("\n❌ 署名検証失敗"); - } - } catch (Exception e) { - e.printStackTrace(); + // リクエストボディを事前に読み取り(複数回使用するため) + byte[] requestBody = new byte[0]; + try { + InputStream is = exchange.getRequestBody(); + ByteArrayOutputStream buffer = new ByteArrayOutputStream(); + int nRead; + byte[] data = new byte[16384]; + while ((nRead = is.read(data, 0, data.length)) != -1) { + buffer.write(data, 0, nRead); } + buffer.flush(); + requestBody = buffer.toByteArray(); + } catch (IOException e) { + System.out.println("リクエストボディ読み取りエラー: " + e.getMessage()); } - System.err.println("Signature verification failed for all time windows"); - return false; - } - private String extractEndpointMappingFromError(String errorMessage, String rawPath) { - try { - // エラーメッセージからJSONを抽出 - int jsonStart = errorMessage.indexOf("{"); - if (jsonStart == -1) - return null; + Date now = new Date(); + int timeWindow = 1; - String jsonStr = errorMessage.substring(jsonStart); - System.out.println(" 📄 抽出したJSON: " + jsonStr.substring(0, Math.min(200, jsonStr.length())) + "..."); + // 全ての候補パスで署名検証を試行 + for (String candidatePath : candidateVerificationPaths) { + System.out.println("\n🎯 候補パスでの署名検証: " + candidatePath); + + for (int i = -timeWindow; i <= timeWindow; i++) { + Calendar cal = Calendar.getInstance(); + cal.setTime(now); + cal.add(Calendar.MINUTE, i); + Date adjustedTime = cal.getTime(); + + SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmm"); + sdf.setTimeZone(TimeZone.getTimeZone("UTC")); + String timestamp = sdf.format(adjustedTime); + + try { + System.out.println( + "\n=== 署名計算(パス: " + candidatePath.substring(0, Math.min(50, candidatePath.length())) + + "..., タイムスタンプ: " + timestamp + ")==="); + + Mac mac = Mac.getInstance("HmacSHA256"); + SecretKeySpec keySpec = new SecretKeySpec(clientSecret.getBytes(StandardCharsets.UTF_8), + "HmacSHA256"); + mac.init(keySpec); + + // 署名計算 + mac.update(timestamp.getBytes(StandardCharsets.UTF_8)); + mac.update(apiKey.getBytes(StandardCharsets.UTF_8)); + mac.update(method.toUpperCase().getBytes(StandardCharsets.UTF_8)); + mac.update(candidatePath.getBytes(StandardCharsets.UTF_8)); + + if (requestBody.length > 0) { + mac.update(requestBody); + } - // 簡易的なJSONパースでendpoint_settings_listを抽出 - String searchPattern = "\"endpoint_settings_list\":["; - int listStart = jsonStr.indexOf(searchPattern); - if (listStart == -1) - return null; + String calculatedSignature = bytesToHex(mac.doFinal()); + System.out.println(" 🔍 署名計算詳細:"); + System.out.println(" タイムスタンプ: '" + timestamp + "'"); + System.out.println(" APIキー: '" + apiKey + "'"); + System.out.println(" メソッド: '" + method.toUpperCase() + "'"); + System.out.println(" 候補パス: '" + candidatePath + "'"); + System.out.println(" リクエストボディ長: " + requestBody.length); + System.out.println(" 期待される署名: " + signature); + System.out.println(" 計算された署名: " + calculatedSignature); + + // 実際のクライアントリクエストと一致する候補パスの場合、追加情報を表示 + if (candidatePath.equals( + "https://1xp91qxmeh.execute-api.ap-northeast-1.amazonaws.com/prod/inventory-service/get-inventory?xApiKey=d296b330-3cce-40b6-88c3ls")) { + System.out.println(" 🎯 クライアントリクエストと一致する候補パス!"); + System.out.println(" 💡 クライアント側で使用すべき署名計算パラメータ:"); + System.out.println(" TIMESTAMP=" + timestamp); + System.out.println(" API_KEY=" + apiKey); + System.out.println(" METHOD=" + method.toUpperCase()); + System.out.println(" PATH=" + candidatePath); + } - // endpoint_settings_listの開始位置 - int arrayStart = listStart + searchPattern.length() - 1; - int bracketCount = 0; - int arrayEnd = arrayStart; - - // 配列の終了位置を見つける - for (int i = arrayStart; i < jsonStr.length(); i++) { - char c = jsonStr.charAt(i); - if (c == '[') - bracketCount++; - else if (c == ']') { - bracketCount--; - if (bracketCount == 0) { - arrayEnd = i + 1; - break; + if (calculatedSignature.equals(signature)) { + System.out.println("\n🎉 署名検証成功!"); + System.out.println(" ✅ 成功したパス: " + candidatePath); + System.out.println(" ✅ タイムスタンプ: " + timestamp); + return true; } + } catch (Exception e) { + System.out.println("署名計算エラー: " + e.getMessage()); } } - - String endpointsArray = jsonStr.substring(arrayStart, arrayEnd); - System.out.println(" 🎯 endpoint_settings_list: " + endpointsArray); - - // 現在のrawPathにマッチするmapping_endpoint_idを探す - String mappingPattern = "\"mapping_endpoint_id\":\"" + rawPath.replace("/", "\\/") + "\""; - int mappingIndex = endpointsArray.indexOf(mappingPattern); - if (mappingIndex == -1) - return null; - - // そのオブジェクト内でpathを探す - int objStart = endpointsArray.lastIndexOf("{", mappingIndex); - int objEnd = endpointsArray.indexOf("}", mappingIndex) + 1; - String endpointObj = endpointsArray.substring(objStart, objEnd); - - System.out.println(" 🔍 マッチしたエンドポイントオブジェクト: " + endpointObj); - - // pathの値を抽出 - String pathPattern = "\"path\":\""; - int pathStart = endpointObj.indexOf(pathPattern); - if (pathStart == -1) - return null; - - pathStart += pathPattern.length(); - int pathEnd = endpointObj.indexOf("\"", pathStart); - if (pathEnd == -1) - return null; - - String extractedPath = endpointObj.substring(pathStart, pathEnd); - System.out.println(" ✅ 抽出されたパス: " + extractedPath); - - return extractedPath; - - } catch (Exception e) { - System.out.println(" ❌ JSON抽出エラー: " + e.getMessage()); - return null; - } - } - - private String testGetRoutingValue(String apiKey) throws ApiException { - System.out.println("🔬 testGetRoutingValue開始"); - ApiGatewayApiClient apiClient = new Configuration().getApiGatewayApiClient(); - SmartApiGatewayApi apiInstance = new SmartApiGatewayApi(apiClient); - - System.out.println(" testGetRoutingValue用のgetApiGatewaySettings呼び出し"); - ApiGatewaySettings settings = apiInstance.getApiGatewaySettings(); - if (settings == null) { - throw new ApiException("API Gateway Settings not found in test"); } - System.out.println(" testGetRoutingValue: getApiGatewaySettings成功"); - String tenantRoutingType = settings.getTenantRoutingType().getValue(); - return tenantRoutingType; // 簡易版テスト + System.err.println("❌ 全ての候補パスで署名検証に失敗しました"); + return false; } private String bytesToHex(byte[] bytes) { @@ -592,9 +534,9 @@ public void handle(HttpExchange exchange) throws IOException { return; } } else { - if (pathParts.length >= 4) { - className = pathParts[2]; - methodName = pathParts[3]; + if (pathParts.length >= 3) { + className = pathParts[1]; + methodName = pathParts[2]; System.out.println("No explicit routing found, assuming " + pathParts[1] + " is routing, class: " + className + ", method: " + methodName); } else { @@ -737,18 +679,35 @@ private String getRoutingValue(String apiKey) throws ApiException { // テナント設定情報を取得 ApiGatewayTenant tenant = apiInstance.getTenant(apiKeyObj.getTenantId()); if (tenant == null) { - System.out.println("Tenant not found: " + apiKeyObj.getTenantId()); - throw new ApiException("Tenant not found: " + apiKeyObj.getTenantId()); + System.out.println("Tenant not found for ID: " + apiKeyObj.getTenantId()); + throw new ApiException("Tenant not found for ID: " + apiKeyObj.getTenantId()); } - TenantRouting tenantRouting = tenant.getRouting(); - if (tenantRouting == null) { - System.out.println("Tenant Routing not found for tenant: " + apiKeyObj.getTenantId()); - throw new ApiException("Tenant Routing not found for tenant: " + apiKeyObj.getTenantId()); + TenantRouting routing = tenant.getRouting(); + if (routing == null) { + System.out.println("Routing not found for tenant: " + apiKeyObj.getTenantId()); + throw new ApiException("Routing not found for tenant: " + apiKeyObj.getTenantId()); + } + switch (tenantRoutingType.toLowerCase()) { + case "none": + System.out.println("Tenant Routing Type is none"); + return null; + case "path": + System.out.println("Tenant Routing Type is path"); + return routing.getPath(); + case "hostname": + System.out.println("Tenant Routing Type is hostname"); + // not implemented + return null; + case "headervalue": + System.out.println("Tenant Routing Type is headervalue"); + // not implemented + return null; + default: + throw new ApiException("Invalid tenantRoutingType: " + tenantRoutingType); } - - return tenantRouting.getPath(); } + } public static class UserApi { From d0e451a9d3eb988d7bb0216e7f333fa77f3b6bb6 Mon Sep 17 00:00:00 2001 From: takashi-uchida Date: Fri, 30 May 2025 07:00:15 +0900 Subject: [PATCH 12/28] =?UTF-8?q?feat:=20=E3=82=AF=E3=83=A9=E3=82=A4?= =?UTF-8?q?=E3=82=A2=E3=83=B3=E3=83=88=E3=82=B7=E3=83=BC=E3=82=AF=E3=83=AC?= =?UTF-8?q?=E3=83=83=E3=83=88=E3=81=AE=E5=8F=96=E5=BE=97=E5=87=A6=E7=90=86?= =?UTF-8?q?=E3=82=92=E6=94=B9=E5=96=84=E3=81=97=E3=80=81API=E3=82=AD?= =?UTF-8?q?=E3=83=BC=E3=81=AE=E6=A4=9C=E8=A8=BC=E3=82=92=E5=BC=B7=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../saasus/sdk/util/apiserver/ApiServer.java | 86 +++++++++++++------ 1 file changed, 60 insertions(+), 26 deletions(-) diff --git a/src/main/java/saasus/sdk/util/apiserver/ApiServer.java b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java index d2220da6..2b3a97b7 100644 --- a/src/main/java/saasus/sdk/util/apiserver/ApiServer.java +++ b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java @@ -47,10 +47,6 @@ private static String fetchClientSecret(String apiKey) { return null; } - if (clientSecret != null) { - return clientSecret; - } - try { ApiGatewayApiClient apiClient = new Configuration().getApiGatewayApiClient(); SmartApiGatewayApi apiInstance = new SmartApiGatewayApi(apiClient); @@ -309,6 +305,27 @@ private boolean verifySignature(HttpExchange exchange) { // 署名検証のためのホストとパスの組み合わせを確認 System.out.println("署名検証に使用するホストとパス: " + verificationPath); + // APIキーを先に取得してclient_secretの有無を確認 + String apiKey = exchange.getRequestHeaders().getFirst("x-api-key"); + System.out.println("\n=== APIキー確認 ==="); + System.out.println("x-api-keyヘッダーの値: " + apiKey); + + try { + clientSecret = fetchClientSecret(apiKey); + System.out.println("client secret: " + clientSecret); + if (clientSecret == null || clientSecret.trim().isEmpty()) { + System.out.println("\n⚠️ クライアントシークレットが利用できません"); + System.out.println("APIキー: " + apiKey); + System.out.println("署名検証をスキップして処理を続行します"); + return true; + } + System.out.println("✅ クライアントシークレットの取得に成功しました"); + } catch (Exception e) { + System.out.println("⚠️ クライアントシークレット取得中にエラーが発生しました: " + e.getMessage()); + System.out.println("署名検証をスキップして処理を続行します"); + return true; + } + System.out.println("\n=== Authorization ヘッダー解析 ==="); String authHeader = exchange.getRequestHeaders().getFirst("Authorization"); System.out.println("Authorization ヘッダー: " + authHeader); @@ -333,7 +350,6 @@ private boolean verifySignature(HttpExchange exchange) { System.out.println(" 署名: " + signature); System.out.println(" APIキー: " + headerApiKey); - String apiKey = exchange.getRequestHeaders().getFirst("x-api-key"); System.out.println("\nAPIキー検証:"); System.out.println(" Authorization内のAPIキー: " + headerApiKey); System.out.println(" x-api-keyヘッダーの値: " + apiKey); @@ -344,25 +360,6 @@ private boolean verifySignature(HttpExchange exchange) { } System.out.println("✅ APIキーの検証成功"); - try { - clientSecret = fetchClientSecret(apiKey); - if (clientSecret == null) { - System.out.println("\n警告: クライアントシークレットが利用できません"); - System.out.println("APIキー: " + apiKey); - System.out.println("署名検証をスキップします"); - return true; - } - System.out.println("クライアントシークレットの取得に成功しました"); - } catch (Exception e) { - System.out.println("Error fetching client secret: " + e.getMessage()); - return true; - } - - if (clientSecret == null) { - System.out.println("No client secret available"); - return true; - } - // 既に上の部分でcandidateVerificationPathsが定義されているので、それを使用 // フォールバックとして現在のverificationPathが含まれていることを確認 if (!candidateVerificationPaths.contains(verificationPath)) { @@ -537,7 +534,7 @@ public void handle(HttpExchange exchange) throws IOException { if (pathParts.length >= 3) { className = pathParts[1]; methodName = pathParts[2]; - System.out.println("No explicit routing found, assuming " + pathParts[1] + " is routing, class: " + System.out.println("class: " + className + ", method: " + methodName); } else { sendResponse(exchange, 400, "Invalid path format. Expected /routing/ClassName/methodName"); @@ -548,15 +545,52 @@ public void handle(HttpExchange exchange) throws IOException { Map queryParams = parseQueryParams(exchange.getRequestURI()); try { + System.out.println("\n=== デバッグ: メソッド呼び出し開始 ==="); + System.out.println("クラス名: " + className); + System.out.println("メソッド名: " + methodName); + System.out.println("クエリパラメータ: " + queryParams); + Class clazz = getClass(className); + System.out.println("✅ クラス解決成功: " + clazz.getName()); + Method method = getMethod(clazz, methodName); + System.out.println("取得されたメソッド: " + method); if (method != null) { + System.out.println("✅ メソッド解決成功: " + method.toString()); + System.out.println("メソッドパラメータ数: " + method.getParameterCount()); + + // パラメータ詳細を表示 + Parameter[] parameters = method.getParameters(); + for (int i = 0; i < parameters.length; i++) { + System.out.println(" パラメータ" + i + ": " + parameters[i].getName() + + " (型: " + parameters[i].getType().getSimpleName() + ")"); + } + + System.out.println("\n--- 引数準備開始 ---"); Object[] args = prepareMethodArguments(method, queryParams); + System.out.println("✅ 引数準備完了"); + System.out.println("準備された引数数: " + args.length); + for (int i = 0; i < args.length; i++) { + System.out.println(" 引数" + i + ": " + args[i] + " (型: " + + (args[i] != null ? args[i].getClass().getSimpleName() : "null") + ")"); + } + + System.out.println("\n--- メソッド実行開始 ---"); Object response = method.invoke(null, args); + System.out.println("✅ メソッド実行完了"); + System.out.println("レスポンス: " + response + " (型: " + + (response != null ? response.getClass().getSimpleName() : "null") + ")"); + + System.out.println("\n--- JSON変換開始 ---"); String jsonResponse = objectMapper.writeValueAsString(response); + System.out.println("✅ JSON変換完了"); + System.out.println("JSONレスポンス: " + jsonResponse); + sendResponse(exchange, 200, jsonResponse); + System.out.println("✅ レスポンス送信完了"); } else { + System.out.println("❌ メソッドが見つかりません: " + methodName); sendResponse(exchange, 404, "Method not found: " + methodName); } } catch (ClassNotFoundException e) { @@ -721,4 +755,4 @@ public static int add(int a, int b) { return a + b; } } -} \ No newline at end of file +} From 621735d4e0dc7090cb077a3616f2cda30d3f07b0 Mon Sep 17 00:00:00 2001 From: takashi-uchida Date: Fri, 30 May 2025 07:17:45 +0900 Subject: [PATCH 13/28] =?UTF-8?q?feat:=20=E3=83=86=E3=83=8A=E3=83=B3?= =?UTF-8?q?=E3=83=88=E8=AD=98=E5=88=A5=E5=AD=90=E3=81=AE=E9=99=A4=E5=8E=BB?= =?UTF-8?q?=E5=87=A6=E7=90=86=E3=82=92=E8=BF=BD=E5=8A=A0=E3=81=97=E3=80=81?= =?UTF-8?q?=E3=83=AB=E3=83=BC=E3=83=86=E3=82=A3=E3=83=B3=E3=82=B0=E3=82=BF?= =?UTF-8?q?=E3=82=A4=E3=83=97=E3=81=AB=E5=BF=9C=E3=81=98=E3=81=9F=E3=83=91?= =?UTF-8?q?=E3=82=B9=E8=AA=BF=E6=95=B4=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../saasus/sdk/util/apiserver/ApiServer.java | 68 ++++++++++++------- 1 file changed, 43 insertions(+), 25 deletions(-) diff --git a/src/main/java/saasus/sdk/util/apiserver/ApiServer.java b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java index 2b3a97b7..d0df8d41 100644 --- a/src/main/java/saasus/sdk/util/apiserver/ApiServer.java +++ b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java @@ -93,6 +93,9 @@ private boolean verifySignature(HttpExchange exchange) { System.out.println(" Host: " + requestHost); System.out.println(" Path: " + rawPath); System.out.println(" Query: " + query); + + // routing type "path"の場合、テナント識別子を除去する必要がある + String adjustedPath = rawPath; String pathWithQuery = query != null && !query.isEmpty() ? rawPath + "?" + query : rawPath; // 初期値として現在のホストとパスを使用 @@ -111,24 +114,6 @@ private boolean verifySignature(HttpExchange exchange) { System.out.println(" タイムアウト設定: " + apiClient.getReadTimeout() + "ms"); System.out.println(" 接続タイムアウト: " + apiClient.getConnectTimeout() + "ms"); - // 認証情報の詳細確認 - try { - saasus.sdk.apigateway.auth.Authentication auth = apiClient.getAuthentication("Bearer"); - System.out.println(" 認証情報: " + auth); - if (auth instanceof saasus.sdk.apigateway.auth.HttpBearerAuth) { - saasus.sdk.apigateway.auth.HttpBearerAuth bearerAuth = (saasus.sdk.apigateway.auth.HttpBearerAuth) auth; - String token = bearerAuth.getBearerToken(); - if (token != null && !token.isEmpty()) { - System.out.println(" Bearerトークン: " + token.substring(0, Math.min(token.length(), 20)) + "..."); - } else { - System.out.println(" ⚠️ Bearerトークンが設定されていません"); - } - } - } catch (Exception e) { - System.out.println(" 認証情報の取得に失敗: " + e.getMessage()); - e.printStackTrace(); - } - // 環境変数の確認 System.out.println("\n環境変数確認:"); System.out.println(" SAASUS_API_KEY: " + (System.getenv("SAASUS_API_KEY") != null ? "設定済み" : "未設定")); @@ -155,9 +140,10 @@ private boolean verifySignature(HttpExchange exchange) { System.out.println("✅ API Gateway設定の取得に成功"); System.out.println("設定内容:"); - System.out.println(" テナントルーティングタイプ: " + - (settings.getTenantRoutingType() != null ? settings.getTenantRoutingType().getValue() - : "null")); + String tenantRoutingType = settings.getTenantRoutingType() != null + ? settings.getTenantRoutingType().getValue() + : "null"; + System.out.println(" テナントルーティングタイプ: " + tenantRoutingType); System.out.println(" RestApiEndpoint: " + settings.getRestApiEndpoint()); System.out.println(" DomainName: " + settings.getDomainName()); System.out.println(" CloudFrontDnsRecord: " + @@ -166,6 +152,38 @@ private boolean verifySignature(HttpExchange exchange) { System.out .println(" InternalEndpointHealthCheckPort: " + settings.getInternalEndpointHealthCheckPort()); + // routing type "path"の場合、テナント識別子をパスから除去 + if ("path".equals(tenantRoutingType)) { + System.out.println("\n=== Routing Type Path 処理 ==="); + System.out.println("元のrawPath: " + rawPath); + + // xApiKeyからテナント情報を取得 + String xApiKey = exchange.getRequestHeaders().getFirst("x-api-key"); + if (xApiKey != null) { + try { + String routingValue = getRoutingValue(xApiKey); + if (routingValue != null && !routingValue.isEmpty()) { + System.out.println("テナントルーティング値: " + routingValue); + + if (rawPath.contains("/" + routingValue + "/")) { + adjustedPath = rawPath.replace("/" + routingValue, ""); + System.out.println("調整後のrawPath: " + adjustedPath); + + // pathWithQueryも更新 + pathWithQuery = query != null && !query.isEmpty() ? adjustedPath + "?" + query + : adjustedPath; + verificationPath = requestHost + pathWithQuery; + System.out.println("調整後のverificationPath: " + verificationPath); + } else { + System.out.println("⚠️ パスにテナントルーティング値が含まれていません"); + } + } + } catch (Exception e) { + System.out.println("⚠️ テナントルーティング値の取得に失敗: " + e.getMessage()); + } + } + } + // ここで変換後のpathから変換前のpathを取得する String originalPath = null; List endpointSettingsList = settings @@ -174,13 +192,13 @@ private boolean verifySignature(HttpExchange exchange) { // 現在のrawPathに対応するEndpointSettingsを検索 System.out.println("🔍 マッピング検索中:"); - System.out.println(" 検索対象rawPath: '" + rawPath + "'"); + System.out.println(" 検索対象rawPath: '" + adjustedPath + "'"); for (saasus.sdk.apigateway.models.EndpointSettings endpoint : endpointSettingsList) { String mappingId = endpoint.getMappingEndpointId(); System.out.println(" 比較対象mappingEndpointId: '" + mappingId + "'"); - // rawPathから先頭の「/」を除去して比較 - String normalizedRawPath = rawPath.startsWith("/") ? rawPath.substring(1) : rawPath; + // adjustedPathから先頭の「/」を除去して比較 + String normalizedRawPath = adjustedPath.startsWith("/") ? adjustedPath.substring(1) : adjustedPath; System.out.println(" 正規化されたrawPath: '" + normalizedRawPath + "'"); if (mappingId.equals(normalizedRawPath) || normalizedRawPath.startsWith(mappingId)) { @@ -200,7 +218,7 @@ private boolean verifySignature(HttpExchange exchange) { verificationPath = requestHost + originalPathWithQuery; System.out.println("元のパスを使用した検証パス: " + verificationPath); } else { - System.out.println("警告: 変換前のパスが見つかりませんでした。現在のパスを使用します: " + rawPath); + System.out.println("警告: 変換前のパスが見つかりませんでした。現在のパスを使用します: " + adjustedPath); } Integer healthCheckPort = settings.getInternalEndpointHealthCheckPort(); From 50858ec6a16ed2c8a3b4999ea4a6e8b153091e9b Mon Sep 17 00:00:00 2001 From: takashi-uchida Date: Fri, 30 May 2025 08:27:38 +0900 Subject: [PATCH 14/28] =?UTF-8?q?feat:=20API=E3=82=B5=E3=83=BC=E3=83=90?= =?UTF-8?q?=E3=83=BC=E3=81=AE=E3=82=AD=E3=83=A3=E3=83=83=E3=82=B7=E3=83=A5?= =?UTF-8?q?=E6=A9=9F=E8=83=BD=E3=82=92=E8=BF=BD=E5=8A=A0=E3=81=97=E3=80=81?= =?UTF-8?q?=E3=83=86=E3=83=8A=E3=83=B3=E3=83=88=E3=83=AB=E3=83=BC=E3=83=86?= =?UTF-8?q?=E3=82=A3=E3=83=B3=E3=82=B0=E5=87=A6=E7=90=86=E3=82=92=E7=B5=B1?= =?UTF-8?q?=E5=90=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../saasus/sdk/util/apiserver/ApiServer.java | 664 +++++------------- 1 file changed, 189 insertions(+), 475 deletions(-) diff --git a/src/main/java/saasus/sdk/util/apiserver/ApiServer.java b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java index d0df8d41..fbc34ae6 100644 --- a/src/main/java/saasus/sdk/util/apiserver/ApiServer.java +++ b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java @@ -18,6 +18,9 @@ import java.util.List; import java.util.Map; import java.util.TimeZone; +import java.util.concurrent.ConcurrentHashMap; +import java.util.logging.Level; +import java.util.logging.Logger; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -35,358 +38,172 @@ import saasus.sdk.apigateway.models.ApiGatewaySettings; import saasus.sdk.apigateway.models.ApiGatewayTenant; import saasus.sdk.apigateway.models.ApiKey; -import saasus.sdk.apigateway.models.TenantRouting; import saasus.sdk.modules.ApiGatewayApiClient; import saasus.sdk.modules.Configuration; public class ApiServer { - private static String clientSecret; - - private static String fetchClientSecret(String apiKey) { - if (apiKey == null || apiKey.trim().isEmpty()) { - return null; + private static final Logger logger = Logger.getLogger(ApiServer.class.getName()); + private static final ObjectMapper objectMapper = new ObjectMapper().registerModule(new JavaTimeModule()); + private static final Configuration configuration = new Configuration(); + private static final boolean DEBUG = Boolean.parseBoolean(System.getenv().getOrDefault("SAASUS_DEBUG", "false")); + + // キャッシュ関連 + private static final long CACHE_DURATION = 300_000; // 5分 + private static final Map apiDataCache = new ConcurrentHashMap<>(); + + private static class CachedApiData { + final ApiGatewaySettings settings; + final ApiKey apiKey; + final ApiGatewayTenant tenant; + final long timestamp; + + CachedApiData(ApiGatewaySettings settings, ApiKey apiKey, ApiGatewayTenant tenant) { + this.settings = settings; + this.apiKey = apiKey; + this.tenant = tenant; + this.timestamp = System.currentTimeMillis(); } - try { - ApiGatewayApiClient apiClient = new Configuration().getApiGatewayApiClient(); - SmartApiGatewayApi apiInstance = new SmartApiGatewayApi(apiClient); - - ApiKey response = apiInstance.getApiKey(apiKey); - - clientSecret = response.getClientSecret(); - return clientSecret; - - } catch (Exception e) { - System.out.println("クライアントシークレットの取得に失敗しました:"); - System.out.println(" エラータイプ: " + e.getClass().getName()); - System.out.println(" メッセージ: " + e.getMessage()); - e.printStackTrace(); - return null; + boolean isExpired() { + return System.currentTimeMillis() - timestamp > CACHE_DURATION; } } - private static final ObjectMapper objectMapper = new ObjectMapper().registerModule(new JavaTimeModule()); - public static void start(int port) throws IOException { HttpServer server = HttpServer.create(new InetSocketAddress(port), 0); - server.createContext("/", new DynamicHandler()); - server.setExecutor(null); // デフォルトのエグゼキューターを使用 + server.setExecutor(null); server.start(); - - System.out.println("#################### Server is listening on port " + port); + logger.info("Server is listening on port " + port); } static class DynamicHandler implements HttpHandler { private final Map> classCache = new HashMap<>(); private final Map methodCache = new HashMap<>(); - private boolean verifySignature(HttpExchange exchange) { - System.out.println("\n=== 署名検証開始 ==="); - String method = exchange.getRequestMethod(); - String requestHost = exchange.getRequestHeaders().getFirst("Host"); - String rawPath = exchange.getRequestURI().getRawPath(); - String query = exchange.getRequestURI().getRawQuery(); - - System.out.println("検証情報:"); - System.out.println(" Method: " + method); - System.out.println(" Host: " + requestHost); - System.out.println(" Path: " + rawPath); - System.out.println(" Query: " + query); - - // routing type "path"の場合、テナント識別子を除去する必要がある - String adjustedPath = rawPath; - String pathWithQuery = query != null && !query.isEmpty() ? rawPath + "?" + query : rawPath; - - // 初期値として現在のホストとパスを使用 - String verificationPath = requestHost + pathWithQuery; - System.out.println("verificationPath: " + verificationPath); - - // 署名検証候補パスのリスト(スコープを広げるためここで宣言) - List candidateVerificationPaths = new ArrayList<>(); - - System.out.println("\n=== API Gateway設定取得処理 ==="); - - System.out.println("1. ApiGatewayApiClient構築"); - Configuration config = new Configuration(); - ApiGatewayApiClient apiClient = config.getApiGatewayApiClient(); - System.out.println(" ベースURL: " + apiClient.getBasePath()); - System.out.println(" タイムアウト設定: " + apiClient.getReadTimeout() + "ms"); - System.out.println(" 接続タイムアウト: " + apiClient.getConnectTimeout() + "ms"); + private CachedApiData getApiData(String apiKey) throws ApiException { + // キャッシュから取得 + CachedApiData cached = apiDataCache.get(apiKey); + if (cached != null && !cached.isExpired()) { + if (DEBUG) + logger.info("Using cached API data for key: " + apiKey); + return cached; + } - // 環境変数の確認 - System.out.println("\n環境変数確認:"); - System.out.println(" SAASUS_API_KEY: " + (System.getenv("SAASUS_API_KEY") != null ? "設定済み" : "未設定")); - System.out.println(" SAASUS_SECRET_KEY: " + (System.getenv("SAASUS_SECRET_KEY") != null ? "設定済み" : "未設定")); - System.out.println(" SAASUS_SAAS_ID: " + (System.getenv("SAASUS_SAAS_ID") != null ? "設定済み" : "未設定")); + // キャッシュが無効または期限切れの場合、新しいデータを取得 + if (DEBUG) + logger.info("Fetching fresh API data for key: " + apiKey); - System.out.println("\n2. SmartApiGatewayApiインスタンス作成"); + ApiGatewayApiClient apiClient = configuration.getApiGatewayApiClient(); SmartApiGatewayApi apiInstance = new SmartApiGatewayApi(apiClient); - System.out.println("\n3. getApiGatewaySettings呼び出し開始"); - System.out.println(" 呼び出しURL: " + apiClient.getBasePath() + "/api-gateway/settings"); - ApiGatewaySettings settings = null; try { - // API呼び出しの時間計測 - long startTime = System.currentTimeMillis(); - settings = apiInstance.getApiGatewaySettings(); - long endTime = System.currentTimeMillis(); - System.out.println(" API呼び出し完了時間: " + (endTime - startTime) + "ms"); - - if (settings == null) { - System.out.println("❌ API Gateway設定が見つかりません(レスポンスがnull)"); - return false; - } + // 一度に必要なデータを全て取得 + ApiGatewaySettings settings = apiInstance.getApiGatewaySettings(); + ApiKey apiKeyObj = apiInstance.getApiKey(apiKey); + ApiGatewayTenant tenant = apiInstance.getTenant(apiKeyObj.getTenantId()); - System.out.println("✅ API Gateway設定の取得に成功"); - System.out.println("設定内容:"); - String tenantRoutingType = settings.getTenantRoutingType() != null - ? settings.getTenantRoutingType().getValue() - : "null"; - System.out.println(" テナントルーティングタイプ: " + tenantRoutingType); - System.out.println(" RestApiEndpoint: " + settings.getRestApiEndpoint()); - System.out.println(" DomainName: " + settings.getDomainName()); - System.out.println(" CloudFrontDnsRecord: " + - (settings.getCloudFrontDnsRecord() != null ? settings.getCloudFrontDnsRecord().getValue() - : "null")); - System.out - .println(" InternalEndpointHealthCheckPort: " + settings.getInternalEndpointHealthCheckPort()); - - // routing type "path"の場合、テナント識別子をパスから除去 - if ("path".equals(tenantRoutingType)) { - System.out.println("\n=== Routing Type Path 処理 ==="); - System.out.println("元のrawPath: " + rawPath); - - // xApiKeyからテナント情報を取得 - String xApiKey = exchange.getRequestHeaders().getFirst("x-api-key"); - if (xApiKey != null) { - try { - String routingValue = getRoutingValue(xApiKey); - if (routingValue != null && !routingValue.isEmpty()) { - System.out.println("テナントルーティング値: " + routingValue); - - if (rawPath.contains("/" + routingValue + "/")) { - adjustedPath = rawPath.replace("/" + routingValue, ""); - System.out.println("調整後のrawPath: " + adjustedPath); - - // pathWithQueryも更新 - pathWithQuery = query != null && !query.isEmpty() ? adjustedPath + "?" + query - : adjustedPath; - verificationPath = requestHost + pathWithQuery; - System.out.println("調整後のverificationPath: " + verificationPath); - } else { - System.out.println("⚠️ パスにテナントルーティング値が含まれていません"); - } - } - } catch (Exception e) { - System.out.println("⚠️ テナントルーティング値の取得に失敗: " + e.getMessage()); - } - } - } - - // ここで変換後のpathから変換前のpathを取得する - String originalPath = null; - List endpointSettingsList = settings - .getEndpointSettingsList(); - System.out.println("endpoint list: " + endpointSettingsList); - - // 現在のrawPathに対応するEndpointSettingsを検索 - System.out.println("🔍 マッピング検索中:"); - System.out.println(" 検索対象rawPath: '" + adjustedPath + "'"); - for (saasus.sdk.apigateway.models.EndpointSettings endpoint : endpointSettingsList) { - String mappingId = endpoint.getMappingEndpointId(); - System.out.println(" 比較対象mappingEndpointId: '" + mappingId + "'"); - - // adjustedPathから先頭の「/」を除去して比較 - String normalizedRawPath = adjustedPath.startsWith("/") ? adjustedPath.substring(1) : adjustedPath; - System.out.println(" 正規化されたrawPath: '" + normalizedRawPath + "'"); - - if (mappingId.equals(normalizedRawPath) || normalizedRawPath.startsWith(mappingId)) { - originalPath = endpoint.getPath(); - System.out.println("マッピング発見:"); - System.out.println(" 変換後のpath (mappingEndpointId): " + endpoint.getMappingEndpointId()); - System.out.println(" 変換前のpath (path): " + originalPath); - System.out.println(" メソッド: " + endpoint.getMethod().getValue()); - break; - } - } + CachedApiData newData = new CachedApiData(settings, apiKeyObj, tenant); + apiDataCache.put(apiKey, newData); - // 元のパスが見つかった場合、検証パスを更新 - if (originalPath != null) { - String originalPathWithQuery = query != null && !query.isEmpty() ? originalPath + "?" + query - : originalPath; - verificationPath = requestHost + originalPathWithQuery; - System.out.println("元のパスを使用した検証パス: " + verificationPath); - } else { - System.out.println("警告: 変換前のパスが見つかりませんでした。現在のパスを使用します: " + adjustedPath); + return newData; + } catch (ApiException e) { + if (e.getCode() == 404 || e.getCode() == 501) { + logger.warning("API Gateway settings not available: " + e.getMessage()); + return null; } + throw e; + } + } - Integer healthCheckPort = settings.getInternalEndpointHealthCheckPort(); + private boolean verifySignature(HttpExchange exchange, CachedApiData apiData) { + if (DEBUG) + logger.info("Starting signature verification"); - // マッピング後のパスを使用してpathWithQueryを再構築 - String finalPathWithQuery; - if (originalPath != null) { - finalPathWithQuery = query != null && !query.isEmpty() ? originalPath + "?" + query : originalPath; - System.out.println("🔄 マッピング適用後のpathWithQuery: " + finalPathWithQuery); - } else { - finalPathWithQuery = pathWithQuery; - System.out.println("📝 マッピングなし、元のpathWithQueryを使用: " + finalPathWithQuery); - } + String method = exchange.getRequestMethod(); + String requestHost = exchange.getRequestHeaders().getFirst("Host"); + String rawPath = exchange.getRequestURI().getRawPath(); + String query = exchange.getRequestURI().getRawQuery(); + String apiKey = exchange.getRequestHeaders().getFirst("x-api-key"); - // 候補となるホストを取得 - List possibleHosts = new ArrayList<>(); - if (settings.getCloudFrontDnsRecord() != null && settings.getCloudFrontDnsRecord().getValue() != null) { - possibleHosts.add(settings.getCloudFrontDnsRecord().getValue()); - } - if (settings.getRestApiEndpoint() != null) { - possibleHosts.add(settings.getRestApiEndpoint()); - } - if (settings.getDomainName() != null) { - possibleHosts.add(settings.getDomainName()); - } - System.out.println("possibleHosts: " + possibleHosts); - - // 全てのホスト候補で署名検証を試行 - candidateVerificationPaths.add(requestHost + finalPathWithQuery); // 元のリクエストホスト - - for (String host : possibleHosts) { - String candidatePath; - // CloudFrontドメイン、REST API - // エンドポイント、カスタムドメイン(getDomainName)の場合はHTTPSとして扱い、ポート番号を付加しない - if (host.contains(settings.getCloudFrontDnsRecord().getValue()) || - host.contains(settings.getRestApiEndpoint()) || - host.contains(settings.getDomainName())) { - candidatePath = host + finalPathWithQuery; - System.out.println("🌐 HTTPS Endpoint(ポート番号なし): " + candidatePath); - } else { - candidatePath = host + healthCheckPort + finalPathWithQuery; - System.out.println("🔍 内部エンドポイント(ポート番号付き): " + candidatePath); - } - candidateVerificationPaths.add(candidatePath); - } + if (apiData == null || apiData.apiKey.getClientSecret() == null + || apiData.apiKey.getClientSecret().isEmpty()) { + if (DEBUG) + logger.warning("Client secret not available, skipping signature verification"); + return true; + } - System.out.println("📋 署名検証候補パス一覧:"); - for (int i = 0; i < candidateVerificationPaths.size(); i++) { - System.out.println(" " + (i + 1) + ". " + candidateVerificationPaths.get(i)); - } + String adjustedPath = rawPath; + String pathWithQuery = query != null && !query.isEmpty() ? rawPath + "?" + query : rawPath; - } catch (ApiException e) { - System.out.println("❌ API呼び出しでエラー発生:"); - System.out.println(" ステータスコード: " + e.getCode()); - System.out.println(" レスポンスボディ: " + e.getResponseBody()); - System.out.println(" エラーメッセージ: " + e.getMessage()); - - // レスポンスヘッダーの詳細表示 - System.out.println(" レスポンスヘッダー:"); - if (e.getResponseHeaders() != null) { - for (Map.Entry> header : e.getResponseHeaders().entrySet()) { - System.out.println(" " + header.getKey() + ": " + header.getValue()); + // テナントルーティングの処理 + if (apiData.settings != null && "path".equals(apiData.settings.getTenantRoutingType().getValue())) { + if (apiData.tenant != null && apiData.tenant.getRouting() != null) { + String routingValue = apiData.tenant.getRouting().getPath(); + if (routingValue != null && rawPath.contains("/" + routingValue + "/")) { + adjustedPath = rawPath.replace("/" + routingValue, ""); + pathWithQuery = query != null && !query.isEmpty() ? adjustedPath + "?" + query : adjustedPath; + if (DEBUG) + logger.info("Applied tenant routing: " + routingValue); + } else { + if (DEBUG) + logger.info("Tenant routing path '" + routingValue + "' not found in rawPath '" + rawPath + + "', using original path"); } - } else { - System.out.println(" ヘッダー情報なし"); } - - // 詳細なエラー解析 - System.out.println("\n詳細なエラー解析:"); - if (e.getCode() == 401) { - System.out.println(" 🔐 認証エラー: APIキーまたはトークンが無効です"); - System.out.println(" - SAASUS_API_KEY環境変数が正しく設定されているか確認してください"); - System.out.println(" - APIキーの有効期限が切れていないか確認してください"); - return false; - } else if (e.getCode() == 403) { - System.out.println(" 🚫 認可エラー: このリソースへのアクセス権限がありません"); - System.out.println(" - SaaS IDが正しく設定されているか確認してください"); - System.out.println(" - APIキーに適切な権限が付与されているか確認してください"); - return false; - } else if (e.getCode() == 404) { - System.out.println(" 🔍 リソースが見つかりません"); - System.out.println(" - API Gatewayの設定が存在しない可能性があります"); - System.out.println(" ⚠️ エンドポイントマッピングなしで署名検証を続行します"); - } else if (e.getCode() == 500) { - System.out.println(" 🔥 サーバー内部エラー: SaaSus側でエラーが発生しています"); - return false; - } else if (e.getCode() == 501) { - System.out.println(" ⚠️ API Gateway設定が利用できません(501 Not Implemented)"); - System.out.println(" - この機能がまだ実装されていない可能性があります"); - System.out.println(" ⚠️ エンドポイントマッピングなしで署名検証を続行します"); - } else if (e.getCode() == 502 || e.getCode() == 503 || e.getCode() == 504) { - System.out.println(" 🌐 ネットワークエラー: SaaSusサービスへの接続に問題があります"); - System.out.println(" - インターネット接続を確認してください"); - System.out.println(" - ファイアウォール設定を確認してください"); - return false; - } - - System.out.println(" 現在のパスを使用して署名検証を続行: " + rawPath); - e.printStackTrace(); } - // 署名検証のためのホストとパスの組み合わせを確認 - System.out.println("署名検証に使用するホストとパス: " + verificationPath); - - // APIキーを先に取得してclient_secretの有無を確認 - String apiKey = exchange.getRequestHeaders().getFirst("x-api-key"); - System.out.println("\n=== APIキー確認 ==="); - System.out.println("x-api-keyヘッダーの値: " + apiKey); - - try { - clientSecret = fetchClientSecret(apiKey); - System.out.println("client secret: " + clientSecret); - if (clientSecret == null || clientSecret.trim().isEmpty()) { - System.out.println("\n⚠️ クライアントシークレットが利用できません"); - System.out.println("APIキー: " + apiKey); - System.out.println("署名検証をスキップして処理を続行します"); - return true; + // エンドポイントマッピングの確認 + String verificationPath = requestHost + pathWithQuery; + if (apiData.settings != null && apiData.settings.getEndpointSettingsList() != null) { + for (saasus.sdk.apigateway.models.EndpointSettings endpoint : apiData.settings + .getEndpointSettingsList()) { + String normalizedPath = adjustedPath.startsWith("/") ? adjustedPath.substring(1) : adjustedPath; + if (endpoint.getMappingEndpointId().equals(normalizedPath) || + normalizedPath.startsWith(endpoint.getMappingEndpointId())) { + String originalPath = endpoint.getPath(); + String originalPathWithQuery = query != null && !query.isEmpty() ? originalPath + "?" + query + : originalPath; + verificationPath = requestHost + originalPathWithQuery; + break; + } } - System.out.println("✅ クライアントシークレットの取得に成功しました"); - } catch (Exception e) { - System.out.println("⚠️ クライアントシークレット取得中にエラーが発生しました: " + e.getMessage()); - System.out.println("署名検証をスキップして処理を続行します"); - return true; } - System.out.println("\n=== Authorization ヘッダー解析 ==="); + // Authorization ヘッダーの解析 String authHeader = exchange.getRequestHeaders().getFirst("Authorization"); - System.out.println("Authorization ヘッダー: " + authHeader); - if (authHeader == null || authHeader.isEmpty()) { - System.err.println("❌ Authorization ヘッダーが存在しないか空です"); + if (DEBUG) + logger.warning("Authorization header missing"); return false; } Pattern pattern = Pattern.compile("^SAASUSSIGV1 Sig=([^,]+),\\s*APIKey=([^,]+)$"); Matcher matcher = pattern.matcher(authHeader); if (!matcher.matches()) { - System.err.println("❌ Authorization ヘッダーのフォーマットが不正です"); - System.err.println("期待されるフォーマット: SAASUSSIGV1 Sig=,APIKey="); + if (DEBUG) + logger.warning("Invalid Authorization header format"); return false; } String signature = matcher.group(1); String headerApiKey = matcher.group(2); - System.out.println("ヘッダー解析結果:"); - System.out.println(" 署名: " + signature); - System.out.println(" APIキー: " + headerApiKey); - - System.out.println("\nAPIキー検証:"); - System.out.println(" Authorization内のAPIキー: " + headerApiKey); - System.out.println(" x-api-keyヘッダーの値: " + apiKey); - if (!headerApiKey.equals(apiKey)) { - System.err.println("❌ APIキーが一致しません"); + if (DEBUG) + logger.warning("API key mismatch"); return false; } - System.out.println("✅ APIキーの検証成功"); - // 既に上の部分でcandidateVerificationPathsが定義されているので、それを使用 - // フォールバックとして現在のverificationPathが含まれていることを確認 - if (!candidateVerificationPaths.contains(verificationPath)) { - candidateVerificationPaths.add(verificationPath); - System.out.println("🔍 フォールバック用に現在の検証パスを追加: " + verificationPath); - } + // リクエストボディの読み取り + byte[] requestBody = readRequestBody(exchange); + + // 署名検証 + return verifySignatureWithCandidates(verificationPath, signature, apiKey, + apiData.apiKey.getClientSecret(), method, requestBody, apiData.settings); + } - // リクエストボディを事前に読み取り(複数回使用するため) - byte[] requestBody = new byte[0]; + private byte[] readRequestBody(HttpExchange exchange) { try { InputStream is = exchange.getRequestBody(); ByteArrayOutputStream buffer = new ByteArrayOutputStream(); @@ -396,18 +213,39 @@ private boolean verifySignature(HttpExchange exchange) { buffer.write(data, 0, nRead); } buffer.flush(); - requestBody = buffer.toByteArray(); + return buffer.toByteArray(); } catch (IOException e) { - System.out.println("リクエストボディ読み取りエラー: " + e.getMessage()); + if (DEBUG) + logger.warning("Failed to read request body: " + e.getMessage()); + return new byte[0]; + } + } + + private boolean verifySignatureWithCandidates(String primaryPath, String signature, + String apiKey, String clientSecret, String method, byte[] requestBody, + ApiGatewaySettings settings) { + + List candidatePaths = new ArrayList<>(); + candidatePaths.add(primaryPath); + + // 追加の候補パスを生成 + if (settings != null) { + String pathPart = primaryPath.substring(primaryPath.indexOf("/")); + if (settings.getCloudFrontDnsRecord() != null) { + candidatePaths.add(settings.getCloudFrontDnsRecord().getValue() + pathPart); + } + if (settings.getRestApiEndpoint() != null) { + candidatePaths.add(settings.getRestApiEndpoint() + pathPart); + } + if (settings.getDomainName() != null) { + candidatePaths.add(settings.getDomainName() + pathPart); + } } Date now = new Date(); int timeWindow = 1; - // 全ての候補パスで署名検証を試行 - for (String candidatePath : candidateVerificationPaths) { - System.out.println("\n🎯 候補パスでの署名検証: " + candidatePath); - + for (String candidatePath : candidatePaths) { for (int i = -timeWindow; i <= timeWindow; i++) { Calendar cal = Calendar.getInstance(); cal.setTime(now); @@ -419,16 +257,11 @@ private boolean verifySignature(HttpExchange exchange) { String timestamp = sdf.format(adjustedTime); try { - System.out.println( - "\n=== 署名計算(パス: " + candidatePath.substring(0, Math.min(50, candidatePath.length())) - + "..., タイムスタンプ: " + timestamp + ")==="); - Mac mac = Mac.getInstance("HmacSHA256"); SecretKeySpec keySpec = new SecretKeySpec(clientSecret.getBytes(StandardCharsets.UTF_8), "HmacSHA256"); mac.init(keySpec); - // 署名計算 mac.update(timestamp.getBytes(StandardCharsets.UTF_8)); mac.update(apiKey.getBytes(StandardCharsets.UTF_8)); mac.update(method.toUpperCase().getBytes(StandardCharsets.UTF_8)); @@ -439,39 +272,28 @@ private boolean verifySignature(HttpExchange exchange) { } String calculatedSignature = bytesToHex(mac.doFinal()); - System.out.println(" 🔍 署名計算詳細:"); - System.out.println(" タイムスタンプ: '" + timestamp + "'"); - System.out.println(" APIキー: '" + apiKey + "'"); - System.out.println(" メソッド: '" + method.toUpperCase() + "'"); - System.out.println(" 候補パス: '" + candidatePath + "'"); - System.out.println(" リクエストボディ長: " + requestBody.length); - System.out.println(" 期待される署名: " + signature); - System.out.println(" 計算された署名: " + calculatedSignature); - - // 実際のクライアントリクエストと一致する候補パスの場合、追加情報を表示 - if (candidatePath.equals( - "https://1xp91qxmeh.execute-api.ap-northeast-1.amazonaws.com/prod/inventory-service/get-inventory?xApiKey=d296b330-3cce-40b6-88c3ls")) { - System.out.println(" 🎯 クライアントリクエストと一致する候補パス!"); - System.out.println(" 💡 クライアント側で使用すべき署名計算パラメータ:"); - System.out.println(" TIMESTAMP=" + timestamp); - System.out.println(" API_KEY=" + apiKey); - System.out.println(" METHOD=" + method.toUpperCase()); - System.out.println(" PATH=" + candidatePath); + + if (DEBUG) { + logger.info("Signature check - Path: " + candidatePath + + ", Timestamp: " + timestamp + + ", Expected: " + signature + + ", Calculated: " + calculatedSignature); } if (calculatedSignature.equals(signature)) { - System.out.println("\n🎉 署名検証成功!"); - System.out.println(" ✅ 成功したパス: " + candidatePath); - System.out.println(" ✅ タイムスタンプ: " + timestamp); + if (DEBUG) + logger.info("Signature verification successful"); return true; } } catch (Exception e) { - System.out.println("署名計算エラー: " + e.getMessage()); + if (DEBUG) + logger.warning("Signature calculation error: " + e.getMessage()); } } } - System.err.println("❌ 全ての候補パスで署名検証に失敗しました"); + if (DEBUG) + logger.warning("Signature verification failed for all candidates"); return false; } @@ -491,10 +313,18 @@ public void handle(HttpExchange exchange) throws IOException { return; } - if (!verifySignature(exchange)) { + CachedApiData apiData = null; + try { + apiData = getApiData(apiKey); + } catch (Exception e) { + logger.log(Level.WARNING, "Failed to get API data", e); + } + + if (!verifySignature(exchange, apiData)) { sendResponse(exchange, 401, "{\"message\": \"Invalid signature\"}"); return; } + String path = exchange.getRequestURI().getPath(); String[] pathParts = path.split("/"); @@ -503,125 +333,63 @@ public void handle(HttpExchange exchange) throws IOException { return; } - System.out.println("Path parts: " + String.join(", ", pathParts)); - // set default value String className = pathParts[1]; String methodName = pathParts[2]; - // custom routing - String routingValue = null; - try { - routingValue = getRoutingValue(apiKey); - System.out.println("Routing value: " + routingValue); - } catch (ApiException e) { - System.out.println("API Error: " + e.getMessage()); - e.printStackTrace(); - sendResponse(exchange, 500, "API Error: " + e.getMessage()); - return; - } catch (Exception e) { - System.out.println("Error getting routing value: " + e.getMessage()); - e.printStackTrace(); - sendResponse(exchange, 500, "Error getting routing value: " + e.getMessage()); - return; - } - - // routing is required - if (routingValue != null && !routingValue.isEmpty()) { - System.out.println("Routing value found: " + routingValue); - - if (path.contains("/" + routingValue + "/")) { - // パスからルーティング値を削除して再分割 - String newPath = path.replace("/" + routingValue, ""); - String[] newPathParts = newPath.split("/"); - - if (newPathParts.length >= 3) { - className = newPathParts[1]; - methodName = newPathParts[2]; - System.out.println("Updated class name: " + className + ", method name: " + methodName); + // ルーティング処理の統合 + if (apiData != null && apiData.tenant != null && apiData.tenant.getRouting() != null) { + String routingValue = apiData.tenant.getRouting().getPath(); + if (routingValue != null && !routingValue.isEmpty()) { + // パスにルーティング値が含まれている場合のみルーティング処理を適用 + if (path.contains("/" + routingValue + "/")) { + String newPath = path.replace("/" + routingValue, ""); + String[] newPathParts = newPath.split("/"); + if (newPathParts.length >= 3) { + className = newPathParts[1]; + methodName = newPathParts[2]; + } else { + sendResponse(exchange, 400, "Invalid path after routing: " + newPath); + return; + } } else { - sendResponse(exchange, 400, "Invalid path after routing: " + newPath); - return; + // API Gatewayやプロキシ経由のリクエストの場合、 + // テナントルーティングを適用せずに直接処理 + if (DEBUG) { + logger.info("Routing path '" + routingValue + "' not found in URL '" + path + + "', proceeding without tenant routing"); + } + // 現在のpathPartsをそのまま使用(className, methodNameは既に設定済み) } - } else { - // routing value not found in URL - sendResponse(exchange, 403, - "Access denied: Required routing path '" + routingValue + "' not found in URL"); - return; - } - } else { - if (pathParts.length >= 3) { - className = pathParts[1]; - methodName = pathParts[2]; - System.out.println("class: " - + className + ", method: " + methodName); - } else { - sendResponse(exchange, 400, "Invalid path format. Expected /routing/ClassName/methodName"); - return; } } Map queryParams = parseQueryParams(exchange.getRequestURI()); try { - System.out.println("\n=== デバッグ: メソッド呼び出し開始 ==="); - System.out.println("クラス名: " + className); - System.out.println("メソッド名: " + methodName); - System.out.println("クエリパラメータ: " + queryParams); + if (DEBUG) { + logger.info("Invoking method - Class: " + className + ", Method: " + methodName); + } Class clazz = getClass(className); - System.out.println("✅ クラス解決成功: " + clazz.getName()); - Method method = getMethod(clazz, methodName); - System.out.println("取得されたメソッド: " + method); if (method != null) { - System.out.println("✅ メソッド解決成功: " + method.toString()); - System.out.println("メソッドパラメータ数: " + method.getParameterCount()); - - // パラメータ詳細を表示 - Parameter[] parameters = method.getParameters(); - for (int i = 0; i < parameters.length; i++) { - System.out.println(" パラメータ" + i + ": " + parameters[i].getName() + - " (型: " + parameters[i].getType().getSimpleName() + ")"); - } - - System.out.println("\n--- 引数準備開始 ---"); Object[] args = prepareMethodArguments(method, queryParams); - System.out.println("✅ 引数準備完了"); - System.out.println("準備された引数数: " + args.length); - for (int i = 0; i < args.length; i++) { - System.out.println(" 引数" + i + ": " + args[i] + " (型: " + - (args[i] != null ? args[i].getClass().getSimpleName() : "null") + ")"); - } - - System.out.println("\n--- メソッド実行開始 ---"); Object response = method.invoke(null, args); - System.out.println("✅ メソッド実行完了"); - System.out.println("レスポンス: " + response + " (型: " + - (response != null ? response.getClass().getSimpleName() : "null") + ")"); - - System.out.println("\n--- JSON変換開始 ---"); String jsonResponse = objectMapper.writeValueAsString(response); - System.out.println("✅ JSON変換完了"); - System.out.println("JSONレスポンス: " + jsonResponse); - sendResponse(exchange, 200, jsonResponse); - System.out.println("✅ レスポンス送信完了"); } else { - System.out.println("❌ メソッドが見つかりません: " + methodName); sendResponse(exchange, 404, "Method not found: " + methodName); } } catch (ClassNotFoundException e) { - e.printStackTrace(); sendResponse(exchange, 404, "Class not found: " + className); } catch (InvocationTargetException | IllegalAccessException e) { - e.printStackTrace(); + logger.log(Level.SEVERE, "Error invoking method", e); sendResponse(exchange, 500, "Error invoking method: " + e.getMessage()); } catch (IllegalArgumentException e) { - e.printStackTrace(); sendResponse(exchange, 400, "Invalid arguments: " + e.getMessage()); } catch (Exception e) { - e.printStackTrace(); + logger.log(Level.SEVERE, "Internal server error", e); sendResponse(exchange, 500, "Internal server error: " + e.getMessage()); } } @@ -656,7 +424,9 @@ private Map parseQueryParams(URI uri) { String[] pairs = query.split("&"); for (String pair : pairs) { int idx = pair.indexOf("="); - queryParams.put(pair.substring(0, idx), pair.substring(idx + 1)); + if (idx > 0) { + queryParams.put(pair.substring(0, idx), pair.substring(idx + 1)); + } } } return queryParams; @@ -704,62 +474,6 @@ private void sendResponse(HttpExchange exchange, int statusCode, String response os.write(responseBytes); } } - - private String getRoutingValue(String apiKey) throws ApiException { - ApiGatewayApiClient apiClient = new Configuration().getApiGatewayApiClient(); - SmartApiGatewayApi apiInstance = new SmartApiGatewayApi(apiClient); - - ApiGatewaySettings settings = apiInstance.getApiGatewaySettings(); - if (settings == null) { - System.out.println("API Gateway Settings not found"); - throw new ApiException("API Gateway Settings not found"); - } - - String tenantRoutingType = settings.getTenantRoutingType().getValue(); - if (tenantRoutingType == null || tenantRoutingType.isEmpty()) { - System.out.println("Tenant Routing Type not found"); - throw new ApiException("Tenant Routing Type not found"); - } - - // APIキーからテナント情報を取得(全ルーティングタイプで必要) - ApiKey apiKeyObj = apiInstance.getApiKey(apiKey); - if (apiKeyObj == null) { - System.out.println("API Key not found: " + apiKey); - throw new ApiException("API Key not found: " + apiKey); - } - - // テナント設定情報を取得 - ApiGatewayTenant tenant = apiInstance.getTenant(apiKeyObj.getTenantId()); - if (tenant == null) { - System.out.println("Tenant not found for ID: " + apiKeyObj.getTenantId()); - throw new ApiException("Tenant not found for ID: " + apiKeyObj.getTenantId()); - } - - TenantRouting routing = tenant.getRouting(); - if (routing == null) { - System.out.println("Routing not found for tenant: " + apiKeyObj.getTenantId()); - throw new ApiException("Routing not found for tenant: " + apiKeyObj.getTenantId()); - } - switch (tenantRoutingType.toLowerCase()) { - case "none": - System.out.println("Tenant Routing Type is none"); - return null; - case "path": - System.out.println("Tenant Routing Type is path"); - return routing.getPath(); - case "hostname": - System.out.println("Tenant Routing Type is hostname"); - // not implemented - return null; - case "headervalue": - System.out.println("Tenant Routing Type is headervalue"); - // not implemented - return null; - default: - throw new ApiException("Invalid tenantRoutingType: " + tenantRoutingType); - } - } - } public static class UserApi { From b3f6e06f6b3a648bd6c5f1d668374611a31940e5 Mon Sep 17 00:00:00 2001 From: takashi-uchida Date: Mon, 2 Jun 2025 20:18:35 +0900 Subject: [PATCH 15/28] =?UTF-8?q?fix:=20=E3=83=AA=E3=82=AF=E3=82=A8?= =?UTF-8?q?=E3=82=B9=E3=83=88=E3=83=9C=E3=83=87=E3=82=A3=E3=81=AE=E8=AA=AD?= =?UTF-8?q?=E3=81=BF=E5=8F=96=E3=82=8A=E5=87=A6=E7=90=86=E3=82=92=E6=94=B9?= =?UTF-8?q?=E5=96=84=E3=81=97=E3=80=81=E3=83=AA=E3=82=BD=E3=83=BC=E3=82=B9?= =?UTF-8?q?=E3=81=AE=E8=87=AA=E5=8B=95=E3=82=AF=E3=83=AD=E3=83=BC=E3=82=BA?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/saasus/sdk/util/apiserver/ApiServer.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/saasus/sdk/util/apiserver/ApiServer.java b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java index fbc34ae6..0b3c8a40 100644 --- a/src/main/java/saasus/sdk/util/apiserver/ApiServer.java +++ b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java @@ -204,9 +204,8 @@ private boolean verifySignature(HttpExchange exchange, CachedApiData apiData) { } private byte[] readRequestBody(HttpExchange exchange) { - try { - InputStream is = exchange.getRequestBody(); - ByteArrayOutputStream buffer = new ByteArrayOutputStream(); + try (InputStream is = exchange.getRequestBody(); + ByteArrayOutputStream buffer = new ByteArrayOutputStream()) { int nRead; byte[] data = new byte[16384]; while ((nRead = is.read(data, 0, data.length)) != -1) { From b9097a0dbfef7a0403de96c6d4fbffbe815d6a30 Mon Sep 17 00:00:00 2001 From: takashi-uchida Date: Fri, 13 Jun 2025 06:02:59 +0900 Subject: [PATCH 16/28] =?UTF-8?q?feat:=20=E3=82=A8=E3=83=B3=E3=83=89?= =?UTF-8?q?=E3=83=9D=E3=82=A4=E3=83=B3=E3=83=88=E3=83=9E=E3=83=83=E3=83=94?= =?UTF-8?q?=E3=83=B3=E3=82=B0=E3=81=A8=E5=80=99=E8=A3=9C=E3=83=91=E3=82=B9?= =?UTF-8?q?=E7=94=9F=E6=88=90=E3=81=AB=E5=AE=8C=E5=85=A8=E3=81=AAURL?= =?UTF-8?q?=E5=BD=A2=E5=BC=8F=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../saasus/sdk/util/apiserver/ApiServer.java | 34 ++++++++++++------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/src/main/java/saasus/sdk/util/apiserver/ApiServer.java b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java index 0b3c8a40..4a089049 100644 --- a/src/main/java/saasus/sdk/util/apiserver/ApiServer.java +++ b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java @@ -153,8 +153,8 @@ private boolean verifySignature(HttpExchange exchange, CachedApiData apiData) { } } - // エンドポイントマッピングの確認 - String verificationPath = requestHost + pathWithQuery; + // エンドポイントマッピングの確認(プロトコルを含む完全なURL形式) + String verificationPath = "https://" + requestHost + pathWithQuery; if (apiData.settings != null && apiData.settings.getEndpointSettingsList() != null) { for (saasus.sdk.apigateway.models.EndpointSettings endpoint : apiData.settings .getEndpointSettingsList()) { @@ -164,7 +164,7 @@ private boolean verifySignature(HttpExchange exchange, CachedApiData apiData) { String originalPath = endpoint.getPath(); String originalPathWithQuery = query != null && !query.isEmpty() ? originalPath + "?" + query : originalPath; - verificationPath = requestHost + originalPathWithQuery; + verificationPath = "https://" + requestHost + originalPathWithQuery; break; } } @@ -224,27 +224,36 @@ private boolean verifySignatureWithCandidates(String primaryPath, String signatu String apiKey, String clientSecret, String method, byte[] requestBody, ApiGatewaySettings settings) { - List candidatePaths = new ArrayList<>(); - candidatePaths.add(primaryPath); + List candidateUrls = new ArrayList<>(); + candidateUrls.add(primaryPath); - // 追加の候補パスを生成 + // 追加の候補URLを生成(プロトコルを含む完全なURL形式) if (settings != null) { String pathPart = primaryPath.substring(primaryPath.indexOf("/")); if (settings.getCloudFrontDnsRecord() != null) { - candidatePaths.add(settings.getCloudFrontDnsRecord().getValue() + pathPart); + String cloudFrontUrl = settings.getCloudFrontDnsRecord().getValue(); + if (!cloudFrontUrl.startsWith("http://") && !cloudFrontUrl.startsWith("https://")) { + cloudFrontUrl = "https://" + cloudFrontUrl; + } + candidateUrls.add(cloudFrontUrl + pathPart); } if (settings.getRestApiEndpoint() != null) { - candidatePaths.add(settings.getRestApiEndpoint() + pathPart); + // rest_api_endpointは既にhttps://を含んでいる + candidateUrls.add(settings.getRestApiEndpoint() + pathPart); } if (settings.getDomainName() != null) { - candidatePaths.add(settings.getDomainName() + pathPart); + String domainUrl = settings.getDomainName(); + if (!domainUrl.startsWith("http://") && !domainUrl.startsWith("https://")) { + domainUrl = "https://" + domainUrl; + } + candidateUrls.add(domainUrl + pathPart); } } Date now = new Date(); int timeWindow = 1; - for (String candidatePath : candidatePaths) { + for (String candidateUrl : candidateUrls) { for (int i = -timeWindow; i <= timeWindow; i++) { Calendar cal = Calendar.getInstance(); cal.setTime(now); @@ -261,10 +270,11 @@ private boolean verifySignatureWithCandidates(String primaryPath, String signatu "HmacSHA256"); mac.init(keySpec); + // 署名=日時情報+API Key+HTTPメソッド+URL(Host:Port/URI)+Request Body mac.update(timestamp.getBytes(StandardCharsets.UTF_8)); mac.update(apiKey.getBytes(StandardCharsets.UTF_8)); mac.update(method.toUpperCase().getBytes(StandardCharsets.UTF_8)); - mac.update(candidatePath.getBytes(StandardCharsets.UTF_8)); + mac.update(candidateUrl.getBytes(StandardCharsets.UTF_8)); if (requestBody.length > 0) { mac.update(requestBody); @@ -273,7 +283,7 @@ private boolean verifySignatureWithCandidates(String primaryPath, String signatu String calculatedSignature = bytesToHex(mac.doFinal()); if (DEBUG) { - logger.info("Signature check - Path: " + candidatePath + + logger.info("Signature check - URL: " + candidateUrl + ", Timestamp: " + timestamp + ", Expected: " + signature + ", Calculated: " + calculatedSignature); From c457fbb4e79dad2a7d2f7254cfab1fba80ca3304 Mon Sep 17 00:00:00 2001 From: takashi-uchida Date: Fri, 13 Jun 2025 07:52:59 +0900 Subject: [PATCH 17/28] Update API Gateway models and add draft settings functionality - Updated the generated date in multiple model classes to reflect the latest changes. - Removed the internalEndpointMappingFileDownloadUrl property from ApiGatewaySettings. - Added mcpServerUrl property to ApiGatewaySettings with corresponding getter, setter, and validation. - Introduced DraftApiGatewaySettings model to handle draft configuration information. - Implemented methods to apply and retrieve draft settings in SmartApiGatewayApi. - Added unit tests for new DraftApiGatewaySettings model and updated existing tests for ApiGatewaySettings. - Enhanced logging in ApiServer for better debugging of API key retrieval and signature verification. --- docs/apigateway/ApiGatewaySettings.md | 2 +- docs/apigateway/DraftApiGatewaySettings.md | 14 + docs/apigateway/SmartApiGatewayApi.md | 129 +++++++ .../saasus/sdk/apigateway/ApiException.java | 2 +- .../saasus/sdk/apigateway/Configuration.java | 2 +- src/main/java/saasus/sdk/apigateway/JSON.java | 1 + src/main/java/saasus/sdk/apigateway/Pair.java | 2 +- .../saasus/sdk/apigateway/StringUtil.java | 2 +- .../apigateway/api/SmartApiGatewayApi.java | 231 ++++++++++++ .../sdk/apigateway/auth/ApiKeyAuth.java | 2 +- .../sdk/apigateway/auth/HttpBearerAuth.java | 2 +- .../models/AbstractOpenApiSchema.java | 2 +- .../models/ApiGatewayInputFile.java | 2 +- .../apigateway/models/ApiGatewaySettings.java | 66 ++-- .../apigateway/models/ApiGatewayTenant.java | 2 +- .../saasus/sdk/apigateway/models/ApiKey.java | 2 +- .../saasus/sdk/apigateway/models/ApiKeys.java | 2 +- .../models/CloudFormationLaunchStackLink.java | 2 +- .../apigateway/models/CreateApiKeyParam.java | 2 +- .../sdk/apigateway/models/DnsRecord.java | 2 +- .../models/DraftApiGatewaySettings.java | 337 ++++++++++++++++++ .../apigateway/models/EndpointSettings.java | 2 +- .../saasus/sdk/apigateway/models/Error.java | 2 +- .../sdk/apigateway/models/TenantRouting.java | 2 +- .../sdk/apigateway/models/Throttling.java | 2 +- .../models/UpdateApiGatewaySettingsParam.java | 2 +- .../models/UpdateOpenApiDefinitionParam.java | 2 +- .../apigateway/models/UpdateTenantParam.java | 2 +- .../saasus/sdk/util/apiserver/ApiServer.java | 16 +- .../api/SmartApiGatewayApiTest.java | 27 ++ .../models/ApiGatewaySettingsTest.java | 16 +- .../models/DraftApiGatewaySettingsTest.java | 59 +++ 32 files changed, 874 insertions(+), 66 deletions(-) create mode 100644 docs/apigateway/DraftApiGatewaySettings.md create mode 100644 src/main/java/saasus/sdk/apigateway/models/DraftApiGatewaySettings.java create mode 100644 src/test/java/saasus/sdk/apigateway/models/DraftApiGatewaySettingsTest.java diff --git a/docs/apigateway/ApiGatewaySettings.md b/docs/apigateway/ApiGatewaySettings.md index 9fb6d962..5c682356 100644 --- a/docs/apigateway/ApiGatewaySettings.md +++ b/docs/apigateway/ApiGatewaySettings.md @@ -9,7 +9,6 @@ |------------ | ------------- | ------------- | -------------| |**generatedFileStatus** | **String** | Status of automatically generated files | | |**internalEndpointOpenapiDefinitionFileDownloadUrl** | **String** | URL to download the auto-generated openapi definition file, which will be used to build the API Gateway. | | -|**internalEndpointMappingFileDownloadUrl** | **String** | The download URL for the auto-generated internal endpoint mapping file, which will be used to build the API Gateway. | | |**status** | **String** | API Gateway creation status | | |**roleArn** | **String** | ARN of the role for SaaSus Platform to AssumeRole | | |**roleExternalId** | **String** | External id used by SaaSus when AssumeRole to operate SaaS | | @@ -30,6 +29,7 @@ |**endpointSettingsList** | [**List<EndpointSettings>**](EndpointSettings.md) | Endpoint Settings List | | |**tenantRoutingType** | **TenantRoutingType** | | | |**docsCloudFrontFqdn** | **String** | CloudFront FQDN for Smart API Gateway Documentation | | +|**mcpServerUrl** | **String** | URL of the MCP (Model Context Protocol) server for Smart API Gateway | | diff --git a/docs/apigateway/DraftApiGatewaySettings.md b/docs/apigateway/DraftApiGatewaySettings.md new file mode 100644 index 00000000..551f5233 --- /dev/null +++ b/docs/apigateway/DraftApiGatewaySettings.md @@ -0,0 +1,14 @@ + + +# DraftApiGatewaySettings + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**internalEndpointOpenapiDefinitionFileDownloadUrl** | **String** | URL to download the auto-generated openapi definition file, which will be used to build the API Gateway. | [optional] | +|**endpointSettingsList** | [**List<EndpointSettings>**](EndpointSettings.md) | Endpoint Settings List | | + + + diff --git a/docs/apigateway/SmartApiGatewayApi.md b/docs/apigateway/SmartApiGatewayApi.md index ccface76..a7351914 100644 --- a/docs/apigateway/SmartApiGatewayApi.md +++ b/docs/apigateway/SmartApiGatewayApi.md @@ -4,12 +4,14 @@ All URIs are relative to *https://api.saasus.io/v1/apigateway* | Method | HTTP request | Description | |------------- | ------------- | -------------| +| [**applyDraftApiGatewaySettings**](SmartApiGatewayApi.md#applyDraftApiGatewaySettings) | **POST** /draft/settings/apply | Apply draft configuration information for Smart API Gateway function | | [**createApiGateway**](SmartApiGatewayApi.md#createApiGateway) | **POST** /create | Create the API Gateway | | [**createApiKey**](SmartApiGatewayApi.md#createApiKey) | **POST** /api-keys | Create an API key | | [**getApiGatewaySettings**](SmartApiGatewayApi.md#getApiGatewaySettings) | **GET** /settings | Obtain configuration information for api gateway function | | [**getApiKey**](SmartApiGatewayApi.md#getApiKey) | **GET** /api-keys/{api_key} | get API key details by API key | | [**getApiKeys**](SmartApiGatewayApi.md#getApiKeys) | **GET** /api-keys | API key list or get API key by condition | | [**getCloudFormationLaunchStackLink**](SmartApiGatewayApi.md#getCloudFormationLaunchStackLink) | **GET** /cloudformation-launch-stack-link | Get the link to create the AWS CloudFormation stack | +| [**getDraftApiGatewaySettings**](SmartApiGatewayApi.md#getDraftApiGatewaySettings) | **GET** /draft/settings | Obtain draft configuration information for Smart API Gateway function | | [**getTenant**](SmartApiGatewayApi.md#getTenant) | **GET** /tenants/{tenant_id} | Get tenant information | | [**publishApiGateway**](SmartApiGatewayApi.md#publishApiGateway) | **POST** /publish | Publish the API Gateway | | [**refreshClientSecret**](SmartApiGatewayApi.md#refreshClientSecret) | **POST** /api-keys/{api_key}/client-secret | Update the client secret of the API key | @@ -20,6 +22,69 @@ All URIs are relative to *https://api.saasus.io/v1/apigateway* | [**uploadGenerationFiles**](SmartApiGatewayApi.md#uploadGenerationFiles) | **POST** /upload | Upload files to create an API Gateway | + +# **applyDraftApiGatewaySettings** +> applyDraftApiGatewaySettings() + +Apply draft configuration information for Smart API Gateway function + +Apply draft configuration information for Smart API Gateway function. This applies the changes made in the draft settings to the actual Smart API Gateway. + +### Example +```java +// Import classes: +import saasus.sdk.apigateway.ApiClient; +import saasus.sdk.apigateway.ApiException; +import saasus.sdk.apigateway.Configuration; +import saasus.sdk.apigateway.auth.*; +import saasus.sdk.apigateway.models.*; +import saasus.sdk.apigateway.api.SmartApiGatewayApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.saasus.io/v1/apigateway"); + + // Configure HTTP bearer authorization: Bearer + HttpBearerAuth Bearer = (HttpBearerAuth) defaultClient.getAuthentication("Bearer"); + Bearer.setBearerToken("BEARER TOKEN"); + + SmartApiGatewayApi apiInstance = new SmartApiGatewayApi(defaultClient); + try { + apiInstance.applyDraftApiGatewaySettings(); + } catch (ApiException e) { + System.err.println("Exception when calling SmartApiGatewayApi#applyDraftApiGatewaySettings"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +null (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **500** | Internal Server Error | - | + # **createApiGateway** > createApiGateway() @@ -421,6 +486,70 @@ This endpoint does not need any parameter. | **200** | OK | - | | **500** | Internal Server Error | - | + +# **getDraftApiGatewaySettings** +> DraftApiGatewaySettings getDraftApiGatewaySettings() + +Obtain draft configuration information for Smart API Gateway function + +Obtain draft configuration information for Smart API Gateway function. You can check the settings generated from the uploaded source code before applying them. + +### Example +```java +// Import classes: +import saasus.sdk.apigateway.ApiClient; +import saasus.sdk.apigateway.ApiException; +import saasus.sdk.apigateway.Configuration; +import saasus.sdk.apigateway.auth.*; +import saasus.sdk.apigateway.models.*; +import saasus.sdk.apigateway.api.SmartApiGatewayApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.saasus.io/v1/apigateway"); + + // Configure HTTP bearer authorization: Bearer + HttpBearerAuth Bearer = (HttpBearerAuth) defaultClient.getAuthentication("Bearer"); + Bearer.setBearerToken("BEARER TOKEN"); + + SmartApiGatewayApi apiInstance = new SmartApiGatewayApi(defaultClient); + try { + DraftApiGatewaySettings result = apiInstance.getDraftApiGatewaySettings(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SmartApiGatewayApi#getDraftApiGatewaySettings"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**DraftApiGatewaySettings**](DraftApiGatewaySettings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **500** | Internal Server Error | - | + # **getTenant** > ApiGatewayTenant getTenant(tenantId) diff --git a/src/main/java/saasus/sdk/apigateway/ApiException.java b/src/main/java/saasus/sdk/apigateway/ApiException.java index 9f81dd44..cd13ec1e 100644 --- a/src/main/java/saasus/sdk/apigateway/ApiException.java +++ b/src/main/java/saasus/sdk/apigateway/ApiException.java @@ -21,7 +21,7 @@ *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; diff --git a/src/main/java/saasus/sdk/apigateway/Configuration.java b/src/main/java/saasus/sdk/apigateway/Configuration.java index 539a810d..8da7739f 100644 --- a/src/main/java/saasus/sdk/apigateway/Configuration.java +++ b/src/main/java/saasus/sdk/apigateway/Configuration.java @@ -13,7 +13,7 @@ package saasus.sdk.apigateway; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") public class Configuration { public static final String VERSION = "1.0.0"; diff --git a/src/main/java/saasus/sdk/apigateway/JSON.java b/src/main/java/saasus/sdk/apigateway/JSON.java index 70886329..1a9427ef 100644 --- a/src/main/java/saasus/sdk/apigateway/JSON.java +++ b/src/main/java/saasus/sdk/apigateway/JSON.java @@ -101,6 +101,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new saasus.sdk.apigateway.models.CloudFormationLaunchStackLink.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new saasus.sdk.apigateway.models.CreateApiKeyParam.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new saasus.sdk.apigateway.models.DnsRecord.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new saasus.sdk.apigateway.models.DraftApiGatewaySettings.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new saasus.sdk.apigateway.models.EndpointSettings.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new saasus.sdk.apigateway.models.Error.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new saasus.sdk.apigateway.models.TenantRouting.CustomTypeAdapterFactory()); diff --git a/src/main/java/saasus/sdk/apigateway/Pair.java b/src/main/java/saasus/sdk/apigateway/Pair.java index d336496b..d425353b 100644 --- a/src/main/java/saasus/sdk/apigateway/Pair.java +++ b/src/main/java/saasus/sdk/apigateway/Pair.java @@ -13,7 +13,7 @@ package saasus.sdk.apigateway; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") public class Pair { private String name = ""; private String value = ""; diff --git a/src/main/java/saasus/sdk/apigateway/StringUtil.java b/src/main/java/saasus/sdk/apigateway/StringUtil.java index 94adcefa..4114f1fe 100644 --- a/src/main/java/saasus/sdk/apigateway/StringUtil.java +++ b/src/main/java/saasus/sdk/apigateway/StringUtil.java @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/saasus/sdk/apigateway/api/SmartApiGatewayApi.java b/src/main/java/saasus/sdk/apigateway/api/SmartApiGatewayApi.java index 38984695..517b14e0 100644 --- a/src/main/java/saasus/sdk/apigateway/api/SmartApiGatewayApi.java +++ b/src/main/java/saasus/sdk/apigateway/api/SmartApiGatewayApi.java @@ -34,6 +34,7 @@ import saasus.sdk.apigateway.models.ApiKeys; import saasus.sdk.apigateway.models.CloudFormationLaunchStackLink; import saasus.sdk.apigateway.models.CreateApiKeyParam; +import saasus.sdk.apigateway.models.DraftApiGatewaySettings; import saasus.sdk.apigateway.models.Error; import saasus.sdk.apigateway.models.UpdateApiGatewaySettingsParam; import saasus.sdk.apigateway.models.UpdateOpenApiDefinitionParam; @@ -82,6 +83,119 @@ public void setCustomBaseUrl(String customBaseUrl) { this.localCustomBaseUrl = customBaseUrl; } + /** + * Build call for applyDraftApiGatewaySettings + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public okhttp3.Call applyDraftApiGatewaySettingsCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/draft/settings/apply"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "Bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call applyDraftApiGatewaySettingsValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return applyDraftApiGatewaySettingsCall(_callback); + + } + + /** + * Apply draft configuration information for Smart API Gateway function + * Apply draft configuration information for Smart API Gateway function. This applies the changes made in the draft settings to the actual Smart API Gateway. + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public void applyDraftApiGatewaySettings() throws ApiException { + applyDraftApiGatewaySettingsWithHttpInfo(); + } + + /** + * Apply draft configuration information for Smart API Gateway function + * Apply draft configuration information for Smart API Gateway function. This applies the changes made in the draft settings to the actual Smart API Gateway. + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public ApiResponse applyDraftApiGatewaySettingsWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = applyDraftApiGatewaySettingsValidateBeforeCall(null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Apply draft configuration information for Smart API Gateway function (asynchronously) + * Apply draft configuration information for Smart API Gateway function. This applies the changes made in the draft settings to the actual Smart API Gateway. + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public okhttp3.Call applyDraftApiGatewaySettingsAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = applyDraftApiGatewaySettingsValidateBeforeCall(_callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } /** * Build call for createApiGateway * @param _callback Callback for upload/download progress @@ -832,6 +946,123 @@ public okhttp3.Call getCloudFormationLaunchStackLinkAsync(final ApiCallback + Status Code Description Response Headers + 200 OK - + 500 Internal Server Error - + + */ + public okhttp3.Call getDraftApiGatewaySettingsCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/draft/settings"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "Bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getDraftApiGatewaySettingsValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return getDraftApiGatewaySettingsCall(_callback); + + } + + /** + * Obtain draft configuration information for Smart API Gateway function + * Obtain draft configuration information for Smart API Gateway function. You can check the settings generated from the uploaded source code before applying them. + * @return DraftApiGatewaySettings + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public DraftApiGatewaySettings getDraftApiGatewaySettings() throws ApiException { + ApiResponse localVarResp = getDraftApiGatewaySettingsWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Obtain draft configuration information for Smart API Gateway function + * Obtain draft configuration information for Smart API Gateway function. You can check the settings generated from the uploaded source code before applying them. + * @return ApiResponse<DraftApiGatewaySettings> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public ApiResponse getDraftApiGatewaySettingsWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getDraftApiGatewaySettingsValidateBeforeCall(null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Obtain draft configuration information for Smart API Gateway function (asynchronously) + * Obtain draft configuration information for Smart API Gateway function. You can check the settings generated from the uploaded source code before applying them. + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public okhttp3.Call getDraftApiGatewaySettingsAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getDraftApiGatewaySettingsValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for getTenant * @param tenantId Tenant ID (required) diff --git a/src/main/java/saasus/sdk/apigateway/auth/ApiKeyAuth.java b/src/main/java/saasus/sdk/apigateway/auth/ApiKeyAuth.java index 36c6d618..83ece22b 100644 --- a/src/main/java/saasus/sdk/apigateway/auth/ApiKeyAuth.java +++ b/src/main/java/saasus/sdk/apigateway/auth/ApiKeyAuth.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/saasus/sdk/apigateway/auth/HttpBearerAuth.java b/src/main/java/saasus/sdk/apigateway/auth/HttpBearerAuth.java index 67d998ac..b64d32fb 100644 --- a/src/main/java/saasus/sdk/apigateway/auth/HttpBearerAuth.java +++ b/src/main/java/saasus/sdk/apigateway/auth/HttpBearerAuth.java @@ -22,7 +22,7 @@ import java.util.Optional; import java.util.function.Supplier; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") public class HttpBearerAuth implements Authentication { private final String scheme; private Supplier tokenSupplier; diff --git a/src/main/java/saasus/sdk/apigateway/models/AbstractOpenApiSchema.java b/src/main/java/saasus/sdk/apigateway/models/AbstractOpenApiSchema.java index d7532452..321dac36 100644 --- a/src/main/java/saasus/sdk/apigateway/models/AbstractOpenApiSchema.java +++ b/src/main/java/saasus/sdk/apigateway/models/AbstractOpenApiSchema.java @@ -21,7 +21,7 @@ /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/src/main/java/saasus/sdk/apigateway/models/ApiGatewayInputFile.java b/src/main/java/saasus/sdk/apigateway/models/ApiGatewayInputFile.java index d22e1e0d..dca3b8f3 100644 --- a/src/main/java/saasus/sdk/apigateway/models/ApiGatewayInputFile.java +++ b/src/main/java/saasus/sdk/apigateway/models/ApiGatewayInputFile.java @@ -49,7 +49,7 @@ /** * ApiGatewayInputFile */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") public class ApiGatewayInputFile { public static final String SERIALIZED_NAME_CONTENT = "content"; @SerializedName(SERIALIZED_NAME_CONTENT) diff --git a/src/main/java/saasus/sdk/apigateway/models/ApiGatewaySettings.java b/src/main/java/saasus/sdk/apigateway/models/ApiGatewaySettings.java index 3dc17571..9ff1554a 100644 --- a/src/main/java/saasus/sdk/apigateway/models/ApiGatewaySettings.java +++ b/src/main/java/saasus/sdk/apigateway/models/ApiGatewaySettings.java @@ -54,7 +54,7 @@ /** * ApiGatewaySettings */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") public class ApiGatewaySettings { public static final String SERIALIZED_NAME_GENERATED_FILE_STATUS = "generated_file_status"; @SerializedName(SERIALIZED_NAME_GENERATED_FILE_STATUS) @@ -64,10 +64,6 @@ public class ApiGatewaySettings { @SerializedName(SERIALIZED_NAME_INTERNAL_ENDPOINT_OPENAPI_DEFINITION_FILE_DOWNLOAD_URL) private String internalEndpointOpenapiDefinitionFileDownloadUrl; - public static final String SERIALIZED_NAME_INTERNAL_ENDPOINT_MAPPING_FILE_DOWNLOAD_URL = "internal_endpoint_mapping_file_download_url"; - @SerializedName(SERIALIZED_NAME_INTERNAL_ENDPOINT_MAPPING_FILE_DOWNLOAD_URL) - private String internalEndpointMappingFileDownloadUrl; - public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) private String status; @@ -148,6 +144,10 @@ public class ApiGatewaySettings { @SerializedName(SERIALIZED_NAME_DOCS_CLOUD_FRONT_FQDN) private String docsCloudFrontFqdn; + public static final String SERIALIZED_NAME_MCP_SERVER_URL = "mcp_server_url"; + @SerializedName(SERIALIZED_NAME_MCP_SERVER_URL) + private String mcpServerUrl; + public ApiGatewaySettings() { } @@ -189,25 +189,6 @@ public void setInternalEndpointOpenapiDefinitionFileDownloadUrl(String internalE } - public ApiGatewaySettings internalEndpointMappingFileDownloadUrl(String internalEndpointMappingFileDownloadUrl) { - this.internalEndpointMappingFileDownloadUrl = internalEndpointMappingFileDownloadUrl; - return this; - } - - /** - * The download URL for the auto-generated internal endpoint mapping file, which will be used to build the API Gateway. - * @return internalEndpointMappingFileDownloadUrl - **/ - @javax.annotation.Nonnull - public String getInternalEndpointMappingFileDownloadUrl() { - return internalEndpointMappingFileDownloadUrl; - } - - public void setInternalEndpointMappingFileDownloadUrl(String internalEndpointMappingFileDownloadUrl) { - this.internalEndpointMappingFileDownloadUrl = internalEndpointMappingFileDownloadUrl; - } - - public ApiGatewaySettings status(String status) { this.status = status; return this; @@ -603,6 +584,25 @@ public void setDocsCloudFrontFqdn(String docsCloudFrontFqdn) { this.docsCloudFrontFqdn = docsCloudFrontFqdn; } + + public ApiGatewaySettings mcpServerUrl(String mcpServerUrl) { + this.mcpServerUrl = mcpServerUrl; + return this; + } + + /** + * URL of the MCP (Model Context Protocol) server for Smart API Gateway + * @return mcpServerUrl + **/ + @javax.annotation.Nonnull + public String getMcpServerUrl() { + return mcpServerUrl; + } + + public void setMcpServerUrl(String mcpServerUrl) { + this.mcpServerUrl = mcpServerUrl; + } + /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -660,7 +660,6 @@ public boolean equals(Object o) { ApiGatewaySettings apiGatewaySettings = (ApiGatewaySettings) o; return Objects.equals(this.generatedFileStatus, apiGatewaySettings.generatedFileStatus) && Objects.equals(this.internalEndpointOpenapiDefinitionFileDownloadUrl, apiGatewaySettings.internalEndpointOpenapiDefinitionFileDownloadUrl) && - Objects.equals(this.internalEndpointMappingFileDownloadUrl, apiGatewaySettings.internalEndpointMappingFileDownloadUrl) && Objects.equals(this.status, apiGatewaySettings.status) && Objects.equals(this.roleArn, apiGatewaySettings.roleArn) && Objects.equals(this.roleExternalId, apiGatewaySettings.roleExternalId) && @@ -680,13 +679,14 @@ public boolean equals(Object o) { Objects.equals(this.restApiEndpoint, apiGatewaySettings.restApiEndpoint) && Objects.equals(this.endpointSettingsList, apiGatewaySettings.endpointSettingsList) && Objects.equals(this.tenantRoutingType, apiGatewaySettings.tenantRoutingType) && - Objects.equals(this.docsCloudFrontFqdn, apiGatewaySettings.docsCloudFrontFqdn)&& + Objects.equals(this.docsCloudFrontFqdn, apiGatewaySettings.docsCloudFrontFqdn) && + Objects.equals(this.mcpServerUrl, apiGatewaySettings.mcpServerUrl)&& Objects.equals(this.additionalProperties, apiGatewaySettings.additionalProperties); } @Override public int hashCode() { - return Objects.hash(generatedFileStatus, internalEndpointOpenapiDefinitionFileDownloadUrl, internalEndpointMappingFileDownloadUrl, status, roleArn, roleExternalId, internalEndpointHealthCheckPath, internalEndpointHealthCheckPort, internalEndpointHealthCheckProtocol, internalEndpointHealthStatusCodes, saasSubnetIds, saasVpcId, domainName, isDnsValidated, certificateDnsRecord, cloudFrontDnsRecord, vpcEndpointDnsRecord, defaultDomainName, saasAlbArn, restApiEndpoint, endpointSettingsList, tenantRoutingType, docsCloudFrontFqdn, additionalProperties); + return Objects.hash(generatedFileStatus, internalEndpointOpenapiDefinitionFileDownloadUrl, status, roleArn, roleExternalId, internalEndpointHealthCheckPath, internalEndpointHealthCheckPort, internalEndpointHealthCheckProtocol, internalEndpointHealthStatusCodes, saasSubnetIds, saasVpcId, domainName, isDnsValidated, certificateDnsRecord, cloudFrontDnsRecord, vpcEndpointDnsRecord, defaultDomainName, saasAlbArn, restApiEndpoint, endpointSettingsList, tenantRoutingType, docsCloudFrontFqdn, mcpServerUrl, additionalProperties); } @Override @@ -695,7 +695,6 @@ public String toString() { sb.append("class ApiGatewaySettings {\n"); sb.append(" generatedFileStatus: ").append(toIndentedString(generatedFileStatus)).append("\n"); sb.append(" internalEndpointOpenapiDefinitionFileDownloadUrl: ").append(toIndentedString(internalEndpointOpenapiDefinitionFileDownloadUrl)).append("\n"); - sb.append(" internalEndpointMappingFileDownloadUrl: ").append(toIndentedString(internalEndpointMappingFileDownloadUrl)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" roleArn: ").append(toIndentedString(roleArn)).append("\n"); sb.append(" roleExternalId: ").append(toIndentedString(roleExternalId)).append("\n"); @@ -716,6 +715,7 @@ public String toString() { sb.append(" endpointSettingsList: ").append(toIndentedString(endpointSettingsList)).append("\n"); sb.append(" tenantRoutingType: ").append(toIndentedString(tenantRoutingType)).append("\n"); sb.append(" docsCloudFrontFqdn: ").append(toIndentedString(docsCloudFrontFqdn)).append("\n"); + sb.append(" mcpServerUrl: ").append(toIndentedString(mcpServerUrl)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -741,7 +741,6 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("generated_file_status"); openapiFields.add("internal_endpoint_openapi_definition_file_download_url"); - openapiFields.add("internal_endpoint_mapping_file_download_url"); openapiFields.add("status"); openapiFields.add("role_arn"); openapiFields.add("role_external_id"); @@ -762,12 +761,12 @@ private String toIndentedString(Object o) { openapiFields.add("endpoint_settings_list"); openapiFields.add("tenant_routing_type"); openapiFields.add("docs_cloud_front_fqdn"); + openapiFields.add("mcp_server_url"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("generated_file_status"); openapiRequiredFields.add("internal_endpoint_openapi_definition_file_download_url"); - openapiRequiredFields.add("internal_endpoint_mapping_file_download_url"); openapiRequiredFields.add("status"); openapiRequiredFields.add("role_arn"); openapiRequiredFields.add("role_external_id"); @@ -788,6 +787,7 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("endpoint_settings_list"); openapiRequiredFields.add("tenant_routing_type"); openapiRequiredFields.add("docs_cloud_front_fqdn"); + openapiRequiredFields.add("mcp_server_url"); } /** @@ -816,9 +816,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("internal_endpoint_openapi_definition_file_download_url").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `internal_endpoint_openapi_definition_file_download_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internal_endpoint_openapi_definition_file_download_url").toString())); } - if (!jsonObj.get("internal_endpoint_mapping_file_download_url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `internal_endpoint_mapping_file_download_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internal_endpoint_mapping_file_download_url").toString())); - } if (!jsonObj.get("status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } @@ -879,6 +876,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("docs_cloud_front_fqdn").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `docs_cloud_front_fqdn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("docs_cloud_front_fqdn").toString())); } + if (!jsonObj.get("mcp_server_url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `mcp_server_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mcp_server_url").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/saasus/sdk/apigateway/models/ApiGatewayTenant.java b/src/main/java/saasus/sdk/apigateway/models/ApiGatewayTenant.java index 6e1b238c..801361ba 100644 --- a/src/main/java/saasus/sdk/apigateway/models/ApiGatewayTenant.java +++ b/src/main/java/saasus/sdk/apigateway/models/ApiGatewayTenant.java @@ -52,7 +52,7 @@ /** * ApiGatewayTenant */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") public class ApiGatewayTenant { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/saasus/sdk/apigateway/models/ApiKey.java b/src/main/java/saasus/sdk/apigateway/models/ApiKey.java index 3435db60..1dddbd36 100644 --- a/src/main/java/saasus/sdk/apigateway/models/ApiKey.java +++ b/src/main/java/saasus/sdk/apigateway/models/ApiKey.java @@ -49,7 +49,7 @@ /** * ApiKey */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") public class ApiKey { public static final String SERIALIZED_NAME_API_KEY = "api_key"; @SerializedName(SERIALIZED_NAME_API_KEY) diff --git a/src/main/java/saasus/sdk/apigateway/models/ApiKeys.java b/src/main/java/saasus/sdk/apigateway/models/ApiKeys.java index aaa540db..db60cd8a 100644 --- a/src/main/java/saasus/sdk/apigateway/models/ApiKeys.java +++ b/src/main/java/saasus/sdk/apigateway/models/ApiKeys.java @@ -52,7 +52,7 @@ /** * ApiKeys */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") public class ApiKeys { public static final String SERIALIZED_NAME_API_KEYS = "api_keys"; @SerializedName(SERIALIZED_NAME_API_KEYS) diff --git a/src/main/java/saasus/sdk/apigateway/models/CloudFormationLaunchStackLink.java b/src/main/java/saasus/sdk/apigateway/models/CloudFormationLaunchStackLink.java index c918ae4e..300a9ec0 100644 --- a/src/main/java/saasus/sdk/apigateway/models/CloudFormationLaunchStackLink.java +++ b/src/main/java/saasus/sdk/apigateway/models/CloudFormationLaunchStackLink.java @@ -49,7 +49,7 @@ /** * CloudFormationLaunchStackLink */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") public class CloudFormationLaunchStackLink { public static final String SERIALIZED_NAME_LINK = "link"; @SerializedName(SERIALIZED_NAME_LINK) diff --git a/src/main/java/saasus/sdk/apigateway/models/CreateApiKeyParam.java b/src/main/java/saasus/sdk/apigateway/models/CreateApiKeyParam.java index cb10f1f6..dac44bd9 100644 --- a/src/main/java/saasus/sdk/apigateway/models/CreateApiKeyParam.java +++ b/src/main/java/saasus/sdk/apigateway/models/CreateApiKeyParam.java @@ -49,7 +49,7 @@ /** * CreateApiKeyParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") public class CreateApiKeyParam { public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; @SerializedName(SERIALIZED_NAME_TENANT_ID) diff --git a/src/main/java/saasus/sdk/apigateway/models/DnsRecord.java b/src/main/java/saasus/sdk/apigateway/models/DnsRecord.java index d822fb95..45429292 100644 --- a/src/main/java/saasus/sdk/apigateway/models/DnsRecord.java +++ b/src/main/java/saasus/sdk/apigateway/models/DnsRecord.java @@ -49,7 +49,7 @@ /** * DnsRecord */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") public class DnsRecord { /** * CNAME Resource Record diff --git a/src/main/java/saasus/sdk/apigateway/models/DraftApiGatewaySettings.java b/src/main/java/saasus/sdk/apigateway/models/DraftApiGatewaySettings.java new file mode 100644 index 00000000..f0cd52dc --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/models/DraftApiGatewaySettings.java @@ -0,0 +1,337 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.models; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import saasus.sdk.apigateway.models.EndpointSettings; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import saasus.sdk.apigateway.JSON; + +/** + * DraftApiGatewaySettings + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") +public class DraftApiGatewaySettings { + public static final String SERIALIZED_NAME_INTERNAL_ENDPOINT_OPENAPI_DEFINITION_FILE_DOWNLOAD_URL = "internal_endpoint_openapi_definition_file_download_url"; + @SerializedName(SERIALIZED_NAME_INTERNAL_ENDPOINT_OPENAPI_DEFINITION_FILE_DOWNLOAD_URL) + private String internalEndpointOpenapiDefinitionFileDownloadUrl; + + public static final String SERIALIZED_NAME_ENDPOINT_SETTINGS_LIST = "endpoint_settings_list"; + @SerializedName(SERIALIZED_NAME_ENDPOINT_SETTINGS_LIST) + private List endpointSettingsList = new ArrayList<>(); + + public DraftApiGatewaySettings() { + } + + public DraftApiGatewaySettings internalEndpointOpenapiDefinitionFileDownloadUrl(String internalEndpointOpenapiDefinitionFileDownloadUrl) { + this.internalEndpointOpenapiDefinitionFileDownloadUrl = internalEndpointOpenapiDefinitionFileDownloadUrl; + return this; + } + + /** + * URL to download the auto-generated openapi definition file, which will be used to build the API Gateway. + * @return internalEndpointOpenapiDefinitionFileDownloadUrl + **/ + @javax.annotation.Nullable + public String getInternalEndpointOpenapiDefinitionFileDownloadUrl() { + return internalEndpointOpenapiDefinitionFileDownloadUrl; + } + + public void setInternalEndpointOpenapiDefinitionFileDownloadUrl(String internalEndpointOpenapiDefinitionFileDownloadUrl) { + this.internalEndpointOpenapiDefinitionFileDownloadUrl = internalEndpointOpenapiDefinitionFileDownloadUrl; + } + + + public DraftApiGatewaySettings endpointSettingsList(List endpointSettingsList) { + this.endpointSettingsList = endpointSettingsList; + return this; + } + + public DraftApiGatewaySettings addEndpointSettingsListItem(EndpointSettings endpointSettingsListItem) { + if (this.endpointSettingsList == null) { + this.endpointSettingsList = new ArrayList<>(); + } + this.endpointSettingsList.add(endpointSettingsListItem); + return this; + } + + /** + * Endpoint Settings List + * @return endpointSettingsList + **/ + @javax.annotation.Nonnull + public List getEndpointSettingsList() { + return endpointSettingsList; + } + + public void setEndpointSettingsList(List endpointSettingsList) { + this.endpointSettingsList = endpointSettingsList; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the DraftApiGatewaySettings instance itself + */ + public DraftApiGatewaySettings putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DraftApiGatewaySettings draftApiGatewaySettings = (DraftApiGatewaySettings) o; + return Objects.equals(this.internalEndpointOpenapiDefinitionFileDownloadUrl, draftApiGatewaySettings.internalEndpointOpenapiDefinitionFileDownloadUrl) && + Objects.equals(this.endpointSettingsList, draftApiGatewaySettings.endpointSettingsList)&& + Objects.equals(this.additionalProperties, draftApiGatewaySettings.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(internalEndpointOpenapiDefinitionFileDownloadUrl, endpointSettingsList, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DraftApiGatewaySettings {\n"); + sb.append(" internalEndpointOpenapiDefinitionFileDownloadUrl: ").append(toIndentedString(internalEndpointOpenapiDefinitionFileDownloadUrl)).append("\n"); + sb.append(" endpointSettingsList: ").append(toIndentedString(endpointSettingsList)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("internal_endpoint_openapi_definition_file_download_url"); + openapiFields.add("endpoint_settings_list"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("endpoint_settings_list"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DraftApiGatewaySettings + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DraftApiGatewaySettings.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DraftApiGatewaySettings is not found in the empty JSON string", DraftApiGatewaySettings.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DraftApiGatewaySettings.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("internal_endpoint_openapi_definition_file_download_url") != null && !jsonObj.get("internal_endpoint_openapi_definition_file_download_url").isJsonNull()) && !jsonObj.get("internal_endpoint_openapi_definition_file_download_url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `internal_endpoint_openapi_definition_file_download_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internal_endpoint_openapi_definition_file_download_url").toString())); + } + // ensure the json data is an array + if (!jsonObj.get("endpoint_settings_list").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `endpoint_settings_list` to be an array in the JSON string but got `%s`", jsonObj.get("endpoint_settings_list").toString())); + } + + JsonArray jsonArrayendpointSettingsList = jsonObj.getAsJsonArray("endpoint_settings_list"); + // validate the required field `endpoint_settings_list` (array) + for (int i = 0; i < jsonArrayendpointSettingsList.size(); i++) { + EndpointSettings.validateJsonElement(jsonArrayendpointSettingsList.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DraftApiGatewaySettings.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DraftApiGatewaySettings' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DraftApiGatewaySettings.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DraftApiGatewaySettings value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public DraftApiGatewaySettings read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + DraftApiGatewaySettings instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of DraftApiGatewaySettings given an JSON string + * + * @param jsonString JSON string + * @return An instance of DraftApiGatewaySettings + * @throws IOException if the JSON string is invalid with respect to DraftApiGatewaySettings + */ + public static DraftApiGatewaySettings fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DraftApiGatewaySettings.class); + } + + /** + * Convert an instance of DraftApiGatewaySettings to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/saasus/sdk/apigateway/models/EndpointSettings.java b/src/main/java/saasus/sdk/apigateway/models/EndpointSettings.java index 2c1f3058..3c379ab6 100644 --- a/src/main/java/saasus/sdk/apigateway/models/EndpointSettings.java +++ b/src/main/java/saasus/sdk/apigateway/models/EndpointSettings.java @@ -52,7 +52,7 @@ /** * Settings per endpoint */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") public class EndpointSettings { public static final String SERIALIZED_NAME_PATH = "path"; @SerializedName(SERIALIZED_NAME_PATH) diff --git a/src/main/java/saasus/sdk/apigateway/models/Error.java b/src/main/java/saasus/sdk/apigateway/models/Error.java index 0351f675..904d3053 100644 --- a/src/main/java/saasus/sdk/apigateway/models/Error.java +++ b/src/main/java/saasus/sdk/apigateway/models/Error.java @@ -49,7 +49,7 @@ /** * Error */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") public class Error { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/src/main/java/saasus/sdk/apigateway/models/TenantRouting.java b/src/main/java/saasus/sdk/apigateway/models/TenantRouting.java index 695315d9..c63699d8 100644 --- a/src/main/java/saasus/sdk/apigateway/models/TenantRouting.java +++ b/src/main/java/saasus/sdk/apigateway/models/TenantRouting.java @@ -49,7 +49,7 @@ /** * Information about tenant routing. Refer to the tenant_routing_type in ApiGatewaySettings and route the request. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") public class TenantRouting { public static final String SERIALIZED_NAME_PATH = "path"; @SerializedName(SERIALIZED_NAME_PATH) diff --git a/src/main/java/saasus/sdk/apigateway/models/Throttling.java b/src/main/java/saasus/sdk/apigateway/models/Throttling.java index 18fa23d0..0929edb6 100644 --- a/src/main/java/saasus/sdk/apigateway/models/Throttling.java +++ b/src/main/java/saasus/sdk/apigateway/models/Throttling.java @@ -49,7 +49,7 @@ /** * Permit requests up to the limit number of times within a range (seconds) time for each target. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") public class Throttling { /** * Target of restriction diff --git a/src/main/java/saasus/sdk/apigateway/models/UpdateApiGatewaySettingsParam.java b/src/main/java/saasus/sdk/apigateway/models/UpdateApiGatewaySettingsParam.java index e05528a3..5773188c 100644 --- a/src/main/java/saasus/sdk/apigateway/models/UpdateApiGatewaySettingsParam.java +++ b/src/main/java/saasus/sdk/apigateway/models/UpdateApiGatewaySettingsParam.java @@ -53,7 +53,7 @@ /** * UpdateApiGatewaySettingsParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") public class UpdateApiGatewaySettingsParam { public static final String SERIALIZED_NAME_ROLE_ARN = "role_arn"; @SerializedName(SERIALIZED_NAME_ROLE_ARN) diff --git a/src/main/java/saasus/sdk/apigateway/models/UpdateOpenApiDefinitionParam.java b/src/main/java/saasus/sdk/apigateway/models/UpdateOpenApiDefinitionParam.java index 29bb74b8..fcd49dfb 100644 --- a/src/main/java/saasus/sdk/apigateway/models/UpdateOpenApiDefinitionParam.java +++ b/src/main/java/saasus/sdk/apigateway/models/UpdateOpenApiDefinitionParam.java @@ -49,7 +49,7 @@ /** * UpdateOpenApiDefinitionParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") public class UpdateOpenApiDefinitionParam { public static final String SERIALIZED_NAME_CONTENT = "content"; @SerializedName(SERIALIZED_NAME_CONTENT) diff --git a/src/main/java/saasus/sdk/apigateway/models/UpdateTenantParam.java b/src/main/java/saasus/sdk/apigateway/models/UpdateTenantParam.java index 76d126ab..5235c18d 100644 --- a/src/main/java/saasus/sdk/apigateway/models/UpdateTenantParam.java +++ b/src/main/java/saasus/sdk/apigateway/models/UpdateTenantParam.java @@ -52,7 +52,7 @@ /** * UpdateTenantParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-29T19:09:17.011671667Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") public class UpdateTenantParam { public static final String SERIALIZED_NAME_ALLOWED_IPS = "allowed_ips"; @SerializedName(SERIALIZED_NAME_ALLOWED_IPS) diff --git a/src/main/java/saasus/sdk/util/apiserver/ApiServer.java b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java index 4a089049..0f38ff37 100644 --- a/src/main/java/saasus/sdk/util/apiserver/ApiServer.java +++ b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java @@ -103,6 +103,11 @@ private CachedApiData getApiData(String apiKey) throws ApiException { ApiKey apiKeyObj = apiInstance.getApiKey(apiKey); ApiGatewayTenant tenant = apiInstance.getTenant(apiKeyObj.getTenantId()); + if (DEBUG) { + logger.info("API Key retrieved, Client Secret available: " + + (apiKeyObj.getClientSecret() != null && !apiKeyObj.getClientSecret().isEmpty())); + } + CachedApiData newData = new CachedApiData(settings, apiKeyObj, tenant); apiDataCache.put(apiKey, newData); @@ -126,13 +131,18 @@ private boolean verifySignature(HttpExchange exchange, CachedApiData apiData) { String query = exchange.getRequestURI().getRawQuery(); String apiKey = exchange.getRequestHeaders().getFirst("x-api-key"); - if (apiData == null || apiData.apiKey.getClientSecret() == null - || apiData.apiKey.getClientSecret().isEmpty()) { + if (apiData == null) { if (DEBUG) - logger.warning("Client secret not available, skipping signature verification"); + logger.warning("API data not available, skipping signature verification"); return true; } + if (apiData.apiKey.getClientSecret() == null || apiData.apiKey.getClientSecret().isEmpty()) { + if (DEBUG) + logger.warning("Client secret not available, signature verification failed"); + return false; + } + String adjustedPath = rawPath; String pathWithQuery = query != null && !query.isEmpty() ? rawPath + "?" + query : rawPath; diff --git a/src/test/java/saasus/sdk/apigateway/api/SmartApiGatewayApiTest.java b/src/test/java/saasus/sdk/apigateway/api/SmartApiGatewayApiTest.java index 4213adb9..c1eff8ac 100644 --- a/src/test/java/saasus/sdk/apigateway/api/SmartApiGatewayApiTest.java +++ b/src/test/java/saasus/sdk/apigateway/api/SmartApiGatewayApiTest.java @@ -21,6 +21,7 @@ import saasus.sdk.apigateway.models.ApiKeys; import saasus.sdk.apigateway.models.CloudFormationLaunchStackLink; import saasus.sdk.apigateway.models.CreateApiKeyParam; +import saasus.sdk.apigateway.models.DraftApiGatewaySettings; import saasus.sdk.apigateway.models.Error; import saasus.sdk.apigateway.models.UpdateApiGatewaySettingsParam; import saasus.sdk.apigateway.models.UpdateOpenApiDefinitionParam; @@ -41,6 +42,19 @@ public class SmartApiGatewayApiTest { private final SmartApiGatewayApi api = new SmartApiGatewayApi(); + /** + * Apply draft configuration information for Smart API Gateway function + * + * Apply draft configuration information for Smart API Gateway function. This applies the changes made in the draft settings to the actual Smart API Gateway. + * + * @throws ApiException if the Api call fails + */ + @Test + public void applyDraftApiGatewaySettingsTest() throws ApiException { + api.applyDraftApiGatewaySettings(); + // TODO: test validations + } + /** * Create the API Gateway * @@ -125,6 +139,19 @@ public void getCloudFormationLaunchStackLinkTest() throws ApiException { // TODO: test validations } + /** + * Obtain draft configuration information for Smart API Gateway function + * + * Obtain draft configuration information for Smart API Gateway function. You can check the settings generated from the uploaded source code before applying them. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getDraftApiGatewaySettingsTest() throws ApiException { + DraftApiGatewaySettings response = api.getDraftApiGatewaySettings(); + // TODO: test validations + } + /** * Get tenant information * diff --git a/src/test/java/saasus/sdk/apigateway/models/ApiGatewaySettingsTest.java b/src/test/java/saasus/sdk/apigateway/models/ApiGatewaySettingsTest.java index 6d245a56..2ea1f9e6 100644 --- a/src/test/java/saasus/sdk/apigateway/models/ApiGatewaySettingsTest.java +++ b/src/test/java/saasus/sdk/apigateway/models/ApiGatewaySettingsTest.java @@ -58,14 +58,6 @@ public void internalEndpointOpenapiDefinitionFileDownloadUrlTest() { // TODO: test internalEndpointOpenapiDefinitionFileDownloadUrl } - /** - * Test the property 'internalEndpointMappingFileDownloadUrl' - */ - @Test - public void internalEndpointMappingFileDownloadUrlTest() { - // TODO: test internalEndpointMappingFileDownloadUrl - } - /** * Test the property 'status' */ @@ -226,4 +218,12 @@ public void docsCloudFrontFqdnTest() { // TODO: test docsCloudFrontFqdn } + /** + * Test the property 'mcpServerUrl' + */ + @Test + public void mcpServerUrlTest() { + // TODO: test mcpServerUrl + } + } diff --git a/src/test/java/saasus/sdk/apigateway/models/DraftApiGatewaySettingsTest.java b/src/test/java/saasus/sdk/apigateway/models/DraftApiGatewaySettingsTest.java new file mode 100644 index 00000000..b0cc94f7 --- /dev/null +++ b/src/test/java/saasus/sdk/apigateway/models/DraftApiGatewaySettingsTest.java @@ -0,0 +1,59 @@ +/* + * SaaSus Smart API Gateway API Schema + * SaaSus Smart API Gateway API Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package saasus.sdk.apigateway.models; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import saasus.sdk.apigateway.models.EndpointSettings; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for DraftApiGatewaySettings + */ +public class DraftApiGatewaySettingsTest { + private final DraftApiGatewaySettings model = new DraftApiGatewaySettings(); + + /** + * Model tests for DraftApiGatewaySettings + */ + @Test + public void testDraftApiGatewaySettings() { + // TODO: test DraftApiGatewaySettings + } + + /** + * Test the property 'internalEndpointOpenapiDefinitionFileDownloadUrl' + */ + @Test + public void internalEndpointOpenapiDefinitionFileDownloadUrlTest() { + // TODO: test internalEndpointOpenapiDefinitionFileDownloadUrl + } + + /** + * Test the property 'endpointSettingsList' + */ + @Test + public void endpointSettingsListTest() { + // TODO: test endpointSettingsList + } + +} From c9d872cbfc2aa34a699f7dcb1163e2e6397494e4 Mon Sep 17 00:00:00 2001 From: takashi-uchida Date: Fri, 13 Jun 2025 08:05:08 +0900 Subject: [PATCH 18/28] =?UTF-8?q?feat:=20=E5=AE=8C=E5=85=A8=E3=81=AAURL?= =?UTF-8?q?=E5=BD=A2=E5=BC=8F=E3=81=AE=E5=80=99=E8=A3=9CURL=E7=94=9F?= =?UTF-8?q?=E6=88=90=E3=82=92=E6=94=B9=E5=96=84=E3=81=97=E3=80=81=E3=82=AB?= =?UTF-8?q?=E3=82=B9=E3=82=BF=E3=83=A0=E3=83=89=E3=83=A1=E3=82=A4=E3=83=B3?= =?UTF-8?q?=E7=94=A8=E3=81=AE=E5=80=99=E8=A3=9C=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../saasus/sdk/util/apiserver/ApiServer.java | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/src/main/java/saasus/sdk/util/apiserver/ApiServer.java b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java index 0f38ff37..2a5cb7a8 100644 --- a/src/main/java/saasus/sdk/util/apiserver/ApiServer.java +++ b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java @@ -239,9 +239,27 @@ private boolean verifySignatureWithCandidates(String primaryPath, String signatu // 追加の候補URLを生成(プロトコルを含む完全なURL形式) if (settings != null) { - String pathPart = primaryPath.substring(primaryPath.indexOf("/")); + // primaryPathからパス部分のみを抽出(プロトコル+ホスト部分を除去) + String pathPart = ""; + if (primaryPath.startsWith("https://")) { + int pathStartIndex = primaryPath.indexOf("/", 8); // "https://"の後の最初の"/" + if (pathStartIndex != -1) { + pathPart = primaryPath.substring(pathStartIndex); + } + } else { + // プロトコルがない場合は最初の"/"以降をパス部分とする + int pathStartIndex = primaryPath.indexOf("/"); + if (pathStartIndex != -1) { + pathPart = primaryPath.substring(pathStartIndex); + } + } + if (settings.getCloudFrontDnsRecord() != null) { String cloudFrontUrl = settings.getCloudFrontDnsRecord().getValue(); + // 末尾のドットを除去 + if (cloudFrontUrl.endsWith(".")) { + cloudFrontUrl = cloudFrontUrl.substring(0, cloudFrontUrl.length() - 1); + } if (!cloudFrontUrl.startsWith("http://") && !cloudFrontUrl.startsWith("https://")) { cloudFrontUrl = "https://" + cloudFrontUrl; } @@ -253,10 +271,20 @@ private boolean verifySignatureWithCandidates(String primaryPath, String signatu } if (settings.getDomainName() != null) { String domainUrl = settings.getDomainName(); + // 末尾のドットを除去 + if (domainUrl.endsWith(".")) { + domainUrl = domainUrl.substring(0, domainUrl.length() - 1); + } if (!domainUrl.startsWith("http://") && !domainUrl.startsWith("https://")) { domainUrl = "https://" + domainUrl; } candidateUrls.add(domainUrl + pathPart); + + // カスタムドメインの場合、"api."プレフィックス付きの候補も追加 + if (!domainUrl.startsWith("https://api.") && !domainUrl.startsWith("http://api.")) { + String apiDomainUrl = domainUrl.replace("https://", "https://api."); + candidateUrls.add(apiDomainUrl + pathPart); + } } } From 36af17e0ee6b204e3f203b7f0ee5b576aa577bd7 Mon Sep 17 00:00:00 2001 From: Takeshi Tsukamoto Date: Tue, 24 Jun 2025 10:16:04 +0900 Subject: [PATCH 19/28] temp implementation --- .../saasus/sdk/util/apiserver/ApiServer.java | 74 ++++++++++++++++++- .../sdk/util/apiserver/SaaSusIdentity.java | 54 ++++++++++++++ 2 files changed, 125 insertions(+), 3 deletions(-) create mode 100644 src/main/java/saasus/sdk/util/apiserver/SaaSusIdentity.java diff --git a/src/main/java/saasus/sdk/util/apiserver/ApiServer.java b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java index 2a5cb7a8..71a47a6c 100644 --- a/src/main/java/saasus/sdk/util/apiserver/ApiServer.java +++ b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java @@ -421,7 +421,14 @@ public void handle(HttpExchange exchange) throws IOException { Method method = getMethod(clazz, methodName); if (method != null) { - Object[] args = prepareMethodArguments(method, queryParams); + boolean needsIdentity = requiresSaaSusIdentity(method); + SaaSusIdentity identity = null; + + if (needsIdentity) { + identity = createSaaSusIdentity(apiData); + } + + Object[] args = prepareMethodArguments(method, queryParams, identity); Object response = method.invoke(null, args); String jsonResponse = objectMapper.writeValueAsString(response); sendResponse(exchange, 200, jsonResponse); @@ -479,11 +486,25 @@ private Map parseQueryParams(URI uri) { return queryParams; } - private Object[] prepareMethodArguments(Method method, Map queryParams) { + private Object[] prepareMethodArguments(Method method, Map queryParams, SaaSusIdentity identity) { Parameter[] parameters = method.getParameters(); List args = new ArrayList<>(); for (Parameter parameter : parameters) { + Class paramType = parameter.getType(); + + // SaaSusIdentityパラメータの検出と自動注入 + if (paramType == SaaSusIdentity.class) { + if (identity == null) { + throw new IllegalStateException("SaaSusIdentity is required but not available"); + } + if (DEBUG) { + logger.info("Auto-injecting SaaSusIdentity for parameter: " + parameter.getName()); + } + args.add(identity); + continue; + } + String paramName = parameter.getName(); String paramValue = queryParams.get(paramName); @@ -491,7 +512,6 @@ private Object[] prepareMethodArguments(Method method, Map query throw new IllegalArgumentException("Missing parameter: " + paramName); } - Class paramType = parameter.getType(); args.add(convertParamValue(paramValue, paramType)); } @@ -513,6 +533,54 @@ private Object convertParamValue(String value, Class type) { throw new IllegalArgumentException("Unsupported parameter type: " + type.getName()); } + /** + * メソッドがSaaSusIdentityパラメータを必要とするかチェック + * @param method チェック対象のメソッド + * @return SaaSusIdentityパラメータが必要な場合true + */ + private boolean requiresSaaSusIdentity(Method method) { + Parameter[] parameters = method.getParameters(); + for (Parameter parameter : parameters) { + if (parameter.getType() == SaaSusIdentity.class) { + return true; + } + } + return false; + } + + private SaaSusIdentity createSaaSusIdentity(CachedApiData apiData) { + try { + if (apiData == null || apiData.apiKey == null) { + throw new IllegalStateException("API data not available for identity creation"); + } + + String userId = apiData.apiKey.getUserId(); + String tenantId = apiData.apiKey.getTenantId(); + Integer envIdInt = apiData.apiKey.getEnvId(); + + if (tenantId == null || envIdInt == null) { + throw new IllegalStateException("Required identity fields are missing"); + } + + if (userId == null) { + userId = ""; // 空文字列をデフォルトとする + } + + String envId = envIdInt.toString(); + + if (DEBUG) { + logger.info("Creating SaaSusIdentity - userId: " + userId + + ", tenantId: " + tenantId + ", envId: " + envId); + } + + return new SaaSusIdentity(userId, tenantId, envId); + + } catch (Exception e) { + logger.warning("Failed to create SaaSusIdentity: " + e.getMessage()); + throw new IllegalStateException("Identity creation failed", e); + } + } + private void sendResponse(HttpExchange exchange, int statusCode, String response) throws IOException { exchange.getResponseHeaders().set("Content-Type", "application/json"); byte[] responseBytes = response.getBytes("UTF-8"); diff --git a/src/main/java/saasus/sdk/util/apiserver/SaaSusIdentity.java b/src/main/java/saasus/sdk/util/apiserver/SaaSusIdentity.java new file mode 100644 index 00000000..cd5aa7eb --- /dev/null +++ b/src/main/java/saasus/sdk/util/apiserver/SaaSusIdentity.java @@ -0,0 +1,54 @@ +package saasus.sdk.util.apiserver; + +import java.util.Objects; + +/** + * SaaSus APIから取得したテナント・環境・ユーザー情報を統一的に管理するIDオブジェクト + */ +public final class SaaSusIdentity { + private final String userId; + private final String tenantId; + private final String envId; + + public SaaSusIdentity(String userId, String tenantId, String envId) { + // セキュリティ: 入力値検証 + this.userId = userId; + this.tenantId = validateAndNormalize(tenantId, "tenantId"); + this.envId = validateAndNormalize(envId, "envId"); + } + + private String validateAndNormalize(String value, String fieldName) { + if (value == null || value.trim().isEmpty()) { + throw new IllegalArgumentException(fieldName + " cannot be null or empty"); + } + return value.trim(); + } + + public String getUserId() { return userId; } + public String getTenantId() { return tenantId; } + public String getEnvId() { return envId; } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SaaSusIdentity that = (SaaSusIdentity) o; + return Objects.equals(userId, that.userId) && + Objects.equals(tenantId, that.tenantId) && + Objects.equals(envId, that.envId); + } + + @Override + public int hashCode() { + return Objects.hash(userId, tenantId, envId); + } + + @Override + public String toString() { + return "SaaSusIdentity{" + + "userId='" + userId + '\'' + + ", tenantId='" + tenantId + '\'' + + ", envId='" + envId + '\'' + + '}'; + } +} \ No newline at end of file From 700a641466f1441465f98278bab1252d81b714a0 Mon Sep 17 00:00:00 2001 From: Takeshi Tsukamoto Date: Tue, 1 Jul 2025 11:18:56 +0900 Subject: [PATCH 20/28] fix --- src/main/java/saasus/sdk/util/apiserver/ApiServer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/saasus/sdk/util/apiserver/ApiServer.java b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java index 71a47a6c..bf3f4253 100644 --- a/src/main/java/saasus/sdk/util/apiserver/ApiServer.java +++ b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java @@ -140,7 +140,7 @@ private boolean verifySignature(HttpExchange exchange, CachedApiData apiData) { if (apiData.apiKey.getClientSecret() == null || apiData.apiKey.getClientSecret().isEmpty()) { if (DEBUG) logger.warning("Client secret not available, signature verification failed"); - return false; + return true; } String adjustedPath = rawPath; From 9d8d247b99ce7384b5ba9498df7fbab81e6161a1 Mon Sep 17 00:00:00 2001 From: Takeshi Tsukamoto Date: Tue, 1 Jul 2025 14:19:30 +0900 Subject: [PATCH 21/28] review fix --- .../saasus/sdk/util/apiserver/ApiServer.java | 4 ---- .../sdk/util/apiserver/SaaSusIdentity.java | 22 ++++++++++++++++++- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/src/main/java/saasus/sdk/util/apiserver/ApiServer.java b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java index bf3f4253..16693605 100644 --- a/src/main/java/saasus/sdk/util/apiserver/ApiServer.java +++ b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java @@ -562,10 +562,6 @@ private SaaSusIdentity createSaaSusIdentity(CachedApiData apiData) { throw new IllegalStateException("Required identity fields are missing"); } - if (userId == null) { - userId = ""; // 空文字列をデフォルトとする - } - String envId = envIdInt.toString(); if (DEBUG) { diff --git a/src/main/java/saasus/sdk/util/apiserver/SaaSusIdentity.java b/src/main/java/saasus/sdk/util/apiserver/SaaSusIdentity.java index cd5aa7eb..2ee67288 100644 --- a/src/main/java/saasus/sdk/util/apiserver/SaaSusIdentity.java +++ b/src/main/java/saasus/sdk/util/apiserver/SaaSusIdentity.java @@ -12,11 +12,31 @@ public final class SaaSusIdentity { public SaaSusIdentity(String userId, String tenantId, String envId) { // セキュリティ: 入力値検証 - this.userId = userId; + this.userId = validateAndNormalizeUserId(userId); this.tenantId = validateAndNormalize(tenantId, "tenantId"); this.envId = validateAndNormalize(envId, "envId"); } + /** + * userIdの検証と正規化を行う + * nullの場合は空文字列を返し、そうでなければトリム処理を行う + * @param userId 検証対象のuserId + * @return 正規化されたuserId + */ + private String validateAndNormalizeUserId(String userId) { + if (userId == null) { + return ""; // 既存の動作を維持:nullの場合は空文字列 + } + return userId.trim(); // 前後の空白文字を除去 + } + + /** + * tenantIdとenvIdの検証と正規化を行う + * @param value 検証対象の値 + * @param fieldName フィールド名(エラーメッセージ用) + * @return 正規化された値 + * @throws IllegalArgumentException 値がnullまたは空文字列の場合 + */ private String validateAndNormalize(String value, String fieldName) { if (value == null || value.trim().isEmpty()) { throw new IllegalArgumentException(fieldName + " cannot be null or empty"); From d43bfc997cd1d28cccd0adc0920827881087eb6c Mon Sep 17 00:00:00 2001 From: Takeshi Tsukamoto Date: Wed, 9 Jul 2025 13:58:54 +0900 Subject: [PATCH 22/28] modify SaaSusIdentity.class name --- .../saasus/sdk/util/apiserver/ApiServer.java | 32 +++++++++---------- .../sdk/util/apiserver/SaaSusIdentity.java | 8 ++--- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/main/java/saasus/sdk/util/apiserver/ApiServer.java b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java index 16693605..ca75b024 100644 --- a/src/main/java/saasus/sdk/util/apiserver/ApiServer.java +++ b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java @@ -421,11 +421,11 @@ public void handle(HttpExchange exchange) throws IOException { Method method = getMethod(clazz, methodName); if (method != null) { - boolean needsIdentity = requiresSaaSusIdentity(method); - SaaSusIdentity identity = null; + boolean needsIdentity = requiresSaasusIdentity(method); + SaasusIdentity identity = null; if (needsIdentity) { - identity = createSaaSusIdentity(apiData); + identity = createSaasusIdentity(apiData); } Object[] args = prepareMethodArguments(method, queryParams, identity); @@ -486,20 +486,20 @@ private Map parseQueryParams(URI uri) { return queryParams; } - private Object[] prepareMethodArguments(Method method, Map queryParams, SaaSusIdentity identity) { + private Object[] prepareMethodArguments(Method method, Map queryParams, SaasusIdentity identity) { Parameter[] parameters = method.getParameters(); List args = new ArrayList<>(); for (Parameter parameter : parameters) { Class paramType = parameter.getType(); - // SaaSusIdentityパラメータの検出と自動注入 - if (paramType == SaaSusIdentity.class) { + // SaasusIdentityパラメータの検出と自動注入 + if (paramType == SaasusIdentity.class) { if (identity == null) { - throw new IllegalStateException("SaaSusIdentity is required but not available"); + throw new IllegalStateException("SaasusIdentity is required but not available"); } if (DEBUG) { - logger.info("Auto-injecting SaaSusIdentity for parameter: " + parameter.getName()); + logger.info("Auto-injecting SaasusIdentity for parameter: " + parameter.getName()); } args.add(identity); continue; @@ -534,21 +534,21 @@ private Object convertParamValue(String value, Class type) { } /** - * メソッドがSaaSusIdentityパラメータを必要とするかチェック + * メソッドがSaasusIdentityパラメータを必要とするかチェック * @param method チェック対象のメソッド - * @return SaaSusIdentityパラメータが必要な場合true + * @return SaasusIdentityパラメータが必要な場合true */ - private boolean requiresSaaSusIdentity(Method method) { + private boolean requiresSaasusIdentity(Method method) { Parameter[] parameters = method.getParameters(); for (Parameter parameter : parameters) { - if (parameter.getType() == SaaSusIdentity.class) { + if (parameter.getType() == SaasusIdentity.class) { return true; } } return false; } - private SaaSusIdentity createSaaSusIdentity(CachedApiData apiData) { + private SaasusIdentity createSaasusIdentity(CachedApiData apiData) { try { if (apiData == null || apiData.apiKey == null) { throw new IllegalStateException("API data not available for identity creation"); @@ -565,14 +565,14 @@ private SaaSusIdentity createSaaSusIdentity(CachedApiData apiData) { String envId = envIdInt.toString(); if (DEBUG) { - logger.info("Creating SaaSusIdentity - userId: " + userId + + logger.info("Creating SaasusIdentity - userId: " + userId + ", tenantId: " + tenantId + ", envId: " + envId); } - return new SaaSusIdentity(userId, tenantId, envId); + return new SaasusIdentity(userId, tenantId, envId); } catch (Exception e) { - logger.warning("Failed to create SaaSusIdentity: " + e.getMessage()); + logger.warning("Failed to create SaasusIdentity: " + e.getMessage()); throw new IllegalStateException("Identity creation failed", e); } } diff --git a/src/main/java/saasus/sdk/util/apiserver/SaaSusIdentity.java b/src/main/java/saasus/sdk/util/apiserver/SaaSusIdentity.java index 2ee67288..a4f4b00d 100644 --- a/src/main/java/saasus/sdk/util/apiserver/SaaSusIdentity.java +++ b/src/main/java/saasus/sdk/util/apiserver/SaaSusIdentity.java @@ -5,12 +5,12 @@ /** * SaaSus APIから取得したテナント・環境・ユーザー情報を統一的に管理するIDオブジェクト */ -public final class SaaSusIdentity { +public final class SaasusIdentity { private final String userId; private final String tenantId; private final String envId; - public SaaSusIdentity(String userId, String tenantId, String envId) { + public SaasusIdentity(String userId, String tenantId, String envId) { // セキュリティ: 入力値検証 this.userId = validateAndNormalizeUserId(userId); this.tenantId = validateAndNormalize(tenantId, "tenantId"); @@ -52,7 +52,7 @@ private String validateAndNormalize(String value, String fieldName) { public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; - SaaSusIdentity that = (SaaSusIdentity) o; + SaasusIdentity that = (SaasusIdentity) o; return Objects.equals(userId, that.userId) && Objects.equals(tenantId, that.tenantId) && Objects.equals(envId, that.envId); @@ -65,7 +65,7 @@ public int hashCode() { @Override public String toString() { - return "SaaSusIdentity{" + + return "SaasusIdentity{" + "userId='" + userId + '\'' + ", tenantId='" + tenantId + '\'' + ", envId='" + envId + '\'' + From 7d98c0de96151632e136f5795794af219c295999 Mon Sep 17 00:00:00 2001 From: Takeshi Tsukamoto Date: Wed, 9 Jul 2025 17:28:43 +0900 Subject: [PATCH 23/28] Temporary rename --- .../saasus/sdk/util/apiserver/{SaaSusIdentity.java => temp.java} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/main/java/saasus/sdk/util/apiserver/{SaaSusIdentity.java => temp.java} (100%) diff --git a/src/main/java/saasus/sdk/util/apiserver/SaaSusIdentity.java b/src/main/java/saasus/sdk/util/apiserver/temp.java similarity index 100% rename from src/main/java/saasus/sdk/util/apiserver/SaaSusIdentity.java rename to src/main/java/saasus/sdk/util/apiserver/temp.java From d4f6d984298d7a1a61bfc3b9434490aee86ab4eb Mon Sep 17 00:00:00 2001 From: Takeshi Tsukamoto Date: Wed, 9 Jul 2025 17:29:40 +0900 Subject: [PATCH 24/28] Rename to SaasusIdentity.java --- .../saasus/sdk/util/apiserver/{temp.java => SaaSusIdentity.java} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/main/java/saasus/sdk/util/apiserver/{temp.java => SaaSusIdentity.java} (100%) diff --git a/src/main/java/saasus/sdk/util/apiserver/temp.java b/src/main/java/saasus/sdk/util/apiserver/SaaSusIdentity.java similarity index 100% rename from src/main/java/saasus/sdk/util/apiserver/temp.java rename to src/main/java/saasus/sdk/util/apiserver/SaaSusIdentity.java From 0f724cd2f3d2bb3462a678f61914df207bb97ae6 Mon Sep 17 00:00:00 2001 From: Takeshi Tsukamoto Date: Wed, 9 Jul 2025 17:32:19 +0900 Subject: [PATCH 25/28] Temporary rename --- .../saasus/sdk/util/apiserver/{SaaSusIdentity.java => temp.java} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/main/java/saasus/sdk/util/apiserver/{SaaSusIdentity.java => temp.java} (100%) diff --git a/src/main/java/saasus/sdk/util/apiserver/SaaSusIdentity.java b/src/main/java/saasus/sdk/util/apiserver/temp.java similarity index 100% rename from src/main/java/saasus/sdk/util/apiserver/SaaSusIdentity.java rename to src/main/java/saasus/sdk/util/apiserver/temp.java From 32f239f9567871b06c8ec100173b8a4ed9b00121 Mon Sep 17 00:00:00 2001 From: Takeshi Tsukamoto Date: Wed, 9 Jul 2025 17:32:42 +0900 Subject: [PATCH 26/28] Rename to SaasusIdentity.java --- .../saasus/sdk/util/apiserver/{temp.java => SaasusIdentity.java} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/main/java/saasus/sdk/util/apiserver/{temp.java => SaasusIdentity.java} (100%) diff --git a/src/main/java/saasus/sdk/util/apiserver/temp.java b/src/main/java/saasus/sdk/util/apiserver/SaasusIdentity.java similarity index 100% rename from src/main/java/saasus/sdk/util/apiserver/temp.java rename to src/main/java/saasus/sdk/util/apiserver/SaasusIdentity.java From e996718f44e1bdc742b4512f1efa521ff8df9b16 Mon Sep 17 00:00:00 2001 From: takashi-uchida Date: Wed, 13 Aug 2025 15:28:59 +0900 Subject: [PATCH 27/28] generate.sh: add enumUnknownDefaultCase property to OpenAPI generator options --- generate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate.sh b/generate.sh index 26227417..8cea3c39 100755 --- a/generate.sh +++ b/generate.sh @@ -47,7 +47,7 @@ do -g java \ --additional-properties=modelPackage=saasus.sdk.${module}.models,apiPackage=saasus.sdk.${module}.api \ -o /local/generated/${module} \ - --additional-properties useOneOfDiscriminatorLookup=true,disallowAdditionalPropertiesIfNotPresent=false + --additional-properties useOneOfDiscriminatorLookup=true,disallowAdditionalPropertiesIfNotPresent=false,enumUnknownDefaultCase=true done for module in ${MODULES} From 82c9f402c13ea51ee70976d1ef2e8712dd42644c Mon Sep 17 00:00:00 2001 From: takashi-uchida Date: Wed, 13 Aug 2025 15:29:15 +0900 Subject: [PATCH 28/28] Add cancelDraftApiGatewaySettings endpoint and update related documentation - Introduced the `cancelDraftApiGatewaySettings` method in `SmartApiGatewayApi` to cancel draft configuration changes. - Updated `SmartApiGatewayApi.md` to include details about the new endpoint. - Added `UNKNOWN_DEFAULT_OPEN_API` to various enums in `DnsRecord`, `EndpointSettings`, `TenantRoutingType`, and `Throttling` for better handling of unknown values. - Updated the generated date in multiple Java model classes to reflect recent changes. - Added unit test for `cancelDraftApiGatewaySettings` in `SmartApiGatewayApiTest`. --- docs/apigateway/DnsRecord.md | 1 + docs/apigateway/EndpointSettings.md | 1 + docs/apigateway/SmartApiGatewayApi.md | 64 ++++++++++ docs/apigateway/TenantRoutingType.md | 2 + docs/apigateway/Throttling.md | 1 + .../saasus/sdk/apigateway/ApiException.java | 2 +- .../saasus/sdk/apigateway/Configuration.java | 2 +- src/main/java/saasus/sdk/apigateway/Pair.java | 2 +- .../saasus/sdk/apigateway/StringUtil.java | 2 +- .../apigateway/api/SmartApiGatewayApi.java | 113 ++++++++++++++++++ .../sdk/apigateway/auth/ApiKeyAuth.java | 2 +- .../sdk/apigateway/auth/HttpBearerAuth.java | 2 +- .../models/AbstractOpenApiSchema.java | 2 +- .../models/ApiGatewayInputFile.java | 2 +- .../apigateway/models/ApiGatewaySettings.java | 2 +- .../apigateway/models/ApiGatewayTenant.java | 2 +- .../saasus/sdk/apigateway/models/ApiKey.java | 2 +- .../saasus/sdk/apigateway/models/ApiKeys.java | 2 +- .../models/CloudFormationLaunchStackLink.java | 2 +- .../apigateway/models/CreateApiKeyParam.java | 2 +- .../sdk/apigateway/models/DnsRecord.java | 8 +- .../models/DraftApiGatewaySettings.java | 2 +- .../apigateway/models/EndpointSettings.java | 8 +- .../saasus/sdk/apigateway/models/Error.java | 2 +- .../sdk/apigateway/models/TenantRouting.java | 2 +- .../apigateway/models/TenantRoutingType.java | 6 +- .../sdk/apigateway/models/Throttling.java | 8 +- .../models/UpdateApiGatewaySettingsParam.java | 2 +- .../models/UpdateOpenApiDefinitionParam.java | 2 +- .../apigateway/models/UpdateTenantParam.java | 2 +- .../api/SmartApiGatewayApiTest.java | 13 ++ 31 files changed, 234 insertions(+), 31 deletions(-) diff --git a/docs/apigateway/DnsRecord.md b/docs/apigateway/DnsRecord.md index a8c795a8..db0eefa3 100644 --- a/docs/apigateway/DnsRecord.md +++ b/docs/apigateway/DnsRecord.md @@ -19,6 +19,7 @@ |---- | -----| | CNAME | "CNAME" | | TXT | "TXT" | +| UNKNOWN_DEFAULT_OPEN_API | "unknown_default_open_api" | diff --git a/docs/apigateway/EndpointSettings.md b/docs/apigateway/EndpointSettings.md index f0d2429f..26c8adb3 100644 --- a/docs/apigateway/EndpointSettings.md +++ b/docs/apigateway/EndpointSettings.md @@ -29,6 +29,7 @@ Settings per endpoint | CONNECT | "CONNECT" | | OPTIONS | "OPTIONS" | | TRACE | "TRACE" | +| UNKNOWN_DEFAULT_OPEN_API | "unknown_default_open_api" | diff --git a/docs/apigateway/SmartApiGatewayApi.md b/docs/apigateway/SmartApiGatewayApi.md index a7351914..8e2d1bce 100644 --- a/docs/apigateway/SmartApiGatewayApi.md +++ b/docs/apigateway/SmartApiGatewayApi.md @@ -5,6 +5,7 @@ All URIs are relative to *https://api.saasus.io/v1/apigateway* | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**applyDraftApiGatewaySettings**](SmartApiGatewayApi.md#applyDraftApiGatewaySettings) | **POST** /draft/settings/apply | Apply draft configuration information for Smart API Gateway function | +| [**cancelDraftApiGatewaySettings**](SmartApiGatewayApi.md#cancelDraftApiGatewaySettings) | **POST** /draft/settings/cancel | Cancel draft configuration information for Smart API Gateway function | | [**createApiGateway**](SmartApiGatewayApi.md#createApiGateway) | **POST** /create | Create the API Gateway | | [**createApiKey**](SmartApiGatewayApi.md#createApiKey) | **POST** /api-keys | Create an API key | | [**getApiGatewaySettings**](SmartApiGatewayApi.md#getApiGatewaySettings) | **GET** /settings | Obtain configuration information for api gateway function | @@ -85,6 +86,69 @@ null (empty response body) | **200** | OK | - | | **500** | Internal Server Error | - | + +# **cancelDraftApiGatewaySettings** +> cancelDraftApiGatewaySettings() + +Cancel draft configuration information for Smart API Gateway function + +Cancel draft configuration information for Smart API Gateway function. This cancels the changes made in the draft settings without applying them to the actual Smart API Gateway. + +### Example +```java +// Import classes: +import saasus.sdk.apigateway.ApiClient; +import saasus.sdk.apigateway.ApiException; +import saasus.sdk.apigateway.Configuration; +import saasus.sdk.apigateway.auth.*; +import saasus.sdk.apigateway.models.*; +import saasus.sdk.apigateway.api.SmartApiGatewayApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.saasus.io/v1/apigateway"); + + // Configure HTTP bearer authorization: Bearer + HttpBearerAuth Bearer = (HttpBearerAuth) defaultClient.getAuthentication("Bearer"); + Bearer.setBearerToken("BEARER TOKEN"); + + SmartApiGatewayApi apiInstance = new SmartApiGatewayApi(defaultClient); + try { + apiInstance.cancelDraftApiGatewaySettings(); + } catch (ApiException e) { + System.err.println("Exception when calling SmartApiGatewayApi#cancelDraftApiGatewaySettings"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +null (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **500** | Internal Server Error | - | + # **createApiGateway** > createApiGateway() diff --git a/docs/apigateway/TenantRoutingType.md b/docs/apigateway/TenantRoutingType.md index 9865bd4d..b1fae836 100644 --- a/docs/apigateway/TenantRoutingType.md +++ b/docs/apigateway/TenantRoutingType.md @@ -13,5 +13,7 @@ * `NONE` (value: `"none"`) +* `UNKNOWN_DEFAULT_OPEN_API` (value: `"unknown_default_open_api"`) + diff --git a/docs/apigateway/Throttling.md b/docs/apigateway/Throttling.md index 069be9da..bc2dbf4e 100644 --- a/docs/apigateway/Throttling.md +++ b/docs/apigateway/Throttling.md @@ -20,6 +20,7 @@ Permit requests up to the limit number of times within a range (seconds) time fo |---- | -----| | TENANT | "tenant" | | USER | "user" | +| UNKNOWN_DEFAULT_OPEN_API | "unknown_default_open_api" | diff --git a/src/main/java/saasus/sdk/apigateway/ApiException.java b/src/main/java/saasus/sdk/apigateway/ApiException.java index cd13ec1e..a0946f6c 100644 --- a/src/main/java/saasus/sdk/apigateway/ApiException.java +++ b/src/main/java/saasus/sdk/apigateway/ApiException.java @@ -21,7 +21,7 @@ *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-08-13T06:27:47.035984428Z[Etc/UTC]") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; diff --git a/src/main/java/saasus/sdk/apigateway/Configuration.java b/src/main/java/saasus/sdk/apigateway/Configuration.java index 8da7739f..0d5f1755 100644 --- a/src/main/java/saasus/sdk/apigateway/Configuration.java +++ b/src/main/java/saasus/sdk/apigateway/Configuration.java @@ -13,7 +13,7 @@ package saasus.sdk.apigateway; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-08-13T06:27:47.035984428Z[Etc/UTC]") public class Configuration { public static final String VERSION = "1.0.0"; diff --git a/src/main/java/saasus/sdk/apigateway/Pair.java b/src/main/java/saasus/sdk/apigateway/Pair.java index d425353b..98bdeb4e 100644 --- a/src/main/java/saasus/sdk/apigateway/Pair.java +++ b/src/main/java/saasus/sdk/apigateway/Pair.java @@ -13,7 +13,7 @@ package saasus.sdk.apigateway; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-08-13T06:27:47.035984428Z[Etc/UTC]") public class Pair { private String name = ""; private String value = ""; diff --git a/src/main/java/saasus/sdk/apigateway/StringUtil.java b/src/main/java/saasus/sdk/apigateway/StringUtil.java index 4114f1fe..704d2311 100644 --- a/src/main/java/saasus/sdk/apigateway/StringUtil.java +++ b/src/main/java/saasus/sdk/apigateway/StringUtil.java @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-08-13T06:27:47.035984428Z[Etc/UTC]") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/saasus/sdk/apigateway/api/SmartApiGatewayApi.java b/src/main/java/saasus/sdk/apigateway/api/SmartApiGatewayApi.java index 517b14e0..feb822bd 100644 --- a/src/main/java/saasus/sdk/apigateway/api/SmartApiGatewayApi.java +++ b/src/main/java/saasus/sdk/apigateway/api/SmartApiGatewayApi.java @@ -196,6 +196,119 @@ public okhttp3.Call applyDraftApiGatewaySettingsAsync(final ApiCallback _c localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } + /** + * Build call for cancelDraftApiGatewaySettings + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public okhttp3.Call cancelDraftApiGatewaySettingsCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/draft/settings/cancel"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "Bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call cancelDraftApiGatewaySettingsValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return cancelDraftApiGatewaySettingsCall(_callback); + + } + + /** + * Cancel draft configuration information for Smart API Gateway function + * Cancel draft configuration information for Smart API Gateway function. This cancels the changes made in the draft settings without applying them to the actual Smart API Gateway. + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public void cancelDraftApiGatewaySettings() throws ApiException { + cancelDraftApiGatewaySettingsWithHttpInfo(); + } + + /** + * Cancel draft configuration information for Smart API Gateway function + * Cancel draft configuration information for Smart API Gateway function. This cancels the changes made in the draft settings without applying them to the actual Smart API Gateway. + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public ApiResponse cancelDraftApiGatewaySettingsWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = cancelDraftApiGatewaySettingsValidateBeforeCall(null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Cancel draft configuration information for Smart API Gateway function (asynchronously) + * Cancel draft configuration information for Smart API Gateway function. This cancels the changes made in the draft settings without applying them to the actual Smart API Gateway. + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
500 Internal Server Error -
+ */ + public okhttp3.Call cancelDraftApiGatewaySettingsAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = cancelDraftApiGatewaySettingsValidateBeforeCall(_callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } /** * Build call for createApiGateway * @param _callback Callback for upload/download progress diff --git a/src/main/java/saasus/sdk/apigateway/auth/ApiKeyAuth.java b/src/main/java/saasus/sdk/apigateway/auth/ApiKeyAuth.java index 83ece22b..82a64f95 100644 --- a/src/main/java/saasus/sdk/apigateway/auth/ApiKeyAuth.java +++ b/src/main/java/saasus/sdk/apigateway/auth/ApiKeyAuth.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-08-13T06:27:47.035984428Z[Etc/UTC]") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/saasus/sdk/apigateway/auth/HttpBearerAuth.java b/src/main/java/saasus/sdk/apigateway/auth/HttpBearerAuth.java index b64d32fb..a078da10 100644 --- a/src/main/java/saasus/sdk/apigateway/auth/HttpBearerAuth.java +++ b/src/main/java/saasus/sdk/apigateway/auth/HttpBearerAuth.java @@ -22,7 +22,7 @@ import java.util.Optional; import java.util.function.Supplier; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-08-13T06:27:47.035984428Z[Etc/UTC]") public class HttpBearerAuth implements Authentication { private final String scheme; private Supplier tokenSupplier; diff --git a/src/main/java/saasus/sdk/apigateway/models/AbstractOpenApiSchema.java b/src/main/java/saasus/sdk/apigateway/models/AbstractOpenApiSchema.java index 321dac36..2bd65b99 100644 --- a/src/main/java/saasus/sdk/apigateway/models/AbstractOpenApiSchema.java +++ b/src/main/java/saasus/sdk/apigateway/models/AbstractOpenApiSchema.java @@ -21,7 +21,7 @@ /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-08-13T06:27:47.035984428Z[Etc/UTC]") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/src/main/java/saasus/sdk/apigateway/models/ApiGatewayInputFile.java b/src/main/java/saasus/sdk/apigateway/models/ApiGatewayInputFile.java index dca3b8f3..15d9708c 100644 --- a/src/main/java/saasus/sdk/apigateway/models/ApiGatewayInputFile.java +++ b/src/main/java/saasus/sdk/apigateway/models/ApiGatewayInputFile.java @@ -49,7 +49,7 @@ /** * ApiGatewayInputFile */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-08-13T06:27:47.035984428Z[Etc/UTC]") public class ApiGatewayInputFile { public static final String SERIALIZED_NAME_CONTENT = "content"; @SerializedName(SERIALIZED_NAME_CONTENT) diff --git a/src/main/java/saasus/sdk/apigateway/models/ApiGatewaySettings.java b/src/main/java/saasus/sdk/apigateway/models/ApiGatewaySettings.java index 9ff1554a..326e605b 100644 --- a/src/main/java/saasus/sdk/apigateway/models/ApiGatewaySettings.java +++ b/src/main/java/saasus/sdk/apigateway/models/ApiGatewaySettings.java @@ -54,7 +54,7 @@ /** * ApiGatewaySettings */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-08-13T06:27:47.035984428Z[Etc/UTC]") public class ApiGatewaySettings { public static final String SERIALIZED_NAME_GENERATED_FILE_STATUS = "generated_file_status"; @SerializedName(SERIALIZED_NAME_GENERATED_FILE_STATUS) diff --git a/src/main/java/saasus/sdk/apigateway/models/ApiGatewayTenant.java b/src/main/java/saasus/sdk/apigateway/models/ApiGatewayTenant.java index 801361ba..f2f6a681 100644 --- a/src/main/java/saasus/sdk/apigateway/models/ApiGatewayTenant.java +++ b/src/main/java/saasus/sdk/apigateway/models/ApiGatewayTenant.java @@ -52,7 +52,7 @@ /** * ApiGatewayTenant */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-08-13T06:27:47.035984428Z[Etc/UTC]") public class ApiGatewayTenant { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/saasus/sdk/apigateway/models/ApiKey.java b/src/main/java/saasus/sdk/apigateway/models/ApiKey.java index 1dddbd36..2c3f7816 100644 --- a/src/main/java/saasus/sdk/apigateway/models/ApiKey.java +++ b/src/main/java/saasus/sdk/apigateway/models/ApiKey.java @@ -49,7 +49,7 @@ /** * ApiKey */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-08-13T06:27:47.035984428Z[Etc/UTC]") public class ApiKey { public static final String SERIALIZED_NAME_API_KEY = "api_key"; @SerializedName(SERIALIZED_NAME_API_KEY) diff --git a/src/main/java/saasus/sdk/apigateway/models/ApiKeys.java b/src/main/java/saasus/sdk/apigateway/models/ApiKeys.java index db60cd8a..ea500273 100644 --- a/src/main/java/saasus/sdk/apigateway/models/ApiKeys.java +++ b/src/main/java/saasus/sdk/apigateway/models/ApiKeys.java @@ -52,7 +52,7 @@ /** * ApiKeys */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-08-13T06:27:47.035984428Z[Etc/UTC]") public class ApiKeys { public static final String SERIALIZED_NAME_API_KEYS = "api_keys"; @SerializedName(SERIALIZED_NAME_API_KEYS) diff --git a/src/main/java/saasus/sdk/apigateway/models/CloudFormationLaunchStackLink.java b/src/main/java/saasus/sdk/apigateway/models/CloudFormationLaunchStackLink.java index 300a9ec0..4e1caceb 100644 --- a/src/main/java/saasus/sdk/apigateway/models/CloudFormationLaunchStackLink.java +++ b/src/main/java/saasus/sdk/apigateway/models/CloudFormationLaunchStackLink.java @@ -49,7 +49,7 @@ /** * CloudFormationLaunchStackLink */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-08-13T06:27:47.035984428Z[Etc/UTC]") public class CloudFormationLaunchStackLink { public static final String SERIALIZED_NAME_LINK = "link"; @SerializedName(SERIALIZED_NAME_LINK) diff --git a/src/main/java/saasus/sdk/apigateway/models/CreateApiKeyParam.java b/src/main/java/saasus/sdk/apigateway/models/CreateApiKeyParam.java index dac44bd9..a22ce434 100644 --- a/src/main/java/saasus/sdk/apigateway/models/CreateApiKeyParam.java +++ b/src/main/java/saasus/sdk/apigateway/models/CreateApiKeyParam.java @@ -49,7 +49,7 @@ /** * CreateApiKeyParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-08-13T06:27:47.035984428Z[Etc/UTC]") public class CreateApiKeyParam { public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; @SerializedName(SERIALIZED_NAME_TENANT_ID) diff --git a/src/main/java/saasus/sdk/apigateway/models/DnsRecord.java b/src/main/java/saasus/sdk/apigateway/models/DnsRecord.java index 45429292..70c1f8bf 100644 --- a/src/main/java/saasus/sdk/apigateway/models/DnsRecord.java +++ b/src/main/java/saasus/sdk/apigateway/models/DnsRecord.java @@ -49,7 +49,7 @@ /** * DnsRecord */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-08-13T06:27:47.035984428Z[Etc/UTC]") public class DnsRecord { /** * CNAME Resource Record @@ -58,7 +58,9 @@ public class DnsRecord { public enum TypeEnum { CNAME("CNAME"), - TXT("TXT"); + TXT("TXT"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); private String value; @@ -81,7 +83,7 @@ public static TypeEnum fromValue(String value) { return b; } } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); + return UNKNOWN_DEFAULT_OPEN_API; } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/saasus/sdk/apigateway/models/DraftApiGatewaySettings.java b/src/main/java/saasus/sdk/apigateway/models/DraftApiGatewaySettings.java index f0cd52dc..768b3ebc 100644 --- a/src/main/java/saasus/sdk/apigateway/models/DraftApiGatewaySettings.java +++ b/src/main/java/saasus/sdk/apigateway/models/DraftApiGatewaySettings.java @@ -52,7 +52,7 @@ /** * DraftApiGatewaySettings */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-08-13T06:27:47.035984428Z[Etc/UTC]") public class DraftApiGatewaySettings { public static final String SERIALIZED_NAME_INTERNAL_ENDPOINT_OPENAPI_DEFINITION_FILE_DOWNLOAD_URL = "internal_endpoint_openapi_definition_file_download_url"; @SerializedName(SERIALIZED_NAME_INTERNAL_ENDPOINT_OPENAPI_DEFINITION_FILE_DOWNLOAD_URL) diff --git a/src/main/java/saasus/sdk/apigateway/models/EndpointSettings.java b/src/main/java/saasus/sdk/apigateway/models/EndpointSettings.java index 3c379ab6..b7d3618c 100644 --- a/src/main/java/saasus/sdk/apigateway/models/EndpointSettings.java +++ b/src/main/java/saasus/sdk/apigateway/models/EndpointSettings.java @@ -52,7 +52,7 @@ /** * Settings per endpoint */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-08-13T06:27:47.035984428Z[Etc/UTC]") public class EndpointSettings { public static final String SERIALIZED_NAME_PATH = "path"; @SerializedName(SERIALIZED_NAME_PATH) @@ -79,7 +79,9 @@ public enum MethodEnum { OPTIONS("OPTIONS"), - TRACE("TRACE"); + TRACE("TRACE"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); private String value; @@ -102,7 +104,7 @@ public static MethodEnum fromValue(String value) { return b; } } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); + return UNKNOWN_DEFAULT_OPEN_API; } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/saasus/sdk/apigateway/models/Error.java b/src/main/java/saasus/sdk/apigateway/models/Error.java index 904d3053..5fa3112d 100644 --- a/src/main/java/saasus/sdk/apigateway/models/Error.java +++ b/src/main/java/saasus/sdk/apigateway/models/Error.java @@ -49,7 +49,7 @@ /** * Error */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-08-13T06:27:47.035984428Z[Etc/UTC]") public class Error { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/src/main/java/saasus/sdk/apigateway/models/TenantRouting.java b/src/main/java/saasus/sdk/apigateway/models/TenantRouting.java index c63699d8..6009af10 100644 --- a/src/main/java/saasus/sdk/apigateway/models/TenantRouting.java +++ b/src/main/java/saasus/sdk/apigateway/models/TenantRouting.java @@ -49,7 +49,7 @@ /** * Information about tenant routing. Refer to the tenant_routing_type in ApiGatewaySettings and route the request. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-08-13T06:27:47.035984428Z[Etc/UTC]") public class TenantRouting { public static final String SERIALIZED_NAME_PATH = "path"; @SerializedName(SERIALIZED_NAME_PATH) diff --git a/src/main/java/saasus/sdk/apigateway/models/TenantRoutingType.java b/src/main/java/saasus/sdk/apigateway/models/TenantRoutingType.java index 5ccd0b4c..c06d1a91 100644 --- a/src/main/java/saasus/sdk/apigateway/models/TenantRoutingType.java +++ b/src/main/java/saasus/sdk/apigateway/models/TenantRoutingType.java @@ -35,7 +35,9 @@ public enum TenantRoutingType { HEADERVALUE("headerValue"), - NONE("none"); + NONE("none"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); private String value; @@ -58,7 +60,7 @@ public static TenantRoutingType fromValue(String value) { return b; } } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); + return UNKNOWN_DEFAULT_OPEN_API; } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/saasus/sdk/apigateway/models/Throttling.java b/src/main/java/saasus/sdk/apigateway/models/Throttling.java index 0929edb6..d3b585ea 100644 --- a/src/main/java/saasus/sdk/apigateway/models/Throttling.java +++ b/src/main/java/saasus/sdk/apigateway/models/Throttling.java @@ -49,7 +49,7 @@ /** * Permit requests up to the limit number of times within a range (seconds) time for each target. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-08-13T06:27:47.035984428Z[Etc/UTC]") public class Throttling { /** * Target of restriction @@ -58,7 +58,9 @@ public class Throttling { public enum TargetEnum { TENANT("tenant"), - USER("user"); + USER("user"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); private String value; @@ -81,7 +83,7 @@ public static TargetEnum fromValue(String value) { return b; } } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); + return UNKNOWN_DEFAULT_OPEN_API; } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/saasus/sdk/apigateway/models/UpdateApiGatewaySettingsParam.java b/src/main/java/saasus/sdk/apigateway/models/UpdateApiGatewaySettingsParam.java index 5773188c..658ea648 100644 --- a/src/main/java/saasus/sdk/apigateway/models/UpdateApiGatewaySettingsParam.java +++ b/src/main/java/saasus/sdk/apigateway/models/UpdateApiGatewaySettingsParam.java @@ -53,7 +53,7 @@ /** * UpdateApiGatewaySettingsParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-08-13T06:27:47.035984428Z[Etc/UTC]") public class UpdateApiGatewaySettingsParam { public static final String SERIALIZED_NAME_ROLE_ARN = "role_arn"; @SerializedName(SERIALIZED_NAME_ROLE_ARN) diff --git a/src/main/java/saasus/sdk/apigateway/models/UpdateOpenApiDefinitionParam.java b/src/main/java/saasus/sdk/apigateway/models/UpdateOpenApiDefinitionParam.java index fcd49dfb..87b86a17 100644 --- a/src/main/java/saasus/sdk/apigateway/models/UpdateOpenApiDefinitionParam.java +++ b/src/main/java/saasus/sdk/apigateway/models/UpdateOpenApiDefinitionParam.java @@ -49,7 +49,7 @@ /** * UpdateOpenApiDefinitionParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-08-13T06:27:47.035984428Z[Etc/UTC]") public class UpdateOpenApiDefinitionParam { public static final String SERIALIZED_NAME_CONTENT = "content"; @SerializedName(SERIALIZED_NAME_CONTENT) diff --git a/src/main/java/saasus/sdk/apigateway/models/UpdateTenantParam.java b/src/main/java/saasus/sdk/apigateway/models/UpdateTenantParam.java index 5235c18d..cc58eefa 100644 --- a/src/main/java/saasus/sdk/apigateway/models/UpdateTenantParam.java +++ b/src/main/java/saasus/sdk/apigateway/models/UpdateTenantParam.java @@ -52,7 +52,7 @@ /** * UpdateTenantParam */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-12T22:51:41.504076208Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-08-13T06:27:47.035984428Z[Etc/UTC]") public class UpdateTenantParam { public static final String SERIALIZED_NAME_ALLOWED_IPS = "allowed_ips"; @SerializedName(SERIALIZED_NAME_ALLOWED_IPS) diff --git a/src/test/java/saasus/sdk/apigateway/api/SmartApiGatewayApiTest.java b/src/test/java/saasus/sdk/apigateway/api/SmartApiGatewayApiTest.java index c1eff8ac..7a3b2606 100644 --- a/src/test/java/saasus/sdk/apigateway/api/SmartApiGatewayApiTest.java +++ b/src/test/java/saasus/sdk/apigateway/api/SmartApiGatewayApiTest.java @@ -55,6 +55,19 @@ public void applyDraftApiGatewaySettingsTest() throws ApiException { // TODO: test validations } + /** + * Cancel draft configuration information for Smart API Gateway function + * + * Cancel draft configuration information for Smart API Gateway function. This cancels the changes made in the draft settings without applying them to the actual Smart API Gateway. + * + * @throws ApiException if the Api call fails + */ + @Test + public void cancelDraftApiGatewaySettingsTest() throws ApiException { + api.cancelDraftApiGatewaySettings(); + // TODO: test validations + } + /** * Create the API Gateway *