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..5c682356 --- /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. | | +|**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 | | +|**mcpServerUrl** | **String** | URL of the MCP (Model Context Protocol) server for Smart API Gateway | | + + + 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..db0eefa3 --- /dev/null +++ b/docs/apigateway/DnsRecord.md @@ -0,0 +1,25 @@ + + +# 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" | +| UNKNOWN_DEFAULT_OPEN_API | "unknown_default_open_api" | + + + 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/EndpointSettings.md b/docs/apigateway/EndpointSettings.md new file mode 100644 index 00000000..26c8adb3 --- /dev/null +++ b/docs/apigateway/EndpointSettings.md @@ -0,0 +1,35 @@ + + +# EndpointSettings + +Settings per endpoint + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**path** | **String** | Path | | +|**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 | | + + + +## Enum: MethodEnum + +| Name | Value | +|---- | -----| +| GET | "GET" | +| HEAD | "HEAD" | +| POST | "POST" | +| PUT | "PUT" | +| PATCH | "PATCH" | +| DELETE | "DELETE" | +| CONNECT | "CONNECT" | +| OPTIONS | "OPTIONS" | +| TRACE | "TRACE" | +| UNKNOWN_DEFAULT_OPEN_API | "unknown_default_open_api" | + + + 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..8e2d1bce --- /dev/null +++ b/docs/apigateway/SmartApiGatewayApi.md @@ -0,0 +1,1148 @@ +# SmartApiGatewayApi + +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 | +| [**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 | +| [**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 | + + + +# **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 | - | + + +# **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() + +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 | - | + + +# **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) + +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 | - | + + +# **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) + +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..b1fae836 --- /dev/null +++ b/docs/apigateway/TenantRoutingType.md @@ -0,0 +1,19 @@ + + +# TenantRoutingType + +## Enum + + +* `PATH` (value: `"path"`) + +* `HOSTNAME` (value: `"hostName"`) + +* `HEADERVALUE` (value: `"headerValue"`) + +* `NONE` (value: `"none"`) + +* `UNKNOWN_DEFAULT_OPEN_API` (value: `"unknown_default_open_api"`) + + + diff --git a/docs/apigateway/Throttling.md b/docs/apigateway/Throttling.md new file mode 100644 index 00000000..bc2dbf4e --- /dev/null +++ b/docs/apigateway/Throttling.md @@ -0,0 +1,26 @@ + + +# 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" | +| UNKNOWN_DEFAULT_OPEN_API | "unknown_default_open_api" | + + + 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/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/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..8cea3c39 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" @@ -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,enumUnknownDefaultCase=true done for module in ${MODULES} 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/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..a0946f6c --- /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-08-13T06:27:47.035984428Z[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..0d5f1755 --- /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-08-13T06:27:47.035984428Z[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..1a9427ef --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/JSON.java @@ -0,0 +1,416 @@ +/* + * 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.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()); + 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(); + } + + /** + * 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..98bdeb4e --- /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-08-13T06:27:47.035984428Z[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..704d2311 --- /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-08-13T06:27:47.035984428Z[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..feb822bd --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/api/SmartApiGatewayApi.java @@ -0,0 +1,2156 @@ +/* + * 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.DraftApiGatewaySettings; +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; +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 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 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 + * @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 getDraftApiGatewaySettings + * @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 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) + * @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 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) + * @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..82a64f95 --- /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-08-13T06:27:47.035984428Z[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..a078da10 --- /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-08-13T06:27:47.035984428Z[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..2bd65b99 --- /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-08-13T06:27:47.035984428Z[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..15d9708c --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/models/ApiGatewayInputFile.java @@ -0,0 +1,290 @@ +/* + * 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-08-13T06:27:47.035984428Z[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; + } + + /** + * 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 + 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)&& + Objects.equals(this.additionalProperties, apiGatewayInputFile.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(content, additionalProperties); + } + + @Override + 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(); + } + + /** + * 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())); + } + } + + // 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(); + 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 ApiGatewayInputFile read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(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(); + } + } + + /** + * 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..326e605b --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/models/ApiGatewaySettings.java @@ -0,0 +1,971 @@ +/* + * 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-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) + 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_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 static final String SERIALIZED_NAME_MCP_SERVER_URL = "mcp_server_url"; + @SerializedName(SERIALIZED_NAME_MCP_SERVER_URL) + private String mcpServerUrl; + + 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 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; + } + + + 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 + * 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 + 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.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) && + Objects.equals(this.mcpServerUrl, apiGatewaySettings.mcpServerUrl)&& + Objects.equals(this.additionalProperties, apiGatewaySettings.additionalProperties); + } + + @Override + public int hashCode() { + 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 + 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(" 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(" mcpServerUrl: ").append(toIndentedString(mcpServerUrl)).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("generated_file_status"); + openapiFields.add("internal_endpoint_openapi_definition_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"); + 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("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"); + openapiRequiredFields.add("mcp_server_url"); + } + + /** + * 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())); + } + } + + // 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("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())); + } + 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 { + @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(); + 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 ApiGatewaySettings read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(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(); + } + } + + /** + * 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..f2f6a681 --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/models/ApiGatewayTenant.java @@ -0,0 +1,363 @@ +/* + * 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-08-13T06:27:47.035984428Z[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; + } + + /** + * 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 + 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)&& + Objects.equals(this.additionalProperties, apiGatewayTenant.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, allowedIps, routing, additionalProperties); + } + + @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(" 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("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())); + } + } + + // 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(); + 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 ApiGatewayTenant read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(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(); + } + } + + /** + * 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..2c3f7816 --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/models/ApiKey.java @@ -0,0 +1,406 @@ +/* + * 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-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) + 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; + } + + /** + * 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 + 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)&& + Objects.equals(this.additionalProperties, apiKey.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(apiKey, clientSecret, tenantId, envId, userId, additionalProperties); + } + + @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(" 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("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())); + } + } + + // 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(); + 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 ApiKey read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(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(); + } + } + + /** + * 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..ea500273 --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/models/ApiKeys.java @@ -0,0 +1,308 @@ +/* + * 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-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) + 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; + } + + /** + * 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 + 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)&& + Objects.equals(this.additionalProperties, apiKeys.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(apiKeys, additionalProperties); + } + + @Override + 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(); + } + + /** + * 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())); + } + } + + // 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(); + 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 ApiKeys read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(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(); + } + } + + /** + * 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..4e1caceb --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/models/CloudFormationLaunchStackLink.java @@ -0,0 +1,290 @@ +/* + * 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-08-13T06:27:47.035984428Z[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; + } + + /** + * 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 + 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)&& + Objects.equals(this.additionalProperties, cloudFormationLaunchStackLink.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(link, additionalProperties); + } + + @Override + 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(); + } + + /** + * 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())); + } + } + + // 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(); + 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 CloudFormationLaunchStackLink read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(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(); + } + } + + /** + * 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..a22ce434 --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/models/CreateApiKeyParam.java @@ -0,0 +1,346 @@ +/* + * 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-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) + 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; + } + + /** + * 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 + 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)&& + Objects.equals(this.additionalProperties, createApiKeyParam.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(tenantId, envId, userId, additionalProperties); + } + + @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(" 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("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())); + } + } + + // 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(); + 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 CreateApiKeyParam read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(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(); + } + } + + /** + * 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..70c1f8bf --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/models/DnsRecord.java @@ -0,0 +1,406 @@ +/* + * 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-08-13T06:27:47.035984428Z[Etc/UTC]") +public class DnsRecord { + /** + * CNAME Resource Record + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + CNAME("CNAME"), + + TXT("TXT"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + 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; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } + + 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; + } + + /** + * 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 + 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)&& + Objects.equals(this.additionalProperties, dnsRecord.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(type, name, value, additionalProperties); + } + + @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(" 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("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())); + } + } + + // 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(); + 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 DnsRecord read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(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(); + } + } + + /** + * 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/DraftApiGatewaySettings.java b/src/main/java/saasus/sdk/apigateway/models/DraftApiGatewaySettings.java new file mode 100644 index 00000000..768b3ebc --- /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-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) + 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 new file mode 100644 index 00000000..b7d3618c --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/models/EndpointSettings.java @@ -0,0 +1,506 @@ +/* + * 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-08-13T06:27:47.035984428Z[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"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + 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; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } + + 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_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) + 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() { + } + + 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 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; + } + + /** + * Throttling settings for each target TODO: Make it possible to set multiple settings in the future + * @return throttlings + **/ + @javax.annotation.Nonnull + public List getThrottlings() { + return throttlings; + } + + public void setThrottlings(List throttlings) { + this.throttlings = throttlings; + } + + + 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; + } + + + 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; + } + + /** + * 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 + 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.throttlings, endpointSettings.throttlings) && + Objects.equals(this.roleNames, endpointSettings.roleNames) && + Objects.equals(this.mappingEndpointId, endpointSettings.mappingEndpointId)&& + Objects.equals(this.additionalProperties, endpointSettings.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(path, method, throttlings, roleNames, mappingEndpointId, additionalProperties); + } + + @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(" 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(); + } + + /** + * 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("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"); + } + + /** + * 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())); + } + } + + // 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")); + // 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())); + } + 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 { + @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(); + 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 EndpointSettings read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(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(); + } + } + + /** + * 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..5fa3112d --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/models/Error.java @@ -0,0 +1,320 @@ +/* + * 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-08-13T06:27:47.035984428Z[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; + } + + /** + * 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 + 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)&& + Objects.equals(this.additionalProperties, error.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(type, message, additionalProperties); + } + + @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(" 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("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())); + } + } + + // 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(); + 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 Error read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(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(); + } + } + + /** + * 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..6009af10 --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/models/TenantRouting.java @@ -0,0 +1,369 @@ +/* + * 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-08-13T06:27:47.035984428Z[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; + } + + /** + * 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 + 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)&& + Objects.equals(this.additionalProperties, tenantRouting.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(path, headerKey, headerValue, hostName, additionalProperties); + } + + @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(" 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("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())); + } + } + 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(); + 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 TenantRouting read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(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(); + } + } + + /** + * 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..c06d1a91 --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/models/TenantRoutingType.java @@ -0,0 +1,84 @@ +/* + * 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"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + 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; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } + + 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..d3b585ea --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/models/Throttling.java @@ -0,0 +1,402 @@ +/* + * 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-08-13T06:27:47.035984428Z[Etc/UTC]") +public class Throttling { + /** + * Target of restriction + */ + @JsonAdapter(TargetEnum.Adapter.class) + public enum TargetEnum { + TENANT("tenant"), + + USER("user"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + 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; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } + + 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; + } + + /** + * 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 + 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)&& + Objects.equals(this.additionalProperties, throttling.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(target, range, limit, additionalProperties); + } + + @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(" 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("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())); + } + } + + // 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(); + 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 Throttling read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(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(); + } + } + + /** + * 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..658ea648 --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/models/UpdateApiGatewaySettingsParam.java @@ -0,0 +1,631 @@ +/* + * 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-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) + 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; + } + + /** + * 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 + 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)&& + 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, additionalProperties); + } + + @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(" 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("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())); + } + } + 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(); + 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 UpdateApiGatewaySettingsParam read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(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(); + } + } + + /** + * 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/UpdateOpenApiDefinitionParam.java b/src/main/java/saasus/sdk/apigateway/models/UpdateOpenApiDefinitionParam.java new file mode 100644 index 00000000..87b86a17 --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/models/UpdateOpenApiDefinitionParam.java @@ -0,0 +1,290 @@ +/* + * 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-08-13T06:27:47.035984428Z[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; + } + + /** + * 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 + 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)&& + Objects.equals(this.additionalProperties, updateOpenApiDefinitionParam.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(content, additionalProperties); + } + + @Override + 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(); + } + + /** + * 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())); + } + } + + // 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(); + 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 UpdateOpenApiDefinitionParam read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(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(); + } + } + + /** + * 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 new file mode 100644 index 00000000..cc58eefa --- /dev/null +++ b/src/main/java/saasus/sdk/apigateway/models/UpdateTenantParam.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.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-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) + 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; + } + + /** + * 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 + 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)&& + Objects.equals(this.additionalProperties, updateTenantParam.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(allowedIps, routing, additionalProperties); + } + + @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(" 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("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())); + } + } + 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(); + 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 UpdateTenantParam read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(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(); + } + } + + /** + * 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..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 = "2024-08-16T05:09:40.405574501Z[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 d01fb3e0..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 = "2024-08-16T05:09:40.405574501Z[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 d7f922bf..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 = "2024-08-16T05:09:40.405574501Z[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 ed14f572..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 = "2024-08-16T05:09:40.405574501Z[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 8271eba1..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 = "2024-08-16T05:09:40.405574501Z[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 daa36959..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 = "2024-08-16T05:09:40.405574501Z[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 8a01401b..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 = "2024-08-16T05:09:40.405574501Z[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 9464bd23..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 = "2024-08-16T05:09:40.405574501Z[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 f6c31734..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 = "2024-08-16T05:09:40.405574501Z[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 f1a63a25..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 = "2024-08-16T05:09:40.405574501Z[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 ca3528f3..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 = "2024-08-16T05:09:21.529968105Z[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 81cc9f07..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 = "2024-08-16T05:09:21.529968105Z[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 743623a7..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 = "2024-08-16T05:09:21.529968105Z[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 588dcc42..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 = "2024-08-16T05:09:21.529968105Z[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/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..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 = "2024-08-16T05:09:21.529968105Z[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 7c72344f..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 = "2024-08-16T05:09:21.529968105Z[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 c210edbf..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 = "2024-08-16T05:09:21.529968105Z[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 d7f49785..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 = "2024-08-16T05:09:21.529968105Z[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 ed3efc79..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 = "2024-08-16T05:09:21.529968105Z[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 718bf846..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 = "2024-08-16T05:09:21.529968105Z[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 e8be2e1d..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 = "2024-08-16T05:09:21.529968105Z[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 264a6d47..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 = "2024-08-16T05:09:21.529968105Z[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 53d449d8..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 = "2024-08-16T05:09:21.529968105Z[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 f483146b..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 = "2024-08-16T05:09:21.529968105Z[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 92ebc622..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 = "2024-08-16T05:09:21.529968105Z[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 d8ba0b18..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 = "2024-08-16T05:09:21.529968105Z[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 641c1556..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 = "2024-08-16T05:09:21.529968105Z[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 729c7720..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 = "2024-08-16T05:09:21.529968105Z[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 97002a50..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 = "2024-08-16T05:09:21.529968105Z[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 a73de51d..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 = "2024-08-16T05:09:21.529968105Z[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 e45ff43c..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 = "2024-08-16T05:09:21.529968105Z[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) @@ -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..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 = "2024-08-16T05:09:21.529968105Z[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 d20b0741..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 = "2024-08-16T05:09:21.529968105Z[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 bf7ff620..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 = "2024-08-16T05:09:21.529968105Z[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 81f263ee..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 = "2024-08-16T05:09:21.529968105Z[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 3a5a8144..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 = "2024-08-16T05:09:21.529968105Z[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 fee6b0ea..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 = "2024-08-16T05:09:21.529968105Z[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 df3d0bd5..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 = "2024-08-16T05:09:21.529968105Z[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 46f36acd..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 = "2024-08-16T05:09:21.529968105Z[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 3f15fc09..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 = "2024-08-16T05:09:21.529968105Z[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 2bc4b007..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 = "2024-08-16T05:09:21.529968105Z[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 15600cc9..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 = "2024-08-16T05:09:21.529968105Z[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 67e28e7f..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 = "2024-08-16T05:09:21.529968105Z[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 c5b874a9..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 = "2024-08-16T05:09:21.529968105Z[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 397f988b..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 = "2024-08-16T05:09:21.529968105Z[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 ad78531f..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 = "2024-08-16T05:09:21.529968105Z[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 8ccb7918..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 = "2024-08-16T05:09:21.529968105Z[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 74df485a..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 = "2024-08-16T05:09:21.529968105Z[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 4f252b16..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 = "2024-08-16T05:09:21.529968105Z[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 705e1d2b..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 = "2024-08-16T05:09:21.529968105Z[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 abb0af21..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 = "2024-08-16T05:09:21.529968105Z[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 bc012d82..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 = "2024-08-16T05:09:21.529968105Z[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 6db7c51d..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 = "2024-08-16T05:09:21.529968105Z[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 e31af93b..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 = "2024-08-16T05:09:21.529968105Z[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 3f5967b9..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 = "2024-08-16T05:09:21.529968105Z[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 90f1ff2d..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 = "2024-08-16T05:09:21.529968105Z[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 78ed0fbb..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 = "2024-08-16T05:09:21.529968105Z[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 bd3644d0..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 = "2024-08-16T05:09:21.529968105Z[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 326f054f..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 = "2024-08-16T05:09:21.529968105Z[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 70d82aca..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 = "2024-08-16T05:09:21.529968105Z[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 9c97b16b..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 = "2024-08-16T05:09:21.529968105Z[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 f80e2bd5..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 = "2024-08-16T05:09:21.529968105Z[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 ec8d5aa2..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 = "2024-08-16T05:09:21.529968105Z[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 10b51613..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 = "2024-08-16T05:09:21.529968105Z[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 56775e97..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 = "2024-08-16T05:09:21.529968105Z[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 9fad3ad7..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 = "2024-08-16T05:09:21.529968105Z[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 0636e3a6..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 = "2024-08-16T05:09:21.529968105Z[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 11109c99..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 = "2024-08-16T05:09:21.529968105Z[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 5cf8c724..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 = "2024-08-16T05:09:21.529968105Z[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 ea7273c1..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 = "2024-08-16T05:09:21.529968105Z[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 93f38f7f..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 = "2024-08-16T05:09:21.529968105Z[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 af3c9300..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 = "2024-08-16T05:09:21.529968105Z[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 ba93ba06..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 = "2024-08-16T05:09:21.529968105Z[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 a33550df..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 = "2024-08-16T05:09:21.529968105Z[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 b8a27de1..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 = "2024-08-16T05:09:21.529968105Z[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 593ff051..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 = "2024-08-16T05:09:21.529968105Z[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 2a45af5d..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 = "2024-08-16T05:09:21.529968105Z[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 34875b08..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 = "2024-08-16T05:09:21.529968105Z[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 0558394f..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 = "2024-08-16T05:09:21.529968105Z[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 c21b7803..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 = "2024-08-16T05:09:21.529968105Z[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 55e7c9c8..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 = "2024-08-16T05:09:21.529968105Z[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 d35f6952..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 = "2024-08-16T05:09:21.529968105Z[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 fe6e621b..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 = "2024-08-16T05:09:21.529968105Z[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 1e34fa1e..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 = "2024-08-16T05:09:21.529968105Z[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 e12afb89..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 = "2024-08-16T05:09:21.529968105Z[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 b324da40..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 = "2024-08-16T05:09:21.529968105Z[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 a0605538..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 = "2024-08-16T05:09:21.529968105Z[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 1e85986d..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 = "2024-08-16T05:09:21.529968105Z[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 bdc74d35..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 = "2024-08-16T05:09:21.529968105Z[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 bb9ee2cd..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 = "2024-08-16T05:09:21.529968105Z[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 2cff150c..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 = "2024-08-16T05:09:21.529968105Z[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 7d26d3dd..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 = "2024-08-16T05:09:21.529968105Z[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 7a851efa..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 = "2024-08-16T05:09:21.529968105Z[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 7280438d..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 = "2024-08-16T05:09:21.529968105Z[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 0fb201c2..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 = "2024-08-16T05:09:21.529968105Z[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 c43df0df..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 = "2024-08-16T05:09:21.529968105Z[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 5f971231..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 = "2024-08-16T05:09:21.529968105Z[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 09923888..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 = "2024-08-16T05:09:21.529968105Z[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 29bc6c0a..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 = "2024-08-16T05:09:21.529968105Z[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 d01baa84..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 = "2024-08-16T05:09:21.529968105Z[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 1a43b8c5..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 = "2024-08-16T05:09:21.529968105Z[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 1caaaec8..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 = "2024-08-16T05:09:21.529968105Z[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 5c489e09..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 = "2024-08-16T05:09:21.529968105Z[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 1f0f661e..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 = "2024-08-16T05:09:21.529968105Z[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 b4aead38..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 = "2024-08-16T05:09:21.529968105Z[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 40cd27ad..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 = "2024-08-16T05:09:21.529968105Z[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 59a874b1..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 = "2024-08-16T05:09:34.280462778Z[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 04383cb2..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 = "2024-08-16T05:09:34.280462778Z[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 0443e27e..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 = "2024-08-16T05:09:34.280462778Z[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 a75a4dd3..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 = "2024-08-16T05:09:34.280462778Z[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 84f5dfcb..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 = "2024-08-16T05:09:34.280462778Z[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 48cd7f0f..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 = "2024-08-16T05:09:34.280462778Z[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 922e961d..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 = "2024-08-16T05:09:34.280462778Z[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 74aadf15..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 = "2024-08-16T05:09:34.280462778Z[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 c5f5edb1..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 = "2024-08-16T05:09:34.280462778Z[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 12d6eaea..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 = "2024-08-16T05:09:34.280462778Z[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 bbfe3e54..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 = "2024-08-16T05:09:34.280462778Z[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 415fcdd1..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 = "2024-08-16T05:09:34.280462778Z[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 11aa8d00..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 = "2024-08-16T05:09:34.280462778Z[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 8584f878..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 = "2024-08-16T05:09:34.280462778Z[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 01a231dd..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 = "2024-08-16T05:09:34.280462778Z[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 69efb7e1..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 = "2024-08-16T05:09:34.280462778Z[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 0f740d5f..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 = "2024-08-16T05:09:34.280462778Z[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 a3e2775b..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 = "2024-08-16T05:09:34.280462778Z[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 7bbc1290..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 = "2024-08-16T05:09:34.280462778Z[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 7dd9c1ab..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 = "2024-08-16T05:09:34.280462778Z[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 c3a64ce5..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 = "2024-08-16T05:09:34.280462778Z[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 00c9fa55..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 = "2024-08-16T05:09:31.552713001Z[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 9fc43586..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 = "2024-08-16T05:09:31.552713001Z[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 fb86f357..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 = "2024-08-16T05:09:31.552713001Z[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 62c72d40..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 = "2024-08-16T05:09:31.552713001Z[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 94495206..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 = "2024-08-16T05:09:31.552713001Z[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 63707f08..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 = "2024-08-16T05:09:31.552713001Z[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 98f976a0..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 = "2024-08-16T05:09:31.552713001Z[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 2971849c..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 = "2024-08-16T05:09:31.552713001Z[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 06c8a3c5..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 = "2024-08-16T05:09:31.552713001Z[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 fa1a411e..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 = "2024-08-16T05:09:31.552713001Z[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 809f7ed4..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 = "2024-08-16T05:09:43.518804990Z[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 60fd9836..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 = "2024-08-16T05:09:43.518804990Z[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 1b1e4593..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 = "2024-08-16T05:09:43.518804990Z[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 4d6c31d4..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 = "2024-08-16T05:09:43.518804990Z[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 9eae7cd1..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 = "2024-08-16T05:09:43.518804990Z[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 7a994a12..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 = "2024-08-16T05:09:43.518804990Z[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 2db044a5..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 = "2024-08-16T05:09:43.518804990Z[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 6db183cf..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 = "2024-08-16T05:09:43.518804990Z[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 8c59438f..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 = "2024-08-16T05:09:43.518804990Z[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 c0b438a9..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 = "2024-08-16T05:09:43.518804990Z[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 bbbe9729..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 = "2024-08-16T05:09:43.518804990Z[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 e15875a0..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 = "2024-08-16T05:09:43.518804990Z[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 fe58e533..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 = "2024-08-16T05:09:43.518804990Z[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 1091703b..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 = "2024-08-16T05:09:43.518804990Z[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 9a200e07..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 = "2024-08-16T05:09:43.518804990Z[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 1eca26ab..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 = "2024-08-16T05:09:43.518804990Z[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 ffbee104..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 = "2024-08-16T05:09:43.518804990Z[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 e8aefd6a..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 = "2024-08-16T05:09:43.518804990Z[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 3ba1a0a9..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 = "2024-08-16T05:09:43.518804990Z[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 03e2a059..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 = "2024-08-16T05:09:43.518804990Z[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 6e0582f4..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 = "2024-08-16T05:09:43.518804990Z[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 5fa2c777..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 = "2024-08-16T05:09:43.518804990Z[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 5e4bdd8b..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 = "2024-08-16T05:09:37.438939707Z[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 d7d81044..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 = "2024-08-16T05:09:37.438939707Z[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 b1274435..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 = "2024-08-16T05:09:37.438939707Z[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 c01545ed..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 = "2024-08-16T05:09:37.438939707Z[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 86c87975..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 = "2024-08-16T05:09:37.438939707Z[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 15817b9c..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 = "2024-08-16T05:09:37.438939707Z[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 809767e5..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 = "2024-08-16T05:09:37.438939707Z[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 a64f288a..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 = "2024-08-16T05:09:37.438939707Z[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 e45e543e..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 = "2024-08-16T05:09:37.438939707Z[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 574f71d8..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 = "2024-08-16T05:09:37.438939707Z[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 182ddf15..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 = "2024-08-16T05:09:37.438939707Z[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/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/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(); +} diff --git a/src/main/java/saasus/sdk/pricing/ApiException.java b/src/main/java/saasus/sdk/pricing/ApiException.java index c06041c9..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 = "2024-08-16T05:09:27.364679080Z[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 d915b306..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 = "2024-08-16T05:09:27.364679080Z[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/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..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 = "2024-08-16T05:09:27.364679080Z[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 e30b6a1f..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 = "2024-08-16T05:09:27.364679080Z[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 f72d740e..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 = "2024-08-16T05:09:27.364679080Z[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 c66cf1e8..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 = "2024-08-16T05:09:27.364679080Z[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 5177723a..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 = "2024-08-16T05:09:27.364679080Z[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 cf69d770..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 = "2024-08-16T05:09:27.364679080Z[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 47c349c3..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 = "2024-08-16T05:09:27.364679080Z[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 c68f3d0e..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 = "2024-08-16T05:09:27.364679080Z[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 ce26b762..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 = "2024-08-16T05:09:27.364679080Z[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 47b118ff..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 = "2024-08-16T05:09:27.364679080Z[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 6cca313e..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 = "2024-08-16T05:09:27.364679080Z[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 58e05084..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 = "2024-08-16T05:09:27.364679080Z[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 c481a7cd..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 = "2024-08-16T05:09:27.364679080Z[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 9a38392e..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 = "2024-08-16T05:09:27.364679080Z[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 d650a128..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 = "2024-08-16T05:09:27.364679080Z[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 ac759c43..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 = "2024-08-16T05:09:27.364679080Z[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 1fc334dc..2e00eb9a 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-16T05:24:34.475188381Z[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..0f25debe 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-16T05:24:34.475188381Z[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..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 = "2024-08-16T05:09:27.364679080Z[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 183edcef..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 = "2024-08-16T05:09:27.364679080Z[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 62d22f2c..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 = "2024-08-16T05:09:27.364679080Z[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 a2a43273..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 = "2024-08-16T05:09:27.364679080Z[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 e6c45625..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 = "2024-08-16T05:09:27.364679080Z[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 c467ec47..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 = "2024-08-16T05:09:27.364679080Z[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 37e33394..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 = "2024-08-16T05:09:27.364679080Z[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 2cba6dd7..c0da3bc9 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-16T05:24:34.475188381Z[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..37d315a1 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-16T05:24:34.475188381Z[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..a612a290 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-16T05:24:34.475188381Z[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..f8a74f76 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-16T05:24:34.475188381Z[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..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 = "2024-08-16T05:09:27.364679080Z[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 eb5b8dbf..0ae8bc7c 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-16T05:24:34.475188381Z[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..11a2a9c0 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-16T05:24:34.475188381Z[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..dadd9ef5 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-16T05:24:34.475188381Z[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..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 = "2024-08-16T05:09:27.364679080Z[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 40309216..86edfdf5 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-16T05:24:34.475188381Z[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..f69f7256 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-16T05:24:34.475188381Z[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..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 = "2024-08-16T05:09:27.364679080Z[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 22349a5e..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 = "2024-08-16T05:09:27.364679080Z[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 bbf50c33..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 = "2024-08-16T05:09:27.364679080Z[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 c7fd2262..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 = "2024-08-16T05:09:27.364679080Z[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 7d66aae4..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 = "2024-08-16T05:09:27.364679080Z[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 6ff8b491..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 = "2024-08-16T05:09:27.364679080Z[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 8c7128d4..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 = "2024-08-16T05:09:27.364679080Z[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 cf893eda..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 = "2024-08-16T05:09:27.364679080Z[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 226c26a1..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 = "2024-08-16T05:09:27.364679080Z[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/main/java/saasus/sdk/util/apiserver/ApiServer.java b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java new file mode 100644 index 00000000..ca75b024 --- /dev/null +++ b/src/main/java/saasus/sdk/util/apiserver/ApiServer.java @@ -0,0 +1,601 @@ +package saasus.sdk.util.apiserver; + +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.concurrent.ConcurrentHashMap; +import java.util.logging.Level; +import java.util.logging.Logger; +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.datatype.jsr310.JavaTimeModule; +import com.sun.net.httpserver.HttpExchange; +import com.sun.net.httpserver.HttpHandler; +import com.sun.net.httpserver.HttpServer; + +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.modules.ApiGatewayApiClient; +import saasus.sdk.modules.Configuration; + +public class ApiServer { + 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(); + } + + boolean isExpired() { + return System.currentTimeMillis() - timestamp > CACHE_DURATION; + } + } + + 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(); + 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 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; + } + + // キャッシュが無効または期限切れの場合、新しいデータを取得 + if (DEBUG) + logger.info("Fetching fresh API data for key: " + apiKey); + + ApiGatewayApiClient apiClient = configuration.getApiGatewayApiClient(); + SmartApiGatewayApi apiInstance = new SmartApiGatewayApi(apiClient); + + try { + // 一度に必要なデータを全て取得 + ApiGatewaySettings settings = apiInstance.getApiGatewaySettings(); + 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); + + 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; + } + } + + private boolean verifySignature(HttpExchange exchange, CachedApiData apiData) { + if (DEBUG) + logger.info("Starting signature verification"); + + 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"); + + if (apiData == null) { + if (DEBUG) + 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 true; + } + + String adjustedPath = rawPath; + String pathWithQuery = query != null && !query.isEmpty() ? rawPath + "?" + query : rawPath; + + // テナントルーティングの処理 + 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"); + } + } + } + + // エンドポイントマッピングの確認(プロトコルを含む完全なURL形式) + String verificationPath = "https://" + 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 = "https://" + requestHost + originalPathWithQuery; + break; + } + } + } + + // Authorization ヘッダーの解析 + String authHeader = exchange.getRequestHeaders().getFirst("Authorization"); + if (authHeader == null || authHeader.isEmpty()) { + 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()) { + if (DEBUG) + logger.warning("Invalid Authorization header format"); + return false; + } + + String signature = matcher.group(1); + String headerApiKey = matcher.group(2); + + if (!headerApiKey.equals(apiKey)) { + if (DEBUG) + logger.warning("API key mismatch"); + return false; + } + + // リクエストボディの読み取り + byte[] requestBody = readRequestBody(exchange); + + // 署名検証 + return verifySignatureWithCandidates(verificationPath, signature, apiKey, + apiData.apiKey.getClientSecret(), method, requestBody, apiData.settings); + } + + private byte[] readRequestBody(HttpExchange exchange) { + 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(); + return buffer.toByteArray(); + } catch (IOException e) { + 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 candidateUrls = new ArrayList<>(); + candidateUrls.add(primaryPath); + + // 追加の候補URLを生成(プロトコルを含む完全なURL形式) + if (settings != null) { + // 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; + } + candidateUrls.add(cloudFrontUrl + pathPart); + } + if (settings.getRestApiEndpoint() != null) { + // rest_api_endpointは既にhttps://を含んでいる + candidateUrls.add(settings.getRestApiEndpoint() + pathPart); + } + 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); + } + } + } + + Date now = new Date(); + int timeWindow = 1; + + for (String candidateUrl : candidateUrls) { + 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 { + Mac mac = Mac.getInstance("HmacSHA256"); + SecretKeySpec keySpec = new SecretKeySpec(clientSecret.getBytes(StandardCharsets.UTF_8), + "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(candidateUrl.getBytes(StandardCharsets.UTF_8)); + + if (requestBody.length > 0) { + mac.update(requestBody); + } + + String calculatedSignature = bytesToHex(mac.doFinal()); + + if (DEBUG) { + logger.info("Signature check - URL: " + candidateUrl + + ", Timestamp: " + timestamp + + ", Expected: " + signature + + ", Calculated: " + calculatedSignature); + } + + if (calculatedSignature.equals(signature)) { + if (DEBUG) + logger.info("Signature verification successful"); + return true; + } + } catch (Exception e) { + if (DEBUG) + logger.warning("Signature calculation error: " + e.getMessage()); + } + } + } + + if (DEBUG) + logger.warning("Signature verification failed for all candidates"); + 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, "{\"message\": \"x-api-key header is required\"}"); + return; + } + + 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("/"); + + if (pathParts.length < 3) { + sendResponse(exchange, 400, "Invalid path. Use format: /ClassName/methodName"); + return; + } + + String className = pathParts[1]; + String methodName = pathParts[2]; + + // ルーティング処理の統合 + 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 { + // API Gatewayやプロキシ経由のリクエストの場合、 + // テナントルーティングを適用せずに直接処理 + if (DEBUG) { + logger.info("Routing path '" + routingValue + "' not found in URL '" + path + + "', proceeding without tenant routing"); + } + // 現在のpathPartsをそのまま使用(className, methodNameは既に設定済み) + } + } + } + + Map queryParams = parseQueryParams(exchange.getRequestURI()); + + try { + if (DEBUG) { + logger.info("Invoking method - Class: " + className + ", Method: " + methodName); + } + + Class clazz = getClass(className); + Method method = getMethod(clazz, methodName); + + if (method != null) { + 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); + } else { + sendResponse(exchange, 404, "Method not found: " + methodName); + } + } catch (ClassNotFoundException e) { + sendResponse(exchange, 404, "Class not found: " + className); + } catch (InvocationTargetException | IllegalAccessException e) { + logger.log(Level.SEVERE, "Error invoking method", e); + sendResponse(exchange, 500, "Error invoking method: " + e.getMessage()); + } catch (IllegalArgumentException e) { + sendResponse(exchange, 400, "Invalid arguments: " + e.getMessage()); + } catch (Exception e) { + logger.log(Level.SEVERE, "Internal server error", 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("="); + if (idx > 0) { + queryParams.put(pair.substring(0, idx), pair.substring(idx + 1)); + } + } + } + return 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); + + if (paramValue == null) { + throw new IllegalArgumentException("Missing parameter: " + paramName); + } + + 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()); + } + + /** + * メソッドが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"); + } + + 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"); + exchange.sendResponseHeaders(statusCode, responseBytes.length); + try (OutputStream os = exchange.getResponseBody()) { + os.write(responseBytes); + } + } + } + + public static class UserApi { + public static String getUser(String id) { + return "User " + id; + } + } + + public static class MathApi { + public static int add(int a, int b) { + return a + b; + } + } +} 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..a4f4b00d --- /dev/null +++ b/src/main/java/saasus/sdk/util/apiserver/SaasusIdentity.java @@ -0,0 +1,74 @@ +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 = 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"); + } + 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 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..7a3b2606 --- /dev/null +++ b/src/test/java/saasus/sdk/apigateway/api/SmartApiGatewayApiTest.java @@ -0,0 +1,279 @@ +/* + * 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.DraftApiGatewaySettings; +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; + +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(); + + /** + * 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 + } + + /** + * 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 + * + * 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 + } + + /** + * 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 + * + * 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 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 + * + * 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..2ea1f9e6 --- /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 '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 + } + + /** + * Test the property 'mcpServerUrl' + */ + @Test + public void mcpServerUrlTest() { + // TODO: test mcpServerUrl + } + +} 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/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 + } + +} 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..4e0b7c8c --- /dev/null +++ b/src/test/java/saasus/sdk/apigateway/models/EndpointSettingsTest.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.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 'throttlings' + */ + @Test + public void throttlingsTest() { + // TODO: test throttlings + } + + /** + * Test the property 'roleNames' + */ + @Test + 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/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/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 + } + +} 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' */