From 8ec51409ea54a638f42196777a7288b2f38e4c79 Mon Sep 17 00:00:00 2001 From: Nikos Papailiou Date: Tue, 21 Jan 2025 13:54:39 +0200 Subject: [PATCH] Update API spec --- docs/ActivityEventType.md | 2 + docs/ArrayApi.md | 2630 +++++++++-------- docs/ArrayConsolidationRequest.md | 1 + docs/ArrayInfo.md | 3 + docs/ArrayTask.md | 2 + docs/ArrayTasksApi.md | 73 +- docs/AssetBackingType.md | 13 + docs/AssetInfo.md | 23 + docs/AssetListResponse.md | 15 + docs/AssetOwnershipLevel.md | 13 + docs/AssetsApi.md | 266 ++ docs/ChangeAssetCredentialsRequest.md | 15 + docs/Datatype.md | 48 + docs/Enumeration.md | 20 + docs/FavoritesApi.md | 1430 +++++---- docs/FilesApi.md | 229 +- docs/FilterType.md | 22 +- docs/GroupContentActivity.md | 15 + docs/GroupContentActivityAsset.md | 17 + docs/GroupContentActivityResponse.md | 15 + docs/GroupInfo.md | 3 + docs/GroupsApi.md | 1323 ++++----- docs/InvitationApi.md | 750 +++-- docs/InvitationType.md | 2 + docs/LoadArraySchemaRequest.md | 14 + docs/LoadArraySchemaResponse.md | 15 + docs/LoadEnumerationsRequest.md | 15 + docs/LoadEnumerationsResponse.md | 14 + docs/MetadataStringified.md | 14 + docs/MetadataStringifiedEntry.md | 16 + docs/NotebookApi.md | 372 ++- docs/NotebookStatus.md | 1 + docs/NotebooksApi.md | 150 +- docs/Organization.md | 1 + docs/OrganizationApi.md | 1434 +++++---- docs/OrganizationRoles.md | 2 + docs/OrganizationUpdate.md | 19 + docs/OrganizationUser.md | 2 + docs/PodStatus.md | 15 + docs/QueryApi.md | 405 ++- docs/RegisteredTaskGraphsApi.md | 436 ++- docs/RetryPolicy.md | 6 +- docs/SSOProvider.md | 4 + docs/SharePaymentRequest.md | 13 + docs/SqlApi.md | 79 +- docs/StatsApi.md | 69 +- docs/TGUDFEnvironmentResources.md | 2 +- docs/TaskGraph.md | 4 +- docs/TaskGraphLog.md | 2 + docs/TaskGraphLogsApi.md | 676 +++-- docs/TaskGraphsApi.md | 363 ++- docs/TasksApi.md | 320 +- docs/UdfApi.md | 823 +++--- docs/User.md | 1 + docs/UserApi.md | 1542 +++++----- openapi-v1.yaml | 759 ++++- .../io/tiledb/cloud/rest_api/ApiCallback.java | 6 +- .../io/tiledb/cloud/rest_api/ApiClient.java | 202 +- .../tiledb/cloud/rest_api/ApiException.java | 13 +- .../io/tiledb/cloud/rest_api/ApiResponse.java | 4 +- .../tiledb/cloud/rest_api/Configuration.java | 8 +- .../rest_api/GzipRequestInterceptor.java | 4 +- .../java/io/tiledb/cloud/rest_api/JSON.java | 432 +-- .../java/io/tiledb/cloud/rest_api/Pair.java | 6 +- .../cloud/rest_api/ProgressRequestBody.java | 4 +- .../cloud/rest_api/ProgressResponseBody.java | 4 +- .../cloud/rest_api/ServerConfiguration.java | 18 +- .../tiledb/cloud/rest_api/ServerVariable.java | 16 +- .../io/tiledb/cloud/rest_api/StringUtil.java | 6 +- .../tiledb/cloud/rest_api/api/ArrayApi.java | 1431 +++++---- .../cloud/rest_api/api/ArrayTasksApi.java | 44 +- .../tiledb/cloud/rest_api/api/AssetsApi.java | 590 ++++ .../cloud/rest_api/api/FavoritesApi.java | 509 ++-- .../tiledb/cloud/rest_api/api/FilesApi.java | 122 +- .../tiledb/cloud/rest_api/api/GroupsApi.java | 532 ++-- .../cloud/rest_api/api/InvitationApi.java | 522 +++- .../cloud/rest_api/api/NotebookApi.java | 173 +- .../cloud/rest_api/api/NotebooksApi.java | 76 +- .../cloud/rest_api/api/OrganizationApi.java | 526 ++-- .../tiledb/cloud/rest_api/api/QueryApi.java | 283 +- .../rest_api/api/RegisteredTaskGraphsApi.java | 181 +- .../io/tiledb/cloud/rest_api/api/SqlApi.java | 115 +- .../tiledb/cloud/rest_api/api/StatsApi.java | 44 +- .../cloud/rest_api/api/TaskGraphLogsApi.java | 304 +- .../cloud/rest_api/api/TaskGraphsApi.java | 152 +- .../tiledb/cloud/rest_api/api/TasksApi.java | 149 +- .../io/tiledb/cloud/rest_api/api/UdfApi.java | 666 ++--- .../io/tiledb/cloud/rest_api/api/UserApi.java | 552 ++-- .../cloud/rest_api/auth/ApiKeyAuth.java | 10 +- .../cloud/rest_api/auth/Authentication.java | 8 +- .../cloud/rest_api/auth/HttpBasicAuth.java | 8 +- .../cloud/rest_api/auth/HttpBearerAuth.java | 30 +- .../io/tiledb/cloud/rest_api/auth/OAuth.java | 10 +- .../tiledb/cloud/rest_api/auth/OAuthFlow.java | 6 +- .../rest_api/auth/OAuthOkHttpClient.java | 16 +- .../cloud/rest_api/auth/RetryingOAuth.java | 27 +- .../rest_api/model/AWSAccessCredentials.java | 262 +- .../rest_api/model/AbstractOpenApiSchema.java | 13 +- .../rest_api/model/ActivityEventType.java | 17 +- .../io/tiledb/cloud/rest_api/model/Array.java | 208 +- .../cloud/rest_api/model/ArrayActions.java | 13 +- .../rest_api/model/ArrayActivityLog.java | 282 +- .../rest_api/model/ArrayBrowserData.java | 214 +- .../rest_api/model/ArrayBrowserSidebar.java | 205 +- .../model/ArrayConsolidationRequest.java | 197 +- .../rest_api/model/ArrayEndTimestampData.java | 195 +- .../cloud/rest_api/model/ArrayFavorite.java | 200 +- .../rest_api/model/ArrayFavoritesData.java | 213 +- .../cloud/rest_api/model/ArrayInfo.java | 625 ++-- .../cloud/rest_api/model/ArrayInfoUpdate.java | 320 +- .../cloud/rest_api/model/ArrayMetadata.java | 197 +- .../rest_api/model/ArrayMetadataEntry.java | 232 +- .../cloud/rest_api/model/ArraySample.java | 174 +- .../cloud/rest_api/model/ArraySchema.java | 369 +-- .../cloud/rest_api/model/ArraySharing.java | 206 +- .../cloud/rest_api/model/ArrayTask.java | 639 ++-- .../model/ArrayTaskBrowserSidebar.java | 205 +- .../cloud/rest_api/model/ArrayTaskData.java | 213 +- .../cloud/rest_api/model/ArrayTaskLog.java | 186 +- .../cloud/rest_api/model/ArrayTaskStatus.java | 13 +- .../cloud/rest_api/model/ArrayTaskType.java | 13 +- .../cloud/rest_api/model/ArrayType.java | 13 +- .../rest_api/model/ArrayVacuumRequest.java | 176 +- .../rest_api/model/AssetBackingType.java | 78 + .../cloud/rest_api/model/AssetInfo.java | 481 +++ .../rest_api/model/AssetListResponse.java | 260 ++ .../cloud/rest_api/model/AssetLocations.java | 266 +- .../rest_api/model/AssetOwnershipLevel.java | 78 + .../cloud/rest_api/model/AssetType.java | 13 +- .../cloud/rest_api/model/Attribute.java | 260 +- .../rest_api/model/AttributeBufferHeader.java | 205 +- .../rest_api/model/AttributeBufferSize.java | 205 +- .../tiledb/cloud/rest_api/model/Backoff.java | 199 +- .../model/ChangeAssetCredentialsRequest.java | 258 ++ .../tiledb/cloud/rest_api/model/Datatype.java | 67 +- .../cloud/rest_api/model/Dimension.java | 258 +- .../rest_api/model/DimensionCoordinate.java | 290 +- .../rest_api/model/DimensionTileExtent.java | 291 +- .../tiledb/cloud/rest_api/model/Domain.java | 247 +- .../cloud/rest_api/model/DomainArray.java | 350 +-- .../rest_api/model/DomainCheckResult.java | 191 +- .../rest_api/model/DomainCheckStatus.java | 13 +- .../model/DomainVerificationStatus.java | 13 +- .../cloud/rest_api/model/Enumeration.java | 400 +++ .../io/tiledb/cloud/rest_api/model/Error.java | 197 +- .../cloud/rest_api/model/FileCreate.java | 200 +- .../cloud/rest_api/model/FileCreated.java | 187 +- .../cloud/rest_api/model/FileExport.java | 173 +- .../cloud/rest_api/model/FileExported.java | 173 +- .../rest_api/model/FilePropertyName.java | 13 +- .../tiledb/cloud/rest_api/model/FileType.java | 13 +- .../cloud/rest_api/model/FileUploaded.java | 205 +- .../tiledb/cloud/rest_api/model/Filter.java | 196 +- .../cloud/rest_api/model/FilterData.java | 290 +- .../cloud/rest_api/model/FilterOption.java | 13 +- .../cloud/rest_api/model/FilterPipeline.java | 197 +- .../cloud/rest_api/model/FilterType.java | 35 +- .../cloud/rest_api/model/FragmentInfo.java | 234 +- .../rest_api/model/FragmentInfoRequest.java | 176 +- .../rest_api/model/FragmentMetadata.java | 593 ++-- .../cloud/rest_api/model/GenericUDF.java | 397 +-- .../model/GetTiledbStats200Response.java | 172 +- .../cloud/rest_api/model/GroupActions.java | 13 +- .../cloud/rest_api/model/GroupActivity.java | 190 +- .../rest_api/model/GroupActivityAsset.java | 215 +- .../rest_api/model/GroupActivityResponse.java | 211 +- .../rest_api/model/GroupBrowserData.java | 214 +- .../model/GroupBrowserFilterData.java | 200 +- .../cloud/rest_api/model/GroupChanges.java | 235 +- .../rest_api/model/GroupContentActivity.java | 240 ++ .../model/GroupContentActivityAsset.java | 298 ++ .../model/GroupContentActivityResponse.java | 260 ++ .../cloud/rest_api/model/GroupContents.java | 213 +- .../model/GroupContentsFilterData.java | 179 +- .../cloud/rest_api/model/GroupCreate.java | 283 +- .../cloud/rest_api/model/GroupEntry.java | 202 +- .../cloud/rest_api/model/GroupInfo.java | 506 ++-- .../cloud/rest_api/model/GroupMember.java | 204 +- .../rest_api/model/GroupMemberAssetType.java | 13 +- .../cloud/rest_api/model/GroupMemberType.java | 13 +- .../cloud/rest_api/model/GroupRegister.java | 283 +- .../cloud/rest_api/model/GroupSharing.java | 226 +- .../rest_api/model/GroupSharingRequest.java | 213 +- .../cloud/rest_api/model/GroupType.java | 13 +- .../rest_api/model/GroupTypeMetadataKey.java | 13 +- .../cloud/rest_api/model/GroupUpdate.java | 258 +- .../cloud/rest_api/model/Invitation.java | 435 ++- .../model/InvitationArrayShareEmail.java | 209 +- .../cloud/rest_api/model/InvitationData.java | 213 +- .../model/InvitationFailedRecipients.java | 186 +- .../model/InvitationGroupShareEmail.java | 232 +- .../InvitationOrganizationJoinEmail.java | 223 +- .../rest_api/model/InvitationStatus.java | 13 +- .../cloud/rest_api/model/InvitationType.java | 17 +- .../rest_api/model/LastAccessedArray.java | 230 +- .../tiledb/cloud/rest_api/model/Layout.java | 13 +- .../model/LoadArraySchemaRequest.java | 208 ++ .../model/LoadArraySchemaResponse.java | 245 ++ .../model/LoadEnumerationsRequest.java | 249 ++ .../model/LoadEnumerationsResponse.java | 228 ++ .../cloud/rest_api/model/MLModelFavorite.java | 199 +- .../rest_api/model/MLModelFavoritesData.java | 213 +- .../cloud/rest_api/model/MaxBufferSizes.java | 197 +- .../rest_api/model/MetadataStringified.java | 228 ++ .../model/MetadataStringifiedEntry.java | 266 ++ .../cloud/rest_api/model/MultiArrayUDF.java | 526 ++-- .../rest_api/model/NamespaceActions.java | 13 +- .../cloud/rest_api/model/NonEmptyDomain.java | 197 +- .../cloud/rest_api/model/NotebookCopied.java | 218 +- .../cloud/rest_api/model/NotebookCopy.java | 199 +- .../rest_api/model/NotebookFavorite.java | 199 +- .../rest_api/model/NotebookFavoritesData.java | 214 +- .../cloud/rest_api/model/NotebookStatus.java | 319 +- .../cloud/rest_api/model/Organization.java | 420 ++- .../rest_api/model/OrganizationRoles.java | 15 +- .../rest_api/model/OrganizationUpdate.java | 370 +++ .../rest_api/model/OrganizationUser.java | 310 +- .../rest_api/model/PaginationMetadata.java | 210 +- .../cloud/rest_api/model/PodStatus.java | 80 + .../tiledb/cloud/rest_api/model/Pricing.java | 354 +-- .../rest_api/model/PricingAggregateUsage.java | 13 +- .../cloud/rest_api/model/PricingCurrency.java | 13 +- .../cloud/rest_api/model/PricingInterval.java | 13 +- .../cloud/rest_api/model/PricingType.java | 13 +- .../rest_api/model/PricingUnitLabel.java | 13 +- .../rest_api/model/PublicShareFilter.java | 13 +- .../io/tiledb/cloud/rest_api/model/Query.java | 324 +- .../cloud/rest_api/model/QueryJson.java | 196 +- .../cloud/rest_api/model/QueryRanges.java | 198 +- .../cloud/rest_api/model/QueryReader.java | 250 +- .../cloud/rest_api/model/Querystatus.java | 13 +- .../cloud/rest_api/model/Querytype.java | 13 +- .../cloud/rest_api/model/ReadState.java | 216 +- .../rest_api/model/RegisteredTaskGraph.java | 297 +- .../model/ResetUserPasswordRequest.java | 174 +- .../cloud/rest_api/model/ResultFormat.java | 13 +- .../cloud/rest_api/model/RetryPolicy.java | 19 +- .../cloud/rest_api/model/RetryStrategy.java | 220 +- .../cloud/rest_api/model/SQLParameters.java | 321 +- .../cloud/rest_api/model/SSODomainConfig.java | 298 +- .../model/SSODomainConfigResponse.java | 198 +- .../cloud/rest_api/model/SSODomainSetup.java | 200 +- .../cloud/rest_api/model/SSOProvider.java | 19 +- .../rest_api/model/SharePaymentRequest.java | 217 ++ .../rest_api/model/SingleFragmentInfo.java | 190 +- .../cloud/rest_api/model/StorageLocation.java | 189 +- .../tiledb/cloud/rest_api/model/Subarray.java | 216 +- .../rest_api/model/SubarrayPartitioner.java | 272 +- .../model/SubarrayPartitionerCurrent.java | 216 +- .../model/SubarrayPartitionerState.java | 261 +- .../cloud/rest_api/model/SubarrayRanges.java | 211 +- .../cloud/rest_api/model/Subscription.java | 237 +- .../cloud/rest_api/model/TGArrayNodeData.java | 203 +- .../cloud/rest_api/model/TGInputNodeData.java | 187 +- .../cloud/rest_api/model/TGQueryRanges.java | 204 +- .../cloud/rest_api/model/TGSQLNodeData.java | 245 +- .../cloud/rest_api/model/TGUDFArgument.java | 189 +- .../rest_api/model/TGUDFEnvironment.java | 288 +- .../model/TGUDFEnvironmentResources.java | 202 +- .../cloud/rest_api/model/TGUDFNodeData.java | 273 +- .../cloud/rest_api/model/TaskGraph.java | 315 +- .../rest_api/model/TaskGraphActions.java | 13 +- .../model/TaskGraphClientNodeStatus.java | 192 +- .../cloud/rest_api/model/TaskGraphLog.java | 422 ++- .../model/TaskGraphLogRunLocation.java | 13 +- .../rest_api/model/TaskGraphLogStatus.java | 13 +- .../rest_api/model/TaskGraphLogsData.java | 214 +- .../cloud/rest_api/model/TaskGraphNode.java | 314 +- .../rest_api/model/TaskGraphNodeMetadata.java | 289 +- .../rest_api/model/TaskGraphSharing.java | 207 +- .../cloud/rest_api/model/TaskGraphType.java | 13 +- .../cloud/rest_api/model/TaskGraphs.java | 198 +- .../cloud/rest_api/model/TileDBConfig.java | 198 +- .../model/TileDBConfigEntriesInner.java | 185 +- .../io/tiledb/cloud/rest_api/model/Token.java | 233 +- .../cloud/rest_api/model/TokenRequest.java | 207 +- .../cloud/rest_api/model/TokenScope.java | 13 +- .../cloud/rest_api/model/UDFActions.java | 13 +- .../cloud/rest_api/model/UDFArrayDetails.java | 224 +- .../cloud/rest_api/model/UDFCopied.java | 219 +- .../tiledb/cloud/rest_api/model/UDFCopy.java | 200 +- .../cloud/rest_api/model/UDFFavorite.java | 200 +- .../rest_api/model/UDFFavoritesData.java | 214 +- .../tiledb/cloud/rest_api/model/UDFImage.java | 205 +- .../cloud/rest_api/model/UDFImageVersion.java | 252 +- .../tiledb/cloud/rest_api/model/UDFInfo.java | 281 +- .../cloud/rest_api/model/UDFInfoUpdate.java | 320 +- .../cloud/rest_api/model/UDFLanguage.java | 13 +- .../cloud/rest_api/model/UDFSharing.java | 207 +- .../cloud/rest_api/model/UDFSubarray.java | 216 +- .../rest_api/model/UDFSubarrayRange.java | 205 +- .../tiledb/cloud/rest_api/model/UDFType.java | 13 +- .../io/tiledb/cloud/rest_api/model/User.java | 431 ++- .../tiledb/cloud/rest_api/model/Writer.java | 214 +- 294 files changed, 29966 insertions(+), 31304 deletions(-) create mode 100644 docs/AssetBackingType.md create mode 100644 docs/AssetInfo.md create mode 100644 docs/AssetListResponse.md create mode 100644 docs/AssetOwnershipLevel.md create mode 100644 docs/AssetsApi.md create mode 100644 docs/ChangeAssetCredentialsRequest.md create mode 100644 docs/Enumeration.md create mode 100644 docs/GroupContentActivity.md create mode 100644 docs/GroupContentActivityAsset.md create mode 100644 docs/GroupContentActivityResponse.md create mode 100644 docs/LoadArraySchemaRequest.md create mode 100644 docs/LoadArraySchemaResponse.md create mode 100644 docs/LoadEnumerationsRequest.md create mode 100644 docs/LoadEnumerationsResponse.md create mode 100644 docs/MetadataStringified.md create mode 100644 docs/MetadataStringifiedEntry.md create mode 100644 docs/OrganizationUpdate.md create mode 100644 docs/PodStatus.md create mode 100644 docs/SharePaymentRequest.md create mode 100644 src/main/java/io/tiledb/cloud/rest_api/api/AssetsApi.java create mode 100644 src/main/java/io/tiledb/cloud/rest_api/model/AssetBackingType.java create mode 100644 src/main/java/io/tiledb/cloud/rest_api/model/AssetInfo.java create mode 100644 src/main/java/io/tiledb/cloud/rest_api/model/AssetListResponse.java create mode 100644 src/main/java/io/tiledb/cloud/rest_api/model/AssetOwnershipLevel.java create mode 100644 src/main/java/io/tiledb/cloud/rest_api/model/ChangeAssetCredentialsRequest.java create mode 100644 src/main/java/io/tiledb/cloud/rest_api/model/Enumeration.java create mode 100644 src/main/java/io/tiledb/cloud/rest_api/model/GroupContentActivity.java create mode 100644 src/main/java/io/tiledb/cloud/rest_api/model/GroupContentActivityAsset.java create mode 100644 src/main/java/io/tiledb/cloud/rest_api/model/GroupContentActivityResponse.java create mode 100644 src/main/java/io/tiledb/cloud/rest_api/model/LoadArraySchemaRequest.java create mode 100644 src/main/java/io/tiledb/cloud/rest_api/model/LoadArraySchemaResponse.java create mode 100644 src/main/java/io/tiledb/cloud/rest_api/model/LoadEnumerationsRequest.java create mode 100644 src/main/java/io/tiledb/cloud/rest_api/model/LoadEnumerationsResponse.java create mode 100644 src/main/java/io/tiledb/cloud/rest_api/model/MetadataStringified.java create mode 100644 src/main/java/io/tiledb/cloud/rest_api/model/MetadataStringifiedEntry.java create mode 100644 src/main/java/io/tiledb/cloud/rest_api/model/OrganizationUpdate.java create mode 100644 src/main/java/io/tiledb/cloud/rest_api/model/PodStatus.java create mode 100644 src/main/java/io/tiledb/cloud/rest_api/model/SharePaymentRequest.java diff --git a/docs/ActivityEventType.md b/docs/ActivityEventType.md index c3a136d..d8562a3 100644 --- a/docs/ActivityEventType.md +++ b/docs/ActivityEventType.md @@ -35,5 +35,7 @@ * `READ_FRAGMENT_INFO` (value: `"read_fragment_info"`) +* `READ_ENUMERATIONS` (value: `"read_enumerations"`) + diff --git a/docs/ArrayApi.md b/docs/ArrayApi.md index 5e71ac2..7590bf9 100644 --- a/docs/ArrayApi.md +++ b/docs/ArrayApi.md @@ -31,6 +31,8 @@ All URIs are relative to */v1* | [**getArraysInNamespace**](ArrayApi.md#getArraysInNamespace) | **GET** /arrays/{namespace} | | | [**getFragmentEndTimestamp**](ArrayApi.md#getFragmentEndTimestamp) | **GET** /arrays/{namespace}/{array}/fragment_end_timestamp | | | [**getLastAccessedArrays**](ArrayApi.md#getLastAccessedArrays) | **GET** /arrays/last_accessed | | +| [**loadArraySchema**](ArrayApi.md#loadArraySchema) | **POST** /arrays/{namespace}/{array}/schema | | +| [**loadEnumerations**](ArrayApi.md#loadEnumerations) | **POST** /arrays/{namespace}/{array}/enumerations | | | [**registerArray**](ArrayApi.md#registerArray) | **POST** /arrays/{namespace}/{array}/register | | | [**shareArray**](ArrayApi.md#shareArray) | **PATCH** /arrays/{namespace}/{array}/share | | | [**updateArrayMetadata**](ArrayApi.md#updateArrayMetadata) | **PATCH** /arrays/{namespace}/{array}/metadata | | @@ -38,7 +40,7 @@ All URIs are relative to */v1* | [**vacuumArray**](ArrayApi.md#vacuumArray) | **POST** /arrays/{namespace}/{array}/vacuum | | - + # **arrayActivityLog** > List<ArrayActivityLog> arrayActivityLog(namespace, array, start, end, eventTypes, taskId, hasTaskId) @@ -47,51 +49,50 @@ All URIs are relative to */v1* get array activity logs ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import ArrayApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ArrayApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ArrayApi apiInstance = new ArrayApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String array = "array_example"; // String | name/uri of array that is url-encoded - Integer start = 56; // Integer | Start time of window of fetch logs, unix epoch in seconds (default: seven days ago) - Integer end = 56; // Integer | End time of window of fetch logs, unix epoch in seconds (default: current utc timestamp) - String eventTypes = "eventTypes_example"; // String | Refer to ActivityEventType for possible values - String taskId = "taskId_example"; // String | Array task ID To filter activity to - Boolean hasTaskId = true; // Boolean | Excludes activity log results that do not contain an array task UUID - try { - List result = apiInstance.arrayActivityLog(namespace, array, start, end, eventTypes, taskId, hasTaskId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ArrayApi#arrayActivityLog"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ArrayApi apiInstance = new ArrayApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of array that is url-encoded + Integer start = 56; // Integer | Start time of window of fetch logs, unix epoch in seconds (default: seven days ago) + Integer end = 56; // Integer | End time of window of fetch logs, unix epoch in seconds (default: current utc timestamp) + String eventTypes = "eventTypes_example"; // String | Refer to ActivityEventType for possible values + String taskId = "taskId_example"; // String | Array task ID To filter activity to + Boolean hasTaskId = true; // Boolean | Excludes activity log results that do not contain an array task UUID + try { + List result = apiInstance.arrayActivityLog(namespace, array, start, end, eventTypes, taskId, hasTaskId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ArrayApi#arrayActivityLog"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -113,7 +114,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -127,64 +128,64 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **arraysBrowserOwnedGet** -> ArrayBrowserData arraysBrowserOwnedGet(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty) +> ArrayBrowserData arraysBrowserOwnedGet(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty, withMetadata) Fetch a list of all arrays that are owned directly by user or user's organizations ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import ArrayApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ArrayApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ArrayApi apiInstance = new ArrayApi(defaultClient); - Integer page = 56; // Integer | pagination offset - Integer perPage = 56; // Integer | pagination limit - String search = "search_example"; // String | search string that will look at name, namespace or description fields - String namespace = "namespace_example"; // String | namespace - String orderby = "orderby_example"; // String | sort by which field valid values include last_accessed, size, name - String permissions = "permissions_example"; // String | permissions valid values include read, read_write, write, admin - List tag = Arrays.asList(); // List | tag to search for, more than one can be included - List excludeTag = Arrays.asList(); // List | tags to exclude matching array in results, more than one can be included - List fileType = Arrays.asList(); // List | file_type to search for, more than one can be included - List excludeFileType = Arrays.asList(); // List | file_type to exclude matching array in results, more than one can be included - List fileProperty = Arrays.asList(); // List | file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included - try { - ArrayBrowserData result = apiInstance.arraysBrowserOwnedGet(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ArrayApi#arraysBrowserOwnedGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ArrayApi apiInstance = new ArrayApi(defaultClient); + Integer page = 56; // Integer | pagination offset + Integer perPage = 56; // Integer | pagination limit + String search = "search_example"; // String | search string that will look at name, namespace or description fields + String namespace = "namespace_example"; // String | namespace + String orderby = "orderby_example"; // String | sort by which field valid values include size, name + String permissions = "permissions_example"; // String | permissions valid values include read, read_write, write, admin + List tag = Arrays.asList(); // List | tag to search for, more than one can be included + List excludeTag = Arrays.asList(); // List | tags to exclude matching array in results, more than one can be included + List fileType = Arrays.asList(); // List | file_type to search for, more than one can be included + List excludeFileType = Arrays.asList(); // List | file_type to exclude matching array in results, more than one can be included + List fileProperty = Arrays.asList(); // List | file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included + Boolean withMetadata = true; // Boolean | include the metadata of the array + try { + ArrayBrowserData result = apiInstance.arraysBrowserOwnedGet(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty, withMetadata); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ArrayApi#arraysBrowserOwnedGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -196,13 +197,14 @@ public class Example { | **perPage** | **Integer**| pagination limit | [optional] | | **search** | **String**| search string that will look at name, namespace or description fields | [optional] | | **namespace** | **String**| namespace | [optional] | -| **orderby** | **String**| sort by which field valid values include last_accessed, size, name | [optional] | +| **orderby** | **String**| sort by which field valid values include size, name | [optional] | | **permissions** | **String**| permissions valid values include read, read_write, write, admin | [optional] | | **tag** | [**List<String>**](String.md)| tag to search for, more than one can be included | [optional] | | **excludeTag** | [**List<String>**](String.md)| tags to exclude matching array in results, more than one can be included | [optional] | | **fileType** | [**List<String>**](String.md)| file_type to search for, more than one can be included | [optional] | | **excludeFileType** | [**List<String>**](String.md)| file_type to exclude matching array in results, more than one can be included | [optional] | | **fileProperty** | [**List<String>**](String.md)| file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included | [optional] | +| **withMetadata** | **Boolean**| include the metadata of the array | [optional] | ### Return type @@ -210,7 +212,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -224,7 +226,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **arraysBrowserOwnedSidebarGet** > ArrayBrowserSidebar arraysBrowserOwnedSidebarGet(fileType, excludeFileType, fileProperty) @@ -233,47 +235,46 @@ public class Example { Fetch a sidebar for arrays that are owned directly by user or user's organizations ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import ArrayApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ArrayApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ArrayApi apiInstance = new ArrayApi(defaultClient); - List fileType = Arrays.asList(); // List | file_type to search for, more than one can be included - List excludeFileType = Arrays.asList(); // List | file_type to exclude matching array in results, more than one can be included - List fileProperty = Arrays.asList(); // List | file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included - try { - ArrayBrowserSidebar result = apiInstance.arraysBrowserOwnedSidebarGet(fileType, excludeFileType, fileProperty); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ArrayApi#arraysBrowserOwnedSidebarGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ArrayApi apiInstance = new ArrayApi(defaultClient); + List fileType = Arrays.asList(); // List | file_type to search for, more than one can be included + List excludeFileType = Arrays.asList(); // List | file_type to exclude matching array in results, more than one can be included + List fileProperty = Arrays.asList(); // List | file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included + try { + ArrayBrowserSidebar result = apiInstance.arraysBrowserOwnedSidebarGet(fileType, excludeFileType, fileProperty); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ArrayApi#arraysBrowserOwnedSidebarGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -291,7 +292,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -305,64 +306,64 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **arraysBrowserPublicGet** -> ArrayBrowserData arraysBrowserPublicGet(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty) +> ArrayBrowserData arraysBrowserPublicGet(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty, withMetadata) Fetch a list of all arrays that have been shared publically ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import ArrayApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ArrayApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ArrayApi apiInstance = new ArrayApi(defaultClient); - Integer page = 56; // Integer | pagination offset - Integer perPage = 56; // Integer | pagination limit - String search = "search_example"; // String | search string that will look at name, namespace or description fields - String namespace = "namespace_example"; // String | namespace - String orderby = "orderby_example"; // String | sort by which field valid values include last_accessed, size, name - String permissions = "permissions_example"; // String | permissions valid values include read, read_write, write, admin - List tag = Arrays.asList(); // List | tag to search for, more than one can be included - List excludeTag = Arrays.asList(); // List | tags to exclude matching array in results, more than one can be included - List fileType = Arrays.asList(); // List | file_type to search for, more than one can be included - List excludeFileType = Arrays.asList(); // List | file_type to exclude matching array in results, more than one can be included - List fileProperty = Arrays.asList(); // List | file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included - try { - ArrayBrowserData result = apiInstance.arraysBrowserPublicGet(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ArrayApi#arraysBrowserPublicGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ArrayApi apiInstance = new ArrayApi(defaultClient); + Integer page = 56; // Integer | pagination offset + Integer perPage = 56; // Integer | pagination limit + String search = "search_example"; // String | search string that will look at name, namespace or description fields + String namespace = "namespace_example"; // String | namespace + String orderby = "orderby_example"; // String | sort by which field valid values include size, name + String permissions = "permissions_example"; // String | permissions valid values include read, read_write, write, admin + List tag = Arrays.asList(); // List | tag to search for, more than one can be included + List excludeTag = Arrays.asList(); // List | tags to exclude matching array in results, more than one can be included + List fileType = Arrays.asList(); // List | file_type to search for, more than one can be included + List excludeFileType = Arrays.asList(); // List | file_type to exclude matching array in results, more than one can be included + List fileProperty = Arrays.asList(); // List | file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included + Boolean withMetadata = true; // Boolean | include the metadata of the array + try { + ArrayBrowserData result = apiInstance.arraysBrowserPublicGet(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty, withMetadata); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ArrayApi#arraysBrowserPublicGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -374,13 +375,14 @@ public class Example { | **perPage** | **Integer**| pagination limit | [optional] | | **search** | **String**| search string that will look at name, namespace or description fields | [optional] | | **namespace** | **String**| namespace | [optional] | -| **orderby** | **String**| sort by which field valid values include last_accessed, size, name | [optional] | +| **orderby** | **String**| sort by which field valid values include size, name | [optional] | | **permissions** | **String**| permissions valid values include read, read_write, write, admin | [optional] | | **tag** | [**List<String>**](String.md)| tag to search for, more than one can be included | [optional] | | **excludeTag** | [**List<String>**](String.md)| tags to exclude matching array in results, more than one can be included | [optional] | | **fileType** | [**List<String>**](String.md)| file_type to search for, more than one can be included | [optional] | | **excludeFileType** | [**List<String>**](String.md)| file_type to exclude matching array in results, more than one can be included | [optional] | | **fileProperty** | [**List<String>**](String.md)| file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included | [optional] | +| **withMetadata** | **Boolean**| include the metadata of the array | [optional] | ### Return type @@ -388,7 +390,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -402,7 +404,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **arraysBrowserPublicSidebarGet** > ArrayBrowserSidebar arraysBrowserPublicSidebarGet(fileType, excludeFileType, fileProperty) @@ -411,47 +413,46 @@ public class Example { Fetch a sidebar of all arrays that have been shared publically ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import ArrayApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ArrayApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ArrayApi apiInstance = new ArrayApi(defaultClient); - List fileType = Arrays.asList(); // List | file_type to search for, more than one can be included - List excludeFileType = Arrays.asList(); // List | file_type to exclude matching array in results, more than one can be included - List fileProperty = Arrays.asList(); // List | file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included - try { - ArrayBrowserSidebar result = apiInstance.arraysBrowserPublicSidebarGet(fileType, excludeFileType, fileProperty); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ArrayApi#arraysBrowserPublicSidebarGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ArrayApi apiInstance = new ArrayApi(defaultClient); + List fileType = Arrays.asList(); // List | file_type to search for, more than one can be included + List excludeFileType = Arrays.asList(); // List | file_type to exclude matching array in results, more than one can be included + List fileProperty = Arrays.asList(); // List | file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included + try { + ArrayBrowserSidebar result = apiInstance.arraysBrowserPublicSidebarGet(fileType, excludeFileType, fileProperty); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ArrayApi#arraysBrowserPublicSidebarGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -469,7 +470,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -483,65 +484,65 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **arraysBrowserSharedGet** -> ArrayBrowserData arraysBrowserSharedGet(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty, sharedTo) +> ArrayBrowserData arraysBrowserSharedGet(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty, sharedTo, withMetadata) Fetch a list of all arrays that have been shared with the user ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import ArrayApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ArrayApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ArrayApi apiInstance = new ArrayApi(defaultClient); - Integer page = 56; // Integer | pagination offset - Integer perPage = 56; // Integer | pagination limit - String search = "search_example"; // String | search string that will look at name, namespace or description fields - String namespace = "namespace_example"; // String | namespace - String orderby = "orderby_example"; // String | sort by which field valid values include last_accessed, size, name - String permissions = "permissions_example"; // String | permissions valid values include read, read_write, write, admin - List tag = Arrays.asList(); // List | tag to search for, more than one can be included - List excludeTag = Arrays.asList(); // List | tags to exclude matching array in results, more than one can be included - List fileType = Arrays.asList(); // List | file_type to search for, more than one can be included - List excludeFileType = Arrays.asList(); // List | file_type to exclude matching array in results, more than one can be included - List fileProperty = Arrays.asList(); // List | file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included - List sharedTo = Arrays.asList(); // List | namespaces to filter results of where there arrays were shared to - try { - ArrayBrowserData result = apiInstance.arraysBrowserSharedGet(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty, sharedTo); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ArrayApi#arraysBrowserSharedGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ArrayApi apiInstance = new ArrayApi(defaultClient); + Integer page = 56; // Integer | pagination offset + Integer perPage = 56; // Integer | pagination limit + String search = "search_example"; // String | search string that will look at name, namespace or description fields + String namespace = "namespace_example"; // String | namespace + String orderby = "orderby_example"; // String | sort by which field valid values include size, name + String permissions = "permissions_example"; // String | permissions valid values include read, read_write, write, admin + List tag = Arrays.asList(); // List | tag to search for, more than one can be included + List excludeTag = Arrays.asList(); // List | tags to exclude matching array in results, more than one can be included + List fileType = Arrays.asList(); // List | file_type to search for, more than one can be included + List excludeFileType = Arrays.asList(); // List | file_type to exclude matching array in results, more than one can be included + List fileProperty = Arrays.asList(); // List | file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included + List sharedTo = Arrays.asList(); // List | namespaces to filter results of where there arrays were shared to + Boolean withMetadata = true; // Boolean | include the metadata of the array + try { + ArrayBrowserData result = apiInstance.arraysBrowserSharedGet(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty, sharedTo, withMetadata); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ArrayApi#arraysBrowserSharedGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -553,7 +554,7 @@ public class Example { | **perPage** | **Integer**| pagination limit | [optional] | | **search** | **String**| search string that will look at name, namespace or description fields | [optional] | | **namespace** | **String**| namespace | [optional] | -| **orderby** | **String**| sort by which field valid values include last_accessed, size, name | [optional] | +| **orderby** | **String**| sort by which field valid values include size, name | [optional] | | **permissions** | **String**| permissions valid values include read, read_write, write, admin | [optional] | | **tag** | [**List<String>**](String.md)| tag to search for, more than one can be included | [optional] | | **excludeTag** | [**List<String>**](String.md)| tags to exclude matching array in results, more than one can be included | [optional] | @@ -561,6 +562,7 @@ public class Example { | **excludeFileType** | [**List<String>**](String.md)| file_type to exclude matching array in results, more than one can be included | [optional] | | **fileProperty** | [**List<String>**](String.md)| file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included | [optional] | | **sharedTo** | [**List<String>**](String.md)| namespaces to filter results of where there arrays were shared to | [optional] | +| **withMetadata** | **Boolean**| include the metadata of the array | [optional] | ### Return type @@ -568,7 +570,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -582,7 +584,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **arraysBrowserSharedSidebarGet** > ArrayBrowserSidebar arraysBrowserSharedSidebarGet(fileType, excludeFileType, fileProperty, sharedTo) @@ -591,48 +593,47 @@ public class Example { Fetch a list of all arrays that have been shared with the user ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import ArrayApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ArrayApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ArrayApi apiInstance = new ArrayApi(defaultClient); - List fileType = Arrays.asList(); // List | file_type to search for, more than one can be included - List excludeFileType = Arrays.asList(); // List | file_type to exclude matching array in results, more than one can be included - List fileProperty = Arrays.asList(); // List | file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included - List sharedTo = Arrays.asList(); // List | namespaces to filter results of where there groups were shared to - try { - ArrayBrowserSidebar result = apiInstance.arraysBrowserSharedSidebarGet(fileType, excludeFileType, fileProperty, sharedTo); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ArrayApi#arraysBrowserSharedSidebarGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ArrayApi apiInstance = new ArrayApi(defaultClient); + List fileType = Arrays.asList(); // List | file_type to search for, more than one can be included + List excludeFileType = Arrays.asList(); // List | file_type to exclude matching array in results, more than one can be included + List fileProperty = Arrays.asList(); // List | file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included + List sharedTo = Arrays.asList(); // List | namespaces to filter results of where there groups were shared to + try { + ArrayBrowserSidebar result = apiInstance.arraysBrowserSharedSidebarGet(fileType, excludeFileType, fileProperty, sharedTo); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ArrayApi#arraysBrowserSharedSidebarGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -651,7 +652,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -665,7 +666,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **arraysNamespaceArrayEndTimestampsGet** > ArrayEndTimestampData arraysNamespaceArrayEndTimestampsGet(namespace, array, page, perPage) @@ -674,48 +675,47 @@ public class Example { retrieve a list of timestamps from the array fragment info listing in milliseconds, paginated ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import ArrayApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ArrayApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ArrayApi apiInstance = new ArrayApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String array = "array_example"; // String | name/uri of array that is url-encoded - Integer page = 56; // Integer | pagination offset - Integer perPage = 56; // Integer | pagination limit - try { - ArrayEndTimestampData result = apiInstance.arraysNamespaceArrayEndTimestampsGet(namespace, array, page, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ArrayApi#arraysNamespaceArrayEndTimestampsGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ArrayApi apiInstance = new ArrayApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of array that is url-encoded + Integer page = 56; // Integer | pagination offset + Integer perPage = 56; // Integer | pagination limit + try { + ArrayEndTimestampData result = apiInstance.arraysNamespaceArrayEndTimestampsGet(namespace, array, page, perPage); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ArrayApi#arraysNamespaceArrayEndTimestampsGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -734,7 +734,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -748,7 +748,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **consolidateArray** > consolidateArray(namespace, array, consolidateRequest) @@ -757,46 +757,45 @@ public class Example { consolidate an array at a specified URI ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import ArrayApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ArrayApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ArrayApi apiInstance = new ArrayApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String array = "array_example"; // String | name/uri of array that is url-encoded - ArrayConsolidationRequest consolidateRequest = new ArrayConsolidationRequest(); // ArrayConsolidationRequest | Consolidate Request - try { - apiInstance.consolidateArray(namespace, array, consolidateRequest); - } catch (ApiException e) { - System.err.println("Exception when calling ArrayApi#consolidateArray"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ArrayApi apiInstance = new ArrayApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of array that is url-encoded + ArrayConsolidationRequest consolidateRequest = new ArrayConsolidationRequest(); // ArrayConsolidationRequest | Consolidate Request + try { + apiInstance.consolidateArray(namespace, array, consolidateRequest); + } catch (ApiException e) { + System.err.println("Exception when calling ArrayApi#consolidateArray"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -814,7 +813,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -828,7 +827,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **createArray** > createArray(namespace, array, contentType, arraySchema, X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME) @@ -837,48 +836,47 @@ null (empty response body) create a array schema at a specified URI registered to a group/project ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import ArrayApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ArrayApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ArrayApi apiInstance = new ArrayApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String array = "array_example"; // String | name/uri of array that is url-encoded - String contentType = "application/json"; // String | Content Type of input and return mime - ArraySchema arraySchema = new ArraySchema(); // ArraySchema | ArraySchema being created - String X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME = "X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME_example"; // String | Optional registered access credentials to use for creation - try { - apiInstance.createArray(namespace, array, contentType, arraySchema, X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME); - } catch (ApiException e) { - System.err.println("Exception when calling ArrayApi#createArray"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ArrayApi apiInstance = new ArrayApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of array that is url-encoded + String contentType = "application/json"; // String | Content Type of input and return mime + ArraySchema arraySchema = new ArraySchema(); // ArraySchema | ArraySchema being created + String X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME = "X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME_example"; // String | Optional registered access credentials to use for creation + try { + apiInstance.createArray(namespace, array, contentType, arraySchema, X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME); + } catch (ApiException e) { + System.err.println("Exception when calling ArrayApi#createArray"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -898,7 +896,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -912,7 +910,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **deleteArray** > deleteArray(namespace, array, contentType) @@ -921,46 +919,45 @@ null (empty response body) delete a array ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import ArrayApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ArrayApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ArrayApi apiInstance = new ArrayApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String array = "array_example"; // String | name/uri of array that is url-encoded - String contentType = "application/json"; // String | Content Type of input and return mime - try { - apiInstance.deleteArray(namespace, array, contentType); - } catch (ApiException e) { - System.err.println("Exception when calling ArrayApi#deleteArray"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ArrayApi apiInstance = new ArrayApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of array that is url-encoded + String contentType = "application/json"; // String | Content Type of input and return mime + try { + apiInstance.deleteArray(namespace, array, contentType); + } catch (ApiException e) { + System.err.println("Exception when calling ArrayApi#deleteArray"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -978,7 +975,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -992,7 +989,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **deregisterArray** > deregisterArray(namespace, array) @@ -1001,45 +998,44 @@ null (empty response body) deregister a array ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import ArrayApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ArrayApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ArrayApi apiInstance = new ArrayApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String array = "array_example"; // String | name/uri of array that is url-encoded - try { - apiInstance.deregisterArray(namespace, array); - } catch (ApiException e) { - System.err.println("Exception when calling ArrayApi#deregisterArray"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ArrayApi apiInstance = new ArrayApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of array that is url-encoded + try { + apiInstance.deregisterArray(namespace, array); + } catch (ApiException e) { + System.err.println("Exception when calling ArrayApi#deregisterArray"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1056,7 +1052,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1070,7 +1066,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **fragmentInfo** > FragmentInfo fragmentInfo(namespace, array, contentType, fragmentInfoRequest) @@ -1079,48 +1075,47 @@ null (empty response body) fetch an array's fragment info ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import ArrayApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ArrayApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ArrayApi apiInstance = new ArrayApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String array = "array_example"; // String | name/uri of array that is url-encoded - String contentType = "application/json"; // String | Content Type of input and return mime - FragmentInfoRequest fragmentInfoRequest = new FragmentInfoRequest(); // FragmentInfoRequest | ArraySchema being created - try { - FragmentInfo result = apiInstance.fragmentInfo(namespace, array, contentType, fragmentInfoRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ArrayApi#fragmentInfo"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ArrayApi apiInstance = new ArrayApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of array that is url-encoded + String contentType = "application/json"; // String | Content Type of input and return mime + FragmentInfoRequest fragmentInfoRequest = new FragmentInfoRequest(); // FragmentInfoRequest | ArraySchema being created + try { + FragmentInfo result = apiInstance.fragmentInfo(namespace, array, contentType, fragmentInfoRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ArrayApi#fragmentInfo"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1139,7 +1134,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1152,7 +1147,7 @@ public class Example { | **200** | fragment info | - | | **0** | error response | - | - + # **getActivityLogById** > ArrayActivityLog getActivityLogById(namespace, array, id) @@ -1161,47 +1156,46 @@ public class Example { get activity log by ID ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import ArrayApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ArrayApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ArrayApi apiInstance = new ArrayApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String array = "array_example"; // String | name/uri of array that is url-encoded - String id = "id_example"; // String | ID of the activity - try { - ArrayActivityLog result = apiInstance.getActivityLogById(namespace, array, id); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ArrayApi#getActivityLogById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ArrayApi apiInstance = new ArrayApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of array that is url-encoded + String id = "id_example"; // String | ID of the activity + try { + ArrayActivityLog result = apiInstance.getActivityLogById(namespace, array, id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ArrayApi#getActivityLogById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1219,7 +1213,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1233,7 +1227,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getAllArrayMetadata** > List<ArrayInfo> getAllArrayMetadata(publicShare) @@ -1242,45 +1236,44 @@ public class Example { get all array metadata user has access to ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import ArrayApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ArrayApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ArrayApi apiInstance = new ArrayApi(defaultClient); - String publicShare = "publicShare_example"; // String | Public share values can be one of exclude, only - try { - List result = apiInstance.getAllArrayMetadata(publicShare); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ArrayApi#getAllArrayMetadata"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ArrayApi apiInstance = new ArrayApi(defaultClient); + String publicShare = "publicShare_example"; // String | Public share values can be one of exclude, only + try { + List result = apiInstance.getAllArrayMetadata(publicShare); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ArrayApi#getAllArrayMetadata"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1296,7 +1289,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1310,7 +1303,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getArray** > ArraySchema getArray(namespace, array, contentType) @@ -1319,47 +1312,46 @@ public class Example { get an ArraySchema using a url encoded uri ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import ArrayApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ArrayApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ArrayApi apiInstance = new ArrayApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String array = "array_example"; // String | name/uri of array that is url-encoded - String contentType = "application/json"; // String | Content Type of input and return mime - try { - ArraySchema result = apiInstance.getArray(namespace, array, contentType); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ArrayApi#getArray"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ArrayApi apiInstance = new ArrayApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of array that is url-encoded + String contentType = "application/json"; // String | Content Type of input and return mime + try { + ArraySchema result = apiInstance.getArray(namespace, array, contentType); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ArrayApi#getArray"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1377,7 +1369,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1391,7 +1383,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getArrayMaxBufferSizes** > MaxBufferSizes getArrayMaxBufferSizes(namespace, array, subarray, contentType, xPayer) @@ -1400,49 +1392,48 @@ public class Example { get the max buffer sizes of an array for a subarray ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import ArrayApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ArrayApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ArrayApi apiInstance = new ArrayApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String array = "array_example"; // String | name/uri of array that is url-encoded - String subarray = "subarray_example"; // String | CSV string of subarray to get max buffer sizes for - String contentType = "application/json"; // String | Content Type of input and return mime - String xPayer = "xPayer_example"; // String | Name of organization or user who should be charged for this request - try { - MaxBufferSizes result = apiInstance.getArrayMaxBufferSizes(namespace, array, subarray, contentType, xPayer); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ArrayApi#getArrayMaxBufferSizes"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ArrayApi apiInstance = new ArrayApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of array that is url-encoded + String subarray = "subarray_example"; // String | CSV string of subarray to get max buffer sizes for + String contentType = "application/json"; // String | Content Type of input and return mime + String xPayer = "xPayer_example"; // String | Name of organization or user who should be charged for this request + try { + MaxBufferSizes result = apiInstance.getArrayMaxBufferSizes(namespace, array, subarray, contentType, xPayer); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ArrayApi#getArrayMaxBufferSizes"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1462,7 +1453,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1476,57 +1467,56 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getArrayMetaDataJson** -> Object getArrayMetaDataJson(namespace, array, length, endTimestamp) +> Map<String, Object> getArrayMetaDataJson(namespace, array, length, endTimestamp) get metadata from the array in JSON format ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import ArrayApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ArrayApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ArrayApi apiInstance = new ArrayApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String array = "array_example"; // String | name/uri of array that is url-encoded - Integer length = 56; // Integer | (optional) limit character length of returned values - Integer endTimestamp = 56; // Integer | Milliseconds since Unix epoch, metadata will use open_at functionality to open array at the specific timestamp - try { - Object result = apiInstance.getArrayMetaDataJson(namespace, array, length, endTimestamp); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ArrayApi#getArrayMetaDataJson"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ArrayApi apiInstance = new ArrayApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of array that is url-encoded + Integer length = 56; // Integer | (optional) limit character length of returned values + Integer endTimestamp = 56; // Integer | Milliseconds since Unix epoch, metadata will use open_at functionality to open array at the specific timestamp + try { + Map result = apiInstance.getArrayMetaDataJson(namespace, array, length, endTimestamp); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ArrayApi#getArrayMetaDataJson"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1541,11 +1531,11 @@ public class Example { ### Return type -**Object** +**Map<String, Object>** ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1559,7 +1549,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getArrayMetadata** > ArrayInfo getArrayMetadata(namespace, array) @@ -1568,46 +1558,45 @@ public class Example { get metadata on an array ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import ArrayApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ArrayApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ArrayApi apiInstance = new ArrayApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String array = "array_example"; // String | name/uri of array that is url-encoded - try { - ArrayInfo result = apiInstance.getArrayMetadata(namespace, array); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ArrayApi#getArrayMetadata"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ArrayApi apiInstance = new ArrayApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of array that is url-encoded + try { + ArrayInfo result = apiInstance.getArrayMetadata(namespace, array); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ArrayApi#getArrayMetadata"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1624,7 +1613,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1638,7 +1627,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getArrayMetadataCapnp** > ArrayMetadata getArrayMetadataCapnp(namespace, array) @@ -1647,46 +1636,45 @@ public class Example { get metadata on an array ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import ArrayApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ArrayApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ArrayApi apiInstance = new ArrayApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String array = "array_example"; // String | name/uri of array that is url-encoded - try { - ArrayMetadata result = apiInstance.getArrayMetadataCapnp(namespace, array); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ArrayApi#getArrayMetadataCapnp"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ArrayApi apiInstance = new ArrayApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of array that is url-encoded + try { + ArrayMetadata result = apiInstance.getArrayMetadataCapnp(namespace, array); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ArrayApi#getArrayMetadataCapnp"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1703,7 +1691,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1717,7 +1705,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getArrayNonEmptyDomain** > NonEmptyDomain getArrayNonEmptyDomain(namespace, array, contentType, xPayer) @@ -1726,48 +1714,47 @@ public class Example { get the non empty domain of an array ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import ArrayApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ArrayApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ArrayApi apiInstance = new ArrayApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String array = "array_example"; // String | name/uri of array that is url-encoded - String contentType = "application/json"; // String | Content Type of input and return mime - String xPayer = "xPayer_example"; // String | Name of organization or user who should be charged for this request - try { - NonEmptyDomain result = apiInstance.getArrayNonEmptyDomain(namespace, array, contentType, xPayer); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ArrayApi#getArrayNonEmptyDomain"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ArrayApi apiInstance = new ArrayApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of array that is url-encoded + String contentType = "application/json"; // String | Content Type of input and return mime + String xPayer = "xPayer_example"; // String | Name of organization or user who should be charged for this request + try { + NonEmptyDomain result = apiInstance.getArrayNonEmptyDomain(namespace, array, contentType, xPayer); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ArrayApi#getArrayNonEmptyDomain"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1786,7 +1773,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1800,55 +1787,54 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getArrayNonEmptyDomainJson** -> Object getArrayNonEmptyDomainJson(namespace, array) +> Map<String, Object> getArrayNonEmptyDomainJson(namespace, array) get non-empty domain from the array in json format ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import ArrayApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ArrayApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ArrayApi apiInstance = new ArrayApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String array = "array_example"; // String | name/uri of array that is url-encoded - try { - Object result = apiInstance.getArrayNonEmptyDomainJson(namespace, array); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ArrayApi#getArrayNonEmptyDomainJson"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ArrayApi apiInstance = new ArrayApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of array that is url-encoded + try { + Map result = apiInstance.getArrayNonEmptyDomainJson(namespace, array); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ArrayApi#getArrayNonEmptyDomainJson"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1861,11 +1847,11 @@ public class Example { ### Return type -**Object** +**Map<String, Object>** ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1879,7 +1865,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getArraySampleData** > ArraySample getArraySampleData(namespace, array, samples) @@ -1888,47 +1874,46 @@ public class Example { get an sample set of data from the array ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import ArrayApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ArrayApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ArrayApi apiInstance = new ArrayApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String array = "array_example"; // String | name/uri of array that is url-encoded - BigDecimal samples = new BigDecimal("5.0"); // BigDecimal | Number of sample results to return - try { - ArraySample result = apiInstance.getArraySampleData(namespace, array, samples); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ArrayApi#getArraySampleData"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ArrayApi apiInstance = new ArrayApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of array that is url-encoded + BigDecimal samples = new BigDecimal("5.0"); // BigDecimal | Number of sample results to return + try { + ArraySample result = apiInstance.getArraySampleData(namespace, array, samples); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ArrayApi#getArraySampleData"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1946,7 +1931,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1960,7 +1945,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getArraySharingPolicies** > List<ArraySharing> getArraySharingPolicies(namespace, array) @@ -1969,46 +1954,45 @@ public class Example { Get all sharing details of the array ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import ArrayApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ArrayApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ArrayApi apiInstance = new ArrayApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String array = "array_example"; // String | name/uri of array that is url-encoded - try { - List result = apiInstance.getArraySharingPolicies(namespace, array); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ArrayApi#getArraySharingPolicies"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ArrayApi apiInstance = new ArrayApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of array that is url-encoded + try { + List result = apiInstance.getArraySharingPolicies(namespace, array); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ArrayApi#getArraySharingPolicies"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -2025,7 +2009,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -2040,54 +2024,54 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getArraysInNamespace** -> List<ArrayInfo> getArraysInNamespace(namespace) +> List<ArrayInfo> getArraysInNamespace(namespace, withMetadata) get metadata on all arrays in a namespace ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import ArrayApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ArrayApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ArrayApi apiInstance = new ArrayApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - try { - List result = apiInstance.getArraysInNamespace(namespace); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ArrayApi#getArraysInNamespace"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ArrayApi apiInstance = new ArrayApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + Boolean withMetadata = true; // Boolean | include the metadata of the arrays + try { + List result = apiInstance.getArraysInNamespace(namespace, withMetadata); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ArrayApi#getArraysInNamespace"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -2096,6 +2080,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **namespace** | **String**| namespace array is in (an organization name or user's username) | | +| **withMetadata** | **Boolean**| include the metadata of the arrays | [optional] | ### Return type @@ -2103,7 +2088,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -2117,7 +2102,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getFragmentEndTimestamp** > Integer getFragmentEndTimestamp(namespace, array, endTimestamp) @@ -2126,47 +2111,46 @@ public class Example { Get fragment end_timestamp on an array, will search for the closest end_timestamp to the timestamp asked ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import ArrayApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ArrayApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ArrayApi apiInstance = new ArrayApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String array = "array_example"; // String | name/uri of array that is url-encoded - Integer endTimestamp = 56; // Integer | Milliseconds since Unix epoch - try { - Integer result = apiInstance.getFragmentEndTimestamp(namespace, array, endTimestamp); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ArrayApi#getFragmentEndTimestamp"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ArrayApi apiInstance = new ArrayApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of array that is url-encoded + Integer endTimestamp = 56; // Integer | Milliseconds since Unix epoch + try { + Integer result = apiInstance.getFragmentEndTimestamp(namespace, array, endTimestamp); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ArrayApi#getFragmentEndTimestamp"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -2184,7 +2168,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -2198,51 +2182,50 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getLastAccessedArrays** > List<LastAccessedArray> getLastAccessedArrays() ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import ArrayApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ArrayApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ArrayApi apiInstance = new ArrayApi(defaultClient); - try { - List result = apiInstance.getLastAccessedArrays(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ArrayApi#getLastAccessedArrays"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ArrayApi apiInstance = new ArrayApi(defaultClient); + try { + List result = apiInstance.getLastAccessedArrays(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ArrayApi#getLastAccessedArrays"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -2255,7 +2238,7 @@ This endpoint does not need any parameter. ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -2269,7 +2252,169 @@ This endpoint does not need any parameter. | **502** | Bad Gateway | - | | **0** | error response | - | - + +# **loadArraySchema** +> LoadArraySchemaResponse loadArraySchema(namespace, array, loadArraySchemaRequest) + + + +request to get the array schema + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ArrayApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ArrayApi apiInstance = new ArrayApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of array that is url-encoded + LoadArraySchemaRequest loadArraySchemaRequest = new LoadArraySchemaRequest(); // LoadArraySchemaRequest | Load Array Schema Request + try { + LoadArraySchemaResponse result = apiInstance.loadArraySchema(namespace, array, loadArraySchemaRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ArrayApi#loadArraySchema"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **namespace** | **String**| namespace array is in (an organization name or user's username) | | +| **array** | **String**| name/uri of array that is url-encoded | | +| **loadArraySchemaRequest** | [**LoadArraySchemaRequest**](LoadArraySchemaRequest.md)| Load Array Schema Request | | + +### Return type + +[**LoadArraySchemaResponse**](LoadArraySchemaResponse.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | array schemas returned successfully | - | +| **404** | Array does not exist or user does not have permissions to access it | - | +| **502** | Bad Gateway | - | +| **0** | error response | - | + + +# **loadEnumerations** +> LoadEnumerationsResponse loadEnumerations(namespace, array, loadEnumerationsRequest) + + + +request to get the enumerations of the arrays' attributes + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ArrayApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ArrayApi apiInstance = new ArrayApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of array that is url-encoded + LoadEnumerationsRequest loadEnumerationsRequest = new LoadEnumerationsRequest(); // LoadEnumerationsRequest | Load Enumerations Request + try { + LoadEnumerationsResponse result = apiInstance.loadEnumerations(namespace, array, loadEnumerationsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ArrayApi#loadEnumerations"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **namespace** | **String**| namespace array is in (an organization name or user's username) | | +| **array** | **String**| name/uri of array that is url-encoded | | +| **loadEnumerationsRequest** | [**LoadEnumerationsRequest**](LoadEnumerationsRequest.md)| Load Enumerations Request | | + +### Return type + +[**LoadEnumerationsResponse**](LoadEnumerationsResponse.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | enumerations returned successfully | - | +| **404** | Array does not exist or user does not have permissions to access it | - | +| **502** | Bad Gateway | - | +| **0** | error response | - | + + # **registerArray** > ArrayInfo registerArray(namespace, array, arrayMetadata) @@ -2278,47 +2423,46 @@ This endpoint does not need any parameter. register an array at a specified URI registered to the given namespace ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import ArrayApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ArrayApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ArrayApi apiInstance = new ArrayApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String array = "array_example"; // String | name/uri of array that is url-encoded - ArrayInfoUpdate arrayMetadata = new ArrayInfoUpdate(); // ArrayInfoUpdate | metadata associated with array - try { - ArrayInfo result = apiInstance.registerArray(namespace, array, arrayMetadata); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ArrayApi#registerArray"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ArrayApi apiInstance = new ArrayApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of array that is url-encoded + ArrayInfoUpdate arrayMetadata = new ArrayInfoUpdate(); // ArrayInfoUpdate | metadata associated with array + try { + ArrayInfo result = apiInstance.registerArray(namespace, array, arrayMetadata); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ArrayApi#registerArray"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -2336,7 +2480,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -2350,7 +2494,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **shareArray** > shareArray(namespace, array, arraySharing) @@ -2359,46 +2503,45 @@ public class Example { Share an array with a user ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import ArrayApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ArrayApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ArrayApi apiInstance = new ArrayApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String array = "array_example"; // String | name/uri of array that is url-encoded - ArraySharing arraySharing = new ArraySharing(); // ArraySharing | Namespace and list of permissions to share with. An empty list of permissions will remove the namespace; if permissions already exist they will be deleted then new ones added. In the event of a failure, the new policies will be rolled back to prevent partial policies, and it's likely the array will not be shared with the namespace at all. - try { - apiInstance.shareArray(namespace, array, arraySharing); - } catch (ApiException e) { - System.err.println("Exception when calling ArrayApi#shareArray"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ArrayApi apiInstance = new ArrayApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of array that is url-encoded + ArraySharing arraySharing = new ArraySharing(); // ArraySharing | Namespace and list of permissions to share with. An empty list of permissions will remove the namespace; if permissions already exist they will be deleted then new ones added. In the event of a failure, the new policies will be rolled back to prevent partial policies, and it's likely the array will not be shared with the namespace at all. + try { + apiInstance.shareArray(namespace, array, arraySharing); + } catch (ApiException e) { + System.err.println("Exception when calling ArrayApi#shareArray"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -2416,7 +2559,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -2431,7 +2574,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **updateArrayMetadata** > updateArrayMetadata(namespace, array, arrayMetadata) @@ -2440,46 +2583,45 @@ null (empty response body) update metadata on an array ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import ArrayApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ArrayApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ArrayApi apiInstance = new ArrayApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String array = "array_example"; // String | name/uri of array that is url-encoded - ArrayInfoUpdate arrayMetadata = new ArrayInfoUpdate(); // ArrayInfoUpdate | array metadata to update - try { - apiInstance.updateArrayMetadata(namespace, array, arrayMetadata); - } catch (ApiException e) { - System.err.println("Exception when calling ArrayApi#updateArrayMetadata"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ArrayApi apiInstance = new ArrayApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of array that is url-encoded + ArrayInfoUpdate arrayMetadata = new ArrayInfoUpdate(); // ArrayInfoUpdate | array metadata to update + try { + apiInstance.updateArrayMetadata(namespace, array, arrayMetadata); + } catch (ApiException e) { + System.err.println("Exception when calling ArrayApi#updateArrayMetadata"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -2497,7 +2639,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -2511,7 +2653,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **updateArrayMetadataCapnp** > updateArrayMetadataCapnp(namespace, array, arrayMetadataEntries) @@ -2520,46 +2662,45 @@ null (empty response body) update metadata on an array ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import ArrayApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ArrayApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ArrayApi apiInstance = new ArrayApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String array = "array_example"; // String | name/uri of array that is url-encoded - ArrayMetadata arrayMetadataEntries = new ArrayMetadata(); // ArrayMetadata | List of metadata entries - try { - apiInstance.updateArrayMetadataCapnp(namespace, array, arrayMetadataEntries); - } catch (ApiException e) { - System.err.println("Exception when calling ArrayApi#updateArrayMetadataCapnp"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ArrayApi apiInstance = new ArrayApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of array that is url-encoded + ArrayMetadata arrayMetadataEntries = new ArrayMetadata(); // ArrayMetadata | List of metadata entries + try { + apiInstance.updateArrayMetadataCapnp(namespace, array, arrayMetadataEntries); + } catch (ApiException e) { + System.err.println("Exception when calling ArrayApi#updateArrayMetadataCapnp"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -2577,7 +2718,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -2591,7 +2732,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **vacuumArray** > vacuumArray(namespace, array, vaccumRequest) @@ -2600,46 +2741,45 @@ null (empty response body) vacuum an array at a specified URI ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import ArrayApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ArrayApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ArrayApi apiInstance = new ArrayApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String array = "array_example"; // String | name/uri of array that is url-encoded - ArrayVacuumRequest vaccumRequest = new ArrayVacuumRequest(); // ArrayVacuumRequest | Vaccum Request - try { - apiInstance.vacuumArray(namespace, array, vaccumRequest); - } catch (ApiException e) { - System.err.println("Exception when calling ArrayApi#vacuumArray"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ArrayApi apiInstance = new ArrayApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of array that is url-encoded + ArrayVacuumRequest vaccumRequest = new ArrayVacuumRequest(); // ArrayVacuumRequest | Vaccum Request + try { + apiInstance.vacuumArray(namespace, array, vaccumRequest); + } catch (ApiException e) { + System.err.println("Exception when calling ArrayApi#vacuumArray"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -2657,7 +2797,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers diff --git a/docs/ArrayConsolidationRequest.md b/docs/ArrayConsolidationRequest.md index 2bff2fb..b8decba 100644 --- a/docs/ArrayConsolidationRequest.md +++ b/docs/ArrayConsolidationRequest.md @@ -9,6 +9,7 @@ Request to consolidate an array | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**config** | [**TileDBConfig**](TileDBConfig.md) | | [optional] | +|**fragments** | **List<String>** | list of fragments in the array to consolidate | [optional] | diff --git a/docs/ArrayInfo.md b/docs/ArrayInfo.md index a0ccf8d..9fae9b7 100644 --- a/docs/ArrayInfo.md +++ b/docs/ArrayInfo.md @@ -32,6 +32,9 @@ metadata of an array |**licenseText** | **String** | License text | [optional] | |**readOnly** | **Boolean** | Suggests if the array is in read_only mode | [optional] | |**isFavorite** | **Boolean** | Indicates whether the array is in user favorites | [optional] | +|**createdAt** | **OffsetDateTime** | Datetime array was registered with tiledb | [optional] | +|**createdBy** | **String** | The user who created the array, if known. | [optional] | +|**metadata** | [**List<MetadataStringifiedEntry>**](MetadataStringifiedEntry.md) | Contains the metadata of the array. **Note:** This property is included in the response only if the `with_metadata` query parameter is set to `true`. | [optional] | diff --git a/docs/ArrayTask.md b/docs/ArrayTask.md index 05700c4..3aca31c 100644 --- a/docs/ArrayTask.md +++ b/docs/ArrayTask.md @@ -37,6 +37,8 @@ Synchronous Task to Run |**resultFormat** | **ResultFormat** | | [optional] | |**taskGraphUuid** | **String** | If set, the ID of the log for the task graph that this was part of. | [optional] | |**clientNodeUuid** | **String** | If set, the client-defined ID of the node within this task's graph. | [optional] | +|**cloudProvider** | **String** | The name of the cloud provider where this task executed. | [optional] | +|**cloudRegion** | **String** | The region of the cloud provider where this task executed. | [optional] | diff --git a/docs/ArrayTasksApi.md b/docs/ArrayTasksApi.md index d9699f9..1245736 100644 --- a/docs/ArrayTasksApi.md +++ b/docs/ArrayTasksApi.md @@ -7,53 +7,52 @@ All URIs are relative to */v1* | [**getArrayTasksSidebar**](ArrayTasksApi.md#getArrayTasksSidebar) | **GET** /tasks/sidebar | | - + # **getArrayTasksSidebar** > ArrayTaskBrowserSidebar getArrayTasksSidebar(start, end) ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import ArrayTasksApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ArrayTasksApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ArrayTasksApi apiInstance = new ArrayTasksApi(defaultClient); - Integer start = 56; // Integer | Fetch tasks created after this time, unix epoch in seconds, default 7 days ago - Integer end = 56; // Integer | Fetch tasks created before this time, unix epoch in seconds, default now - try { - ArrayTaskBrowserSidebar result = apiInstance.getArrayTasksSidebar(start, end); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ArrayTasksApi#getArrayTasksSidebar"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ArrayTasksApi apiInstance = new ArrayTasksApi(defaultClient); + Integer start = 56; // Integer | Fetch tasks created after this time, unix epoch in seconds, default 7 days ago + Integer end = 56; // Integer | Fetch tasks created before this time, unix epoch in seconds, default now + try { + ArrayTaskBrowserSidebar result = apiInstance.getArrayTasksSidebar(start, end); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ArrayTasksApi#getArrayTasksSidebar"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -70,7 +69,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers diff --git a/docs/AssetBackingType.md b/docs/AssetBackingType.md new file mode 100644 index 0000000..4b6ee3f --- /dev/null +++ b/docs/AssetBackingType.md @@ -0,0 +1,13 @@ + + +# AssetBackingType + +## Enum + + +* `ARRAY` (value: `"array"`) + +* `GROUP` (value: `"group"`) + + + diff --git a/docs/AssetInfo.md b/docs/AssetInfo.md new file mode 100644 index 0000000..d2522cc --- /dev/null +++ b/docs/AssetInfo.md @@ -0,0 +1,23 @@ + + +# AssetInfo + +metadata of an asset + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **String** | unique ID of a registered asset | [optional] | +|**assetType** | **AssetType** | | [optional] | +|**assetBackingType** | **AssetBackingType** | | [optional] | +|**assetOwnershipLevel** | **AssetOwnershipLevel** | | [optional] | +|**namespaceName** | **String** | namespace_name that the asset is registered to | [optional] | +|**namespaceUuid** | **String** | namespace_uuid that the asset is registered to | [optional] | +|**name** | **String** | name of asset | [optional] | +|**mimeType** | **String** | mime type of the asset | [optional] | +|**createdAt** | **OffsetDateTime** | Time when the asset was created (rfc3339) | [optional] [readonly] | +|**metadata** | [**MetadataStringified**](MetadataStringified.md) | | [optional] | + + + diff --git a/docs/AssetListResponse.md b/docs/AssetListResponse.md new file mode 100644 index 0000000..3c38bcb --- /dev/null +++ b/docs/AssetListResponse.md @@ -0,0 +1,15 @@ + + +# AssetListResponse + +Asset associated with a TileDB Cloud account + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<AssetInfo>**](AssetInfo.md) | asset information for each asset | [optional] | +|**paginationMetadata** | [**PaginationMetadata**](PaginationMetadata.md) | | [optional] | + + + diff --git a/docs/AssetOwnershipLevel.md b/docs/AssetOwnershipLevel.md new file mode 100644 index 0000000..424f9cb --- /dev/null +++ b/docs/AssetOwnershipLevel.md @@ -0,0 +1,13 @@ + + +# AssetOwnershipLevel + +## Enum + + +* `OWNED` (value: `"owned"`) + +* `SHARED` (value: `"shared"`) + + + diff --git a/docs/AssetsApi.md b/docs/AssetsApi.md new file mode 100644 index 0000000..410edc1 --- /dev/null +++ b/docs/AssetsApi.md @@ -0,0 +1,266 @@ +# AssetsApi + +All URIs are relative to */v1* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**changeAssetCredentials**](AssetsApi.md#changeAssetCredentials) | **POST** /assets/{namespace}/change_credentials | | +| [**listAssets**](AssetsApi.md#listAssets) | **GET** /assets/{namespace} | | +| [**listPublicAssets**](AssetsApi.md#listPublicAssets) | **GET** /public_assets | | + + + +# **changeAssetCredentials** +> changeAssetCredentials(namespace, changeCredentialsRequest) + + + +Changes the access credentials to the given assets + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.AssetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + AssetsApi apiInstance = new AssetsApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace to send the request on behalf of. + ChangeAssetCredentialsRequest changeCredentialsRequest = new ChangeAssetCredentialsRequest(); // ChangeAssetCredentialsRequest | aws access credentials to store for a namespace + try { + apiInstance.changeAssetCredentials(namespace, changeCredentialsRequest); + } catch (ApiException e) { + System.err.println("Exception when calling AssetsApi#changeAssetCredentials"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **namespace** | **String**| The namespace to send the request on behalf of. | | +| **changeCredentialsRequest** | [**ChangeAssetCredentialsRequest**](ChangeAssetCredentialsRequest.md)| aws access credentials to store for a namespace | | + +### Return type + +null (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Credentials changed successfully | - | +| **502** | Bad Gateway | - | +| **0** | error response | - | + + +# **listAssets** +> AssetListResponse listAssets(namespace, assetType, ownershipLevel, depth, search, page, perPage, orderBy, expand) + + + +List assets in a namespace + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.AssetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + AssetsApi apiInstance = new AssetsApi(defaultClient); + String namespace = "namespace_example"; // String | namespace + String assetType = "assetType_example"; // String | asset_type to filter to + String ownershipLevel = "ownershipLevel_example"; // String | ownership_level to filter to (owned, shared) + String depth = "depth_example"; // String | depth of assets to be returned + String search = "search_example"; // String | search string + Integer page = 56; // Integer | pagination offset + Integer perPage = 56; // Integer | pagination limit + String orderBy = "orderBy_example"; // String | order by a specific property, defaults to `created_at desc` supported values are created_at, name, asset_type can also include the order type (asc or desc) separated by space i.e. `name asc` `name desc` etc. + String expand = "expand_example"; // String | expansion option for the AssetInfo object to be added to the response + try { + AssetListResponse result = apiInstance.listAssets(namespace, assetType, ownershipLevel, depth, search, page, perPage, orderBy, expand); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AssetsApi#listAssets"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **namespace** | **String**| namespace | | +| **assetType** | **String**| asset_type to filter to | [optional] | +| **ownershipLevel** | **String**| ownership_level to filter to (owned, shared) | [optional] | +| **depth** | **String**| depth of assets to be returned | [optional] | +| **search** | **String**| search string | [optional] | +| **page** | **Integer**| pagination offset | [optional] | +| **perPage** | **Integer**| pagination limit | [optional] | +| **orderBy** | **String**| order by a specific property, defaults to `created_at desc` supported values are created_at, name, asset_type can also include the order type (asc or desc) separated by space i.e. `name asc` `name desc` etc. | [optional] | +| **expand** | **String**| expansion option for the AssetInfo object to be added to the response | [optional] | + +### Return type + +[**AssetListResponse**](AssetListResponse.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful list of assets | - | +| **502** | Bad Gateway | - | +| **0** | error response | - | + + +# **listPublicAssets** +> AssetListResponse listPublicAssets(assetType, depth, search, page, perPage, orderBy) + + + +List public assets + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.AssetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + AssetsApi apiInstance = new AssetsApi(defaultClient); + String assetType = "assetType_example"; // String | asset_type to filter to + String depth = "depth_example"; // String | depth of assets to be returned + String search = "search_example"; // String | search string + Integer page = 56; // Integer | pagination offset + Integer perPage = 56; // Integer | pagination limit + String orderBy = "orderBy_example"; // String | order by a specific property, defaults to `created_at desc` supported values are created_at, name, asset_type can also include the order type (asc or desc) separated by space i.e. `name asc` `name desc` etc. + try { + AssetListResponse result = apiInstance.listPublicAssets(assetType, depth, search, page, perPage, orderBy); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AssetsApi#listPublicAssets"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **assetType** | **String**| asset_type to filter to | [optional] | +| **depth** | **String**| depth of assets to be returned | [optional] | +| **search** | **String**| search string | [optional] | +| **page** | **Integer**| pagination offset | [optional] | +| **perPage** | **Integer**| pagination limit | [optional] | +| **orderBy** | **String**| order by a specific property, defaults to `created_at desc` supported values are created_at, name, asset_type can also include the order type (asc or desc) separated by space i.e. `name asc` `name desc` etc. | [optional] | + +### Return type + +[**AssetListResponse**](AssetListResponse.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful list of assets | - | +| **502** | Bad Gateway | - | +| **0** | error response | - | + diff --git a/docs/ChangeAssetCredentialsRequest.md b/docs/ChangeAssetCredentialsRequest.md new file mode 100644 index 0000000..a277a74 --- /dev/null +++ b/docs/ChangeAssetCredentialsRequest.md @@ -0,0 +1,15 @@ + + +# ChangeAssetCredentialsRequest + +Request body to change the credentials of the given assets + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**accessCredentials** | **String** | The name or uuid of the access credentials | | +|**assetUuids** | **List<String>** | The list of asset uuids to have their credentials changed | | + + + diff --git a/docs/Datatype.md b/docs/Datatype.md index 08ad162..c1142dc 100644 --- a/docs/Datatype.md +++ b/docs/Datatype.md @@ -41,5 +41,53 @@ * `ANY` (value: `"ANY"`) +* `DATETIME_YEAR` (value: `"DATETIME_YEAR"`) + +* `DATETIME_MONTH` (value: `"DATETIME_MONTH"`) + +* `DATETIME_WEEK` (value: `"DATETIME_WEEK"`) + +* `DATETIME_DAY` (value: `"DATETIME_DAY"`) + +* `DATETIME_HR` (value: `"DATETIME_HR"`) + +* `DATETIME_MIN` (value: `"DATETIME_MIN"`) + +* `DATETIME_SEC` (value: `"DATETIME_SEC"`) + +* `DATETIME_MS` (value: `"DATETIME_MS"`) + +* `DATETIME_US` (value: `"DATETIME_US"`) + +* `DATETIME_NS` (value: `"DATETIME_NS"`) + +* `DATETIME_PS` (value: `"DATETIME_PS"`) + +* `DATETIME_FS` (value: `"DATETIME_FS"`) + +* `DATETIME_AS` (value: `"DATETIME_AS"`) + +* `TIME_HR` (value: `"TIME_HR"`) + +* `TIME_MIN` (value: `"TIME_MIN"`) + +* `TIME_SEC` (value: `"TIME_SEC"`) + +* `TIME_MS` (value: `"TIME_MS"`) + +* `TIME_US` (value: `"TIME_US"`) + +* `TIME_NS` (value: `"TIME_NS"`) + +* `TIME_PS` (value: `"TIME_PS"`) + +* `TIME_FS` (value: `"TIME_FS"`) + +* `TIME_AS` (value: `"TIME_AS"`) + +* `BLOB` (value: `"BLOB"`) + +* `BOOL` (value: `"BOOL"`) + diff --git a/docs/Enumeration.md b/docs/Enumeration.md new file mode 100644 index 0000000..4ee14c8 --- /dev/null +++ b/docs/Enumeration.md @@ -0,0 +1,20 @@ + + +# Enumeration + +The enumerations of a single attribute + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | +|**pathName** | **String** | | [optional] | +|**type** | **String** | | [optional] | +|**cellValNum** | **Integer** | | [optional] | +|**ordered** | **Boolean** | | [optional] | +|**data** | **List<Integer>** | | [optional] | +|**offsets** | **List<Integer>** | | [optional] | + + + diff --git a/docs/FavoritesApi.md b/docs/FavoritesApi.md index 0bdad14..a19f9c7 100644 --- a/docs/FavoritesApi.md +++ b/docs/FavoritesApi.md @@ -26,7 +26,7 @@ All URIs are relative to */v1* | [**listUDFFavoritesUUIDs**](FavoritesApi.md#listUDFFavoritesUUIDs) | **GET** /udfs/favorites/uuids | | - + # **addArrayFavorite** > addArrayFavorite(namespace, name) @@ -35,45 +35,44 @@ All URIs are relative to */v1* Add a new array favorite ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import FavoritesApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FavoritesApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - FavoritesApi apiInstance = new FavoritesApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace of the array - String name = "name_example"; // String | The name of the array - try { - apiInstance.addArrayFavorite(namespace, name); - } catch (ApiException e) { - System.err.println("Exception when calling FavoritesApi#addArrayFavorite"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + FavoritesApi apiInstance = new FavoritesApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace of the array + String name = "name_example"; // String | The name of the array + try { + apiInstance.addArrayFavorite(namespace, name); + } catch (ApiException e) { + System.err.println("Exception when calling FavoritesApi#addArrayFavorite"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -90,7 +89,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -104,7 +103,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **addMLModelFavorite** > addMLModelFavorite(namespace, name) @@ -113,45 +112,44 @@ null (empty response body) Add a new ML model favorite ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import FavoritesApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FavoritesApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - FavoritesApi apiInstance = new FavoritesApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace of the ML model - String name = "name_example"; // String | The name of the ML model - try { - apiInstance.addMLModelFavorite(namespace, name); - } catch (ApiException e) { - System.err.println("Exception when calling FavoritesApi#addMLModelFavorite"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + FavoritesApi apiInstance = new FavoritesApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace of the ML model + String name = "name_example"; // String | The name of the ML model + try { + apiInstance.addMLModelFavorite(namespace, name); + } catch (ApiException e) { + System.err.println("Exception when calling FavoritesApi#addMLModelFavorite"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -168,7 +166,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -182,7 +180,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **addNotebookFavorite** > addNotebookFavorite(namespace, name) @@ -191,45 +189,44 @@ null (empty response body) Add a new notebook favorite ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import FavoritesApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FavoritesApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - FavoritesApi apiInstance = new FavoritesApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace of the notebook - String name = "name_example"; // String | The name of the notebook - try { - apiInstance.addNotebookFavorite(namespace, name); - } catch (ApiException e) { - System.err.println("Exception when calling FavoritesApi#addNotebookFavorite"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + FavoritesApi apiInstance = new FavoritesApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace of the notebook + String name = "name_example"; // String | The name of the notebook + try { + apiInstance.addNotebookFavorite(namespace, name); + } catch (ApiException e) { + System.err.println("Exception when calling FavoritesApi#addNotebookFavorite"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -246,7 +243,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -260,7 +257,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **addUDFFavorite** > addUDFFavorite(namespace, name) @@ -269,45 +266,44 @@ null (empty response body) Add a new UDF favorite ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import FavoritesApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FavoritesApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - FavoritesApi apiInstance = new FavoritesApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace of the UDF - String name = "name_example"; // String | The name of the UDF - try { - apiInstance.addUDFFavorite(namespace, name); - } catch (ApiException e) { - System.err.println("Exception when calling FavoritesApi#addUDFFavorite"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + FavoritesApi apiInstance = new FavoritesApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace of the UDF + String name = "name_example"; // String | The name of the UDF + try { + apiInstance.addUDFFavorite(namespace, name); + } catch (ApiException e) { + System.err.println("Exception when calling FavoritesApi#addUDFFavorite"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -324,7 +320,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -338,7 +334,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **deleteArrayFavorite** > deleteArrayFavorite(namespace, name) @@ -347,45 +343,44 @@ null (empty response body) Delete specific array favorite ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import FavoritesApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FavoritesApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - FavoritesApi apiInstance = new FavoritesApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace of the array - String name = "name_example"; // String | The name of the array - try { - apiInstance.deleteArrayFavorite(namespace, name); - } catch (ApiException e) { - System.err.println("Exception when calling FavoritesApi#deleteArrayFavorite"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + FavoritesApi apiInstance = new FavoritesApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace of the array + String name = "name_example"; // String | The name of the array + try { + apiInstance.deleteArrayFavorite(namespace, name); + } catch (ApiException e) { + System.err.println("Exception when calling FavoritesApi#deleteArrayFavorite"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -402,7 +397,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -416,7 +411,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **deleteMLModelFavorite** > deleteMLModelFavorite(namespace, name) @@ -425,45 +420,44 @@ null (empty response body) Delete specific ML model favorite ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import FavoritesApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FavoritesApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - FavoritesApi apiInstance = new FavoritesApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace of the ML model - String name = "name_example"; // String | The name of the ML model - try { - apiInstance.deleteMLModelFavorite(namespace, name); - } catch (ApiException e) { - System.err.println("Exception when calling FavoritesApi#deleteMLModelFavorite"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + FavoritesApi apiInstance = new FavoritesApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace of the ML model + String name = "name_example"; // String | The name of the ML model + try { + apiInstance.deleteMLModelFavorite(namespace, name); + } catch (ApiException e) { + System.err.println("Exception when calling FavoritesApi#deleteMLModelFavorite"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -480,7 +474,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -494,7 +488,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **deleteNotebookFavorite** > deleteNotebookFavorite(namespace, name) @@ -503,45 +497,44 @@ null (empty response body) Delete specific notebook favorite ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import FavoritesApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FavoritesApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - FavoritesApi apiInstance = new FavoritesApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace of the notebook - String name = "name_example"; // String | The name of the notebook - try { - apiInstance.deleteNotebookFavorite(namespace, name); - } catch (ApiException e) { - System.err.println("Exception when calling FavoritesApi#deleteNotebookFavorite"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + FavoritesApi apiInstance = new FavoritesApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace of the notebook + String name = "name_example"; // String | The name of the notebook + try { + apiInstance.deleteNotebookFavorite(namespace, name); + } catch (ApiException e) { + System.err.println("Exception when calling FavoritesApi#deleteNotebookFavorite"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -558,7 +551,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -572,7 +565,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **deleteUDFFavorite** > deleteUDFFavorite(namespace, name) @@ -581,45 +574,44 @@ null (empty response body) Delete specific UDF favorite ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import FavoritesApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FavoritesApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - FavoritesApi apiInstance = new FavoritesApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace of the UDF - String name = "name_example"; // String | The name of the UDF - try { - apiInstance.deleteUDFFavorite(namespace, name); - } catch (ApiException e) { - System.err.println("Exception when calling FavoritesApi#deleteUDFFavorite"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + FavoritesApi apiInstance = new FavoritesApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace of the UDF + String name = "name_example"; // String | The name of the UDF + try { + apiInstance.deleteUDFFavorite(namespace, name); + } catch (ApiException e) { + System.err.println("Exception when calling FavoritesApi#deleteUDFFavorite"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -636,7 +628,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -650,7 +642,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getArrayFavorite** > ArrayFavorite getArrayFavorite(namespace, name) @@ -659,46 +651,45 @@ null (empty response body) Fetch array favorite of a specific array ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import FavoritesApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FavoritesApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - FavoritesApi apiInstance = new FavoritesApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace of the array - String name = "name_example"; // String | The name of the array - try { - ArrayFavorite result = apiInstance.getArrayFavorite(namespace, name); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FavoritesApi#getArrayFavorite"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + FavoritesApi apiInstance = new FavoritesApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace of the array + String name = "name_example"; // String | The name of the array + try { + ArrayFavorite result = apiInstance.getArrayFavorite(namespace, name); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FavoritesApi#getArrayFavorite"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -715,7 +706,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -729,7 +720,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getMLModelFavorite** > MLModelFavorite getMLModelFavorite(namespace, name) @@ -738,46 +729,45 @@ public class Example { Fetch ML model favorite of a specific ML model ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import FavoritesApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FavoritesApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - FavoritesApi apiInstance = new FavoritesApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace of the ML model - String name = "name_example"; // String | The name of the ML model - try { - MLModelFavorite result = apiInstance.getMLModelFavorite(namespace, name); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FavoritesApi#getMLModelFavorite"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + FavoritesApi apiInstance = new FavoritesApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace of the ML model + String name = "name_example"; // String | The name of the ML model + try { + MLModelFavorite result = apiInstance.getMLModelFavorite(namespace, name); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FavoritesApi#getMLModelFavorite"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -794,7 +784,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -808,7 +798,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getNotebookFavorite** > NotebookFavorite getNotebookFavorite(namespace, name) @@ -817,46 +807,45 @@ public class Example { Fetch notebook favorite of a specific notebook ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import FavoritesApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FavoritesApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - FavoritesApi apiInstance = new FavoritesApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace of the notebook - String name = "name_example"; // String | The name of the notebook - try { - NotebookFavorite result = apiInstance.getNotebookFavorite(namespace, name); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FavoritesApi#getNotebookFavorite"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + FavoritesApi apiInstance = new FavoritesApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace of the notebook + String name = "name_example"; // String | The name of the notebook + try { + NotebookFavorite result = apiInstance.getNotebookFavorite(namespace, name); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FavoritesApi#getNotebookFavorite"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -873,7 +862,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -887,7 +876,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getUDFFavorite** > UDFFavorite getUDFFavorite(namespace, name) @@ -896,46 +885,45 @@ public class Example { Fetch UDF favorite of a specific UDF ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import FavoritesApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FavoritesApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - FavoritesApi apiInstance = new FavoritesApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace of the UDF - String name = "name_example"; // String | The name of the UDF - try { - UDFFavorite result = apiInstance.getUDFFavorite(namespace, name); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FavoritesApi#getUDFFavorite"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + FavoritesApi apiInstance = new FavoritesApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace of the UDF + String name = "name_example"; // String | The name of the UDF + try { + UDFFavorite result = apiInstance.getUDFFavorite(namespace, name); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FavoritesApi#getUDFFavorite"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -952,7 +940,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -966,7 +954,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **listArrayFavorites** > ArrayFavoritesData listArrayFavorites(page, perPage) @@ -975,46 +963,45 @@ public class Example { Fetch a page of array favorites of connected user ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import FavoritesApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FavoritesApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - FavoritesApi apiInstance = new FavoritesApi(defaultClient); - Integer page = 56; // Integer | pagination offset - Integer perPage = 56; // Integer | pagination limit - try { - ArrayFavoritesData result = apiInstance.listArrayFavorites(page, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FavoritesApi#listArrayFavorites"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + FavoritesApi apiInstance = new FavoritesApi(defaultClient); + Integer page = 56; // Integer | pagination offset + Integer perPage = 56; // Integer | pagination limit + try { + ArrayFavoritesData result = apiInstance.listArrayFavorites(page, perPage); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FavoritesApi#listArrayFavorites"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1031,7 +1018,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1045,7 +1032,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **listArrayFavoritesUUIDs** > List<ArrayFavorite> listArrayFavoritesUUIDs() @@ -1054,44 +1041,43 @@ public class Example { Fetch all favorite array uuids of connected user ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import FavoritesApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FavoritesApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - FavoritesApi apiInstance = new FavoritesApi(defaultClient); - try { - List result = apiInstance.listArrayFavoritesUUIDs(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FavoritesApi#listArrayFavoritesUUIDs"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + FavoritesApi apiInstance = new FavoritesApi(defaultClient); + try { + List result = apiInstance.listArrayFavoritesUUIDs(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FavoritesApi#listArrayFavoritesUUIDs"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1104,7 +1090,7 @@ This endpoint does not need any parameter. ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1118,7 +1104,7 @@ This endpoint does not need any parameter. | **502** | Bad Gateway | - | | **0** | error response | - | - + # **listMLModelFavorites** > MLModelFavoritesData listMLModelFavorites(page, perPage) @@ -1127,46 +1113,45 @@ This endpoint does not need any parameter. Fetch a page of ML models favorites of connected user ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import FavoritesApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FavoritesApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - FavoritesApi apiInstance = new FavoritesApi(defaultClient); - Integer page = 56; // Integer | pagination offset - Integer perPage = 56; // Integer | pagination limit - try { - MLModelFavoritesData result = apiInstance.listMLModelFavorites(page, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FavoritesApi#listMLModelFavorites"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + FavoritesApi apiInstance = new FavoritesApi(defaultClient); + Integer page = 56; // Integer | pagination offset + Integer perPage = 56; // Integer | pagination limit + try { + MLModelFavoritesData result = apiInstance.listMLModelFavorites(page, perPage); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FavoritesApi#listMLModelFavorites"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1183,7 +1168,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1197,7 +1182,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **listMLModelFavoritesUUIDs** > List<MLModelFavorite> listMLModelFavoritesUUIDs() @@ -1206,44 +1191,43 @@ public class Example { Fetch all favorite ML models uuids of connected user ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import FavoritesApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FavoritesApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - FavoritesApi apiInstance = new FavoritesApi(defaultClient); - try { - List result = apiInstance.listMLModelFavoritesUUIDs(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FavoritesApi#listMLModelFavoritesUUIDs"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + FavoritesApi apiInstance = new FavoritesApi(defaultClient); + try { + List result = apiInstance.listMLModelFavoritesUUIDs(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FavoritesApi#listMLModelFavoritesUUIDs"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1256,7 +1240,7 @@ This endpoint does not need any parameter. ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1270,7 +1254,7 @@ This endpoint does not need any parameter. | **502** | Bad Gateway | - | | **0** | error response | - | - + # **listNotebookFavorites** > NotebookFavoritesData listNotebookFavorites(isDashboard, page, perPage) @@ -1279,47 +1263,46 @@ This endpoint does not need any parameter. Fetch a page of notebook favorites of connected user ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import FavoritesApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FavoritesApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - FavoritesApi apiInstance = new FavoritesApi(defaultClient); - Boolean isDashboard = true; // Boolean | return only dashboards - Integer page = 56; // Integer | pagination offset - Integer perPage = 56; // Integer | pagination limit - try { - NotebookFavoritesData result = apiInstance.listNotebookFavorites(isDashboard, page, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FavoritesApi#listNotebookFavorites"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + FavoritesApi apiInstance = new FavoritesApi(defaultClient); + Boolean isDashboard = true; // Boolean | return only dashboards + Integer page = 56; // Integer | pagination offset + Integer perPage = 56; // Integer | pagination limit + try { + NotebookFavoritesData result = apiInstance.listNotebookFavorites(isDashboard, page, perPage); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FavoritesApi#listNotebookFavorites"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1337,7 +1320,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1351,7 +1334,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **listNotebookFavoritesUUIDs** > List<NotebookFavorite> listNotebookFavoritesUUIDs() @@ -1360,44 +1343,43 @@ public class Example { Fetch all favorite notebook uuids of connected user ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import FavoritesApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FavoritesApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - FavoritesApi apiInstance = new FavoritesApi(defaultClient); - try { - List result = apiInstance.listNotebookFavoritesUUIDs(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FavoritesApi#listNotebookFavoritesUUIDs"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + FavoritesApi apiInstance = new FavoritesApi(defaultClient); + try { + List result = apiInstance.listNotebookFavoritesUUIDs(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FavoritesApi#listNotebookFavoritesUUIDs"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1410,7 +1392,7 @@ This endpoint does not need any parameter. ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1424,7 +1406,7 @@ This endpoint does not need any parameter. | **502** | Bad Gateway | - | | **0** | error response | - | - + # **listUDFFavorites** > UDFFavoritesData listUDFFavorites(page, perPage) @@ -1433,46 +1415,45 @@ This endpoint does not need any parameter. Fetch a page of UDF favorites of connected user ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import FavoritesApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FavoritesApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - FavoritesApi apiInstance = new FavoritesApi(defaultClient); - Integer page = 56; // Integer | pagination offset - Integer perPage = 56; // Integer | pagination limit - try { - UDFFavoritesData result = apiInstance.listUDFFavorites(page, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FavoritesApi#listUDFFavorites"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + FavoritesApi apiInstance = new FavoritesApi(defaultClient); + Integer page = 56; // Integer | pagination offset + Integer perPage = 56; // Integer | pagination limit + try { + UDFFavoritesData result = apiInstance.listUDFFavorites(page, perPage); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FavoritesApi#listUDFFavorites"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1489,7 +1470,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1503,7 +1484,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **listUDFFavoritesUUIDs** > List<UDFFavorite> listUDFFavoritesUUIDs() @@ -1512,44 +1493,43 @@ public class Example { Fetch all favorite UDF uuids of connected user ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import FavoritesApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FavoritesApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - FavoritesApi apiInstance = new FavoritesApi(defaultClient); - try { - List result = apiInstance.listUDFFavoritesUUIDs(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FavoritesApi#listUDFFavoritesUUIDs"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + FavoritesApi apiInstance = new FavoritesApi(defaultClient); + try { + List result = apiInstance.listUDFFavoritesUUIDs(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FavoritesApi#listUDFFavoritesUUIDs"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1562,7 +1542,7 @@ This endpoint does not need any parameter. ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers diff --git a/docs/FilesApi.md b/docs/FilesApi.md index f81ee50..e72b30b 100644 --- a/docs/FilesApi.md +++ b/docs/FilesApi.md @@ -9,7 +9,7 @@ All URIs are relative to */v1* | [**handleUploadFile**](FilesApi.md#handleUploadFile) | **POST** /files/{namespace}/upload | | - + # **handleCreateFile** > FileCreated handleCreateFile(namespace, fileCreate, X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME) @@ -18,47 +18,46 @@ All URIs are relative to */v1* Create a tiledb file at the specified location ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import FilesApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FilesApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - FilesApi apiInstance = new FilesApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace of the file - FileCreate fileCreate = new FileCreate(); // FileCreate | Input/Output information to create a new TileDB file - String X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME = "X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME_example"; // String | Optional registered access credentials to use for creation - try { - FileCreated result = apiInstance.handleCreateFile(namespace, fileCreate, X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FilesApi#handleCreateFile"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + FilesApi apiInstance = new FilesApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace of the file + FileCreate fileCreate = new FileCreate(); // FileCreate | Input/Output information to create a new TileDB file + String X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME = "X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME_example"; // String | Optional registered access credentials to use for creation + try { + FileCreated result = apiInstance.handleCreateFile(namespace, fileCreate, X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FilesApi#handleCreateFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -76,7 +75,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -90,7 +89,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **handleExportFile** > FileExported handleExportFile(namespace, _file, fileExport) @@ -99,47 +98,46 @@ public class Example { Export a TileDB File back to its original file format ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import FilesApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FilesApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - FilesApi apiInstance = new FilesApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace of the file - String _file = "_file_example"; // String | The file identifier - FileExport fileExport = new FileExport(); // FileExport | Export configuration information - try { - FileExported result = apiInstance.handleExportFile(namespace, _file, fileExport); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FilesApi#handleExportFile"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + FilesApi apiInstance = new FilesApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace of the file + String _file = "_file_example"; // String | The file identifier + FileExport fileExport = new FileExport(); // FileExport | Export configuration information + try { + FileExported result = apiInstance.handleExportFile(namespace, _file, fileExport); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FilesApi#handleExportFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -157,7 +155,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -171,7 +169,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **handleUploadFile** > FileUploaded handleUploadFile(namespace, inputFile, X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME, outputUri, name) @@ -180,49 +178,48 @@ public class Example { Upload a tiledb file at the specified location ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import FilesApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FilesApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - FilesApi apiInstance = new FilesApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace of the file - File inputFile = new File("/path/to/file"); // File | the file to upload - String X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME = "X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME_example"; // String | Optional registered access credentials to use for creation - String outputUri = "outputUri_example"; // String | output location of the TileDB File - String name = "name_example"; // String | name to set for registered file - try { - FileUploaded result = apiInstance.handleUploadFile(namespace, inputFile, X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME, outputUri, name); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FilesApi#handleUploadFile"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + FilesApi apiInstance = new FilesApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace of the file + File inputFile = new File("/path/to/file"); // File | the file to upload + String X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME = "X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME_example"; // String | Optional registered access credentials to use for creation + String outputUri = "outputUri_example"; // String | output location of the TileDB File + String name = "name_example"; // String | name to set for registered file + try { + FileUploaded result = apiInstance.handleUploadFile(namespace, inputFile, X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME, outputUri, name); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FilesApi#handleUploadFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -242,7 +239,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers diff --git a/docs/FilterType.md b/docs/FilterType.md index 3c3953e..b043057 100644 --- a/docs/FilterType.md +++ b/docs/FilterType.md @@ -5,27 +5,27 @@ ## Enum -* `NONE` (value: `"FILTER_NONE"`) +* `FILTER_NONE` (value: `"FILTER_NONE"`) -* `GZIP` (value: `"FILTER_GZIP"`) +* `FILTER_GZIP` (value: `"FILTER_GZIP"`) -* `ZSTD` (value: `"FILTER_ZSTD"`) +* `FILTER_ZSTD` (value: `"FILTER_ZSTD"`) -* `LZ4` (value: `"FILTER_LZ4"`) +* `FILTER_LZ4` (value: `"FILTER_LZ4"`) -* `RLE` (value: `"FILTER_RLE"`) +* `FILTER_RLE` (value: `"FILTER_RLE"`) -* `BZIP2` (value: `"FILTER_BZIP2"`) +* `FILTER_BZIP2` (value: `"FILTER_BZIP2"`) -* `DOUBLE_DELTA` (value: `"FILTER_DOUBLE_DELTA"`) +* `FILTER_DOUBLE_DELTA` (value: `"FILTER_DOUBLE_DELTA"`) -* `BIT_WIDTH_REDUCTION` (value: `"FILTER_BIT_WIDTH_REDUCTION"`) +* `FILTER_BIT_WIDTH_REDUCTION` (value: `"FILTER_BIT_WIDTH_REDUCTION"`) -* `BITSHUFFLE` (value: `"FILTER_BITSHUFFLE"`) +* `FILTER_BITSHUFFLE` (value: `"FILTER_BITSHUFFLE"`) -* `BYTESHUFFLE` (value: `"FILTER_BYTESHUFFLE"`) +* `FILTER_BYTESHUFFLE` (value: `"FILTER_BYTESHUFFLE"`) -* `POSITIVE_DELTA` (value: `"FILTER_POSITIVE_DELTA"`) +* `FILTER_POSITIVE_DELTA` (value: `"FILTER_POSITIVE_DELTA"`) diff --git a/docs/GroupContentActivity.md b/docs/GroupContentActivity.md new file mode 100644 index 0000000..4f9465e --- /dev/null +++ b/docs/GroupContentActivity.md @@ -0,0 +1,15 @@ + + +# GroupContentActivity + +Object containing activity of an asset of a group + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**asset** | [**GroupContentActivityAsset**](GroupContentActivityAsset.md) | | [optional] | +|**activityLog** | [**ArrayActivityLog**](ArrayActivityLog.md) | | [optional] | + + + diff --git a/docs/GroupContentActivityAsset.md b/docs/GroupContentActivityAsset.md new file mode 100644 index 0000000..cded29a --- /dev/null +++ b/docs/GroupContentActivityAsset.md @@ -0,0 +1,17 @@ + + +# GroupContentActivityAsset + +The asset details + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | The asset ID | [optional] | +|**name** | **String** | The asset name | [optional] | +|**namespace** | **String** | The namespace that the asset belongs to | [optional] | +|**assetType** | **AssetType** | | [optional] | + + + diff --git a/docs/GroupContentActivityResponse.md b/docs/GroupContentActivityResponse.md new file mode 100644 index 0000000..fd2ddd3 --- /dev/null +++ b/docs/GroupContentActivityResponse.md @@ -0,0 +1,15 @@ + + +# GroupContentActivityResponse + +Object containing activity logs of group content along with the pagination metadata + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**activity** | [**List<GroupContentActivity>**](GroupContentActivity.md) | Activity of a group's content | [optional] | +|**paginationMetadata** | [**PaginationMetadata**](PaginationMetadata.md) | | [optional] | + + + diff --git a/docs/GroupInfo.md b/docs/GroupInfo.md index fb8203b..831a1dc 100644 --- a/docs/GroupInfo.md +++ b/docs/GroupInfo.md @@ -27,6 +27,9 @@ metadata of a group |**tags** | **List<String>** | optional tags for group | [optional] | |**licenseId** | **String** | License identifier from SPDX License List or Custom | [optional] | |**licenseText** | **String** | License text | [optional] | +|**createdAt** | **OffsetDateTime** | Datetime the group was registered with tiledb | [optional] | +|**createdBy** | **String** | The username of the group's creator, if known. | [optional] | +|**metadata** | [**List<MetadataStringifiedEntry>**](MetadataStringifiedEntry.md) | Contains metadata of the group. **Note:** This property is included in the response only if the `with_metadata` query parameter is set to `true`. | [optional] | diff --git a/docs/GroupsApi.md b/docs/GroupsApi.md index a69f363..eac50b4 100644 --- a/docs/GroupsApi.md +++ b/docs/GroupsApi.md @@ -23,7 +23,7 @@ All URIs are relative to */v1* | [**updateGroup**](GroupsApi.md#updateGroup) | **PATCH** /groups/{group_namespace}/{group_name} | | - + # **changeGroupContents** > changeGroupContents(groupNamespace, groupName, groupChanges) @@ -32,46 +32,45 @@ All URIs are relative to */v1* Changes the contents of the group by adding/removing members. ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import GroupsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.GroupsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - GroupsApi apiInstance = new GroupsApi(defaultClient); - String groupNamespace = "groupNamespace_example"; // String | The namespace of the group - String groupName = "groupName_example"; // String | The unique name or id of the group - GroupChanges groupChanges = new GroupChanges(); // GroupChanges | - try { - apiInstance.changeGroupContents(groupNamespace, groupName, groupChanges); - } catch (ApiException e) { - System.err.println("Exception when calling GroupsApi#changeGroupContents"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupNamespace = "groupNamespace_example"; // String | The namespace of the group + String groupName = "groupName_example"; // String | The unique name or id of the group + GroupChanges groupChanges = new GroupChanges(); // GroupChanges | + try { + apiInstance.changeGroupContents(groupNamespace, groupName, groupChanges); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#changeGroupContents"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -89,7 +88,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -103,7 +102,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **createGroup** > createGroup(namespace, groupCreate) @@ -112,45 +111,44 @@ null (empty response body) Creates a new group in the namespace. ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import GroupsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.GroupsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - GroupsApi apiInstance = new GroupsApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace of the group - GroupCreate groupCreate = new GroupCreate(); // GroupCreate | - try { - apiInstance.createGroup(namespace, groupCreate); - } catch (ApiException e) { - System.err.println("Exception when calling GroupsApi#createGroup"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace of the group + GroupCreate groupCreate = new GroupCreate(); // GroupCreate | + try { + apiInstance.createGroup(namespace, groupCreate); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#createGroup"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -167,7 +165,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -181,7 +179,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **deleteGroup** > deleteGroup(groupNamespace, groupName) @@ -190,45 +188,44 @@ null (empty response body) Deletes the group. The assets are not deleted nor are not relocated to any other group ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import GroupsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.GroupsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - GroupsApi apiInstance = new GroupsApi(defaultClient); - String groupNamespace = "groupNamespace_example"; // String | The namespace of the group - String groupName = "groupName_example"; // String | The unique name or id of the group - try { - apiInstance.deleteGroup(groupNamespace, groupName); - } catch (ApiException e) { - System.err.println("Exception when calling GroupsApi#deleteGroup"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupNamespace = "groupNamespace_example"; // String | The namespace of the group + String groupName = "groupName_example"; // String | The unique name or id of the group + try { + apiInstance.deleteGroup(groupNamespace, groupName); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#deleteGroup"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -245,7 +242,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -259,7 +256,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getGroup** > GroupInfo getGroup(groupNamespace, groupName) @@ -268,46 +265,45 @@ null (empty response body) Returns the the group ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import GroupsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.GroupsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - GroupsApi apiInstance = new GroupsApi(defaultClient); - String groupNamespace = "groupNamespace_example"; // String | The namespace of the group - String groupName = "groupName_example"; // String | The unique name or id of the group - try { - GroupInfo result = apiInstance.getGroup(groupNamespace, groupName); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling GroupsApi#getGroup"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupNamespace = "groupNamespace_example"; // String | The namespace of the group + String groupName = "groupName_example"; // String | The unique name or id of the group + try { + GroupInfo result = apiInstance.getGroup(groupNamespace, groupName); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#getGroup"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -324,7 +320,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -338,57 +334,56 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getGroupActivity** -> GroupActivityResponse getGroupActivity(groupNamespace, groupName, page, perPage) +> GroupContentActivityResponse getGroupActivity(groupNamespace, groupName, page, perPage) Returns the activity of group content ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import GroupsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.GroupsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - GroupsApi apiInstance = new GroupsApi(defaultClient); - String groupNamespace = "groupNamespace_example"; // String | The namespace of the group - String groupName = "groupName_example"; // String | The unique name or id of the group - Integer page = 56; // Integer | pagination offset - Integer perPage = 56; // Integer | pagination limit - try { - GroupActivityResponse result = apiInstance.getGroupActivity(groupNamespace, groupName, page, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling GroupsApi#getGroupActivity"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupNamespace = "groupNamespace_example"; // String | The namespace of the group + String groupName = "groupName_example"; // String | The unique name or id of the group + Integer page = 56; // Integer | pagination offset + Integer perPage = 56; // Integer | pagination limit + try { + GroupContentActivityResponse result = apiInstance.getGroupActivity(groupNamespace, groupName, page, perPage); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#getGroupActivity"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -403,11 +398,11 @@ public class Example { ### Return type -[**GroupActivityResponse**](GroupActivityResponse.md) +[**GroupContentActivityResponse**](GroupContentActivityResponse.md) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -421,7 +416,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getGroupContents** > GroupContents getGroupContents(groupNamespace, groupName, page, perPage, namespace, search, orderby, tag, excludeTag, memberType, excludeMemberType) @@ -430,55 +425,54 @@ public class Example { Returns the contents of the group ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import GroupsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.GroupsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - GroupsApi apiInstance = new GroupsApi(defaultClient); - String groupNamespace = "groupNamespace_example"; // String | The namespace of the group - String groupName = "groupName_example"; // String | The unique name or id of the group - Integer page = 56; // Integer | pagination offset for assets - Integer perPage = 56; // Integer | pagination limit for assets - String namespace = "namespace_example"; // String | namespace to search for - String search = "search_example"; // String | search string that will look at name, namespace or description fields - String orderby = "orderby_example"; // String | sort by which field valid values include last_accessed, size, name - List tag = Arrays.asList(); // List | tag to search for, more than one can be included - List excludeTag = Arrays.asList(); // List | tags to exclude matching array in results, more than one can be included - List memberType = Arrays.asList(); // List | member type to search for, more than one can be included - List excludeMemberType = Arrays.asList(); // List | member type to exclude matching groups in results, more than one can be included - try { - GroupContents result = apiInstance.getGroupContents(groupNamespace, groupName, page, perPage, namespace, search, orderby, tag, excludeTag, memberType, excludeMemberType); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling GroupsApi#getGroupContents"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupNamespace = "groupNamespace_example"; // String | The namespace of the group + String groupName = "groupName_example"; // String | The unique name or id of the group + Integer page = 56; // Integer | pagination offset for assets + Integer perPage = 56; // Integer | pagination limit for assets + String namespace = "namespace_example"; // String | namespace to search for + String search = "search_example"; // String | search string that will look at name, namespace or description fields + String orderby = "orderby_example"; // String | sort by which field valid values include last_accessed, size, name + List tag = Arrays.asList(); // List | tag to search for, more than one can be included + List excludeTag = Arrays.asList(); // List | tags to exclude matching array in results, more than one can be included + List memberType = Arrays.asList(); // List | member type to search for, more than one can be included + List excludeMemberType = Arrays.asList(); // List | member type to exclude matching groups in results, more than one can be included + try { + GroupContents result = apiInstance.getGroupContents(groupNamespace, groupName, page, perPage, namespace, search, orderby, tag, excludeTag, memberType, excludeMemberType); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#getGroupContents"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -504,7 +498,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -518,7 +512,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getGroupSharingPolicies** > List<GroupSharing> getGroupSharingPolicies(groupNamespace, groupName) @@ -527,46 +521,45 @@ public class Example { Get all sharing details of the group ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import GroupsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.GroupsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - GroupsApi apiInstance = new GroupsApi(defaultClient); - String groupNamespace = "groupNamespace_example"; // String | The namespace of the group - String groupName = "groupName_example"; // String | The unique name or id of the group - try { - List result = apiInstance.getGroupSharingPolicies(groupNamespace, groupName); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling GroupsApi#getGroupSharingPolicies"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupNamespace = "groupNamespace_example"; // String | The namespace of the group + String groupName = "groupName_example"; // String | The unique name or id of the group + try { + List result = apiInstance.getGroupSharingPolicies(groupNamespace, groupName); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#getGroupSharingPolicies"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -583,7 +576,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -598,7 +591,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **groupsBrowserOwnedFiltersGet** > GroupBrowserFilterData groupsBrowserOwnedFiltersGet(namespace) @@ -607,45 +600,44 @@ public class Example { Fetch data to initialize filters for the groups browser ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import GroupsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.GroupsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - GroupsApi apiInstance = new GroupsApi(defaultClient); - String namespace = "namespace_example"; // String | namespace - try { - GroupBrowserFilterData result = apiInstance.groupsBrowserOwnedFiltersGet(namespace); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling GroupsApi#groupsBrowserOwnedFiltersGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String namespace = "namespace_example"; // String | namespace + try { + GroupBrowserFilterData result = apiInstance.groupsBrowserOwnedFiltersGet(namespace); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#groupsBrowserOwnedFiltersGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -661,7 +653,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -675,7 +667,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **groupsBrowserPublicFiltersGet** > GroupBrowserFilterData groupsBrowserPublicFiltersGet() @@ -684,44 +676,43 @@ public class Example { Fetch data to initialize filters for the groups browser ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import GroupsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.GroupsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - GroupsApi apiInstance = new GroupsApi(defaultClient); - try { - GroupBrowserFilterData result = apiInstance.groupsBrowserPublicFiltersGet(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling GroupsApi#groupsBrowserPublicFiltersGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + try { + GroupBrowserFilterData result = apiInstance.groupsBrowserPublicFiltersGet(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#groupsBrowserPublicFiltersGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -734,7 +725,7 @@ This endpoint does not need any parameter. ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -748,7 +739,7 @@ This endpoint does not need any parameter. | **502** | Bad Gateway | - | | **0** | error response | - | - + # **groupsBrowserSharedFiltersGet** > GroupBrowserFilterData groupsBrowserSharedFiltersGet(namespace) @@ -757,45 +748,44 @@ This endpoint does not need any parameter. Fetch data to initialize filters for the groups browser ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import GroupsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.GroupsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - GroupsApi apiInstance = new GroupsApi(defaultClient); - String namespace = "namespace_example"; // String | namespace - try { - GroupBrowserFilterData result = apiInstance.groupsBrowserSharedFiltersGet(namespace); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling GroupsApi#groupsBrowserSharedFiltersGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String namespace = "namespace_example"; // String | namespace + try { + GroupBrowserFilterData result = apiInstance.groupsBrowserSharedFiltersGet(namespace); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#groupsBrowserSharedFiltersGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -811,7 +801,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -825,7 +815,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **groupsGroupNamespaceGroupNameContentsFiltersGet** > GroupContentsFilterData groupsGroupNamespaceGroupNameContentsFiltersGet(groupNamespace, groupName) @@ -834,46 +824,45 @@ public class Example { Fetch data to initialize filters for the group contents ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import GroupsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.GroupsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - GroupsApi apiInstance = new GroupsApi(defaultClient); - String groupNamespace = "groupNamespace_example"; // String | The namespace of the group - String groupName = "groupName_example"; // String | The unique name or id of the group - try { - GroupContentsFilterData result = apiInstance.groupsGroupNamespaceGroupNameContentsFiltersGet(groupNamespace, groupName); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling GroupsApi#groupsGroupNamespaceGroupNameContentsFiltersGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupNamespace = "groupNamespace_example"; // String | The namespace of the group + String groupName = "groupName_example"; // String | The unique name or id of the group + try { + GroupContentsFilterData result = apiInstance.groupsGroupNamespaceGroupNameContentsFiltersGet(groupNamespace, groupName); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#groupsGroupNamespaceGroupNameContentsFiltersGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -890,7 +879,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -904,64 +893,64 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **listOwnedGroups** -> GroupBrowserData listOwnedGroups(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent) +> GroupBrowserData listOwnedGroups(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent, withMetadata) Returns one page of owned groups. ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import GroupsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.GroupsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - GroupsApi apiInstance = new GroupsApi(defaultClient); - Integer page = 56; // Integer | pagination offset - Integer perPage = 56; // Integer | pagination limit - String groupType = "groupType_example"; // String | filter by a specific group type - String search = "search_example"; // String | search string that will look at name, namespace or description fields - String namespace = "namespace_example"; // String | namespace - String orderby = "orderby_example"; // String | sort by which field valid values include last_accessed, size, name - String permissions = "permissions_example"; // String | permissions valid values include read, read_write, write, admin - List tag = Arrays.asList(); // List | tag to search for, more than one can be included - List excludeTag = Arrays.asList(); // List | tags to exclude matching array in results, more than one can be included - Boolean flat = true; // Boolean | if true, ignores the nesting of groups and searches all of them - String parent = "parent_example"; // String | search only the children of the groups with this uuid - try { - GroupBrowserData result = apiInstance.listOwnedGroups(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling GroupsApi#listOwnedGroups"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + Integer page = 56; // Integer | pagination offset + Integer perPage = 56; // Integer | pagination limit + String groupType = "groupType_example"; // String | filter by a specific group type + String search = "search_example"; // String | search string that will look at name, namespace or description fields + String namespace = "namespace_example"; // String | namespace + String orderby = "orderby_example"; // String | sort by which field valid values include last_accessed, size, name + String permissions = "permissions_example"; // String | permissions valid values include read, read_write, write, admin + List tag = Arrays.asList(); // List | tag to search for, more than one can be included + List excludeTag = Arrays.asList(); // List | tags to exclude matching array in results, more than one can be included + Boolean flat = true; // Boolean | if true, ignores the nesting of groups and searches all of them + String parent = "parent_example"; // String | search only the children of the groups with this uuid + Boolean withMetadata = true; // Boolean | include the metadata of the groups + try { + GroupBrowserData result = apiInstance.listOwnedGroups(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent, withMetadata); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#listOwnedGroups"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -980,6 +969,7 @@ public class Example { | **excludeTag** | [**List<String>**](String.md)| tags to exclude matching array in results, more than one can be included | [optional] | | **flat** | **Boolean**| if true, ignores the nesting of groups and searches all of them | [optional] | | **parent** | **String**| search only the children of the groups with this uuid | [optional] | +| **withMetadata** | **Boolean**| include the metadata of the groups | [optional] | ### Return type @@ -987,7 +977,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1001,64 +991,64 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **listPublicGroups** -> GroupBrowserData listPublicGroups(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent) +> GroupBrowserData listPublicGroups(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent, withMetadata) Returns one page of public groups. ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import GroupsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.GroupsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - GroupsApi apiInstance = new GroupsApi(defaultClient); - Integer page = 56; // Integer | pagination offset - Integer perPage = 56; // Integer | pagination limit - String groupType = "groupType_example"; // String | filter by a specific group type - String search = "search_example"; // String | search string that will look at name, namespace or description fields - String namespace = "namespace_example"; // String | namespace - String orderby = "orderby_example"; // String | sort by which field valid values include last_accessed, size, name - String permissions = "permissions_example"; // String | permissions valid values include read, read_write, write, admin - List tag = Arrays.asList(); // List | tag to search for, more than one can be included - List excludeTag = Arrays.asList(); // List | tags to exclude matching array in results, more than one can be included - Boolean flat = true; // Boolean | if true, ignores the nesting of groups and searches all of them - String parent = "parent_example"; // String | search only the children of the groups with this uuid - try { - GroupBrowserData result = apiInstance.listPublicGroups(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling GroupsApi#listPublicGroups"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + Integer page = 56; // Integer | pagination offset + Integer perPage = 56; // Integer | pagination limit + String groupType = "groupType_example"; // String | filter by a specific group type + String search = "search_example"; // String | search string that will look at name, namespace or description fields + String namespace = "namespace_example"; // String | namespace + String orderby = "orderby_example"; // String | sort by which field valid values include last_accessed, size, name + String permissions = "permissions_example"; // String | permissions valid values include read, read_write, write, admin + List tag = Arrays.asList(); // List | tag to search for, more than one can be included + List excludeTag = Arrays.asList(); // List | tags to exclude matching array in results, more than one can be included + Boolean flat = true; // Boolean | if true, ignores the nesting of groups and searches all of them + String parent = "parent_example"; // String | search only the children of the groups with this uuid + Boolean withMetadata = true; // Boolean | include the metadata of the groups + try { + GroupBrowserData result = apiInstance.listPublicGroups(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent, withMetadata); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#listPublicGroups"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1077,6 +1067,7 @@ public class Example { | **excludeTag** | [**List<String>**](String.md)| tags to exclude matching array in results, more than one can be included | [optional] | | **flat** | **Boolean**| if true, ignores the nesting of groups and searches all of them | [optional] | | **parent** | **String**| search only the children of the groups with this uuid | [optional] | +| **withMetadata** | **Boolean**| include the metadata of the groups | [optional] | ### Return type @@ -1084,7 +1075,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1098,65 +1089,65 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **listSharedGroups** -> GroupBrowserData listSharedGroups(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent, sharedTo) +> GroupBrowserData listSharedGroups(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent, sharedTo, withMetadata) Returns one page of shared groups. ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import GroupsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.GroupsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - GroupsApi apiInstance = new GroupsApi(defaultClient); - Integer page = 56; // Integer | pagination offset - Integer perPage = 56; // Integer | pagination limit - String groupType = "groupType_example"; // String | filter by a specific group type - String search = "search_example"; // String | search string that will look at name, namespace or description fields - String namespace = "namespace_example"; // String | namespace - String orderby = "orderby_example"; // String | sort by which field valid values include last_accessed, size, name - String permissions = "permissions_example"; // String | permissions valid values include read, read_write, write, admin - List tag = Arrays.asList(); // List | tag to search for, more than one can be included - List excludeTag = Arrays.asList(); // List | tags to exclude matching array in results, more than one can be included - Boolean flat = true; // Boolean | if true, ignores the nesting of groups and searches all of them - String parent = "parent_example"; // String | search only the children of the groups with this uuid - List sharedTo = Arrays.asList(); // List | namespaces to filter results of where there groups were shared to - try { - GroupBrowserData result = apiInstance.listSharedGroups(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent, sharedTo); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling GroupsApi#listSharedGroups"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + Integer page = 56; // Integer | pagination offset + Integer perPage = 56; // Integer | pagination limit + String groupType = "groupType_example"; // String | filter by a specific group type + String search = "search_example"; // String | search string that will look at name, namespace or description fields + String namespace = "namespace_example"; // String | namespace + String orderby = "orderby_example"; // String | sort by which field valid values include last_accessed, size, name + String permissions = "permissions_example"; // String | permissions valid values include read, read_write, write, admin + List tag = Arrays.asList(); // List | tag to search for, more than one can be included + List excludeTag = Arrays.asList(); // List | tags to exclude matching array in results, more than one can be included + Boolean flat = true; // Boolean | if true, ignores the nesting of groups and searches all of them + String parent = "parent_example"; // String | search only the children of the groups with this uuid + List sharedTo = Arrays.asList(); // List | namespaces to filter results of where there groups were shared to + Boolean withMetadata = true; // Boolean | include the metadata of the groups + try { + GroupBrowserData result = apiInstance.listSharedGroups(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent, sharedTo, withMetadata); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#listSharedGroups"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1176,6 +1167,7 @@ public class Example { | **flat** | **Boolean**| if true, ignores the nesting of groups and searches all of them | [optional] | | **parent** | **String**| search only the children of the groups with this uuid | [optional] | | **sharedTo** | [**List<String>**](String.md)| namespaces to filter results of where there groups were shared to | [optional] | +| **withMetadata** | **Boolean**| include the metadata of the groups | [optional] | ### Return type @@ -1183,7 +1175,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1197,7 +1189,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **registerGroup** > registerGroup(namespace, array, groupRegister) @@ -1206,46 +1198,45 @@ public class Example { Registers an existing group in the namespace. ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import GroupsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.GroupsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - GroupsApi apiInstance = new GroupsApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace of the group - String array = "array_example"; // String | The unique name or id of the group - GroupRegister groupRegister = new GroupRegister(); // GroupRegister | - try { - apiInstance.registerGroup(namespace, array, groupRegister); - } catch (ApiException e) { - System.err.println("Exception when calling GroupsApi#registerGroup"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace of the group + String array = "array_example"; // String | The unique name or id of the group + GroupRegister groupRegister = new GroupRegister(); // GroupRegister | + try { + apiInstance.registerGroup(namespace, array, groupRegister); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#registerGroup"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1263,7 +1254,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1277,7 +1268,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **shareGroup** > shareGroup(groupNamespace, groupName, groupSharingRequest) @@ -1286,46 +1277,45 @@ null (empty response body) Share a group with a namespace ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import GroupsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.GroupsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - GroupsApi apiInstance = new GroupsApi(defaultClient); - String groupNamespace = "groupNamespace_example"; // String | The namespace of the group - String groupName = "groupName_example"; // String | The unique name or id of the group - GroupSharingRequest groupSharingRequest = new GroupSharingRequest(); // GroupSharingRequest | Namespace and list of permissions to share with. Sharing is recursive, it is applied to all reachable subgroups and arrays of the group. An empty list of permissions will remove the namespace; if permissions already exist they will be deleted then new ones added. In the event of a failure, the new policies will be rolled back to prevent partial policies, and it's likely the group will not be shared with the namespace at all. - try { - apiInstance.shareGroup(groupNamespace, groupName, groupSharingRequest); - } catch (ApiException e) { - System.err.println("Exception when calling GroupsApi#shareGroup"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupNamespace = "groupNamespace_example"; // String | The namespace of the group + String groupName = "groupName_example"; // String | The unique name or id of the group + GroupSharingRequest groupSharingRequest = new GroupSharingRequest(); // GroupSharingRequest | Namespace and list of permissions to share with. Sharing is recursive, it is applied to all reachable subgroups and arrays of the group. An empty list of permissions will remove the namespace; if permissions already exist they will be deleted then new ones added. In the event of a failure, the new policies will be rolled back to prevent partial policies, and it's likely the group will not be shared with the namespace at all. + try { + apiInstance.shareGroup(groupNamespace, groupName, groupSharingRequest); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#shareGroup"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1343,7 +1333,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1358,7 +1348,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **updateGroup** > updateGroup(groupNamespace, groupName, groupUpdate) @@ -1367,46 +1357,45 @@ null (empty response body) Changes attributes of the group ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import GroupsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.GroupsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - GroupsApi apiInstance = new GroupsApi(defaultClient); - String groupNamespace = "groupNamespace_example"; // String | The namespace of the group - String groupName = "groupName_example"; // String | The unique name or id of the group - GroupUpdate groupUpdate = new GroupUpdate(); // GroupUpdate | - try { - apiInstance.updateGroup(groupNamespace, groupName, groupUpdate); - } catch (ApiException e) { - System.err.println("Exception when calling GroupsApi#updateGroup"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupNamespace = "groupNamespace_example"; // String | The namespace of the group + String groupName = "groupName_example"; // String | The unique name or id of the group + GroupUpdate groupUpdate = new GroupUpdate(); // GroupUpdate | + try { + apiInstance.updateGroup(groupNamespace, groupName, groupUpdate); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#updateGroup"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1424,7 +1413,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers diff --git a/docs/InvitationApi.md b/docs/InvitationApi.md index d575b9a..51c50bb 100644 --- a/docs/InvitationApi.md +++ b/docs/InvitationApi.md @@ -8,13 +8,15 @@ All URIs are relative to */v1* | [**cancelJoinOrganization**](InvitationApi.md#cancelJoinOrganization) | **DELETE** /invitations/{invitation}/{organization}/join | | | [**cancelShareArrayByInvite**](InvitationApi.md#cancelShareArrayByInvite) | **DELETE** /invitations/{invitation}/{namespace}/{array}/share | | | [**cancelShareGroupByInvite**](InvitationApi.md#cancelShareGroupByInvite) | **DELETE** /invitations/group/{invitation}/{namespace}/{group_name}/share | | +| [**cancelSharePayment**](InvitationApi.md#cancelSharePayment) | **DELETE** /invitations/share_payment/{namespace}/{target} | | | [**fetchInvitations**](InvitationApi.md#fetchInvitations) | **GET** /invitations | | | [**joinOrganization**](InvitationApi.md#joinOrganization) | **POST** /invitations/{organization}/join | | | [**shareArrayByInvite**](InvitationApi.md#shareArrayByInvite) | **POST** /invitations/{namespace}/{array}/share | | | [**shareGroupByInvite**](InvitationApi.md#shareGroupByInvite) | **POST** /invitations/group/{namespace}/{group}/share | | +| [**sharePayment**](InvitationApi.md#sharePayment) | **POST** /invitations/share_payment/{namespace} | | - + # **acceptInvitation** > acceptInvitation(invitation) @@ -23,44 +25,43 @@ All URIs are relative to */v1* Accepts invitation ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import InvitationApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.InvitationApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - InvitationApi apiInstance = new InvitationApi(defaultClient); - String invitation = "invitation_example"; // String | the ID of invitation about to be accepted - try { - apiInstance.acceptInvitation(invitation); - } catch (ApiException e) { - System.err.println("Exception when calling InvitationApi#acceptInvitation"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + InvitationApi apiInstance = new InvitationApi(defaultClient); + String invitation = "invitation_example"; // String | the ID of invitation about to be accepted + try { + apiInstance.acceptInvitation(invitation); + } catch (ApiException e) { + System.err.println("Exception when calling InvitationApi#acceptInvitation"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -76,7 +77,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -91,7 +92,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **cancelJoinOrganization** > cancelJoinOrganization(invitation, organization) @@ -100,45 +101,44 @@ null (empty response body) Cancels join organization invitation ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import InvitationApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.InvitationApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - InvitationApi apiInstance = new InvitationApi(defaultClient); - String invitation = "invitation_example"; // String | the ID of invitation about to be cancelled - String organization = "organization_example"; // String | name or UUID of organization - try { - apiInstance.cancelJoinOrganization(invitation, organization); - } catch (ApiException e) { - System.err.println("Exception when calling InvitationApi#cancelJoinOrganization"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + InvitationApi apiInstance = new InvitationApi(defaultClient); + String invitation = "invitation_example"; // String | the ID of invitation about to be cancelled + String organization = "organization_example"; // String | name or UUID of organization + try { + apiInstance.cancelJoinOrganization(invitation, organization); + } catch (ApiException e) { + System.err.println("Exception when calling InvitationApi#cancelJoinOrganization"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -155,7 +155,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -170,7 +170,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **cancelShareArrayByInvite** > cancelShareArrayByInvite(namespace, invitation, array) @@ -179,46 +179,45 @@ null (empty response body) Cancels array sharing invitation ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import InvitationApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.InvitationApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - InvitationApi apiInstance = new InvitationApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String invitation = "invitation_example"; // String | the ID of invitation about to be cancelled - String array = "array_example"; // String | name/uri of array that is url-encoded - try { - apiInstance.cancelShareArrayByInvite(namespace, invitation, array); - } catch (ApiException e) { - System.err.println("Exception when calling InvitationApi#cancelShareArrayByInvite"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + InvitationApi apiInstance = new InvitationApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String invitation = "invitation_example"; // String | the ID of invitation about to be cancelled + String array = "array_example"; // String | name/uri of array that is url-encoded + try { + apiInstance.cancelShareArrayByInvite(namespace, invitation, array); + } catch (ApiException e) { + System.err.println("Exception when calling InvitationApi#cancelShareArrayByInvite"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -236,7 +235,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -251,7 +250,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **cancelShareGroupByInvite** > cancelShareGroupByInvite(namespace, invitation, groupName) @@ -260,46 +259,45 @@ null (empty response body) Cancels group sharing invitation ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import InvitationApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.InvitationApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - InvitationApi apiInstance = new InvitationApi(defaultClient); - String namespace = "namespace_example"; // String | namespace group is in (an organization name or user's username) - String invitation = "invitation_example"; // String | the ID of invitation about to be cancelled - String groupName = "groupName_example"; // String | name/uuid of group that is url-encoded - try { - apiInstance.cancelShareGroupByInvite(namespace, invitation, groupName); - } catch (ApiException e) { - System.err.println("Exception when calling InvitationApi#cancelShareGroupByInvite"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + InvitationApi apiInstance = new InvitationApi(defaultClient); + String namespace = "namespace_example"; // String | namespace group is in (an organization name or user's username) + String invitation = "invitation_example"; // String | the ID of invitation about to be cancelled + String groupName = "groupName_example"; // String | name/uuid of group that is url-encoded + try { + apiInstance.cancelShareGroupByInvite(namespace, invitation, groupName); + } catch (ApiException e) { + System.err.println("Exception when calling InvitationApi#cancelShareGroupByInvite"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -317,7 +315,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -332,7 +330,84 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + +# **cancelSharePayment** +> cancelSharePayment(namespace, target) + + + +Revokes invitation from the source namespace to the target. + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.InvitationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + InvitationApi apiInstance = new InvitationApi(defaultClient); + String namespace = "namespace_example"; // String | name or UUID of namespace sharing their payment info + String target = "target_example"; // String | name or UUID of recipient namespace + try { + apiInstance.cancelSharePayment(namespace, target); + } catch (ApiException e) { + System.err.println("Exception when calling InvitationApi#cancelSharePayment"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **namespace** | **String**| name or UUID of namespace sharing their payment info | | +| **target** | **String**| name or UUID of recipient namespace | | + +### Return type + +null (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Invitation cancelled successfully | - | +| **404** | No invitation was found to cancel | - | +| **0** | error response | - | + + # **fetchInvitations** > InvitationData fetchInvitations(organization, array, group, start, end, page, perPage, type, status, orderby) @@ -341,54 +416,53 @@ null (empty response body) Fetch a list of invitations ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import InvitationApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.InvitationApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - InvitationApi apiInstance = new InvitationApi(defaultClient); - String organization = "organization_example"; // String | name or ID of organization to filter - String array = "array_example"; // String | name/uri of array that is url-encoded to filter - String group = "group_example"; // String | name or ID of group to filter - Integer start = 56; // Integer | start time for tasks to filter by - Integer end = 56; // Integer | end time for tasks to filter by - Integer page = 56; // Integer | pagination offset - Integer perPage = 56; // Integer | pagination limit - String type = "type_example"; // String | invitation type, \"ARRAY_SHARE\", \"JOIN_ORGANIZATION\" - String status = "status_example"; // String | Filter to only return \"PENDING\", \"ACCEPTED\" - String orderby = "orderby_example"; // String | sort by which field valid values include timestamp, array_name, organization_name - try { - InvitationData result = apiInstance.fetchInvitations(organization, array, group, start, end, page, perPage, type, status, orderby); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling InvitationApi#fetchInvitations"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + InvitationApi apiInstance = new InvitationApi(defaultClient); + String organization = "organization_example"; // String | name or ID of organization to filter + String array = "array_example"; // String | name/uri of array that is url-encoded to filter + String group = "group_example"; // String | name or ID of group to filter + Integer start = 56; // Integer | start time for tasks to filter by + Integer end = 56; // Integer | end time for tasks to filter by + Integer page = 56; // Integer | pagination offset + Integer perPage = 56; // Integer | pagination limit + String type = "type_example"; // String | invitation type, \"ARRAY_SHARE\", \"JOIN_ORGANIZATION\" + String status = "status_example"; // String | Filter to only return \"PENDING\", \"ACCEPTED\" + String orderby = "orderby_example"; // String | sort by which field valid values include timestamp, array_name, organization_name + try { + InvitationData result = apiInstance.fetchInvitations(organization, array, group, start, end, page, perPage, type, status, orderby); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling InvitationApi#fetchInvitations"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -413,7 +487,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -427,7 +501,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **joinOrganization** > joinOrganization(organization, emailInvite) @@ -436,45 +510,44 @@ public class Example { Sends email to multiple recipients with joining information regarding an organization ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import InvitationApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.InvitationApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - InvitationApi apiInstance = new InvitationApi(defaultClient); - String organization = "organization_example"; // String | name or UUID of organization - InvitationOrganizationJoinEmail emailInvite = new InvitationOrganizationJoinEmail(); // InvitationOrganizationJoinEmail | list of email recipients - try { - apiInstance.joinOrganization(organization, emailInvite); - } catch (ApiException e) { - System.err.println("Exception when calling InvitationApi#joinOrganization"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + InvitationApi apiInstance = new InvitationApi(defaultClient); + String organization = "organization_example"; // String | name or UUID of organization + InvitationOrganizationJoinEmail emailInvite = new InvitationOrganizationJoinEmail(); // InvitationOrganizationJoinEmail | list of email recipients + try { + apiInstance.joinOrganization(organization, emailInvite); + } catch (ApiException e) { + System.err.println("Exception when calling InvitationApi#joinOrganization"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -491,7 +564,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -507,7 +580,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **shareArrayByInvite** > shareArrayByInvite(namespace, array, emailInvite) @@ -516,46 +589,45 @@ null (empty response body) Sends email to multiple recipients with sharing information regarding an array ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import InvitationApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.InvitationApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - InvitationApi apiInstance = new InvitationApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String array = "array_example"; // String | name/uri of array that is url-encoded - InvitationArrayShareEmail emailInvite = new InvitationArrayShareEmail(); // InvitationArrayShareEmail | list of email recipients - try { - apiInstance.shareArrayByInvite(namespace, array, emailInvite); - } catch (ApiException e) { - System.err.println("Exception when calling InvitationApi#shareArrayByInvite"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + InvitationApi apiInstance = new InvitationApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of array that is url-encoded + InvitationArrayShareEmail emailInvite = new InvitationArrayShareEmail(); // InvitationArrayShareEmail | list of email recipients + try { + apiInstance.shareArrayByInvite(namespace, array, emailInvite); + } catch (ApiException e) { + System.err.println("Exception when calling InvitationApi#shareArrayByInvite"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -573,7 +645,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -589,7 +661,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **shareGroupByInvite** > shareGroupByInvite(namespace, group, emailInvite) @@ -598,46 +670,45 @@ null (empty response body) Sends email to multiple recipients with sharing information regarding a group ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import InvitationApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.InvitationApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - InvitationApi apiInstance = new InvitationApi(defaultClient); - String namespace = "namespace_example"; // String | namespace group is in (an organization name or user's username) - String group = "group_example"; // String | name/uri of group that is url-encoded - InvitationGroupShareEmail emailInvite = new InvitationGroupShareEmail(); // InvitationGroupShareEmail | list of email/namespace recipients - try { - apiInstance.shareGroupByInvite(namespace, group, emailInvite); - } catch (ApiException e) { - System.err.println("Exception when calling InvitationApi#shareGroupByInvite"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + InvitationApi apiInstance = new InvitationApi(defaultClient); + String namespace = "namespace_example"; // String | namespace group is in (an organization name or user's username) + String group = "group_example"; // String | name/uri of group that is url-encoded + InvitationGroupShareEmail emailInvite = new InvitationGroupShareEmail(); // InvitationGroupShareEmail | list of email/namespace recipients + try { + apiInstance.shareGroupByInvite(namespace, group, emailInvite); + } catch (ApiException e) { + System.err.println("Exception when calling InvitationApi#shareGroupByInvite"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -655,7 +726,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -671,3 +742,82 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | + +# **sharePayment** +> sharePayment(namespace, emailInvite) + + + +Sends email to multiple recipients allowing them to use the payment instrument provided by the source namespace. + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.InvitationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + InvitationApi apiInstance = new InvitationApi(defaultClient); + String namespace = "namespace_example"; // String | name or UUID of namespace sharing their payment info + SharePaymentRequest emailInvite = new SharePaymentRequest(); // SharePaymentRequest | Recipients of the invitation. These may only be namespaces, not email addresses. + try { + apiInstance.sharePayment(namespace, emailInvite); + } catch (ApiException e) { + System.err.println("Exception when calling InvitationApi#sharePayment"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **namespace** | **String**| name or UUID of namespace sharing their payment info | | +| **emailInvite** | [**SharePaymentRequest**](SharePaymentRequest.md)| Recipients of the invitation. These may only be namespaces, not email addresses. | [optional] | + +### Return type + +null (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Email sent successfully to user for email confirmation link | - | +| **207** | Only a portion of the invitations succeeded, some failed | - | +| **500** | Could not reach any recipients | - | +| **502** | Bad Gateway | - | +| **0** | error response | - | + diff --git a/docs/InvitationType.md b/docs/InvitationType.md index e3f3dc5..429bdc8 100644 --- a/docs/InvitationType.md +++ b/docs/InvitationType.md @@ -11,5 +11,7 @@ * `JOIN_ORGANIZATION` (value: `"JOIN_ORGANIZATION"`) +* `PAYMENT_SHARE` (value: `"PAYMENT_SHARE"`) + diff --git a/docs/LoadArraySchemaRequest.md b/docs/LoadArraySchemaRequest.md new file mode 100644 index 0000000..c876e30 --- /dev/null +++ b/docs/LoadArraySchemaRequest.md @@ -0,0 +1,14 @@ + + +# LoadArraySchemaRequest + +Request to load an array schema + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**config** | [**TileDBConfig**](TileDBConfig.md) | | [optional] | + + + diff --git a/docs/LoadArraySchemaResponse.md b/docs/LoadArraySchemaResponse.md new file mode 100644 index 0000000..9292574 --- /dev/null +++ b/docs/LoadArraySchemaResponse.md @@ -0,0 +1,15 @@ + + +# LoadArraySchemaResponse + +Contains the latest schema and all schemas for the opened array + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**latestArraySchema** | [**ArraySchema**](ArraySchema.md) | | [optional] | +|**allArraySchemas** | [**Map<String, ArraySchema>**](ArraySchema.md) | map of all array schemas | [optional] | + + + diff --git a/docs/LoadEnumerationsRequest.md b/docs/LoadEnumerationsRequest.md new file mode 100644 index 0000000..8d98646 --- /dev/null +++ b/docs/LoadEnumerationsRequest.md @@ -0,0 +1,15 @@ + + +# LoadEnumerationsRequest + +Request to return enumerations for attributes + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**config** | [**TileDBConfig**](TileDBConfig.md) | | [optional] | +|**enumerations** | **List<String>** | | [optional] | + + + diff --git a/docs/LoadEnumerationsResponse.md b/docs/LoadEnumerationsResponse.md new file mode 100644 index 0000000..dd95ca0 --- /dev/null +++ b/docs/LoadEnumerationsResponse.md @@ -0,0 +1,14 @@ + + +# LoadEnumerationsResponse + +Contains the enumerations of the array's attributes + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**enumerations** | [**List<Enumeration>**](Enumeration.md) | | [optional] | + + + diff --git a/docs/MetadataStringified.md b/docs/MetadataStringified.md new file mode 100644 index 0000000..fe265de --- /dev/null +++ b/docs/MetadataStringified.md @@ -0,0 +1,14 @@ + + +# MetadataStringified + +The user's TileDB metadata + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**entries** | [**List<MetadataStringifiedEntry>**](MetadataStringifiedEntry.md) | List of metadata entries | [optional] | + + + diff --git a/docs/MetadataStringifiedEntry.md b/docs/MetadataStringifiedEntry.md new file mode 100644 index 0000000..cc0a77f --- /dev/null +++ b/docs/MetadataStringifiedEntry.md @@ -0,0 +1,16 @@ + + +# MetadataStringifiedEntry + +key/value pair representing an asset metadata map entry + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**key** | **String** | The metadata key | [optional] | +|**value** | **String** | The metadata value | [optional] | +|**type** | **String** | The metadata type | [optional] | + + + diff --git a/docs/NotebookApi.md b/docs/NotebookApi.md index 8bbf419..17063fd 100644 --- a/docs/NotebookApi.md +++ b/docs/NotebookApi.md @@ -11,7 +11,7 @@ All URIs are relative to */v1* | [**updateNotebookName**](NotebookApi.md#updateNotebookName) | **PATCH** /notebooks/{namespace}/{array}/rename | | - + # **getNotebookServerStatus** > NotebookStatus getNotebookServerStatus(namespace) @@ -20,45 +20,44 @@ All URIs are relative to */v1* Get status of the notebook server ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import NotebookApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.NotebookApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - NotebookApi apiInstance = new NotebookApi(defaultClient); - String namespace = "namespace_example"; // String | namespace notebook is in (an organization name or user's username) - try { - NotebookStatus result = apiInstance.getNotebookServerStatus(namespace); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NotebookApi#getNotebookServerStatus"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + NotebookApi apiInstance = new NotebookApi(defaultClient); + String namespace = "namespace_example"; // String | namespace notebook is in (an organization name or user's username) + try { + NotebookStatus result = apiInstance.getNotebookServerStatus(namespace); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling NotebookApi#getNotebookServerStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -74,7 +73,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -85,13 +84,12 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | status of running notebook | - | -| **202** | Notebook server is pending | - | | **402** | Payment required | - | | **404** | Notebook is not running | - | | **502** | Bad Gateway | - | | **0** | error response | - | - + # **handleCopyNotebook** > NotebookCopied handleCopyNotebook(namespace, array, notebookCopy, X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME, endTimestamp) @@ -100,49 +98,48 @@ public class Example { Copy a tiledb notebook at the specified location ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import NotebookApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.NotebookApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - NotebookApi apiInstance = new NotebookApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace of the notebook - String array = "array_example"; // String | The name of the notebook - NotebookCopy notebookCopy = new NotebookCopy(); // NotebookCopy | Input/Output information to create a new TileDB file - String X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME = "X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME_example"; // String | Optional registered access credentials to use for creation - Integer endTimestamp = 56; // Integer | Milliseconds since Unix epoch, copy will use open_at functionality to copy notebook created at the specific timestamp - try { - NotebookCopied result = apiInstance.handleCopyNotebook(namespace, array, notebookCopy, X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME, endTimestamp); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NotebookApi#handleCopyNotebook"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + NotebookApi apiInstance = new NotebookApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace of the notebook + String array = "array_example"; // String | The name of the notebook + NotebookCopy notebookCopy = new NotebookCopy(); // NotebookCopy | Input/Output information to create a new TileDB file + String X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME = "X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME_example"; // String | Optional registered access credentials to use for creation + Integer endTimestamp = 56; // Integer | Milliseconds since Unix epoch, copy will use open_at functionality to copy notebook created at the specific timestamp + try { + NotebookCopied result = apiInstance.handleCopyNotebook(namespace, array, notebookCopy, X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME, endTimestamp); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling NotebookApi#handleCopyNotebook"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -162,7 +159,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -176,7 +173,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **handleUploadNotebook** > FileUploaded handleUploadNotebook(namespace, inputFile, X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME, outputUri, name) @@ -185,49 +182,48 @@ public class Example { Upload a notebook at the specified location ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import NotebookApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.NotebookApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - NotebookApi apiInstance = new NotebookApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace of the notebook - File inputFile = new File("/path/to/file"); // File | the notebook to upload - String X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME = "X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME_example"; // String | Optional registered access credentials to use for creation - String outputUri = "outputUri_example"; // String | output location of the TileDB File - String name = "name_example"; // String | name to set for registered file - try { - FileUploaded result = apiInstance.handleUploadNotebook(namespace, inputFile, X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME, outputUri, name); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NotebookApi#handleUploadNotebook"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + NotebookApi apiInstance = new NotebookApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace of the notebook + File inputFile = new File("/path/to/file"); // File | the notebook to upload + String X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME = "X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME_example"; // String | Optional registered access credentials to use for creation + String outputUri = "outputUri_example"; // String | output location of the TileDB File + String name = "name_example"; // String | name to set for registered file + try { + FileUploaded result = apiInstance.handleUploadNotebook(namespace, inputFile, X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME, outputUri, name); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling NotebookApi#handleUploadNotebook"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -247,7 +243,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -261,7 +257,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **shutdownNotebookServer** > shutdownNotebookServer(namespace) @@ -270,44 +266,43 @@ public class Example { Shutdown a notebook server ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import NotebookApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.NotebookApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - NotebookApi apiInstance = new NotebookApi(defaultClient); - String namespace = "namespace_example"; // String | namespace notebook is in (an organization name or user's username) - try { - apiInstance.shutdownNotebookServer(namespace); - } catch (ApiException e) { - System.err.println("Exception when calling NotebookApi#shutdownNotebookServer"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + NotebookApi apiInstance = new NotebookApi(defaultClient); + String namespace = "namespace_example"; // String | namespace notebook is in (an organization name or user's username) + try { + apiInstance.shutdownNotebookServer(namespace); + } catch (ApiException e) { + System.err.println("Exception when calling NotebookApi#shutdownNotebookServer"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -323,7 +318,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -338,7 +333,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **updateNotebookName** > updateNotebookName(namespace, array, notebookMetadata) @@ -347,46 +342,45 @@ null (empty response body) update name on a notebok, moving related S3 object to new location ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import NotebookApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.NotebookApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - NotebookApi apiInstance = new NotebookApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String array = "array_example"; // String | name/uri of notebook (array) that is url-encoded - ArrayInfoUpdate notebookMetadata = new ArrayInfoUpdate(); // ArrayInfoUpdate | notebook (array) metadata to update - try { - apiInstance.updateNotebookName(namespace, array, notebookMetadata); - } catch (ApiException e) { - System.err.println("Exception when calling NotebookApi#updateNotebookName"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + NotebookApi apiInstance = new NotebookApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of notebook (array) that is url-encoded + ArrayInfoUpdate notebookMetadata = new ArrayInfoUpdate(); // ArrayInfoUpdate | notebook (array) metadata to update + try { + apiInstance.updateNotebookName(namespace, array, notebookMetadata); + } catch (ApiException e) { + System.err.println("Exception when calling NotebookApi#updateNotebookName"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -404,7 +398,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers diff --git a/docs/NotebookStatus.md b/docs/NotebookStatus.md index f3cb5c6..2e04310 100644 --- a/docs/NotebookStatus.md +++ b/docs/NotebookStatus.md @@ -19,6 +19,7 @@ Status details of a notebook server |**storageLimit** | **Integer** | storage allocated to notebook server in bytes | [optional] | |**cpuCount** | **Integer** | millicpu allocated to notebook server | [optional] | |**cost** | **Double** | cost in USD for the current notebook session | [optional] | +|**podStatus** | **PodStatus** | | [optional] | diff --git a/docs/NotebooksApi.md b/docs/NotebooksApi.md index 6f95800..e1d243d 100644 --- a/docs/NotebooksApi.md +++ b/docs/NotebooksApi.md @@ -8,7 +8,7 @@ All URIs are relative to */v1* | [**notebooksNamespaceArrayPrunePost**](NotebooksApi.md#notebooksNamespaceArrayPrunePost) | **POST** /notebooks/{namespace}/{array}/prune | | - + # **notebooksNamespaceArrayEndTimestampsGet** > ArrayEndTimestampData notebooksNamespaceArrayEndTimestampsGet(namespace, array, page, perPage) @@ -17,48 +17,47 @@ All URIs are relative to */v1* retrieve a list of timestamps from the array fragment info listing in milliseconds, paginated ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import NotebooksApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.NotebooksApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - NotebooksApi apiInstance = new NotebooksApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String array = "array_example"; // String | name/uri of array that is url-encoded - Integer page = 56; // Integer | pagination offset - Integer perPage = 56; // Integer | pagination limit - try { - ArrayEndTimestampData result = apiInstance.notebooksNamespaceArrayEndTimestampsGet(namespace, array, page, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NotebooksApi#notebooksNamespaceArrayEndTimestampsGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + NotebooksApi apiInstance = new NotebooksApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of array that is url-encoded + Integer page = 56; // Integer | pagination offset + Integer perPage = 56; // Integer | pagination limit + try { + ArrayEndTimestampData result = apiInstance.notebooksNamespaceArrayEndTimestampsGet(namespace, array, page, perPage); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling NotebooksApi#notebooksNamespaceArrayEndTimestampsGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -77,7 +76,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -91,7 +90,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **notebooksNamespaceArrayPrunePost** > notebooksNamespaceArrayPrunePost(namespace, array, keepVersions) @@ -100,46 +99,45 @@ public class Example { prune fragments of the notebook ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import NotebooksApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.NotebooksApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - NotebooksApi apiInstance = new NotebooksApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String array = "array_example"; // String | name/uri of array that is url-encoded - Integer keepVersions = 56; // Integer | The number of most recents fragment to preserve - try { - apiInstance.notebooksNamespaceArrayPrunePost(namespace, array, keepVersions); - } catch (ApiException e) { - System.err.println("Exception when calling NotebooksApi#notebooksNamespaceArrayPrunePost"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + NotebooksApi apiInstance = new NotebooksApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of array that is url-encoded + Integer keepVersions = 56; // Integer | The number of most recents fragment to preserve + try { + apiInstance.notebooksNamespaceArrayPrunePost(namespace, array, keepVersions); + } catch (ApiException e) { + System.err.println("Exception when calling NotebooksApi#notebooksNamespaceArrayPrunePost"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -157,7 +155,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers diff --git a/docs/Organization.md b/docs/Organization.md index 901c033..4a6a131 100644 --- a/docs/Organization.md +++ b/docs/Organization.md @@ -24,6 +24,7 @@ Organization |**defaultS3PathCredentialsName** | **String** | The name of the credentials used to create and access files in the `default_s3_path`, if needed. | [optional] | |**assetLocations** | [**AssetLocations**](AssetLocations.md) | | [optional] | |**stripeConnect** | **Boolean** | Denotes that the organization is able to apply pricing to arrays by means of Stripe Connect | [optional] [readonly] | +|**assumeRoleArn** | **String** | A AWS Role that will be first assumed before assuming the organization's AWS Role. Visible to owners and admins. | [optional] | diff --git a/docs/OrganizationApi.md b/docs/OrganizationApi.md index f5ac53b..35884ed 100644 --- a/docs/OrganizationApi.md +++ b/docs/OrganizationApi.md @@ -26,7 +26,7 @@ All URIs are relative to */v1* | [**updateUserInOrganization**](OrganizationApi.md#updateUserInOrganization) | **PATCH** /organizations/{organization}/{username} | | - + # **addAWSAccessCredentials** > addAWSAccessCredentials(namespace, awsAccessCredentials) @@ -35,45 +35,44 @@ All URIs are relative to */v1* Add aws keys ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import OrganizationApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.OrganizationApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - OrganizationApi apiInstance = new OrganizationApi(defaultClient); - String namespace = "namespace_example"; // String | namespace - AWSAccessCredentials awsAccessCredentials = new AWSAccessCredentials(); // AWSAccessCredentials | aws access credentials to store for a namespace - try { - apiInstance.addAWSAccessCredentials(namespace, awsAccessCredentials); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationApi#addAWSAccessCredentials"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + String namespace = "namespace_example"; // String | namespace + AWSAccessCredentials awsAccessCredentials = new AWSAccessCredentials(); // AWSAccessCredentials | aws access credentials to store for a namespace + try { + apiInstance.addAWSAccessCredentials(namespace, awsAccessCredentials); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#addAWSAccessCredentials"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -90,7 +89,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -104,7 +103,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **addUserToOrganization** > addUserToOrganization(organization, user) @@ -113,45 +112,44 @@ null (empty response body) add a user to an organization ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import OrganizationApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.OrganizationApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - OrganizationApi apiInstance = new OrganizationApi(defaultClient); - String organization = "organization_example"; // String | organization name - OrganizationUser user = new OrganizationUser(); // OrganizationUser | user to add - try { - apiInstance.addUserToOrganization(organization, user); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationApi#addUserToOrganization"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + String organization = "organization_example"; // String | organization name + OrganizationUser user = new OrganizationUser(); // OrganizationUser | user to add + try { + apiInstance.addUserToOrganization(organization, user); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#addUserToOrganization"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -168,7 +166,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -182,7 +180,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **checkAWSAccessCredentials** > List<AWSAccessCredentials> checkAWSAccessCredentials(namespace) @@ -191,45 +189,44 @@ null (empty response body) Check if aws keys are set ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import OrganizationApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.OrganizationApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - OrganizationApi apiInstance = new OrganizationApi(defaultClient); - String namespace = "namespace_example"; // String | namespace - try { - List result = apiInstance.checkAWSAccessCredentials(namespace); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationApi#checkAWSAccessCredentials"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + String namespace = "namespace_example"; // String | namespace + try { + List result = apiInstance.checkAWSAccessCredentials(namespace); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#checkAWSAccessCredentials"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -245,7 +242,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -259,7 +256,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **checkAWSAccessCredentialsByName** > AWSAccessCredentials checkAWSAccessCredentialsByName(namespace, name) @@ -268,46 +265,45 @@ public class Example { Check if aws keys are set by name ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import OrganizationApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.OrganizationApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - OrganizationApi apiInstance = new OrganizationApi(defaultClient); - String namespace = "namespace_example"; // String | namespace - String name = "name_example"; // String | name - try { - AWSAccessCredentials result = apiInstance.checkAWSAccessCredentialsByName(namespace, name); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationApi#checkAWSAccessCredentialsByName"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + String namespace = "namespace_example"; // String | namespace + String name = "name_example"; // String | name + try { + AWSAccessCredentials result = apiInstance.checkAWSAccessCredentialsByName(namespace, name); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#checkAWSAccessCredentialsByName"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -324,7 +320,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -338,7 +334,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **checkSSODomain** > DomainCheckResult checkSSODomain(organization, uuid) @@ -347,46 +343,45 @@ public class Example { Immediately verify ownership of the specified SSO domain ownership claim. ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import OrganizationApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.OrganizationApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - OrganizationApi apiInstance = new OrganizationApi(defaultClient); - String organization = "organization_example"; // String | organization name - String uuid = "uuid_example"; // String | configuration ID - try { - DomainCheckResult result = apiInstance.checkSSODomain(organization, uuid); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationApi#checkSSODomain"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + String organization = "organization_example"; // String | organization name + String uuid = "uuid_example"; // String | configuration ID + try { + DomainCheckResult result = apiInstance.checkSSODomain(organization, uuid); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#checkSSODomain"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -403,7 +398,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -416,7 +411,7 @@ public class Example { | **200** | The check executed. Detailed results are available in the response. | - | | **0** | error response | - | - + # **createOrganization** > createOrganization(organization) @@ -425,44 +420,43 @@ public class Example { create a organization, the user creating will be listed as owner ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import OrganizationApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.OrganizationApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - OrganizationApi apiInstance = new OrganizationApi(defaultClient); - Organization organization = new Organization(); // Organization | organization to create - try { - apiInstance.createOrganization(organization); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationApi#createOrganization"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + Organization organization = new Organization(); // Organization | organization to create + try { + apiInstance.createOrganization(organization); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#createOrganization"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -478,7 +472,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -492,7 +486,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **createSSODomain** > SSODomainConfig createSSODomain(organization, config) @@ -501,46 +495,45 @@ null (empty response body) Create a new SSO connection that connects this organization to this domain. ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import OrganizationApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.OrganizationApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - OrganizationApi apiInstance = new OrganizationApi(defaultClient); - String organization = "organization_example"; // String | organization name - SSODomainConfig config = new SSODomainConfig(); // SSODomainConfig | The SSO connection to create. - try { - SSODomainConfig result = apiInstance.createSSODomain(organization, config); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationApi#createSSODomain"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + String organization = "organization_example"; // String | organization name + SSODomainConfig config = new SSODomainConfig(); // SSODomainConfig | The SSO connection to create. + try { + SSODomainConfig result = apiInstance.createSSODomain(organization, config); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#createSSODomain"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -557,7 +550,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -570,7 +563,7 @@ public class Example { | **200** | Claim created successfully. | - | | **0** | error response | - | - + # **deleteAWSAccessCredentials** > deleteAWSAccessCredentials(namespace, name) @@ -579,45 +572,44 @@ public class Example { delete a AWS Access credentials in a namespace. This will likely cause arrays to become unreachable ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import OrganizationApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.OrganizationApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - OrganizationApi apiInstance = new OrganizationApi(defaultClient); - String namespace = "namespace_example"; // String | namespace - String name = "name_example"; // String | name - try { - apiInstance.deleteAWSAccessCredentials(namespace, name); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationApi#deleteAWSAccessCredentials"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + String namespace = "namespace_example"; // String | namespace + String name = "name_example"; // String | name + try { + apiInstance.deleteAWSAccessCredentials(namespace, name); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#deleteAWSAccessCredentials"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -634,7 +626,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -648,7 +640,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **deleteOrganization** > deleteOrganization(organization) @@ -657,44 +649,43 @@ null (empty response body) delete a organization ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import OrganizationApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.OrganizationApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - OrganizationApi apiInstance = new OrganizationApi(defaultClient); - String organization = "organization_example"; // String | organization name or ID - try { - apiInstance.deleteOrganization(organization); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationApi#deleteOrganization"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + String organization = "organization_example"; // String | organization name or ID + try { + apiInstance.deleteOrganization(organization); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#deleteOrganization"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -710,7 +701,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -724,7 +715,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **deleteSSODomain** > deleteSSODomain(organization, uuid) @@ -733,45 +724,44 @@ null (empty response body) Deletes the configuration for the given SSO connection. ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import OrganizationApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.OrganizationApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - OrganizationApi apiInstance = new OrganizationApi(defaultClient); - String organization = "organization_example"; // String | organization name - String uuid = "uuid_example"; // String | configuration ID - try { - apiInstance.deleteSSODomain(organization, uuid); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationApi#deleteSSODomain"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + String organization = "organization_example"; // String | organization name + String uuid = "uuid_example"; // String | configuration ID + try { + apiInstance.deleteSSODomain(organization, uuid); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#deleteSSODomain"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -788,7 +778,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -801,7 +791,7 @@ null (empty response body) | **204** | Deletion successful. | - | | **0** | error response | - | - + # **deleteUserFromOrganization** > deleteUserFromOrganization(organization, username) @@ -810,45 +800,44 @@ null (empty response body) delete a user from an organization ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import OrganizationApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.OrganizationApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - OrganizationApi apiInstance = new OrganizationApi(defaultClient); - String organization = "organization_example"; // String | organization name - String username = "username_example"; // String | username to manipulate - try { - apiInstance.deleteUserFromOrganization(organization, username); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationApi#deleteUserFromOrganization"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + String organization = "organization_example"; // String | organization name + String username = "username_example"; // String | username to manipulate + try { + apiInstance.deleteUserFromOrganization(organization, username); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#deleteUserFromOrganization"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -865,7 +854,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -879,7 +868,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getAllOrganizations** > List<Organization> getAllOrganizations() @@ -888,44 +877,43 @@ null (empty response body) get all organizations that the user is member of ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import OrganizationApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.OrganizationApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - OrganizationApi apiInstance = new OrganizationApi(defaultClient); - try { - List result = apiInstance.getAllOrganizations(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationApi#getAllOrganizations"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + try { + List result = apiInstance.getAllOrganizations(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#getAllOrganizations"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -938,7 +926,7 @@ This endpoint does not need any parameter. ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -954,7 +942,7 @@ This endpoint does not need any parameter. | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getOrganization** > Organization getOrganization(organization) @@ -963,45 +951,44 @@ This endpoint does not need any parameter. get a organization ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import OrganizationApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.OrganizationApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - OrganizationApi apiInstance = new OrganizationApi(defaultClient); - String organization = "organization_example"; // String | organization name or ID - try { - Organization result = apiInstance.getOrganization(organization); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationApi#getOrganization"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + String organization = "organization_example"; // String | organization name or ID + try { + Organization result = apiInstance.getOrganization(organization); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#getOrganization"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1017,7 +1004,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1032,7 +1019,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getOrganizationUser** > OrganizationUser getOrganizationUser(organization, username) @@ -1041,46 +1028,45 @@ public class Example { get a user from an organization ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import OrganizationApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.OrganizationApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - OrganizationApi apiInstance = new OrganizationApi(defaultClient); - String organization = "organization_example"; // String | organization name - String username = "username_example"; // String | username to manipulate - try { - OrganizationUser result = apiInstance.getOrganizationUser(organization, username); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationApi#getOrganizationUser"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + String organization = "organization_example"; // String | organization name + String username = "username_example"; // String | username to manipulate + try { + OrganizationUser result = apiInstance.getOrganizationUser(organization, username); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#getOrganizationUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1097,7 +1083,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1112,7 +1098,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getSSODomain** > SSODomainConfig getSSODomain(organization, uuid) @@ -1121,46 +1107,45 @@ public class Example { Gets details about the given SSO domain connection. ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import OrganizationApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.OrganizationApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - OrganizationApi apiInstance = new OrganizationApi(defaultClient); - String organization = "organization_example"; // String | organization name - String uuid = "uuid_example"; // String | configuration ID - try { - SSODomainConfig result = apiInstance.getSSODomain(organization, uuid); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationApi#getSSODomain"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + String organization = "organization_example"; // String | organization name + String uuid = "uuid_example"; // String | configuration ID + try { + SSODomainConfig result = apiInstance.getSSODomain(organization, uuid); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#getSSODomain"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1177,7 +1162,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1190,7 +1175,7 @@ public class Example { | **200** | The details about this domain connection. | - | | **0** | error response | - | - + # **getSSODomains** > SSODomainConfigResponse getSSODomains(organization) @@ -1199,45 +1184,44 @@ public class Example { Lists all the SSO connections associated with the given organization. ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import OrganizationApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.OrganizationApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - OrganizationApi apiInstance = new OrganizationApi(defaultClient); - String organization = "organization_example"; // String | organization name - try { - SSODomainConfigResponse result = apiInstance.getSSODomains(organization); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationApi#getSSODomains"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + String organization = "organization_example"; // String | organization name + try { + SSODomainConfigResponse result = apiInstance.getSSODomains(organization); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#getSSODomains"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1253,7 +1237,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1266,7 +1250,7 @@ public class Example { | **200** | The SSO domains associated with the org. | - | | **0** | error response | - | - + # **updateAWSAccessCredentials** > updateAWSAccessCredentials(namespace, name, awsAccessCredentials) @@ -1275,46 +1259,45 @@ public class Example { Update aws keys or associated buckets. This will update the key associations for each array in the namespace ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import OrganizationApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.OrganizationApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - OrganizationApi apiInstance = new OrganizationApi(defaultClient); - String namespace = "namespace_example"; // String | namespace - String name = "name_example"; // String | name - AWSAccessCredentials awsAccessCredentials = new AWSAccessCredentials(); // AWSAccessCredentials | aws credentials to update - try { - apiInstance.updateAWSAccessCredentials(namespace, name, awsAccessCredentials); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationApi#updateAWSAccessCredentials"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + String namespace = "namespace_example"; // String | namespace + String name = "name_example"; // String | name + AWSAccessCredentials awsAccessCredentials = new AWSAccessCredentials(); // AWSAccessCredentials | aws credentials to update + try { + apiInstance.updateAWSAccessCredentials(namespace, name, awsAccessCredentials); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#updateAWSAccessCredentials"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1332,7 +1315,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1346,7 +1329,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **updateOrganization** > updateOrganization(organization, organizationDetails) @@ -1355,45 +1338,44 @@ null (empty response body) update a organization ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import OrganizationApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.OrganizationApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - OrganizationApi apiInstance = new OrganizationApi(defaultClient); - String organization = "organization_example"; // String | organization name or ID - Organization organizationDetails = new Organization(); // Organization | organization details to update - try { - apiInstance.updateOrganization(organization, organizationDetails); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationApi#updateOrganization"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + String organization = "organization_example"; // String | organization name or ID + OrganizationUpdate organizationDetails = new OrganizationUpdate(); // OrganizationUpdate | organization details to update + try { + apiInstance.updateOrganization(organization, organizationDetails); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#updateOrganization"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1402,7 +1384,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **organization** | **String**| organization name or ID | | -| **organizationDetails** | [**Organization**](Organization.md)| organization details to update | | +| **organizationDetails** | [**OrganizationUpdate**](OrganizationUpdate.md)| organization details to update | | ### Return type @@ -1410,7 +1392,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1424,7 +1406,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **updateSSODomain** > SSODomainConfig updateSSODomain(organization, uuid, config) @@ -1433,47 +1415,46 @@ null (empty response body) Updates the configuration for the given SSO connection. ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import OrganizationApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.OrganizationApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - OrganizationApi apiInstance = new OrganizationApi(defaultClient); - String organization = "organization_example"; // String | organization name - String uuid = "uuid_example"; // String | configuration ID - SSODomainConfig config = new SSODomainConfig(); // SSODomainConfig | The changes to make to the configuration. - try { - SSODomainConfig result = apiInstance.updateSSODomain(organization, uuid, config); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationApi#updateSSODomain"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + String organization = "organization_example"; // String | organization name + String uuid = "uuid_example"; // String | configuration ID + SSODomainConfig config = new SSODomainConfig(); // SSODomainConfig | The changes to make to the configuration. + try { + SSODomainConfig result = apiInstance.updateSSODomain(organization, uuid, config); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#updateSSODomain"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1491,7 +1472,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1504,7 +1485,7 @@ public class Example { | **200** | The updated details about the SSO connection. | - | | **0** | error response | - | - + # **updateUserInOrganization** > updateUserInOrganization(organization, username, user) @@ -1513,46 +1494,45 @@ public class Example { update a user in an organization ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import OrganizationApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.OrganizationApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - OrganizationApi apiInstance = new OrganizationApi(defaultClient); - String organization = "organization_example"; // String | organization name - String username = "username_example"; // String | username to manipulate - OrganizationUser user = new OrganizationUser(); // OrganizationUser | user details to update - try { - apiInstance.updateUserInOrganization(organization, username, user); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationApi#updateUserInOrganization"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + String organization = "organization_example"; // String | organization name + String username = "username_example"; // String | username to manipulate + OrganizationUser user = new OrganizationUser(); // OrganizationUser | user details to update + try { + apiInstance.updateUserInOrganization(organization, username, user); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#updateUserInOrganization"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1570,7 +1550,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers diff --git a/docs/OrganizationRoles.md b/docs/OrganizationRoles.md index 764cc4a..e0c6f08 100644 --- a/docs/OrganizationRoles.md +++ b/docs/OrganizationRoles.md @@ -9,6 +9,8 @@ * `ADMIN` (value: `"admin"`) +* `READ_WRITE_DELETE` (value: `"read_write_delete"`) + * `READ_WRITE` (value: `"read_write"`) * `READ_ONLY` (value: `"read_only"`) diff --git a/docs/OrganizationUpdate.md b/docs/OrganizationUpdate.md new file mode 100644 index 0000000..3917dbf --- /dev/null +++ b/docs/OrganizationUpdate.md @@ -0,0 +1,19 @@ + + +# OrganizationUpdate + +OrganizationUpdate + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | organization name must be unique | [optional] | +|**logo** | **String** | Organization logo | [optional] | +|**description** | **String** | Organization description | [optional] | +|**defaultS3Path** | **String** | The default location to store newly-created notebooks and other assets like UDFs. The name `default_s3_path` is a legacy holdover; it may refer to any supported storage location. | [optional] | +|**defaultS3PathCredentialsName** | **String** | The name of the credentials used to create and access files in the `default_s3_path`, if needed. | [optional] | +|**assetLocations** | [**AssetLocations**](AssetLocations.md) | | [optional] | + + + diff --git a/docs/OrganizationUser.md b/docs/OrganizationUser.md index e0d2752..aeeb1c9 100644 --- a/docs/OrganizationUser.md +++ b/docs/OrganizationUser.md @@ -11,6 +11,8 @@ user in an organization |**userId** | **String** | unique ID of user | [optional] | |**organizationId** | **String** | unique ID of organization | [optional] | |**username** | **String** | username for user | [optional] | +|**userFullName** | **String** | full name of the user; available to organization admins | [optional] | +|**userEmail** | **String** | email address of the user; available to organization admins | [optional] | |**organizationName** | **String** | name of organization | [optional] | |**role** | **OrganizationRoles** | | [optional] | |**allowedActions** | **List<NamespaceActions>** | list of actions user is allowed to do on this organization | [optional] | diff --git a/docs/PodStatus.md b/docs/PodStatus.md new file mode 100644 index 0000000..d5482b9 --- /dev/null +++ b/docs/PodStatus.md @@ -0,0 +1,15 @@ + + +# PodStatus + +## Enum + + +* `TERMINATING` (value: `"TERMINATING"`) + +* `RUNNING` (value: `"RUNNING"`) + +* `LAUNCHING` (value: `"LAUNCHING"`) + + + diff --git a/docs/QueryApi.md b/docs/QueryApi.md index eeee7c0..1c34475 100644 --- a/docs/QueryApi.md +++ b/docs/QueryApi.md @@ -11,7 +11,7 @@ All URIs are relative to */v1* | [**submitQueryJson**](QueryApi.md#submitQueryJson) | **POST** /arrays/{namespace}/{array}/query/submit_query_json | | - + # **finalizeQuery** > Query finalizeQuery(namespace, array, type, contentType, query, xPayer, openAt) @@ -20,51 +20,50 @@ All URIs are relative to */v1* send a query to run against a specified array/URI registered to a group/project ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import QueryApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.QueryApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - QueryApi apiInstance = new QueryApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String array = "array_example"; // String | name/uri of array that is url-encoded - String type = "type_example"; // String | type of query - String contentType = "application/json"; // String | Content Type of input and return mime - Query query = new Query(); // Query | query to run - String xPayer = "xPayer_example"; // String | Name of organization or user who should be charged for this request - Integer openAt = 56; // Integer | open_at for array in unix epoch - try { - Query result = apiInstance.finalizeQuery(namespace, array, type, contentType, query, xPayer, openAt); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling QueryApi#finalizeQuery"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + QueryApi apiInstance = new QueryApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of array that is url-encoded + String type = "type_example"; // String | type of query + String contentType = "application/json"; // String | Content Type of input and return mime + Query query = new Query(); // Query | query to run + String xPayer = "xPayer_example"; // String | Name of organization or user who should be charged for this request + Integer openAt = 56; // Integer | open_at for array in unix epoch + try { + Query result = apiInstance.finalizeQuery(namespace, array, type, contentType, query, xPayer, openAt); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling QueryApi#finalizeQuery"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -86,7 +85,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -101,7 +100,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getEstResultSizes** > Query getEstResultSizes(namespace, array, type, contentType, query, xPayer, openAt) @@ -110,51 +109,50 @@ public class Example { send a query to run against a specified array/URI registered to a group/project ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import QueryApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.QueryApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - QueryApi apiInstance = new QueryApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String array = "array_example"; // String | name/uri of array that is url-encoded - String type = "type_example"; // String | type of query - String contentType = "application/json"; // String | Content Type of input and return mime - Query query = new Query(); // Query | query to run - String xPayer = "xPayer_example"; // String | Name of organization or user who should be charged for this request - Integer openAt = 56; // Integer | open_at for array in unix epoch - try { - Query result = apiInstance.getEstResultSizes(namespace, array, type, contentType, query, xPayer, openAt); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling QueryApi#getEstResultSizes"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + QueryApi apiInstance = new QueryApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of array that is url-encoded + String type = "type_example"; // String | type of query + String contentType = "application/json"; // String | Content Type of input and return mime + Query query = new Query(); // Query | query to run + String xPayer = "xPayer_example"; // String | Name of organization or user who should be charged for this request + Integer openAt = 56; // Integer | open_at for array in unix epoch + try { + Query result = apiInstance.getEstResultSizes(namespace, array, type, contentType, query, xPayer, openAt); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling QueryApi#getEstResultSizes"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -176,7 +174,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -191,7 +189,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getFile** > File getFile(namespace, array, contentType, xPayer) @@ -200,48 +198,47 @@ public class Example { send a query to run against a specified array/URI registered to a group/project, returns file bytes ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import QueryApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.QueryApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - QueryApi apiInstance = new QueryApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String array = "array_example"; // String | name/uri of array that is url-encoded - String contentType = "application/json"; // String | Content Type of input and return mime - String xPayer = "xPayer_example"; // String | Name of organization or user who should be charged for this request - try { - File result = apiInstance.getFile(namespace, array, contentType, xPayer); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling QueryApi#getFile"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + QueryApi apiInstance = new QueryApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of array that is url-encoded + String contentType = "application/json"; // String | Content Type of input and return mime + String xPayer = "xPayer_example"; // String | Name of organization or user who should be charged for this request + try { + File result = apiInstance.getFile(namespace, array, contentType, xPayer); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling QueryApi#getFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -260,7 +257,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -274,7 +271,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **submitQuery** > Query submitQuery(namespace, array, type, contentType, query, xPayer, openAt) @@ -283,51 +280,50 @@ public class Example { send a query to run against a specified array/URI registered to a group/project ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import QueryApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.QueryApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - QueryApi apiInstance = new QueryApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String array = "array_example"; // String | name/uri of array that is url-encoded - String type = "type_example"; // String | type of query - String contentType = "application/json"; // String | Content Type of input and return mime - Query query = new Query(); // Query | query to run - String xPayer = "xPayer_example"; // String | Name of organization or user who should be charged for this request - Integer openAt = 56; // Integer | open_at for array in unix epoch - try { - Query result = apiInstance.submitQuery(namespace, array, type, contentType, query, xPayer, openAt); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling QueryApi#submitQuery"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + QueryApi apiInstance = new QueryApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of array that is url-encoded + String type = "type_example"; // String | type of query + String contentType = "application/json"; // String | Content Type of input and return mime + Query query = new Query(); // Query | query to run + String xPayer = "xPayer_example"; // String | Name of organization or user who should be charged for this request + Integer openAt = 56; // Integer | open_at for array in unix epoch + try { + Query result = apiInstance.submitQuery(namespace, array, type, contentType, query, xPayer, openAt); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling QueryApi#submitQuery"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -349,7 +345,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -364,7 +360,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **submitQueryJson** > Object submitQueryJson(namespace, array, contentType, queryJson, xPayer) @@ -373,49 +369,48 @@ public class Example { send a query to run against a specified array/URI registered to a group/project, returns JSON results ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import QueryApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.QueryApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - QueryApi apiInstance = new QueryApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String array = "array_example"; // String | name/uri of array that is url-encoded - String contentType = "application/json"; // String | Content Type of input and return mime - QueryJson queryJson = new QueryJson(); // QueryJson | query to run - String xPayer = "xPayer_example"; // String | Name of organization or user who should be charged for this request - try { - Object result = apiInstance.submitQueryJson(namespace, array, contentType, queryJson, xPayer); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling QueryApi#submitQueryJson"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + QueryApi apiInstance = new QueryApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of array that is url-encoded + String contentType = "application/json"; // String | Content Type of input and return mime + QueryJson queryJson = new QueryJson(); // QueryJson | query to run + String xPayer = "xPayer_example"; // String | Name of organization or user who should be charged for this request + try { + Object result = apiInstance.submitQueryJson(namespace, array, contentType, queryJson, xPayer); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling QueryApi#submitQueryJson"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -435,7 +430,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers diff --git a/docs/RegisteredTaskGraphsApi.md b/docs/RegisteredTaskGraphsApi.md index e0a5e49..4dd5972 100644 --- a/docs/RegisteredTaskGraphsApi.md +++ b/docs/RegisteredTaskGraphsApi.md @@ -12,7 +12,7 @@ All URIs are relative to */v1* | [**updateRegisteredTaskGraph**](RegisteredTaskGraphsApi.md#updateRegisteredTaskGraph) | **PATCH** /taskgraphs/{namespace}/registered/{name} | | - + # **deleteRegisteredTaskGraph** > deleteRegisteredTaskGraph(namespace, name) @@ -21,45 +21,44 @@ All URIs are relative to */v1* Delete the given registered task graph. ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import RegisteredTaskGraphsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.RegisteredTaskGraphsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - RegisteredTaskGraphsApi apiInstance = new RegisteredTaskGraphsApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace that owns this registered UDF. - String name = "name_example"; // String | The name of the registered task graph. - try { - apiInstance.deleteRegisteredTaskGraph(namespace, name); - } catch (ApiException e) { - System.err.println("Exception when calling RegisteredTaskGraphsApi#deleteRegisteredTaskGraph"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + RegisteredTaskGraphsApi apiInstance = new RegisteredTaskGraphsApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace that owns this registered UDF. + String name = "name_example"; // String | The name of the registered task graph. + try { + apiInstance.deleteRegisteredTaskGraph(namespace, name); + } catch (ApiException e) { + System.err.println("Exception when calling RegisteredTaskGraphsApi#deleteRegisteredTaskGraph"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -76,7 +75,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -90,7 +89,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getRegisteredTaskGraph** > RegisteredTaskGraph getRegisteredTaskGraph(namespace, name) @@ -99,46 +98,45 @@ null (empty response body) Fetch the contents of this registered task graph. ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import RegisteredTaskGraphsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.RegisteredTaskGraphsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - RegisteredTaskGraphsApi apiInstance = new RegisteredTaskGraphsApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace that owns this registered UDF. - String name = "name_example"; // String | The name of the registered task graph. - try { - RegisteredTaskGraph result = apiInstance.getRegisteredTaskGraph(namespace, name); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling RegisteredTaskGraphsApi#getRegisteredTaskGraph"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + RegisteredTaskGraphsApi apiInstance = new RegisteredTaskGraphsApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace that owns this registered UDF. + String name = "name_example"; // String | The name of the registered task graph. + try { + RegisteredTaskGraph result = apiInstance.getRegisteredTaskGraph(namespace, name); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RegisteredTaskGraphsApi#getRegisteredTaskGraph"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -155,7 +153,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -169,7 +167,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getRegisteredTaskGraphSharingPolicies** > List<TaskGraphSharing> getRegisteredTaskGraphSharingPolicies(namespace, name) @@ -178,46 +176,45 @@ public class Example { Get sharing policies for the task graph. ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import RegisteredTaskGraphsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.RegisteredTaskGraphsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - RegisteredTaskGraphsApi apiInstance = new RegisteredTaskGraphsApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace that owns the registered task graph. - String name = "name_example"; // String | The name of the task graph. - try { - List result = apiInstance.getRegisteredTaskGraphSharingPolicies(namespace, name); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling RegisteredTaskGraphsApi#getRegisteredTaskGraphSharingPolicies"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + RegisteredTaskGraphsApi apiInstance = new RegisteredTaskGraphsApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace that owns the registered task graph. + String name = "name_example"; // String | The name of the task graph. + try { + List result = apiInstance.getRegisteredTaskGraphSharingPolicies(namespace, name); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RegisteredTaskGraphsApi#getRegisteredTaskGraphSharingPolicies"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -234,7 +231,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -249,7 +246,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **registerRegisteredTaskGraph** > registerRegisteredTaskGraph(namespace, name, graph) @@ -258,46 +255,45 @@ public class Example { Register a task graph in the given namespace, with the given name. ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import RegisteredTaskGraphsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.RegisteredTaskGraphsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - RegisteredTaskGraphsApi apiInstance = new RegisteredTaskGraphsApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace that owns this registered UDF. - String name = "name_example"; // String | The name of the registered task graph. - RegisteredTaskGraph graph = new RegisteredTaskGraph(); // RegisteredTaskGraph | Task graph to register. - try { - apiInstance.registerRegisteredTaskGraph(namespace, name, graph); - } catch (ApiException e) { - System.err.println("Exception when calling RegisteredTaskGraphsApi#registerRegisteredTaskGraph"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + RegisteredTaskGraphsApi apiInstance = new RegisteredTaskGraphsApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace that owns this registered UDF. + String name = "name_example"; // String | The name of the registered task graph. + RegisteredTaskGraph graph = new RegisteredTaskGraph(); // RegisteredTaskGraph | Task graph to register. + try { + apiInstance.registerRegisteredTaskGraph(namespace, name, graph); + } catch (ApiException e) { + System.err.println("Exception when calling RegisteredTaskGraphsApi#registerRegisteredTaskGraph"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -315,7 +311,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -329,7 +325,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **shareRegisteredTaskGraph** > shareRegisteredTaskGraph(namespace, name, taskGraphSharing) @@ -338,46 +334,45 @@ null (empty response body) Share a task graph. ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import RegisteredTaskGraphsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.RegisteredTaskGraphsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - RegisteredTaskGraphsApi apiInstance = new RegisteredTaskGraphsApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace that owns the registered task graph. - String name = "name_example"; // String | The name of the task graph. - TaskGraphSharing taskGraphSharing = new TaskGraphSharing(); // TaskGraphSharing | Namespace and list of permissions to share with. An empty list of permissions will remove the namespace; if permissions already exist they will be deleted then new ones added. In the event of a failure, the new policies will be rolled back to prevent partial policies, and it's likely the UDF will not be shared with the namespace at all. - try { - apiInstance.shareRegisteredTaskGraph(namespace, name, taskGraphSharing); - } catch (ApiException e) { - System.err.println("Exception when calling RegisteredTaskGraphsApi#shareRegisteredTaskGraph"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + RegisteredTaskGraphsApi apiInstance = new RegisteredTaskGraphsApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace that owns the registered task graph. + String name = "name_example"; // String | The name of the task graph. + TaskGraphSharing taskGraphSharing = new TaskGraphSharing(); // TaskGraphSharing | Namespace and list of permissions to share with. An empty list of permissions will remove the namespace; if permissions already exist they will be deleted then new ones added. In the event of a failure, the new policies will be rolled back to prevent partial policies, and it's likely the UDF will not be shared with the namespace at all. + try { + apiInstance.shareRegisteredTaskGraph(namespace, name, taskGraphSharing); + } catch (ApiException e) { + System.err.println("Exception when calling RegisteredTaskGraphsApi#shareRegisteredTaskGraph"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -395,7 +390,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -410,7 +405,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **updateRegisteredTaskGraph** > updateRegisteredTaskGraph(namespace, name, graph) @@ -419,46 +414,45 @@ null (empty response body) Update the contents of an existing registered task graph. ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import RegisteredTaskGraphsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.RegisteredTaskGraphsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - RegisteredTaskGraphsApi apiInstance = new RegisteredTaskGraphsApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace that owns this registered UDF. - String name = "name_example"; // String | The name of the registered task graph. - RegisteredTaskGraph graph = new RegisteredTaskGraph(); // RegisteredTaskGraph | The new contents of the task graph. - try { - apiInstance.updateRegisteredTaskGraph(namespace, name, graph); - } catch (ApiException e) { - System.err.println("Exception when calling RegisteredTaskGraphsApi#updateRegisteredTaskGraph"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + RegisteredTaskGraphsApi apiInstance = new RegisteredTaskGraphsApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace that owns this registered UDF. + String name = "name_example"; // String | The name of the registered task graph. + RegisteredTaskGraph graph = new RegisteredTaskGraph(); // RegisteredTaskGraph | The new contents of the task graph. + try { + apiInstance.updateRegisteredTaskGraph(namespace, name, graph); + } catch (ApiException e) { + System.err.println("Exception when calling RegisteredTaskGraphsApi#updateRegisteredTaskGraph"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -476,7 +470,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers diff --git a/docs/RetryPolicy.md b/docs/RetryPolicy.md index c202480..d41a45a 100644 --- a/docs/RetryPolicy.md +++ b/docs/RetryPolicy.md @@ -7,11 +7,11 @@ * `ALWAYS` (value: `"Always"`) -* `ONFAILURE` (value: `"OnFailure"`) +* `ON_FAILURE` (value: `"OnFailure"`) -* `ONERROR` (value: `"OnError"`) +* `ON_ERROR` (value: `"OnError"`) -* `ONTRANSIENTERROR` (value: `"OnTransientError"`) +* `ON_TRANSIENT_ERROR` (value: `"OnTransientError"`) diff --git a/docs/SSOProvider.md b/docs/SSOProvider.md index f58ce0e..0b01c08 100644 --- a/docs/SSOProvider.md +++ b/docs/SSOProvider.md @@ -13,5 +13,9 @@ * `OKTA` (value: `"okta"`) +* `PERDOMAIN` (value: `"perdomain"`) + +* `SCIM` (value: `"scim"`) + diff --git a/docs/SharePaymentRequest.md b/docs/SharePaymentRequest.md new file mode 100644 index 0000000..742cb76 --- /dev/null +++ b/docs/SharePaymentRequest.md @@ -0,0 +1,13 @@ + + +# SharePaymentRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**namespaces** | **List<String>** | | [optional] | + + + diff --git a/docs/SqlApi.md b/docs/SqlApi.md index c4834b5..4e43d83 100644 --- a/docs/SqlApi.md +++ b/docs/SqlApi.md @@ -7,56 +7,55 @@ All URIs are relative to */v1* | [**runSQL**](SqlApi.md#runSQL) | **POST** /sql/{namespace} | | - + # **runSQL** -> List<Object> runSQL(namespace, sql, acceptEncoding) +> List<Map<String, Object>> runSQL(namespace, sql, acceptEncoding) Run a sql query ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import SqlApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.SqlApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - SqlApi apiInstance = new SqlApi(defaultClient); - String namespace = "namespace_example"; // String | namespace to run task under is in (an organization name or user's username) - SQLParameters sql = new SQLParameters(); // SQLParameters | sql being submitted - String acceptEncoding = "acceptEncoding_example"; // String | Encoding to use - try { - List result = apiInstance.runSQL(namespace, sql, acceptEncoding); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SqlApi#runSQL"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + SqlApi apiInstance = new SqlApi(defaultClient); + String namespace = "namespace_example"; // String | namespace to run task under is in (an organization name or user's username) + SQLParameters sql = new SQLParameters(); // SQLParameters | sql being submitted + String acceptEncoding = "acceptEncoding_example"; // String | Encoding to use + try { + List> result = apiInstance.runSQL(namespace, sql, acceptEncoding); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SqlApi#runSQL"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -70,11 +69,11 @@ public class Example { ### Return type -**List<Object>** +[**List<Map<String, Object>>**](Map.md) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers diff --git a/docs/StatsApi.md b/docs/StatsApi.md index 6173796..10f62f4 100644 --- a/docs/StatsApi.md +++ b/docs/StatsApi.md @@ -7,7 +7,7 @@ All URIs are relative to */v1* | [**getTiledbStats**](StatsApi.md#getTiledbStats) | **GET** /.stats | | - + # **getTiledbStats** > GetTiledbStats200Response getTiledbStats() @@ -16,44 +16,43 @@ All URIs are relative to */v1* Fetch libtiledb stat ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import StatsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StatsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - StatsApi apiInstance = new StatsApi(defaultClient); - try { - GetTiledbStats200Response result = apiInstance.getTiledbStats(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling StatsApi#getTiledbStats"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + StatsApi apiInstance = new StatsApi(defaultClient); + try { + GetTiledbStats200Response result = apiInstance.getTiledbStats(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StatsApi#getTiledbStats"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -66,7 +65,7 @@ This endpoint does not need any parameter. ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers diff --git a/docs/TGUDFEnvironmentResources.md b/docs/TGUDFEnvironmentResources.md index 9cbe835..73f8a67 100644 --- a/docs/TGUDFEnvironmentResources.md +++ b/docs/TGUDFEnvironmentResources.md @@ -2,7 +2,7 @@ # TGUDFEnvironmentResources -The resources requested for this particular node. If resources are not specified resource_class is used, if it is not set the standard resource // defaults are used +The resources requested for this particular node. If resources are not specified resource_class is used, if it is not set the standard resource // defaults are used ## Properties diff --git a/docs/TaskGraph.md b/docs/TaskGraph.md index 608c111..9ca4b04 100644 --- a/docs/TaskGraph.md +++ b/docs/TaskGraph.md @@ -13,10 +13,10 @@ Information about a task graph. |**createdBy** | **String** | The name of the user who created this task graph log. | [optional] [readonly] | |**name** | **String** | A name for this task graph, displayed in the UI. Does not need to be unique. | [optional] | |**createdAt** | **OffsetDateTime** | The date/time when this task graph was originally created. | [optional] [readonly] | -|**nodes** | [**List<TaskGraphNode>**](TaskGraphNode.md) | The structure of the graph. This is provided by the client when first setting up the task graph. This must be topographically sorted; that is, each node must appear after all nodes that it depends upon. | [optional] | +|**nodes** | [**List<TaskGraphNode>**](TaskGraphNode.md) | The structure of the graph. This is provided by the client when first setting up the task graph. This must be topographically sorted; that is, each node must appear after all nodes that it depends upon. | [optional] | |**parallelism** | **Long** | Parallelism limits the max total parallel pods that can execute at the same time in a workflow. | [optional] | |**retryStrategy** | [**RetryStrategy**](RetryStrategy.md) | | [optional] | -|**deadline** | **Long** | Duration in seconds relative to the workflow start time which the workflow is allowed to run before it gets terminated. | [optional] | +|**deadline** | **Long** | Duration in seconds relative to the workflow start time which the workflow is allowed to run before it gets terminated. Defaults to 24h when unset | [optional] | |**taskGraphType** | **TaskGraphType** | | [optional] | diff --git a/docs/TaskGraphLog.md b/docs/TaskGraphLog.md index 6862e8b..de630c8 100644 --- a/docs/TaskGraphLog.md +++ b/docs/TaskGraphLog.md @@ -24,6 +24,8 @@ Logging information about the execution of a task graph. |**nodes** | [**List<TaskGraphNodeMetadata>**](TaskGraphNodeMetadata.md) | The structure of the graph. This is provided by the client when first setting up the task graph. Thereafter, it is read-only. This must be topographically sorted; that is, each node must appear after all nodes that it depends upon. | [optional] | |**taskGraphType** | **TaskGraphType** | | [optional] | |**taskGraphId** | **String** | The UUID of the task graph. | [optional] | +|**cloudProvider** | **String** | The name of the cloud provider where this task graph executed. | [optional] | +|**cloudRegion** | **String** | The region of the cloud provider where this task graph executed. | [optional] | diff --git a/docs/TaskGraphLogsApi.md b/docs/TaskGraphLogsApi.md index 7b6f05e..e7dd9a2 100644 --- a/docs/TaskGraphLogsApi.md +++ b/docs/TaskGraphLogsApi.md @@ -15,7 +15,7 @@ All URIs are relative to */v1* | [**updateTaskGraphLog**](TaskGraphLogsApi.md#updateTaskGraphLog) | **PATCH** /taskgraphs/{namespace}/logs/{id} | | - + # **createTaskGraphLog** > TaskGraphLog createTaskGraphLog(namespace, log) @@ -24,46 +24,45 @@ All URIs are relative to */v1* Create a task graph log. ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import TaskGraphLogsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.TaskGraphLogsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - TaskGraphLogsApi apiInstance = new TaskGraphLogsApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace that will own this task graph log. - TaskGraphLog log = new TaskGraphLog(); // TaskGraphLog | - try { - TaskGraphLog result = apiInstance.createTaskGraphLog(namespace, log); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling TaskGraphLogsApi#createTaskGraphLog"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + TaskGraphLogsApi apiInstance = new TaskGraphLogsApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace that will own this task graph log. + TaskGraphLog log = new TaskGraphLog(); // TaskGraphLog | + try { + TaskGraphLog result = apiInstance.createTaskGraphLog(namespace, log); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TaskGraphLogsApi#createTaskGraphLog"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -80,7 +79,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -94,7 +93,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getTaskGraphLog** > TaskGraphLog getTaskGraphLog(namespace, id) @@ -103,46 +102,45 @@ public class Example { Fetch information about a single task graph execution. ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import TaskGraphLogsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.TaskGraphLogsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - TaskGraphLogsApi apiInstance = new TaskGraphLogsApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace that owns this task graph log. - String id = "id_example"; // String | The UUID of the task graph log entry. - try { - TaskGraphLog result = apiInstance.getTaskGraphLog(namespace, id); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling TaskGraphLogsApi#getTaskGraphLog"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + TaskGraphLogsApi apiInstance = new TaskGraphLogsApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace that owns this task graph log. + String id = "id_example"; // String | The UUID of the task graph log entry. + try { + TaskGraphLog result = apiInstance.getTaskGraphLog(namespace, id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TaskGraphLogsApi#getTaskGraphLog"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -159,7 +157,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -173,60 +171,60 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **listTaskGraphLogs** -> TaskGraphLogsData listTaskGraphLogs(namespace, createdBy, search, startTime, endTime, page, perPage) +> TaskGraphLogsData listTaskGraphLogs(namespace, createdBy, status, search, startTime, endTime, page, perPage) Fetch the task graph logs of a namespace the user has access to. The returned entries will include only summary data, and will not include information about the individual tasks that were executed. (This information is available when requesting an individual task graph log.) Entries in the response are ordered from newest to oldest. Pagination parameters work as in other API methods; see PaginationMetadata. ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import TaskGraphLogsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.TaskGraphLogsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - TaskGraphLogsApi apiInstance = new TaskGraphLogsApi(defaultClient); - String namespace = "namespace_example"; // String | Include logs for this namespace. - String createdBy = "createdBy_example"; // String | Include logs from only this user. - String search = "search_example"; // String | search string that will look at name. - OffsetDateTime startTime = OffsetDateTime.now(); // OffsetDateTime | Include logs created after this time. - OffsetDateTime endTime = OffsetDateTime.now(); // OffsetDateTime | Include logs created before this time. - Integer page = 56; // Integer | pagination offset - Integer perPage = 56; // Integer | pagination limit - try { - TaskGraphLogsData result = apiInstance.listTaskGraphLogs(namespace, createdBy, search, startTime, endTime, page, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling TaskGraphLogsApi#listTaskGraphLogs"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + TaskGraphLogsApi apiInstance = new TaskGraphLogsApi(defaultClient); + String namespace = "namespace_example"; // String | Include logs for this namespace. + String createdBy = "createdBy_example"; // String | Include logs from only this user. + String status = "status_example"; // String | Filter to only return these statuses + String search = "search_example"; // String | search string that will look at name. + OffsetDateTime startTime = OffsetDateTime.now(); // OffsetDateTime | Include logs created after this time. + OffsetDateTime endTime = OffsetDateTime.now(); // OffsetDateTime | Include logs created before this time. + Integer page = 56; // Integer | pagination offset + Integer perPage = 56; // Integer | pagination limit + try { + TaskGraphLogsData result = apiInstance.listTaskGraphLogs(namespace, createdBy, status, search, startTime, endTime, page, perPage); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TaskGraphLogsApi#listTaskGraphLogs"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -236,6 +234,7 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **namespace** | **String**| Include logs for this namespace. | [optional] | | **createdBy** | **String**| Include logs from only this user. | [optional] | +| **status** | **String**| Filter to only return these statuses | [optional] | | **search** | **String**| search string that will look at name. | [optional] | | **startTime** | **OffsetDateTime**| Include logs created after this time. | [optional] | | **endTime** | **OffsetDateTime**| Include logs created before this time. | [optional] | @@ -248,7 +247,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -262,53 +261,52 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **reportClientNode** > reportClientNode(namespace, id, report) ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import TaskGraphLogsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.TaskGraphLogsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - TaskGraphLogsApi apiInstance = new TaskGraphLogsApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace that owns this task graph log. - String id = "id_example"; // String | The UUID of the task graph log entry. - TaskGraphClientNodeStatus report = new TaskGraphClientNodeStatus(); // TaskGraphClientNodeStatus | The node status to report. - try { - apiInstance.reportClientNode(namespace, id, report); - } catch (ApiException e) { - System.err.println("Exception when calling TaskGraphLogsApi#reportClientNode"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + TaskGraphLogsApi apiInstance = new TaskGraphLogsApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace that owns this task graph log. + String id = "id_example"; // String | The UUID of the task graph log entry. + TaskGraphClientNodeStatus report = new TaskGraphClientNodeStatus(); // TaskGraphClientNodeStatus | The node status to report. + try { + apiInstance.reportClientNode(namespace, id, report); + } catch (ApiException e) { + System.err.println("Exception when calling TaskGraphLogsApi#reportClientNode"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -326,7 +324,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -340,7 +338,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **resubmitTaskGraphExecution** > TaskGraphLog resubmitTaskGraphExecution(namespace, id) @@ -349,46 +347,45 @@ null (empty response body) Resubmits a task graph in the given namespace using the associated execution id. ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import TaskGraphLogsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.TaskGraphLogsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - TaskGraphLogsApi apiInstance = new TaskGraphLogsApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace that owns this task graph execution. - String id = "id_example"; // String | The UUID of the task graph execution (TaskGraphLog). - try { - TaskGraphLog result = apiInstance.resubmitTaskGraphExecution(namespace, id); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling TaskGraphLogsApi#resubmitTaskGraphExecution"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + TaskGraphLogsApi apiInstance = new TaskGraphLogsApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace that owns this task graph execution. + String id = "id_example"; // String | The UUID of the task graph execution (TaskGraphLog). + try { + TaskGraphLog result = apiInstance.resubmitTaskGraphExecution(namespace, id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TaskGraphLogsApi#resubmitTaskGraphExecution"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -405,7 +402,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -419,7 +416,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **retryTaskGraphExecution** > TaskGraphLog retryTaskGraphExecution(namespace, id) @@ -428,46 +425,45 @@ public class Example { Retries failed tasks of a task graph in the given namespace using the associated execution id. ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import TaskGraphLogsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.TaskGraphLogsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - TaskGraphLogsApi apiInstance = new TaskGraphLogsApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace that owns this task graph execution. - String id = "id_example"; // String | The UUID of the task graph execution (TaskGraphLog). - try { - TaskGraphLog result = apiInstance.retryTaskGraphExecution(namespace, id); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling TaskGraphLogsApi#retryTaskGraphExecution"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + TaskGraphLogsApi apiInstance = new TaskGraphLogsApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace that owns this task graph execution. + String id = "id_example"; // String | The UUID of the task graph execution (TaskGraphLog). + try { + TaskGraphLog result = apiInstance.retryTaskGraphExecution(namespace, id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TaskGraphLogsApi#retryTaskGraphExecution"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -484,7 +480,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -498,55 +494,53 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **stopTaskGraphExecution** -> TaskGraphLog stopTaskGraphExecution(namespace, id) +> stopTaskGraphExecution(namespace, id) Stops a task graph execution in the given namespace using the associated associated execution id. ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import TaskGraphLogsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.TaskGraphLogsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - TaskGraphLogsApi apiInstance = new TaskGraphLogsApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace that owns this task graph execution. - String id = "id_example"; // String | The UUID of the task graph execution (TaskGraphLog). - try { - TaskGraphLog result = apiInstance.stopTaskGraphExecution(namespace, id); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling TaskGraphLogsApi#stopTaskGraphExecution"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + TaskGraphLogsApi apiInstance = new TaskGraphLogsApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace that owns this task graph execution. + String id = "id_example"; // String | The UUID of the task graph execution (TaskGraphLog). + try { + apiInstance.stopTaskGraphExecution(namespace, id); + } catch (ApiException e) { + System.err.println("Exception when calling TaskGraphLogsApi#stopTaskGraphExecution"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -559,11 +553,11 @@ public class Example { ### Return type -[**TaskGraphLog**](TaskGraphLog.md) +null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -573,11 +567,11 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **202** | Information about the task graph execution. | - | +| **204** | Graph stopped successfully | - | | **502** | Bad Gateway | - | | **0** | error response | - | - + # **submitTaskGraph** > TaskGraphLog submitTaskGraph(namespace, id) @@ -586,46 +580,45 @@ public class Example { Submit a single task graph for execution. ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import TaskGraphLogsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.TaskGraphLogsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - TaskGraphLogsApi apiInstance = new TaskGraphLogsApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace that owns this task graph. - String id = "id_example"; // String | The UUID of the task graph entry. - try { - TaskGraphLog result = apiInstance.submitTaskGraph(namespace, id); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling TaskGraphLogsApi#submitTaskGraph"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + TaskGraphLogsApi apiInstance = new TaskGraphLogsApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace that owns this task graph. + String id = "id_example"; // String | The UUID of the task graph entry. + try { + TaskGraphLog result = apiInstance.submitTaskGraph(namespace, id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TaskGraphLogsApi#submitTaskGraph"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -642,7 +635,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -656,7 +649,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **updateTaskGraphLog** > updateTaskGraphLog(namespace, id, log) @@ -665,46 +658,45 @@ public class Example { Update information about a single task graph execution. ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import TaskGraphLogsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.TaskGraphLogsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - TaskGraphLogsApi apiInstance = new TaskGraphLogsApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace that owns this task graph log. - String id = "id_example"; // String | The UUID of the task graph log entry. - TaskGraphLog log = new TaskGraphLog(); // TaskGraphLog | Updates to make to the task graph log. The only manual update that a client should need to make to a task graph log is to update its completion status to `succeeded`, `failed`, or `cancelled`. - try { - apiInstance.updateTaskGraphLog(namespace, id, log); - } catch (ApiException e) { - System.err.println("Exception when calling TaskGraphLogsApi#updateTaskGraphLog"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + TaskGraphLogsApi apiInstance = new TaskGraphLogsApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace that owns this task graph log. + String id = "id_example"; // String | The UUID of the task graph log entry. + TaskGraphLog log = new TaskGraphLog(); // TaskGraphLog | Updates to make to the task graph log. The only manual update that a client should need to make to a task graph log is to update its completion status to `succeeded`, `failed`, or `cancelled`. + try { + apiInstance.updateTaskGraphLog(namespace, id, log); + } catch (ApiException e) { + System.err.println("Exception when calling TaskGraphLogsApi#updateTaskGraphLog"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -722,7 +714,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers diff --git a/docs/TaskGraphsApi.md b/docs/TaskGraphsApi.md index ef2baa4..3b4bc3d 100644 --- a/docs/TaskGraphsApi.md +++ b/docs/TaskGraphsApi.md @@ -11,7 +11,7 @@ All URIs are relative to */v1* | [**updateTaskGraph**](TaskGraphsApi.md#updateTaskGraph) | **PATCH** /taskgraphs/{namespace}/graphs/{id} | | - + # **createTaskGraph** > TaskGraph createTaskGraph(namespace, graph) @@ -20,46 +20,45 @@ All URIs are relative to */v1* Create a single task graph for execution. ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import TaskGraphsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.TaskGraphsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - TaskGraphsApi apiInstance = new TaskGraphsApi(defaultClient); - String namespace = "namespace_example"; // String | Include graphs for this namespace. - TaskGraph graph = new TaskGraph(); // TaskGraph | Create the task graph. - try { - TaskGraph result = apiInstance.createTaskGraph(namespace, graph); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling TaskGraphsApi#createTaskGraph"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + TaskGraphsApi apiInstance = new TaskGraphsApi(defaultClient); + String namespace = "namespace_example"; // String | Include graphs for this namespace. + TaskGraph graph = new TaskGraph(); // TaskGraph | Create the task graph. + try { + TaskGraph result = apiInstance.createTaskGraph(namespace, graph); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TaskGraphsApi#createTaskGraph"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -76,7 +75,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -90,7 +89,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getTaskGraph** > TaskGraph getTaskGraph(namespace, id) @@ -99,46 +98,45 @@ public class Example { Fetch information about a single task graph. ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import TaskGraphsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.TaskGraphsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - TaskGraphsApi apiInstance = new TaskGraphsApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace that owns this task graph. - String id = "id_example"; // String | The UUID of the task graph entry. - try { - TaskGraph result = apiInstance.getTaskGraph(namespace, id); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling TaskGraphsApi#getTaskGraph"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + TaskGraphsApi apiInstance = new TaskGraphsApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace that owns this task graph. + String id = "id_example"; // String | The UUID of the task graph entry. + try { + TaskGraph result = apiInstance.getTaskGraph(namespace, id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TaskGraphsApi#getTaskGraph"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -155,7 +153,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -169,7 +167,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **listTaskGraphs** > TaskGraphs listTaskGraphs(namespace) @@ -178,45 +176,44 @@ public class Example { Fetch the task graphs of a namespace the user has access to. The returned entries will include only summary data, and will not include information about the individual tasks that were executed. (This information is available when requesting an individual task graph log.) Entries in the response are ordered from newest to oldest. Pagination parameters work as in other API methods; see PaginationMetadata. ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import TaskGraphsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.TaskGraphsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - TaskGraphsApi apiInstance = new TaskGraphsApi(defaultClient); - String namespace = "namespace_example"; // String | Namespace for graphs - try { - TaskGraphs result = apiInstance.listTaskGraphs(namespace); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling TaskGraphsApi#listTaskGraphs"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + TaskGraphsApi apiInstance = new TaskGraphsApi(defaultClient); + String namespace = "namespace_example"; // String | Namespace for graphs + try { + TaskGraphs result = apiInstance.listTaskGraphs(namespace); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TaskGraphsApi#listTaskGraphs"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -232,7 +229,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -246,7 +243,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **submitTaskGraph** > TaskGraphLog submitTaskGraph(namespace, id) @@ -255,46 +252,45 @@ public class Example { Submit a single task graph for execution. ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import TaskGraphsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.TaskGraphsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - TaskGraphsApi apiInstance = new TaskGraphsApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace that owns this task graph. - String id = "id_example"; // String | The UUID of the task graph entry. - try { - TaskGraphLog result = apiInstance.submitTaskGraph(namespace, id); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling TaskGraphsApi#submitTaskGraph"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + TaskGraphsApi apiInstance = new TaskGraphsApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace that owns this task graph. + String id = "id_example"; // String | The UUID of the task graph entry. + try { + TaskGraphLog result = apiInstance.submitTaskGraph(namespace, id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TaskGraphsApi#submitTaskGraph"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -311,7 +307,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -325,7 +321,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **updateTaskGraph** > updateTaskGraph(namespace, id, graph) @@ -334,46 +330,45 @@ public class Example { Update information about a single task graph execution. ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import TaskGraphsApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.TaskGraphsApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - TaskGraphsApi apiInstance = new TaskGraphsApi(defaultClient); - String namespace = "namespace_example"; // String | The namespace that owns this task graph. - String id = "id_example"; // String | The UUID of the task graph entry. - TaskGraph graph = new TaskGraph(); // TaskGraph | Updates to make to the task graph. - try { - apiInstance.updateTaskGraph(namespace, id, graph); - } catch (ApiException e) { - System.err.println("Exception when calling TaskGraphsApi#updateTaskGraph"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + TaskGraphsApi apiInstance = new TaskGraphsApi(defaultClient); + String namespace = "namespace_example"; // String | The namespace that owns this task graph. + String id = "id_example"; // String | The UUID of the task graph entry. + TaskGraph graph = new TaskGraph(); // TaskGraph | Updates to make to the task graph. + try { + apiInstance.updateTaskGraph(namespace, id, graph); + } catch (ApiException e) { + System.err.println("Exception when calling TaskGraphsApi#updateTaskGraph"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -391,7 +386,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers diff --git a/docs/TasksApi.md b/docs/TasksApi.md index 57c93ad..2d2f49c 100644 --- a/docs/TasksApi.md +++ b/docs/TasksApi.md @@ -10,56 +10,55 @@ All URIs are relative to */v1* | [**tasksGet**](TasksApi.md#tasksGet) | **GET** /tasks | | - + # **runSQL** -> List<Object> runSQL(namespace, sql, acceptEncoding) +> List<Map<String, Object>> runSQL(namespace, sql, acceptEncoding) Run a sql query ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import TasksApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.TasksApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - TasksApi apiInstance = new TasksApi(defaultClient); - String namespace = "namespace_example"; // String | namespace to run task under is in (an organization name or user's username) - SQLParameters sql = new SQLParameters(); // SQLParameters | sql being submitted - String acceptEncoding = "acceptEncoding_example"; // String | Encoding to use - try { - List result = apiInstance.runSQL(namespace, sql, acceptEncoding); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling TasksApi#runSQL"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + TasksApi apiInstance = new TasksApi(defaultClient); + String namespace = "namespace_example"; // String | namespace to run task under is in (an organization name or user's username) + SQLParameters sql = new SQLParameters(); // SQLParameters | sql being submitted + String acceptEncoding = "acceptEncoding_example"; // String | Encoding to use + try { + List> result = apiInstance.runSQL(namespace, sql, acceptEncoding); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TasksApi#runSQL"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -73,11 +72,11 @@ public class Example { ### Return type -**List<Object>** +[**List<Map<String, Object>>**](Map.md) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -92,7 +91,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **taskIdGet** > ArrayTask taskIdGet(id) @@ -101,45 +100,44 @@ public class Example { Fetch an array task ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import TasksApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.TasksApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - TasksApi apiInstance = new TasksApi(defaultClient); - String id = "id_example"; // String | task ID to fetch - try { - ArrayTask result = apiInstance.taskIdGet(id); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling TasksApi#taskIdGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + TasksApi apiInstance = new TasksApi(defaultClient); + String id = "id_example"; // String | task ID to fetch + try { + ArrayTask result = apiInstance.taskIdGet(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TasksApi#taskIdGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -155,7 +153,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -169,7 +167,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **taskIdResultGet** > String taskIdResultGet(id, acceptEncoding) @@ -178,46 +176,45 @@ public class Example { Retrieve results of an array task ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import TasksApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.TasksApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - TasksApi apiInstance = new TasksApi(defaultClient); - String id = "id_example"; // String | task ID to retrieve stored results - String acceptEncoding = "acceptEncoding_example"; // String | Encoding to use - try { - String result = apiInstance.taskIdResultGet(id, acceptEncoding); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling TasksApi#taskIdResultGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + TasksApi apiInstance = new TasksApi(defaultClient); + String id = "id_example"; // String | task ID to retrieve stored results + String acceptEncoding = "acceptEncoding_example"; // String | Encoding to use + try { + String result = apiInstance.taskIdResultGet(id, acceptEncoding); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TasksApi#taskIdResultGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -234,7 +231,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -250,7 +247,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **tasksGet** > ArrayTaskData tasksGet(namespace, createdBy, array, start, end, page, perPage, type, excludeType, fileType, excludeFileType, status, search, orderby) @@ -259,58 +256,57 @@ public class Example { Fetch a list of all array tasks a user has access to ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import TasksApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.TasksApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - TasksApi apiInstance = new TasksApi(defaultClient); - String namespace = "namespace_example"; // String | namespace to filter - String createdBy = "createdBy_example"; // String | username to filter - String array = "array_example"; // String | name/uri of array that is url-encoded to filter - Integer start = 56; // Integer | start time for tasks to filter by - Integer end = 56; // Integer | end time for tasks to filter by - Integer page = 56; // Integer | pagination offset - Integer perPage = 56; // Integer | pagination limit - String type = "type_example"; // String | task type, \"QUERY\", \"SQL\", \"UDF\", \"GENERIC_UDF\" - List excludeType = Arrays.asList(); // List | task_type to exclude matching array in results, more than one can be included - List fileType = Arrays.asList(); // List | match file_type of task array, more than one can be included - List excludeFileType = Arrays.asList(); // List | exclude file_type of task arrays, more than one can be included - String status = "status_example"; // String | Filter to only return these statuses - String search = "search_example"; // String | search string that will look at name, namespace or description fields - String orderby = "orderby_example"; // String | sort by which field valid values include start_time, name - try { - ArrayTaskData result = apiInstance.tasksGet(namespace, createdBy, array, start, end, page, perPage, type, excludeType, fileType, excludeFileType, status, search, orderby); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling TasksApi#tasksGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + TasksApi apiInstance = new TasksApi(defaultClient); + String namespace = "namespace_example"; // String | namespace to filter + String createdBy = "createdBy_example"; // String | username to filter + String array = "array_example"; // String | name/uri of array that is url-encoded to filter + Integer start = 56; // Integer | start time for tasks to filter by + Integer end = 56; // Integer | end time for tasks to filter by + Integer page = 56; // Integer | pagination offset + Integer perPage = 56; // Integer | pagination limit + String type = "type_example"; // String | task type, \"QUERY\", \"SQL\", \"UDF\", \"GENERIC_UDF\" + List excludeType = Arrays.asList(); // List | task_type to exclude matching array in results, more than one can be included + List fileType = Arrays.asList(); // List | match file_type of task array, more than one can be included + List excludeFileType = Arrays.asList(); // List | exclude file_type of task arrays, more than one can be included + String status = "status_example"; // String | Filter to only return these statuses + String search = "search_example"; // String | search string that will look at name, namespace or description fields + String orderby = "orderby_example"; // String | sort by which field valid values include start_time, name + try { + ArrayTaskData result = apiInstance.tasksGet(namespace, createdBy, array, start, end, page, perPage, type, excludeType, fileType, excludeFileType, status, search, orderby); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TasksApi#tasksGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -339,7 +335,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers diff --git a/docs/UdfApi.md b/docs/UdfApi.md index 8abf545..241b924 100644 --- a/docs/UdfApi.md +++ b/docs/UdfApi.md @@ -17,7 +17,7 @@ All URIs are relative to */v1* | [**updateUDFInfo**](UdfApi.md#updateUDFInfo) | **PATCH** /udf/{namespace}/{name} | | - + # **deleteUDFInfo** > deleteUDFInfo(namespace, name) @@ -26,45 +26,44 @@ All URIs are relative to */v1* delete a registered UDF -- this will remove all sharing and can not be undone ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import UdfApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UdfApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - UdfApi apiInstance = new UdfApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String name = "name_example"; // String | name to register UDF under - try { - apiInstance.deleteUDFInfo(namespace, name); - } catch (ApiException e) { - System.err.println("Exception when calling UdfApi#deleteUDFInfo"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + UdfApi apiInstance = new UdfApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String name = "name_example"; // String | name to register UDF under + try { + apiInstance.deleteUDFInfo(namespace, name); + } catch (ApiException e) { + System.err.println("Exception when calling UdfApi#deleteUDFInfo"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -81,7 +80,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -95,7 +94,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getUDFInfo** > UDFInfo getUDFInfo(namespace, name) @@ -104,46 +103,45 @@ null (empty response body) get a specific UDF in the given namespace ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import UdfApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UdfApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - UdfApi apiInstance = new UdfApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String name = "name_example"; // String | name to register UDF under - try { - UDFInfo result = apiInstance.getUDFInfo(namespace, name); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UdfApi#getUDFInfo"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + UdfApi apiInstance = new UdfApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String name = "name_example"; // String | name to register UDF under + try { + UDFInfo result = apiInstance.getUDFInfo(namespace, name); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UdfApi#getUDFInfo"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -160,7 +158,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -175,7 +173,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getUDFInfoSharingPolicies** > List<UDFSharing> getUDFInfoSharingPolicies(namespace, name) @@ -184,46 +182,45 @@ public class Example { Get all sharing details of the UDF ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import UdfApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UdfApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - UdfApi apiInstance = new UdfApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String name = "name_example"; // String | name of UDFInfo - try { - List result = apiInstance.getUDFInfoSharingPolicies(namespace, name); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UdfApi#getUDFInfoSharingPolicies"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + UdfApi apiInstance = new UdfApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String name = "name_example"; // String | name of UDFInfo + try { + List result = apiInstance.getUDFInfoSharingPolicies(namespace, name); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UdfApi#getUDFInfoSharingPolicies"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -240,7 +237,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -255,7 +252,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **handleCopyUDF** > UDFCopied handleCopyUDF(namespace, name, udFCopy, X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME, endTimestamp) @@ -264,49 +261,48 @@ public class Example { Copy a tiledb udf at the specified location ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import UdfApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UdfApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - UdfApi apiInstance = new UdfApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String name = "name_example"; // String | name of UDFInfo - UDFCopy udFCopy = new UDFCopy(); // UDFCopy | Input/Output information to copy a UDF - String X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME = "X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME_example"; // String | Optional registered access credentials to use for creation - Integer endTimestamp = 56; // Integer | Milliseconds since Unix epoch - try { - UDFCopied result = apiInstance.handleCopyUDF(namespace, name, udFCopy, X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME, endTimestamp); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UdfApi#handleCopyUDF"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + UdfApi apiInstance = new UdfApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String name = "name_example"; // String | name of UDFInfo + UDFCopy udFCopy = new UDFCopy(); // UDFCopy | Input/Output information to copy a UDF + String X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME = "X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME_example"; // String | Optional registered access credentials to use for creation + Integer endTimestamp = 56; // Integer | Milliseconds since Unix epoch + try { + UDFCopied result = apiInstance.handleCopyUDF(namespace, name, udFCopy, X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME, endTimestamp); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UdfApi#handleCopyUDF"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -326,7 +322,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -340,7 +336,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **registerUDFInfo** > registerUDFInfo(namespace, name, udf) @@ -349,46 +345,45 @@ public class Example { register a UDF in the given namespace ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import UdfApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UdfApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - UdfApi apiInstance = new UdfApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String name = "name_example"; // String | name to register UDF under - UDFInfoUpdate udf = new UDFInfoUpdate(); // UDFInfoUpdate | UDF to register - try { - apiInstance.registerUDFInfo(namespace, name, udf); - } catch (ApiException e) { - System.err.println("Exception when calling UdfApi#registerUDFInfo"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + UdfApi apiInstance = new UdfApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String name = "name_example"; // String | name to register UDF under + UDFInfoUpdate udf = new UDFInfoUpdate(); // UDFInfoUpdate | UDF to register + try { + apiInstance.registerUDFInfo(namespace, name, udf); + } catch (ApiException e) { + System.err.println("Exception when calling UdfApi#registerUDFInfo"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -406,7 +401,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -420,7 +415,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **shareUDFInfo** > shareUDFInfo(namespace, name, udfSharing) @@ -429,46 +424,45 @@ null (empty response body) Share a UDF with a user ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import UdfApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UdfApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - UdfApi apiInstance = new UdfApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String name = "name_example"; // String | name of UDFInfo - UDFSharing udfSharing = new UDFSharing(); // UDFSharing | Namespace and list of permissions to share with. An empty list of permissions will remove the namespace; if permissions already exist they will be deleted then new ones added. In the event of a failure, the new policies will be rolled back to prevent partial policies, and it's likely the UDF will not be shared with the namespace at all. - try { - apiInstance.shareUDFInfo(namespace, name, udfSharing); - } catch (ApiException e) { - System.err.println("Exception when calling UdfApi#shareUDFInfo"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + UdfApi apiInstance = new UdfApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String name = "name_example"; // String | name of UDFInfo + UDFSharing udfSharing = new UDFSharing(); // UDFSharing | Namespace and list of permissions to share with. An empty list of permissions will remove the namespace; if permissions already exist they will be deleted then new ones added. In the event of a failure, the new policies will be rolled back to prevent partial policies, and it's likely the UDF will not be shared with the namespace at all. + try { + apiInstance.shareUDFInfo(namespace, name, udfSharing); + } catch (ApiException e) { + System.err.println("Exception when calling UdfApi#shareUDFInfo"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -486,7 +480,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -501,7 +495,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **submitGenericUDF** > File submitGenericUDF(namespace, udf, acceptEncoding) @@ -510,47 +504,46 @@ null (empty response body) submit a generic UDF in the given namespace ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import UdfApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UdfApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - UdfApi apiInstance = new UdfApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - GenericUDF udf = new GenericUDF(); // GenericUDF | UDF to run - String acceptEncoding = "acceptEncoding_example"; // String | Encoding to use - try { - File result = apiInstance.submitGenericUDF(namespace, udf, acceptEncoding); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UdfApi#submitGenericUDF"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + UdfApi apiInstance = new UdfApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + GenericUDF udf = new GenericUDF(); // GenericUDF | UDF to run + String acceptEncoding = "acceptEncoding_example"; // String | Encoding to use + try { + File result = apiInstance.submitGenericUDF(namespace, udf, acceptEncoding); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UdfApi#submitGenericUDF"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -568,7 +561,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -582,7 +575,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
| - + # **submitMultiArrayUDF** > File submitMultiArrayUDF(namespace, udf, acceptEncoding) @@ -591,47 +584,46 @@ public class Example { submit a multi-array UDF in the given namespace ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import UdfApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UdfApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - UdfApi apiInstance = new UdfApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - MultiArrayUDF udf = new MultiArrayUDF(); // MultiArrayUDF | UDF to run - String acceptEncoding = "acceptEncoding_example"; // String | Encoding to use - try { - File result = apiInstance.submitMultiArrayUDF(namespace, udf, acceptEncoding); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UdfApi#submitMultiArrayUDF"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + UdfApi apiInstance = new UdfApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + MultiArrayUDF udf = new MultiArrayUDF(); // MultiArrayUDF | UDF to run + String acceptEncoding = "acceptEncoding_example"; // String | Encoding to use + try { + File result = apiInstance.submitMultiArrayUDF(namespace, udf, acceptEncoding); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UdfApi#submitMultiArrayUDF"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -649,7 +641,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -663,7 +655,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
| - + # **submitUDF** > File submitUDF(namespace, array, udf, xPayer, acceptEncoding, v2) @@ -672,50 +664,49 @@ public class Example { send a UDF to run against a specified array/URI registered to a group/project ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import UdfApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UdfApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - UdfApi apiInstance = new UdfApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String array = "array_example"; // String | name/uri of array that is url-encoded - MultiArrayUDF udf = new MultiArrayUDF(); // MultiArrayUDF | UDF to run - String xPayer = "xPayer_example"; // String | Name of organization or user who should be charged for this request - String acceptEncoding = "acceptEncoding_example"; // String | Encoding to use - String v2 = "v2_example"; // String | flag to indicate if v2 array UDFs should be used, currently in beta testing. Setting any value will enable v2 array UDFs. - try { - File result = apiInstance.submitUDF(namespace, array, udf, xPayer, acceptEncoding, v2); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UdfApi#submitUDF"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + UdfApi apiInstance = new UdfApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of array that is url-encoded + MultiArrayUDF udf = new MultiArrayUDF(); // MultiArrayUDF | UDF to run + String xPayer = "xPayer_example"; // String | Name of organization or user who should be charged for this request + String acceptEncoding = "acceptEncoding_example"; // String | Encoding to use + String v2 = "v2_example"; // String | flag to indicate if v2 array UDFs should be used, currently in beta testing. Setting any value will enable v2 array UDFs. + try { + File result = apiInstance.submitUDF(namespace, array, udf, xPayer, acceptEncoding, v2); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UdfApi#submitUDF"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -736,7 +727,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -750,7 +741,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
| - + # **udfNamespaceArrayEndTimestampsGet** > ArrayEndTimestampData udfNamespaceArrayEndTimestampsGet(namespace, array, page, perPage) @@ -759,48 +750,47 @@ public class Example { retrieve a list of timestamps from the array fragment info listing in milliseconds, paginated ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import UdfApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UdfApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - UdfApi apiInstance = new UdfApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String array = "array_example"; // String | name/uri of array that is url-encoded - Integer page = 56; // Integer | pagination offset - Integer perPage = 56; // Integer | pagination limit - try { - ArrayEndTimestampData result = apiInstance.udfNamespaceArrayEndTimestampsGet(namespace, array, page, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UdfApi#udfNamespaceArrayEndTimestampsGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + UdfApi apiInstance = new UdfApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String array = "array_example"; // String | name/uri of array that is url-encoded + Integer page = 56; // Integer | pagination offset + Integer perPage = 56; // Integer | pagination limit + try { + ArrayEndTimestampData result = apiInstance.udfNamespaceArrayEndTimestampsGet(namespace, array, page, perPage); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UdfApi#udfNamespaceArrayEndTimestampsGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -819,7 +809,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -833,7 +823,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **updateUDFInfo** > updateUDFInfo(namespace, name, udf) @@ -842,46 +832,45 @@ public class Example { update an existing registered UDF in the given namespace ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import UdfApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UdfApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - UdfApi apiInstance = new UdfApi(defaultClient); - String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) - String name = "name_example"; // String | name to register UDF under - UDFInfoUpdate udf = new UDFInfoUpdate(); // UDFInfoUpdate | UDF to update - try { - apiInstance.updateUDFInfo(namespace, name, udf); - } catch (ApiException e) { - System.err.println("Exception when calling UdfApi#updateUDFInfo"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + UdfApi apiInstance = new UdfApi(defaultClient); + String namespace = "namespace_example"; // String | namespace array is in (an organization name or user's username) + String name = "name_example"; // String | name to register UDF under + UDFInfoUpdate udf = new UDFInfoUpdate(); // UDFInfoUpdate | UDF to update + try { + apiInstance.updateUDFInfo(namespace, name, udf); + } catch (ApiException e) { + System.err.println("Exception when calling UdfApi#updateUDFInfo"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -899,7 +888,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers diff --git a/docs/User.md b/docs/User.md index 32df828..4be096f 100644 --- a/docs/User.md +++ b/docs/User.md @@ -26,6 +26,7 @@ User |**defaultS3PathCredentialsName** | **Object** | The name of the credentials used to create and access files in the `default_s3_path`, if needed. | [optional] | |**assetLocations** | [**AssetLocations**](AssetLocations.md) | | [optional] | |**defaultNamespaceCharged** | **String** | Override the default namespace charged for actions when no namespace is specified | [optional] | +|**defaultRegion** | **String** | The default region to use for notebooks and other operations. It must be a region supported by TileDB, see https://docs.tiledb.com/cloud/concepts/tiledb-cloud-internals/architecture#orchestration | [optional] | diff --git a/docs/UserApi.md b/docs/UserApi.md index b427aba..f4120ac 100644 --- a/docs/UserApi.md +++ b/docs/UserApi.md @@ -28,7 +28,7 @@ All URIs are relative to */v1* | [**updateUserInOrganization**](UserApi.md#updateUserInOrganization) | **PATCH** /organizations/{organization}/{username} | | - + # **addAWSAccessCredentials** > addAWSAccessCredentials(namespace, awsAccessCredentials) @@ -37,45 +37,44 @@ All URIs are relative to */v1* Add aws keys ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - UserApi apiInstance = new UserApi(defaultClient); - String namespace = "namespace_example"; // String | namespace - AWSAccessCredentials awsAccessCredentials = new AWSAccessCredentials(); // AWSAccessCredentials | aws access credentials to store for a namespace - try { - apiInstance.addAWSAccessCredentials(namespace, awsAccessCredentials); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#addAWSAccessCredentials"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + String namespace = "namespace_example"; // String | namespace + AWSAccessCredentials awsAccessCredentials = new AWSAccessCredentials(); // AWSAccessCredentials | aws access credentials to store for a namespace + try { + apiInstance.addAWSAccessCredentials(namespace, awsAccessCredentials); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#addAWSAccessCredentials"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -92,7 +91,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -106,7 +105,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **addUserToOrganization** > addUserToOrganization(organization, user) @@ -115,45 +114,44 @@ null (empty response body) add a user to an organization ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - UserApi apiInstance = new UserApi(defaultClient); - String organization = "organization_example"; // String | organization name - OrganizationUser user = new OrganizationUser(); // OrganizationUser | user to add - try { - apiInstance.addUserToOrganization(organization, user); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#addUserToOrganization"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + String organization = "organization_example"; // String | organization name + OrganizationUser user = new OrganizationUser(); // OrganizationUser | user to add + try { + apiInstance.addUserToOrganization(organization, user); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#addUserToOrganization"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -170,7 +168,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -184,7 +182,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **checkAWSAccessCredentials** > List<AWSAccessCredentials> checkAWSAccessCredentials(namespace) @@ -193,45 +191,44 @@ null (empty response body) Check if aws keys are set ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - UserApi apiInstance = new UserApi(defaultClient); - String namespace = "namespace_example"; // String | namespace - try { - List result = apiInstance.checkAWSAccessCredentials(namespace); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#checkAWSAccessCredentials"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + String namespace = "namespace_example"; // String | namespace + try { + List result = apiInstance.checkAWSAccessCredentials(namespace); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#checkAWSAccessCredentials"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -247,7 +244,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -261,7 +258,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **checkAWSAccessCredentialsByName** > AWSAccessCredentials checkAWSAccessCredentialsByName(namespace, name) @@ -270,46 +267,45 @@ public class Example { Check if aws keys are set by name ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - UserApi apiInstance = new UserApi(defaultClient); - String namespace = "namespace_example"; // String | namespace - String name = "name_example"; // String | name - try { - AWSAccessCredentials result = apiInstance.checkAWSAccessCredentialsByName(namespace, name); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#checkAWSAccessCredentialsByName"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + String namespace = "namespace_example"; // String | namespace + String name = "name_example"; // String | name + try { + AWSAccessCredentials result = apiInstance.checkAWSAccessCredentialsByName(namespace, name); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#checkAWSAccessCredentialsByName"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -326,7 +322,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -340,7 +336,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **confirmEmail** > confirmEmail() @@ -349,43 +345,42 @@ public class Example { confirm user email ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - UserApi apiInstance = new UserApi(defaultClient); - try { - apiInstance.confirmEmail(); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#confirmEmail"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + try { + apiInstance.confirmEmail(); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#confirmEmail"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -398,7 +393,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -412,7 +407,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **createUser** > createUser(user) @@ -421,44 +416,31 @@ null (empty response body) create a user ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - UserApi apiInstance = new UserApi(defaultClient); - User user = new User(); // User | user to create - try { - apiInstance.createUser(user); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUser"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + UserApi apiInstance = new UserApi(defaultClient); + User user = new User(); // User | user to create + try { + apiInstance.createUser(user); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -474,7 +456,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +No authorization required ### HTTP request headers @@ -488,7 +470,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **deleteAWSAccessCredentials** > deleteAWSAccessCredentials(namespace, name) @@ -497,45 +479,44 @@ null (empty response body) delete a AWS Access credentials in a namespace. This will likely cause arrays to become unreachable ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - UserApi apiInstance = new UserApi(defaultClient); - String namespace = "namespace_example"; // String | namespace - String name = "name_example"; // String | name - try { - apiInstance.deleteAWSAccessCredentials(namespace, name); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#deleteAWSAccessCredentials"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + String namespace = "namespace_example"; // String | namespace + String name = "name_example"; // String | name + try { + apiInstance.deleteAWSAccessCredentials(namespace, name); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#deleteAWSAccessCredentials"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -552,7 +533,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -566,7 +547,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **deleteUser** > deleteUser(username) @@ -575,44 +556,43 @@ null (empty response body) delete a user ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - UserApi apiInstance = new UserApi(defaultClient); - String username = "username_example"; // String | username or ID - try { - apiInstance.deleteUser(username); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#deleteUser"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | username or ID + try { + apiInstance.deleteUser(username); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#deleteUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -628,7 +608,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -642,7 +622,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **deleteUserFromOrganization** > deleteUserFromOrganization(organization, username) @@ -651,45 +631,44 @@ null (empty response body) delete a user from an organization ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - UserApi apiInstance = new UserApi(defaultClient); - String organization = "organization_example"; // String | organization name - String username = "username_example"; // String | username to manipulate - try { - apiInstance.deleteUserFromOrganization(organization, username); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#deleteUserFromOrganization"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + String organization = "organization_example"; // String | organization name + String username = "username_example"; // String | username to manipulate + try { + apiInstance.deleteUserFromOrganization(organization, username); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#deleteUserFromOrganization"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -706,7 +685,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -720,7 +699,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getOrganizationUser** > OrganizationUser getOrganizationUser(organization, username) @@ -729,46 +708,45 @@ null (empty response body) get a user from an organization ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - UserApi apiInstance = new UserApi(defaultClient); - String organization = "organization_example"; // String | organization name - String username = "username_example"; // String | username to manipulate - try { - OrganizationUser result = apiInstance.getOrganizationUser(organization, username); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#getOrganizationUser"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + String organization = "organization_example"; // String | organization name + String username = "username_example"; // String | username to manipulate + try { + OrganizationUser result = apiInstance.getOrganizationUser(organization, username); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#getOrganizationUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -785,7 +763,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -800,54 +778,54 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getSession** -> Token getSession(rememberMe) +> Token getSession(rememberMe, expires) Get session token for user ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - UserApi apiInstance = new UserApi(defaultClient); - String rememberMe = "rememberMe_example"; // String | flag to create a token with expiration of 30 days, default is false - try { - Token result = apiInstance.getSession(rememberMe); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#getSession"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + String rememberMe = "rememberMe_example"; // String | flag to create a token with expiration of 30 days, default is false + OffsetDateTime expires = OffsetDateTime.now(); // OffsetDateTime | Expiration date for token, if empty token defaults to 30 minutes + try { + Token result = apiInstance.getSession(rememberMe, expires); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#getSession"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -856,6 +834,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **rememberMe** | **String**| flag to create a token with expiration of 30 days, default is false | [optional] | +| **expires** | **OffsetDateTime**| Expiration date for token, if empty token defaults to 30 minutes | [optional] | ### Return type @@ -863,7 +842,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -877,7 +856,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getTokenScopes** > List<TokenScope> getTokenScopes() @@ -886,44 +865,43 @@ public class Example { retrieves available token scopes for a user ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - UserApi apiInstance = new UserApi(defaultClient); - try { - List result = apiInstance.getTokenScopes(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#getTokenScopes"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + try { + List result = apiInstance.getTokenScopes(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#getTokenScopes"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -936,7 +914,7 @@ This endpoint does not need any parameter. ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -950,7 +928,7 @@ This endpoint does not need any parameter. | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getUser** > User getUser() @@ -959,44 +937,43 @@ This endpoint does not need any parameter. get a user ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - UserApi apiInstance = new UserApi(defaultClient); - try { - User result = apiInstance.getUser(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#getUser"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + try { + User result = apiInstance.getUser(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#getUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1009,7 +986,7 @@ This endpoint does not need any parameter. ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1023,7 +1000,7 @@ This endpoint does not need any parameter. | **502** | Bad Gateway | - | | **0** | error response | - | - + # **getUserWithUsername** > User getUserWithUsername(username) @@ -1032,45 +1009,44 @@ This endpoint does not need any parameter. get a user ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - UserApi apiInstance = new UserApi(defaultClient); - String username = "username_example"; // String | username or ID - try { - User result = apiInstance.getUserWithUsername(username); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#getUserWithUsername"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | username or ID + try { + User result = apiInstance.getUserWithUsername(username); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#getUserWithUsername"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1086,7 +1062,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1101,7 +1077,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **requestToken** > Token requestToken(tokenRequest) @@ -1110,45 +1086,44 @@ public class Example { Request an authorization token, optionally taken a TokenRequest object to set parameters on the token ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - UserApi apiInstance = new UserApi(defaultClient); - TokenRequest tokenRequest = new TokenRequest(); // TokenRequest | token request object - try { - Token result = apiInstance.requestToken(tokenRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#requestToken"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + TokenRequest tokenRequest = new TokenRequest(); // TokenRequest | token request object + try { + Token result = apiInstance.requestToken(tokenRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#requestToken"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1164,7 +1139,7 @@ public class Example { ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1178,7 +1153,7 @@ public class Example { | **502** | Bad Gateway | - | | **0** | error response | - | - + # **resetUserPassword** > resetUserPassword(user) @@ -1187,44 +1162,43 @@ public class Example { reset user password ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - UserApi apiInstance = new UserApi(defaultClient); - ResetUserPasswordRequest user = new ResetUserPasswordRequest(); // ResetUserPasswordRequest | password to update for user requesting update - try { - apiInstance.resetUserPassword(user); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#resetUserPassword"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + ResetUserPasswordRequest user = new ResetUserPasswordRequest(); // ResetUserPasswordRequest | password to update for user requesting update + try { + apiInstance.resetUserPassword(user); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#resetUserPassword"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1240,7 +1214,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1255,7 +1229,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **revokeToken** > revokeToken(token) @@ -1264,44 +1238,43 @@ null (empty response body) revoke an authorization token ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - UserApi apiInstance = new UserApi(defaultClient); - String token = "token_example"; // String | token name or token itself - try { - apiInstance.revokeToken(token); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#revokeToken"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + String token = "token_example"; // String | token name or token itself + try { + apiInstance.revokeToken(token); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#revokeToken"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1317,7 +1290,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1331,7 +1304,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **tokensGet** > List<Token> tokensGet() @@ -1340,44 +1313,43 @@ null (empty response body) Fetch a list of user tokens ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - UserApi apiInstance = new UserApi(defaultClient); - try { - List result = apiInstance.tokensGet(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#tokensGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + try { + List result = apiInstance.tokensGet(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#tokensGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1390,7 +1362,7 @@ This endpoint does not need any parameter. ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1404,7 +1376,7 @@ This endpoint does not need any parameter. | **502** | Bad Gateway | - | | **0** | error response | - | - + # **tokensSessionGet** > List<Token> tokensSessionGet() @@ -1413,44 +1385,43 @@ This endpoint does not need any parameter. Fetch a list of user session tokens ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - UserApi apiInstance = new UserApi(defaultClient); - try { - List result = apiInstance.tokensSessionGet(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#tokensSessionGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + try { + List result = apiInstance.tokensSessionGet(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#tokensSessionGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1463,7 +1434,7 @@ This endpoint does not need any parameter. ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1477,7 +1448,7 @@ This endpoint does not need any parameter. | **502** | Bad Gateway | - | | **0** | error response | - | - + # **updateAWSAccessCredentials** > updateAWSAccessCredentials(namespace, name, awsAccessCredentials) @@ -1486,46 +1457,45 @@ This endpoint does not need any parameter. Update aws keys or associated buckets. This will update the key associations for each array in the namespace ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - UserApi apiInstance = new UserApi(defaultClient); - String namespace = "namespace_example"; // String | namespace - String name = "name_example"; // String | name - AWSAccessCredentials awsAccessCredentials = new AWSAccessCredentials(); // AWSAccessCredentials | aws credentials to update - try { - apiInstance.updateAWSAccessCredentials(namespace, name, awsAccessCredentials); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#updateAWSAccessCredentials"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + String namespace = "namespace_example"; // String | namespace + String name = "name_example"; // String | name + AWSAccessCredentials awsAccessCredentials = new AWSAccessCredentials(); // AWSAccessCredentials | aws credentials to update + try { + apiInstance.updateAWSAccessCredentials(namespace, name, awsAccessCredentials); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#updateAWSAccessCredentials"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1543,7 +1513,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1557,7 +1527,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **updateUser** > updateUser(username, user) @@ -1566,45 +1536,44 @@ null (empty response body) update a user ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - UserApi apiInstance = new UserApi(defaultClient); - String username = "username_example"; // String | username or ID - User user = new User(); // User | user details to update - try { - apiInstance.updateUser(username, user); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#updateUser"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | username or ID + User user = new User(); // User | user details to update + try { + apiInstance.updateUser(username, user); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#updateUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1621,7 +1590,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers @@ -1635,7 +1604,7 @@ null (empty response body) | **502** | Bad Gateway | - | | **0** | error response | - | - + # **updateUserInOrganization** > updateUserInOrganization(organization, username, user) @@ -1644,46 +1613,45 @@ null (empty response body) update a user in an organization ### Example - ```java // Import classes: - -import ApiClient; -import ApiException; -import Configuration; -import io.tiledb.cloud.rest_api.models.*; -import UserApi; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/v1"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - UserApi apiInstance = new UserApi(defaultClient); - String organization = "organization_example"; // String | organization name - String username = "username_example"; // String | username to manipulate - OrganizationUser user = new OrganizationUser(); // OrganizationUser | user details to update - try { - apiInstance.updateUserInOrganization(organization, username, user); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#updateUserInOrganization"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("/v1"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + String organization = "organization_example"; // String | organization name + String username = "username_example"; // String | username to manipulate + OrganizationUser user = new OrganizationUser(); // OrganizationUser | user details to update + try { + apiInstance.updateUserInOrganization(organization, username, user); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#updateUserInOrganization"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } + } } ``` @@ -1701,7 +1669,7 @@ null (empty response body) ### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) +[BasicAuth](../README.md#BasicAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers diff --git a/openapi-v1.yaml b/openapi-v1.yaml index c764327..c1a95c6 100644 --- a/openapi-v1.yaml +++ b/openapi-v1.yaml @@ -2,7 +2,7 @@ swagger: "2.0" info: description: TileDB Storage Platform REST API title: TileDB Storage Platform API - version: 2.2.19 + version: 2.17.51 produces: - application/json @@ -89,6 +89,54 @@ definitions: - STRING_UCS4 # This can be any datatype. Must store (type tag, value) pairs. - ANY + # Datetime with year resolution + - DATETIME_YEAR + # Datetime with month resolution + - DATETIME_MONTH + # Datetime with week resolution + - DATETIME_WEEK + # Datetime with day resolution + - DATETIME_DAY + # Datetime with hour resolution + - DATETIME_HR + # Datetime with minute resolution + - DATETIME_MIN + # Datetime with second resolution + - DATETIME_SEC + # Datetime with millisecond resolution + - DATETIME_MS + # Datetime with microsecond resolution + - DATETIME_US + # Datetime with nanosecond resolution + - DATETIME_NS + # Datetime with picosecond resolution + - DATETIME_PS + # Datetime with femtosecond resolution + - DATETIME_FS + # Datetime with attosecond resolution + - DATETIME_AS + # Time with hour resolution + - TIME_HR + # Time with minute resolution + - TIME_MIN + # Time with second resolution + - TIME_SEC + # Time with millisecond resolution + - TIME_MS + # Time with microsecond resolution + - TIME_US + # Time with nanosecond resolution + - TIME_NS + # Time with picosecond resolution + - TIME_PS + # Time with femtosecond resolution + - TIME_FS + # Time with attosecond resolution + - TIME_AS + # 8-bit unsigned integer + - BLOB + # Boolean + - BOOL ActivityEventType: description: Type of activity logged @@ -124,6 +172,8 @@ definitions: - estimated_result_sizes # read_fragment_info - read_fragment_info + # read_enumerations + - read_enumerations UDFLanguage: description: UDF Type @@ -246,6 +296,8 @@ definitions: - owner # Admin almost all rights but can't delete organization - admin + # Read, write, and delete User + - read_write_delete # Read and write User - read_write # Read Only User @@ -625,6 +677,7 @@ definitions: package: "github.com/TileDB-Inc/TileDB-Go" alias: "tiledb" type: "ArraySchema" + embedded: true AttributeBufferHeader: description: Represents an attribute buffer header information @@ -913,6 +966,24 @@ definitions: items: $ref: "#/definitions/ArrayMetadataEntry" + MetadataStringifiedEntry: + type: object + description: key/value pair representing an asset metadata map entry + properties: + key: + description: The metadata key + type: string + x-omitempty: false + value: + description: The metadata value + type: string + x-omitempty: false + type: + description: The metadata type + type: string + x-omitempty: false + example: array_metadata + TileDBConfig: description: TileDB config used for interaction with the embedded library type: object @@ -1068,6 +1139,7 @@ definitions: description: Start time RFC3339 for job type: string format: date-time + x-nullable: true finish_time: description: Finish time RFC3339 for job type: string @@ -1141,6 +1213,14 @@ definitions: x-omitempty: true description: > If set, the client-defined ID of the node within this task's graph. + cloud_provider: + type: string + x-omitempty: true + description: The name of the cloud provider where this task executed. + cloud_region: + type: string + x-omitempty: true + description: The region of the cloud provider where this task executed. PaginationMetadata: properties: @@ -1391,6 +1471,11 @@ definitions: default_namespace_charged: description: Override the default namespace charged for actions when no namespace is specified type: string + default_region: + description: > + The default region to use for notebooks and other operations. It must be a region supported by TileDB, + see https://docs.tiledb.com/cloud/concepts/tiledb-cloud-internals/architecture#orchestration + type: string OrganizationUser: description: user in an organization @@ -1408,6 +1493,14 @@ definitions: description: username for user type: string example: "username" + user_full_name: + description: full name of the user; available to organization admins + type: string + example: "Alice Hanna" + user_email: + description: email address of the user; available to organization admins + type: string + example: alice@example.com organization_name: description: name of organization type: string @@ -1606,6 +1699,47 @@ definitions: type: boolean readOnly: true example: false + assume_role_arn: + description: > + A AWS Role that will be first assumed before assuming the organization's AWS Role. + Visible to owners and admins. + type: string + x-omitempty: true + + OrganizationUpdate: + description: OrganizationUpdate + type: object + properties: + name: + type: string + minLength: 1 + maxLength: 63 + pattern: "^[\\w.\\-]+$" # only allows alphanumeric characters + description: organization name must be unique + x-nullable: true + logo: + description: Organization logo + type: string + x-nullable: true + description: + description: Organization description + type: string + x-nullable: true + default_s3_path: + description: > + The default location to store newly-created notebooks and other assets + like UDFs. The name `default_s3_path` is a legacy holdover; it may + refer to any supported storage location. + type: string + x-nullable: true + default_s3_path_credentials_name: + description: > + The name of the credentials used to create and access files in the + `default_s3_path`, if needed. + type: string + x-nullable: true + asset_locations: + $ref: "#/definitions/AssetLocations" AssetLocations: description: > @@ -1743,7 +1877,7 @@ definitions: # Raster - raster # Vector search - - vector_search + - vector_search FilePropertyName: description: File property assigned to a specific file (array) @@ -1992,6 +2126,22 @@ definitions: type: boolean x-omitempty: true example: true + created_at: + description: Datetime array was registered with tiledb + type: string + format: date-time + created_by: + description: The user who created the array, if known. + type: string + x-omitempty: true + metadata: + description: | + Contains the metadata of the array. + **Note:** This property is included in the response only if the `with_metadata` query parameter is set to `true`. + type: array + x-omitempty: true + items: + $ref: "#/definitions/MetadataStringifiedEntry" ArrayInfoUpdate: description: metadata of an array @@ -2140,6 +2290,10 @@ definitions: - stripe # Okta - okta + # perdomain + - perdomain + # SCIM + - scim PublicShareFilter: description: Query parameter to get array metadatas @@ -2708,12 +2862,28 @@ definitions: format: uint64 example: 4000 cost: - description: cost in USD for the current notebook session + description: cost in USD for the current notebook session x-omitempty: true x-nullable: true type: number format: double example: 0.27 + pod_status: + description: Status of the pod + $ref: "#/definitions/PodStatus" + example: RUNNING + x-omitempty: true + + PodStatus: + description: List of all available pod statuses + type: string + enum: + # Terminating + - TERMINATING + # Running + - RUNNING + # Launching + - LAUNCHING ArrayFavorite: description: A user-favorite array item @@ -2833,6 +3003,8 @@ definitions: - GROUP_SHARE # Join Organization - JOIN_ORGANIZATION + # Allow a child namespace to use a payment instrument + - PAYMENT_SHARE InvitationStatus: description: List of values that InvitationStatus can take @@ -3316,6 +3488,22 @@ definitions: type: string x-omitempty: true description: License text + created_at: + description: Datetime the group was registered with tiledb + type: string + format: date-time + created_by: + description: The username of the group's creator, if known. + type: string + x-omitempty: true + metadata: + description: | + Contains metadata of the group. + **Note:** This property is included in the response only if the `with_metadata` query parameter is set to `true`. + type: array + x-omitempty: true + items: + $ref: "#/definitions/MetadataStringifiedEntry" GroupEntry: description: Object describing a single member of a group, which can be an array or a group @@ -3625,7 +3813,7 @@ definitions: type: string example: "MyOrganization" - GroupActivity: + GroupContentActivity: description: Object containing activity of an asset of a group type: object properties: @@ -3649,7 +3837,7 @@ definitions: description: Object containing the activity log $ref: "#/definitions/ArrayActivityLog" - GroupActivityResponse: + GroupContentActivityResponse: description: Object containing activity logs of group content along with the pagination metadata type: object properties: @@ -3659,7 +3847,7 @@ definitions: x-omitempty: false x-nullable: false items: - $ref: "#/definitions/GroupActivity" + $ref: "#/definitions/GroupContentActivity" pagination_metadata: x-omitempty: false x-nullable: false @@ -3815,6 +4003,14 @@ definitions: task_graph_id: type: string description: The UUID of the task graph. + cloud_provider: + type: string + x-omitempty: true + description: The name of the cloud provider where this task graph executed. + cloud_region: + type: string + x-omitempty: true + description: The region of the cloud provider where this task graph executed. TaskGraphNodeMetadata: description: Metadata about an individual node in a task graph. @@ -3825,6 +4021,7 @@ definitions: description: The client-generated UUID of the given graph node. name: type: string + maxLength: 255 description: > The client-generated name of the node. This is not guaranteed to be unique. @@ -3908,6 +4105,7 @@ definitions: description: The name of the user who created this task graph log. name: type: string + maxLength: 255 description: > A name for this task graph, displayed in the UI. Does not need to be unique. @@ -3923,7 +4121,7 @@ definitions: $ref: "#/definitions/TaskGraphNode" description: > The structure of the graph. This is provided by the client - when first setting up the task graph. + when first setting up the task graph. This must be topographically sorted; that is, each node must appear after all nodes that it depends upon. parallelism: @@ -3943,7 +4141,7 @@ definitions: x-omitempty: true description: > Duration in seconds relative to the workflow start time which the - workflow is allowed to run before it gets terminated. + workflow is allowed to run before it gets terminated. Defaults to 24h when unset task_graph_type: $ref: "#/definitions/TaskGraphType" @@ -3974,6 +4172,7 @@ definitions: description: The namespace that owns this task graph log. name: type: string + maxLength: 255 description: > The name of this graph, to appear in URLs. Must be unique per-namespace. @@ -4049,6 +4248,7 @@ definitions: description: The client-generated UUID of the given graph node. name: type: string + maxLength: 255 x-nullable: true description: > A client-specified name for the node. If provided, this must be @@ -4363,8 +4563,8 @@ definitions: resources: type: object description: > - The resources requested for this particular node. If resources are not - specified resource_class is used, if it is not set the standard resource + The resources requested for this particular node. If resources are not + specified resource_class is used, if it is not set the standard resource // defaults are used properties: cpu: @@ -4591,6 +4791,12 @@ definitions: type: object description: config to use to retrieve the contents $ref: "#/definitions/TileDBConfig" + fragments: + description: list of fragments in the array to consolidate + type: array + x-omitempty: true + items: + type: string ArrayVacuumRequest: description: Request to consolidate an array @@ -4601,6 +4807,75 @@ definitions: description: config to use to retrieve the contents $ref: "#/definitions/TileDBConfig" + Enumeration: + description: The enumerations of a single attribute + type: object + properties: + name: + type: string + path_name: + type: string + type: + type: string + cell_val_num: + type: integer + format: uint32 + ordered: + type: boolean + data: + type: array + items: + type: integer + format: uint8 + offsets: + type: array + items: + type: integer + format: uint8 + + LoadEnumerationsRequest: + description: Request to return enumerations for attributes + type: object + properties: + config: + type: object + description: config to use to retrieve the contents + $ref: "#/definitions/TileDBConfig" + enumerations: + type: array + items: + type: string + + LoadEnumerationsResponse: + description: Contains the enumerations of the array's attributes + type: object + properties: + enumerations: + type: array + items: + $ref: '#/definitions/Enumeration' + + LoadArraySchemaRequest: + description: Request to load an array schema + type: object + properties: + config: + type: object + description: config to use to retrieve the contents + $ref: "#/definitions/TileDBConfig" + + LoadArraySchemaResponse: + description: Contains the latest schema and all schemas for the opened array + type: object + properties: + latest_array_schema: + $ref: "#/definitions/ArraySchema" + all_array_schemas: + description: map of all array schemas + type: object + additionalProperties: + $ref: "#/definitions/ArraySchema" + RetryStrategy: description: RetryStrategy provides controls on how to retry a taskgraph node type: object @@ -4647,6 +4922,108 @@ definitions: # Retry task transient errors - OnTransientError + AssetBackingType: + description: The technology that an asset is backed by + type: string + enum: + # Array + - array + # Groups + - group + + AssetOwnershipLevel: + description: The ownership level of the asset + type: string + enum: + # Owned + - owned + # Shared + - shared + + MetadataStringified: + type: object + description: The user's TileDB metadata + properties: + entries: + description: List of metadata entries + type: array + x-omitempty: true + items: + $ref: "#/definitions/MetadataStringifiedEntry" + + AssetInfo: + description: metadata of an asset + type: object + properties: + uuid: + description: unique ID of a registered asset + type: string + example: "00000000-0000-0000-0000-000000000000" + asset_type: + description: Asset type of an asset + $ref: "#/definitions/AssetType" + asset_backing_type: + description: Asset type of an asset + $ref: "#/definitions/AssetBackingType" + asset_ownership_level: + description: Ownership level of the asset + $ref: "#/definitions/AssetOwnershipLevel" + namespace_name: + description: namespace_name that the asset is registered to + type: string + example: "user1" + namespace_uuid: + description: namespace_uuid that the asset is registered to + type: string + example: "00000000-0000-0000-0000-000000000000" + name: + description: name of asset + type: string + example: myarray1 + mime_type: + description: mime type of the asset + type: string + example: application/vnd.tiledb.v1.array + created_at: + description: "Time when the asset was created (rfc3339)" + type: string + format: date-time + readOnly: true + metadata: + description: metadata for the asset, only included when expanded + $ref: "#/definitions/MetadataStringified" + + AssetListResponse: + description: Asset associated with a TileDB Cloud account + type: object + properties: + data: + description: asset information for each asset + type: array + x-omitempty: true + items: + $ref: "#/definitions/AssetInfo" + pagination_metadata: + $ref: "#/definitions/PaginationMetadata" + + ChangeAssetCredentialsRequest: + description: Request body to change the credentials of the given assets + type: object + required: + - access_credentials + - asset_uuids + properties: + access_credentials: + description: The name or uuid of the access credentials + type: string + x-nullable: false + asset_uuids: + description: The list of asset uuids to have their credentials changed + type: array + items: + type: string + x-nullable: false + paths: /.stats: get: @@ -4707,6 +5084,11 @@ paths: description: namespace array is in (an organization name or user's username) type: string required: true + - name: with_metadata + in: query + description: include the metadata of the arrays + type: boolean + required: false get: description: get metadata on all arrays in a namespace tags: @@ -5218,6 +5600,82 @@ paths: schema: $ref: "#/definitions/Error" + /arrays/{namespace}/{array}/enumerations: + parameters: + - name: namespace + in: path + description: namespace array is in (an organization name or user's username) + type: string + required: true + - name: array + in: path + description: name/uri of array that is url-encoded + type: string + required: true + post: + description: request to get the enumerations of the arrays' attributes + tags: + - array + operationId: loadEnumerations + parameters: + - name: load_enumerations_request + in: body + description: Load Enumerations Request + schema: + $ref: "#/definitions/LoadEnumerationsRequest" + required: true + responses: + 200: + description: enumerations returned successfully + schema: + $ref: "#/definitions/LoadEnumerationsResponse" + 404: + description: Array does not exist or user does not have permissions to access it + 502: + description: Bad Gateway + default: + description: error response + schema: + $ref: "#/definitions/Error" + + /arrays/{namespace}/{array}/schema: + parameters: + - name: namespace + in: path + description: namespace array is in (an organization name or user's username) + type: string + required: true + - name: array + in: path + description: name/uri of array that is url-encoded + type: string + required: true + post: + description: request to get the array schema + tags: + - array + operationId: loadArraySchema + parameters: + - name: load_array_schema_request + in: body + description: Load Array Schema Request + schema: + $ref: "#/definitions/LoadArraySchemaRequest" + required: true + responses: + 200: + description: array schemas returned successfully + schema: + $ref: "#/definitions/LoadArraySchemaResponse" + 404: + description: Array does not exist or user does not have permissions to access it + 502: + description: Bad Gateway + default: + description: error response + schema: + $ref: "#/definitions/Error" + /arrays/{namespace}/{array}/share: parameters: - name: namespace @@ -6326,7 +6784,7 @@ paths: in: body description: organization details to update schema: - $ref: "#/definitions/Organization" + $ref: "#/definitions/OrganizationUpdate" required: true responses: 204: @@ -6588,6 +7046,12 @@ paths: description: flag to create a token with expiration of 30 days, default is false type: string required: false + - name: expires + in: query + description: Expiration date for token, if empty token defaults to 30 minutes + type: string + format: date-time + required: false get: tags: - user @@ -7313,8 +7777,6 @@ paths: description: status of running notebook schema: $ref: "#/definitions/NotebookStatus" - 202: - description: Notebook server is pending 402: description: Payment required schema: @@ -7862,6 +8324,78 @@ paths: schema: $ref: "#/definitions/Error" + /invitations/share_payment/{namespace}: + parameters: + - name: namespace + in: path + description: name or UUID of namespace sharing their payment info + type: string + required: true + post: + tags: + - invitation + description: | + Sends email to multiple recipients allowing them to use the payment + instrument provided by the source namespace. + operationId: sharePayment + parameters: + - name: email_invite + in: body + description: | + Recipients of the invitation. These may only be namespaces, + not email addresses. + schema: + type: object + properties: + namespaces: + type: array + items: + type: string + responses: + 204: + description: Email sent successfully to user for email confirmation link + 207: + description: Only a portion of the invitations succeeded, some failed + schema: + $ref: "#/definitions/InvitationFailedRecipients" + 500: + description: Could not reach any recipients + schema: + $ref: "#/definitions/InvitationFailedRecipients" + 502: + description: Bad Gateway + default: + description: error response + schema: + $ref: "#/definitions/Error" + + /invitations/share_payment/{namespace}/{target}: + parameters: + - name: namespace + in: path + description: name or UUID of namespace sharing their payment info + type: string + required: true + - name: target + in: path + description: name or UUID of recipient namespace + type: string + required: true + delete: + tags: + - invitation + description: Revokes invitation from the source namespace to the target. + operationId: cancelSharePayment + responses: + 204: + description: Invitation cancelled successfully + 404: + description: No invitation was found to cancel + default: + description: error response + schema: + $ref: "#/definitions/Error" + /arrays/browser/shared: parameters: - name: page @@ -7886,7 +8420,7 @@ paths: type: string - name: orderby in: query - description: sort by which field valid values include last_accessed, size, name + description: sort by which field valid values include size, name required: false type: string - name: permissions @@ -7942,6 +8476,11 @@ paths: collectionFormat: multi items: type: string + - name: with_metadata + in: query + description: include the metadata of the array + type: boolean + required: false get: tags: - array @@ -8032,7 +8571,7 @@ paths: type: string - name: orderby in: query - description: sort by which field valid values include last_accessed, size, name + description: sort by which field valid values include size, name required: false type: string - name: permissions @@ -8080,6 +8619,11 @@ paths: collectionFormat: multi items: type: string + - name: with_metadata + in: query + description: include the metadata of the array + type: boolean + required: false get: tags: - array @@ -8162,7 +8706,7 @@ paths: type: string - name: orderby in: query - description: sort by which field valid values include last_accessed, size, name + description: sort by which field valid values include size, name required: false type: string - name: permissions @@ -8210,6 +8754,11 @@ paths: collectionFormat: multi items: type: string + - name: with_metadata + in: query + description: include the metadata of the array + type: boolean + required: false get: tags: - array @@ -8906,6 +9455,11 @@ paths: description: search only the children of the groups with this uuid type: string required: false + - name: with_metadata + in: query + description: include the metadata of the groups + type: boolean + required: false responses: 200: description: the group contents @@ -9016,6 +9570,11 @@ paths: collectionFormat: multi items: type: string + - name: with_metadata + in: query + description: include the metadata of the groups + type: boolean + required: false responses: 200: description: the group contents @@ -9112,6 +9671,11 @@ paths: description: search only the children of the groups with this uuid type: string required: false + - name: with_metadata + in: query + description: include the metadata of the groups + type: boolean + required: false responses: 200: description: the group contents @@ -9467,7 +10031,7 @@ paths: 200: description: Activity logs of group contents along with the pagination metadata schema: - $ref: "#/definitions/GroupActivityResponse" + $ref: "#/definitions/GroupContentActivityResponse" 502: description: Bad Gateway default: @@ -9520,6 +10084,11 @@ paths: description: Include logs from only this user. type: string required: false + - name: status + in: query + description: Filter to only return these statuses + type: string + required: false - name: search in: query description: search string that will look at name. @@ -9736,10 +10305,8 @@ paths: tags: - task_graph_logs responses: - 202: - description: Information about the task graph execution. - schema: - $ref: "#/definitions/TaskGraphLog" + 204: + description: Graph stopped successfully 502: description: Bad Gateway default: @@ -10048,3 +10615,153 @@ paths: description: error response schema: $ref: "#/definitions/Error" + + /assets/{namespace}: + parameters: + - name: namespace + in: path + description: namespace + type: string + required: true + - name: asset_type + in: query + description: asset_type to filter to + type: string + required: false + - name: ownership_level + in: query + description: ownership_level to filter to (owned, shared) + type: string + required: false + - name: depth + in: query + description: depth of assets to be returned + type: string + required: false + - name: search + in: query + description: search string + type: string + required: false + - name: page + in: query + description: pagination offset + type: integer + required: false + - name: per_page + in: query + description: pagination limit + type: integer + required: false + - name: order_by + in: query + description: | + order by a specific property, defaults to `created_at desc` + supported values are created_at, name, asset_type + can also include the order type (asc or desc) separated by space + i.e. `name asc` `name desc` etc. + type: string + required: false + - name: expand + in: query + description: expansion option for the AssetInfo object to be added to the response + type: string + required: false + get: + tags: + - assets + description: List assets in a namespace + operationId: listAssets + responses: + 200: + description: Successful list of assets + schema: + $ref: "#/definitions/AssetListResponse" + 502: + description: Bad Gateway + default: + description: error response + schema: + $ref: "#/definitions/Error" + + /public_assets: + parameters: + - name: asset_type + in: query + description: asset_type to filter to + type: string + required: false + - name: depth + in: query + description: depth of assets to be returned + type: string + required: false + - name: search + in: query + description: search string + type: string + required: false + - name: page + in: query + description: pagination offset + type: integer + required: false + - name: per_page + in: query + description: pagination limit + type: integer + required: false + - name: order_by + in: query + description: | + order by a specific property, defaults to `created_at desc` + supported values are created_at, name, asset_type + can also include the order type (asc or desc) separated by space + i.e. `name asc` `name desc` etc. + type: string + required: false + get: + tags: + - assets + description: List public assets + operationId: listPublicAssets + responses: + 200: + description: Successful list of assets + schema: + $ref: "#/definitions/AssetListResponse" + 502: + description: Bad Gateway + default: + description: error response + schema: + $ref: "#/definitions/Error" + + /assets/{namespace}/change_credentials: + parameters: + - name: namespace + in: path + description: The namespace to send the request on behalf of. + type: string + required: true + post: + tags: + - assets + description: Changes the access credentials to the given assets + operationId: changeAssetCredentials + parameters: + - name: changeCredentialsRequest + in: body + description: aws access credentials to store for a namespace + schema: + $ref: "#/definitions/ChangeAssetCredentialsRequest" + required: true + responses: + 204: + description: Credentials changed successfully + 502: + description: Bad Gateway + default: + description: error response + schema: + $ref: "#/definitions/Error" diff --git a/src/main/java/io/tiledb/cloud/rest_api/ApiCallback.java b/src/main/java/io/tiledb/cloud/rest_api/ApiCallback.java index dc8ff00..bd95f64 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/ApiCallback.java +++ b/src/main/java/io/tiledb/cloud/rest_api/ApiCallback.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,9 @@ */ -package io.tiledb.cloud.rest_api; +package org.openapitools.client; + +import java.io.IOException; import java.util.Map; import java.util.List; diff --git a/src/main/java/io/tiledb/cloud/rest_api/ApiClient.java b/src/main/java/io/tiledb/cloud/rest_api/ApiClient.java index bd031da..ad67e7e 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/ApiClient.java +++ b/src/main/java/io/tiledb/cloud/rest_api/ApiClient.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,14 +11,8 @@ */ -package io.tiledb.cloud.rest_api; +package org.openapitools.client; -import io.tiledb.cloud.rest_api.auth.ApiKeyAuth; -import io.tiledb.cloud.rest_api.auth.Authentication; -import io.tiledb.cloud.rest_api.auth.HttpBasicAuth; -import io.tiledb.cloud.rest_api.auth.OAuth; -import io.tiledb.cloud.rest_api.auth.OAuthFlow; -import io.tiledb.cloud.rest_api.auth.RetryingOAuth; import okhttp3.*; import okhttp3.internal.http.HttpMethod; import okhttp3.internal.tls.OkHostnameVerifier; @@ -28,6 +22,7 @@ import okio.BufferedSink; import okio.Okio; import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder; +import org.apache.oltu.oauth2.common.message.types.GrantType; import javax.net.ssl.*; import java.io.File; @@ -46,6 +41,7 @@ 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; @@ -53,15 +49,33 @@ 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 org.openapitools.client.auth.Authentication; +import org.openapitools.client.auth.HttpBasicAuth; +import org.openapitools.client.auth.HttpBearerAuth; +import org.openapitools.client.auth.ApiKeyAuth; +import org.openapitools.client.auth.OAuth; +import org.openapitools.client.auth.RetryingOAuth; +import org.openapitools.client.auth.OAuthFlow; + /** *

ApiClient class.

*/ public class ApiClient { private String basePath = "/v1"; + protected List servers = new ArrayList(Arrays.asList( + new ServerConfiguration( + "/v1", + "No description provided", + new HashMap() + ) + )); + protected Integer serverIndex = 0; + protected Map serverVariables = null; private boolean debugging = false; private Map defaultHeaderMap = new HashMap(); private Map defaultCookieMap = new HashMap(); @@ -91,8 +105,8 @@ public ApiClient() { initHttpClient(); // Setup authentications (key: authentication name, value: authentication). - authentications.put("ApiKeyAuth", new ApiKeyAuth("header", "X-TILEDB-REST-API-KEY")); authentications.put("BasicAuth", new HttpBasicAuth()); + authentications.put("ApiKeyAuth", new ApiKeyAuth("header", "X-TILEDB-REST-API-KEY")); authentications.put("OAuth2", new OAuth()); // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); @@ -109,8 +123,8 @@ public ApiClient(OkHttpClient client) { httpClient = client; // Setup authentications (key: authentication name, value: authentication). - authentications.put("ApiKeyAuth", new ApiKeyAuth("header", "X-TILEDB-REST-API-KEY")); authentications.put("BasicAuth", new HttpBasicAuth()); + authentications.put("ApiKeyAuth", new ApiKeyAuth("header", "X-TILEDB-REST-API-KEY")); authentications.put("OAuth2", new OAuth()); // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); @@ -177,8 +191,8 @@ public ApiClient(String basePath, String clientId, String clientSecret, MapsingletonList(retryingOAuth)); // Setup authentications (key: authentication name, value: authentication). - authentications.put("ApiKeyAuth", new ApiKeyAuth("header", "X-TILEDB-REST-API-KEY")); authentications.put("BasicAuth", new HttpBasicAuth()); + authentications.put("ApiKeyAuth", new ApiKeyAuth("header", "X-TILEDB-REST-API-KEY")); // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); @@ -204,7 +218,7 @@ private void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/2.2.19/java"); + setUserAgent("OpenAPI-Generator/2.17.51/java"); authentications = new HashMap(); } @@ -226,6 +240,34 @@ public String getBasePath() { */ 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; } @@ -350,10 +392,10 @@ public DateFormat getDateFormat() { *

Setter for the field dateFormat.

* * @param dateFormat a {@link java.text.DateFormat} object - * @return a {@link ApiClient} object + * @return a {@link org.openapitools.client.ApiClient} object */ public ApiClient setDateFormat(DateFormat dateFormat) { - this.json.setDateFormat(dateFormat); + JSON.setDateFormat(dateFormat); return this; } @@ -361,10 +403,10 @@ public ApiClient setDateFormat(DateFormat dateFormat) { *

Set SqlDateFormat.

* * @param dateFormat a {@link java.text.DateFormat} object - * @return a {@link ApiClient} object + * @return a {@link org.openapitools.client.ApiClient} object */ public ApiClient setSqlDateFormat(DateFormat dateFormat) { - this.json.setSqlDateFormat(dateFormat); + JSON.setSqlDateFormat(dateFormat); return this; } @@ -372,10 +414,10 @@ public ApiClient setSqlDateFormat(DateFormat dateFormat) { *

Set OffsetDateTimeFormat.

* * @param dateFormat a {@link java.time.format.DateTimeFormatter} object - * @return a {@link ApiClient} object + * @return a {@link org.openapitools.client.ApiClient} object */ public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { - this.json.setOffsetDateTimeFormat(dateFormat); + JSON.setOffsetDateTimeFormat(dateFormat); return this; } @@ -383,10 +425,10 @@ public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { *

Set LocalDateFormat.

* * @param dateFormat a {@link java.time.format.DateTimeFormatter} object - * @return a {@link ApiClient} object + * @return a {@link org.openapitools.client.ApiClient} object */ public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { - this.json.setLocalDateFormat(dateFormat); + JSON.setLocalDateFormat(dateFormat); return this; } @@ -394,10 +436,10 @@ public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { *

Set LenientOnJson.

* * @param lenientOnJson a boolean - * @return a {@link ApiClient} object + * @return a {@link org.openapitools.client.ApiClient} object */ public ApiClient setLenientOnJson(boolean lenientOnJson) { - this.json.setLenientOnJson(lenientOnJson); + JSON.setLenientOnJson(lenientOnJson); return this; } @@ -496,6 +538,31 @@ 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!"); + } + + /** + * Helper method to set credentials for AWSV4 Signature + * + * @param accessKey Access Key + * @param secretKey Secret Key + * @param sessionToken Session Token + * @param region Region + * @param service Service to access to + */ + public void setAWS4Configuration(String accessKey, String secretKey, String sessionToken, 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). * @@ -678,7 +745,7 @@ public String parameterToString(Object param) { 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); + String jsonStr = JSON.serialize(param); return jsonStr.substring(1, jsonStr.length() - 1); } else if (param instanceof Collection) { StringBuilder b = new StringBuilder(); @@ -686,7 +753,7 @@ public String parameterToString(Object param) { if (b.length() > 0) { b.append(","); } - b.append(String.valueOf(o)); + b.append(o); } return b.toString(); } else { @@ -765,6 +832,31 @@ public List parameterToPairs(String collectionFormat, String name, Collect return params; } + /** + * Formats the specified free-form query parameters to a list of {@code Pair} objects. + * + * @param value The free-form query parameters. + * @return A list of {@code Pair} objects. + */ + public List freeFormParameterToPairs(Object value) { + List params = new ArrayList<>(); + + // preconditions + if (value == null || !(value instanceof Map )) { + return params; + } + + @SuppressWarnings("unchecked") + final Map valuesMap = (Map) value; + + for (Map.Entry entry : valuesMap.entrySet()) { + params.add(new Pair(entry.getKey(), parameterToString(entry.getValue()))); + } + + return params; + } + + /** * Formats the specified collection path parameter to a string value. * @@ -896,7 +988,7 @@ public String escapeString(String str) { * @param response HTTP response * @param returnType The type of the Java object * @return The deserialized Java object - * @throws ApiException If fail to deserialize response body, i.e. cannot read response body + * @throws org.openapitools.client.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") @@ -937,7 +1029,7 @@ public T deserialize(Response response, Type returnType) throws ApiException contentType = "application/json"; } if (isJsonMime(contentType)) { - return json.deserialize(respBody, returnType); + return JSON.deserialize(respBody, returnType); } else if (returnType.equals(String.class)) { // Expecting string, return the raw response body. return (T) respBody; @@ -957,7 +1049,7 @@ public T deserialize(Response response, Type returnType) throws ApiException * @param obj The Java object * @param contentType The request Content-Type * @return The serialized request body - * @throws ApiException If fail to serialize the given object + * @throws org.openapitools.client.ApiException If fail to serialize the given object */ public RequestBody serialize(Object obj, String contentType) throws ApiException { if (obj instanceof byte[]) { @@ -971,13 +1063,13 @@ public RequestBody serialize(Object obj, String contentType) throws ApiException } else if (isJsonMime(contentType)) { String content; if (obj != null) { - content = json.serialize(obj); + content = JSON.serialize(obj); } else { content = null; } return RequestBody.create(content, MediaType.parse(contentType)); } else if (obj instanceof String) { - return RequestBody.create(MediaType.parse(contentType), (String) obj); + return RequestBody.create((String) obj, MediaType.parse(contentType)); } else { throw new ApiException("Content type \"" + contentType + "\" is not supported"); } @@ -987,7 +1079,7 @@ public RequestBody serialize(Object obj, String contentType) throws ApiException * Download file from the given response. * * @param response An instance of the Response object - * @throws ApiException If fail to read file content from response and write to disk + * @throws org.openapitools.client.ApiException If fail to read file content from response and write to disk * @return Downloaded file */ public File downloadFileFromResponse(Response response) throws ApiException { @@ -1051,7 +1143,7 @@ public File prepareDownloadFile(Response response) throws IOException { * @param Type * @param call An instance of the Call object * @return ApiResponse<T> - * @throws ApiException If fail to execute the call + * @throws org.openapitools.client.ApiException If fail to execute the call */ public ApiResponse execute(Call call) throws ApiException { return execute(call, null); @@ -1066,7 +1158,7 @@ public ApiResponse execute(Call call) throws ApiException { * @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 ApiException If fail to execute the call + * @throws org.openapitools.client.ApiException If fail to execute the call */ public ApiResponse execute(Call call, Type returnType) throws ApiException { try { @@ -1130,7 +1222,7 @@ public void onResponse(Call call, Response response) throws IOException { * @param response Response * @param returnType Return type * @return Type - * @throws ApiException If the response has an unsuccessful status code or + * @throws org.openapitools.client.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 { @@ -1177,7 +1269,7 @@ public T handleResponse(Response response, Type returnType) throws ApiExcept * @param authNames The authentications to apply * @param callback Callback for upload/download progress * @return The HTTP call - * @throws ApiException If fail to serialize the request body object + * @throws org.openapitools.client.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); @@ -1200,24 +1292,23 @@ public Call buildCall(String baseUrl, String path, String method, List que * @param authNames The authentications to apply * @param callback Callback for upload/download progress * @return The HTTP request - * @throws ApiException If fail to serialize the request body object + * @throws org.openapitools.client.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(contentType)) { + } else if ("application/x-www-form-urlencoded".equals(contentTypePure)) { reqBody = buildRequestBodyFormEncoding(formParams); - } else if ("multipart/form-data".equals(contentType)) { + } else if ("multipart/form-data".equals(contentTypePure)) { reqBody = buildRequestBodyMultipart(formParams); } else if (body == null) { if ("DELETE".equals(method)) { @@ -1231,10 +1322,12 @@ public Request buildRequest(String baseUrl, String path, String method, List updatedQueryParams = new ArrayList<>(queryParams); + // update parameters with authentication settings - updateParamsForAuth(authNames, allQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url)); + updateParamsForAuth(authNames, updatedQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url)); - final Request.Builder reqBuilder = new Request.Builder().url(url); + final Request.Builder reqBuilder = new Request.Builder().url(buildUrl(baseUrl, path, updatedQueryParams, collectionQueryParams)); processHeaderParams(headerParams, reqBuilder); processCookieParams(cookieParams, reqBuilder); @@ -1268,7 +1361,18 @@ public String buildUrl(String baseUrl, String path, List queryParams, List if (baseUrl != null) { url.append(baseUrl).append(path); } else { - url.append(basePath).append(path); + 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()) { @@ -1352,7 +1456,7 @@ public void processCookieParams(Map cookieParams, Request.Builde * @param payload HTTP request body * @param method HTTP method * @param uri URI - * @throws ApiException If fails to update the parameters + * @throws org.openapitools.client.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 { @@ -1450,7 +1554,7 @@ private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String k } else { String content; if (obj != null) { - content = json.serialize(obj); + content = JSON.serialize(obj); } else { content = null; } @@ -1528,7 +1632,7 @@ public boolean verify(String hostname, SSLSession session) { KeyStore caKeyStore = newEmptyKeyStore(password); int index = 0; for (Certificate certificate : certificates) { - String certificateAlias = "ca" + Integer.toString(index++); + String certificateAlias = "ca" + (index++); caKeyStore.setCertificateEntry(certificateAlias, certificate); } trustManagerFactory.init(caKeyStore); @@ -1563,7 +1667,7 @@ private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityExcepti * * @param requestBody The HTTP request object * @return The string representation of the HTTP request body - * @throws ApiException If fail to serialize the request body object into a string + * @throws org.openapitools.client.ApiException If fail to serialize the request body object into a string */ private String requestBodyToString(RequestBody requestBody) throws ApiException { if (requestBody != null) { diff --git a/src/main/java/io/tiledb/cloud/rest_api/ApiException.java b/src/main/java/io/tiledb/cloud/rest_api/ApiException.java index c43e9e4..382b64a 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/ApiException.java +++ b/src/main/java/io/tiledb/cloud/rest_api/ApiException.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,23 +11,24 @@ */ -package io.tiledb.cloud.rest_api; +package org.openapitools.client; import java.util.Map; import java.util.List; -import javax.ws.rs.core.GenericType; /** *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ApiException extends Exception { + private static final long serialVersionUID = 1L; + private int code = 0; private Map> responseHeaders = null; private String responseBody = null; - + /** *

Constructor for ApiException.

*/ @@ -99,7 +100,7 @@ public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) { - this((String) null, (Throwable) null, code, responseHeaders, responseBody); + this("Response Code: " + code + " Response Body: " + responseBody, (Throwable) null, code, responseHeaders, responseBody); } /** diff --git a/src/main/java/io/tiledb/cloud/rest_api/ApiResponse.java b/src/main/java/io/tiledb/cloud/rest_api/ApiResponse.java index 838d1f3..8180f0d 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/ApiResponse.java +++ b/src/main/java/io/tiledb/cloud/rest_api/ApiResponse.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package io.tiledb.cloud.rest_api; +package org.openapitools.client; import java.util.List; import java.util.Map; diff --git a/src/main/java/io/tiledb/cloud/rest_api/Configuration.java b/src/main/java/io/tiledb/cloud/rest_api/Configuration.java index fd82662..de2f895 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/Configuration.java +++ b/src/main/java/io/tiledb/cloud/rest_api/Configuration.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,12 @@ */ -package io.tiledb.cloud.rest_api; +package org.openapitools.client; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class Configuration { + public static final String VERSION = "2.17.51"; + private static ApiClient defaultApiClient = new ApiClient(); /** diff --git a/src/main/java/io/tiledb/cloud/rest_api/GzipRequestInterceptor.java b/src/main/java/io/tiledb/cloud/rest_api/GzipRequestInterceptor.java index e915866..d65b706 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/GzipRequestInterceptor.java +++ b/src/main/java/io/tiledb/cloud/rest_api/GzipRequestInterceptor.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package io.tiledb.cloud.rest_api; +package org.openapitools.client; import okhttp3.*; import okio.Buffer; diff --git a/src/main/java/io/tiledb/cloud/rest_api/JSON.java b/src/main/java/io/tiledb/cloud/rest_api/JSON.java index a18f608..858d9c8 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/JSON.java +++ b/src/main/java/io/tiledb/cloud/rest_api/JSON.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package io.tiledb.cloud.rest_api; +package org.openapitools.client; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -22,144 +22,8 @@ import com.google.gson.stream.JsonWriter; import com.google.gson.JsonElement; import io.gsonfire.GsonFireBuilder; +import io.gsonfire.TypeSelector; -import io.tiledb.cloud.rest_api.model.AWSAccessCredentials; -import io.tiledb.cloud.rest_api.model.Array; -import io.tiledb.cloud.rest_api.model.ArrayActivityLog; -import io.tiledb.cloud.rest_api.model.ArrayBrowserData; -import io.tiledb.cloud.rest_api.model.ArrayBrowserSidebar; -import io.tiledb.cloud.rest_api.model.ArrayConsolidationRequest; -import io.tiledb.cloud.rest_api.model.ArrayEndTimestampData; -import io.tiledb.cloud.rest_api.model.ArrayFavorite; -import io.tiledb.cloud.rest_api.model.ArrayFavoritesData; -import io.tiledb.cloud.rest_api.model.ArrayInfo; -import io.tiledb.cloud.rest_api.model.ArrayInfoUpdate; -import io.tiledb.cloud.rest_api.model.ArrayMetadata; -import io.tiledb.cloud.rest_api.model.ArrayMetadataEntry; -import io.tiledb.cloud.rest_api.model.ArraySample; -import io.tiledb.cloud.rest_api.model.ArraySchema; -import io.tiledb.cloud.rest_api.model.ArraySharing; -import io.tiledb.cloud.rest_api.model.ArrayTask; -import io.tiledb.cloud.rest_api.model.ArrayTaskBrowserSidebar; -import io.tiledb.cloud.rest_api.model.ArrayTaskData; -import io.tiledb.cloud.rest_api.model.ArrayTaskLog; -import io.tiledb.cloud.rest_api.model.ArrayVacuumRequest; -import io.tiledb.cloud.rest_api.model.AssetLocations; -import io.tiledb.cloud.rest_api.model.Attribute; -import io.tiledb.cloud.rest_api.model.AttributeBufferHeader; -import io.tiledb.cloud.rest_api.model.AttributeBufferSize; -import io.tiledb.cloud.rest_api.model.Backoff; -import io.tiledb.cloud.rest_api.model.Dimension; -import io.tiledb.cloud.rest_api.model.DimensionCoordinate; -import io.tiledb.cloud.rest_api.model.DimensionTileExtent; -import io.tiledb.cloud.rest_api.model.Domain; -import io.tiledb.cloud.rest_api.model.DomainArray; -import io.tiledb.cloud.rest_api.model.DomainCheckResult; -import io.tiledb.cloud.rest_api.model.FileCreate; -import io.tiledb.cloud.rest_api.model.FileCreated; -import io.tiledb.cloud.rest_api.model.FileExport; -import io.tiledb.cloud.rest_api.model.FileExported; -import io.tiledb.cloud.rest_api.model.FileUploaded; -import io.tiledb.cloud.rest_api.model.Filter; -import io.tiledb.cloud.rest_api.model.FilterData; -import io.tiledb.cloud.rest_api.model.FilterPipeline; -import io.tiledb.cloud.rest_api.model.FragmentInfo; -import io.tiledb.cloud.rest_api.model.FragmentInfoRequest; -import io.tiledb.cloud.rest_api.model.FragmentMetadata; -import io.tiledb.cloud.rest_api.model.GenericUDF; -import io.tiledb.cloud.rest_api.model.GetTiledbStats200Response; -import io.tiledb.cloud.rest_api.model.GroupActivity; -import io.tiledb.cloud.rest_api.model.GroupActivityAsset; -import io.tiledb.cloud.rest_api.model.GroupActivityResponse; -import io.tiledb.cloud.rest_api.model.GroupBrowserData; -import io.tiledb.cloud.rest_api.model.GroupBrowserFilterData; -import io.tiledb.cloud.rest_api.model.GroupChanges; -import io.tiledb.cloud.rest_api.model.GroupContents; -import io.tiledb.cloud.rest_api.model.GroupContentsFilterData; -import io.tiledb.cloud.rest_api.model.GroupCreate; -import io.tiledb.cloud.rest_api.model.GroupEntry; -import io.tiledb.cloud.rest_api.model.GroupInfo; -import io.tiledb.cloud.rest_api.model.GroupMember; -import io.tiledb.cloud.rest_api.model.GroupRegister; -import io.tiledb.cloud.rest_api.model.GroupSharing; -import io.tiledb.cloud.rest_api.model.GroupSharingRequest; -import io.tiledb.cloud.rest_api.model.GroupUpdate; -import io.tiledb.cloud.rest_api.model.Invitation; -import io.tiledb.cloud.rest_api.model.InvitationArrayShareEmail; -import io.tiledb.cloud.rest_api.model.InvitationData; -import io.tiledb.cloud.rest_api.model.InvitationFailedRecipients; -import io.tiledb.cloud.rest_api.model.InvitationGroupShareEmail; -import io.tiledb.cloud.rest_api.model.InvitationOrganizationJoinEmail; -import io.tiledb.cloud.rest_api.model.LastAccessedArray; -import io.tiledb.cloud.rest_api.model.MLModelFavorite; -import io.tiledb.cloud.rest_api.model.MLModelFavoritesData; -import io.tiledb.cloud.rest_api.model.MaxBufferSizes; -import io.tiledb.cloud.rest_api.model.MultiArrayUDF; -import io.tiledb.cloud.rest_api.model.NonEmptyDomain; -import io.tiledb.cloud.rest_api.model.NotebookCopied; -import io.tiledb.cloud.rest_api.model.NotebookCopy; -import io.tiledb.cloud.rest_api.model.NotebookFavorite; -import io.tiledb.cloud.rest_api.model.NotebookFavoritesData; -import io.tiledb.cloud.rest_api.model.NotebookStatus; -import io.tiledb.cloud.rest_api.model.Organization; -import io.tiledb.cloud.rest_api.model.OrganizationUser; -import io.tiledb.cloud.rest_api.model.PaginationMetadata; -import io.tiledb.cloud.rest_api.model.Pricing; -import io.tiledb.cloud.rest_api.model.Query; -import io.tiledb.cloud.rest_api.model.QueryJson; -import io.tiledb.cloud.rest_api.model.QueryRanges; -import io.tiledb.cloud.rest_api.model.QueryReader; -import io.tiledb.cloud.rest_api.model.ReadState; -import io.tiledb.cloud.rest_api.model.RegisteredTaskGraph; -import io.tiledb.cloud.rest_api.model.ResetUserPasswordRequest; -import io.tiledb.cloud.rest_api.model.RetryStrategy; -import io.tiledb.cloud.rest_api.model.SQLParameters; -import io.tiledb.cloud.rest_api.model.SSODomainConfig; -import io.tiledb.cloud.rest_api.model.SSODomainConfigResponse; -import io.tiledb.cloud.rest_api.model.SSODomainSetup; -import io.tiledb.cloud.rest_api.model.SingleFragmentInfo; -import io.tiledb.cloud.rest_api.model.StorageLocation; -import io.tiledb.cloud.rest_api.model.Subarray; -import io.tiledb.cloud.rest_api.model.SubarrayPartitioner; -import io.tiledb.cloud.rest_api.model.SubarrayPartitionerCurrent; -import io.tiledb.cloud.rest_api.model.SubarrayPartitionerState; -import io.tiledb.cloud.rest_api.model.SubarrayRanges; -import io.tiledb.cloud.rest_api.model.Subscription; -import io.tiledb.cloud.rest_api.model.TGArrayNodeData; -import io.tiledb.cloud.rest_api.model.TGInputNodeData; -import io.tiledb.cloud.rest_api.model.TGQueryRanges; -import io.tiledb.cloud.rest_api.model.TGSQLNodeData; -import io.tiledb.cloud.rest_api.model.TGUDFArgument; -import io.tiledb.cloud.rest_api.model.TGUDFEnvironment; -import io.tiledb.cloud.rest_api.model.TGUDFEnvironmentResources; -import io.tiledb.cloud.rest_api.model.TGUDFNodeData; -import io.tiledb.cloud.rest_api.model.TaskGraph; -import io.tiledb.cloud.rest_api.model.TaskGraphClientNodeStatus; -import io.tiledb.cloud.rest_api.model.TaskGraphLog; -import io.tiledb.cloud.rest_api.model.TaskGraphLogsData; -import io.tiledb.cloud.rest_api.model.TaskGraphNode; -import io.tiledb.cloud.rest_api.model.TaskGraphNodeMetadata; -import io.tiledb.cloud.rest_api.model.TaskGraphSharing; -import io.tiledb.cloud.rest_api.model.TaskGraphs; -import io.tiledb.cloud.rest_api.model.TileDBConfig; -import io.tiledb.cloud.rest_api.model.TileDBConfigEntriesInner; -import io.tiledb.cloud.rest_api.model.Token; -import io.tiledb.cloud.rest_api.model.TokenRequest; -import io.tiledb.cloud.rest_api.model.UDFArrayDetails; -import io.tiledb.cloud.rest_api.model.UDFCopied; -import io.tiledb.cloud.rest_api.model.UDFCopy; -import io.tiledb.cloud.rest_api.model.UDFFavorite; -import io.tiledb.cloud.rest_api.model.UDFFavoritesData; -import io.tiledb.cloud.rest_api.model.UDFImage; -import io.tiledb.cloud.rest_api.model.UDFImageVersion; -import io.tiledb.cloud.rest_api.model.UDFInfo; -import io.tiledb.cloud.rest_api.model.UDFInfoUpdate; -import io.tiledb.cloud.rest_api.model.UDFSharing; -import io.tiledb.cloud.rest_api.model.UDFSubarray; -import io.tiledb.cloud.rest_api.model.UDFSubarrayRange; -import io.tiledb.cloud.rest_api.model.User; -import io.tiledb.cloud.rest_api.model.Writer; -import io.tiledb.cloud.rest_api.model.Error; import okio.ByteString; import java.io.IOException; @@ -172,7 +36,9 @@ 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 @@ -220,150 +86,162 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri return clazz; } - { + static { 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 AWSAccessCredentials.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new Array.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ArrayActivityLog.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ArrayBrowserData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ArrayBrowserSidebar.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ArrayConsolidationRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ArrayEndTimestampData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ArrayFavorite.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ArrayFavoritesData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ArrayInfo.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ArrayInfoUpdate.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ArrayMetadata.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ArrayMetadataEntry.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ArraySample.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ArraySchema.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ArraySharing.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ArrayTask.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ArrayTaskBrowserSidebar.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ArrayTaskData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ArrayTaskLog.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ArrayVacuumRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new AssetLocations.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new Attribute.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new AttributeBufferHeader.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new AttributeBufferSize.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new Backoff.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new Dimension.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new DimensionCoordinate.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new DimensionTileExtent.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new Domain.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new DomainArray.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new DomainCheckResult.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new Error.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new FileCreate.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new FileCreated.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new FileExport.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new FileExported.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new FileUploaded.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new Filter.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new FilterData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new FilterPipeline.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new FragmentInfo.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new FragmentInfoRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new FragmentMetadata.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new GenericUDF.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new GetTiledbStats200Response.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new GroupActivity.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new GroupActivityAsset.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new GroupActivityResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new GroupBrowserData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new GroupBrowserFilterData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new GroupChanges.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new GroupContents.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new GroupContentsFilterData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new GroupCreate.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new GroupEntry.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new GroupInfo.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new GroupMember.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new GroupRegister.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new GroupSharing.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new GroupSharingRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new GroupUpdate.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new Invitation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new InvitationArrayShareEmail.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new InvitationData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new InvitationFailedRecipients.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new InvitationGroupShareEmail.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new InvitationOrganizationJoinEmail.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new LastAccessedArray.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new MLModelFavorite.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new MLModelFavoritesData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new MaxBufferSizes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new MultiArrayUDF.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new NonEmptyDomain.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new NotebookCopied.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new NotebookCopy.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new NotebookFavorite.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new NotebookFavoritesData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new NotebookStatus.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new Organization.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new OrganizationUser.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new PaginationMetadata.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new Pricing.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new Query.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new QueryJson.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new QueryRanges.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new QueryReader.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ReadState.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new RegisteredTaskGraph.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ResetUserPasswordRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new RetryStrategy.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new SQLParameters.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new SSODomainConfig.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new SSODomainConfigResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new SSODomainSetup.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new SingleFragmentInfo.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new StorageLocation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new Subarray.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new SubarrayPartitioner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new SubarrayPartitionerCurrent.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new SubarrayPartitionerState.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new SubarrayRanges.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new Subscription.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new TGArrayNodeData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new TGInputNodeData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new TGQueryRanges.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new TGSQLNodeData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new TGUDFArgument.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new TGUDFEnvironment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new TGUDFEnvironmentResources.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new TGUDFNodeData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new TaskGraph.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new TaskGraphClientNodeStatus.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new TaskGraphLog.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new TaskGraphLogsData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new TaskGraphNode.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new TaskGraphNodeMetadata.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new TaskGraphSharing.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new TaskGraphs.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new TileDBConfig.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new TileDBConfigEntriesInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new Token.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new TokenRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new UDFArrayDetails.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new UDFCopied.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new UDFCopy.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new UDFFavorite.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new UDFFavoritesData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new UDFImage.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new UDFImageVersion.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new UDFInfo.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new UDFInfoUpdate.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new UDFSharing.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new UDFSubarray.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new UDFSubarrayRange.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new User.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new Writer.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AWSAccessCredentials.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Array.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArrayActivityLog.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArrayBrowserData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArrayBrowserSidebar.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArrayConsolidationRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArrayEndTimestampData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArrayFavorite.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArrayFavoritesData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArrayInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArrayInfoUpdate.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArrayMetadata.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArrayMetadataEntry.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArraySample.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArraySchema.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArraySharing.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArrayTask.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArrayTaskBrowserSidebar.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArrayTaskData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArrayTaskLog.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArrayVacuumRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AssetInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AssetListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AssetLocations.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Attribute.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AttributeBufferHeader.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AttributeBufferSize.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Backoff.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ChangeAssetCredentialsRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Dimension.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DimensionCoordinate.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DimensionTileExtent.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Domain.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DomainArray.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DomainCheckResult.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Enumeration.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Error.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.FileCreate.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.FileCreated.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.FileExport.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.FileExported.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.FileUploaded.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Filter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.FilterData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.FilterPipeline.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.FragmentInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.FragmentInfoRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.FragmentMetadata.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.GenericUDF.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.GetTiledbStats200Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.GroupBrowserData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.GroupBrowserFilterData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.GroupChanges.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.GroupContentActivity.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.GroupContentActivityAsset.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.GroupContentActivityResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.GroupContents.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.GroupContentsFilterData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.GroupCreate.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.GroupEntry.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.GroupInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.GroupMember.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.GroupRegister.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.GroupSharing.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.GroupSharingRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.GroupUpdate.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Invitation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.InvitationArrayShareEmail.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.InvitationData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.InvitationFailedRecipients.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.InvitationGroupShareEmail.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.InvitationOrganizationJoinEmail.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.LastAccessedArray.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.LoadArraySchemaRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.LoadArraySchemaResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.LoadEnumerationsRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.LoadEnumerationsResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.MLModelFavorite.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.MLModelFavoritesData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.MaxBufferSizes.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.MetadataStringified.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.MetadataStringifiedEntry.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.MultiArrayUDF.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.NonEmptyDomain.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.NotebookCopied.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.NotebookCopy.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.NotebookFavorite.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.NotebookFavoritesData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.NotebookStatus.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Organization.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OrganizationUpdate.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OrganizationUser.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PaginationMetadata.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Pricing.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Query.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.QueryJson.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.QueryRanges.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.QueryReader.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReadState.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RegisteredTaskGraph.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ResetUserPasswordRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RetryStrategy.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SQLParameters.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SSODomainConfig.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SSODomainConfigResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SSODomainSetup.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SharePaymentRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SingleFragmentInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.StorageLocation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Subarray.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SubarrayPartitioner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SubarrayPartitionerCurrent.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SubarrayPartitionerState.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SubarrayRanges.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Subscription.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TGArrayNodeData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TGInputNodeData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TGQueryRanges.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TGSQLNodeData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TGUDFArgument.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TGUDFEnvironment.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TGUDFEnvironmentResources.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TGUDFNodeData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TaskGraph.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TaskGraphClientNodeStatus.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TaskGraphLog.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TaskGraphLogsData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TaskGraphNode.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TaskGraphNodeMetadata.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TaskGraphSharing.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TaskGraphs.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TileDBConfig.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TileDBConfigEntriesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Token.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TokenRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UDFArrayDetails.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UDFCopied.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UDFCopy.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UDFFavorite.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UDFFavoritesData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UDFImage.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UDFImageVersion.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UDFInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UDFInfoUpdate.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UDFSharing.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UDFSubarray.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UDFSubarrayRange.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.User.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Writer.CustomTypeAdapterFactory()); gson = gsonBuilder.create(); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/Pair.java b/src/main/java/io/tiledb/cloud/rest_api/Pair.java index b71d75a..36b06c1 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/Pair.java +++ b/src/main/java/io/tiledb/cloud/rest_api/Pair.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,9 +11,9 @@ */ -package io.tiledb.cloud.rest_api; +package org.openapitools.client; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class Pair { private String name = ""; private String value = ""; diff --git a/src/main/java/io/tiledb/cloud/rest_api/ProgressRequestBody.java b/src/main/java/io/tiledb/cloud/rest_api/ProgressRequestBody.java index 5671512..c276720 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/ProgressRequestBody.java +++ b/src/main/java/io/tiledb/cloud/rest_api/ProgressRequestBody.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package io.tiledb.cloud.rest_api; +package org.openapitools.client; import okhttp3.MediaType; import okhttp3.RequestBody; diff --git a/src/main/java/io/tiledb/cloud/rest_api/ProgressResponseBody.java b/src/main/java/io/tiledb/cloud/rest_api/ProgressResponseBody.java index d47e955..cddb389 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/ProgressResponseBody.java +++ b/src/main/java/io/tiledb/cloud/rest_api/ProgressResponseBody.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package io.tiledb.cloud.rest_api; +package org.openapitools.client; import okhttp3.MediaType; import okhttp3.ResponseBody; diff --git a/src/main/java/io/tiledb/cloud/rest_api/ServerConfiguration.java b/src/main/java/io/tiledb/cloud/rest_api/ServerConfiguration.java index 199f405..45300f1 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/ServerConfiguration.java +++ b/src/main/java/io/tiledb/cloud/rest_api/ServerConfiguration.java @@ -1,10 +1,24 @@ -package io.tiledb.cloud.rest_api; +/* + * TileDB Storage Platform API + * TileDB Storage Platform REST API + * + * The version of the OpenAPI document: 2.17.51 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client; import java.util.Map; /** * Representing a Server configuration. */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ServerConfiguration { public String URL; public String description; @@ -42,7 +56,7 @@ public String URL(Map variables) { throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } - url = url.replaceAll("\\{" + name + "\\}", value); + url = url.replace("{" + name + "}", value); } return url; } diff --git a/src/main/java/io/tiledb/cloud/rest_api/ServerVariable.java b/src/main/java/io/tiledb/cloud/rest_api/ServerVariable.java index 3a082af..3c71e97 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/ServerVariable.java +++ b/src/main/java/io/tiledb/cloud/rest_api/ServerVariable.java @@ -1,10 +1,24 @@ -package io.tiledb.cloud.rest_api; +/* + * TileDB Storage Platform API + * TileDB Storage Platform REST API + * + * The version of the OpenAPI document: 2.17.51 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client; import java.util.HashSet; /** * Representing a Server Variable for server URL template substitution. */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ServerVariable { public String description; public String defaultValue; diff --git a/src/main/java/io/tiledb/cloud/rest_api/StringUtil.java b/src/main/java/io/tiledb/cloud/rest_api/StringUtil.java index 6c5731f..75cb3a1 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/StringUtil.java +++ b/src/main/java/io/tiledb/cloud/rest_api/StringUtil.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package io.tiledb.cloud.rest_api; +package org.openapitools.client; import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/io/tiledb/cloud/rest_api/api/ArrayApi.java b/src/main/java/io/tiledb/cloud/rest_api/api/ArrayApi.java index 9b366c6..8e69bec 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/api/ArrayApi.java +++ b/src/main/java/io/tiledb/cloud/rest_api/api/ArrayApi.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,37 +11,45 @@ */ -package io.tiledb.cloud.rest_api.api; +package org.openapitools.client.api; -import io.tiledb.cloud.rest_api.ApiCallback; -import io.tiledb.cloud.rest_api.model.ArrayActivityLog; -import io.tiledb.cloud.rest_api.model.ArrayEndTimestampData; -import io.tiledb.cloud.rest_api.model.FragmentInfo; -import io.tiledb.cloud.rest_api.model.FragmentInfoRequest; -import io.tiledb.cloud.rest_api.model.LastAccessedArray; -import io.tiledb.cloud.rest_api.ApiClient; -import io.tiledb.cloud.rest_api.ApiException; -import io.tiledb.cloud.rest_api.ApiResponse; -import io.tiledb.cloud.rest_api.Configuration; -import io.tiledb.cloud.rest_api.Pair; +import org.openapitools.client.ApiCallback; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.Pair; +import org.openapitools.client.ProgressRequestBody; +import org.openapitools.client.ProgressResponseBody; import com.google.gson.reflect.TypeToken; - -import io.tiledb.cloud.rest_api.model.ArrayBrowserData; -import io.tiledb.cloud.rest_api.model.ArrayBrowserSidebar; -import io.tiledb.cloud.rest_api.model.ArrayConsolidationRequest; -import io.tiledb.cloud.rest_api.model.ArrayInfo; -import io.tiledb.cloud.rest_api.model.ArrayInfoUpdate; -import io.tiledb.cloud.rest_api.model.ArrayMetadata; -import io.tiledb.cloud.rest_api.model.ArraySample; -import io.tiledb.cloud.rest_api.model.ArraySchema; -import io.tiledb.cloud.rest_api.model.ArraySharing; -import io.tiledb.cloud.rest_api.model.ArrayVacuumRequest; +import java.io.IOException; + + +import org.openapitools.client.model.ArrayActivityLog; +import org.openapitools.client.model.ArrayBrowserData; +import org.openapitools.client.model.ArrayBrowserSidebar; +import org.openapitools.client.model.ArrayConsolidationRequest; +import org.openapitools.client.model.ArrayEndTimestampData; +import org.openapitools.client.model.ArrayInfo; +import org.openapitools.client.model.ArrayInfoUpdate; +import org.openapitools.client.model.ArrayMetadata; +import org.openapitools.client.model.ArraySample; +import org.openapitools.client.model.ArraySchema; +import org.openapitools.client.model.ArraySharing; +import org.openapitools.client.model.ArrayVacuumRequest; import java.math.BigDecimal; - -import io.tiledb.cloud.rest_api.model.MaxBufferSizes; -import io.tiledb.cloud.rest_api.model.NonEmptyDomain; +import org.openapitools.client.model.Error; +import org.openapitools.client.model.FragmentInfo; +import org.openapitools.client.model.FragmentInfoRequest; +import org.openapitools.client.model.LastAccessedArray; +import org.openapitools.client.model.LoadArraySchemaRequest; +import org.openapitools.client.model.LoadArraySchemaResponse; +import org.openapitools.client.model.LoadEnumerationsRequest; +import org.openapitools.client.model.LoadEnumerationsResponse; +import org.openapitools.client.model.MaxBufferSizes; +import org.openapitools.client.model.NonEmptyDomain; import java.lang.reflect.Type; import java.util.ArrayList; @@ -99,7 +107,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -124,8 +133,8 @@ public okhttp3.Call arrayActivityLogCall(String namespace, String array, Integer // create path and map variables String localVarPath = "/arrays/{namespace}/{array}/activity" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -162,33 +171,29 @@ public okhttp3.Call arrayActivityLogCall(String namespace, String array, Integer } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call arrayActivityLogValidateBeforeCall(String namespace, String array, Integer start, Integer end, String eventTypes, String taskId, Boolean hasTaskId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling arrayActivityLog(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling arrayActivityLog(Async)"); } - - okhttp3.Call localVarCall = arrayActivityLogCall(namespace, array, start, end, eventTypes, taskId, hasTaskId, _callback); - return localVarCall; + return arrayActivityLogCall(namespace, array, start, end, eventTypes, taskId, hasTaskId, _callback); } @@ -205,7 +210,8 @@ private okhttp3.Call arrayActivityLogValidateBeforeCall(String namespace, String * @return List<ArrayActivityLog> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 log of array activity -
502 Bad Gateway -
+
+ @@ -230,7 +236,8 @@ public List arrayActivityLog(String namespace, String array, I * @return ApiResponse<List<ArrayActivityLog>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 log of array activity -
502 Bad Gateway -
+
+ @@ -257,7 +264,8 @@ public ApiResponse> arrayActivityLogWithHttpInfo(String n * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 log of array activity -
502 Bad Gateway -
+
+ @@ -277,25 +285,27 @@ public okhttp3.Call arrayActivityLogAsync(String namespace, String array, Intege * @param perPage pagination limit (optional) * @param search search string that will look at name, namespace or description fields (optional) * @param namespace namespace (optional) - * @param orderby sort by which field valid values include last_accessed, size, name (optional) + * @param orderby sort by which field valid values include size, name (optional) * @param permissions permissions valid values include read, read_write, write, admin (optional) * @param tag tag to search for, more than one can be included (optional) * @param excludeTag tags to exclude matching array in results, more than one can be included (optional) * @param fileType file_type to search for, more than one can be included (optional) * @param excludeFileType file_type to exclude matching array in results, more than one can be included (optional) * @param fileProperty file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included (optional) + * @param withMetadata include the metadata of the array (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 -
Response Details
Status Code Description Response Headers
200 log of array activity -
502 Bad Gateway -
+
+
Response Details
Status Code Description Response Headers
200 Array of array info that are owned directly by user or user's organizations -
502 Bad Gateway -
0 error response -
*/ - public okhttp3.Call arraysBrowserOwnedGetCall(Integer page, Integer perPage, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, List fileType, List excludeFileType, List fileProperty, final ApiCallback _callback) throws ApiException { + public okhttp3.Call arraysBrowserOwnedGetCall(Integer page, Integer perPage, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, List fileType, List excludeFileType, List fileProperty, Boolean withMetadata, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -364,6 +374,10 @@ public okhttp3.Call arraysBrowserOwnedGetCall(Integer page, Integer perPage, Str localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "file_property", fileProperty)); } + if (withMetadata != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("with_metadata", withMetadata)); + } + final String[] localVarAccepts = { "application/json" }; @@ -373,23 +387,19 @@ public okhttp3.Call arraysBrowserOwnedGetCall(Integer page, Integer perPage, Str } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call arraysBrowserOwnedGetValidateBeforeCall(Integer page, Integer perPage, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, List fileType, List excludeFileType, List fileProperty, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = arraysBrowserOwnedGetCall(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty, _callback); - return localVarCall; + private okhttp3.Call arraysBrowserOwnedGetValidateBeforeCall(Integer page, Integer perPage, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, List fileType, List excludeFileType, List fileProperty, Boolean withMetadata, final ApiCallback _callback) throws ApiException { + return arraysBrowserOwnedGetCall(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty, withMetadata, _callback); } @@ -400,25 +410,27 @@ private okhttp3.Call arraysBrowserOwnedGetValidateBeforeCall(Integer page, Integ * @param perPage pagination limit (optional) * @param search search string that will look at name, namespace or description fields (optional) * @param namespace namespace (optional) - * @param orderby sort by which field valid values include last_accessed, size, name (optional) + * @param orderby sort by which field valid values include size, name (optional) * @param permissions permissions valid values include read, read_write, write, admin (optional) * @param tag tag to search for, more than one can be included (optional) * @param excludeTag tags to exclude matching array in results, more than one can be included (optional) * @param fileType file_type to search for, more than one can be included (optional) * @param excludeFileType file_type to exclude matching array in results, more than one can be included (optional) * @param fileProperty file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included (optional) + * @param withMetadata include the metadata of the array (optional) * @return ArrayBrowserData * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 Array of array info that are owned directly by user or user's organizations -
502 Bad Gateway -
0 error response -
*/ - public ArrayBrowserData arraysBrowserOwnedGet(Integer page, Integer perPage, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, List fileType, List excludeFileType, List fileProperty) throws ApiException { - ApiResponse localVarResp = arraysBrowserOwnedGetWithHttpInfo(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty); + public ArrayBrowserData arraysBrowserOwnedGet(Integer page, Integer perPage, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, List fileType, List excludeFileType, List fileProperty, Boolean withMetadata) throws ApiException { + ApiResponse localVarResp = arraysBrowserOwnedGetWithHttpInfo(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty, withMetadata); return localVarResp.getData(); } @@ -429,25 +441,27 @@ public ArrayBrowserData arraysBrowserOwnedGet(Integer page, Integer perPage, Str * @param perPage pagination limit (optional) * @param search search string that will look at name, namespace or description fields (optional) * @param namespace namespace (optional) - * @param orderby sort by which field valid values include last_accessed, size, name (optional) + * @param orderby sort by which field valid values include size, name (optional) * @param permissions permissions valid values include read, read_write, write, admin (optional) * @param tag tag to search for, more than one can be included (optional) * @param excludeTag tags to exclude matching array in results, more than one can be included (optional) * @param fileType file_type to search for, more than one can be included (optional) * @param excludeFileType file_type to exclude matching array in results, more than one can be included (optional) * @param fileProperty file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included (optional) + * @param withMetadata include the metadata of the array (optional) * @return ApiResponse<ArrayBrowserData> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 Array of array info that are owned directly by user or user's organizations -
502 Bad Gateway -
0 error response -
*/ - public ApiResponse arraysBrowserOwnedGetWithHttpInfo(Integer page, Integer perPage, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, List fileType, List excludeFileType, List fileProperty) throws ApiException { - okhttp3.Call localVarCall = arraysBrowserOwnedGetValidateBeforeCall(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty, null); + public ApiResponse arraysBrowserOwnedGetWithHttpInfo(Integer page, Integer perPage, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, List fileType, List excludeFileType, List fileProperty, Boolean withMetadata) throws ApiException { + okhttp3.Call localVarCall = arraysBrowserOwnedGetValidateBeforeCall(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty, withMetadata, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -459,27 +473,29 @@ public ApiResponse arraysBrowserOwnedGetWithHttpInfo(Integer p * @param perPage pagination limit (optional) * @param search search string that will look at name, namespace or description fields (optional) * @param namespace namespace (optional) - * @param orderby sort by which field valid values include last_accessed, size, name (optional) + * @param orderby sort by which field valid values include size, name (optional) * @param permissions permissions valid values include read, read_write, write, admin (optional) * @param tag tag to search for, more than one can be included (optional) * @param excludeTag tags to exclude matching array in results, more than one can be included (optional) * @param fileType file_type to search for, more than one can be included (optional) * @param excludeFileType file_type to exclude matching array in results, more than one can be included (optional) * @param fileProperty file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included (optional) + * @param withMetadata include the metadata of the array (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 - +
+
Response Details
Status Code Description Response Headers
200 Array of array info that are owned directly by user or user's organizations -
502 Bad Gateway -
0 error response -
*/ - public okhttp3.Call arraysBrowserOwnedGetAsync(Integer page, Integer perPage, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, List fileType, List excludeFileType, List fileProperty, final ApiCallback _callback) throws ApiException { + public okhttp3.Call arraysBrowserOwnedGetAsync(Integer page, Integer perPage, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, List fileType, List excludeFileType, List fileProperty, Boolean withMetadata, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = arraysBrowserOwnedGetValidateBeforeCall(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty, _callback); + okhttp3.Call localVarCall = arraysBrowserOwnedGetValidateBeforeCall(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty, withMetadata, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -493,7 +509,8 @@ public okhttp3.Call arraysBrowserOwnedGetAsync(Integer page, Integer perPage, St * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -546,23 +563,19 @@ public okhttp3.Call arraysBrowserOwnedSidebarGetCall(List fileType, List } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call arraysBrowserOwnedSidebarGetValidateBeforeCall(List fileType, List excludeFileType, List fileProperty, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = arraysBrowserOwnedSidebarGetCall(fileType, excludeFileType, fileProperty, _callback); - return localVarCall; + return arraysBrowserOwnedSidebarGetCall(fileType, excludeFileType, fileProperty, _callback); } @@ -575,7 +588,8 @@ private okhttp3.Call arraysBrowserOwnedSidebarGetValidateBeforeCall(List * @return ArrayBrowserSidebar * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Array of array info that are owned directly by user or user's organizations -
502 Bad Gateway -
+
+ @@ -596,7 +610,8 @@ public ArrayBrowserSidebar arraysBrowserOwnedSidebarGet(List fileType, L * @return ApiResponse<ArrayBrowserSidebar> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Array of array info that are owned directly by user or user's organizations -
502 Bad Gateway -
+
+ @@ -619,7 +634,8 @@ public ApiResponse arraysBrowserOwnedSidebarGetWithHttpInfo * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Array of array info that are owned directly by user or user's organizations -
502 Bad Gateway -
+
+ @@ -639,25 +655,27 @@ public okhttp3.Call arraysBrowserOwnedSidebarGetAsync(List fileType, Lis * @param perPage pagination limit (optional) * @param search search string that will look at name, namespace or description fields (optional) * @param namespace namespace (optional) - * @param orderby sort by which field valid values include last_accessed, size, name (optional) + * @param orderby sort by which field valid values include size, name (optional) * @param permissions permissions valid values include read, read_write, write, admin (optional) * @param tag tag to search for, more than one can be included (optional) * @param excludeTag tags to exclude matching array in results, more than one can be included (optional) * @param fileType file_type to search for, more than one can be included (optional) * @param excludeFileType file_type to exclude matching array in results, more than one can be included (optional) * @param fileProperty file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included (optional) + * @param withMetadata include the metadata of the array (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 -
Response Details
Status Code Description Response Headers
200 Array of array info that are owned directly by user or user's organizations -
502 Bad Gateway -
+
+
Response Details
Status Code Description Response Headers
200 Array of array info that has been shared publically -
502 Bad Gateway -
0 error response -
*/ - public okhttp3.Call arraysBrowserPublicGetCall(Integer page, Integer perPage, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, List fileType, List excludeFileType, List fileProperty, final ApiCallback _callback) throws ApiException { + public okhttp3.Call arraysBrowserPublicGetCall(Integer page, Integer perPage, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, List fileType, List excludeFileType, List fileProperty, Boolean withMetadata, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -726,6 +744,10 @@ public okhttp3.Call arraysBrowserPublicGetCall(Integer page, Integer perPage, St localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "file_property", fileProperty)); } + if (withMetadata != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("with_metadata", withMetadata)); + } + final String[] localVarAccepts = { "application/json" }; @@ -735,23 +757,19 @@ public okhttp3.Call arraysBrowserPublicGetCall(Integer page, Integer perPage, St } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call arraysBrowserPublicGetValidateBeforeCall(Integer page, Integer perPage, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, List fileType, List excludeFileType, List fileProperty, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = arraysBrowserPublicGetCall(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty, _callback); - return localVarCall; + private okhttp3.Call arraysBrowserPublicGetValidateBeforeCall(Integer page, Integer perPage, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, List fileType, List excludeFileType, List fileProperty, Boolean withMetadata, final ApiCallback _callback) throws ApiException { + return arraysBrowserPublicGetCall(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty, withMetadata, _callback); } @@ -762,25 +780,27 @@ private okhttp3.Call arraysBrowserPublicGetValidateBeforeCall(Integer page, Inte * @param perPage pagination limit (optional) * @param search search string that will look at name, namespace or description fields (optional) * @param namespace namespace (optional) - * @param orderby sort by which field valid values include last_accessed, size, name (optional) + * @param orderby sort by which field valid values include size, name (optional) * @param permissions permissions valid values include read, read_write, write, admin (optional) * @param tag tag to search for, more than one can be included (optional) * @param excludeTag tags to exclude matching array in results, more than one can be included (optional) * @param fileType file_type to search for, more than one can be included (optional) * @param excludeFileType file_type to exclude matching array in results, more than one can be included (optional) * @param fileProperty file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included (optional) + * @param withMetadata include the metadata of the array (optional) * @return ArrayBrowserData * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 Array of array info that has been shared publically -
502 Bad Gateway -
0 error response -
*/ - public ArrayBrowserData arraysBrowserPublicGet(Integer page, Integer perPage, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, List fileType, List excludeFileType, List fileProperty) throws ApiException { - ApiResponse localVarResp = arraysBrowserPublicGetWithHttpInfo(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty); + public ArrayBrowserData arraysBrowserPublicGet(Integer page, Integer perPage, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, List fileType, List excludeFileType, List fileProperty, Boolean withMetadata) throws ApiException { + ApiResponse localVarResp = arraysBrowserPublicGetWithHttpInfo(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty, withMetadata); return localVarResp.getData(); } @@ -791,25 +811,27 @@ public ArrayBrowserData arraysBrowserPublicGet(Integer page, Integer perPage, St * @param perPage pagination limit (optional) * @param search search string that will look at name, namespace or description fields (optional) * @param namespace namespace (optional) - * @param orderby sort by which field valid values include last_accessed, size, name (optional) + * @param orderby sort by which field valid values include size, name (optional) * @param permissions permissions valid values include read, read_write, write, admin (optional) * @param tag tag to search for, more than one can be included (optional) * @param excludeTag tags to exclude matching array in results, more than one can be included (optional) * @param fileType file_type to search for, more than one can be included (optional) * @param excludeFileType file_type to exclude matching array in results, more than one can be included (optional) * @param fileProperty file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included (optional) + * @param withMetadata include the metadata of the array (optional) * @return ApiResponse<ArrayBrowserData> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 Array of array info that has been shared publically -
502 Bad Gateway -
0 error response -
*/ - public ApiResponse arraysBrowserPublicGetWithHttpInfo(Integer page, Integer perPage, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, List fileType, List excludeFileType, List fileProperty) throws ApiException { - okhttp3.Call localVarCall = arraysBrowserPublicGetValidateBeforeCall(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty, null); + public ApiResponse arraysBrowserPublicGetWithHttpInfo(Integer page, Integer perPage, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, List fileType, List excludeFileType, List fileProperty, Boolean withMetadata) throws ApiException { + okhttp3.Call localVarCall = arraysBrowserPublicGetValidateBeforeCall(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty, withMetadata, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -821,27 +843,29 @@ public ApiResponse arraysBrowserPublicGetWithHttpInfo(Integer * @param perPage pagination limit (optional) * @param search search string that will look at name, namespace or description fields (optional) * @param namespace namespace (optional) - * @param orderby sort by which field valid values include last_accessed, size, name (optional) + * @param orderby sort by which field valid values include size, name (optional) * @param permissions permissions valid values include read, read_write, write, admin (optional) * @param tag tag to search for, more than one can be included (optional) * @param excludeTag tags to exclude matching array in results, more than one can be included (optional) * @param fileType file_type to search for, more than one can be included (optional) * @param excludeFileType file_type to exclude matching array in results, more than one can be included (optional) * @param fileProperty file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included (optional) + * @param withMetadata include the metadata of the array (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 - +
+
Response Details
Status Code Description Response Headers
200 Array of array info that has been shared publically -
502 Bad Gateway -
0 error response -
*/ - public okhttp3.Call arraysBrowserPublicGetAsync(Integer page, Integer perPage, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, List fileType, List excludeFileType, List fileProperty, final ApiCallback _callback) throws ApiException { + public okhttp3.Call arraysBrowserPublicGetAsync(Integer page, Integer perPage, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, List fileType, List excludeFileType, List fileProperty, Boolean withMetadata, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = arraysBrowserPublicGetValidateBeforeCall(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty, _callback); + okhttp3.Call localVarCall = arraysBrowserPublicGetValidateBeforeCall(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty, withMetadata, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -855,7 +879,8 @@ public okhttp3.Call arraysBrowserPublicGetAsync(Integer page, Integer perPage, S * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -908,23 +933,19 @@ public okhttp3.Call arraysBrowserPublicSidebarGetCall(List fileType, Lis } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call arraysBrowserPublicSidebarGetValidateBeforeCall(List fileType, List excludeFileType, List fileProperty, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = arraysBrowserPublicSidebarGetCall(fileType, excludeFileType, fileProperty, _callback); - return localVarCall; + return arraysBrowserPublicSidebarGetCall(fileType, excludeFileType, fileProperty, _callback); } @@ -937,7 +958,8 @@ private okhttp3.Call arraysBrowserPublicSidebarGetValidateBeforeCall(List +
Response Details
Status Code Description Response Headers
200 Array of array info that has been shared publically -
502 Bad Gateway -
+ @@ -958,7 +980,8 @@ public ArrayBrowserSidebar arraysBrowserPublicSidebarGet(List fileType, * @return ApiResponse<ArrayBrowserSidebar> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Array of array info that has been shared publically -
502 Bad Gateway -
+
+ @@ -981,7 +1004,8 @@ public ApiResponse arraysBrowserPublicSidebarGetWithHttpInf * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Array of array info that has been shared publically -
502 Bad Gateway -
+
+ @@ -1001,7 +1025,7 @@ public okhttp3.Call arraysBrowserPublicSidebarGetAsync(List fileType, Li * @param perPage pagination limit (optional) * @param search search string that will look at name, namespace or description fields (optional) * @param namespace namespace (optional) - * @param orderby sort by which field valid values include last_accessed, size, name (optional) + * @param orderby sort by which field valid values include size, name (optional) * @param permissions permissions valid values include read, read_write, write, admin (optional) * @param tag tag to search for, more than one can be included (optional) * @param excludeTag tags to exclude matching array in results, more than one can be included (optional) @@ -1009,18 +1033,20 @@ public okhttp3.Call arraysBrowserPublicSidebarGetAsync(List fileType, Li * @param excludeFileType file_type to exclude matching array in results, more than one can be included (optional) * @param fileProperty file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included (optional) * @param sharedTo namespaces to filter results of where there arrays were shared to (optional) + * @param withMetadata include the metadata of the array (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 -
Response Details
Status Code Description Response Headers
200 Array of array info that has been shared publically -
502 Bad Gateway -
+
+
Response Details
Status Code Description Response Headers
200 Array of array info that has been shared with the user -
502 Bad Gateway -
0 error response -
*/ - public okhttp3.Call arraysBrowserSharedGetCall(Integer page, Integer perPage, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, List fileType, List excludeFileType, List fileProperty, List sharedTo, final ApiCallback _callback) throws ApiException { + public okhttp3.Call arraysBrowserSharedGetCall(Integer page, Integer perPage, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, List fileType, List excludeFileType, List fileProperty, List sharedTo, Boolean withMetadata, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1093,6 +1119,10 @@ public okhttp3.Call arraysBrowserSharedGetCall(Integer page, Integer perPage, St localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "shared_to", sharedTo)); } + if (withMetadata != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("with_metadata", withMetadata)); + } + final String[] localVarAccepts = { "application/json" }; @@ -1102,23 +1132,19 @@ public okhttp3.Call arraysBrowserSharedGetCall(Integer page, Integer perPage, St } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call arraysBrowserSharedGetValidateBeforeCall(Integer page, Integer perPage, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, List fileType, List excludeFileType, List fileProperty, List sharedTo, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = arraysBrowserSharedGetCall(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty, sharedTo, _callback); - return localVarCall; + private okhttp3.Call arraysBrowserSharedGetValidateBeforeCall(Integer page, Integer perPage, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, List fileType, List excludeFileType, List fileProperty, List sharedTo, Boolean withMetadata, final ApiCallback _callback) throws ApiException { + return arraysBrowserSharedGetCall(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty, sharedTo, withMetadata, _callback); } @@ -1129,7 +1155,7 @@ private okhttp3.Call arraysBrowserSharedGetValidateBeforeCall(Integer page, Inte * @param perPage pagination limit (optional) * @param search search string that will look at name, namespace or description fields (optional) * @param namespace namespace (optional) - * @param orderby sort by which field valid values include last_accessed, size, name (optional) + * @param orderby sort by which field valid values include size, name (optional) * @param permissions permissions valid values include read, read_write, write, admin (optional) * @param tag tag to search for, more than one can be included (optional) * @param excludeTag tags to exclude matching array in results, more than one can be included (optional) @@ -1137,18 +1163,20 @@ private okhttp3.Call arraysBrowserSharedGetValidateBeforeCall(Integer page, Inte * @param excludeFileType file_type to exclude matching array in results, more than one can be included (optional) * @param fileProperty file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included (optional) * @param sharedTo namespaces to filter results of where there arrays were shared to (optional) + * @param withMetadata include the metadata of the array (optional) * @return ArrayBrowserData * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 Array of array info that has been shared with the user -
502 Bad Gateway -
0 error response -
*/ - public ArrayBrowserData arraysBrowserSharedGet(Integer page, Integer perPage, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, List fileType, List excludeFileType, List fileProperty, List sharedTo) throws ApiException { - ApiResponse localVarResp = arraysBrowserSharedGetWithHttpInfo(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty, sharedTo); + public ArrayBrowserData arraysBrowserSharedGet(Integer page, Integer perPage, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, List fileType, List excludeFileType, List fileProperty, List sharedTo, Boolean withMetadata) throws ApiException { + ApiResponse localVarResp = arraysBrowserSharedGetWithHttpInfo(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty, sharedTo, withMetadata); return localVarResp.getData(); } @@ -1159,7 +1187,7 @@ public ArrayBrowserData arraysBrowserSharedGet(Integer page, Integer perPage, St * @param perPage pagination limit (optional) * @param search search string that will look at name, namespace or description fields (optional) * @param namespace namespace (optional) - * @param orderby sort by which field valid values include last_accessed, size, name (optional) + * @param orderby sort by which field valid values include size, name (optional) * @param permissions permissions valid values include read, read_write, write, admin (optional) * @param tag tag to search for, more than one can be included (optional) * @param excludeTag tags to exclude matching array in results, more than one can be included (optional) @@ -1167,18 +1195,20 @@ public ArrayBrowserData arraysBrowserSharedGet(Integer page, Integer perPage, St * @param excludeFileType file_type to exclude matching array in results, more than one can be included (optional) * @param fileProperty file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included (optional) * @param sharedTo namespaces to filter results of where there arrays were shared to (optional) + * @param withMetadata include the metadata of the array (optional) * @return ApiResponse<ArrayBrowserData> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 Array of array info that has been shared with the user -
502 Bad Gateway -
0 error response -
*/ - public ApiResponse arraysBrowserSharedGetWithHttpInfo(Integer page, Integer perPage, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, List fileType, List excludeFileType, List fileProperty, List sharedTo) throws ApiException { - okhttp3.Call localVarCall = arraysBrowserSharedGetValidateBeforeCall(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty, sharedTo, null); + public ApiResponse arraysBrowserSharedGetWithHttpInfo(Integer page, Integer perPage, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, List fileType, List excludeFileType, List fileProperty, List sharedTo, Boolean withMetadata) throws ApiException { + okhttp3.Call localVarCall = arraysBrowserSharedGetValidateBeforeCall(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty, sharedTo, withMetadata, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -1190,7 +1220,7 @@ public ApiResponse arraysBrowserSharedGetWithHttpInfo(Integer * @param perPage pagination limit (optional) * @param search search string that will look at name, namespace or description fields (optional) * @param namespace namespace (optional) - * @param orderby sort by which field valid values include last_accessed, size, name (optional) + * @param orderby sort by which field valid values include size, name (optional) * @param permissions permissions valid values include read, read_write, write, admin (optional) * @param tag tag to search for, more than one can be included (optional) * @param excludeTag tags to exclude matching array in results, more than one can be included (optional) @@ -1198,20 +1228,22 @@ public ApiResponse arraysBrowserSharedGetWithHttpInfo(Integer * @param excludeFileType file_type to exclude matching array in results, more than one can be included (optional) * @param fileProperty file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included (optional) * @param sharedTo namespaces to filter results of where there arrays were shared to (optional) + * @param withMetadata include the metadata of the array (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 - +
+
Response Details
Status Code Description Response Headers
200 Array of array info that has been shared with the user -
502 Bad Gateway -
0 error response -
*/ - public okhttp3.Call arraysBrowserSharedGetAsync(Integer page, Integer perPage, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, List fileType, List excludeFileType, List fileProperty, List sharedTo, final ApiCallback _callback) throws ApiException { + public okhttp3.Call arraysBrowserSharedGetAsync(Integer page, Integer perPage, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, List fileType, List excludeFileType, List fileProperty, List sharedTo, Boolean withMetadata, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = arraysBrowserSharedGetValidateBeforeCall(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty, sharedTo, _callback); + okhttp3.Call localVarCall = arraysBrowserSharedGetValidateBeforeCall(page, perPage, search, namespace, orderby, permissions, tag, excludeTag, fileType, excludeFileType, fileProperty, sharedTo, withMetadata, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -1226,7 +1258,8 @@ public okhttp3.Call arraysBrowserSharedGetAsync(Integer page, Integer perPage, S * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -1283,23 +1316,19 @@ public okhttp3.Call arraysBrowserSharedSidebarGetCall(List fileType, Lis } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call arraysBrowserSharedSidebarGetValidateBeforeCall(List fileType, List excludeFileType, List fileProperty, List sharedTo, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = arraysBrowserSharedSidebarGetCall(fileType, excludeFileType, fileProperty, sharedTo, _callback); - return localVarCall; + return arraysBrowserSharedSidebarGetCall(fileType, excludeFileType, fileProperty, sharedTo, _callback); } @@ -1313,7 +1342,8 @@ private okhttp3.Call arraysBrowserSharedSidebarGetValidateBeforeCall(List +
Response Details
Status Code Description Response Headers
200 Array of array info that has been shared with the user -
502 Bad Gateway -
+ @@ -1335,7 +1365,8 @@ public ArrayBrowserSidebar arraysBrowserSharedSidebarGet(List fileType, * @return ApiResponse<ArrayBrowserSidebar> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Array of array info that has been shared with the user -
502 Bad Gateway -
+
+ @@ -1359,7 +1390,8 @@ public ApiResponse arraysBrowserSharedSidebarGetWithHttpInf * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Array of array info that has been shared with the user -
502 Bad Gateway -
+
+ @@ -1383,7 +1415,8 @@ public okhttp3.Call arraysBrowserSharedSidebarGetAsync(List fileType, Li * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Array of array info that has been shared with the user -
502 Bad Gateway -
+
+ @@ -1408,8 +1441,8 @@ public okhttp3.Call arraysNamespaceArrayEndTimestampsGetCall(String namespace, S // create path and map variables String localVarPath = "/arrays/{namespace}/{array}/end_timestamps" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1434,33 +1467,29 @@ public okhttp3.Call arraysNamespaceArrayEndTimestampsGetCall(String namespace, S } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call arraysNamespaceArrayEndTimestampsGetValidateBeforeCall(String namespace, String array, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling arraysNamespaceArrayEndTimestampsGet(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling arraysNamespaceArrayEndTimestampsGet(Async)"); } - - okhttp3.Call localVarCall = arraysNamespaceArrayEndTimestampsGetCall(namespace, array, page, perPage, _callback); - return localVarCall; + return arraysNamespaceArrayEndTimestampsGetCall(namespace, array, page, perPage, _callback); } @@ -1474,7 +1503,8 @@ private okhttp3.Call arraysNamespaceArrayEndTimestampsGetValidateBeforeCall(Stri * @return ArrayEndTimestampData * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 list of timestamps in milliseconds, paginated -
502 Bad Gateway -
+
+ @@ -1496,7 +1526,8 @@ public ArrayEndTimestampData arraysNamespaceArrayEndTimestampsGet(String namespa * @return ApiResponse<ArrayEndTimestampData> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 list of timestamps in milliseconds, paginated -
502 Bad Gateway -
+
+ @@ -1520,7 +1551,8 @@ public ApiResponse arraysNamespaceArrayEndTimestampsGetWi * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 list of timestamps in milliseconds, paginated -
502 Bad Gateway -
+
+ @@ -1543,7 +1575,8 @@ public okhttp3.Call arraysNamespaceArrayEndTimestampsGetAsync(String namespace, * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 list of timestamps in milliseconds, paginated -
502 Bad Gateway -
+
+ @@ -1568,8 +1601,8 @@ public okhttp3.Call consolidateArrayCall(String namespace, String array, ArrayCo // create path and map variables String localVarPath = "/arrays/{namespace}/{array}/consolidate" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1593,31 +1626,28 @@ public okhttp3.Call consolidateArrayCall(String namespace, String array, ArrayCo localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call consolidateArrayValidateBeforeCall(String namespace, String array, ArrayConsolidationRequest consolidateRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling consolidateArray(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling consolidateArray(Async)"); } - + // verify the required parameter 'consolidateRequest' is set if (consolidateRequest == null) { throw new ApiException("Missing the required parameter 'consolidateRequest' when calling consolidateArray(Async)"); } - - okhttp3.Call localVarCall = consolidateArrayCall(namespace, array, consolidateRequest, _callback); - return localVarCall; + return consolidateArrayCall(namespace, array, consolidateRequest, _callback); } @@ -1629,7 +1659,8 @@ private okhttp3.Call consolidateArrayValidateBeforeCall(String namespace, String * @param consolidateRequest Consolidate Request (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 array consolidated successfully -
502 Bad Gateway -
+
+ @@ -1649,7 +1680,8 @@ public void consolidateArray(String namespace, String array, ArrayConsolidationR * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 array consolidated successfully -
502 Bad Gateway -
+
+ @@ -1671,7 +1703,8 @@ public ApiResponse consolidateArrayWithHttpInfo(String namespace, String a * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 array consolidated successfully -
502 Bad Gateway -
+
+ @@ -1695,7 +1728,8 @@ public okhttp3.Call consolidateArrayAsync(String namespace, String array, ArrayC * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 array consolidated successfully -
502 Bad Gateway -
+
+ @@ -1720,8 +1754,8 @@ public okhttp3.Call createArrayCall(String namespace, String array, String conte // create path and map variables String localVarPath = "/arrays/{namespace}/{array}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1729,14 +1763,6 @@ public okhttp3.Call createArrayCall(String namespace, String array, String conte Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (contentType != null) { - localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); - } - - if (X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME != null) { - localVarHeaderParams.put("X-TILEDB-CLOUD-ACCESS-CREDENTIALS-NAME", localVarApiClient.parameterToString(X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME)); - } - final String[] localVarAccepts = { "application/json" }; @@ -1753,36 +1779,43 @@ public okhttp3.Call createArrayCall(String namespace, String array, String conte localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + + if (X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME != null) { + localVarHeaderParams.put("X-TILEDB-CLOUD-ACCESS-CREDENTIALS-NAME", localVarApiClient.parameterToString(X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME)); + } + + + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createArrayValidateBeforeCall(String namespace, String array, String contentType, ArraySchema arraySchema, String X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling createArray(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling createArray(Async)"); } - + // verify the required parameter 'contentType' is set if (contentType == null) { throw new ApiException("Missing the required parameter 'contentType' when calling createArray(Async)"); } - + // verify the required parameter 'arraySchema' is set if (arraySchema == null) { throw new ApiException("Missing the required parameter 'arraySchema' when calling createArray(Async)"); } - - okhttp3.Call localVarCall = createArrayCall(namespace, array, contentType, arraySchema, X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME, _callback); - return localVarCall; + return createArrayCall(namespace, array, contentType, arraySchema, X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME, _callback); } @@ -1796,7 +1829,8 @@ private okhttp3.Call createArrayValidateBeforeCall(String namespace, String arra * @param X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME Optional registered access credentials to use for creation (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 schema created successfully -
502 Bad Gateway -
+
+ @@ -1818,7 +1852,8 @@ public void createArray(String namespace, String array, String contentType, Arra * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 schema created successfully -
502 Bad Gateway -
+
+ @@ -1842,7 +1877,8 @@ public ApiResponse createArrayWithHttpInfo(String namespace, String array, * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 schema created successfully -
502 Bad Gateway -
+
+ @@ -1864,7 +1900,8 @@ public okhttp3.Call createArrayAsync(String namespace, String array, String cont * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 schema created successfully -
502 Bad Gateway -
+
+ @@ -1889,8 +1926,8 @@ public okhttp3.Call deleteArrayCall(String namespace, String array, String conte // create path and map variables String localVarPath = "/arrays/{namespace}/{array}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1898,10 +1935,6 @@ public okhttp3.Call deleteArrayCall(String namespace, String array, String conte Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (contentType != null) { - localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); - } - final String[] localVarAccepts = { "application/json" }; @@ -1911,38 +1944,39 @@ public okhttp3.Call deleteArrayCall(String namespace, String array, String conte } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteArrayValidateBeforeCall(String namespace, String array, String contentType, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling deleteArray(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling deleteArray(Async)"); } - + // verify the required parameter 'contentType' is set if (contentType == null) { throw new ApiException("Missing the required parameter 'contentType' when calling deleteArray(Async)"); } - - okhttp3.Call localVarCall = deleteArrayCall(namespace, array, contentType, _callback); - return localVarCall; + return deleteArrayCall(namespace, array, contentType, _callback); } @@ -1954,7 +1988,8 @@ private okhttp3.Call deleteArrayValidateBeforeCall(String namespace, String arra * @param contentType Content Type of input and return mime (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 delete array successful -
502 Bad Gateway -
+
+ @@ -1974,7 +2009,8 @@ public void deleteArray(String namespace, String array, String contentType) thro * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 delete array successful -
502 Bad Gateway -
+
+ @@ -1996,7 +2032,8 @@ public ApiResponse deleteArrayWithHttpInfo(String namespace, String array, * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 delete array successful -
502 Bad Gateway -
+
+ @@ -2017,7 +2054,8 @@ public okhttp3.Call deleteArrayAsync(String namespace, String array, String cont * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 delete array successful -
502 Bad Gateway -
+
+ @@ -2042,8 +2080,8 @@ public okhttp3.Call deregisterArrayCall(String namespace, String array, final Ap // create path and map variables String localVarPath = "/arrays/{namespace}/{array}/deregister" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2060,33 +2098,29 @@ public okhttp3.Call deregisterArrayCall(String namespace, String array, final Ap } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deregisterArrayValidateBeforeCall(String namespace, String array, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling deregisterArray(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling deregisterArray(Async)"); } - - okhttp3.Call localVarCall = deregisterArrayCall(namespace, array, _callback); - return localVarCall; + return deregisterArrayCall(namespace, array, _callback); } @@ -2097,7 +2131,8 @@ private okhttp3.Call deregisterArrayValidateBeforeCall(String namespace, String * @param array name/uri of array that is url-encoded (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 deregistered array successful -
502 Bad Gateway -
+
+ @@ -2116,7 +2151,8 @@ public void deregisterArray(String namespace, String array) throws ApiException * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 deregistered array successful -
502 Bad Gateway -
+
+ @@ -2137,7 +2173,8 @@ public ApiResponse deregisterArrayWithHttpInfo(String namespace, String ar * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 deregistered array successful -
502 Bad Gateway -
+
+ @@ -2160,7 +2197,8 @@ public okhttp3.Call deregisterArrayAsync(String namespace, String array, final A * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 deregistered array successful -
502 Bad Gateway -
+
+ @@ -2184,8 +2222,8 @@ public okhttp3.Call fragmentInfoCall(String namespace, String array, String cont // create path and map variables String localVarPath = "/arrays/{namespace}/{array}/fragment_info" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2193,10 +2231,6 @@ public okhttp3.Call fragmentInfoCall(String namespace, String array, String cont Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (contentType != null) { - localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); - } - final String[] localVarAccepts = { "application/json" }; @@ -2213,36 +2247,38 @@ public okhttp3.Call fragmentInfoCall(String namespace, String array, String cont localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call fragmentInfoValidateBeforeCall(String namespace, String array, String contentType, FragmentInfoRequest fragmentInfoRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling fragmentInfo(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling fragmentInfo(Async)"); } - + // verify the required parameter 'contentType' is set if (contentType == null) { throw new ApiException("Missing the required parameter 'contentType' when calling fragmentInfo(Async)"); } - + // verify the required parameter 'fragmentInfoRequest' is set if (fragmentInfoRequest == null) { throw new ApiException("Missing the required parameter 'fragmentInfoRequest' when calling fragmentInfo(Async)"); } - - okhttp3.Call localVarCall = fragmentInfoCall(namespace, array, contentType, fragmentInfoRequest, _callback); - return localVarCall; + return fragmentInfoCall(namespace, array, contentType, fragmentInfoRequest, _callback); } @@ -2256,7 +2292,8 @@ private okhttp3.Call fragmentInfoValidateBeforeCall(String namespace, String arr * @return FragmentInfo * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 fragment info -
0 error response -
+
+ @@ -2277,7 +2314,8 @@ public FragmentInfo fragmentInfo(String namespace, String array, String contentT * @return ApiResponse<FragmentInfo> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 fragment info -
0 error response -
+
+ @@ -2300,7 +2338,8 @@ public ApiResponse fragmentInfoWithHttpInfo(String namespace, Stri * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 fragment info -
0 error response -
+
+ @@ -2322,7 +2361,8 @@ public okhttp3.Call fragmentInfoAsync(String namespace, String array, String con * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 fragment info -
0 error response -
+
+ @@ -2347,9 +2387,9 @@ public okhttp3.Call getActivityLogByIdCall(String namespace, String array, Strin // create path and map variables String localVarPath = "/arrays/{namespace}/{array}/activity/{id}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())) - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())) + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2366,38 +2406,34 @@ public okhttp3.Call getActivityLogByIdCall(String namespace, String array, Strin } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getActivityLogByIdValidateBeforeCall(String namespace, String array, String id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling getActivityLogById(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling getActivityLogById(Async)"); } - + // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling getActivityLogById(Async)"); } - - okhttp3.Call localVarCall = getActivityLogByIdCall(namespace, array, id, _callback); - return localVarCall; + return getActivityLogByIdCall(namespace, array, id, _callback); } @@ -2410,7 +2446,8 @@ private okhttp3.Call getActivityLogByIdValidateBeforeCall(String namespace, Stri * @return ArrayActivityLog * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 array activity -
502 Bad Gateway -
+
+ @@ -2431,7 +2468,8 @@ public ArrayActivityLog getActivityLogById(String namespace, String array, Strin * @return ApiResponse<ArrayActivityLog> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 array activity -
502 Bad Gateway -
+
+ @@ -2454,7 +2492,8 @@ public ApiResponse getActivityLogByIdWithHttpInfo(String names * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 array activity -
502 Bad Gateway -
+
+ @@ -2475,7 +2514,8 @@ public okhttp3.Call getActivityLogByIdAsync(String namespace, String array, Stri * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 array activity -
502 Bad Gateway -
+
+ @@ -2520,23 +2560,19 @@ public okhttp3.Call getAllArrayMetadataCall(String publicShare, final ApiCallbac } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getAllArrayMetadataValidateBeforeCall(String publicShare, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = getAllArrayMetadataCall(publicShare, _callback); - return localVarCall; + return getAllArrayMetadataCall(publicShare, _callback); } @@ -2547,7 +2583,8 @@ private okhttp3.Call getAllArrayMetadataValidateBeforeCall(String publicShare, f * @return List<ArrayInfo> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 array metadata for all arrays user has access to -
502 Bad Gateway -
+
+ @@ -2566,7 +2603,8 @@ public List getAllArrayMetadata(String publicShare) throws ApiExcepti * @return ApiResponse<List<ArrayInfo>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 array metadata for all arrays user has access to -
502 Bad Gateway -
+
+ @@ -2587,7 +2625,8 @@ public ApiResponse> getAllArrayMetadataWithHttpInfo(String publi * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 array metadata for all arrays user has access to -
502 Bad Gateway -
+
+ @@ -2610,7 +2649,8 @@ public okhttp3.Call getAllArrayMetadataAsync(String publicShare, final ApiCallba * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 array metadata for all arrays user has access to -
502 Bad Gateway -
+
+ @@ -2635,8 +2675,8 @@ public okhttp3.Call getArrayCall(String namespace, String array, String contentT // create path and map variables String localVarPath = "/arrays/{namespace}/{array}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2644,12 +2684,9 @@ public okhttp3.Call getArrayCall(String namespace, String array, String contentT Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (contentType != null) { - localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); - } - final String[] localVarAccepts = { - "application/json", "application/capnp" + "application/json", + "application/capnp" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -2657,38 +2694,39 @@ public okhttp3.Call getArrayCall(String namespace, String array, String contentT } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getArrayValidateBeforeCall(String namespace, String array, String contentType, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling getArray(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling getArray(Async)"); } - + // verify the required parameter 'contentType' is set if (contentType == null) { throw new ApiException("Missing the required parameter 'contentType' when calling getArray(Async)"); } - - okhttp3.Call localVarCall = getArrayCall(namespace, array, contentType, _callback); - return localVarCall; + return getArrayCall(namespace, array, contentType, _callback); } @@ -2701,7 +2739,8 @@ private okhttp3.Call getArrayValidateBeforeCall(String namespace, String array, * @return ArraySchema * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 get ArraySchema -
502 Bad Gateway -
+
+ @@ -2722,7 +2761,8 @@ public ArraySchema getArray(String namespace, String array, String contentType) * @return ApiResponse<ArraySchema> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 get ArraySchema -
502 Bad Gateway -
+
+ @@ -2745,7 +2785,8 @@ public ApiResponse getArrayWithHttpInfo(String namespace, String ar * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 get ArraySchema -
502 Bad Gateway -
+
+ @@ -2770,7 +2811,8 @@ public okhttp3.Call getArrayAsync(String namespace, String array, String content * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 get ArraySchema -
502 Bad Gateway -
+
+ @@ -2795,8 +2837,8 @@ public okhttp3.Call getArrayMaxBufferSizesCall(String namespace, String array, S // create path and map variables String localVarPath = "/arrays/{namespace}/{array}/max_buffer_sizes" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2808,14 +2850,6 @@ public okhttp3.Call getArrayMaxBufferSizesCall(String namespace, String array, S localVarQueryParams.addAll(localVarApiClient.parameterToPair("subarray", subarray)); } - if (contentType != null) { - localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); - } - - if (xPayer != null) { - localVarHeaderParams.put("X-Payer", localVarApiClient.parameterToString(xPayer)); - } - final String[] localVarAccepts = { "application/json" }; @@ -2825,43 +2859,49 @@ public okhttp3.Call getArrayMaxBufferSizesCall(String namespace, String array, S } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + + if (xPayer != null) { + localVarHeaderParams.put("X-Payer", localVarApiClient.parameterToString(xPayer)); + } + + + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getArrayMaxBufferSizesValidateBeforeCall(String namespace, String array, String subarray, String contentType, String xPayer, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling getArrayMaxBufferSizes(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling getArrayMaxBufferSizes(Async)"); } - + // verify the required parameter 'subarray' is set if (subarray == null) { throw new ApiException("Missing the required parameter 'subarray' when calling getArrayMaxBufferSizes(Async)"); } - + // verify the required parameter 'contentType' is set if (contentType == null) { throw new ApiException("Missing the required parameter 'contentType' when calling getArrayMaxBufferSizes(Async)"); } - - okhttp3.Call localVarCall = getArrayMaxBufferSizesCall(namespace, array, subarray, contentType, xPayer, _callback); - return localVarCall; + return getArrayMaxBufferSizesCall(namespace, array, subarray, contentType, xPayer, _callback); } @@ -2876,7 +2916,8 @@ private okhttp3.Call getArrayMaxBufferSizesValidateBeforeCall(String namespace, * @return MaxBufferSizes * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 get the max buffer sizes of an array for a subarray -
502 Bad Gateway -
+
+ @@ -2899,7 +2940,8 @@ public MaxBufferSizes getArrayMaxBufferSizes(String namespace, String array, Str * @return ApiResponse<MaxBufferSizes> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 get the max buffer sizes of an array for a subarray -
502 Bad Gateway -
+
+ @@ -2924,7 +2966,8 @@ public ApiResponse getArrayMaxBufferSizesWithHttpInfo(String nam * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 get the max buffer sizes of an array for a subarray -
502 Bad Gateway -
+
+ @@ -2948,7 +2991,8 @@ public okhttp3.Call getArrayMaxBufferSizesAsync(String namespace, String array, * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 get the max buffer sizes of an array for a subarray -
502 Bad Gateway -
+
+ @@ -2973,8 +3017,8 @@ public okhttp3.Call getArrayMetaDataJsonCall(String namespace, String array, Int // create path and map variables String localVarPath = "/arrays/{namespace}/{array}/metadata_json" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2999,33 +3043,29 @@ public okhttp3.Call getArrayMetaDataJsonCall(String namespace, String array, Int } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getArrayMetaDataJsonValidateBeforeCall(String namespace, String array, Integer length, Integer endTimestamp, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling getArrayMetaDataJson(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling getArrayMetaDataJson(Async)"); } - - okhttp3.Call localVarCall = getArrayMetaDataJsonCall(namespace, array, length, endTimestamp, _callback); - return localVarCall; + return getArrayMetaDataJsonCall(namespace, array, length, endTimestamp, _callback); } @@ -3036,18 +3076,19 @@ private okhttp3.Call getArrayMetaDataJsonValidateBeforeCall(String namespace, St * @param array name/uri of array that is url-encoded (required) * @param length (optional) limit character length of returned values (optional) * @param endTimestamp Milliseconds since Unix epoch, metadata will use open_at functionality to open array at the specific timestamp (optional) - * @return Object + * @return Map<String, Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 get array metadata -
502 Bad Gateway -
+
+
Response Details
Status Code Description Response Headers
200 get array metadata -
502 Bad Gateway -
0 error response -
*/ - public Object getArrayMetaDataJson(String namespace, String array, Integer length, Integer endTimestamp) throws ApiException { - ApiResponse localVarResp = getArrayMetaDataJsonWithHttpInfo(namespace, array, length, endTimestamp); + public Map getArrayMetaDataJson(String namespace, String array, Integer length, Integer endTimestamp) throws ApiException { + ApiResponse> localVarResp = getArrayMetaDataJsonWithHttpInfo(namespace, array, length, endTimestamp); return localVarResp.getData(); } @@ -3058,19 +3099,20 @@ public Object getArrayMetaDataJson(String namespace, String array, Integer lengt * @param array name/uri of array that is url-encoded (required) * @param length (optional) limit character length of returned values (optional) * @param endTimestamp Milliseconds since Unix epoch, metadata will use open_at functionality to open array at the specific timestamp (optional) - * @return ApiResponse<Object> + * @return ApiResponse<Map<String, Object>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 get array metadata -
502 Bad Gateway -
0 error response -
*/ - public ApiResponse getArrayMetaDataJsonWithHttpInfo(String namespace, String array, Integer length, Integer endTimestamp) throws ApiException { + public ApiResponse> getArrayMetaDataJsonWithHttpInfo(String namespace, String array, Integer length, Integer endTimestamp) throws ApiException { okhttp3.Call localVarCall = getArrayMetaDataJsonValidateBeforeCall(namespace, array, length, endTimestamp, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -3085,17 +3127,18 @@ public ApiResponse getArrayMetaDataJsonWithHttpInfo(String namespace, St * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 get array metadata -
502 Bad Gateway -
0 error response -
*/ - public okhttp3.Call getArrayMetaDataJsonAsync(String namespace, String array, Integer length, Integer endTimestamp, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getArrayMetaDataJsonAsync(String namespace, String array, Integer length, Integer endTimestamp, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getArrayMetaDataJsonValidateBeforeCall(namespace, array, length, endTimestamp, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -3107,7 +3150,8 @@ public okhttp3.Call getArrayMetaDataJsonAsync(String namespace, String array, In * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -3132,8 +3176,8 @@ public okhttp3.Call getArrayMetadataCall(String namespace, String array, final A // create path and map variables String localVarPath = "/arrays/{namespace}/{array}/metadata" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3150,33 +3194,29 @@ public okhttp3.Call getArrayMetadataCall(String namespace, String array, final A } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getArrayMetadataValidateBeforeCall(String namespace, String array, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling getArrayMetadata(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling getArrayMetadata(Async)"); } - - okhttp3.Call localVarCall = getArrayMetadataCall(namespace, array, _callback); - return localVarCall; + return getArrayMetadataCall(namespace, array, _callback); } @@ -3188,7 +3228,8 @@ private okhttp3.Call getArrayMetadataValidateBeforeCall(String namespace, String * @return ArrayInfo * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 array metadata for an array -
502 Bad Gateway -
+
+ @@ -3208,7 +3249,8 @@ public ArrayInfo getArrayMetadata(String namespace, String array) throws ApiExce * @return ApiResponse<ArrayInfo> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 array metadata for an array -
502 Bad Gateway -
+
+ @@ -3230,7 +3272,8 @@ public ApiResponse getArrayMetadataWithHttpInfo(String namespace, Str * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 array metadata for an array -
502 Bad Gateway -
+
+ @@ -3252,7 +3295,8 @@ public okhttp3.Call getArrayMetadataAsync(String namespace, String array, final * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 array metadata for an array -
502 Bad Gateway -
+
+ @@ -3277,8 +3321,8 @@ public okhttp3.Call getArrayMetadataCapnpCall(String namespace, String array, fi // create path and map variables String localVarPath = "/arrays/{namespace}/{array}/array_metadata" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3287,7 +3331,8 @@ public okhttp3.Call getArrayMetadataCapnpCall(String namespace, String array, fi Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "application/json", "application/capnp" + "application/json", + "application/capnp" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -3295,33 +3340,29 @@ public okhttp3.Call getArrayMetadataCapnpCall(String namespace, String array, fi } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getArrayMetadataCapnpValidateBeforeCall(String namespace, String array, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling getArrayMetadataCapnp(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling getArrayMetadataCapnp(Async)"); } - - okhttp3.Call localVarCall = getArrayMetadataCapnpCall(namespace, array, _callback); - return localVarCall; + return getArrayMetadataCapnpCall(namespace, array, _callback); } @@ -3333,7 +3374,8 @@ private okhttp3.Call getArrayMetadataCapnpValidateBeforeCall(String namespace, S * @return ArrayMetadata * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 array metadata for an array -
502 Bad Gateway -
+
+ @@ -3353,7 +3395,8 @@ public ArrayMetadata getArrayMetadataCapnp(String namespace, String array) throw * @return ApiResponse<ArrayMetadata> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 array metadata for an array -
502 Bad Gateway -
+
+ @@ -3375,7 +3418,8 @@ public ApiResponse getArrayMetadataCapnpWithHttpInfo(String names * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 array metadata for an array -
502 Bad Gateway -
+
+ @@ -3399,7 +3443,8 @@ public okhttp3.Call getArrayMetadataCapnpAsync(String namespace, String array, f * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 array metadata for an array -
502 Bad Gateway -
+
+ @@ -3424,8 +3469,8 @@ public okhttp3.Call getArrayNonEmptyDomainCall(String namespace, String array, S // create path and map variables String localVarPath = "/arrays/{namespace}/{array}/non_empty_domain" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3433,14 +3478,6 @@ public okhttp3.Call getArrayNonEmptyDomainCall(String namespace, String array, S Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (contentType != null) { - localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); - } - - if (xPayer != null) { - localVarHeaderParams.put("X-Payer", localVarApiClient.parameterToString(xPayer)); - } - final String[] localVarAccepts = { "application/json" }; @@ -3450,38 +3487,44 @@ public okhttp3.Call getArrayNonEmptyDomainCall(String namespace, String array, S } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + + if (xPayer != null) { + localVarHeaderParams.put("X-Payer", localVarApiClient.parameterToString(xPayer)); + } + + + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getArrayNonEmptyDomainValidateBeforeCall(String namespace, String array, String contentType, String xPayer, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling getArrayNonEmptyDomain(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling getArrayNonEmptyDomain(Async)"); } - + // verify the required parameter 'contentType' is set if (contentType == null) { throw new ApiException("Missing the required parameter 'contentType' when calling getArrayNonEmptyDomain(Async)"); } - - okhttp3.Call localVarCall = getArrayNonEmptyDomainCall(namespace, array, contentType, xPayer, _callback); - return localVarCall; + return getArrayNonEmptyDomainCall(namespace, array, contentType, xPayer, _callback); } @@ -3495,7 +3538,8 @@ private okhttp3.Call getArrayNonEmptyDomainValidateBeforeCall(String namespace, * @return NonEmptyDomain * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 get the non empty domain of an array -
502 Bad Gateway -
+
+ @@ -3517,7 +3561,8 @@ public NonEmptyDomain getArrayNonEmptyDomain(String namespace, String array, Str * @return ApiResponse<NonEmptyDomain> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 get the non empty domain of an array -
502 Bad Gateway -
+
+ @@ -3541,7 +3586,8 @@ public ApiResponse getArrayNonEmptyDomainWithHttpInfo(String nam * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 get the non empty domain of an array -
502 Bad Gateway -
+
+ @@ -3563,7 +3609,8 @@ public okhttp3.Call getArrayNonEmptyDomainAsync(String namespace, String array, * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 get the non empty domain of an array -
502 Bad Gateway -
+
+ @@ -3588,8 +3635,8 @@ public okhttp3.Call getArrayNonEmptyDomainJsonCall(String namespace, String arra // create path and map variables String localVarPath = "/arrays/{namespace}/{array}/non_empty_domain_json" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3606,33 +3653,29 @@ public okhttp3.Call getArrayNonEmptyDomainJsonCall(String namespace, String arra } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getArrayNonEmptyDomainJsonValidateBeforeCall(String namespace, String array, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling getArrayNonEmptyDomainJson(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling getArrayNonEmptyDomainJson(Async)"); } - - okhttp3.Call localVarCall = getArrayNonEmptyDomainJsonCall(namespace, array, _callback); - return localVarCall; + return getArrayNonEmptyDomainJsonCall(namespace, array, _callback); } @@ -3641,18 +3684,19 @@ private okhttp3.Call getArrayNonEmptyDomainJsonValidateBeforeCall(String namespa * get non-empty domain from the array in json format * @param namespace namespace array is in (an organization name or user's username) (required) * @param array name/uri of array that is url-encoded (required) - * @return Object + * @return Map<String, Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 get array non-empty domaim -
502 Bad Gateway -
+
+
Response Details
Status Code Description Response Headers
200 get array non-empty domaim -
502 Bad Gateway -
0 error response -
*/ - public Object getArrayNonEmptyDomainJson(String namespace, String array) throws ApiException { - ApiResponse localVarResp = getArrayNonEmptyDomainJsonWithHttpInfo(namespace, array); + public Map getArrayNonEmptyDomainJson(String namespace, String array) throws ApiException { + ApiResponse> localVarResp = getArrayNonEmptyDomainJsonWithHttpInfo(namespace, array); return localVarResp.getData(); } @@ -3661,19 +3705,20 @@ public Object getArrayNonEmptyDomainJson(String namespace, String array) throws * get non-empty domain from the array in json format * @param namespace namespace array is in (an organization name or user's username) (required) * @param array name/uri of array that is url-encoded (required) - * @return ApiResponse<Object> + * @return ApiResponse<Map<String, Object>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 get array non-empty domaim -
502 Bad Gateway -
0 error response -
*/ - public ApiResponse getArrayNonEmptyDomainJsonWithHttpInfo(String namespace, String array) throws ApiException { + public ApiResponse> getArrayNonEmptyDomainJsonWithHttpInfo(String namespace, String array) throws ApiException { okhttp3.Call localVarCall = getArrayNonEmptyDomainJsonValidateBeforeCall(namespace, array, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -3686,17 +3731,18 @@ public ApiResponse getArrayNonEmptyDomainJsonWithHttpInfo(String namespa * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 get array non-empty domaim -
502 Bad Gateway -
0 error response -
*/ - public okhttp3.Call getArrayNonEmptyDomainJsonAsync(String namespace, String array, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getArrayNonEmptyDomainJsonAsync(String namespace, String array, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getArrayNonEmptyDomainJsonValidateBeforeCall(namespace, array, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -3709,7 +3755,8 @@ public okhttp3.Call getArrayNonEmptyDomainJsonAsync(String namespace, String arr * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -3734,8 +3781,8 @@ public okhttp3.Call getArraySampleDataCall(String namespace, String array, BigDe // create path and map variables String localVarPath = "/arrays/{namespace}/{array}/sample" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3756,33 +3803,29 @@ public okhttp3.Call getArraySampleDataCall(String namespace, String array, BigDe } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getArraySampleDataValidateBeforeCall(String namespace, String array, BigDecimal samples, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling getArraySampleData(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling getArraySampleData(Async)"); } - - okhttp3.Call localVarCall = getArraySampleDataCall(namespace, array, samples, _callback); - return localVarCall; + return getArraySampleDataCall(namespace, array, samples, _callback); } @@ -3795,7 +3838,8 @@ private okhttp3.Call getArraySampleDataValidateBeforeCall(String namespace, Stri * @return ArraySample * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 get array sample data -
502 Bad Gateway -
+
+ @@ -3816,7 +3860,8 @@ public ArraySample getArraySampleData(String namespace, String array, BigDecimal * @return ApiResponse<ArraySample> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 get array sample data -
502 Bad Gateway -
+
+ @@ -3839,7 +3884,8 @@ public ApiResponse getArraySampleDataWithHttpInfo(String namespace, * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 get array sample data -
502 Bad Gateway -
+
+ @@ -3861,7 +3907,8 @@ public okhttp3.Call getArraySampleDataAsync(String namespace, String array, BigD * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 get array sample data -
502 Bad Gateway -
+
+ @@ -3887,8 +3934,8 @@ public okhttp3.Call getArraySharingPoliciesCall(String namespace, String array, // create path and map variables String localVarPath = "/arrays/{namespace}/{array}/share" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3905,33 +3952,29 @@ public okhttp3.Call getArraySharingPoliciesCall(String namespace, String array, } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getArraySharingPoliciesValidateBeforeCall(String namespace, String array, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling getArraySharingPolicies(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling getArraySharingPolicies(Async)"); } - - okhttp3.Call localVarCall = getArraySharingPoliciesCall(namespace, array, _callback); - return localVarCall; + return getArraySharingPoliciesCall(namespace, array, _callback); } @@ -3943,7 +3986,8 @@ private okhttp3.Call getArraySharingPoliciesValidateBeforeCall(String namespace, * @return List<ArraySharing> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of all specific sharing policies -
404 Array does not exist or user does not have permissions to view array-sharing policies -
+
+ @@ -3964,7 +4008,8 @@ public List getArraySharingPolicies(String namespace, String array * @return ApiResponse<List<ArraySharing>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of all specific sharing policies -
404 Array does not exist or user does not have permissions to view array-sharing policies -
+
+ @@ -3987,7 +4032,8 @@ public ApiResponse> getArraySharingPoliciesWithHttpInfo(Strin * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of all specific sharing policies -
404 Array does not exist or user does not have permissions to view array-sharing policies -
+
+ @@ -4005,18 +4051,20 @@ public okhttp3.Call getArraySharingPoliciesAsync(String namespace, String array, /** * Build call for getArraysInNamespace * @param namespace namespace array is in (an organization name or user's username) (required) + * @param withMetadata include the metadata of the arrays (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 -
Response Details
Status Code Description Response Headers
200 List of all specific sharing policies -
404 Array does not exist or user does not have permissions to view array-sharing policies -
+
+
Response Details
Status Code Description Response Headers
200 array metadata for all arrays in a namespace -
502 Bad Gateway -
0 error response -
*/ - public okhttp3.Call getArraysInNamespaceCall(String namespace, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getArraysInNamespaceCall(String namespace, Boolean withMetadata, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -4034,7 +4082,7 @@ public okhttp3.Call getArraysInNamespaceCall(String namespace, final ApiCallback // create path and map variables String localVarPath = "/arrays/{namespace}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -4042,6 +4090,10 @@ public okhttp3.Call getArraysInNamespaceCall(String namespace, final ApiCallback Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (withMetadata != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("with_metadata", withMetadata)); + } + final String[] localVarAccepts = { "application/json" }; @@ -4051,28 +4103,24 @@ public okhttp3.Call getArraysInNamespaceCall(String namespace, final ApiCallback } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getArraysInNamespaceValidateBeforeCall(String namespace, final ApiCallback _callback) throws ApiException { - + private okhttp3.Call getArraysInNamespaceValidateBeforeCall(String namespace, Boolean withMetadata, final ApiCallback _callback) throws ApiException { // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling getArraysInNamespace(Async)"); } - - okhttp3.Call localVarCall = getArraysInNamespaceCall(namespace, _callback); - return localVarCall; + return getArraysInNamespaceCall(namespace, withMetadata, _callback); } @@ -4080,18 +4128,20 @@ private okhttp3.Call getArraysInNamespaceValidateBeforeCall(String namespace, fi * * get metadata on all arrays in a namespace * @param namespace namespace array is in (an organization name or user's username) (required) + * @param withMetadata include the metadata of the arrays (optional) * @return List<ArrayInfo> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 array metadata for all arrays in a namespace -
502 Bad Gateway -
0 error response -
*/ - public List getArraysInNamespace(String namespace) throws ApiException { - ApiResponse> localVarResp = getArraysInNamespaceWithHttpInfo(namespace); + public List getArraysInNamespace(String namespace, Boolean withMetadata) throws ApiException { + ApiResponse> localVarResp = getArraysInNamespaceWithHttpInfo(namespace, withMetadata); return localVarResp.getData(); } @@ -4099,18 +4149,20 @@ public List getArraysInNamespace(String namespace) throws ApiExceptio * * get metadata on all arrays in a namespace * @param namespace namespace array is in (an organization name or user's username) (required) + * @param withMetadata include the metadata of the arrays (optional) * @return ApiResponse<List<ArrayInfo>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 array metadata for all arrays in a namespace -
502 Bad Gateway -
0 error response -
*/ - public ApiResponse> getArraysInNamespaceWithHttpInfo(String namespace) throws ApiException { - okhttp3.Call localVarCall = getArraysInNamespaceValidateBeforeCall(namespace, null); + public ApiResponse> getArraysInNamespaceWithHttpInfo(String namespace, Boolean withMetadata) throws ApiException { + okhttp3.Call localVarCall = getArraysInNamespaceValidateBeforeCall(namespace, withMetadata, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -4119,20 +4171,22 @@ public ApiResponse> getArraysInNamespaceWithHttpInfo(String name * (asynchronously) * get metadata on all arrays in a namespace * @param namespace namespace array is in (an organization name or user's username) (required) + * @param withMetadata include the metadata of the arrays (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 - +
+
Response Details
Status Code Description Response Headers
200 array metadata for all arrays in a namespace -
502 Bad Gateway -
0 error response -
*/ - public okhttp3.Call getArraysInNamespaceAsync(String namespace, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getArraysInNamespaceAsync(String namespace, Boolean withMetadata, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = getArraysInNamespaceValidateBeforeCall(namespace, _callback); + okhttp3.Call localVarCall = getArraysInNamespaceValidateBeforeCall(namespace, withMetadata, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -4146,7 +4200,8 @@ public okhttp3.Call getArraysInNamespaceAsync(String namespace, final ApiCallbac * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -4171,8 +4226,8 @@ public okhttp3.Call getFragmentEndTimestampCall(String namespace, String array, // create path and map variables String localVarPath = "/arrays/{namespace}/{array}/fragment_end_timestamp" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -4193,33 +4248,29 @@ public okhttp3.Call getFragmentEndTimestampCall(String namespace, String array, } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getFragmentEndTimestampValidateBeforeCall(String namespace, String array, Integer endTimestamp, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling getFragmentEndTimestamp(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling getFragmentEndTimestamp(Async)"); } - - okhttp3.Call localVarCall = getFragmentEndTimestampCall(namespace, array, endTimestamp, _callback); - return localVarCall; + return getFragmentEndTimestampCall(namespace, array, endTimestamp, _callback); } @@ -4232,7 +4283,8 @@ private okhttp3.Call getFragmentEndTimestampValidateBeforeCall(String namespace, * @return Integer * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 fragment end_timestamp on an array -
502 Bad Gateway -
+
+ @@ -4253,7 +4305,8 @@ public Integer getFragmentEndTimestamp(String namespace, String array, Integer e * @return ApiResponse<Integer> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 fragment end_timestamp on an array -
502 Bad Gateway -
+
+ @@ -4276,7 +4329,8 @@ public ApiResponse getFragmentEndTimestampWithHttpInfo(String namespace * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 fragment end_timestamp on an array -
502 Bad Gateway -
+
+ @@ -4296,7 +4350,8 @@ public okhttp3.Call getFragmentEndTimestampAsync(String namespace, String array, * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 fragment end_timestamp on an array -
502 Bad Gateway -
+
+ @@ -4337,23 +4392,19 @@ public okhttp3.Call getLastAccessedArraysCall(final ApiCallback _callback) throw } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getLastAccessedArraysValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = getLastAccessedArraysCall(_callback); - return localVarCall; + return getLastAccessedArraysCall(_callback); } @@ -4363,7 +4414,8 @@ private okhttp3.Call getLastAccessedArraysValidateBeforeCall(final ApiCallback _ * @return List<LastAccessedArray> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 gets last accessed arrays -
502 Bad Gateway -
+
+ @@ -4381,7 +4433,8 @@ public List getLastAccessedArrays() throws ApiException { * @return ApiResponse<List<LastAccessedArray>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 gets last accessed arrays -
502 Bad Gateway -
+
+ @@ -4401,7 +4454,8 @@ public ApiResponse> getLastAccessedArraysWithHttpInfo() * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 gets last accessed arrays -
502 Bad Gateway -
+
+ @@ -4415,6 +4469,324 @@ public okhttp3.Call getLastAccessedArraysAsync(final ApiCallback + + + + + + +
Response Details
Status Code Description Response Headers
200 gets last accessed arrays -
502 Bad Gateway -
Response Details
Status Code Description Response Headers
200 array schemas returned successfully -
404 Array does not exist or user does not have permissions to access it -
502 Bad Gateway -
0 error response -
+ */ + public okhttp3.Call loadArraySchemaCall(String namespace, String array, LoadArraySchemaRequest loadArraySchemaRequest, 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 = loadArraySchemaRequest; + + // create path and map variables + String localVarPath = "/arrays/{namespace}/{array}/schema" + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.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[] { "BasicAuth", "ApiKeyAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call loadArraySchemaValidateBeforeCall(String namespace, String array, LoadArraySchemaRequest loadArraySchemaRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'namespace' is set + if (namespace == null) { + throw new ApiException("Missing the required parameter 'namespace' when calling loadArraySchema(Async)"); + } + + // verify the required parameter 'array' is set + if (array == null) { + throw new ApiException("Missing the required parameter 'array' when calling loadArraySchema(Async)"); + } + + // verify the required parameter 'loadArraySchemaRequest' is set + if (loadArraySchemaRequest == null) { + throw new ApiException("Missing the required parameter 'loadArraySchemaRequest' when calling loadArraySchema(Async)"); + } + + return loadArraySchemaCall(namespace, array, loadArraySchemaRequest, _callback); + + } + + /** + * + * request to get the array schema + * @param namespace namespace array is in (an organization name or user's username) (required) + * @param array name/uri of array that is url-encoded (required) + * @param loadArraySchemaRequest Load Array Schema Request (required) + * @return LoadArraySchemaResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Response Details
Status Code Description Response Headers
200 array schemas returned successfully -
404 Array does not exist or user does not have permissions to access it -
502 Bad Gateway -
0 error response -
+ */ + public LoadArraySchemaResponse loadArraySchema(String namespace, String array, LoadArraySchemaRequest loadArraySchemaRequest) throws ApiException { + ApiResponse localVarResp = loadArraySchemaWithHttpInfo(namespace, array, loadArraySchemaRequest); + return localVarResp.getData(); + } + + /** + * + * request to get the array schema + * @param namespace namespace array is in (an organization name or user's username) (required) + * @param array name/uri of array that is url-encoded (required) + * @param loadArraySchemaRequest Load Array Schema Request (required) + * @return ApiResponse<LoadArraySchemaResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Response Details
Status Code Description Response Headers
200 array schemas returned successfully -
404 Array does not exist or user does not have permissions to access it -
502 Bad Gateway -
0 error response -
+ */ + public ApiResponse loadArraySchemaWithHttpInfo(String namespace, String array, LoadArraySchemaRequest loadArraySchemaRequest) throws ApiException { + okhttp3.Call localVarCall = loadArraySchemaValidateBeforeCall(namespace, array, loadArraySchemaRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * request to get the array schema + * @param namespace namespace array is in (an organization name or user's username) (required) + * @param array name/uri of array that is url-encoded (required) + * @param loadArraySchemaRequest Load Array Schema Request (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 + + + + + + + +
Response Details
Status Code Description Response Headers
200 array schemas returned successfully -
404 Array does not exist or user does not have permissions to access it -
502 Bad Gateway -
0 error response -
+ */ + public okhttp3.Call loadArraySchemaAsync(String namespace, String array, LoadArraySchemaRequest loadArraySchemaRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = loadArraySchemaValidateBeforeCall(namespace, array, loadArraySchemaRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for loadEnumerations + * @param namespace namespace array is in (an organization name or user's username) (required) + * @param array name/uri of array that is url-encoded (required) + * @param loadEnumerationsRequest Load Enumerations Request (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 + + + + + + + +
Response Details
Status Code Description Response Headers
200 enumerations returned successfully -
404 Array does not exist or user does not have permissions to access it -
502 Bad Gateway -
0 error response -
+ */ + public okhttp3.Call loadEnumerationsCall(String namespace, String array, LoadEnumerationsRequest loadEnumerationsRequest, 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 = loadEnumerationsRequest; + + // create path and map variables + String localVarPath = "/arrays/{namespace}/{array}/enumerations" + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.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[] { "BasicAuth", "ApiKeyAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call loadEnumerationsValidateBeforeCall(String namespace, String array, LoadEnumerationsRequest loadEnumerationsRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'namespace' is set + if (namespace == null) { + throw new ApiException("Missing the required parameter 'namespace' when calling loadEnumerations(Async)"); + } + + // verify the required parameter 'array' is set + if (array == null) { + throw new ApiException("Missing the required parameter 'array' when calling loadEnumerations(Async)"); + } + + // verify the required parameter 'loadEnumerationsRequest' is set + if (loadEnumerationsRequest == null) { + throw new ApiException("Missing the required parameter 'loadEnumerationsRequest' when calling loadEnumerations(Async)"); + } + + return loadEnumerationsCall(namespace, array, loadEnumerationsRequest, _callback); + + } + + /** + * + * request to get the enumerations of the arrays' attributes + * @param namespace namespace array is in (an organization name or user's username) (required) + * @param array name/uri of array that is url-encoded (required) + * @param loadEnumerationsRequest Load Enumerations Request (required) + * @return LoadEnumerationsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Response Details
Status Code Description Response Headers
200 enumerations returned successfully -
404 Array does not exist or user does not have permissions to access it -
502 Bad Gateway -
0 error response -
+ */ + public LoadEnumerationsResponse loadEnumerations(String namespace, String array, LoadEnumerationsRequest loadEnumerationsRequest) throws ApiException { + ApiResponse localVarResp = loadEnumerationsWithHttpInfo(namespace, array, loadEnumerationsRequest); + return localVarResp.getData(); + } + + /** + * + * request to get the enumerations of the arrays' attributes + * @param namespace namespace array is in (an organization name or user's username) (required) + * @param array name/uri of array that is url-encoded (required) + * @param loadEnumerationsRequest Load Enumerations Request (required) + * @return ApiResponse<LoadEnumerationsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Response Details
Status Code Description Response Headers
200 enumerations returned successfully -
404 Array does not exist or user does not have permissions to access it -
502 Bad Gateway -
0 error response -
+ */ + public ApiResponse loadEnumerationsWithHttpInfo(String namespace, String array, LoadEnumerationsRequest loadEnumerationsRequest) throws ApiException { + okhttp3.Call localVarCall = loadEnumerationsValidateBeforeCall(namespace, array, loadEnumerationsRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * request to get the enumerations of the arrays' attributes + * @param namespace namespace array is in (an organization name or user's username) (required) + * @param array name/uri of array that is url-encoded (required) + * @param loadEnumerationsRequest Load Enumerations Request (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 + + + + + + + +
Response Details
Status Code Description Response Headers
200 enumerations returned successfully -
404 Array does not exist or user does not have permissions to access it -
502 Bad Gateway -
0 error response -
+ */ + public okhttp3.Call loadEnumerationsAsync(String namespace, String array, LoadEnumerationsRequest loadEnumerationsRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = loadEnumerationsValidateBeforeCall(namespace, array, loadEnumerationsRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for registerArray * @param namespace namespace array is in (an organization name or user's username) (required) @@ -4424,7 +4796,8 @@ public okhttp3.Call getLastAccessedArraysAsync(final ApiCallback + + @@ -4449,8 +4822,8 @@ public okhttp3.Call registerArrayCall(String namespace, String array, ArrayInfoU // create path and map variables String localVarPath = "/arrays/{namespace}/{array}/register" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -4474,31 +4847,28 @@ public okhttp3.Call registerArrayCall(String namespace, String array, ArrayInfoU localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call registerArrayValidateBeforeCall(String namespace, String array, ArrayInfoUpdate arrayMetadata, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling registerArray(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling registerArray(Async)"); } - + // verify the required parameter 'arrayMetadata' is set if (arrayMetadata == null) { throw new ApiException("Missing the required parameter 'arrayMetadata' when calling registerArray(Async)"); } - - okhttp3.Call localVarCall = registerArrayCall(namespace, array, arrayMetadata, _callback); - return localVarCall; + return registerArrayCall(namespace, array, arrayMetadata, _callback); } @@ -4511,7 +4881,8 @@ private okhttp3.Call registerArrayValidateBeforeCall(String namespace, String ar * @return ArrayInfo * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 array registered successfully -
502 Bad Gateway -
+
+ @@ -4532,7 +4903,8 @@ public ArrayInfo registerArray(String namespace, String array, ArrayInfoUpdate a * @return ApiResponse<ArrayInfo> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 array registered successfully -
502 Bad Gateway -
+
+ @@ -4555,7 +4927,8 @@ public ApiResponse registerArrayWithHttpInfo(String namespace, String * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 array registered successfully -
502 Bad Gateway -
+
+ @@ -4578,7 +4951,8 @@ public okhttp3.Call registerArrayAsync(String namespace, String array, ArrayInfo * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 array registered successfully -
502 Bad Gateway -
+
+ @@ -4604,8 +4978,8 @@ public okhttp3.Call shareArrayCall(String namespace, String array, ArraySharing // create path and map variables String localVarPath = "/arrays/{namespace}/{array}/share" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -4629,31 +5003,28 @@ public okhttp3.Call shareArrayCall(String namespace, String array, ArraySharing localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call shareArrayValidateBeforeCall(String namespace, String array, ArraySharing arraySharing, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling shareArray(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling shareArray(Async)"); } - + // verify the required parameter 'arraySharing' is set if (arraySharing == null) { throw new ApiException("Missing the required parameter 'arraySharing' when calling shareArray(Async)"); } - - okhttp3.Call localVarCall = shareArrayCall(namespace, array, arraySharing, _callback); - return localVarCall; + return shareArrayCall(namespace, array, arraySharing, _callback); } @@ -4665,7 +5036,8 @@ private okhttp3.Call shareArrayValidateBeforeCall(String namespace, String array * @param arraySharing Namespace and list of permissions to share with. An empty list of permissions will remove the namespace; if permissions already exist they will be deleted then new ones added. In the event of a failure, the new policies will be rolled back to prevent partial policies, and it's likely the array will not be shared with the namespace at all. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Array shared successfully -
404 Array does not exist or user does not have permissions to share array -
+
+ @@ -4686,7 +5058,8 @@ public void shareArray(String namespace, String array, ArraySharing arraySharing * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Array shared successfully -
404 Array does not exist or user does not have permissions to share array -
+
+ @@ -4709,7 +5082,8 @@ public ApiResponse shareArrayWithHttpInfo(String namespace, String array, * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Array shared successfully -
404 Array does not exist or user does not have permissions to share array -
+
+ @@ -4732,7 +5106,8 @@ public okhttp3.Call shareArrayAsync(String namespace, String array, ArraySharing * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Array shared successfully -
404 Array does not exist or user does not have permissions to share array -
+
+ @@ -4757,8 +5132,8 @@ public okhttp3.Call updateArrayMetadataCall(String namespace, String array, Arra // create path and map variables String localVarPath = "/arrays/{namespace}/{array}/metadata" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -4782,31 +5157,28 @@ public okhttp3.Call updateArrayMetadataCall(String namespace, String array, Arra localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateArrayMetadataValidateBeforeCall(String namespace, String array, ArrayInfoUpdate arrayMetadata, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling updateArrayMetadata(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling updateArrayMetadata(Async)"); } - + // verify the required parameter 'arrayMetadata' is set if (arrayMetadata == null) { throw new ApiException("Missing the required parameter 'arrayMetadata' when calling updateArrayMetadata(Async)"); } - - okhttp3.Call localVarCall = updateArrayMetadataCall(namespace, array, arrayMetadata, _callback); - return localVarCall; + return updateArrayMetadataCall(namespace, array, arrayMetadata, _callback); } @@ -4818,7 +5190,8 @@ private okhttp3.Call updateArrayMetadataValidateBeforeCall(String namespace, Str * @param arrayMetadata array metadata to update (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 array metadata updated successfully -
502 Bad Gateway -
+
+ @@ -4838,7 +5211,8 @@ public void updateArrayMetadata(String namespace, String array, ArrayInfoUpdate * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 array metadata updated successfully -
502 Bad Gateway -
+
+ @@ -4860,7 +5234,8 @@ public ApiResponse updateArrayMetadataWithHttpInfo(String namespace, Strin * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 array metadata updated successfully -
502 Bad Gateway -
+
+ @@ -4882,7 +5257,8 @@ public okhttp3.Call updateArrayMetadataAsync(String namespace, String array, Arr * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 array metadata updated successfully -
502 Bad Gateway -
+
+ @@ -4907,8 +5283,8 @@ public okhttp3.Call updateArrayMetadataCapnpCall(String namespace, String array, // create path and map variables String localVarPath = "/arrays/{namespace}/{array}/array_metadata" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -4917,7 +5293,8 @@ public okhttp3.Call updateArrayMetadataCapnpCall(String namespace, String array, Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "application/json", "application/capnp" + "application/json", + "application/capnp" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -4925,38 +5302,36 @@ public okhttp3.Call updateArrayMetadataCapnpCall(String namespace, String array, } final String[] localVarContentTypes = { - "application/json", "application/capnp" + "application/json", + "application/capnp" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateArrayMetadataCapnpValidateBeforeCall(String namespace, String array, ArrayMetadata arrayMetadataEntries, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling updateArrayMetadataCapnp(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling updateArrayMetadataCapnp(Async)"); } - + // verify the required parameter 'arrayMetadataEntries' is set if (arrayMetadataEntries == null) { throw new ApiException("Missing the required parameter 'arrayMetadataEntries' when calling updateArrayMetadataCapnp(Async)"); } - - okhttp3.Call localVarCall = updateArrayMetadataCapnpCall(namespace, array, arrayMetadataEntries, _callback); - return localVarCall; + return updateArrayMetadataCapnpCall(namespace, array, arrayMetadataEntries, _callback); } @@ -4968,7 +5343,8 @@ private okhttp3.Call updateArrayMetadataCapnpValidateBeforeCall(String namespace * @param arrayMetadataEntries List of metadata entries (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 array metadata updated successfully -
502 Bad Gateway -
+
+ @@ -4988,7 +5364,8 @@ public void updateArrayMetadataCapnp(String namespace, String array, ArrayMetada * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 array metadata updated successfully -
502 Bad Gateway -
+
+ @@ -5010,7 +5387,8 @@ public ApiResponse updateArrayMetadataCapnpWithHttpInfo(String namespace, * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 array metadata updated successfully -
502 Bad Gateway -
+
+ @@ -5032,7 +5410,8 @@ public okhttp3.Call updateArrayMetadataCapnpAsync(String namespace, String array * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 array metadata updated successfully -
502 Bad Gateway -
+
+ @@ -5057,8 +5436,8 @@ public okhttp3.Call vacuumArrayCall(String namespace, String array, ArrayVacuumR // create path and map variables String localVarPath = "/arrays/{namespace}/{array}/vacuum" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -5082,31 +5461,28 @@ public okhttp3.Call vacuumArrayCall(String namespace, String array, ArrayVacuumR localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call vacuumArrayValidateBeforeCall(String namespace, String array, ArrayVacuumRequest vaccumRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling vacuumArray(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling vacuumArray(Async)"); } - + // verify the required parameter 'vaccumRequest' is set if (vaccumRequest == null) { throw new ApiException("Missing the required parameter 'vaccumRequest' when calling vacuumArray(Async)"); } - - okhttp3.Call localVarCall = vacuumArrayCall(namespace, array, vaccumRequest, _callback); - return localVarCall; + return vacuumArrayCall(namespace, array, vaccumRequest, _callback); } @@ -5118,7 +5494,8 @@ private okhttp3.Call vacuumArrayValidateBeforeCall(String namespace, String arra * @param vaccumRequest Vaccum Request (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 array vacuumed successfully -
502 Bad Gateway -
+
+ @@ -5138,7 +5515,8 @@ public void vacuumArray(String namespace, String array, ArrayVacuumRequest vaccu * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 array vacuumed successfully -
502 Bad Gateway -
+
+ @@ -5160,7 +5538,8 @@ public ApiResponse vacuumArrayWithHttpInfo(String namespace, String array, * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 array vacuumed successfully -
502 Bad Gateway -
+
+ diff --git a/src/main/java/io/tiledb/cloud/rest_api/api/ArrayTasksApi.java b/src/main/java/io/tiledb/cloud/rest_api/api/ArrayTasksApi.java index 7eab19f..faf6450 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/api/ArrayTasksApi.java +++ b/src/main/java/io/tiledb/cloud/rest_api/api/ArrayTasksApi.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,18 +11,24 @@ */ -package io.tiledb.cloud.rest_api.api; +package org.openapitools.client.api; -import io.tiledb.cloud.rest_api.Configuration; -import io.tiledb.cloud.rest_api.model.ArrayTaskBrowserSidebar; -import io.tiledb.cloud.rest_api.ApiCallback; -import io.tiledb.cloud.rest_api.ApiClient; -import io.tiledb.cloud.rest_api.ApiException; -import io.tiledb.cloud.rest_api.ApiResponse; -import io.tiledb.cloud.rest_api.Pair; +import org.openapitools.client.ApiCallback; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.Pair; +import org.openapitools.client.ProgressRequestBody; +import org.openapitools.client.ProgressResponseBody; import com.google.gson.reflect.TypeToken; +import java.io.IOException; + + +import org.openapitools.client.model.ArrayTaskBrowserSidebar; +import org.openapitools.client.model.Error; import java.lang.reflect.Type; import java.util.ArrayList; @@ -75,7 +81,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 array vacuumed successfully -
502 Bad Gateway -
+
+ @@ -125,23 +132,19 @@ public okhttp3.Call getArrayTasksSidebarCall(Integer start, Integer end, final A } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getArrayTasksSidebarValidateBeforeCall(Integer start, Integer end, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = getArrayTasksSidebarCall(start, end, _callback); - return localVarCall; + return getArrayTasksSidebarCall(start, end, _callback); } @@ -153,7 +156,8 @@ private okhttp3.Call getArrayTasksSidebarValidateBeforeCall(Integer start, Integ * @return ArrayTaskBrowserSidebar * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 sidebar metadata for task definitions for all arrays user has access to -
404 array tasks not found -
+
+ @@ -174,7 +178,8 @@ public ArrayTaskBrowserSidebar getArrayTasksSidebar(Integer start, Integer end) * @return ApiResponse<ArrayTaskBrowserSidebar> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 sidebar metadata for task definitions for all arrays user has access to -
404 array tasks not found -
+
+ @@ -197,7 +202,8 @@ public ApiResponse getArrayTasksSidebarWithHttpInfo(Int * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 sidebar metadata for task definitions for all arrays user has access to -
404 array tasks not found -
+
+ diff --git a/src/main/java/io/tiledb/cloud/rest_api/api/AssetsApi.java b/src/main/java/io/tiledb/cloud/rest_api/api/AssetsApi.java new file mode 100644 index 0000000..89510a5 --- /dev/null +++ b/src/main/java/io/tiledb/cloud/rest_api/api/AssetsApi.java @@ -0,0 +1,590 @@ +/* + * TileDB Storage Platform API + * TileDB Storage Platform REST API + * + * The version of the OpenAPI document: 2.17.51 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import org.openapitools.client.ApiCallback; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.Pair; +import org.openapitools.client.ProgressRequestBody; +import org.openapitools.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import org.openapitools.client.model.AssetListResponse; +import org.openapitools.client.model.ChangeAssetCredentialsRequest; +import org.openapitools.client.model.Error; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class AssetsApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public AssetsApi() { + this(Configuration.getDefaultApiClient()); + } + + public AssetsApi(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 changeAssetCredentials + * @param namespace The namespace to send the request on behalf of. (required) + * @param changeCredentialsRequest aws access credentials to store for a namespace (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 +
Response Details
Status Code Description Response Headers
200 sidebar metadata for task definitions for all arrays user has access to -
404 array tasks not found -
+ + + + + +
Response Details
Status Code Description Response Headers
204 Credentials changed successfully -
502 Bad Gateway -
0 error response -
+ */ + public okhttp3.Call changeAssetCredentialsCall(String namespace, ChangeAssetCredentialsRequest changeCredentialsRequest, 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 = changeCredentialsRequest; + + // create path and map variables + String localVarPath = "/assets/{namespace}/change_credentials" + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.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[] { "BasicAuth", "ApiKeyAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call changeAssetCredentialsValidateBeforeCall(String namespace, ChangeAssetCredentialsRequest changeCredentialsRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'namespace' is set + if (namespace == null) { + throw new ApiException("Missing the required parameter 'namespace' when calling changeAssetCredentials(Async)"); + } + + // verify the required parameter 'changeCredentialsRequest' is set + if (changeCredentialsRequest == null) { + throw new ApiException("Missing the required parameter 'changeCredentialsRequest' when calling changeAssetCredentials(Async)"); + } + + return changeAssetCredentialsCall(namespace, changeCredentialsRequest, _callback); + + } + + /** + * + * Changes the access credentials to the given assets + * @param namespace The namespace to send the request on behalf of. (required) + * @param changeCredentialsRequest aws access credentials to store for a namespace (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Response Details
Status Code Description Response Headers
204 Credentials changed successfully -
502 Bad Gateway -
0 error response -
+ */ + public void changeAssetCredentials(String namespace, ChangeAssetCredentialsRequest changeCredentialsRequest) throws ApiException { + changeAssetCredentialsWithHttpInfo(namespace, changeCredentialsRequest); + } + + /** + * + * Changes the access credentials to the given assets + * @param namespace The namespace to send the request on behalf of. (required) + * @param changeCredentialsRequest aws access credentials to store for a namespace (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 + + + + + + +
Response Details
Status Code Description Response Headers
204 Credentials changed successfully -
502 Bad Gateway -
0 error response -
+ */ + public ApiResponse changeAssetCredentialsWithHttpInfo(String namespace, ChangeAssetCredentialsRequest changeCredentialsRequest) throws ApiException { + okhttp3.Call localVarCall = changeAssetCredentialsValidateBeforeCall(namespace, changeCredentialsRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) + * Changes the access credentials to the given assets + * @param namespace The namespace to send the request on behalf of. (required) + * @param changeCredentialsRequest aws access credentials to store for a namespace (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 + + + + + + +
Response Details
Status Code Description Response Headers
204 Credentials changed successfully -
502 Bad Gateway -
0 error response -
+ */ + public okhttp3.Call changeAssetCredentialsAsync(String namespace, ChangeAssetCredentialsRequest changeCredentialsRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = changeAssetCredentialsValidateBeforeCall(namespace, changeCredentialsRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for listAssets + * @param namespace namespace (required) + * @param assetType asset_type to filter to (optional) + * @param ownershipLevel ownership_level to filter to (owned, shared) (optional) + * @param depth depth of assets to be returned (optional) + * @param search search string (optional) + * @param page pagination offset (optional) + * @param perPage pagination limit (optional) + * @param orderBy order by a specific property, defaults to `created_at desc` supported values are created_at, name, asset_type can also include the order type (asc or desc) separated by space i.e. `name asc` `name desc` etc. (optional) + * @param expand expansion option for the AssetInfo object to be added to the response (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 + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful list of assets -
502 Bad Gateway -
0 error response -
+ */ + public okhttp3.Call listAssetsCall(String namespace, String assetType, String ownershipLevel, String depth, String search, Integer page, Integer perPage, String orderBy, String expand, 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 = "/assets/{namespace}" + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (assetType != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("asset_type", assetType)); + } + + if (ownershipLevel != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("ownership_level", ownershipLevel)); + } + + if (depth != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("depth", depth)); + } + + if (search != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("search", search)); + } + + if (page != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); + } + + if (perPage != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("per_page", perPage)); + } + + if (orderBy != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("order_by", orderBy)); + } + + if (expand != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("expand", expand)); + } + + 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[] { "BasicAuth", "ApiKeyAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call listAssetsValidateBeforeCall(String namespace, String assetType, String ownershipLevel, String depth, String search, Integer page, Integer perPage, String orderBy, String expand, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'namespace' is set + if (namespace == null) { + throw new ApiException("Missing the required parameter 'namespace' when calling listAssets(Async)"); + } + + return listAssetsCall(namespace, assetType, ownershipLevel, depth, search, page, perPage, orderBy, expand, _callback); + + } + + /** + * + * List assets in a namespace + * @param namespace namespace (required) + * @param assetType asset_type to filter to (optional) + * @param ownershipLevel ownership_level to filter to (owned, shared) (optional) + * @param depth depth of assets to be returned (optional) + * @param search search string (optional) + * @param page pagination offset (optional) + * @param perPage pagination limit (optional) + * @param orderBy order by a specific property, defaults to `created_at desc` supported values are created_at, name, asset_type can also include the order type (asc or desc) separated by space i.e. `name asc` `name desc` etc. (optional) + * @param expand expansion option for the AssetInfo object to be added to the response (optional) + * @return AssetListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful list of assets -
502 Bad Gateway -
0 error response -
+ */ + public AssetListResponse listAssets(String namespace, String assetType, String ownershipLevel, String depth, String search, Integer page, Integer perPage, String orderBy, String expand) throws ApiException { + ApiResponse localVarResp = listAssetsWithHttpInfo(namespace, assetType, ownershipLevel, depth, search, page, perPage, orderBy, expand); + return localVarResp.getData(); + } + + /** + * + * List assets in a namespace + * @param namespace namespace (required) + * @param assetType asset_type to filter to (optional) + * @param ownershipLevel ownership_level to filter to (owned, shared) (optional) + * @param depth depth of assets to be returned (optional) + * @param search search string (optional) + * @param page pagination offset (optional) + * @param perPage pagination limit (optional) + * @param orderBy order by a specific property, defaults to `created_at desc` supported values are created_at, name, asset_type can also include the order type (asc or desc) separated by space i.e. `name asc` `name desc` etc. (optional) + * @param expand expansion option for the AssetInfo object to be added to the response (optional) + * @return ApiResponse<AssetListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful list of assets -
502 Bad Gateway -
0 error response -
+ */ + public ApiResponse listAssetsWithHttpInfo(String namespace, String assetType, String ownershipLevel, String depth, String search, Integer page, Integer perPage, String orderBy, String expand) throws ApiException { + okhttp3.Call localVarCall = listAssetsValidateBeforeCall(namespace, assetType, ownershipLevel, depth, search, page, perPage, orderBy, expand, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * List assets in a namespace + * @param namespace namespace (required) + * @param assetType asset_type to filter to (optional) + * @param ownershipLevel ownership_level to filter to (owned, shared) (optional) + * @param depth depth of assets to be returned (optional) + * @param search search string (optional) + * @param page pagination offset (optional) + * @param perPage pagination limit (optional) + * @param orderBy order by a specific property, defaults to `created_at desc` supported values are created_at, name, asset_type can also include the order type (asc or desc) separated by space i.e. `name asc` `name desc` etc. (optional) + * @param expand expansion option for the AssetInfo object to be added to the response (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 + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful list of assets -
502 Bad Gateway -
0 error response -
+ */ + public okhttp3.Call listAssetsAsync(String namespace, String assetType, String ownershipLevel, String depth, String search, Integer page, Integer perPage, String orderBy, String expand, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = listAssetsValidateBeforeCall(namespace, assetType, ownershipLevel, depth, search, page, perPage, orderBy, expand, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for listPublicAssets + * @param assetType asset_type to filter to (optional) + * @param depth depth of assets to be returned (optional) + * @param search search string (optional) + * @param page pagination offset (optional) + * @param perPage pagination limit (optional) + * @param orderBy order by a specific property, defaults to `created_at desc` supported values are created_at, name, asset_type can also include the order type (asc or desc) separated by space i.e. `name asc` `name desc` etc. (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 + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful list of assets -
502 Bad Gateway -
0 error response -
+ */ + public okhttp3.Call listPublicAssetsCall(String assetType, String depth, String search, Integer page, Integer perPage, String orderBy, 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 = "/public_assets"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (assetType != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("asset_type", assetType)); + } + + if (depth != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("depth", depth)); + } + + if (search != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("search", search)); + } + + if (page != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); + } + + if (perPage != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("per_page", perPage)); + } + + if (orderBy != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("order_by", orderBy)); + } + + 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[] { "BasicAuth", "ApiKeyAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call listPublicAssetsValidateBeforeCall(String assetType, String depth, String search, Integer page, Integer perPage, String orderBy, final ApiCallback _callback) throws ApiException { + return listPublicAssetsCall(assetType, depth, search, page, perPage, orderBy, _callback); + + } + + /** + * + * List public assets + * @param assetType asset_type to filter to (optional) + * @param depth depth of assets to be returned (optional) + * @param search search string (optional) + * @param page pagination offset (optional) + * @param perPage pagination limit (optional) + * @param orderBy order by a specific property, defaults to `created_at desc` supported values are created_at, name, asset_type can also include the order type (asc or desc) separated by space i.e. `name asc` `name desc` etc. (optional) + * @return AssetListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful list of assets -
502 Bad Gateway -
0 error response -
+ */ + public AssetListResponse listPublicAssets(String assetType, String depth, String search, Integer page, Integer perPage, String orderBy) throws ApiException { + ApiResponse localVarResp = listPublicAssetsWithHttpInfo(assetType, depth, search, page, perPage, orderBy); + return localVarResp.getData(); + } + + /** + * + * List public assets + * @param assetType asset_type to filter to (optional) + * @param depth depth of assets to be returned (optional) + * @param search search string (optional) + * @param page pagination offset (optional) + * @param perPage pagination limit (optional) + * @param orderBy order by a specific property, defaults to `created_at desc` supported values are created_at, name, asset_type can also include the order type (asc or desc) separated by space i.e. `name asc` `name desc` etc. (optional) + * @return ApiResponse<AssetListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful list of assets -
502 Bad Gateway -
0 error response -
+ */ + public ApiResponse listPublicAssetsWithHttpInfo(String assetType, String depth, String search, Integer page, Integer perPage, String orderBy) throws ApiException { + okhttp3.Call localVarCall = listPublicAssetsValidateBeforeCall(assetType, depth, search, page, perPage, orderBy, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * List public assets + * @param assetType asset_type to filter to (optional) + * @param depth depth of assets to be returned (optional) + * @param search search string (optional) + * @param page pagination offset (optional) + * @param perPage pagination limit (optional) + * @param orderBy order by a specific property, defaults to `created_at desc` supported values are created_at, name, asset_type can also include the order type (asc or desc) separated by space i.e. `name asc` `name desc` etc. (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 + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful list of assets -
502 Bad Gateway -
0 error response -
+ */ + public okhttp3.Call listPublicAssetsAsync(String assetType, String depth, String search, Integer page, Integer perPage, String orderBy, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = listPublicAssetsValidateBeforeCall(assetType, depth, search, page, perPage, orderBy, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/io/tiledb/cloud/rest_api/api/FavoritesApi.java b/src/main/java/io/tiledb/cloud/rest_api/api/FavoritesApi.java index 93d56f5..792ed63 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/api/FavoritesApi.java +++ b/src/main/java/io/tiledb/cloud/rest_api/api/FavoritesApi.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,26 +11,31 @@ */ -package io.tiledb.cloud.rest_api.api; +package org.openapitools.client.api; -import io.tiledb.cloud.rest_api.ApiCallback; -import io.tiledb.cloud.rest_api.ApiClient; -import io.tiledb.cloud.rest_api.ApiException; -import io.tiledb.cloud.rest_api.ApiResponse; -import io.tiledb.cloud.rest_api.Configuration; -import io.tiledb.cloud.rest_api.Pair; +import org.openapitools.client.ApiCallback; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.Pair; +import org.openapitools.client.ProgressRequestBody; +import org.openapitools.client.ProgressResponseBody; import com.google.gson.reflect.TypeToken; +import java.io.IOException; -import io.tiledb.cloud.rest_api.model.ArrayFavorite; -import io.tiledb.cloud.rest_api.model.ArrayFavoritesData; -import io.tiledb.cloud.rest_api.model.MLModelFavorite; -import io.tiledb.cloud.rest_api.model.MLModelFavoritesData; -import io.tiledb.cloud.rest_api.model.NotebookFavorite; -import io.tiledb.cloud.rest_api.model.NotebookFavoritesData; -import io.tiledb.cloud.rest_api.model.UDFFavorite; -import io.tiledb.cloud.rest_api.model.UDFFavoritesData; + +import org.openapitools.client.model.ArrayFavorite; +import org.openapitools.client.model.ArrayFavoritesData; +import org.openapitools.client.model.Error; +import org.openapitools.client.model.MLModelFavorite; +import org.openapitools.client.model.MLModelFavoritesData; +import org.openapitools.client.model.NotebookFavorite; +import org.openapitools.client.model.NotebookFavoritesData; +import org.openapitools.client.model.UDFFavorite; +import org.openapitools.client.model.UDFFavoritesData; import java.lang.reflect.Type; import java.util.ArrayList; @@ -83,7 +88,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -108,8 +114,8 @@ public okhttp3.Call addArrayFavoriteCall(String namespace, String name, final Ap // create path and map variables String localVarPath = "/arrays/favorites/{namespace}/{name}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -126,33 +132,29 @@ public okhttp3.Call addArrayFavoriteCall(String namespace, String name, final Ap } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call addArrayFavoriteValidateBeforeCall(String namespace, String name, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling addArrayFavorite(Async)"); } - + // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling addArrayFavorite(Async)"); } - - okhttp3.Call localVarCall = addArrayFavoriteCall(namespace, name, _callback); - return localVarCall; + return addArrayFavoriteCall(namespace, name, _callback); } @@ -163,7 +165,8 @@ private okhttp3.Call addArrayFavoriteValidateBeforeCall(String namespace, String * @param name The name of the array (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Item added to favorites successfully -
502 Bad Gateway -
+
+ @@ -182,7 +185,8 @@ public void addArrayFavorite(String namespace, String name) throws ApiException * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Item added to favorites successfully -
502 Bad Gateway -
+
+ @@ -203,7 +207,8 @@ public ApiResponse addArrayFavoriteWithHttpInfo(String namespace, String n * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Item added to favorites successfully -
502 Bad Gateway -
+
+ @@ -224,7 +229,8 @@ public okhttp3.Call addArrayFavoriteAsync(String namespace, String name, final A * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Item added to favorites successfully -
502 Bad Gateway -
+
+ @@ -249,8 +255,8 @@ public okhttp3.Call addMLModelFavoriteCall(String namespace, String name, final // create path and map variables String localVarPath = "/ml_models/favorites/{namespace}/{name}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -267,33 +273,29 @@ public okhttp3.Call addMLModelFavoriteCall(String namespace, String name, final } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call addMLModelFavoriteValidateBeforeCall(String namespace, String name, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling addMLModelFavorite(Async)"); } - + // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling addMLModelFavorite(Async)"); } - - okhttp3.Call localVarCall = addMLModelFavoriteCall(namespace, name, _callback); - return localVarCall; + return addMLModelFavoriteCall(namespace, name, _callback); } @@ -304,7 +306,8 @@ private okhttp3.Call addMLModelFavoriteValidateBeforeCall(String namespace, Stri * @param name The name of the ML model (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Item added to favorites successfully -
502 Bad Gateway -
+
+ @@ -323,7 +326,8 @@ public void addMLModelFavorite(String namespace, String name) throws ApiExceptio * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Item added to favorites successfully -
502 Bad Gateway -
+
+ @@ -344,7 +348,8 @@ public ApiResponse addMLModelFavoriteWithHttpInfo(String namespace, String * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Item added to favorites successfully -
502 Bad Gateway -
+
+ @@ -365,7 +370,8 @@ public okhttp3.Call addMLModelFavoriteAsync(String namespace, String name, final * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Item added to favorites successfully -
502 Bad Gateway -
+
+ @@ -390,8 +396,8 @@ public okhttp3.Call addNotebookFavoriteCall(String namespace, String name, final // create path and map variables String localVarPath = "/notebooks/favorites/{namespace}/{name}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -408,33 +414,29 @@ public okhttp3.Call addNotebookFavoriteCall(String namespace, String name, final } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call addNotebookFavoriteValidateBeforeCall(String namespace, String name, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling addNotebookFavorite(Async)"); } - + // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling addNotebookFavorite(Async)"); } - - okhttp3.Call localVarCall = addNotebookFavoriteCall(namespace, name, _callback); - return localVarCall; + return addNotebookFavoriteCall(namespace, name, _callback); } @@ -445,7 +447,8 @@ private okhttp3.Call addNotebookFavoriteValidateBeforeCall(String namespace, Str * @param name The name of the notebook (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Item added to favorites successfully -
502 Bad Gateway -
+
+ @@ -464,7 +467,8 @@ public void addNotebookFavorite(String namespace, String name) throws ApiExcepti * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Item added to favorites successfully -
502 Bad Gateway -
+
+ @@ -485,7 +489,8 @@ public ApiResponse addNotebookFavoriteWithHttpInfo(String namespace, Strin * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Item added to favorites successfully -
502 Bad Gateway -
+
+ @@ -506,7 +511,8 @@ public okhttp3.Call addNotebookFavoriteAsync(String namespace, String name, fina * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Item added to favorites successfully -
502 Bad Gateway -
+
+ @@ -531,8 +537,8 @@ public okhttp3.Call addUDFFavoriteCall(String namespace, String name, final ApiC // create path and map variables String localVarPath = "/udfs/favorites/{namespace}/{name}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -549,33 +555,29 @@ public okhttp3.Call addUDFFavoriteCall(String namespace, String name, final ApiC } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call addUDFFavoriteValidateBeforeCall(String namespace, String name, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling addUDFFavorite(Async)"); } - + // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling addUDFFavorite(Async)"); } - - okhttp3.Call localVarCall = addUDFFavoriteCall(namespace, name, _callback); - return localVarCall; + return addUDFFavoriteCall(namespace, name, _callback); } @@ -586,7 +588,8 @@ private okhttp3.Call addUDFFavoriteValidateBeforeCall(String namespace, String n * @param name The name of the UDF (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Item added to favorites successfully -
502 Bad Gateway -
+
+ @@ -605,7 +608,8 @@ public void addUDFFavorite(String namespace, String name) throws ApiException { * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Item added to favorites successfully -
502 Bad Gateway -
+
+ @@ -626,7 +630,8 @@ public ApiResponse addUDFFavoriteWithHttpInfo(String namespace, String nam * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Item added to favorites successfully -
502 Bad Gateway -
+
+ @@ -647,7 +652,8 @@ public okhttp3.Call addUDFFavoriteAsync(String namespace, String name, final Api * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Item added to favorites successfully -
502 Bad Gateway -
+
+ @@ -672,8 +678,8 @@ public okhttp3.Call deleteArrayFavoriteCall(String namespace, String name, final // create path and map variables String localVarPath = "/arrays/favorites/{namespace}/{name}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -690,33 +696,29 @@ public okhttp3.Call deleteArrayFavoriteCall(String namespace, String name, final } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteArrayFavoriteValidateBeforeCall(String namespace, String name, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling deleteArrayFavorite(Async)"); } - + // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling deleteArrayFavorite(Async)"); } - - okhttp3.Call localVarCall = deleteArrayFavoriteCall(namespace, name, _callback); - return localVarCall; + return deleteArrayFavoriteCall(namespace, name, _callback); } @@ -727,7 +729,8 @@ private okhttp3.Call deleteArrayFavoriteValidateBeforeCall(String namespace, Str * @param name The name of the array (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 array favorite item deleted successfully -
502 Bad Gateway -
+
+ @@ -746,7 +749,8 @@ public void deleteArrayFavorite(String namespace, String name) throws ApiExcepti * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 array favorite item deleted successfully -
502 Bad Gateway -
+
+ @@ -767,7 +771,8 @@ public ApiResponse deleteArrayFavoriteWithHttpInfo(String namespace, Strin * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 array favorite item deleted successfully -
502 Bad Gateway -
+
+ @@ -788,7 +793,8 @@ public okhttp3.Call deleteArrayFavoriteAsync(String namespace, String name, fina * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 array favorite item deleted successfully -
502 Bad Gateway -
+
+ @@ -813,8 +819,8 @@ public okhttp3.Call deleteMLModelFavoriteCall(String namespace, String name, fin // create path and map variables String localVarPath = "/ml_models/favorites/{namespace}/{name}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -831,33 +837,29 @@ public okhttp3.Call deleteMLModelFavoriteCall(String namespace, String name, fin } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteMLModelFavoriteValidateBeforeCall(String namespace, String name, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling deleteMLModelFavorite(Async)"); } - + // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling deleteMLModelFavorite(Async)"); } - - okhttp3.Call localVarCall = deleteMLModelFavoriteCall(namespace, name, _callback); - return localVarCall; + return deleteMLModelFavoriteCall(namespace, name, _callback); } @@ -868,7 +870,8 @@ private okhttp3.Call deleteMLModelFavoriteValidateBeforeCall(String namespace, S * @param name The name of the ML model (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 ML model favorite item deleted successfully -
502 Bad Gateway -
+
+ @@ -887,7 +890,8 @@ public void deleteMLModelFavorite(String namespace, String name) throws ApiExcep * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 ML model favorite item deleted successfully -
502 Bad Gateway -
+
+ @@ -908,7 +912,8 @@ public ApiResponse deleteMLModelFavoriteWithHttpInfo(String namespace, Str * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 ML model favorite item deleted successfully -
502 Bad Gateway -
+
+ @@ -929,7 +934,8 @@ public okhttp3.Call deleteMLModelFavoriteAsync(String namespace, String name, fi * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 ML model favorite item deleted successfully -
502 Bad Gateway -
+
+ @@ -954,8 +960,8 @@ public okhttp3.Call deleteNotebookFavoriteCall(String namespace, String name, fi // create path and map variables String localVarPath = "/notebooks/favorites/{namespace}/{name}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -972,33 +978,29 @@ public okhttp3.Call deleteNotebookFavoriteCall(String namespace, String name, fi } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteNotebookFavoriteValidateBeforeCall(String namespace, String name, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling deleteNotebookFavorite(Async)"); } - + // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling deleteNotebookFavorite(Async)"); } - - okhttp3.Call localVarCall = deleteNotebookFavoriteCall(namespace, name, _callback); - return localVarCall; + return deleteNotebookFavoriteCall(namespace, name, _callback); } @@ -1009,7 +1011,8 @@ private okhttp3.Call deleteNotebookFavoriteValidateBeforeCall(String namespace, * @param name The name of the notebook (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 notebook favorite item deleted successfully -
502 Bad Gateway -
+
+ @@ -1028,7 +1031,8 @@ public void deleteNotebookFavorite(String namespace, String name) throws ApiExce * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 notebook favorite item deleted successfully -
502 Bad Gateway -
+
+ @@ -1049,7 +1053,8 @@ public ApiResponse deleteNotebookFavoriteWithHttpInfo(String namespace, St * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 notebook favorite item deleted successfully -
502 Bad Gateway -
+
+ @@ -1070,7 +1075,8 @@ public okhttp3.Call deleteNotebookFavoriteAsync(String namespace, String name, f * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 notebook favorite item deleted successfully -
502 Bad Gateway -
+
+ @@ -1095,8 +1101,8 @@ public okhttp3.Call deleteUDFFavoriteCall(String namespace, String name, final A // create path and map variables String localVarPath = "/udfs/favorites/{namespace}/{name}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1113,33 +1119,29 @@ public okhttp3.Call deleteUDFFavoriteCall(String namespace, String name, final A } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteUDFFavoriteValidateBeforeCall(String namespace, String name, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling deleteUDFFavorite(Async)"); } - + // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling deleteUDFFavorite(Async)"); } - - okhttp3.Call localVarCall = deleteUDFFavoriteCall(namespace, name, _callback); - return localVarCall; + return deleteUDFFavoriteCall(namespace, name, _callback); } @@ -1150,7 +1152,8 @@ private okhttp3.Call deleteUDFFavoriteValidateBeforeCall(String namespace, Strin * @param name The name of the UDF (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 UDF favorite item deleted successfully -
502 Bad Gateway -
+
+ @@ -1169,7 +1172,8 @@ public void deleteUDFFavorite(String namespace, String name) throws ApiException * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 UDF favorite item deleted successfully -
502 Bad Gateway -
+
+ @@ -1190,7 +1194,8 @@ public ApiResponse deleteUDFFavoriteWithHttpInfo(String namespace, String * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 UDF favorite item deleted successfully -
502 Bad Gateway -
+
+ @@ -1211,7 +1216,8 @@ public okhttp3.Call deleteUDFFavoriteAsync(String namespace, String name, final * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 UDF favorite item deleted successfully -
502 Bad Gateway -
+
+ @@ -1236,8 +1242,8 @@ public okhttp3.Call getArrayFavoriteCall(String namespace, String name, final Ap // create path and map variables String localVarPath = "/arrays/favorites/{namespace}/{name}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1254,33 +1260,29 @@ public okhttp3.Call getArrayFavoriteCall(String namespace, String name, final Ap } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getArrayFavoriteValidateBeforeCall(String namespace, String name, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling getArrayFavorite(Async)"); } - + // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling getArrayFavorite(Async)"); } - - okhttp3.Call localVarCall = getArrayFavoriteCall(namespace, name, _callback); - return localVarCall; + return getArrayFavoriteCall(namespace, name, _callback); } @@ -1292,7 +1294,8 @@ private okhttp3.Call getArrayFavoriteValidateBeforeCall(String namespace, String * @return ArrayFavorite * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 OK -
502 Bad Gateway -
+
+ @@ -1312,7 +1315,8 @@ public ArrayFavorite getArrayFavorite(String namespace, String name) throws ApiE * @return ApiResponse<ArrayFavorite> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 OK -
502 Bad Gateway -
+
+ @@ -1334,7 +1338,8 @@ public ApiResponse getArrayFavoriteWithHttpInfo(String namespace, * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 OK -
502 Bad Gateway -
+
+ @@ -1356,7 +1361,8 @@ public okhttp3.Call getArrayFavoriteAsync(String namespace, String name, final A * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 OK -
502 Bad Gateway -
+
+ @@ -1381,8 +1387,8 @@ public okhttp3.Call getMLModelFavoriteCall(String namespace, String name, final // create path and map variables String localVarPath = "/ml_models/favorites/{namespace}/{name}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1399,33 +1405,29 @@ public okhttp3.Call getMLModelFavoriteCall(String namespace, String name, final } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getMLModelFavoriteValidateBeforeCall(String namespace, String name, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling getMLModelFavorite(Async)"); } - + // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling getMLModelFavorite(Async)"); } - - okhttp3.Call localVarCall = getMLModelFavoriteCall(namespace, name, _callback); - return localVarCall; + return getMLModelFavoriteCall(namespace, name, _callback); } @@ -1437,7 +1439,8 @@ private okhttp3.Call getMLModelFavoriteValidateBeforeCall(String namespace, Stri * @return MLModelFavorite * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 OK -
502 Bad Gateway -
+
+ @@ -1457,7 +1460,8 @@ public MLModelFavorite getMLModelFavorite(String namespace, String name) throws * @return ApiResponse<MLModelFavorite> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 OK -
502 Bad Gateway -
+
+ @@ -1479,7 +1483,8 @@ public ApiResponse getMLModelFavoriteWithHttpInfo(String namesp * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 OK -
502 Bad Gateway -
+
+ @@ -1501,7 +1506,8 @@ public okhttp3.Call getMLModelFavoriteAsync(String namespace, String name, final * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 OK -
502 Bad Gateway -
+
+ @@ -1526,8 +1532,8 @@ public okhttp3.Call getNotebookFavoriteCall(String namespace, String name, final // create path and map variables String localVarPath = "/notebooks/favorites/{namespace}/{name}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1544,33 +1550,29 @@ public okhttp3.Call getNotebookFavoriteCall(String namespace, String name, final } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getNotebookFavoriteValidateBeforeCall(String namespace, String name, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling getNotebookFavorite(Async)"); } - + // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling getNotebookFavorite(Async)"); } - - okhttp3.Call localVarCall = getNotebookFavoriteCall(namespace, name, _callback); - return localVarCall; + return getNotebookFavoriteCall(namespace, name, _callback); } @@ -1582,7 +1584,8 @@ private okhttp3.Call getNotebookFavoriteValidateBeforeCall(String namespace, Str * @return NotebookFavorite * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 OK -
502 Bad Gateway -
+
+ @@ -1602,7 +1605,8 @@ public NotebookFavorite getNotebookFavorite(String namespace, String name) throw * @return ApiResponse<NotebookFavorite> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 OK -
502 Bad Gateway -
+
+ @@ -1624,7 +1628,8 @@ public ApiResponse getNotebookFavoriteWithHttpInfo(String name * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 OK -
502 Bad Gateway -
+
+ @@ -1646,7 +1651,8 @@ public okhttp3.Call getNotebookFavoriteAsync(String namespace, String name, fina * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 OK -
502 Bad Gateway -
+
+ @@ -1671,8 +1677,8 @@ public okhttp3.Call getUDFFavoriteCall(String namespace, String name, final ApiC // create path and map variables String localVarPath = "/udfs/favorites/{namespace}/{name}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1689,33 +1695,29 @@ public okhttp3.Call getUDFFavoriteCall(String namespace, String name, final ApiC } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getUDFFavoriteValidateBeforeCall(String namespace, String name, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling getUDFFavorite(Async)"); } - + // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling getUDFFavorite(Async)"); } - - okhttp3.Call localVarCall = getUDFFavoriteCall(namespace, name, _callback); - return localVarCall; + return getUDFFavoriteCall(namespace, name, _callback); } @@ -1727,7 +1729,8 @@ private okhttp3.Call getUDFFavoriteValidateBeforeCall(String namespace, String n * @return UDFFavorite * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 OK -
502 Bad Gateway -
+
+ @@ -1747,7 +1750,8 @@ public UDFFavorite getUDFFavorite(String namespace, String name) throws ApiExcep * @return ApiResponse<UDFFavorite> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 OK -
502 Bad Gateway -
+
+ @@ -1769,7 +1773,8 @@ public ApiResponse getUDFFavoriteWithHttpInfo(String namespace, Str * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 OK -
502 Bad Gateway -
+
+ @@ -1791,7 +1796,8 @@ public okhttp3.Call getUDFFavoriteAsync(String namespace, String name, final Api * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 OK -
502 Bad Gateway -
+
+ @@ -1840,23 +1846,19 @@ public okhttp3.Call listArrayFavoritesCall(Integer page, Integer perPage, final } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listArrayFavoritesValidateBeforeCall(Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = listArrayFavoritesCall(page, perPage, _callback); - return localVarCall; + return listArrayFavoritesCall(page, perPage, _callback); } @@ -1868,7 +1870,8 @@ private okhttp3.Call listArrayFavoritesValidateBeforeCall(Integer page, Integer * @return ArrayFavoritesData * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Available array favorites are returned -
502 Bad Gateway -
+
+ @@ -1888,7 +1891,8 @@ public ArrayFavoritesData listArrayFavorites(Integer page, Integer perPage) thro * @return ApiResponse<ArrayFavoritesData> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Available array favorites are returned -
502 Bad Gateway -
+
+ @@ -1910,7 +1914,8 @@ public ApiResponse listArrayFavoritesWithHttpInfo(Integer pa * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Available array favorites are returned -
502 Bad Gateway -
+
+ @@ -1930,7 +1935,8 @@ public okhttp3.Call listArrayFavoritesAsync(Integer page, Integer perPage, final * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Available array favorites are returned -
502 Bad Gateway -
+
+ @@ -1971,23 +1977,19 @@ public okhttp3.Call listArrayFavoritesUUIDsCall(final ApiCallback _callback) thr } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listArrayFavoritesUUIDsValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = listArrayFavoritesUUIDsCall(_callback); - return localVarCall; + return listArrayFavoritesUUIDsCall(_callback); } @@ -1997,7 +1999,8 @@ private okhttp3.Call listArrayFavoritesUUIDsValidateBeforeCall(final ApiCallback * @return List<ArrayFavorite> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Available favorites array uuids are returned -
502 Bad Gateway -
+
+ @@ -2015,7 +2018,8 @@ public List listArrayFavoritesUUIDs() throws ApiException { * @return ApiResponse<List<ArrayFavorite>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Available favorites array uuids are returned -
502 Bad Gateway -
+
+ @@ -2035,7 +2039,8 @@ public ApiResponse> listArrayFavoritesUUIDsWithHttpInfo() th * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Available favorites array uuids are returned -
502 Bad Gateway -
+
+ @@ -2057,7 +2062,8 @@ public okhttp3.Call listArrayFavoritesUUIDsAsync(final ApiCallback +
Response Details
Status Code Description Response Headers
200 Available favorites array uuids are returned -
502 Bad Gateway -
+ @@ -2106,23 +2112,19 @@ public okhttp3.Call listMLModelFavoritesCall(Integer page, Integer perPage, fina } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listMLModelFavoritesValidateBeforeCall(Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = listMLModelFavoritesCall(page, perPage, _callback); - return localVarCall; + return listMLModelFavoritesCall(page, perPage, _callback); } @@ -2134,7 +2136,8 @@ private okhttp3.Call listMLModelFavoritesValidateBeforeCall(Integer page, Intege * @return MLModelFavoritesData * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Available ML models favorites are returned -
502 Bad Gateway -
+
+ @@ -2154,7 +2157,8 @@ public MLModelFavoritesData listMLModelFavorites(Integer page, Integer perPage) * @return ApiResponse<MLModelFavoritesData> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Available ML models favorites are returned -
502 Bad Gateway -
+
+ @@ -2176,7 +2180,8 @@ public ApiResponse listMLModelFavoritesWithHttpInfo(Intege * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Available ML models favorites are returned -
502 Bad Gateway -
+
+ @@ -2196,7 +2201,8 @@ public okhttp3.Call listMLModelFavoritesAsync(Integer page, Integer perPage, fin * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Available ML models favorites are returned -
502 Bad Gateway -
+
+ @@ -2237,23 +2243,19 @@ public okhttp3.Call listMLModelFavoritesUUIDsCall(final ApiCallback _callback) t } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listMLModelFavoritesUUIDsValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = listMLModelFavoritesUUIDsCall(_callback); - return localVarCall; + return listMLModelFavoritesUUIDsCall(_callback); } @@ -2263,7 +2265,8 @@ private okhttp3.Call listMLModelFavoritesUUIDsValidateBeforeCall(final ApiCallba * @return List<MLModelFavorite> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Available favorites ML model uuids are returned -
502 Bad Gateway -
+
+ @@ -2281,7 +2284,8 @@ public List listMLModelFavoritesUUIDs() throws ApiException { * @return ApiResponse<List<MLModelFavorite>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Available favorites ML model uuids are returned -
502 Bad Gateway -
+
+ @@ -2301,7 +2305,8 @@ public ApiResponse> listMLModelFavoritesUUIDsWithHttpInfo( * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Available favorites ML model uuids are returned -
502 Bad Gateway -
+
+ @@ -2324,7 +2329,8 @@ public okhttp3.Call listMLModelFavoritesUUIDsAsync(final ApiCallback +
Response Details
Status Code Description Response Headers
200 Available favorites ML model uuids are returned -
502 Bad Gateway -
+ @@ -2377,23 +2383,19 @@ public okhttp3.Call listNotebookFavoritesCall(Boolean isDashboard, Integer page, } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listNotebookFavoritesValidateBeforeCall(Boolean isDashboard, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = listNotebookFavoritesCall(isDashboard, page, perPage, _callback); - return localVarCall; + return listNotebookFavoritesCall(isDashboard, page, perPage, _callback); } @@ -2406,7 +2408,8 @@ private okhttp3.Call listNotebookFavoritesValidateBeforeCall(Boolean isDashboard * @return NotebookFavoritesData * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Available notebook favorites are returned -
502 Bad Gateway -
+
+ @@ -2427,7 +2430,8 @@ public NotebookFavoritesData listNotebookFavorites(Boolean isDashboard, Integer * @return ApiResponse<NotebookFavoritesData> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Available notebook favorites are returned -
502 Bad Gateway -
+
+ @@ -2450,7 +2454,8 @@ public ApiResponse listNotebookFavoritesWithHttpInfo(Bool * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Available notebook favorites are returned -
502 Bad Gateway -
+
+ @@ -2470,7 +2475,8 @@ public okhttp3.Call listNotebookFavoritesAsync(Boolean isDashboard, Integer page * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Available notebook favorites are returned -
502 Bad Gateway -
+
+ @@ -2511,23 +2517,19 @@ public okhttp3.Call listNotebookFavoritesUUIDsCall(final ApiCallback _callback) } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listNotebookFavoritesUUIDsValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = listNotebookFavoritesUUIDsCall(_callback); - return localVarCall; + return listNotebookFavoritesUUIDsCall(_callback); } @@ -2537,7 +2539,8 @@ private okhttp3.Call listNotebookFavoritesUUIDsValidateBeforeCall(final ApiCallb * @return List<NotebookFavorite> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Available favorites notebook uuids are returned -
502 Bad Gateway -
+
+ @@ -2555,7 +2558,8 @@ public List listNotebookFavoritesUUIDs() throws ApiException { * @return ApiResponse<List<NotebookFavorite>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Available favorites notebook uuids are returned -
502 Bad Gateway -
+
+ @@ -2575,7 +2579,8 @@ public ApiResponse> listNotebookFavoritesUUIDsWithHttpInf * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Available favorites notebook uuids are returned -
502 Bad Gateway -
+
+ @@ -2597,7 +2602,8 @@ public okhttp3.Call listNotebookFavoritesUUIDsAsync(final ApiCallback +
Response Details
Status Code Description Response Headers
200 Available favorites notebook uuids are returned -
502 Bad Gateway -
+ @@ -2646,23 +2652,19 @@ public okhttp3.Call listUDFFavoritesCall(Integer page, Integer perPage, final Ap } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listUDFFavoritesValidateBeforeCall(Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = listUDFFavoritesCall(page, perPage, _callback); - return localVarCall; + return listUDFFavoritesCall(page, perPage, _callback); } @@ -2674,7 +2676,8 @@ private okhttp3.Call listUDFFavoritesValidateBeforeCall(Integer page, Integer pe * @return UDFFavoritesData * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Available UDF favorites are returned -
502 Bad Gateway -
+
+ @@ -2694,7 +2697,8 @@ public UDFFavoritesData listUDFFavorites(Integer page, Integer perPage) throws A * @return ApiResponse<UDFFavoritesData> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Available UDF favorites are returned -
502 Bad Gateway -
+
+ @@ -2716,7 +2720,8 @@ public ApiResponse listUDFFavoritesWithHttpInfo(Integer page, * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Available UDF favorites are returned -
502 Bad Gateway -
+
+ @@ -2736,7 +2741,8 @@ public okhttp3.Call listUDFFavoritesAsync(Integer page, Integer perPage, final A * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Available UDF favorites are returned -
502 Bad Gateway -
+
+ @@ -2777,23 +2783,19 @@ public okhttp3.Call listUDFFavoritesUUIDsCall(final ApiCallback _callback) throw } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listUDFFavoritesUUIDsValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = listUDFFavoritesUUIDsCall(_callback); - return localVarCall; + return listUDFFavoritesUUIDsCall(_callback); } @@ -2803,7 +2805,8 @@ private okhttp3.Call listUDFFavoritesUUIDsValidateBeforeCall(final ApiCallback _ * @return List<UDFFavorite> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Available favorites UDF uuids are returned -
502 Bad Gateway -
+
+ @@ -2821,7 +2824,8 @@ public List listUDFFavoritesUUIDs() throws ApiException { * @return ApiResponse<List<UDFFavorite>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Available favorites UDF uuids are returned -
502 Bad Gateway -
+
+ @@ -2841,7 +2845,8 @@ public ApiResponse> listUDFFavoritesUUIDsWithHttpInfo() throws * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Available favorites UDF uuids are returned -
502 Bad Gateway -
+
+ diff --git a/src/main/java/io/tiledb/cloud/rest_api/api/FilesApi.java b/src/main/java/io/tiledb/cloud/rest_api/api/FilesApi.java index e799b94..09362bf 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/api/FilesApi.java +++ b/src/main/java/io/tiledb/cloud/rest_api/api/FilesApi.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,24 +11,29 @@ */ -package io.tiledb.cloud.rest_api.api; +package org.openapitools.client.api; -import io.tiledb.cloud.rest_api.ApiCallback; -import io.tiledb.cloud.rest_api.model.FileCreated; -import io.tiledb.cloud.rest_api.ApiClient; -import io.tiledb.cloud.rest_api.ApiException; -import io.tiledb.cloud.rest_api.ApiResponse; -import io.tiledb.cloud.rest_api.Configuration; -import io.tiledb.cloud.rest_api.Pair; +import org.openapitools.client.ApiCallback; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.Pair; +import org.openapitools.client.ProgressRequestBody; +import org.openapitools.client.ProgressResponseBody; import com.google.gson.reflect.TypeToken; +import java.io.IOException; + +import org.openapitools.client.model.Error; import java.io.File; -import io.tiledb.cloud.rest_api.model.FileCreate; -import io.tiledb.cloud.rest_api.model.FileExport; -import io.tiledb.cloud.rest_api.model.FileExported; -import io.tiledb.cloud.rest_api.model.FileUploaded; +import org.openapitools.client.model.FileCreate; +import org.openapitools.client.model.FileCreated; +import org.openapitools.client.model.FileExport; +import org.openapitools.client.model.FileExported; +import org.openapitools.client.model.FileUploaded; import java.lang.reflect.Type; import java.util.ArrayList; @@ -82,7 +87,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Available favorites UDF uuids are returned -
502 Bad Gateway -
+
+ @@ -107,7 +113,7 @@ public okhttp3.Call handleCreateFileCall(String namespace, FileCreate fileCreate // create path and map variables String localVarPath = "/files/{namespace}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -115,10 +121,6 @@ public okhttp3.Call handleCreateFileCall(String namespace, FileCreate fileCreate Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME != null) { - localVarHeaderParams.put("X-TILEDB-CLOUD-ACCESS-CREDENTIALS-NAME", localVarApiClient.parameterToString(X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME)); - } - final String[] localVarAccepts = { "application/json" }; @@ -135,26 +137,28 @@ public okhttp3.Call handleCreateFileCall(String namespace, FileCreate fileCreate localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + if (X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME != null) { + localVarHeaderParams.put("X-TILEDB-CLOUD-ACCESS-CREDENTIALS-NAME", localVarApiClient.parameterToString(X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME)); + } + + + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call handleCreateFileValidateBeforeCall(String namespace, FileCreate fileCreate, String X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling handleCreateFile(Async)"); } - + // verify the required parameter 'fileCreate' is set if (fileCreate == null) { throw new ApiException("Missing the required parameter 'fileCreate' when calling handleCreateFile(Async)"); } - - okhttp3.Call localVarCall = handleCreateFileCall(namespace, fileCreate, X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME, _callback); - return localVarCall; + return handleCreateFileCall(namespace, fileCreate, X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME, _callback); } @@ -167,7 +171,8 @@ private okhttp3.Call handleCreateFileValidateBeforeCall(String namespace, FileCr * @return FileCreated * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
201 File created -
502 Bad Gateway -
+
+ @@ -188,7 +193,8 @@ public FileCreated handleCreateFile(String namespace, FileCreate fileCreate, Str * @return ApiResponse<FileCreated> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
201 File created -
502 Bad Gateway -
+
+ @@ -211,7 +217,8 @@ public ApiResponse handleCreateFileWithHttpInfo(String namespace, F * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
201 File created -
502 Bad Gateway -
+
+ @@ -234,7 +241,8 @@ public okhttp3.Call handleCreateFileAsync(String namespace, FileCreate fileCreat * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
201 File created -
502 Bad Gateway -
+
+ @@ -259,8 +267,8 @@ public okhttp3.Call handleExportFileCall(String namespace, String _file, FileExp // create path and map variables String localVarPath = "/files/{namespace}/{file}/export" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "file" + "\\}", localVarApiClient.escapeString(_file.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "file" + "}", localVarApiClient.escapeString(_file.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -284,31 +292,28 @@ public okhttp3.Call handleExportFileCall(String namespace, String _file, FileExp localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call handleExportFileValidateBeforeCall(String namespace, String _file, FileExport fileExport, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling handleExportFile(Async)"); } - + // verify the required parameter '_file' is set if (_file == null) { throw new ApiException("Missing the required parameter '_file' when calling handleExportFile(Async)"); } - + // verify the required parameter 'fileExport' is set if (fileExport == null) { throw new ApiException("Missing the required parameter 'fileExport' when calling handleExportFile(Async)"); } - - okhttp3.Call localVarCall = handleExportFileCall(namespace, _file, fileExport, _callback); - return localVarCall; + return handleExportFileCall(namespace, _file, fileExport, _callback); } @@ -321,7 +326,8 @@ private okhttp3.Call handleExportFileValidateBeforeCall(String namespace, String * @return FileExported * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
201 File exported -
502 Bad Gateway -
+
+ @@ -342,7 +348,8 @@ public FileExported handleExportFile(String namespace, String _file, FileExport * @return ApiResponse<FileExported> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
201 File exported -
502 Bad Gateway -
+
+ @@ -365,7 +372,8 @@ public ApiResponse handleExportFileWithHttpInfo(String namespace, * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
201 File exported -
502 Bad Gateway -
+
+ @@ -390,7 +398,8 @@ public okhttp3.Call handleExportFileAsync(String namespace, String _file, FileEx * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
201 File exported -
502 Bad Gateway -
+
+ @@ -415,7 +424,7 @@ public okhttp3.Call handleUploadFileCall(String namespace, File inputFile, Strin // create path and map variables String localVarPath = "/files/{namespace}/upload" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -435,10 +444,6 @@ public okhttp3.Call handleUploadFileCall(String namespace, File inputFile, Strin localVarFormParams.put("name", name); } - if (X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME != null) { - localVarHeaderParams.put("X-TILEDB-CLOUD-ACCESS-CREDENTIALS-NAME", localVarApiClient.parameterToString(X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME)); - } - final String[] localVarAccepts = { "application/json" }; @@ -455,26 +460,28 @@ public okhttp3.Call handleUploadFileCall(String namespace, File inputFile, Strin localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + if (X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME != null) { + localVarHeaderParams.put("X-TILEDB-CLOUD-ACCESS-CREDENTIALS-NAME", localVarApiClient.parameterToString(X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME)); + } + + + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call handleUploadFileValidateBeforeCall(String namespace, File inputFile, String X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME, String outputUri, String name, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling handleUploadFile(Async)"); } - + // verify the required parameter 'inputFile' is set if (inputFile == null) { throw new ApiException("Missing the required parameter 'inputFile' when calling handleUploadFile(Async)"); } - - okhttp3.Call localVarCall = handleUploadFileCall(namespace, inputFile, X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME, outputUri, name, _callback); - return localVarCall; + return handleUploadFileCall(namespace, inputFile, X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME, outputUri, name, _callback); } @@ -489,7 +496,8 @@ private okhttp3.Call handleUploadFileValidateBeforeCall(String namespace, File i * @return FileUploaded * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
201 File uploaded -
502 Bad Gateway -
+
+ @@ -512,7 +520,8 @@ public FileUploaded handleUploadFile(String namespace, File inputFile, String X_ * @return ApiResponse<FileUploaded> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
201 File uploaded -
502 Bad Gateway -
+
+ @@ -537,7 +546,8 @@ public ApiResponse handleUploadFileWithHttpInfo(String namespace, * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
201 File uploaded -
502 Bad Gateway -
+
+ diff --git a/src/main/java/io/tiledb/cloud/rest_api/api/GroupsApi.java b/src/main/java/io/tiledb/cloud/rest_api/api/GroupsApi.java index e817d9d..f1e287c 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/api/GroupsApi.java +++ b/src/main/java/io/tiledb/cloud/rest_api/api/GroupsApi.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,30 +11,35 @@ */ -package io.tiledb.cloud.rest_api.api; +package org.openapitools.client.api; -import io.tiledb.cloud.rest_api.model.GroupSharingRequest; -import io.tiledb.cloud.rest_api.model.GroupUpdate; -import io.tiledb.cloud.rest_api.ApiCallback; -import io.tiledb.cloud.rest_api.ApiClient; -import io.tiledb.cloud.rest_api.ApiException; -import io.tiledb.cloud.rest_api.ApiResponse; -import io.tiledb.cloud.rest_api.Configuration; -import io.tiledb.cloud.rest_api.Pair; +import org.openapitools.client.ApiCallback; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.Pair; +import org.openapitools.client.ProgressRequestBody; +import org.openapitools.client.ProgressResponseBody; import com.google.gson.reflect.TypeToken; +import java.io.IOException; -import io.tiledb.cloud.rest_api.model.GroupActivityResponse; -import io.tiledb.cloud.rest_api.model.GroupBrowserData; -import io.tiledb.cloud.rest_api.model.GroupBrowserFilterData; -import io.tiledb.cloud.rest_api.model.GroupChanges; -import io.tiledb.cloud.rest_api.model.GroupContents; -import io.tiledb.cloud.rest_api.model.GroupContentsFilterData; -import io.tiledb.cloud.rest_api.model.GroupCreate; -import io.tiledb.cloud.rest_api.model.GroupInfo; -import io.tiledb.cloud.rest_api.model.GroupRegister; -import io.tiledb.cloud.rest_api.model.GroupSharing; + +import org.openapitools.client.model.Error; +import org.openapitools.client.model.GroupBrowserData; +import org.openapitools.client.model.GroupBrowserFilterData; +import org.openapitools.client.model.GroupChanges; +import org.openapitools.client.model.GroupContentActivityResponse; +import org.openapitools.client.model.GroupContents; +import org.openapitools.client.model.GroupContentsFilterData; +import org.openapitools.client.model.GroupCreate; +import org.openapitools.client.model.GroupInfo; +import org.openapitools.client.model.GroupRegister; +import org.openapitools.client.model.GroupSharing; +import org.openapitools.client.model.GroupSharingRequest; +import org.openapitools.client.model.GroupUpdate; import java.lang.reflect.Type; import java.util.ArrayList; @@ -88,7 +93,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
201 File uploaded -
502 Bad Gateway -
+
+ @@ -113,8 +119,8 @@ public okhttp3.Call changeGroupContentsCall(String groupNamespace, String groupN // create path and map variables String localVarPath = "/groups/{group_namespace}/{group_name}/contents" - .replaceAll("\\{" + "group_namespace" + "\\}", localVarApiClient.escapeString(groupNamespace.toString())) - .replaceAll("\\{" + "group_name" + "\\}", localVarApiClient.escapeString(groupName.toString())); + .replace("{" + "group_namespace" + "}", localVarApiClient.escapeString(groupNamespace.toString())) + .replace("{" + "group_name" + "}", localVarApiClient.escapeString(groupName.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -138,26 +144,23 @@ public okhttp3.Call changeGroupContentsCall(String groupNamespace, String groupN localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call changeGroupContentsValidateBeforeCall(String groupNamespace, String groupName, GroupChanges groupChanges, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'groupNamespace' is set if (groupNamespace == null) { throw new ApiException("Missing the required parameter 'groupNamespace' when calling changeGroupContents(Async)"); } - + // verify the required parameter 'groupName' is set if (groupName == null) { throw new ApiException("Missing the required parameter 'groupName' when calling changeGroupContents(Async)"); } - - okhttp3.Call localVarCall = changeGroupContentsCall(groupNamespace, groupName, groupChanges, _callback); - return localVarCall; + return changeGroupContentsCall(groupNamespace, groupName, groupChanges, _callback); } @@ -169,7 +172,8 @@ private okhttp3.Call changeGroupContentsValidateBeforeCall(String groupNamespace * @param groupChanges (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 all changes applied successfully -
502 Bad Gateway -
+
+ @@ -189,7 +193,8 @@ public void changeGroupContents(String groupNamespace, String groupName, GroupCh * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 all changes applied successfully -
502 Bad Gateway -
+
+ @@ -211,7 +216,8 @@ public ApiResponse changeGroupContentsWithHttpInfo(String groupNamespace, * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 all changes applied successfully -
502 Bad Gateway -
+
+ @@ -232,7 +238,8 @@ public okhttp3.Call changeGroupContentsAsync(String groupNamespace, String group * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 all changes applied successfully -
502 Bad Gateway -
+
+ @@ -257,7 +264,7 @@ public okhttp3.Call createGroupCall(String namespace, GroupCreate groupCreate, f // create path and map variables String localVarPath = "/groups/{namespace}/create" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -281,21 +288,18 @@ public okhttp3.Call createGroupCall(String namespace, GroupCreate groupCreate, f localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createGroupValidateBeforeCall(String namespace, GroupCreate groupCreate, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling createGroup(Async)"); } - - okhttp3.Call localVarCall = createGroupCall(namespace, groupCreate, _callback); - return localVarCall; + return createGroupCall(namespace, groupCreate, _callback); } @@ -306,7 +310,8 @@ private okhttp3.Call createGroupValidateBeforeCall(String namespace, GroupCreate * @param groupCreate (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 group created successfully -
502 Bad Gateway -
+
+ @@ -325,7 +330,8 @@ public void createGroup(String namespace, GroupCreate groupCreate) throws ApiExc * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 group created successfully -
502 Bad Gateway -
+
+ @@ -346,7 +352,8 @@ public ApiResponse createGroupWithHttpInfo(String namespace, GroupCreate g * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 group created successfully -
502 Bad Gateway -
+
+ @@ -367,7 +374,8 @@ public okhttp3.Call createGroupAsync(String namespace, GroupCreate groupCreate, * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 group created successfully -
502 Bad Gateway -
+
+ @@ -392,8 +400,8 @@ public okhttp3.Call deleteGroupCall(String groupNamespace, String groupName, fin // create path and map variables String localVarPath = "/groups/{group_namespace}/{group_name}" - .replaceAll("\\{" + "group_namespace" + "\\}", localVarApiClient.escapeString(groupNamespace.toString())) - .replaceAll("\\{" + "group_name" + "\\}", localVarApiClient.escapeString(groupName.toString())); + .replace("{" + "group_namespace" + "}", localVarApiClient.escapeString(groupNamespace.toString())) + .replace("{" + "group_name" + "}", localVarApiClient.escapeString(groupName.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -410,33 +418,29 @@ public okhttp3.Call deleteGroupCall(String groupNamespace, String groupName, fin } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteGroupValidateBeforeCall(String groupNamespace, String groupName, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'groupNamespace' is set if (groupNamespace == null) { throw new ApiException("Missing the required parameter 'groupNamespace' when calling deleteGroup(Async)"); } - + // verify the required parameter 'groupName' is set if (groupName == null) { throw new ApiException("Missing the required parameter 'groupName' when calling deleteGroup(Async)"); } - - okhttp3.Call localVarCall = deleteGroupCall(groupNamespace, groupName, _callback); - return localVarCall; + return deleteGroupCall(groupNamespace, groupName, _callback); } @@ -447,7 +451,8 @@ private okhttp3.Call deleteGroupValidateBeforeCall(String groupNamespace, String * @param groupName The unique name or id of the group (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 group deleted successfully -
502 Bad Gateway -
+
+ @@ -466,7 +471,8 @@ public void deleteGroup(String groupNamespace, String groupName) throws ApiExcep * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 group deleted successfully -
502 Bad Gateway -
+
+ @@ -487,7 +493,8 @@ public ApiResponse deleteGroupWithHttpInfo(String groupNamespace, String g * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 group deleted successfully -
502 Bad Gateway -
+
+ @@ -508,7 +515,8 @@ public okhttp3.Call deleteGroupAsync(String groupNamespace, String groupName, fi * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 group deleted successfully -
502 Bad Gateway -
+
+ @@ -533,8 +541,8 @@ public okhttp3.Call getGroupCall(String groupNamespace, String groupName, final // create path and map variables String localVarPath = "/groups/{group_namespace}/{group_name}" - .replaceAll("\\{" + "group_namespace" + "\\}", localVarApiClient.escapeString(groupNamespace.toString())) - .replaceAll("\\{" + "group_name" + "\\}", localVarApiClient.escapeString(groupName.toString())); + .replace("{" + "group_namespace" + "}", localVarApiClient.escapeString(groupNamespace.toString())) + .replace("{" + "group_name" + "}", localVarApiClient.escapeString(groupName.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -551,33 +559,29 @@ public okhttp3.Call getGroupCall(String groupNamespace, String groupName, final } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getGroupValidateBeforeCall(String groupNamespace, String groupName, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'groupNamespace' is set if (groupNamespace == null) { throw new ApiException("Missing the required parameter 'groupNamespace' when calling getGroup(Async)"); } - + // verify the required parameter 'groupName' is set if (groupName == null) { throw new ApiException("Missing the required parameter 'groupName' when calling getGroup(Async)"); } - - okhttp3.Call localVarCall = getGroupCall(groupNamespace, groupName, _callback); - return localVarCall; + return getGroupCall(groupNamespace, groupName, _callback); } @@ -589,7 +593,8 @@ private okhttp3.Call getGroupValidateBeforeCall(String groupNamespace, String gr * @return GroupInfo * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 the group metadata -
502 Bad Gateway -
+
+ @@ -609,7 +614,8 @@ public GroupInfo getGroup(String groupNamespace, String groupName) throws ApiExc * @return ApiResponse<GroupInfo> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 the group metadata -
502 Bad Gateway -
+
+ @@ -631,7 +637,8 @@ public ApiResponse getGroupWithHttpInfo(String groupNamespace, String * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 the group metadata -
502 Bad Gateway -
+
+ @@ -655,7 +662,8 @@ public okhttp3.Call getGroupAsync(String groupNamespace, String groupName, final * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 the group metadata -
502 Bad Gateway -
+
+ @@ -680,8 +688,8 @@ public okhttp3.Call getGroupActivityCall(String groupNamespace, String groupName // create path and map variables String localVarPath = "/groups/{group_namespace}/{group_name}/content_activity" - .replaceAll("\\{" + "group_namespace" + "\\}", localVarApiClient.escapeString(groupNamespace.toString())) - .replaceAll("\\{" + "group_name" + "\\}", localVarApiClient.escapeString(groupName.toString())); + .replace("{" + "group_namespace" + "}", localVarApiClient.escapeString(groupNamespace.toString())) + .replace("{" + "group_name" + "}", localVarApiClient.escapeString(groupName.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -706,33 +714,29 @@ public okhttp3.Call getGroupActivityCall(String groupNamespace, String groupName } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getGroupActivityValidateBeforeCall(String groupNamespace, String groupName, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'groupNamespace' is set if (groupNamespace == null) { throw new ApiException("Missing the required parameter 'groupNamespace' when calling getGroupActivity(Async)"); } - + // verify the required parameter 'groupName' is set if (groupName == null) { throw new ApiException("Missing the required parameter 'groupName' when calling getGroupActivity(Async)"); } - - okhttp3.Call localVarCall = getGroupActivityCall(groupNamespace, groupName, page, perPage, _callback); - return localVarCall; + return getGroupActivityCall(groupNamespace, groupName, page, perPage, _callback); } @@ -743,18 +747,19 @@ private okhttp3.Call getGroupActivityValidateBeforeCall(String groupNamespace, S * @param groupName The unique name or id of the group (required) * @param page pagination offset (optional) * @param perPage pagination limit (optional) - * @return GroupActivityResponse + * @return GroupContentActivityResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Activity logs of group contents along with the pagination metadata -
502 Bad Gateway -
+
+
Response Details
Status Code Description Response Headers
200 Activity logs of group contents along with the pagination metadata -
502 Bad Gateway -
0 error response -
*/ - public GroupActivityResponse getGroupActivity(String groupNamespace, String groupName, Integer page, Integer perPage) throws ApiException { - ApiResponse localVarResp = getGroupActivityWithHttpInfo(groupNamespace, groupName, page, perPage); + public GroupContentActivityResponse getGroupActivity(String groupNamespace, String groupName, Integer page, Integer perPage) throws ApiException { + ApiResponse localVarResp = getGroupActivityWithHttpInfo(groupNamespace, groupName, page, perPage); return localVarResp.getData(); } @@ -765,19 +770,20 @@ public GroupActivityResponse getGroupActivity(String groupNamespace, String grou * @param groupName The unique name or id of the group (required) * @param page pagination offset (optional) * @param perPage pagination limit (optional) - * @return ApiResponse<GroupActivityResponse> + * @return ApiResponse<GroupContentActivityResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 Activity logs of group contents along with the pagination metadata -
502 Bad Gateway -
0 error response -
*/ - public ApiResponse getGroupActivityWithHttpInfo(String groupNamespace, String groupName, Integer page, Integer perPage) throws ApiException { + public ApiResponse getGroupActivityWithHttpInfo(String groupNamespace, String groupName, Integer page, Integer perPage) throws ApiException { okhttp3.Call localVarCall = getGroupActivityValidateBeforeCall(groupNamespace, groupName, page, perPage, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -792,17 +798,18 @@ public ApiResponse getGroupActivityWithHttpInfo(String gr * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 Activity logs of group contents along with the pagination metadata -
502 Bad Gateway -
0 error response -
*/ - public okhttp3.Call getGroupActivityAsync(String groupNamespace, String groupName, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getGroupActivityAsync(String groupNamespace, String groupName, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getGroupActivityValidateBeforeCall(groupNamespace, groupName, page, perPage, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -823,7 +830,8 @@ public okhttp3.Call getGroupActivityAsync(String groupNamespace, String groupNam * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -848,8 +856,8 @@ public okhttp3.Call getGroupContentsCall(String groupNamespace, String groupName // create path and map variables String localVarPath = "/groups/{group_namespace}/{group_name}/contents" - .replaceAll("\\{" + "group_namespace" + "\\}", localVarApiClient.escapeString(groupNamespace.toString())) - .replaceAll("\\{" + "group_name" + "\\}", localVarApiClient.escapeString(groupName.toString())); + .replace("{" + "group_namespace" + "}", localVarApiClient.escapeString(groupNamespace.toString())) + .replace("{" + "group_name" + "}", localVarApiClient.escapeString(groupName.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -902,33 +910,29 @@ public okhttp3.Call getGroupContentsCall(String groupNamespace, String groupName } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getGroupContentsValidateBeforeCall(String groupNamespace, String groupName, Integer page, Integer perPage, String namespace, String search, String orderby, List tag, List excludeTag, List memberType, List excludeMemberType, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'groupNamespace' is set if (groupNamespace == null) { throw new ApiException("Missing the required parameter 'groupNamespace' when calling getGroupContents(Async)"); } - + // verify the required parameter 'groupName' is set if (groupName == null) { throw new ApiException("Missing the required parameter 'groupName' when calling getGroupContents(Async)"); } - - okhttp3.Call localVarCall = getGroupContentsCall(groupNamespace, groupName, page, perPage, namespace, search, orderby, tag, excludeTag, memberType, excludeMemberType, _callback); - return localVarCall; + return getGroupContentsCall(groupNamespace, groupName, page, perPage, namespace, search, orderby, tag, excludeTag, memberType, excludeMemberType, _callback); } @@ -949,7 +953,8 @@ private okhttp3.Call getGroupContentsValidateBeforeCall(String groupNamespace, S * @return GroupContents * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 the group contents -
502 Bad Gateway -
+
+ @@ -978,7 +983,8 @@ public GroupContents getGroupContents(String groupNamespace, String groupName, I * @return ApiResponse<GroupContents> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 the group contents -
502 Bad Gateway -
+
+ @@ -1009,7 +1015,8 @@ public ApiResponse getGroupContentsWithHttpInfo(String groupNames * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 the group contents -
502 Bad Gateway -
+
+ @@ -1031,7 +1038,8 @@ public okhttp3.Call getGroupContentsAsync(String groupNamespace, String groupNam * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 the group contents -
502 Bad Gateway -
+
+ @@ -1057,8 +1065,8 @@ public okhttp3.Call getGroupSharingPoliciesCall(String groupNamespace, String gr // create path and map variables String localVarPath = "/groups/{group_namespace}/{group_name}/share" - .replaceAll("\\{" + "group_namespace" + "\\}", localVarApiClient.escapeString(groupNamespace.toString())) - .replaceAll("\\{" + "group_name" + "\\}", localVarApiClient.escapeString(groupName.toString())); + .replace("{" + "group_namespace" + "}", localVarApiClient.escapeString(groupNamespace.toString())) + .replace("{" + "group_name" + "}", localVarApiClient.escapeString(groupName.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1075,33 +1083,29 @@ public okhttp3.Call getGroupSharingPoliciesCall(String groupNamespace, String gr } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getGroupSharingPoliciesValidateBeforeCall(String groupNamespace, String groupName, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'groupNamespace' is set if (groupNamespace == null) { throw new ApiException("Missing the required parameter 'groupNamespace' when calling getGroupSharingPolicies(Async)"); } - + // verify the required parameter 'groupName' is set if (groupName == null) { throw new ApiException("Missing the required parameter 'groupName' when calling getGroupSharingPolicies(Async)"); } - - okhttp3.Call localVarCall = getGroupSharingPoliciesCall(groupNamespace, groupName, _callback); - return localVarCall; + return getGroupSharingPoliciesCall(groupNamespace, groupName, _callback); } @@ -1113,7 +1117,8 @@ private okhttp3.Call getGroupSharingPoliciesValidateBeforeCall(String groupNames * @return List<GroupSharing> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of all specific sharing policies -
404 Group does not exist or user does not have permissions to view group-sharing policies -
+
+ @@ -1134,7 +1139,8 @@ public List getGroupSharingPolicies(String groupNamespace, String * @return ApiResponse<List<GroupSharing>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of all specific sharing policies -
404 Group does not exist or user does not have permissions to view group-sharing policies -
+
+ @@ -1157,7 +1163,8 @@ public ApiResponse> getGroupSharingPoliciesWithHttpInfo(Strin * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of all specific sharing policies -
404 Group does not exist or user does not have permissions to view group-sharing policies -
+
+ @@ -1179,7 +1186,8 @@ public okhttp3.Call getGroupSharingPoliciesAsync(String groupNamespace, String g * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of all specific sharing policies -
404 Group does not exist or user does not have permissions to view group-sharing policies -
+
+ @@ -1224,23 +1232,19 @@ public okhttp3.Call groupsBrowserOwnedFiltersGetCall(String namespace, final Api } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call groupsBrowserOwnedFiltersGetValidateBeforeCall(String namespace, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = groupsBrowserOwnedFiltersGetCall(namespace, _callback); - return localVarCall; + return groupsBrowserOwnedFiltersGetCall(namespace, _callback); } @@ -1251,7 +1255,8 @@ private okhttp3.Call groupsBrowserOwnedFiltersGetValidateBeforeCall(String names * @return GroupBrowserFilterData * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Filter data -
502 Bad Gateway -
+
+ @@ -1270,7 +1275,8 @@ public GroupBrowserFilterData groupsBrowserOwnedFiltersGet(String namespace) thr * @return ApiResponse<GroupBrowserFilterData> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Filter data -
502 Bad Gateway -
+
+ @@ -1291,7 +1297,8 @@ public ApiResponse groupsBrowserOwnedFiltersGetWithHttpI * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Filter data -
502 Bad Gateway -
+
+ @@ -1311,7 +1318,8 @@ public okhttp3.Call groupsBrowserOwnedFiltersGetAsync(String namespace, final Ap * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Filter data -
502 Bad Gateway -
+
+ @@ -1352,23 +1360,19 @@ public okhttp3.Call groupsBrowserPublicFiltersGetCall(final ApiCallback _callbac } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call groupsBrowserPublicFiltersGetValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = groupsBrowserPublicFiltersGetCall(_callback); - return localVarCall; + return groupsBrowserPublicFiltersGetCall(_callback); } @@ -1378,7 +1382,8 @@ private okhttp3.Call groupsBrowserPublicFiltersGetValidateBeforeCall(final ApiCa * @return GroupBrowserFilterData * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Filter data -
502 Bad Gateway -
+
+ @@ -1396,7 +1401,8 @@ public GroupBrowserFilterData groupsBrowserPublicFiltersGet() throws ApiExceptio * @return ApiResponse<GroupBrowserFilterData> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Filter data -
502 Bad Gateway -
+
+ @@ -1416,7 +1422,8 @@ public ApiResponse groupsBrowserPublicFiltersGetWithHttp * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Filter data -
502 Bad Gateway -
+
+ @@ -1437,7 +1444,8 @@ public okhttp3.Call groupsBrowserPublicFiltersGetAsync(final ApiCallback +
Response Details
Status Code Description Response Headers
200 Filter data -
502 Bad Gateway -
+ @@ -1482,23 +1490,19 @@ public okhttp3.Call groupsBrowserSharedFiltersGetCall(String namespace, final Ap } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call groupsBrowserSharedFiltersGetValidateBeforeCall(String namespace, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = groupsBrowserSharedFiltersGetCall(namespace, _callback); - return localVarCall; + return groupsBrowserSharedFiltersGetCall(namespace, _callback); } @@ -1509,7 +1513,8 @@ private okhttp3.Call groupsBrowserSharedFiltersGetValidateBeforeCall(String name * @return GroupBrowserFilterData * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Filter data -
502 Bad Gateway -
+
+ @@ -1528,7 +1533,8 @@ public GroupBrowserFilterData groupsBrowserSharedFiltersGet(String namespace) th * @return ApiResponse<GroupBrowserFilterData> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Filter data -
502 Bad Gateway -
+
+ @@ -1549,7 +1555,8 @@ public ApiResponse groupsBrowserSharedFiltersGetWithHttp * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Filter data -
502 Bad Gateway -
+
+ @@ -1571,7 +1578,8 @@ public okhttp3.Call groupsBrowserSharedFiltersGetAsync(String namespace, final A * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Filter data -
502 Bad Gateway -
+
+ @@ -1596,8 +1604,8 @@ public okhttp3.Call groupsGroupNamespaceGroupNameContentsFiltersGetCall(String g // create path and map variables String localVarPath = "/groups/{group_namespace}/{group_name}/contents/filters" - .replaceAll("\\{" + "group_namespace" + "\\}", localVarApiClient.escapeString(groupNamespace.toString())) - .replaceAll("\\{" + "group_name" + "\\}", localVarApiClient.escapeString(groupName.toString())); + .replace("{" + "group_namespace" + "}", localVarApiClient.escapeString(groupNamespace.toString())) + .replace("{" + "group_name" + "}", localVarApiClient.escapeString(groupName.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1614,33 +1622,29 @@ public okhttp3.Call groupsGroupNamespaceGroupNameContentsFiltersGetCall(String g } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call groupsGroupNamespaceGroupNameContentsFiltersGetValidateBeforeCall(String groupNamespace, String groupName, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'groupNamespace' is set if (groupNamespace == null) { throw new ApiException("Missing the required parameter 'groupNamespace' when calling groupsGroupNamespaceGroupNameContentsFiltersGet(Async)"); } - + // verify the required parameter 'groupName' is set if (groupName == null) { throw new ApiException("Missing the required parameter 'groupName' when calling groupsGroupNamespaceGroupNameContentsFiltersGet(Async)"); } - - okhttp3.Call localVarCall = groupsGroupNamespaceGroupNameContentsFiltersGetCall(groupNamespace, groupName, _callback); - return localVarCall; + return groupsGroupNamespaceGroupNameContentsFiltersGetCall(groupNamespace, groupName, _callback); } @@ -1652,7 +1656,8 @@ private okhttp3.Call groupsGroupNamespaceGroupNameContentsFiltersGetValidateBefo * @return GroupContentsFilterData * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Filter data -
502 Bad Gateway -
+
+ @@ -1672,7 +1677,8 @@ public GroupContentsFilterData groupsGroupNamespaceGroupNameContentsFiltersGet(S * @return ApiResponse<GroupContentsFilterData> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Filter data -
502 Bad Gateway -
+
+ @@ -1694,7 +1700,8 @@ public ApiResponse groupsGroupNamespaceGroupNameContent * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Filter data -
502 Bad Gateway -
+
+ @@ -1721,18 +1728,20 @@ public okhttp3.Call groupsGroupNamespaceGroupNameContentsFiltersGetAsync(String * @param excludeTag tags to exclude matching array in results, more than one can be included (optional) * @param flat if true, ignores the nesting of groups and searches all of them (optional) * @param parent search only the children of the groups with this uuid (optional) + * @param withMetadata include the metadata of the groups (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 -
Response Details
Status Code Description Response Headers
200 Filter data -
502 Bad Gateway -
+
+
Response Details
Status Code Description Response Headers
200 the group contents -
502 Bad Gateway -
0 error response -
*/ - public okhttp3.Call listOwnedGroupsCall(Integer page, Integer perPage, String groupType, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, Boolean flat, String parent, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listOwnedGroupsCall(Integer page, Integer perPage, String groupType, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, Boolean flat, String parent, Boolean withMetadata, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1801,6 +1810,10 @@ public okhttp3.Call listOwnedGroupsCall(Integer page, Integer perPage, String gr localVarQueryParams.addAll(localVarApiClient.parameterToPair("parent", parent)); } + if (withMetadata != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("with_metadata", withMetadata)); + } + final String[] localVarAccepts = { "application/json" }; @@ -1810,23 +1823,19 @@ public okhttp3.Call listOwnedGroupsCall(Integer page, Integer perPage, String gr } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call listOwnedGroupsValidateBeforeCall(Integer page, Integer perPage, String groupType, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, Boolean flat, String parent, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = listOwnedGroupsCall(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent, _callback); - return localVarCall; + private okhttp3.Call listOwnedGroupsValidateBeforeCall(Integer page, Integer perPage, String groupType, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, Boolean flat, String parent, Boolean withMetadata, final ApiCallback _callback) throws ApiException { + return listOwnedGroupsCall(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent, withMetadata, _callback); } @@ -1844,18 +1853,20 @@ private okhttp3.Call listOwnedGroupsValidateBeforeCall(Integer page, Integer per * @param excludeTag tags to exclude matching array in results, more than one can be included (optional) * @param flat if true, ignores the nesting of groups and searches all of them (optional) * @param parent search only the children of the groups with this uuid (optional) + * @param withMetadata include the metadata of the groups (optional) * @return GroupBrowserData * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 the group contents -
502 Bad Gateway -
0 error response -
*/ - public GroupBrowserData listOwnedGroups(Integer page, Integer perPage, String groupType, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, Boolean flat, String parent) throws ApiException { - ApiResponse localVarResp = listOwnedGroupsWithHttpInfo(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent); + public GroupBrowserData listOwnedGroups(Integer page, Integer perPage, String groupType, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, Boolean flat, String parent, Boolean withMetadata) throws ApiException { + ApiResponse localVarResp = listOwnedGroupsWithHttpInfo(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent, withMetadata); return localVarResp.getData(); } @@ -1873,18 +1884,20 @@ public GroupBrowserData listOwnedGroups(Integer page, Integer perPage, String gr * @param excludeTag tags to exclude matching array in results, more than one can be included (optional) * @param flat if true, ignores the nesting of groups and searches all of them (optional) * @param parent search only the children of the groups with this uuid (optional) + * @param withMetadata include the metadata of the groups (optional) * @return ApiResponse<GroupBrowserData> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 the group contents -
502 Bad Gateway -
0 error response -
*/ - public ApiResponse listOwnedGroupsWithHttpInfo(Integer page, Integer perPage, String groupType, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, Boolean flat, String parent) throws ApiException { - okhttp3.Call localVarCall = listOwnedGroupsValidateBeforeCall(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent, null); + public ApiResponse listOwnedGroupsWithHttpInfo(Integer page, Integer perPage, String groupType, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, Boolean flat, String parent, Boolean withMetadata) throws ApiException { + okhttp3.Call localVarCall = listOwnedGroupsValidateBeforeCall(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent, withMetadata, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -1903,20 +1916,22 @@ public ApiResponse listOwnedGroupsWithHttpInfo(Integer page, I * @param excludeTag tags to exclude matching array in results, more than one can be included (optional) * @param flat if true, ignores the nesting of groups and searches all of them (optional) * @param parent search only the children of the groups with this uuid (optional) + * @param withMetadata include the metadata of the groups (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 - +
+
Response Details
Status Code Description Response Headers
200 the group contents -
502 Bad Gateway -
0 error response -
*/ - public okhttp3.Call listOwnedGroupsAsync(Integer page, Integer perPage, String groupType, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, Boolean flat, String parent, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listOwnedGroupsAsync(Integer page, Integer perPage, String groupType, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, Boolean flat, String parent, Boolean withMetadata, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = listOwnedGroupsValidateBeforeCall(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent, _callback); + okhttp3.Call localVarCall = listOwnedGroupsValidateBeforeCall(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent, withMetadata, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -1934,18 +1949,20 @@ public okhttp3.Call listOwnedGroupsAsync(Integer page, Integer perPage, String g * @param excludeTag tags to exclude matching array in results, more than one can be included (optional) * @param flat if true, ignores the nesting of groups and searches all of them (optional) * @param parent search only the children of the groups with this uuid (optional) + * @param withMetadata include the metadata of the groups (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 - +
+
Response Details
Status Code Description Response Headers
200 the group contents -
502 Bad Gateway -
0 error response -
*/ - public okhttp3.Call listPublicGroupsCall(Integer page, Integer perPage, String groupType, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, Boolean flat, String parent, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listPublicGroupsCall(Integer page, Integer perPage, String groupType, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, Boolean flat, String parent, Boolean withMetadata, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2014,6 +2031,10 @@ public okhttp3.Call listPublicGroupsCall(Integer page, Integer perPage, String g localVarQueryParams.addAll(localVarApiClient.parameterToPair("parent", parent)); } + if (withMetadata != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("with_metadata", withMetadata)); + } + final String[] localVarAccepts = { "application/json" }; @@ -2023,23 +2044,19 @@ public okhttp3.Call listPublicGroupsCall(Integer page, Integer perPage, String g } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call listPublicGroupsValidateBeforeCall(Integer page, Integer perPage, String groupType, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, Boolean flat, String parent, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = listPublicGroupsCall(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent, _callback); - return localVarCall; + private okhttp3.Call listPublicGroupsValidateBeforeCall(Integer page, Integer perPage, String groupType, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, Boolean flat, String parent, Boolean withMetadata, final ApiCallback _callback) throws ApiException { + return listPublicGroupsCall(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent, withMetadata, _callback); } @@ -2057,18 +2074,20 @@ private okhttp3.Call listPublicGroupsValidateBeforeCall(Integer page, Integer pe * @param excludeTag tags to exclude matching array in results, more than one can be included (optional) * @param flat if true, ignores the nesting of groups and searches all of them (optional) * @param parent search only the children of the groups with this uuid (optional) + * @param withMetadata include the metadata of the groups (optional) * @return GroupBrowserData * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 the group contents -
502 Bad Gateway -
0 error response -
*/ - public GroupBrowserData listPublicGroups(Integer page, Integer perPage, String groupType, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, Boolean flat, String parent) throws ApiException { - ApiResponse localVarResp = listPublicGroupsWithHttpInfo(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent); + public GroupBrowserData listPublicGroups(Integer page, Integer perPage, String groupType, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, Boolean flat, String parent, Boolean withMetadata) throws ApiException { + ApiResponse localVarResp = listPublicGroupsWithHttpInfo(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent, withMetadata); return localVarResp.getData(); } @@ -2086,18 +2105,20 @@ public GroupBrowserData listPublicGroups(Integer page, Integer perPage, String g * @param excludeTag tags to exclude matching array in results, more than one can be included (optional) * @param flat if true, ignores the nesting of groups and searches all of them (optional) * @param parent search only the children of the groups with this uuid (optional) + * @param withMetadata include the metadata of the groups (optional) * @return ApiResponse<GroupBrowserData> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 the group contents -
502 Bad Gateway -
0 error response -
*/ - public ApiResponse listPublicGroupsWithHttpInfo(Integer page, Integer perPage, String groupType, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, Boolean flat, String parent) throws ApiException { - okhttp3.Call localVarCall = listPublicGroupsValidateBeforeCall(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent, null); + public ApiResponse listPublicGroupsWithHttpInfo(Integer page, Integer perPage, String groupType, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, Boolean flat, String parent, Boolean withMetadata) throws ApiException { + okhttp3.Call localVarCall = listPublicGroupsValidateBeforeCall(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent, withMetadata, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -2116,20 +2137,22 @@ public ApiResponse listPublicGroupsWithHttpInfo(Integer page, * @param excludeTag tags to exclude matching array in results, more than one can be included (optional) * @param flat if true, ignores the nesting of groups and searches all of them (optional) * @param parent search only the children of the groups with this uuid (optional) + * @param withMetadata include the metadata of the groups (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 - +
+
Response Details
Status Code Description Response Headers
200 the group contents -
502 Bad Gateway -
0 error response -
*/ - public okhttp3.Call listPublicGroupsAsync(Integer page, Integer perPage, String groupType, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, Boolean flat, String parent, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listPublicGroupsAsync(Integer page, Integer perPage, String groupType, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, Boolean flat, String parent, Boolean withMetadata, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = listPublicGroupsValidateBeforeCall(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent, _callback); + okhttp3.Call localVarCall = listPublicGroupsValidateBeforeCall(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent, withMetadata, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -2148,18 +2171,20 @@ public okhttp3.Call listPublicGroupsAsync(Integer page, Integer perPage, String * @param flat if true, ignores the nesting of groups and searches all of them (optional) * @param parent search only the children of the groups with this uuid (optional) * @param sharedTo namespaces to filter results of where there groups were shared to (optional) + * @param withMetadata include the metadata of the groups (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 - +
+
Response Details
Status Code Description Response Headers
200 the group contents -
502 Bad Gateway -
0 error response -
*/ - public okhttp3.Call listSharedGroupsCall(Integer page, Integer perPage, String groupType, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, Boolean flat, String parent, List sharedTo, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listSharedGroupsCall(Integer page, Integer perPage, String groupType, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, Boolean flat, String parent, List sharedTo, Boolean withMetadata, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2232,6 +2257,10 @@ public okhttp3.Call listSharedGroupsCall(Integer page, Integer perPage, String g localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "shared_to", sharedTo)); } + if (withMetadata != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("with_metadata", withMetadata)); + } + final String[] localVarAccepts = { "application/json" }; @@ -2241,23 +2270,19 @@ public okhttp3.Call listSharedGroupsCall(Integer page, Integer perPage, String g } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call listSharedGroupsValidateBeforeCall(Integer page, Integer perPage, String groupType, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, Boolean flat, String parent, List sharedTo, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = listSharedGroupsCall(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent, sharedTo, _callback); - return localVarCall; + private okhttp3.Call listSharedGroupsValidateBeforeCall(Integer page, Integer perPage, String groupType, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, Boolean flat, String parent, List sharedTo, Boolean withMetadata, final ApiCallback _callback) throws ApiException { + return listSharedGroupsCall(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent, sharedTo, withMetadata, _callback); } @@ -2276,18 +2301,20 @@ private okhttp3.Call listSharedGroupsValidateBeforeCall(Integer page, Integer pe * @param flat if true, ignores the nesting of groups and searches all of them (optional) * @param parent search only the children of the groups with this uuid (optional) * @param sharedTo namespaces to filter results of where there groups were shared to (optional) + * @param withMetadata include the metadata of the groups (optional) * @return GroupBrowserData * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 the group contents -
502 Bad Gateway -
0 error response -
*/ - public GroupBrowserData listSharedGroups(Integer page, Integer perPage, String groupType, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, Boolean flat, String parent, List sharedTo) throws ApiException { - ApiResponse localVarResp = listSharedGroupsWithHttpInfo(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent, sharedTo); + public GroupBrowserData listSharedGroups(Integer page, Integer perPage, String groupType, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, Boolean flat, String parent, List sharedTo, Boolean withMetadata) throws ApiException { + ApiResponse localVarResp = listSharedGroupsWithHttpInfo(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent, sharedTo, withMetadata); return localVarResp.getData(); } @@ -2306,18 +2333,20 @@ public GroupBrowserData listSharedGroups(Integer page, Integer perPage, String g * @param flat if true, ignores the nesting of groups and searches all of them (optional) * @param parent search only the children of the groups with this uuid (optional) * @param sharedTo namespaces to filter results of where there groups were shared to (optional) + * @param withMetadata include the metadata of the groups (optional) * @return ApiResponse<GroupBrowserData> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 the group contents -
502 Bad Gateway -
0 error response -
*/ - public ApiResponse listSharedGroupsWithHttpInfo(Integer page, Integer perPage, String groupType, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, Boolean flat, String parent, List sharedTo) throws ApiException { - okhttp3.Call localVarCall = listSharedGroupsValidateBeforeCall(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent, sharedTo, null); + public ApiResponse listSharedGroupsWithHttpInfo(Integer page, Integer perPage, String groupType, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, Boolean flat, String parent, List sharedTo, Boolean withMetadata) throws ApiException { + okhttp3.Call localVarCall = listSharedGroupsValidateBeforeCall(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent, sharedTo, withMetadata, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -2337,20 +2366,22 @@ public ApiResponse listSharedGroupsWithHttpInfo(Integer page, * @param flat if true, ignores the nesting of groups and searches all of them (optional) * @param parent search only the children of the groups with this uuid (optional) * @param sharedTo namespaces to filter results of where there groups were shared to (optional) + * @param withMetadata include the metadata of the groups (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 - +
+
Response Details
Status Code Description Response Headers
200 the group contents -
502 Bad Gateway -
0 error response -
*/ - public okhttp3.Call listSharedGroupsAsync(Integer page, Integer perPage, String groupType, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, Boolean flat, String parent, List sharedTo, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listSharedGroupsAsync(Integer page, Integer perPage, String groupType, String search, String namespace, String orderby, String permissions, List tag, List excludeTag, Boolean flat, String parent, List sharedTo, Boolean withMetadata, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = listSharedGroupsValidateBeforeCall(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent, sharedTo, _callback); + okhttp3.Call localVarCall = listSharedGroupsValidateBeforeCall(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent, sharedTo, withMetadata, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -2364,7 +2395,8 @@ public okhttp3.Call listSharedGroupsAsync(Integer page, Integer perPage, String * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -2389,8 +2421,8 @@ public okhttp3.Call registerGroupCall(String namespace, String array, GroupRegis // create path and map variables String localVarPath = "/groups/{namespace}/{array}/register" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2414,26 +2446,23 @@ public okhttp3.Call registerGroupCall(String namespace, String array, GroupRegis localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call registerGroupValidateBeforeCall(String namespace, String array, GroupRegister groupRegister, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling registerGroup(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling registerGroup(Async)"); } - - okhttp3.Call localVarCall = registerGroupCall(namespace, array, groupRegister, _callback); - return localVarCall; + return registerGroupCall(namespace, array, groupRegister, _callback); } @@ -2445,7 +2474,8 @@ private okhttp3.Call registerGroupValidateBeforeCall(String namespace, String ar * @param groupRegister (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 group created successfully -
502 Bad Gateway -
+
+ @@ -2465,7 +2495,8 @@ public void registerGroup(String namespace, String array, GroupRegister groupReg * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 group created successfully -
502 Bad Gateway -
+
+ @@ -2487,7 +2518,8 @@ public ApiResponse registerGroupWithHttpInfo(String namespace, String arra * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 group created successfully -
502 Bad Gateway -
+
+ @@ -2509,7 +2541,8 @@ public okhttp3.Call registerGroupAsync(String namespace, String array, GroupRegi * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 group created successfully -
502 Bad Gateway -
+
+ @@ -2535,8 +2568,8 @@ public okhttp3.Call shareGroupCall(String groupNamespace, String groupName, Grou // create path and map variables String localVarPath = "/groups/{group_namespace}/{group_name}/share" - .replaceAll("\\{" + "group_namespace" + "\\}", localVarApiClient.escapeString(groupNamespace.toString())) - .replaceAll("\\{" + "group_name" + "\\}", localVarApiClient.escapeString(groupName.toString())); + .replace("{" + "group_namespace" + "}", localVarApiClient.escapeString(groupNamespace.toString())) + .replace("{" + "group_name" + "}", localVarApiClient.escapeString(groupName.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2560,31 +2593,28 @@ public okhttp3.Call shareGroupCall(String groupNamespace, String groupName, Grou localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call shareGroupValidateBeforeCall(String groupNamespace, String groupName, GroupSharingRequest groupSharingRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'groupNamespace' is set if (groupNamespace == null) { throw new ApiException("Missing the required parameter 'groupNamespace' when calling shareGroup(Async)"); } - + // verify the required parameter 'groupName' is set if (groupName == null) { throw new ApiException("Missing the required parameter 'groupName' when calling shareGroup(Async)"); } - + // verify the required parameter 'groupSharingRequest' is set if (groupSharingRequest == null) { throw new ApiException("Missing the required parameter 'groupSharingRequest' when calling shareGroup(Async)"); } - - okhttp3.Call localVarCall = shareGroupCall(groupNamespace, groupName, groupSharingRequest, _callback); - return localVarCall; + return shareGroupCall(groupNamespace, groupName, groupSharingRequest, _callback); } @@ -2596,7 +2626,8 @@ private okhttp3.Call shareGroupValidateBeforeCall(String groupNamespace, String * @param groupSharingRequest Namespace and list of permissions to share with. Sharing is recursive, it is applied to all reachable subgroups and arrays of the group. An empty list of permissions will remove the namespace; if permissions already exist they will be deleted then new ones added. In the event of a failure, the new policies will be rolled back to prevent partial policies, and it's likely the group will not be shared with the namespace at all. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Group shared successfully -
404 Group does not exist or user does not have permissions to share group -
+
+ @@ -2617,7 +2648,8 @@ public void shareGroup(String groupNamespace, String groupName, GroupSharingRequ * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Group shared successfully -
404 Group does not exist or user does not have permissions to share group -
+
+ @@ -2640,7 +2672,8 @@ public ApiResponse shareGroupWithHttpInfo(String groupNamespace, String gr * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Group shared successfully -
404 Group does not exist or user does not have permissions to share group -
+
+ @@ -2663,7 +2696,8 @@ public okhttp3.Call shareGroupAsync(String groupNamespace, String groupName, Gro * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Group shared successfully -
404 Group does not exist or user does not have permissions to share group -
+
+ @@ -2688,8 +2722,8 @@ public okhttp3.Call updateGroupCall(String groupNamespace, String groupName, Gro // create path and map variables String localVarPath = "/groups/{group_namespace}/{group_name}" - .replaceAll("\\{" + "group_namespace" + "\\}", localVarApiClient.escapeString(groupNamespace.toString())) - .replaceAll("\\{" + "group_name" + "\\}", localVarApiClient.escapeString(groupName.toString())); + .replace("{" + "group_namespace" + "}", localVarApiClient.escapeString(groupNamespace.toString())) + .replace("{" + "group_name" + "}", localVarApiClient.escapeString(groupName.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2713,26 +2747,23 @@ public okhttp3.Call updateGroupCall(String groupNamespace, String groupName, Gro localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateGroupValidateBeforeCall(String groupNamespace, String groupName, GroupUpdate groupUpdate, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'groupNamespace' is set if (groupNamespace == null) { throw new ApiException("Missing the required parameter 'groupNamespace' when calling updateGroup(Async)"); } - + // verify the required parameter 'groupName' is set if (groupName == null) { throw new ApiException("Missing the required parameter 'groupName' when calling updateGroup(Async)"); } - - okhttp3.Call localVarCall = updateGroupCall(groupNamespace, groupName, groupUpdate, _callback); - return localVarCall; + return updateGroupCall(groupNamespace, groupName, groupUpdate, _callback); } @@ -2744,7 +2775,8 @@ private okhttp3.Call updateGroupValidateBeforeCall(String groupNamespace, String * @param groupUpdate (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 attributes changed successfully -
502 Bad Gateway -
+
+ @@ -2764,7 +2796,8 @@ public void updateGroup(String groupNamespace, String groupName, GroupUpdate gro * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 attributes changed successfully -
502 Bad Gateway -
+
+ @@ -2786,7 +2819,8 @@ public ApiResponse updateGroupWithHttpInfo(String groupNamespace, String g * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 attributes changed successfully -
502 Bad Gateway -
+
+ diff --git a/src/main/java/io/tiledb/cloud/rest_api/api/InvitationApi.java b/src/main/java/io/tiledb/cloud/rest_api/api/InvitationApi.java index d081e80..048d020 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/api/InvitationApi.java +++ b/src/main/java/io/tiledb/cloud/rest_api/api/InvitationApi.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,21 +11,29 @@ */ -package io.tiledb.cloud.rest_api.api; +package org.openapitools.client.api; -import io.tiledb.cloud.rest_api.ApiCallback; -import io.tiledb.cloud.rest_api.model.InvitationArrayShareEmail; -import io.tiledb.cloud.rest_api.model.InvitationData; -import io.tiledb.cloud.rest_api.model.InvitationGroupShareEmail; -import io.tiledb.cloud.rest_api.model.InvitationOrganizationJoinEmail; -import io.tiledb.cloud.rest_api.ApiClient; -import io.tiledb.cloud.rest_api.ApiException; -import io.tiledb.cloud.rest_api.ApiResponse; -import io.tiledb.cloud.rest_api.Configuration; -import io.tiledb.cloud.rest_api.Pair; +import org.openapitools.client.ApiCallback; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.Pair; +import org.openapitools.client.ProgressRequestBody; +import org.openapitools.client.ProgressResponseBody; import com.google.gson.reflect.TypeToken; +import java.io.IOException; + + +import org.openapitools.client.model.Error; +import org.openapitools.client.model.InvitationArrayShareEmail; +import org.openapitools.client.model.InvitationData; +import org.openapitools.client.model.InvitationFailedRecipients; +import org.openapitools.client.model.InvitationGroupShareEmail; +import org.openapitools.client.model.InvitationOrganizationJoinEmail; +import org.openapitools.client.model.SharePaymentRequest; import java.lang.reflect.Type; import java.util.ArrayList; @@ -77,7 +85,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 attributes changed successfully -
502 Bad Gateway -
+
+ @@ -103,7 +112,7 @@ public okhttp3.Call acceptInvitationCall(String invitation, final ApiCallback _c // create path and map variables String localVarPath = "/invitations/{invitation}" - .replaceAll("\\{" + "invitation" + "\\}", localVarApiClient.escapeString(invitation.toString())); + .replace("{" + "invitation" + "}", localVarApiClient.escapeString(invitation.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -120,28 +129,24 @@ public okhttp3.Call acceptInvitationCall(String invitation, final ApiCallback _c } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call acceptInvitationValidateBeforeCall(String invitation, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'invitation' is set if (invitation == null) { throw new ApiException("Missing the required parameter 'invitation' when calling acceptInvitation(Async)"); } - - okhttp3.Call localVarCall = acceptInvitationCall(invitation, _callback); - return localVarCall; + return acceptInvitationCall(invitation, _callback); } @@ -151,7 +156,8 @@ private okhttp3.Call acceptInvitationValidateBeforeCall(String invitation, final * @param invitation the ID of invitation about to be accepted (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Invitation was accepted successfully -
404 Could not find invitation identifier -
+
+ @@ -170,7 +176,8 @@ public void acceptInvitation(String invitation) throws ApiException { * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Invitation was accepted successfully -
404 Could not find invitation identifier -
+
+ @@ -191,7 +198,8 @@ public ApiResponse acceptInvitationWithHttpInfo(String invitation) throws * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Invitation was accepted successfully -
404 Could not find invitation identifier -
+
+ @@ -213,7 +221,8 @@ public okhttp3.Call acceptInvitationAsync(String invitation, final ApiCallback +
Response Details
Status Code Description Response Headers
204 Invitation was accepted successfully -
404 Could not find invitation identifier -
+ @@ -239,8 +248,8 @@ public okhttp3.Call cancelJoinOrganizationCall(String invitation, String organiz // create path and map variables String localVarPath = "/invitations/{invitation}/{organization}/join" - .replaceAll("\\{" + "invitation" + "\\}", localVarApiClient.escapeString(invitation.toString())) - .replaceAll("\\{" + "organization" + "\\}", localVarApiClient.escapeString(organization.toString())); + .replace("{" + "invitation" + "}", localVarApiClient.escapeString(invitation.toString())) + .replace("{" + "organization" + "}", localVarApiClient.escapeString(organization.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -257,33 +266,29 @@ public okhttp3.Call cancelJoinOrganizationCall(String invitation, String organiz } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call cancelJoinOrganizationValidateBeforeCall(String invitation, String organization, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'invitation' is set if (invitation == null) { throw new ApiException("Missing the required parameter 'invitation' when calling cancelJoinOrganization(Async)"); } - + // verify the required parameter 'organization' is set if (organization == null) { throw new ApiException("Missing the required parameter 'organization' when calling cancelJoinOrganization(Async)"); } - - okhttp3.Call localVarCall = cancelJoinOrganizationCall(invitation, organization, _callback); - return localVarCall; + return cancelJoinOrganizationCall(invitation, organization, _callback); } @@ -294,7 +299,8 @@ private okhttp3.Call cancelJoinOrganizationValidateBeforeCall(String invitation, * @param organization name or UUID of organization (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Invitation cancelled successfully -
404 No invitation was found to cancel -
+
+ @@ -314,7 +320,8 @@ public void cancelJoinOrganization(String invitation, String organization) throw * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Invitation cancelled successfully -
404 No invitation was found to cancel -
+
+ @@ -336,7 +343,8 @@ public ApiResponse cancelJoinOrganizationWithHttpInfo(String invitation, S * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Invitation cancelled successfully -
404 No invitation was found to cancel -
+
+ @@ -359,7 +367,8 @@ public okhttp3.Call cancelJoinOrganizationAsync(String invitation, String organi * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Invitation cancelled successfully -
404 No invitation was found to cancel -
+
+ @@ -385,9 +394,9 @@ public okhttp3.Call cancelShareArrayByInviteCall(String namespace, String invita // create path and map variables String localVarPath = "/invitations/{invitation}/{namespace}/{array}/share" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "invitation" + "\\}", localVarApiClient.escapeString(invitation.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "invitation" + "}", localVarApiClient.escapeString(invitation.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -404,38 +413,34 @@ public okhttp3.Call cancelShareArrayByInviteCall(String namespace, String invita } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call cancelShareArrayByInviteValidateBeforeCall(String namespace, String invitation, String array, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling cancelShareArrayByInvite(Async)"); } - + // verify the required parameter 'invitation' is set if (invitation == null) { throw new ApiException("Missing the required parameter 'invitation' when calling cancelShareArrayByInvite(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling cancelShareArrayByInvite(Async)"); } - - okhttp3.Call localVarCall = cancelShareArrayByInviteCall(namespace, invitation, array, _callback); - return localVarCall; + return cancelShareArrayByInviteCall(namespace, invitation, array, _callback); } @@ -447,7 +452,8 @@ private okhttp3.Call cancelShareArrayByInviteValidateBeforeCall(String namespace * @param array name/uri of array that is url-encoded (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Invitation cancelled successfully -
404 No invitation was found to cancel -
+
+ @@ -468,7 +474,8 @@ public void cancelShareArrayByInvite(String namespace, String invitation, String * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Invitation cancelled successfully -
404 No invitation was found to cancel -
+
+ @@ -491,7 +498,8 @@ public ApiResponse cancelShareArrayByInviteWithHttpInfo(String namespace, * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Invitation cancelled successfully -
404 No invitation was found to cancel -
+
+ @@ -514,7 +522,8 @@ public okhttp3.Call cancelShareArrayByInviteAsync(String namespace, String invit * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Invitation cancelled successfully -
404 No invitation was found to cancel -
+
+ @@ -540,9 +549,9 @@ public okhttp3.Call cancelShareGroupByInviteCall(String namespace, String invita // create path and map variables String localVarPath = "/invitations/group/{invitation}/{namespace}/{group_name}/share" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "invitation" + "\\}", localVarApiClient.escapeString(invitation.toString())) - .replaceAll("\\{" + "group_name" + "\\}", localVarApiClient.escapeString(groupName.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "invitation" + "}", localVarApiClient.escapeString(invitation.toString())) + .replace("{" + "group_name" + "}", localVarApiClient.escapeString(groupName.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -559,38 +568,34 @@ public okhttp3.Call cancelShareGroupByInviteCall(String namespace, String invita } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call cancelShareGroupByInviteValidateBeforeCall(String namespace, String invitation, String groupName, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling cancelShareGroupByInvite(Async)"); } - + // verify the required parameter 'invitation' is set if (invitation == null) { throw new ApiException("Missing the required parameter 'invitation' when calling cancelShareGroupByInvite(Async)"); } - + // verify the required parameter 'groupName' is set if (groupName == null) { throw new ApiException("Missing the required parameter 'groupName' when calling cancelShareGroupByInvite(Async)"); } - - okhttp3.Call localVarCall = cancelShareGroupByInviteCall(namespace, invitation, groupName, _callback); - return localVarCall; + return cancelShareGroupByInviteCall(namespace, invitation, groupName, _callback); } @@ -602,7 +607,8 @@ private okhttp3.Call cancelShareGroupByInviteValidateBeforeCall(String namespace * @param groupName name/uuid of group that is url-encoded (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Invitation cancelled successfully -
404 No invitation was found to cancel -
+
+ @@ -623,7 +629,8 @@ public void cancelShareGroupByInvite(String namespace, String invitation, String * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Invitation cancelled successfully -
404 No invitation was found to cancel -
+
+ @@ -646,7 +653,8 @@ public ApiResponse cancelShareGroupByInviteWithHttpInfo(String namespace, * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Invitation cancelled successfully -
404 No invitation was found to cancel -
+
+ @@ -660,6 +668,147 @@ public okhttp3.Call cancelShareGroupByInviteAsync(String namespace, String invit localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } + /** + * Build call for cancelSharePayment + * @param namespace name or UUID of namespace sharing their payment info (required) + * @param target name or UUID of recipient namespace (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 +
Response Details
Status Code Description Response Headers
204 Invitation cancelled successfully -
404 No invitation was found to cancel -
+ + + + + +
Response Details
Status Code Description Response Headers
204 Invitation cancelled successfully -
404 No invitation was found to cancel -
0 error response -
+ */ + public okhttp3.Call cancelSharePaymentCall(String namespace, String target, 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 = "/invitations/share_payment/{namespace}/{target}" + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "target" + "}", localVarApiClient.escapeString(target.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[] { "BasicAuth", "ApiKeyAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call cancelSharePaymentValidateBeforeCall(String namespace, String target, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'namespace' is set + if (namespace == null) { + throw new ApiException("Missing the required parameter 'namespace' when calling cancelSharePayment(Async)"); + } + + // verify the required parameter 'target' is set + if (target == null) { + throw new ApiException("Missing the required parameter 'target' when calling cancelSharePayment(Async)"); + } + + return cancelSharePaymentCall(namespace, target, _callback); + + } + + /** + * + * Revokes invitation from the source namespace to the target. + * @param namespace name or UUID of namespace sharing their payment info (required) + * @param target name or UUID of recipient namespace (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Response Details
Status Code Description Response Headers
204 Invitation cancelled successfully -
404 No invitation was found to cancel -
0 error response -
+ */ + public void cancelSharePayment(String namespace, String target) throws ApiException { + cancelSharePaymentWithHttpInfo(namespace, target); + } + + /** + * + * Revokes invitation from the source namespace to the target. + * @param namespace name or UUID of namespace sharing their payment info (required) + * @param target name or UUID of recipient namespace (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 + + + + + + +
Response Details
Status Code Description Response Headers
204 Invitation cancelled successfully -
404 No invitation was found to cancel -
0 error response -
+ */ + public ApiResponse cancelSharePaymentWithHttpInfo(String namespace, String target) throws ApiException { + okhttp3.Call localVarCall = cancelSharePaymentValidateBeforeCall(namespace, target, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) + * Revokes invitation from the source namespace to the target. + * @param namespace name or UUID of namespace sharing their payment info (required) + * @param target name or UUID of recipient namespace (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 + + + + + + +
Response Details
Status Code Description Response Headers
204 Invitation cancelled successfully -
404 No invitation was found to cancel -
0 error response -
+ */ + public okhttp3.Call cancelSharePaymentAsync(String namespace, String target, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = cancelSharePaymentValidateBeforeCall(namespace, target, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } /** * Build call for fetchInvitations * @param organization name or ID of organization to filter (optional) @@ -676,7 +825,8 @@ public okhttp3.Call cancelShareGroupByInviteAsync(String namespace, String invit * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -757,23 +907,19 @@ public okhttp3.Call fetchInvitationsCall(String organization, String array, Stri } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call fetchInvitationsValidateBeforeCall(String organization, String array, String group, Integer start, Integer end, Integer page, Integer perPage, String type, String status, String orderby, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = fetchInvitationsCall(organization, array, group, start, end, page, perPage, type, status, orderby, _callback); - return localVarCall; + return fetchInvitationsCall(organization, array, group, start, end, page, perPage, type, status, orderby, _callback); } @@ -793,7 +939,8 @@ private okhttp3.Call fetchInvitationsValidateBeforeCall(String organization, Str * @return InvitationData * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of invitations and pagination metadata -
502 Bad Gateway -
+
+ @@ -821,7 +968,8 @@ public InvitationData fetchInvitations(String organization, String array, String * @return ApiResponse<InvitationData> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of invitations and pagination metadata -
502 Bad Gateway -
+
+ @@ -851,7 +999,8 @@ public ApiResponse fetchInvitationsWithHttpInfo(String organizat * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of invitations and pagination metadata -
502 Bad Gateway -
+
+ @@ -873,7 +1022,8 @@ public okhttp3.Call fetchInvitationsAsync(String organization, String array, Str * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of invitations and pagination metadata -
502 Bad Gateway -
+
+ @@ -900,7 +1050,7 @@ public okhttp3.Call joinOrganizationCall(String organization, InvitationOrganiza // create path and map variables String localVarPath = "/invitations/{organization}/join" - .replaceAll("\\{" + "organization" + "\\}", localVarApiClient.escapeString(organization.toString())); + .replace("{" + "organization" + "}", localVarApiClient.escapeString(organization.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -924,26 +1074,23 @@ public okhttp3.Call joinOrganizationCall(String organization, InvitationOrganiza localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call joinOrganizationValidateBeforeCall(String organization, InvitationOrganizationJoinEmail emailInvite, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'organization' is set if (organization == null) { throw new ApiException("Missing the required parameter 'organization' when calling joinOrganization(Async)"); } - + // verify the required parameter 'emailInvite' is set if (emailInvite == null) { throw new ApiException("Missing the required parameter 'emailInvite' when calling joinOrganization(Async)"); } - - okhttp3.Call localVarCall = joinOrganizationCall(organization, emailInvite, _callback); - return localVarCall; + return joinOrganizationCall(organization, emailInvite, _callback); } @@ -954,7 +1101,8 @@ private okhttp3.Call joinOrganizationValidateBeforeCall(String organization, Inv * @param emailInvite list of email recipients (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Email sent successfully to user for email confirmation link -
207 Only a portion of the invitations succeeded, some failed -
+
+ @@ -975,7 +1123,8 @@ public void joinOrganization(String organization, InvitationOrganizationJoinEmai * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Email sent successfully to user for email confirmation link -
207 Only a portion of the invitations succeeded, some failed -
+
+ @@ -998,7 +1147,8 @@ public ApiResponse joinOrganizationWithHttpInfo(String organization, Invit * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Email sent successfully to user for email confirmation link -
207 Only a portion of the invitations succeeded, some failed -
+
+ @@ -1022,7 +1172,8 @@ public okhttp3.Call joinOrganizationAsync(String organization, InvitationOrganiz * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Email sent successfully to user for email confirmation link -
207 Only a portion of the invitations succeeded, some failed -
+
+ @@ -1049,8 +1200,8 @@ public okhttp3.Call shareArrayByInviteCall(String namespace, String array, Invit // create path and map variables String localVarPath = "/invitations/{namespace}/{array}/share" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1074,31 +1225,28 @@ public okhttp3.Call shareArrayByInviteCall(String namespace, String array, Invit localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call shareArrayByInviteValidateBeforeCall(String namespace, String array, InvitationArrayShareEmail emailInvite, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling shareArrayByInvite(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling shareArrayByInvite(Async)"); } - + // verify the required parameter 'emailInvite' is set if (emailInvite == null) { throw new ApiException("Missing the required parameter 'emailInvite' when calling shareArrayByInvite(Async)"); } - - okhttp3.Call localVarCall = shareArrayByInviteCall(namespace, array, emailInvite, _callback); - return localVarCall; + return shareArrayByInviteCall(namespace, array, emailInvite, _callback); } @@ -1110,7 +1258,8 @@ private okhttp3.Call shareArrayByInviteValidateBeforeCall(String namespace, Stri * @param emailInvite list of email recipients (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Email sent successfully to user for email confirmation link -
207 Only a portion of the invitations succeeded, some failed -
+
+ @@ -1132,7 +1281,8 @@ public void shareArrayByInvite(String namespace, String array, InvitationArraySh * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Email sent successfully to user for email confirmation link -
207 Only a portion of the invitations succeeded, some failed -
+
+ @@ -1156,7 +1306,8 @@ public ApiResponse shareArrayByInviteWithHttpInfo(String namespace, String * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Email sent successfully to user for email confirmation link -
207 Only a portion of the invitations succeeded, some failed -
+
+ @@ -1180,7 +1331,8 @@ public okhttp3.Call shareArrayByInviteAsync(String namespace, String array, Invi * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Email sent successfully to user for email confirmation link -
207 Only a portion of the invitations succeeded, some failed -
+
+ @@ -1207,8 +1359,8 @@ public okhttp3.Call shareGroupByInviteCall(String namespace, String group, Invit // create path and map variables String localVarPath = "/invitations/group/{namespace}/{group}/share" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "group" + "\\}", localVarApiClient.escapeString(group.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "group" + "}", localVarApiClient.escapeString(group.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1232,31 +1384,28 @@ public okhttp3.Call shareGroupByInviteCall(String namespace, String group, Invit localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call shareGroupByInviteValidateBeforeCall(String namespace, String group, InvitationGroupShareEmail emailInvite, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling shareGroupByInvite(Async)"); } - + // verify the required parameter 'group' is set if (group == null) { throw new ApiException("Missing the required parameter 'group' when calling shareGroupByInvite(Async)"); } - + // verify the required parameter 'emailInvite' is set if (emailInvite == null) { throw new ApiException("Missing the required parameter 'emailInvite' when calling shareGroupByInvite(Async)"); } - - okhttp3.Call localVarCall = shareGroupByInviteCall(namespace, group, emailInvite, _callback); - return localVarCall; + return shareGroupByInviteCall(namespace, group, emailInvite, _callback); } @@ -1268,7 +1417,8 @@ private okhttp3.Call shareGroupByInviteValidateBeforeCall(String namespace, Stri * @param emailInvite list of email/namespace recipients (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Email sent successfully to user with an email confirmation link -
207 Only a portion of the invitations succeeded, some failed -
+
+ @@ -1290,7 +1440,8 @@ public void shareGroupByInvite(String namespace, String group, InvitationGroupSh * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Email sent successfully to user with an email confirmation link -
207 Only a portion of the invitations succeeded, some failed -
+
+ @@ -1314,7 +1465,8 @@ public ApiResponse shareGroupByInviteWithHttpInfo(String namespace, String * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Email sent successfully to user with an email confirmation link -
207 Only a portion of the invitations succeeded, some failed -
+
+ @@ -1329,4 +1481,148 @@ public okhttp3.Call shareGroupByInviteAsync(String namespace, String group, Invi localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } + /** + * Build call for sharePayment + * @param namespace name or UUID of namespace sharing their payment info (required) + * @param emailInvite Recipients of the invitation. These may only be namespaces, not email addresses. (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 +
Response Details
Status Code Description Response Headers
204 Email sent successfully to user with an email confirmation link -
207 Only a portion of the invitations succeeded, some failed -
+ + + + + + + +
Response Details
Status Code Description Response Headers
204 Email sent successfully to user for email confirmation link -
207 Only a portion of the invitations succeeded, some failed -
500 Could not reach any recipients -
502 Bad Gateway -
0 error response -
+ */ + public okhttp3.Call sharePaymentCall(String namespace, SharePaymentRequest emailInvite, 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 = emailInvite; + + // create path and map variables + String localVarPath = "/invitations/share_payment/{namespace}" + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.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[] { "BasicAuth", "ApiKeyAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call sharePaymentValidateBeforeCall(String namespace, SharePaymentRequest emailInvite, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'namespace' is set + if (namespace == null) { + throw new ApiException("Missing the required parameter 'namespace' when calling sharePayment(Async)"); + } + + return sharePaymentCall(namespace, emailInvite, _callback); + + } + + /** + * + * Sends email to multiple recipients allowing them to use the payment instrument provided by the source namespace. + * @param namespace name or UUID of namespace sharing their payment info (required) + * @param emailInvite Recipients of the invitation. These may only be namespaces, not email addresses. (optional) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Email sent successfully to user for email confirmation link -
207 Only a portion of the invitations succeeded, some failed -
500 Could not reach any recipients -
502 Bad Gateway -
0 error response -
+ */ + public void sharePayment(String namespace, SharePaymentRequest emailInvite) throws ApiException { + sharePaymentWithHttpInfo(namespace, emailInvite); + } + + /** + * + * Sends email to multiple recipients allowing them to use the payment instrument provided by the source namespace. + * @param namespace name or UUID of namespace sharing their payment info (required) + * @param emailInvite Recipients of the invitation. These may only be namespaces, not email addresses. (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 + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Email sent successfully to user for email confirmation link -
207 Only a portion of the invitations succeeded, some failed -
500 Could not reach any recipients -
502 Bad Gateway -
0 error response -
+ */ + public ApiResponse sharePaymentWithHttpInfo(String namespace, SharePaymentRequest emailInvite) throws ApiException { + okhttp3.Call localVarCall = sharePaymentValidateBeforeCall(namespace, emailInvite, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) + * Sends email to multiple recipients allowing them to use the payment instrument provided by the source namespace. + * @param namespace name or UUID of namespace sharing their payment info (required) + * @param emailInvite Recipients of the invitation. These may only be namespaces, not email addresses. (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 + + + + + + + + +
Response Details
Status Code Description Response Headers
204 Email sent successfully to user for email confirmation link -
207 Only a portion of the invitations succeeded, some failed -
500 Could not reach any recipients -
502 Bad Gateway -
0 error response -
+ */ + public okhttp3.Call sharePaymentAsync(String namespace, SharePaymentRequest emailInvite, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = sharePaymentValidateBeforeCall(namespace, emailInvite, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/api/NotebookApi.java b/src/main/java/io/tiledb/cloud/rest_api/api/NotebookApi.java index 5be5110..2f1d6c5 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/api/NotebookApi.java +++ b/src/main/java/io/tiledb/cloud/rest_api/api/NotebookApi.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,25 +11,29 @@ */ -package io.tiledb.cloud.rest_api.api; +package org.openapitools.client.api; -import io.tiledb.cloud.rest_api.ApiCallback; -import io.tiledb.cloud.rest_api.ApiClient; -import io.tiledb.cloud.rest_api.ApiException; -import io.tiledb.cloud.rest_api.ApiResponse; -import io.tiledb.cloud.rest_api.Configuration; -import io.tiledb.cloud.rest_api.Pair; +import org.openapitools.client.ApiCallback; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.Pair; +import org.openapitools.client.ProgressRequestBody; +import org.openapitools.client.ProgressResponseBody; import com.google.gson.reflect.TypeToken; +import java.io.IOException; -import io.tiledb.cloud.rest_api.model.ArrayInfoUpdate; +import org.openapitools.client.model.ArrayInfoUpdate; +import org.openapitools.client.model.Error; import java.io.File; -import io.tiledb.cloud.rest_api.model.FileUploaded; -import io.tiledb.cloud.rest_api.model.NotebookCopied; -import io.tiledb.cloud.rest_api.model.NotebookCopy; -import io.tiledb.cloud.rest_api.model.NotebookStatus; +import org.openapitools.client.model.FileUploaded; +import org.openapitools.client.model.NotebookCopied; +import org.openapitools.client.model.NotebookCopy; +import org.openapitools.client.model.NotebookStatus; import java.lang.reflect.Type; import java.util.ArrayList; @@ -81,10 +85,10 @@ public void setCustomBaseUrl(String customBaseUrl) { * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ - @@ -109,7 +113,7 @@ public okhttp3.Call getNotebookServerStatusCall(String namespace, final ApiCallb // create path and map variables String localVarPath = "/notebooks/server/{namespace}/status" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -126,28 +130,24 @@ public okhttp3.Call getNotebookServerStatusCall(String namespace, final ApiCallb } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getNotebookServerStatusValidateBeforeCall(String namespace, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling getNotebookServerStatus(Async)"); } - - okhttp3.Call localVarCall = getNotebookServerStatusCall(namespace, _callback); - return localVarCall; + return getNotebookServerStatusCall(namespace, _callback); } @@ -158,10 +158,10 @@ private okhttp3.Call getNotebookServerStatusValidateBeforeCall(String namespace, * @return NotebookStatus * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 status of running notebook -
202 Notebook server is pending -
402 Payment required -
404 Notebook is not running -
502 Bad Gateway -
+
+ - @@ -180,10 +180,10 @@ public NotebookStatus getNotebookServerStatus(String namespace) throws ApiExcept * @return ApiResponse<NotebookStatus> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 status of running notebook -
202 Notebook server is pending -
402 Payment required -
404 Notebook is not running -
502 Bad Gateway -
+
+ - @@ -204,10 +204,10 @@ public ApiResponse getNotebookServerStatusWithHttpInfo(String na * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 status of running notebook -
202 Notebook server is pending -
402 Payment required -
404 Notebook is not running -
502 Bad Gateway -
+
+ - @@ -232,7 +232,8 @@ public okhttp3.Call getNotebookServerStatusAsync(String namespace, final ApiCall * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 status of running notebook -
202 Notebook server is pending -
402 Payment required -
404 Notebook is not running -
502 Bad Gateway -
+
+ @@ -257,8 +258,8 @@ public okhttp3.Call handleCopyNotebookCall(String namespace, String array, Noteb // create path and map variables String localVarPath = "/notebooks/{namespace}/{array}/copy" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -270,10 +271,6 @@ public okhttp3.Call handleCopyNotebookCall(String namespace, String array, Noteb localVarQueryParams.addAll(localVarApiClient.parameterToPair("end_timestamp", endTimestamp)); } - if (X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME != null) { - localVarHeaderParams.put("X-TILEDB-CLOUD-ACCESS-CREDENTIALS-NAME", localVarApiClient.parameterToString(X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME)); - } - final String[] localVarAccepts = { "application/json" }; @@ -290,31 +287,33 @@ public okhttp3.Call handleCopyNotebookCall(String namespace, String array, Noteb localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + if (X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME != null) { + localVarHeaderParams.put("X-TILEDB-CLOUD-ACCESS-CREDENTIALS-NAME", localVarApiClient.parameterToString(X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME)); + } + + + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call handleCopyNotebookValidateBeforeCall(String namespace, String array, NotebookCopy notebookCopy, String X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME, Integer endTimestamp, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling handleCopyNotebook(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling handleCopyNotebook(Async)"); } - + // verify the required parameter 'notebookCopy' is set if (notebookCopy == null) { throw new ApiException("Missing the required parameter 'notebookCopy' when calling handleCopyNotebook(Async)"); } - - okhttp3.Call localVarCall = handleCopyNotebookCall(namespace, array, notebookCopy, X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME, endTimestamp, _callback); - return localVarCall; + return handleCopyNotebookCall(namespace, array, notebookCopy, X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME, endTimestamp, _callback); } @@ -329,7 +328,8 @@ private okhttp3.Call handleCopyNotebookValidateBeforeCall(String namespace, Stri * @return NotebookCopied * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
201 Notebook copied -
502 Bad Gateway -
+
+ @@ -352,7 +352,8 @@ public NotebookCopied handleCopyNotebook(String namespace, String array, Noteboo * @return ApiResponse<NotebookCopied> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
201 Notebook copied -
502 Bad Gateway -
+
+ @@ -377,7 +378,8 @@ public ApiResponse handleCopyNotebookWithHttpInfo(String namespa * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
201 Notebook copied -
502 Bad Gateway -
+
+ @@ -402,7 +404,8 @@ public okhttp3.Call handleCopyNotebookAsync(String namespace, String array, Note * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
201 Notebook copied -
502 Bad Gateway -
+
+ @@ -427,7 +430,7 @@ public okhttp3.Call handleUploadNotebookCall(String namespace, File inputFile, S // create path and map variables String localVarPath = "/notebooks/{namespace}/upload" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -447,10 +450,6 @@ public okhttp3.Call handleUploadNotebookCall(String namespace, File inputFile, S localVarFormParams.put("name", name); } - if (X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME != null) { - localVarHeaderParams.put("X-TILEDB-CLOUD-ACCESS-CREDENTIALS-NAME", localVarApiClient.parameterToString(X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME)); - } - final String[] localVarAccepts = { "application/json" }; @@ -467,26 +466,28 @@ public okhttp3.Call handleUploadNotebookCall(String namespace, File inputFile, S localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + if (X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME != null) { + localVarHeaderParams.put("X-TILEDB-CLOUD-ACCESS-CREDENTIALS-NAME", localVarApiClient.parameterToString(X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME)); + } + + + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call handleUploadNotebookValidateBeforeCall(String namespace, File inputFile, String X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME, String outputUri, String name, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling handleUploadNotebook(Async)"); } - + // verify the required parameter 'inputFile' is set if (inputFile == null) { throw new ApiException("Missing the required parameter 'inputFile' when calling handleUploadNotebook(Async)"); } - - okhttp3.Call localVarCall = handleUploadNotebookCall(namespace, inputFile, X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME, outputUri, name, _callback); - return localVarCall; + return handleUploadNotebookCall(namespace, inputFile, X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME, outputUri, name, _callback); } @@ -501,7 +502,8 @@ private okhttp3.Call handleUploadNotebookValidateBeforeCall(String namespace, Fi * @return FileUploaded * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
201 File uploaded -
502 Bad Gateway -
+
+ @@ -524,7 +526,8 @@ public FileUploaded handleUploadNotebook(String namespace, File inputFile, Strin * @return ApiResponse<FileUploaded> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
201 File uploaded -
502 Bad Gateway -
+
+ @@ -549,7 +552,8 @@ public ApiResponse handleUploadNotebookWithHttpInfo(String namespa * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
201 File uploaded -
502 Bad Gateway -
+
+ @@ -570,7 +574,8 @@ public okhttp3.Call handleUploadNotebookAsync(String namespace, File inputFile, * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
201 File uploaded -
502 Bad Gateway -
+
+ @@ -596,7 +601,7 @@ public okhttp3.Call shutdownNotebookServerCall(String namespace, final ApiCallba // create path and map variables String localVarPath = "/notebooks/server/{namespace}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -613,28 +618,24 @@ public okhttp3.Call shutdownNotebookServerCall(String namespace, final ApiCallba } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call shutdownNotebookServerValidateBeforeCall(String namespace, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling shutdownNotebookServer(Async)"); } - - okhttp3.Call localVarCall = shutdownNotebookServerCall(namespace, _callback); - return localVarCall; + return shutdownNotebookServerCall(namespace, _callback); } @@ -644,7 +645,8 @@ private okhttp3.Call shutdownNotebookServerValidateBeforeCall(String namespace, * @param namespace namespace notebook is in (an organization name or user's username) (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Notebook shutdown successfully -
404 Notebook is not running -
+
+ @@ -663,7 +665,8 @@ public void shutdownNotebookServer(String namespace) throws ApiException { * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Notebook shutdown successfully -
404 Notebook is not running -
+
+ @@ -684,7 +687,8 @@ public ApiResponse shutdownNotebookServerWithHttpInfo(String namespace) th * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Notebook shutdown successfully -
404 Notebook is not running -
+
+ @@ -707,7 +711,8 @@ public okhttp3.Call shutdownNotebookServerAsync(String namespace, final ApiCallb * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Notebook shutdown successfully -
404 Notebook is not running -
+
+ @@ -732,8 +737,8 @@ public okhttp3.Call updateNotebookNameCall(String namespace, String array, Array // create path and map variables String localVarPath = "/notebooks/{namespace}/{array}/rename" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -757,31 +762,28 @@ public okhttp3.Call updateNotebookNameCall(String namespace, String array, Array localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateNotebookNameValidateBeforeCall(String namespace, String array, ArrayInfoUpdate notebookMetadata, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling updateNotebookName(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling updateNotebookName(Async)"); } - + // verify the required parameter 'notebookMetadata' is set if (notebookMetadata == null) { throw new ApiException("Missing the required parameter 'notebookMetadata' when calling updateNotebookName(Async)"); } - - okhttp3.Call localVarCall = updateNotebookNameCall(namespace, array, notebookMetadata, _callback); - return localVarCall; + return updateNotebookNameCall(namespace, array, notebookMetadata, _callback); } @@ -793,7 +795,8 @@ private okhttp3.Call updateNotebookNameValidateBeforeCall(String namespace, Stri * @param notebookMetadata notebook (array) metadata to update (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 notebook name updated successfully -
502 Bad Gateway -
+
+ @@ -813,7 +816,8 @@ public void updateNotebookName(String namespace, String array, ArrayInfoUpdate n * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 notebook name updated successfully -
502 Bad Gateway -
+
+ @@ -835,7 +839,8 @@ public ApiResponse updateNotebookNameWithHttpInfo(String namespace, String * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 notebook name updated successfully -
502 Bad Gateway -
+
+ diff --git a/src/main/java/io/tiledb/cloud/rest_api/api/NotebooksApi.java b/src/main/java/io/tiledb/cloud/rest_api/api/NotebooksApi.java index 70fc1dc..331ae12 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/api/NotebooksApi.java +++ b/src/main/java/io/tiledb/cloud/rest_api/api/NotebooksApi.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,18 +11,24 @@ */ -package io.tiledb.cloud.rest_api.api; +package org.openapitools.client.api; -import io.tiledb.cloud.rest_api.ApiCallback; -import io.tiledb.cloud.rest_api.model.ArrayEndTimestampData; -import io.tiledb.cloud.rest_api.ApiClient; -import io.tiledb.cloud.rest_api.ApiException; -import io.tiledb.cloud.rest_api.ApiResponse; -import io.tiledb.cloud.rest_api.Configuration; -import io.tiledb.cloud.rest_api.Pair; +import org.openapitools.client.ApiCallback; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.Pair; +import org.openapitools.client.ProgressRequestBody; +import org.openapitools.client.ProgressResponseBody; import com.google.gson.reflect.TypeToken; +import java.io.IOException; + + +import org.openapitools.client.model.ArrayEndTimestampData; +import org.openapitools.client.model.Error; import java.lang.reflect.Type; import java.util.ArrayList; @@ -77,7 +83,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 notebook name updated successfully -
502 Bad Gateway -
+
+ @@ -102,8 +109,8 @@ public okhttp3.Call notebooksNamespaceArrayEndTimestampsGetCall(String namespace // create path and map variables String localVarPath = "/notebooks/{namespace}/{array}/end_timestamps" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -128,33 +135,29 @@ public okhttp3.Call notebooksNamespaceArrayEndTimestampsGetCall(String namespace } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call notebooksNamespaceArrayEndTimestampsGetValidateBeforeCall(String namespace, String array, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling notebooksNamespaceArrayEndTimestampsGet(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling notebooksNamespaceArrayEndTimestampsGet(Async)"); } - - okhttp3.Call localVarCall = notebooksNamespaceArrayEndTimestampsGetCall(namespace, array, page, perPage, _callback); - return localVarCall; + return notebooksNamespaceArrayEndTimestampsGetCall(namespace, array, page, perPage, _callback); } @@ -168,7 +171,8 @@ private okhttp3.Call notebooksNamespaceArrayEndTimestampsGetValidateBeforeCall(S * @return ArrayEndTimestampData * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 list of timestamps in milliseconds, paginated -
502 Bad Gateway -
+
+ @@ -190,7 +194,8 @@ public ArrayEndTimestampData notebooksNamespaceArrayEndTimestampsGet(String name * @return ApiResponse<ArrayEndTimestampData> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 list of timestamps in milliseconds, paginated -
502 Bad Gateway -
+
+ @@ -214,7 +219,8 @@ public ApiResponse notebooksNamespaceArrayEndTimestampsGe * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 list of timestamps in milliseconds, paginated -
502 Bad Gateway -
+
+ @@ -237,7 +243,8 @@ public okhttp3.Call notebooksNamespaceArrayEndTimestampsGetAsync(String namespac * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 list of timestamps in milliseconds, paginated -
502 Bad Gateway -
+
+ @@ -262,8 +269,8 @@ public okhttp3.Call notebooksNamespaceArrayPrunePostCall(String namespace, Strin // create path and map variables String localVarPath = "/notebooks/{namespace}/{array}/prune" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -284,33 +291,29 @@ public okhttp3.Call notebooksNamespaceArrayPrunePostCall(String namespace, Strin } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call notebooksNamespaceArrayPrunePostValidateBeforeCall(String namespace, String array, Integer keepVersions, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling notebooksNamespaceArrayPrunePost(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling notebooksNamespaceArrayPrunePost(Async)"); } - - okhttp3.Call localVarCall = notebooksNamespaceArrayPrunePostCall(namespace, array, keepVersions, _callback); - return localVarCall; + return notebooksNamespaceArrayPrunePostCall(namespace, array, keepVersions, _callback); } @@ -322,7 +325,8 @@ private okhttp3.Call notebooksNamespaceArrayPrunePostValidateBeforeCall(String n * @param keepVersions The number of most recents fragment to preserve (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 notebook pruned -
502 Bad Gateway -
+
+ @@ -342,7 +346,8 @@ public void notebooksNamespaceArrayPrunePost(String namespace, String array, Int * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 notebook pruned -
502 Bad Gateway -
+
+ @@ -364,7 +369,8 @@ public ApiResponse notebooksNamespaceArrayPrunePostWithHttpInfo(String nam * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 notebook pruned -
502 Bad Gateway -
+
+ diff --git a/src/main/java/io/tiledb/cloud/rest_api/api/OrganizationApi.java b/src/main/java/io/tiledb/cloud/rest_api/api/OrganizationApi.java index 56354bc..c6f64a5 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/api/OrganizationApi.java +++ b/src/main/java/io/tiledb/cloud/rest_api/api/OrganizationApi.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,24 +11,30 @@ */ -package io.tiledb.cloud.rest_api.api; +package org.openapitools.client.api; -import io.tiledb.cloud.rest_api.ApiCallback; -import io.tiledb.cloud.rest_api.model.SSODomainConfig; -import io.tiledb.cloud.rest_api.ApiClient; -import io.tiledb.cloud.rest_api.ApiException; -import io.tiledb.cloud.rest_api.ApiResponse; -import io.tiledb.cloud.rest_api.Configuration; -import io.tiledb.cloud.rest_api.Pair; +import org.openapitools.client.ApiCallback; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.Pair; +import org.openapitools.client.ProgressRequestBody; +import org.openapitools.client.ProgressResponseBody; import com.google.gson.reflect.TypeToken; +import java.io.IOException; -import io.tiledb.cloud.rest_api.model.AWSAccessCredentials; -import io.tiledb.cloud.rest_api.model.DomainCheckResult; -import io.tiledb.cloud.rest_api.model.Organization; -import io.tiledb.cloud.rest_api.model.OrganizationUser; -import io.tiledb.cloud.rest_api.model.SSODomainConfigResponse; + +import org.openapitools.client.model.AWSAccessCredentials; +import org.openapitools.client.model.DomainCheckResult; +import org.openapitools.client.model.Error; +import org.openapitools.client.model.Organization; +import org.openapitools.client.model.OrganizationUpdate; +import org.openapitools.client.model.OrganizationUser; +import org.openapitools.client.model.SSODomainConfig; +import org.openapitools.client.model.SSODomainConfigResponse; import java.lang.reflect.Type; import java.util.ArrayList; @@ -81,7 +87,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 notebook pruned -
502 Bad Gateway -
+
+ @@ -106,7 +113,7 @@ public okhttp3.Call addAWSAccessCredentialsCall(String namespace, AWSAccessCrede // create path and map variables String localVarPath = "/credentials/{namespace}/aws" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -130,26 +137,23 @@ public okhttp3.Call addAWSAccessCredentialsCall(String namespace, AWSAccessCrede localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call addAWSAccessCredentialsValidateBeforeCall(String namespace, AWSAccessCredentials awsAccessCredentials, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling addAWSAccessCredentials(Async)"); } - + // verify the required parameter 'awsAccessCredentials' is set if (awsAccessCredentials == null) { throw new ApiException("Missing the required parameter 'awsAccessCredentials' when calling addAWSAccessCredentials(Async)"); } - - okhttp3.Call localVarCall = addAWSAccessCredentialsCall(namespace, awsAccessCredentials, _callback); - return localVarCall; + return addAWSAccessCredentialsCall(namespace, awsAccessCredentials, _callback); } @@ -160,7 +164,8 @@ private okhttp3.Call addAWSAccessCredentialsValidateBeforeCall(String namespace, * @param awsAccessCredentials aws access credentials to store for a namespace (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 AWS keys added successfully -
502 Bad Gateway -
+
+ @@ -179,7 +184,8 @@ public void addAWSAccessCredentials(String namespace, AWSAccessCredentials awsAc * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 AWS keys added successfully -
502 Bad Gateway -
+
+ @@ -200,7 +206,8 @@ public ApiResponse addAWSAccessCredentialsWithHttpInfo(String namespace, A * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 AWS keys added successfully -
502 Bad Gateway -
+
+ @@ -221,7 +228,8 @@ public okhttp3.Call addAWSAccessCredentialsAsync(String namespace, AWSAccessCred * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 AWS keys added successfully -
502 Bad Gateway -
+
+ @@ -246,7 +254,7 @@ public okhttp3.Call addUserToOrganizationCall(String organization, OrganizationU // create path and map variables String localVarPath = "/organizations/{organization}/user" - .replaceAll("\\{" + "organization" + "\\}", localVarApiClient.escapeString(organization.toString())); + .replace("{" + "organization" + "}", localVarApiClient.escapeString(organization.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -270,26 +278,23 @@ public okhttp3.Call addUserToOrganizationCall(String organization, OrganizationU localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call addUserToOrganizationValidateBeforeCall(String organization, OrganizationUser user, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'organization' is set if (organization == null) { throw new ApiException("Missing the required parameter 'organization' when calling addUserToOrganization(Async)"); } - + // verify the required parameter 'user' is set if (user == null) { throw new ApiException("Missing the required parameter 'user' when calling addUserToOrganization(Async)"); } - - okhttp3.Call localVarCall = addUserToOrganizationCall(organization, user, _callback); - return localVarCall; + return addUserToOrganizationCall(organization, user, _callback); } @@ -300,7 +305,8 @@ private okhttp3.Call addUserToOrganizationValidateBeforeCall(String organization * @param user user to add (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 user added to organization successfully -
502 Bad Gateway -
+
+ @@ -319,7 +325,8 @@ public void addUserToOrganization(String organization, OrganizationUser user) th * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 user added to organization successfully -
502 Bad Gateway -
+
+ @@ -340,7 +347,8 @@ public ApiResponse addUserToOrganizationWithHttpInfo(String organization, * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 user added to organization successfully -
502 Bad Gateway -
+
+ @@ -360,7 +368,8 @@ public okhttp3.Call addUserToOrganizationAsync(String organization, Organization * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 user added to organization successfully -
502 Bad Gateway -
+
+ @@ -385,7 +394,7 @@ public okhttp3.Call checkAWSAccessCredentialsCall(String namespace, final ApiCal // create path and map variables String localVarPath = "/credentials/{namespace}/aws" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -402,28 +411,24 @@ public okhttp3.Call checkAWSAccessCredentialsCall(String namespace, final ApiCal } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call checkAWSAccessCredentialsValidateBeforeCall(String namespace, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling checkAWSAccessCredentials(Async)"); } - - okhttp3.Call localVarCall = checkAWSAccessCredentialsCall(namespace, _callback); - return localVarCall; + return checkAWSAccessCredentialsCall(namespace, _callback); } @@ -434,7 +439,8 @@ private okhttp3.Call checkAWSAccessCredentialsValidateBeforeCall(String namespac * @return List<AWSAccessCredentials> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 AWS keys are set -
502 Bad Gateway -
+
+ @@ -453,7 +459,8 @@ public List checkAWSAccessCredentials(String namespace) th * @return ApiResponse<List<AWSAccessCredentials>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 AWS keys are set -
502 Bad Gateway -
+
+ @@ -474,7 +481,8 @@ public ApiResponse> checkAWSAccessCredentialsWithHttp * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 AWS keys are set -
502 Bad Gateway -
+
+ @@ -496,7 +504,8 @@ public okhttp3.Call checkAWSAccessCredentialsAsync(String namespace, final ApiCa * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 AWS keys are set -
502 Bad Gateway -
+
+ @@ -521,8 +530,8 @@ public okhttp3.Call checkAWSAccessCredentialsByNameCall(String namespace, String // create path and map variables String localVarPath = "/credentials/{namespace}/aws/{name}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -539,33 +548,29 @@ public okhttp3.Call checkAWSAccessCredentialsByNameCall(String namespace, String } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call checkAWSAccessCredentialsByNameValidateBeforeCall(String namespace, String name, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling checkAWSAccessCredentialsByName(Async)"); } - + // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling checkAWSAccessCredentialsByName(Async)"); } - - okhttp3.Call localVarCall = checkAWSAccessCredentialsByNameCall(namespace, name, _callback); - return localVarCall; + return checkAWSAccessCredentialsByNameCall(namespace, name, _callback); } @@ -577,7 +582,8 @@ private okhttp3.Call checkAWSAccessCredentialsByNameValidateBeforeCall(String na * @return AWSAccessCredentials * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 AWS keys are set -
502 Bad Gateway -
+
+ @@ -597,7 +603,8 @@ public AWSAccessCredentials checkAWSAccessCredentialsByName(String namespace, St * @return ApiResponse<AWSAccessCredentials> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 AWS keys are set -
502 Bad Gateway -
+
+ @@ -619,7 +626,8 @@ public ApiResponse checkAWSAccessCredentialsByNameWithHttp * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 AWS keys are set -
502 Bad Gateway -
+
+ @@ -641,7 +649,8 @@ public okhttp3.Call checkAWSAccessCredentialsByNameAsync(String namespace, Strin * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 AWS keys are set -
502 Bad Gateway -
+
+ @@ -665,8 +674,8 @@ public okhttp3.Call checkSSODomainCall(String organization, String uuid, final A // create path and map variables String localVarPath = "/organizations/{organization}/sso_domains/{uuid}/run_check" - .replaceAll("\\{" + "organization" + "\\}", localVarApiClient.escapeString(organization.toString())) - .replaceAll("\\{" + "uuid" + "\\}", localVarApiClient.escapeString(uuid.toString())); + .replace("{" + "organization" + "}", localVarApiClient.escapeString(organization.toString())) + .replace("{" + "uuid" + "}", localVarApiClient.escapeString(uuid.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -683,33 +692,29 @@ public okhttp3.Call checkSSODomainCall(String organization, String uuid, final A } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call checkSSODomainValidateBeforeCall(String organization, String uuid, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'organization' is set if (organization == null) { throw new ApiException("Missing the required parameter 'organization' when calling checkSSODomain(Async)"); } - + // verify the required parameter 'uuid' is set if (uuid == null) { throw new ApiException("Missing the required parameter 'uuid' when calling checkSSODomain(Async)"); } - - okhttp3.Call localVarCall = checkSSODomainCall(organization, uuid, _callback); - return localVarCall; + return checkSSODomainCall(organization, uuid, _callback); } @@ -721,7 +726,8 @@ private okhttp3.Call checkSSODomainValidateBeforeCall(String organization, Strin * @return DomainCheckResult * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 The check executed. Detailed results are available in the response. -
0 error response -
+
+ @@ -740,7 +746,8 @@ public DomainCheckResult checkSSODomain(String organization, String uuid) throws * @return ApiResponse<DomainCheckResult> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 The check executed. Detailed results are available in the response. -
0 error response -
+
+ @@ -761,7 +768,8 @@ public ApiResponse checkSSODomainWithHttpInfo(String organiza * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 The check executed. Detailed results are available in the response. -
0 error response -
+
+ @@ -781,7 +789,8 @@ public okhttp3.Call checkSSODomainAsync(String organization, String uuid, final * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 The check executed. Detailed results are available in the response. -
0 error response -
+
+ @@ -829,21 +838,18 @@ public okhttp3.Call createOrganizationCall(Organization organization, final ApiC localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createOrganizationValidateBeforeCall(Organization organization, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'organization' is set if (organization == null) { throw new ApiException("Missing the required parameter 'organization' when calling createOrganization(Async)"); } - - okhttp3.Call localVarCall = createOrganizationCall(organization, _callback); - return localVarCall; + return createOrganizationCall(organization, _callback); } @@ -853,7 +859,8 @@ private okhttp3.Call createOrganizationValidateBeforeCall(Organization organizat * @param organization organization to create (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 organization created successfully -
502 Bad Gateway -
+
+ @@ -871,7 +878,8 @@ public void createOrganization(Organization organization) throws ApiException { * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 organization created successfully -
502 Bad Gateway -
+
+ @@ -891,7 +899,8 @@ public ApiResponse createOrganizationWithHttpInfo(Organization organizatio * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 organization created successfully -
502 Bad Gateway -
+
+ @@ -912,7 +921,8 @@ public okhttp3.Call createOrganizationAsync(Organization organization, final Api * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 organization created successfully -
502 Bad Gateway -
+
+ @@ -936,7 +946,7 @@ public okhttp3.Call createSSODomainCall(String organization, SSODomainConfig con // create path and map variables String localVarPath = "/organizations/{organization}/sso_domain" - .replaceAll("\\{" + "organization" + "\\}", localVarApiClient.escapeString(organization.toString())); + .replace("{" + "organization" + "}", localVarApiClient.escapeString(organization.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -960,26 +970,23 @@ public okhttp3.Call createSSODomainCall(String organization, SSODomainConfig con localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createSSODomainValidateBeforeCall(String organization, SSODomainConfig config, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'organization' is set if (organization == null) { throw new ApiException("Missing the required parameter 'organization' when calling createSSODomain(Async)"); } - + // verify the required parameter 'config' is set if (config == null) { throw new ApiException("Missing the required parameter 'config' when calling createSSODomain(Async)"); } - - okhttp3.Call localVarCall = createSSODomainCall(organization, config, _callback); - return localVarCall; + return createSSODomainCall(organization, config, _callback); } @@ -991,7 +998,8 @@ private okhttp3.Call createSSODomainValidateBeforeCall(String organization, SSOD * @return SSODomainConfig * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Claim created successfully. -
0 error response -
+
+ @@ -1010,7 +1018,8 @@ public SSODomainConfig createSSODomain(String organization, SSODomainConfig conf * @return ApiResponse<SSODomainConfig> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Claim created successfully. -
0 error response -
+
+ @@ -1031,7 +1040,8 @@ public ApiResponse createSSODomainWithHttpInfo(String organizat * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Claim created successfully. -
0 error response -
+
+ @@ -1052,7 +1062,8 @@ public okhttp3.Call createSSODomainAsync(String organization, SSODomainConfig co * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Claim created successfully. -
0 error response -
+
+ @@ -1077,8 +1088,8 @@ public okhttp3.Call deleteAWSAccessCredentialsCall(String namespace, String name // create path and map variables String localVarPath = "/credentials/{namespace}/aws/{name}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1095,33 +1106,29 @@ public okhttp3.Call deleteAWSAccessCredentialsCall(String namespace, String name } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteAWSAccessCredentialsValidateBeforeCall(String namespace, String name, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling deleteAWSAccessCredentials(Async)"); } - + // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling deleteAWSAccessCredentials(Async)"); } - - okhttp3.Call localVarCall = deleteAWSAccessCredentialsCall(namespace, name, _callback); - return localVarCall; + return deleteAWSAccessCredentialsCall(namespace, name, _callback); } @@ -1132,7 +1139,8 @@ private okhttp3.Call deleteAWSAccessCredentialsValidateBeforeCall(String namespa * @param name name (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 AWS credentials deleted -
502 Bad Gateway -
+
+ @@ -1151,7 +1159,8 @@ public void deleteAWSAccessCredentials(String namespace, String name) throws Api * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 AWS credentials deleted -
502 Bad Gateway -
+
+ @@ -1172,7 +1181,8 @@ public ApiResponse deleteAWSAccessCredentialsWithHttpInfo(String namespace * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 AWS credentials deleted -
502 Bad Gateway -
+
+ @@ -1192,7 +1202,8 @@ public okhttp3.Call deleteAWSAccessCredentialsAsync(String namespace, String nam * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 AWS credentials deleted -
502 Bad Gateway -
+
+ @@ -1217,7 +1228,7 @@ public okhttp3.Call deleteOrganizationCall(String organization, final ApiCallbac // create path and map variables String localVarPath = "/organizations/{organization}" - .replaceAll("\\{" + "organization" + "\\}", localVarApiClient.escapeString(organization.toString())); + .replace("{" + "organization" + "}", localVarApiClient.escapeString(organization.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1234,28 +1245,24 @@ public okhttp3.Call deleteOrganizationCall(String organization, final ApiCallbac } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteOrganizationValidateBeforeCall(String organization, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'organization' is set if (organization == null) { throw new ApiException("Missing the required parameter 'organization' when calling deleteOrganization(Async)"); } - - okhttp3.Call localVarCall = deleteOrganizationCall(organization, _callback); - return localVarCall; + return deleteOrganizationCall(organization, _callback); } @@ -1265,7 +1272,8 @@ private okhttp3.Call deleteOrganizationValidateBeforeCall(String organization, f * @param organization organization name or ID (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 organization deleted -
502 Bad Gateway -
+
+ @@ -1283,7 +1291,8 @@ public void deleteOrganization(String organization) throws ApiException { * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 organization deleted -
502 Bad Gateway -
+
+ @@ -1303,7 +1312,8 @@ public ApiResponse deleteOrganizationWithHttpInfo(String organization) thr * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 organization deleted -
502 Bad Gateway -
+
+ @@ -1324,7 +1334,8 @@ public okhttp3.Call deleteOrganizationAsync(String organization, final ApiCallba * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 organization deleted -
502 Bad Gateway -
+
+ @@ -1348,8 +1359,8 @@ public okhttp3.Call deleteSSODomainCall(String organization, String uuid, final // create path and map variables String localVarPath = "/organizations/{organization}/sso_domains/{uuid}" - .replaceAll("\\{" + "organization" + "\\}", localVarApiClient.escapeString(organization.toString())) - .replaceAll("\\{" + "uuid" + "\\}", localVarApiClient.escapeString(uuid.toString())); + .replace("{" + "organization" + "}", localVarApiClient.escapeString(organization.toString())) + .replace("{" + "uuid" + "}", localVarApiClient.escapeString(uuid.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1366,33 +1377,29 @@ public okhttp3.Call deleteSSODomainCall(String organization, String uuid, final } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteSSODomainValidateBeforeCall(String organization, String uuid, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'organization' is set if (organization == null) { throw new ApiException("Missing the required parameter 'organization' when calling deleteSSODomain(Async)"); } - + // verify the required parameter 'uuid' is set if (uuid == null) { throw new ApiException("Missing the required parameter 'uuid' when calling deleteSSODomain(Async)"); } - - okhttp3.Call localVarCall = deleteSSODomainCall(organization, uuid, _callback); - return localVarCall; + return deleteSSODomainCall(organization, uuid, _callback); } @@ -1403,7 +1410,8 @@ private okhttp3.Call deleteSSODomainValidateBeforeCall(String organization, Stri * @param uuid configuration ID (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Deletion successful. -
0 error response -
+
+ @@ -1421,7 +1429,8 @@ public void deleteSSODomain(String organization, String uuid) throws ApiExceptio * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Deletion successful. -
0 error response -
+
+ @@ -1441,7 +1450,8 @@ public ApiResponse deleteSSODomainWithHttpInfo(String organization, String * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Deletion successful. -
0 error response -
+
+ @@ -1461,7 +1471,8 @@ public okhttp3.Call deleteSSODomainAsync(String organization, String uuid, final * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Deletion successful. -
0 error response -
+
+ @@ -1486,8 +1497,8 @@ public okhttp3.Call deleteUserFromOrganizationCall(String organization, String u // create path and map variables String localVarPath = "/organizations/{organization}/{username}" - .replaceAll("\\{" + "organization" + "\\}", localVarApiClient.escapeString(organization.toString())) - .replaceAll("\\{" + "username" + "\\}", localVarApiClient.escapeString(username.toString())); + .replace("{" + "organization" + "}", localVarApiClient.escapeString(organization.toString())) + .replace("{" + "username" + "}", localVarApiClient.escapeString(username.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1504,33 +1515,29 @@ public okhttp3.Call deleteUserFromOrganizationCall(String organization, String u } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteUserFromOrganizationValidateBeforeCall(String organization, String username, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'organization' is set if (organization == null) { throw new ApiException("Missing the required parameter 'organization' when calling deleteUserFromOrganization(Async)"); } - + // verify the required parameter 'username' is set if (username == null) { throw new ApiException("Missing the required parameter 'username' when calling deleteUserFromOrganization(Async)"); } - - okhttp3.Call localVarCall = deleteUserFromOrganizationCall(organization, username, _callback); - return localVarCall; + return deleteUserFromOrganizationCall(organization, username, _callback); } @@ -1541,7 +1548,8 @@ private okhttp3.Call deleteUserFromOrganizationValidateBeforeCall(String organiz * @param username username to manipulate (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 user delete from organization successfully -
502 Bad Gateway -
+
+ @@ -1560,7 +1568,8 @@ public void deleteUserFromOrganization(String organization, String username) thr * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 user delete from organization successfully -
502 Bad Gateway -
+
+ @@ -1581,7 +1590,8 @@ public ApiResponse deleteUserFromOrganizationWithHttpInfo(String organizat * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 user delete from organization successfully -
502 Bad Gateway -
+
+ @@ -1600,7 +1610,8 @@ public okhttp3.Call deleteUserFromOrganizationAsync(String organization, String * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 user delete from organization successfully -
502 Bad Gateway -
+
+ @@ -1643,23 +1654,19 @@ public okhttp3.Call getAllOrganizationsCall(final ApiCallback _callback) throws } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getAllOrganizationsValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = getAllOrganizationsCall(_callback); - return localVarCall; + return getAllOrganizationsCall(_callback); } @@ -1669,7 +1676,8 @@ private okhttp3.Call getAllOrganizationsValidateBeforeCall(final ApiCallback _ca * @return List<Organization> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 array of organizations the user is member of -
400 Error finding organizations -
+
+ @@ -1689,7 +1697,8 @@ public List getAllOrganizations() throws ApiException { * @return ApiResponse<List<Organization>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 array of organizations the user is member of -
400 Error finding organizations -
+
+ @@ -1711,7 +1720,8 @@ public ApiResponse> getAllOrganizationsWithHttpInfo() throws * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 array of organizations the user is member of -
400 Error finding organizations -
+
+ @@ -1734,7 +1744,8 @@ public okhttp3.Call getAllOrganizationsAsync(final ApiCallback +
Response Details
Status Code Description Response Headers
200 array of organizations the user is member of -
400 Error finding organizations -
+ @@ -1760,7 +1771,7 @@ public okhttp3.Call getOrganizationCall(String organization, final ApiCallback _ // create path and map variables String localVarPath = "/organizations/{organization}" - .replaceAll("\\{" + "organization" + "\\}", localVarApiClient.escapeString(organization.toString())); + .replace("{" + "organization" + "}", localVarApiClient.escapeString(organization.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1777,28 +1788,24 @@ public okhttp3.Call getOrganizationCall(String organization, final ApiCallback _ } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getOrganizationValidateBeforeCall(String organization, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'organization' is set if (organization == null) { throw new ApiException("Missing the required parameter 'organization' when calling getOrganization(Async)"); } - - okhttp3.Call localVarCall = getOrganizationCall(organization, _callback); - return localVarCall; + return getOrganizationCall(organization, _callback); } @@ -1809,7 +1816,8 @@ private okhttp3.Call getOrganizationValidateBeforeCall(String organization, fina * @return Organization * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 organization details -
404 Organization does not exist -
+
+ @@ -1829,7 +1837,8 @@ public Organization getOrganization(String organization) throws ApiException { * @return ApiResponse<Organization> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 organization details -
404 Organization does not exist -
+
+ @@ -1851,7 +1860,8 @@ public ApiResponse getOrganizationWithHttpInfo(String organization * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 organization details -
404 Organization does not exist -
+
+ @@ -1874,7 +1884,8 @@ public okhttp3.Call getOrganizationAsync(String organization, final ApiCallback< * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 organization details -
404 Organization does not exist -
+
+ @@ -1900,8 +1911,8 @@ public okhttp3.Call getOrganizationUserCall(String organization, String username // create path and map variables String localVarPath = "/organizations/{organization}/{username}" - .replaceAll("\\{" + "organization" + "\\}", localVarApiClient.escapeString(organization.toString())) - .replaceAll("\\{" + "username" + "\\}", localVarApiClient.escapeString(username.toString())); + .replace("{" + "organization" + "}", localVarApiClient.escapeString(organization.toString())) + .replace("{" + "username" + "}", localVarApiClient.escapeString(username.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1918,33 +1929,29 @@ public okhttp3.Call getOrganizationUserCall(String organization, String username } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getOrganizationUserValidateBeforeCall(String organization, String username, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'organization' is set if (organization == null) { throw new ApiException("Missing the required parameter 'organization' when calling getOrganizationUser(Async)"); } - + // verify the required parameter 'username' is set if (username == null) { throw new ApiException("Missing the required parameter 'username' when calling getOrganizationUser(Async)"); } - - okhttp3.Call localVarCall = getOrganizationUserCall(organization, username, _callback); - return localVarCall; + return getOrganizationUserCall(organization, username, _callback); } @@ -1956,7 +1963,8 @@ private okhttp3.Call getOrganizationUserValidateBeforeCall(String organization, * @return OrganizationUser * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 user from organization -
404 User is not in organization -
+
+ @@ -1977,7 +1985,8 @@ public OrganizationUser getOrganizationUser(String organization, String username * @return ApiResponse<OrganizationUser> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 user from organization -
404 User is not in organization -
+
+ @@ -2000,7 +2009,8 @@ public ApiResponse getOrganizationUserWithHttpInfo(String orga * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 user from organization -
404 User is not in organization -
+
+ @@ -2023,7 +2033,8 @@ public okhttp3.Call getOrganizationUserAsync(String organization, String usernam * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 user from organization -
404 User is not in organization -
+
+ @@ -2047,8 +2058,8 @@ public okhttp3.Call getSSODomainCall(String organization, String uuid, final Api // create path and map variables String localVarPath = "/organizations/{organization}/sso_domains/{uuid}" - .replaceAll("\\{" + "organization" + "\\}", localVarApiClient.escapeString(organization.toString())) - .replaceAll("\\{" + "uuid" + "\\}", localVarApiClient.escapeString(uuid.toString())); + .replace("{" + "organization" + "}", localVarApiClient.escapeString(organization.toString())) + .replace("{" + "uuid" + "}", localVarApiClient.escapeString(uuid.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2065,33 +2076,29 @@ public okhttp3.Call getSSODomainCall(String organization, String uuid, final Api } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getSSODomainValidateBeforeCall(String organization, String uuid, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'organization' is set if (organization == null) { throw new ApiException("Missing the required parameter 'organization' when calling getSSODomain(Async)"); } - + // verify the required parameter 'uuid' is set if (uuid == null) { throw new ApiException("Missing the required parameter 'uuid' when calling getSSODomain(Async)"); } - - okhttp3.Call localVarCall = getSSODomainCall(organization, uuid, _callback); - return localVarCall; + return getSSODomainCall(organization, uuid, _callback); } @@ -2103,7 +2110,8 @@ private okhttp3.Call getSSODomainValidateBeforeCall(String organization, String * @return SSODomainConfig * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 The details about this domain connection. -
0 error response -
+
+ @@ -2122,7 +2130,8 @@ public SSODomainConfig getSSODomain(String organization, String uuid) throws Api * @return ApiResponse<SSODomainConfig> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 The details about this domain connection. -
0 error response -
+
+ @@ -2143,7 +2152,8 @@ public ApiResponse getSSODomainWithHttpInfo(String organization * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 The details about this domain connection. -
0 error response -
+
+ @@ -2163,7 +2173,8 @@ public okhttp3.Call getSSODomainAsync(String organization, String uuid, final Ap * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 The details about this domain connection. -
0 error response -
+
+ @@ -2187,7 +2198,7 @@ public okhttp3.Call getSSODomainsCall(String organization, final ApiCallback _ca // create path and map variables String localVarPath = "/organizations/{organization}/sso_domains" - .replaceAll("\\{" + "organization" + "\\}", localVarApiClient.escapeString(organization.toString())); + .replace("{" + "organization" + "}", localVarApiClient.escapeString(organization.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2204,28 +2215,24 @@ public okhttp3.Call getSSODomainsCall(String organization, final ApiCallback _ca } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getSSODomainsValidateBeforeCall(String organization, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'organization' is set if (organization == null) { throw new ApiException("Missing the required parameter 'organization' when calling getSSODomains(Async)"); } - - okhttp3.Call localVarCall = getSSODomainsCall(organization, _callback); - return localVarCall; + return getSSODomainsCall(organization, _callback); } @@ -2236,7 +2243,8 @@ private okhttp3.Call getSSODomainsValidateBeforeCall(String organization, final * @return SSODomainConfigResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 The SSO domains associated with the org. -
0 error response -
+
+ @@ -2254,7 +2262,8 @@ public SSODomainConfigResponse getSSODomains(String organization) throws ApiExce * @return ApiResponse<SSODomainConfigResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 The SSO domains associated with the org. -
0 error response -
+
+ @@ -2274,7 +2283,8 @@ public ApiResponse getSSODomainsWithHttpInfo(String org * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 The SSO domains associated with the org. -
0 error response -
+
+ @@ -2296,7 +2306,8 @@ public okhttp3.Call getSSODomainsAsync(String organization, final ApiCallback +
Response Details
Status Code Description Response Headers
200 The SSO domains associated with the org. -
0 error response -
+ @@ -2321,8 +2332,8 @@ public okhttp3.Call updateAWSAccessCredentialsCall(String namespace, String name // create path and map variables String localVarPath = "/credentials/{namespace}/aws/{name}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2346,31 +2357,28 @@ public okhttp3.Call updateAWSAccessCredentialsCall(String namespace, String name localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateAWSAccessCredentialsValidateBeforeCall(String namespace, String name, AWSAccessCredentials awsAccessCredentials, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling updateAWSAccessCredentials(Async)"); } - + // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling updateAWSAccessCredentials(Async)"); } - + // verify the required parameter 'awsAccessCredentials' is set if (awsAccessCredentials == null) { throw new ApiException("Missing the required parameter 'awsAccessCredentials' when calling updateAWSAccessCredentials(Async)"); } - - okhttp3.Call localVarCall = updateAWSAccessCredentialsCall(namespace, name, awsAccessCredentials, _callback); - return localVarCall; + return updateAWSAccessCredentialsCall(namespace, name, awsAccessCredentials, _callback); } @@ -2382,7 +2390,8 @@ private okhttp3.Call updateAWSAccessCredentialsValidateBeforeCall(String namespa * @param awsAccessCredentials aws credentials to update (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 AWS keys updated successfully -
502 Bad Gateway -
+
+ @@ -2402,7 +2411,8 @@ public void updateAWSAccessCredentials(String namespace, String name, AWSAccessC * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 AWS keys updated successfully -
502 Bad Gateway -
+
+ @@ -2424,7 +2434,8 @@ public ApiResponse updateAWSAccessCredentialsWithHttpInfo(String namespace * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 AWS keys updated successfully -
502 Bad Gateway -
+
+ @@ -2445,14 +2456,15 @@ public okhttp3.Call updateAWSAccessCredentialsAsync(String namespace, String nam * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 AWS keys updated successfully -
502 Bad Gateway -
+
+
Response Details
Status Code Description Response Headers
204 organization updated successfully -
502 Bad Gateway -
0 error response -
*/ - public okhttp3.Call updateOrganizationCall(String organization, Organization organizationDetails, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateOrganizationCall(String organization, OrganizationUpdate organizationDetails, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2470,7 +2482,7 @@ public okhttp3.Call updateOrganizationCall(String organization, Organization org // create path and map variables String localVarPath = "/organizations/{organization}" - .replaceAll("\\{" + "organization" + "\\}", localVarApiClient.escapeString(organization.toString())); + .replace("{" + "organization" + "}", localVarApiClient.escapeString(organization.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2494,26 +2506,23 @@ public okhttp3.Call updateOrganizationCall(String organization, Organization org localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateOrganizationValidateBeforeCall(String organization, Organization organizationDetails, final ApiCallback _callback) throws ApiException { - + private okhttp3.Call updateOrganizationValidateBeforeCall(String organization, OrganizationUpdate organizationDetails, final ApiCallback _callback) throws ApiException { // verify the required parameter 'organization' is set if (organization == null) { throw new ApiException("Missing the required parameter 'organization' when calling updateOrganization(Async)"); } - + // verify the required parameter 'organizationDetails' is set if (organizationDetails == null) { throw new ApiException("Missing the required parameter 'organizationDetails' when calling updateOrganization(Async)"); } - - okhttp3.Call localVarCall = updateOrganizationCall(organization, organizationDetails, _callback); - return localVarCall; + return updateOrganizationCall(organization, organizationDetails, _callback); } @@ -2524,14 +2533,15 @@ private okhttp3.Call updateOrganizationValidateBeforeCall(String organization, O * @param organizationDetails organization details to update (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
204 organization updated successfully -
502 Bad Gateway -
0 error response -
*/ - public void updateOrganization(String organization, Organization organizationDetails) throws ApiException { + public void updateOrganization(String organization, OrganizationUpdate organizationDetails) throws ApiException { updateOrganizationWithHttpInfo(organization, organizationDetails); } @@ -2543,14 +2553,15 @@ public void updateOrganization(String organization, Organization organizationDet * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
204 organization updated successfully -
502 Bad Gateway -
0 error response -
*/ - public ApiResponse updateOrganizationWithHttpInfo(String organization, Organization organizationDetails) throws ApiException { + public ApiResponse updateOrganizationWithHttpInfo(String organization, OrganizationUpdate organizationDetails) throws ApiException { okhttp3.Call localVarCall = updateOrganizationValidateBeforeCall(organization, organizationDetails, null); return localVarApiClient.execute(localVarCall); } @@ -2564,14 +2575,15 @@ public ApiResponse updateOrganizationWithHttpInfo(String organization, Org * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+
Response Details
Status Code Description Response Headers
204 organization updated successfully -
502 Bad Gateway -
0 error response -
*/ - public okhttp3.Call updateOrganizationAsync(String organization, Organization organizationDetails, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateOrganizationAsync(String organization, OrganizationUpdate organizationDetails, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateOrganizationValidateBeforeCall(organization, organizationDetails, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -2586,7 +2598,8 @@ public okhttp3.Call updateOrganizationAsync(String organization, Organization or * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -2610,8 +2623,8 @@ public okhttp3.Call updateSSODomainCall(String organization, String uuid, SSODom // create path and map variables String localVarPath = "/organizations/{organization}/sso_domains/{uuid}" - .replaceAll("\\{" + "organization" + "\\}", localVarApiClient.escapeString(organization.toString())) - .replaceAll("\\{" + "uuid" + "\\}", localVarApiClient.escapeString(uuid.toString())); + .replace("{" + "organization" + "}", localVarApiClient.escapeString(organization.toString())) + .replace("{" + "uuid" + "}", localVarApiClient.escapeString(uuid.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2635,31 +2648,28 @@ public okhttp3.Call updateSSODomainCall(String organization, String uuid, SSODom localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateSSODomainValidateBeforeCall(String organization, String uuid, SSODomainConfig config, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'organization' is set if (organization == null) { throw new ApiException("Missing the required parameter 'organization' when calling updateSSODomain(Async)"); } - + // verify the required parameter 'uuid' is set if (uuid == null) { throw new ApiException("Missing the required parameter 'uuid' when calling updateSSODomain(Async)"); } - + // verify the required parameter 'config' is set if (config == null) { throw new ApiException("Missing the required parameter 'config' when calling updateSSODomain(Async)"); } - - okhttp3.Call localVarCall = updateSSODomainCall(organization, uuid, config, _callback); - return localVarCall; + return updateSSODomainCall(organization, uuid, config, _callback); } @@ -2672,7 +2682,8 @@ private okhttp3.Call updateSSODomainValidateBeforeCall(String organization, Stri * @return SSODomainConfig * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 The updated details about the SSO connection. -
0 error response -
+
+ @@ -2692,7 +2703,8 @@ public SSODomainConfig updateSSODomain(String organization, String uuid, SSODoma * @return ApiResponse<SSODomainConfig> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 The updated details about the SSO connection. -
0 error response -
+
+ @@ -2714,7 +2726,8 @@ public ApiResponse updateSSODomainWithHttpInfo(String organizat * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 The updated details about the SSO connection. -
0 error response -
+
+ @@ -2736,7 +2749,8 @@ public okhttp3.Call updateSSODomainAsync(String organization, String uuid, SSODo * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 The updated details about the SSO connection. -
0 error response -
+
+ @@ -2761,8 +2775,8 @@ public okhttp3.Call updateUserInOrganizationCall(String organization, String use // create path and map variables String localVarPath = "/organizations/{organization}/{username}" - .replaceAll("\\{" + "organization" + "\\}", localVarApiClient.escapeString(organization.toString())) - .replaceAll("\\{" + "username" + "\\}", localVarApiClient.escapeString(username.toString())); + .replace("{" + "organization" + "}", localVarApiClient.escapeString(organization.toString())) + .replace("{" + "username" + "}", localVarApiClient.escapeString(username.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2786,31 +2800,28 @@ public okhttp3.Call updateUserInOrganizationCall(String organization, String use localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateUserInOrganizationValidateBeforeCall(String organization, String username, OrganizationUser user, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'organization' is set if (organization == null) { throw new ApiException("Missing the required parameter 'organization' when calling updateUserInOrganization(Async)"); } - + // verify the required parameter 'username' is set if (username == null) { throw new ApiException("Missing the required parameter 'username' when calling updateUserInOrganization(Async)"); } - + // verify the required parameter 'user' is set if (user == null) { throw new ApiException("Missing the required parameter 'user' when calling updateUserInOrganization(Async)"); } - - okhttp3.Call localVarCall = updateUserInOrganizationCall(organization, username, user, _callback); - return localVarCall; + return updateUserInOrganizationCall(organization, username, user, _callback); } @@ -2822,7 +2833,8 @@ private okhttp3.Call updateUserInOrganizationValidateBeforeCall(String organizat * @param user user details to update (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 user update in organization successfully -
502 Bad Gateway -
+
+ @@ -2842,7 +2854,8 @@ public void updateUserInOrganization(String organization, String username, Organ * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 user update in organization successfully -
502 Bad Gateway -
+
+ @@ -2864,7 +2877,8 @@ public ApiResponse updateUserInOrganizationWithHttpInfo(String organizatio * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 user update in organization successfully -
502 Bad Gateway -
+
+ diff --git a/src/main/java/io/tiledb/cloud/rest_api/api/QueryApi.java b/src/main/java/io/tiledb/cloud/rest_api/api/QueryApi.java index 7d1f6a5..e1e5c21 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/api/QueryApi.java +++ b/src/main/java/io/tiledb/cloud/rest_api/api/QueryApi.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,21 +11,26 @@ */ -package io.tiledb.cloud.rest_api.api; +package org.openapitools.client.api; -import io.tiledb.cloud.rest_api.ApiCallback; -import io.tiledb.cloud.rest_api.model.Query; -import io.tiledb.cloud.rest_api.model.QueryJson; -import io.tiledb.cloud.rest_api.ApiClient; -import io.tiledb.cloud.rest_api.ApiException; -import io.tiledb.cloud.rest_api.ApiResponse; -import io.tiledb.cloud.rest_api.Configuration; -import io.tiledb.cloud.rest_api.Pair; +import org.openapitools.client.ApiCallback; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.Pair; +import org.openapitools.client.ProgressRequestBody; +import org.openapitools.client.ProgressResponseBody; import com.google.gson.reflect.TypeToken; +import java.io.IOException; + +import org.openapitools.client.model.Error; import java.io.File; +import org.openapitools.client.model.Query; +import org.openapitools.client.model.QueryJson; import java.lang.reflect.Type; import java.util.ArrayList; @@ -83,7 +88,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 user update in organization successfully -
502 Bad Gateway -
+
+ @@ -109,8 +115,8 @@ public okhttp3.Call finalizeQueryCall(String namespace, String array, String typ // create path and map variables String localVarPath = "/arrays/{namespace}/{array}/query/finalize" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -126,16 +132,9 @@ public okhttp3.Call finalizeQueryCall(String namespace, String array, String typ localVarQueryParams.addAll(localVarApiClient.parameterToPair("open_at", openAt)); } - if (contentType != null) { - localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); - } - - if (xPayer != null) { - localVarHeaderParams.put("X-Payer", localVarApiClient.parameterToString(xPayer)); - } - final String[] localVarAccepts = { - "application/json", "application/capnp" + "application/json", + "application/capnp" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -143,48 +142,56 @@ public okhttp3.Call finalizeQueryCall(String namespace, String array, String typ } final String[] localVarContentTypes = { - "application/json", "application/capnp" + "application/json", + "application/capnp" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + + if (xPayer != null) { + localVarHeaderParams.put("X-Payer", localVarApiClient.parameterToString(xPayer)); + } + + + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call finalizeQueryValidateBeforeCall(String namespace, String array, String type, String contentType, Query query, String xPayer, Integer openAt, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling finalizeQuery(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling finalizeQuery(Async)"); } - + // verify the required parameter 'type' is set if (type == null) { throw new ApiException("Missing the required parameter 'type' when calling finalizeQuery(Async)"); } - + // verify the required parameter 'contentType' is set if (contentType == null) { throw new ApiException("Missing the required parameter 'contentType' when calling finalizeQuery(Async)"); } - + // verify the required parameter 'query' is set if (query == null) { throw new ApiException("Missing the required parameter 'query' when calling finalizeQuery(Async)"); } - - okhttp3.Call localVarCall = finalizeQueryCall(namespace, array, type, contentType, query, xPayer, openAt, _callback); - return localVarCall; + return finalizeQueryCall(namespace, array, type, contentType, query, xPayer, openAt, _callback); } @@ -201,7 +208,8 @@ private okhttp3.Call finalizeQueryValidateBeforeCall(String namespace, String ar * @return Query * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 query completed and results are returned in query object * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
204 query completed successfully with no return -
+
+ @@ -227,7 +235,8 @@ public Query finalizeQuery(String namespace, String array, String type, String c * @return ApiResponse<Query> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 query completed and results are returned in query object * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
204 query completed successfully with no return -
+
+ @@ -255,7 +264,8 @@ public ApiResponse finalizeQueryWithHttpInfo(String namespace, String arr * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 query completed and results are returned in query object * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
204 query completed successfully with no return -
+
+ @@ -283,7 +293,8 @@ public okhttp3.Call finalizeQueryAsync(String namespace, String array, String ty * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 query completed and results are returned in query object * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
204 query completed successfully with no return -
+
+ @@ -309,8 +320,8 @@ public okhttp3.Call getEstResultSizesCall(String namespace, String array, String // create path and map variables String localVarPath = "/arrays/{namespace}/{array}/query/est_result_sizes" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -326,16 +337,9 @@ public okhttp3.Call getEstResultSizesCall(String namespace, String array, String localVarQueryParams.addAll(localVarApiClient.parameterToPair("open_at", openAt)); } - if (contentType != null) { - localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); - } - - if (xPayer != null) { - localVarHeaderParams.put("X-Payer", localVarApiClient.parameterToString(xPayer)); - } - final String[] localVarAccepts = { - "application/json", "application/capnp" + "application/json", + "application/capnp" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -343,48 +347,56 @@ public okhttp3.Call getEstResultSizesCall(String namespace, String array, String } final String[] localVarContentTypes = { - "application/json", "application/capnp" + "application/json", + "application/capnp" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + + if (xPayer != null) { + localVarHeaderParams.put("X-Payer", localVarApiClient.parameterToString(xPayer)); + } + + + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getEstResultSizesValidateBeforeCall(String namespace, String array, String type, String contentType, Query query, String xPayer, Integer openAt, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling getEstResultSizes(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling getEstResultSizes(Async)"); } - + // verify the required parameter 'type' is set if (type == null) { throw new ApiException("Missing the required parameter 'type' when calling getEstResultSizes(Async)"); } - + // verify the required parameter 'contentType' is set if (contentType == null) { throw new ApiException("Missing the required parameter 'contentType' when calling getEstResultSizes(Async)"); } - + // verify the required parameter 'query' is set if (query == null) { throw new ApiException("Missing the required parameter 'query' when calling getEstResultSizes(Async)"); } - - okhttp3.Call localVarCall = getEstResultSizesCall(namespace, array, type, contentType, query, xPayer, openAt, _callback); - return localVarCall; + return getEstResultSizesCall(namespace, array, type, contentType, query, xPayer, openAt, _callback); } @@ -401,7 +413,8 @@ private okhttp3.Call getEstResultSizesValidateBeforeCall(String namespace, Strin * @return Query * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 query est result size computed and results are returned in query object * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
204 query completed successfully with no return -
+
+ @@ -427,7 +440,8 @@ public Query getEstResultSizes(String namespace, String array, String type, Stri * @return ApiResponse<Query> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 query est result size computed and results are returned in query object * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
204 query completed successfully with no return -
+
+ @@ -455,7 +469,8 @@ public ApiResponse getEstResultSizesWithHttpInfo(String namespace, String * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 query est result size computed and results are returned in query object * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
204 query completed successfully with no return -
+
+ @@ -480,7 +495,8 @@ public okhttp3.Call getEstResultSizesAsync(String namespace, String array, Strin * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 query est result size computed and results are returned in query object * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
204 query completed successfully with no return -
+
+ @@ -505,8 +521,8 @@ public okhttp3.Call getFileCall(String namespace, String array, String contentTy // create path and map variables String localVarPath = "/arrays/{namespace}/{array}/query/get_file" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -514,14 +530,6 @@ public okhttp3.Call getFileCall(String namespace, String array, String contentTy Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (contentType != null) { - localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); - } - - if (xPayer != null) { - localVarHeaderParams.put("X-Payer", localVarApiClient.parameterToString(xPayer)); - } - final String[] localVarAccepts = { "application/x-ipynb+json" }; @@ -531,38 +539,44 @@ public okhttp3.Call getFileCall(String namespace, String array, String contentTy } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + + if (xPayer != null) { + localVarHeaderParams.put("X-Payer", localVarApiClient.parameterToString(xPayer)); + } + + + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getFileValidateBeforeCall(String namespace, String array, String contentType, String xPayer, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling getFile(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling getFile(Async)"); } - + // verify the required parameter 'contentType' is set if (contentType == null) { throw new ApiException("Missing the required parameter 'contentType' when calling getFile(Async)"); } - - okhttp3.Call localVarCall = getFileCall(namespace, array, contentType, xPayer, _callback); - return localVarCall; + return getFileCall(namespace, array, contentType, xPayer, _callback); } @@ -576,7 +590,8 @@ private okhttp3.Call getFileValidateBeforeCall(String namespace, String array, S * @return File * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 query completed and result bytes are returned * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
502 Bad Gateway -
+
+ @@ -598,7 +613,8 @@ public File getFile(String namespace, String array, String contentType, String x * @return ApiResponse<File> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 query completed and result bytes are returned * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
502 Bad Gateway -
+
+ @@ -622,7 +638,8 @@ public ApiResponse getFileWithHttpInfo(String namespace, String array, Str * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 query completed and result bytes are returned * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
502 Bad Gateway -
+
+ @@ -649,7 +666,8 @@ public okhttp3.Call getFileAsync(String namespace, String array, String contentT * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 query completed and result bytes are returned * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
502 Bad Gateway -
+
+ @@ -675,8 +693,8 @@ public okhttp3.Call submitQueryCall(String namespace, String array, String type, // create path and map variables String localVarPath = "/arrays/{namespace}/{array}/query/submit" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -692,16 +710,9 @@ public okhttp3.Call submitQueryCall(String namespace, String array, String type, localVarQueryParams.addAll(localVarApiClient.parameterToPair("open_at", openAt)); } - if (contentType != null) { - localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); - } - - if (xPayer != null) { - localVarHeaderParams.put("X-Payer", localVarApiClient.parameterToString(xPayer)); - } - final String[] localVarAccepts = { - "application/json", "application/capnp" + "application/json", + "application/capnp" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -709,48 +720,56 @@ public okhttp3.Call submitQueryCall(String namespace, String array, String type, } final String[] localVarContentTypes = { - "application/json", "application/capnp" + "application/json", + "application/capnp" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + + if (xPayer != null) { + localVarHeaderParams.put("X-Payer", localVarApiClient.parameterToString(xPayer)); + } + + + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call submitQueryValidateBeforeCall(String namespace, String array, String type, String contentType, Query query, String xPayer, Integer openAt, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling submitQuery(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling submitQuery(Async)"); } - + // verify the required parameter 'type' is set if (type == null) { throw new ApiException("Missing the required parameter 'type' when calling submitQuery(Async)"); } - + // verify the required parameter 'contentType' is set if (contentType == null) { throw new ApiException("Missing the required parameter 'contentType' when calling submitQuery(Async)"); } - + // verify the required parameter 'query' is set if (query == null) { throw new ApiException("Missing the required parameter 'query' when calling submitQuery(Async)"); } - - okhttp3.Call localVarCall = submitQueryCall(namespace, array, type, contentType, query, xPayer, openAt, _callback); - return localVarCall; + return submitQueryCall(namespace, array, type, contentType, query, xPayer, openAt, _callback); } @@ -767,7 +786,8 @@ private okhttp3.Call submitQueryValidateBeforeCall(String namespace, String arra * @return Query * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 query completed and results are returned in query object * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
204 query completed successfully with no return -
+
+ @@ -793,7 +813,8 @@ public Query submitQuery(String namespace, String array, String type, String con * @return ApiResponse<Query> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 query completed and results are returned in query object * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
204 query completed successfully with no return -
+
+ @@ -821,7 +842,8 @@ public ApiResponse submitQueryWithHttpInfo(String namespace, String array * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 query completed and results are returned in query object * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
204 query completed successfully with no return -
+
+ @@ -847,7 +869,8 @@ public okhttp3.Call submitQueryAsync(String namespace, String array, String type * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 query completed and results are returned in query object * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
204 query completed successfully with no return -
+
+ @@ -872,8 +895,8 @@ public okhttp3.Call submitQueryJsonCall(String namespace, String array, String c // create path and map variables String localVarPath = "/arrays/{namespace}/{array}/query/submit_query_json" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -881,14 +904,6 @@ public okhttp3.Call submitQueryJsonCall(String namespace, String array, String c Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (contentType != null) { - localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); - } - - if (xPayer != null) { - localVarHeaderParams.put("X-Payer", localVarApiClient.parameterToString(xPayer)); - } - final String[] localVarAccepts = { "application/json" }; @@ -905,36 +920,43 @@ public okhttp3.Call submitQueryJsonCall(String namespace, String array, String c localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + + if (xPayer != null) { + localVarHeaderParams.put("X-Payer", localVarApiClient.parameterToString(xPayer)); + } + + + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call submitQueryJsonValidateBeforeCall(String namespace, String array, String contentType, QueryJson queryJson, String xPayer, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling submitQueryJson(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling submitQueryJson(Async)"); } - + // verify the required parameter 'contentType' is set if (contentType == null) { throw new ApiException("Missing the required parameter 'contentType' when calling submitQueryJson(Async)"); } - + // verify the required parameter 'queryJson' is set if (queryJson == null) { throw new ApiException("Missing the required parameter 'queryJson' when calling submitQueryJson(Async)"); } - - okhttp3.Call localVarCall = submitQueryJsonCall(namespace, array, contentType, queryJson, xPayer, _callback); - return localVarCall; + return submitQueryJsonCall(namespace, array, contentType, queryJson, xPayer, _callback); } @@ -949,7 +971,8 @@ private okhttp3.Call submitQueryJsonValidateBeforeCall(String namespace, String * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 query completed and results are returned in JSON format * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
502 Bad Gateway -
+
+ @@ -972,7 +995,8 @@ public Object submitQueryJson(String namespace, String array, String contentType * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 query completed and results are returned in JSON format * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
502 Bad Gateway -
+
+ @@ -997,7 +1021,8 @@ public ApiResponse submitQueryJsonWithHttpInfo(String namespace, String * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 query completed and results are returned in JSON format * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
502 Bad Gateway -
+
+ diff --git a/src/main/java/io/tiledb/cloud/rest_api/api/RegisteredTaskGraphsApi.java b/src/main/java/io/tiledb/cloud/rest_api/api/RegisteredTaskGraphsApi.java index 4d96ef6..28e0b12 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/api/RegisteredTaskGraphsApi.java +++ b/src/main/java/io/tiledb/cloud/rest_api/api/RegisteredTaskGraphsApi.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,19 +11,25 @@ */ -package io.tiledb.cloud.rest_api.api; +package org.openapitools.client.api; -import io.tiledb.cloud.rest_api.ApiCallback; -import io.tiledb.cloud.rest_api.model.RegisteredTaskGraph; -import io.tiledb.cloud.rest_api.model.TaskGraphSharing; -import io.tiledb.cloud.rest_api.ApiClient; -import io.tiledb.cloud.rest_api.ApiException; -import io.tiledb.cloud.rest_api.ApiResponse; -import io.tiledb.cloud.rest_api.Configuration; -import io.tiledb.cloud.rest_api.Pair; +import org.openapitools.client.ApiCallback; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.Pair; +import org.openapitools.client.ProgressRequestBody; +import org.openapitools.client.ProgressResponseBody; import com.google.gson.reflect.TypeToken; +import java.io.IOException; + + +import org.openapitools.client.model.Error; +import org.openapitools.client.model.RegisteredTaskGraph; +import org.openapitools.client.model.TaskGraphSharing; import java.lang.reflect.Type; import java.util.ArrayList; @@ -76,7 +82,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 query completed and results are returned in JSON format * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
502 Bad Gateway -
+
+ @@ -101,8 +108,8 @@ public okhttp3.Call deleteRegisteredTaskGraphCall(String namespace, String name, // create path and map variables String localVarPath = "/taskgraphs/{namespace}/registered/{name}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -119,33 +126,29 @@ public okhttp3.Call deleteRegisteredTaskGraphCall(String namespace, String name, } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteRegisteredTaskGraphValidateBeforeCall(String namespace, String name, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling deleteRegisteredTaskGraph(Async)"); } - + // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling deleteRegisteredTaskGraph(Async)"); } - - okhttp3.Call localVarCall = deleteRegisteredTaskGraphCall(namespace, name, _callback); - return localVarCall; + return deleteRegisteredTaskGraphCall(namespace, name, _callback); } @@ -156,7 +159,8 @@ private okhttp3.Call deleteRegisteredTaskGraphValidateBeforeCall(String namespac * @param name The name of the registered task graph. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Task graph successfully deleted. -
502 Bad Gateway -
+
+ @@ -175,7 +179,8 @@ public void deleteRegisteredTaskGraph(String namespace, String name) throws ApiE * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Task graph successfully deleted. -
502 Bad Gateway -
+
+ @@ -196,7 +201,8 @@ public ApiResponse deleteRegisteredTaskGraphWithHttpInfo(String namespace, * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Task graph successfully deleted. -
502 Bad Gateway -
+
+ @@ -217,7 +223,8 @@ public okhttp3.Call deleteRegisteredTaskGraphAsync(String namespace, String name * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Task graph successfully deleted. -
502 Bad Gateway -
+
+ @@ -242,8 +249,8 @@ public okhttp3.Call getRegisteredTaskGraphCall(String namespace, String name, fi // create path and map variables String localVarPath = "/taskgraphs/{namespace}/registered/{name}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -260,33 +267,29 @@ public okhttp3.Call getRegisteredTaskGraphCall(String namespace, String name, fi } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getRegisteredTaskGraphValidateBeforeCall(String namespace, String name, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling getRegisteredTaskGraph(Async)"); } - + // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling getRegisteredTaskGraph(Async)"); } - - okhttp3.Call localVarCall = getRegisteredTaskGraphCall(namespace, name, _callback); - return localVarCall; + return getRegisteredTaskGraphCall(namespace, name, _callback); } @@ -298,7 +301,8 @@ private okhttp3.Call getRegisteredTaskGraphValidateBeforeCall(String namespace, * @return RegisteredTaskGraph * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 The contents of the registered task graph. -
502 Bad Gateway -
+
+ @@ -318,7 +322,8 @@ public RegisteredTaskGraph getRegisteredTaskGraph(String namespace, String name) * @return ApiResponse<RegisteredTaskGraph> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 The contents of the registered task graph. -
502 Bad Gateway -
+
+ @@ -340,7 +345,8 @@ public ApiResponse getRegisteredTaskGraphWithHttpInfo(Strin * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 The contents of the registered task graph. -
502 Bad Gateway -
+
+ @@ -362,7 +368,8 @@ public okhttp3.Call getRegisteredTaskGraphAsync(String namespace, String name, f * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 The contents of the registered task graph. -
502 Bad Gateway -
+
+ @@ -388,8 +395,8 @@ public okhttp3.Call getRegisteredTaskGraphSharingPoliciesCall(String namespace, // create path and map variables String localVarPath = "/taskgraphs/{namespace}/registered/{name}/share" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -406,33 +413,29 @@ public okhttp3.Call getRegisteredTaskGraphSharingPoliciesCall(String namespace, } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getRegisteredTaskGraphSharingPoliciesValidateBeforeCall(String namespace, String name, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling getRegisteredTaskGraphSharingPolicies(Async)"); } - + // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling getRegisteredTaskGraphSharingPolicies(Async)"); } - - okhttp3.Call localVarCall = getRegisteredTaskGraphSharingPoliciesCall(namespace, name, _callback); - return localVarCall; + return getRegisteredTaskGraphSharingPoliciesCall(namespace, name, _callback); } @@ -444,7 +447,8 @@ private okhttp3.Call getRegisteredTaskGraphSharingPoliciesValidateBeforeCall(Str * @return List<TaskGraphSharing> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of all specific sharing policies -
404 The task graph does not exist (or the user does not have permission to view policies) -
+
+ @@ -465,7 +469,8 @@ public List getRegisteredTaskGraphSharingPolicies(String names * @return ApiResponse<List<TaskGraphSharing>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of all specific sharing policies -
404 The task graph does not exist (or the user does not have permission to view policies) -
+
+ @@ -488,7 +493,8 @@ public ApiResponse> getRegisteredTaskGraphSharingPolicies * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of all specific sharing policies -
404 The task graph does not exist (or the user does not have permission to view policies) -
+
+ @@ -512,7 +518,8 @@ public okhttp3.Call getRegisteredTaskGraphSharingPoliciesAsync(String namespace, * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of all specific sharing policies -
404 The task graph does not exist (or the user does not have permission to view policies) -
+
+ @@ -537,8 +544,8 @@ public okhttp3.Call registerRegisteredTaskGraphCall(String namespace, String nam // create path and map variables String localVarPath = "/taskgraphs/{namespace}/registered/{name}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -562,26 +569,23 @@ public okhttp3.Call registerRegisteredTaskGraphCall(String namespace, String nam localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call registerRegisteredTaskGraphValidateBeforeCall(String namespace, String name, RegisteredTaskGraph graph, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling registerRegisteredTaskGraph(Async)"); } - + // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling registerRegisteredTaskGraph(Async)"); } - - okhttp3.Call localVarCall = registerRegisteredTaskGraphCall(namespace, name, graph, _callback); - return localVarCall; + return registerRegisteredTaskGraphCall(namespace, name, graph, _callback); } @@ -593,7 +597,8 @@ private okhttp3.Call registerRegisteredTaskGraphValidateBeforeCall(String namesp * @param graph Task graph to register. (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Task graph registered successfully. -
502 Bad Gateway -
+
+ @@ -613,7 +618,8 @@ public void registerRegisteredTaskGraph(String namespace, String name, Registere * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Task graph registered successfully. -
502 Bad Gateway -
+
+ @@ -635,7 +641,8 @@ public ApiResponse registerRegisteredTaskGraphWithHttpInfo(String namespac * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Task graph registered successfully. -
502 Bad Gateway -
+
+ @@ -657,7 +664,8 @@ public okhttp3.Call registerRegisteredTaskGraphAsync(String namespace, String na * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Task graph registered successfully. -
502 Bad Gateway -
+
+ @@ -683,8 +691,8 @@ public okhttp3.Call shareRegisteredTaskGraphCall(String namespace, String name, // create path and map variables String localVarPath = "/taskgraphs/{namespace}/registered/{name}/share" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -708,31 +716,28 @@ public okhttp3.Call shareRegisteredTaskGraphCall(String namespace, String name, localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call shareRegisteredTaskGraphValidateBeforeCall(String namespace, String name, TaskGraphSharing taskGraphSharing, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling shareRegisteredTaskGraph(Async)"); } - + // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling shareRegisteredTaskGraph(Async)"); } - + // verify the required parameter 'taskGraphSharing' is set if (taskGraphSharing == null) { throw new ApiException("Missing the required parameter 'taskGraphSharing' when calling shareRegisteredTaskGraph(Async)"); } - - okhttp3.Call localVarCall = shareRegisteredTaskGraphCall(namespace, name, taskGraphSharing, _callback); - return localVarCall; + return shareRegisteredTaskGraphCall(namespace, name, taskGraphSharing, _callback); } @@ -744,7 +749,8 @@ private okhttp3.Call shareRegisteredTaskGraphValidateBeforeCall(String namespace * @param taskGraphSharing Namespace and list of permissions to share with. An empty list of permissions will remove the namespace; if permissions already exist they will be deleted then new ones added. In the event of a failure, the new policies will be rolled back to prevent partial policies, and it's likely the UDF will not be shared with the namespace at all. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 UDF shared successfully -
404 UDF does not exist or user does not have permissions to share UDF -
+
+ @@ -765,7 +771,8 @@ public void shareRegisteredTaskGraph(String namespace, String name, TaskGraphSha * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 UDF shared successfully -
404 UDF does not exist or user does not have permissions to share UDF -
+
+ @@ -788,7 +795,8 @@ public ApiResponse shareRegisteredTaskGraphWithHttpInfo(String namespace, * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 UDF shared successfully -
404 UDF does not exist or user does not have permissions to share UDF -
+
+ @@ -811,7 +819,8 @@ public okhttp3.Call shareRegisteredTaskGraphAsync(String namespace, String name, * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 UDF shared successfully -
404 UDF does not exist or user does not have permissions to share UDF -
+
+ @@ -836,8 +845,8 @@ public okhttp3.Call updateRegisteredTaskGraphCall(String namespace, String name, // create path and map variables String localVarPath = "/taskgraphs/{namespace}/registered/{name}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -861,26 +870,23 @@ public okhttp3.Call updateRegisteredTaskGraphCall(String namespace, String name, localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateRegisteredTaskGraphValidateBeforeCall(String namespace, String name, RegisteredTaskGraph graph, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling updateRegisteredTaskGraph(Async)"); } - + // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling updateRegisteredTaskGraph(Async)"); } - - okhttp3.Call localVarCall = updateRegisteredTaskGraphCall(namespace, name, graph, _callback); - return localVarCall; + return updateRegisteredTaskGraphCall(namespace, name, graph, _callback); } @@ -892,7 +898,8 @@ private okhttp3.Call updateRegisteredTaskGraphValidateBeforeCall(String namespac * @param graph The new contents of the task graph. (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Task graph updated successfully. -
502 Bad Gateway -
+
+ @@ -912,7 +919,8 @@ public void updateRegisteredTaskGraph(String namespace, String name, RegisteredT * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Task graph updated successfully. -
502 Bad Gateway -
+
+ @@ -934,7 +942,8 @@ public ApiResponse updateRegisteredTaskGraphWithHttpInfo(String namespace, * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Task graph updated successfully. -
502 Bad Gateway -
+
+ diff --git a/src/main/java/io/tiledb/cloud/rest_api/api/SqlApi.java b/src/main/java/io/tiledb/cloud/rest_api/api/SqlApi.java index ca9273d..dbd7099 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/api/SqlApi.java +++ b/src/main/java/io/tiledb/cloud/rest_api/api/SqlApi.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,18 +11,24 @@ */ -package io.tiledb.cloud.rest_api.api; +package org.openapitools.client.api; -import io.tiledb.cloud.rest_api.model.SQLParameters; -import io.tiledb.cloud.rest_api.Configuration; -import io.tiledb.cloud.rest_api.ApiCallback; -import io.tiledb.cloud.rest_api.ApiClient; -import io.tiledb.cloud.rest_api.ApiException; -import io.tiledb.cloud.rest_api.ApiResponse; -import io.tiledb.cloud.rest_api.Pair; +import org.openapitools.client.ApiCallback; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.Pair; +import org.openapitools.client.ProgressRequestBody; +import org.openapitools.client.ProgressResponseBody; import com.google.gson.reflect.TypeToken; +import java.io.IOException; + + +import org.openapitools.client.model.Error; +import org.openapitools.client.model.SQLParameters; import java.lang.reflect.Type; import java.util.ArrayList; @@ -76,7 +82,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Task graph updated successfully. -
502 Bad Gateway -
+
+ @@ -102,7 +109,7 @@ public okhttp3.Call runSQLCall(String namespace, SQLParameters sql, String accep // create path and map variables String localVarPath = "/sql/{namespace}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -110,10 +117,6 @@ public okhttp3.Call runSQLCall(String namespace, SQLParameters sql, String accep Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (acceptEncoding != null) { - localVarHeaderParams.put("Accept-Encoding", localVarApiClient.parameterToString(acceptEncoding)); - } - final String[] localVarAccepts = { "application/json" }; @@ -130,70 +133,29 @@ public okhttp3.Call runSQLCall(String namespace, SQLParameters sql, String accep localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + if (acceptEncoding != null) { + localVarHeaderParams.put("Accept-Encoding", localVarApiClient.parameterToString(acceptEncoding)); + } + + + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call runSQLValidateBeforeCall(String namespace, SQLParameters sql, String acceptEncoding, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling runSQL(Async)"); } - + // verify the required parameter 'sql' is set if (sql == null) { throw new ApiException("Missing the required parameter 'sql' when calling runSQL(Async)"); } - - - okhttp3.Call localVarCall = runSQLCall(namespace, sql, acceptEncoding, _callback); - return localVarCall; - } - - /** - * - * Run a sql query - * @param namespace namespace to run task under is in (an organization name or user's username) (required) - * @param sql sql being submitted (required) - * @param acceptEncoding Encoding to use (optional) - * @return ApiResponse with byte[] - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details -
Response Details
Status Code Description Response Headers
200 JSON results in array of objects form, if the query returns results * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
204 SQL executed successfully * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
- - - - -
Status Code Description Response Headers
200 JSON results in array of objects form, if the query returns results * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
204 SQL executed successfully * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
0 error response -
- */ - public ApiResponse runSQLWithHttpInfoBytes(String namespace, SQLParameters sql, String acceptEncoding) throws ApiException { - okhttp3.Call localVarCall = runSQLValidateBeforeCall(namespace, sql, acceptEncoding, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } + return runSQLCall(namespace, sql, acceptEncoding, _callback); - /** - * - * Run a sql query - * @param namespace namespace to run task under is in (an organization name or user's username) (required) - * @param sql sql being submitted (required) - * @param acceptEncoding Encoding to use (optional) - * @return byte[] - * @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 JSON results in array of objects form, if the query returns results * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
204 SQL executed successfully * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
0 error response -
- */ - public byte[] runSQLBytes(String namespace, SQLParameters sql, String acceptEncoding) throws ApiException { - ApiResponse localVarResp = runSQLWithHttpInfoBytes(namespace, sql, acceptEncoding); - return localVarResp.getData(); } /** @@ -202,10 +164,11 @@ public byte[] runSQLBytes(String namespace, SQLParameters sql, String acceptEnco * @param namespace namespace to run task under is in (an organization name or user's username) (required) * @param sql sql being submitted (required) * @param acceptEncoding Encoding to use (optional) - * @return List<Object> + * @return List<Map<String, Object>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -213,8 +176,8 @@ public byte[] runSQLBytes(String namespace, SQLParameters sql, String acceptEnco
Response Details
Status Code Description Response Headers
200 JSON results in array of objects form, if the query returns results * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
204 SQL executed successfully * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
0 error response -
*/ - public List runSQL(String namespace, SQLParameters sql, String acceptEncoding) throws ApiException { - ApiResponse> localVarResp = runSQLWithHttpInfo(namespace, sql, acceptEncoding); + public List> runSQL(String namespace, SQLParameters sql, String acceptEncoding) throws ApiException { + ApiResponse>> localVarResp = runSQLWithHttpInfo(namespace, sql, acceptEncoding); return localVarResp.getData(); } @@ -224,10 +187,11 @@ public List runSQL(String namespace, SQLParameters sql, String acceptEnc * @param namespace namespace to run task under is in (an organization name or user's username) (required) * @param sql sql being submitted (required) * @param acceptEncoding Encoding to use (optional) - * @return ApiResponse<List<Object>> + * @return ApiResponse<List<Map<String, Object>>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -235,9 +199,9 @@ public List runSQL(String namespace, SQLParameters sql, String acceptEnc
Response Details
Status Code Description Response Headers
200 JSON results in array of objects form, if the query returns results * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
204 SQL executed successfully * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
0 error response -
*/ - public ApiResponse> runSQLWithHttpInfo(String namespace, SQLParameters sql, String acceptEncoding) throws ApiException { + public ApiResponse>> runSQLWithHttpInfo(String namespace, SQLParameters sql, String acceptEncoding) throws ApiException { okhttp3.Call localVarCall = runSQLValidateBeforeCall(namespace, sql, acceptEncoding, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + Type localVarReturnType = new TypeToken>>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -251,7 +215,8 @@ public ApiResponse> runSQLWithHttpInfo(String namespace, SQLParamet * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ @@ -259,10 +224,10 @@ public ApiResponse> runSQLWithHttpInfo(String namespace, SQLParamet
Response Details
Status Code Description Response Headers
200 JSON results in array of objects form, if the query returns results * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
204 SQL executed successfully * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
0 error response -
*/ - public okhttp3.Call runSQLAsync(String namespace, SQLParameters sql, String acceptEncoding, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call runSQLAsync(String namespace, SQLParameters sql, String acceptEncoding, final ApiCallback>> _callback) throws ApiException { okhttp3.Call localVarCall = runSQLValidateBeforeCall(namespace, sql, acceptEncoding, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); + Type localVarReturnType = new TypeToken>>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/src/main/java/io/tiledb/cloud/rest_api/api/StatsApi.java b/src/main/java/io/tiledb/cloud/rest_api/api/StatsApi.java index c36a896..dffcaf0 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/api/StatsApi.java +++ b/src/main/java/io/tiledb/cloud/rest_api/api/StatsApi.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,18 +11,24 @@ */ -package io.tiledb.cloud.rest_api.api; +package org.openapitools.client.api; -import io.tiledb.cloud.rest_api.ApiCallback; -import io.tiledb.cloud.rest_api.model.GetTiledbStats200Response; -import io.tiledb.cloud.rest_api.ApiClient; -import io.tiledb.cloud.rest_api.ApiException; -import io.tiledb.cloud.rest_api.ApiResponse; -import io.tiledb.cloud.rest_api.Configuration; -import io.tiledb.cloud.rest_api.Pair; +import org.openapitools.client.ApiCallback; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.Pair; +import org.openapitools.client.ProgressRequestBody; +import org.openapitools.client.ProgressResponseBody; import com.google.gson.reflect.TypeToken; +import java.io.IOException; + + +import org.openapitools.client.model.Error; +import org.openapitools.client.model.GetTiledbStats200Response; import java.lang.reflect.Type; import java.util.ArrayList; @@ -73,7 +79,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -114,23 +121,19 @@ public okhttp3.Call getTiledbStatsCall(final ApiCallback _callback) throws ApiEx } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getTiledbStatsValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = getTiledbStatsCall(_callback); - return localVarCall; + return getTiledbStatsCall(_callback); } @@ -140,7 +143,8 @@ private okhttp3.Call getTiledbStatsValidateBeforeCall(final ApiCallback _callbac * @return GetTiledbStats200Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 stats -
502 Bad Gateway -
+
+ @@ -158,7 +162,8 @@ public GetTiledbStats200Response getTiledbStats() throws ApiException { * @return ApiResponse<GetTiledbStats200Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 stats -
502 Bad Gateway -
+
+ @@ -178,7 +183,8 @@ public ApiResponse getTiledbStatsWithHttpInfo() throw * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 stats -
502 Bad Gateway -
+
+ diff --git a/src/main/java/io/tiledb/cloud/rest_api/api/TaskGraphLogsApi.java b/src/main/java/io/tiledb/cloud/rest_api/api/TaskGraphLogsApi.java index 5585602..3ac7790 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/api/TaskGraphLogsApi.java +++ b/src/main/java/io/tiledb/cloud/rest_api/api/TaskGraphLogsApi.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,22 +11,27 @@ */ -package io.tiledb.cloud.rest_api.api; +package org.openapitools.client.api; -import io.tiledb.cloud.rest_api.ApiCallback; -import io.tiledb.cloud.rest_api.model.TaskGraphLog; -import io.tiledb.cloud.rest_api.model.TaskGraphClientNodeStatus; -import io.tiledb.cloud.rest_api.model.TaskGraphLogsData; -import io.tiledb.cloud.rest_api.ApiClient; -import io.tiledb.cloud.rest_api.ApiException; -import io.tiledb.cloud.rest_api.ApiResponse; -import io.tiledb.cloud.rest_api.Configuration; -import io.tiledb.cloud.rest_api.Pair; +import org.openapitools.client.ApiCallback; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.Pair; +import org.openapitools.client.ProgressRequestBody; +import org.openapitools.client.ProgressResponseBody; import com.google.gson.reflect.TypeToken; +import java.io.IOException; + +import org.openapitools.client.model.Error; import java.time.OffsetDateTime; +import org.openapitools.client.model.TaskGraphClientNodeStatus; +import org.openapitools.client.model.TaskGraphLog; +import org.openapitools.client.model.TaskGraphLogsData; import java.lang.reflect.Type; import java.util.ArrayList; @@ -79,7 +84,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 stats -
502 Bad Gateway -
+
+ @@ -104,7 +110,7 @@ public okhttp3.Call createTaskGraphLogCall(String namespace, TaskGraphLog log, f // create path and map variables String localVarPath = "/taskgraphs/{namespace}/log" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -128,26 +134,23 @@ public okhttp3.Call createTaskGraphLogCall(String namespace, TaskGraphLog log, f localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createTaskGraphLogValidateBeforeCall(String namespace, TaskGraphLog log, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling createTaskGraphLog(Async)"); } - + // verify the required parameter 'log' is set if (log == null) { throw new ApiException("Missing the required parameter 'log' when calling createTaskGraphLog(Async)"); } - - okhttp3.Call localVarCall = createTaskGraphLogCall(namespace, log, _callback); - return localVarCall; + return createTaskGraphLogCall(namespace, log, _callback); } @@ -159,7 +162,8 @@ private okhttp3.Call createTaskGraphLogValidateBeforeCall(String namespace, Task * @return TaskGraphLog * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
201 The task graph was created. The returned TaskGraphLog will include the data the client sent, with the server-defined fields added in. -
502 Bad Gateway -
+
+ @@ -179,7 +183,8 @@ public TaskGraphLog createTaskGraphLog(String namespace, TaskGraphLog log) throw * @return ApiResponse<TaskGraphLog> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
201 The task graph was created. The returned TaskGraphLog will include the data the client sent, with the server-defined fields added in. -
502 Bad Gateway -
+
+ @@ -201,7 +206,8 @@ public ApiResponse createTaskGraphLogWithHttpInfo(String namespace * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
201 The task graph was created. The returned TaskGraphLog will include the data the client sent, with the server-defined fields added in. -
502 Bad Gateway -
+
+ @@ -223,7 +229,8 @@ public okhttp3.Call createTaskGraphLogAsync(String namespace, TaskGraphLog log, * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
201 The task graph was created. The returned TaskGraphLog will include the data the client sent, with the server-defined fields added in. -
502 Bad Gateway -
+
+ @@ -248,8 +255,8 @@ public okhttp3.Call getTaskGraphLogCall(String namespace, String id, final ApiCa // create path and map variables String localVarPath = "/taskgraphs/{namespace}/logs/{id}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -266,33 +273,29 @@ public okhttp3.Call getTaskGraphLogCall(String namespace, String id, final ApiCa } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getTaskGraphLogValidateBeforeCall(String namespace, String id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling getTaskGraphLog(Async)"); } - + // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling getTaskGraphLog(Async)"); } - - okhttp3.Call localVarCall = getTaskGraphLogCall(namespace, id, _callback); - return localVarCall; + return getTaskGraphLogCall(namespace, id, _callback); } @@ -304,7 +307,8 @@ private okhttp3.Call getTaskGraphLogValidateBeforeCall(String namespace, String * @return TaskGraphLog * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Information about the execution of a single task graph. -
502 Bad Gateway -
+
+ @@ -324,7 +328,8 @@ public TaskGraphLog getTaskGraphLog(String namespace, String id) throws ApiExcep * @return ApiResponse<TaskGraphLog> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Information about the execution of a single task graph. -
502 Bad Gateway -
+
+ @@ -346,7 +351,8 @@ public ApiResponse getTaskGraphLogWithHttpInfo(String namespace, S * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Information about the execution of a single task graph. -
502 Bad Gateway -
+
+ @@ -364,6 +370,7 @@ public okhttp3.Call getTaskGraphLogAsync(String namespace, String id, final ApiC * Build call for listTaskGraphLogs * @param namespace Include logs for this namespace. (optional) * @param createdBy Include logs from only this user. (optional) + * @param status Filter to only return these statuses (optional) * @param search search string that will look at name. (optional) * @param startTime Include logs created after this time. (optional) * @param endTime Include logs created before this time. (optional) @@ -373,14 +380,15 @@ public okhttp3.Call getTaskGraphLogAsync(String namespace, String id, final ApiC * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Information about the execution of a single task graph. -
502 Bad Gateway -
+
+
Response Details
Status Code Description Response Headers
200 The task graph logs that matched the user's query. -
502 Bad Gateway -
0 error response -
*/ - public okhttp3.Call listTaskGraphLogsCall(String namespace, String createdBy, String search, OffsetDateTime startTime, OffsetDateTime endTime, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listTaskGraphLogsCall(String namespace, String createdBy, String status, String search, OffsetDateTime startTime, OffsetDateTime endTime, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -413,6 +421,10 @@ public okhttp3.Call listTaskGraphLogsCall(String namespace, String createdBy, St localVarQueryParams.addAll(localVarApiClient.parameterToPair("created_by", createdBy)); } + if (status != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("status", status)); + } + if (search != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("search", search)); } @@ -442,23 +454,19 @@ public okhttp3.Call listTaskGraphLogsCall(String namespace, String createdBy, St } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call listTaskGraphLogsValidateBeforeCall(String namespace, String createdBy, String search, OffsetDateTime startTime, OffsetDateTime endTime, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = listTaskGraphLogsCall(namespace, createdBy, search, startTime, endTime, page, perPage, _callback); - return localVarCall; + private okhttp3.Call listTaskGraphLogsValidateBeforeCall(String namespace, String createdBy, String status, String search, OffsetDateTime startTime, OffsetDateTime endTime, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { + return listTaskGraphLogsCall(namespace, createdBy, status, search, startTime, endTime, page, perPage, _callback); } @@ -467,6 +475,7 @@ private okhttp3.Call listTaskGraphLogsValidateBeforeCall(String namespace, Strin * Fetch the task graph logs of a namespace the user has access to. The returned entries will include only summary data, and will not include information about the individual tasks that were executed. (This information is available when requesting an individual task graph log.) Entries in the response are ordered from newest to oldest. Pagination parameters work as in other API methods; see PaginationMetadata. * @param namespace Include logs for this namespace. (optional) * @param createdBy Include logs from only this user. (optional) + * @param status Filter to only return these statuses (optional) * @param search search string that will look at name. (optional) * @param startTime Include logs created after this time. (optional) * @param endTime Include logs created before this time. (optional) @@ -475,15 +484,16 @@ private okhttp3.Call listTaskGraphLogsValidateBeforeCall(String namespace, Strin * @return TaskGraphLogsData * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 The task graph logs that matched the user's query. -
502 Bad Gateway -
0 error response -
*/ - public TaskGraphLogsData listTaskGraphLogs(String namespace, String createdBy, String search, OffsetDateTime startTime, OffsetDateTime endTime, Integer page, Integer perPage) throws ApiException { - ApiResponse localVarResp = listTaskGraphLogsWithHttpInfo(namespace, createdBy, search, startTime, endTime, page, perPage); + public TaskGraphLogsData listTaskGraphLogs(String namespace, String createdBy, String status, String search, OffsetDateTime startTime, OffsetDateTime endTime, Integer page, Integer perPage) throws ApiException { + ApiResponse localVarResp = listTaskGraphLogsWithHttpInfo(namespace, createdBy, status, search, startTime, endTime, page, perPage); return localVarResp.getData(); } @@ -492,6 +502,7 @@ public TaskGraphLogsData listTaskGraphLogs(String namespace, String createdBy, S * Fetch the task graph logs of a namespace the user has access to. The returned entries will include only summary data, and will not include information about the individual tasks that were executed. (This information is available when requesting an individual task graph log.) Entries in the response are ordered from newest to oldest. Pagination parameters work as in other API methods; see PaginationMetadata. * @param namespace Include logs for this namespace. (optional) * @param createdBy Include logs from only this user. (optional) + * @param status Filter to only return these statuses (optional) * @param search search string that will look at name. (optional) * @param startTime Include logs created after this time. (optional) * @param endTime Include logs created before this time. (optional) @@ -500,15 +511,16 @@ public TaskGraphLogsData listTaskGraphLogs(String namespace, String createdBy, S * @return ApiResponse<TaskGraphLogsData> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 The task graph logs that matched the user's query. -
502 Bad Gateway -
0 error response -
*/ - public ApiResponse listTaskGraphLogsWithHttpInfo(String namespace, String createdBy, String search, OffsetDateTime startTime, OffsetDateTime endTime, Integer page, Integer perPage) throws ApiException { - okhttp3.Call localVarCall = listTaskGraphLogsValidateBeforeCall(namespace, createdBy, search, startTime, endTime, page, perPage, null); + public ApiResponse listTaskGraphLogsWithHttpInfo(String namespace, String createdBy, String status, String search, OffsetDateTime startTime, OffsetDateTime endTime, Integer page, Integer perPage) throws ApiException { + okhttp3.Call localVarCall = listTaskGraphLogsValidateBeforeCall(namespace, createdBy, status, search, startTime, endTime, page, perPage, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -518,6 +530,7 @@ public ApiResponse listTaskGraphLogsWithHttpInfo(String names * Fetch the task graph logs of a namespace the user has access to. The returned entries will include only summary data, and will not include information about the individual tasks that were executed. (This information is available when requesting an individual task graph log.) Entries in the response are ordered from newest to oldest. Pagination parameters work as in other API methods; see PaginationMetadata. * @param namespace Include logs for this namespace. (optional) * @param createdBy Include logs from only this user. (optional) + * @param status Filter to only return these statuses (optional) * @param search search string that will look at name. (optional) * @param startTime Include logs created after this time. (optional) * @param endTime Include logs created before this time. (optional) @@ -527,16 +540,17 @@ public ApiResponse listTaskGraphLogsWithHttpInfo(String names * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 The task graph logs that matched the user's query. -
502 Bad Gateway -
0 error response -
*/ - public okhttp3.Call listTaskGraphLogsAsync(String namespace, String createdBy, String search, OffsetDateTime startTime, OffsetDateTime endTime, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listTaskGraphLogsAsync(String namespace, String createdBy, String status, String search, OffsetDateTime startTime, OffsetDateTime endTime, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = listTaskGraphLogsValidateBeforeCall(namespace, createdBy, search, startTime, endTime, page, perPage, _callback); + okhttp3.Call localVarCall = listTaskGraphLogsValidateBeforeCall(namespace, createdBy, status, search, startTime, endTime, page, perPage, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -550,7 +564,8 @@ public okhttp3.Call listTaskGraphLogsAsync(String namespace, String createdBy, S * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -575,8 +590,8 @@ public okhttp3.Call reportClientNodeCall(String namespace, String id, TaskGraphC // create path and map variables String localVarPath = "/taskgraphs/{namespace}/logs/{id}/report_client_node" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -600,31 +615,28 @@ public okhttp3.Call reportClientNodeCall(String namespace, String id, TaskGraphC localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call reportClientNodeValidateBeforeCall(String namespace, String id, TaskGraphClientNodeStatus report, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling reportClientNode(Async)"); } - + // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling reportClientNode(Async)"); } - + // verify the required parameter 'report' is set if (report == null) { throw new ApiException("Missing the required parameter 'report' when calling reportClientNode(Async)"); } - - okhttp3.Call localVarCall = reportClientNodeCall(namespace, id, report, _callback); - return localVarCall; + return reportClientNodeCall(namespace, id, report, _callback); } @@ -636,7 +648,8 @@ private okhttp3.Call reportClientNodeValidateBeforeCall(String namespace, String * @param report The node status to report. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Status reported successfully. -
502 Bad Gateway -
+
+ @@ -656,7 +669,8 @@ public void reportClientNode(String namespace, String id, TaskGraphClientNodeSta * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Status reported successfully. -
502 Bad Gateway -
+
+ @@ -678,7 +692,8 @@ public ApiResponse reportClientNodeWithHttpInfo(String namespace, String i * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Status reported successfully. -
502 Bad Gateway -
+
+ @@ -699,7 +714,8 @@ public okhttp3.Call reportClientNodeAsync(String namespace, String id, TaskGraph * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Status reported successfully. -
502 Bad Gateway -
+
+ @@ -724,8 +740,8 @@ public okhttp3.Call resubmitTaskGraphExecutionCall(String namespace, String id, // create path and map variables String localVarPath = "/taskgraphs/{namespace}/executions/{id}/resubmit" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -742,33 +758,29 @@ public okhttp3.Call resubmitTaskGraphExecutionCall(String namespace, String id, } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call resubmitTaskGraphExecutionValidateBeforeCall(String namespace, String id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling resubmitTaskGraphExecution(Async)"); } - + // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling resubmitTaskGraphExecution(Async)"); } - - okhttp3.Call localVarCall = resubmitTaskGraphExecutionCall(namespace, id, _callback); - return localVarCall; + return resubmitTaskGraphExecutionCall(namespace, id, _callback); } @@ -780,7 +792,8 @@ private okhttp3.Call resubmitTaskGraphExecutionValidateBeforeCall(String namespa * @return TaskGraphLog * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
202 Information about the task graph execution. -
502 Bad Gateway -
+
+ @@ -800,7 +813,8 @@ public TaskGraphLog resubmitTaskGraphExecution(String namespace, String id) thro * @return ApiResponse<TaskGraphLog> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
202 Information about the task graph execution. -
502 Bad Gateway -
+
+ @@ -822,7 +836,8 @@ public ApiResponse resubmitTaskGraphExecutionWithHttpInfo(String n * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
202 Information about the task graph execution. -
502 Bad Gateway -
+
+ @@ -844,7 +859,8 @@ public okhttp3.Call resubmitTaskGraphExecutionAsync(String namespace, String id, * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
202 Information about the task graph execution. -
502 Bad Gateway -
+
+ @@ -869,8 +885,8 @@ public okhttp3.Call retryTaskGraphExecutionCall(String namespace, String id, fin // create path and map variables String localVarPath = "/taskgraphs/{namespace}/executions/{id}/retry" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -887,33 +903,29 @@ public okhttp3.Call retryTaskGraphExecutionCall(String namespace, String id, fin } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call retryTaskGraphExecutionValidateBeforeCall(String namespace, String id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling retryTaskGraphExecution(Async)"); } - + // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling retryTaskGraphExecution(Async)"); } - - okhttp3.Call localVarCall = retryTaskGraphExecutionCall(namespace, id, _callback); - return localVarCall; + return retryTaskGraphExecutionCall(namespace, id, _callback); } @@ -925,7 +937,8 @@ private okhttp3.Call retryTaskGraphExecutionValidateBeforeCall(String namespace, * @return TaskGraphLog * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
202 Information about the task graph execution. -
502 Bad Gateway -
+
+ @@ -945,7 +958,8 @@ public TaskGraphLog retryTaskGraphExecution(String namespace, String id) throws * @return ApiResponse<TaskGraphLog> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
202 Information about the task graph execution. -
502 Bad Gateway -
+
+ @@ -967,7 +981,8 @@ public ApiResponse retryTaskGraphExecutionWithHttpInfo(String name * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
202 Information about the task graph execution. -
502 Bad Gateway -
+
+ @@ -989,9 +1004,10 @@ public okhttp3.Call retryTaskGraphExecutionAsync(String namespace, String id, fi * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
202 Information about the task graph execution. -
502 Bad Gateway -
+
+ - +
Response Details
Status Code Description Response Headers
202 Information about the task graph execution. -
204 Graph stopped successfully -
502 Bad Gateway -
0 error response -
@@ -1014,8 +1030,8 @@ public okhttp3.Call stopTaskGraphExecutionCall(String namespace, String id, fina // create path and map variables String localVarPath = "/taskgraphs/{namespace}/executions/{id}/stop" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1032,33 +1048,29 @@ public okhttp3.Call stopTaskGraphExecutionCall(String namespace, String id, fina } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call stopTaskGraphExecutionValidateBeforeCall(String namespace, String id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling stopTaskGraphExecution(Async)"); } - + // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling stopTaskGraphExecution(Async)"); } - - okhttp3.Call localVarCall = stopTaskGraphExecutionCall(namespace, id, _callback); - return localVarCall; + return stopTaskGraphExecutionCall(namespace, id, _callback); } @@ -1067,19 +1079,18 @@ private okhttp3.Call stopTaskGraphExecutionValidateBeforeCall(String namespace, * Stops a task graph execution in the given namespace using the associated associated execution id. * @param namespace The namespace that owns this task graph execution. (required) * @param id The UUID of the task graph execution (TaskGraphLog). (required) - * @return TaskGraphLog * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ - +
Response Details
Status Code Description Response Headers
202 Information about the task graph execution. -
204 Graph stopped successfully -
502 Bad Gateway -
0 error response -
*/ - public TaskGraphLog stopTaskGraphExecution(String namespace, String id) throws ApiException { - ApiResponse localVarResp = stopTaskGraphExecutionWithHttpInfo(namespace, id); - return localVarResp.getData(); + public void stopTaskGraphExecution(String namespace, String id) throws ApiException { + stopTaskGraphExecutionWithHttpInfo(namespace, id); } /** @@ -1087,20 +1098,20 @@ public TaskGraphLog stopTaskGraphExecution(String namespace, String id) throws A * Stops a task graph execution in the given namespace using the associated associated execution id. * @param namespace The namespace that owns this task graph execution. (required) * @param id The UUID of the task graph execution (TaskGraphLog). (required) - * @return ApiResponse<TaskGraphLog> + * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ - +
Response Details
Status Code Description Response Headers
202 Information about the task graph execution. -
204 Graph stopped successfully -
502 Bad Gateway -
0 error response -
*/ - public ApiResponse stopTaskGraphExecutionWithHttpInfo(String namespace, String id) throws ApiException { + public ApiResponse stopTaskGraphExecutionWithHttpInfo(String namespace, String id) throws ApiException { okhttp3.Call localVarCall = stopTaskGraphExecutionValidateBeforeCall(namespace, id, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); + return localVarApiClient.execute(localVarCall); } /** @@ -1112,18 +1123,18 @@ public ApiResponse stopTaskGraphExecutionWithHttpInfo(String names * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ - +
Response Details
Status Code Description Response Headers
202 Information about the task graph execution. -
204 Graph stopped successfully -
502 Bad Gateway -
0 error response -
*/ - public okhttp3.Call stopTaskGraphExecutionAsync(String namespace, String id, final ApiCallback _callback) throws ApiException { + public okhttp3.Call stopTaskGraphExecutionAsync(String namespace, String id, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = stopTaskGraphExecutionValidateBeforeCall(namespace, id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** @@ -1134,7 +1145,8 @@ public okhttp3.Call stopTaskGraphExecutionAsync(String namespace, String id, fin * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -1159,8 +1171,8 @@ public okhttp3.Call submitTaskGraphCall(String namespace, String id, final ApiCa // create path and map variables String localVarPath = "/taskgraphs/{namespace}/graphs/{id}/submit" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1177,33 +1189,29 @@ public okhttp3.Call submitTaskGraphCall(String namespace, String id, final ApiCa } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call submitTaskGraphValidateBeforeCall(String namespace, String id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling submitTaskGraph(Async)"); } - + // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling submitTaskGraph(Async)"); } - - okhttp3.Call localVarCall = submitTaskGraphCall(namespace, id, _callback); - return localVarCall; + return submitTaskGraphCall(namespace, id, _callback); } @@ -1215,7 +1223,8 @@ private okhttp3.Call submitTaskGraphValidateBeforeCall(String namespace, String * @return TaskGraphLog * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
202 Information about the execution of a single task graph. -
502 Bad Gateway -
+
+ @@ -1235,7 +1244,8 @@ public TaskGraphLog submitTaskGraph(String namespace, String id) throws ApiExcep * @return ApiResponse<TaskGraphLog> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
202 Information about the execution of a single task graph. -
502 Bad Gateway -
+
+ @@ -1257,7 +1267,8 @@ public ApiResponse submitTaskGraphWithHttpInfo(String namespace, S * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
202 Information about the execution of a single task graph. -
502 Bad Gateway -
+
+ @@ -1280,7 +1291,8 @@ public okhttp3.Call submitTaskGraphAsync(String namespace, String id, final ApiC * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
202 Information about the execution of a single task graph. -
502 Bad Gateway -
+
+ @@ -1305,8 +1317,8 @@ public okhttp3.Call updateTaskGraphLogCall(String namespace, String id, TaskGrap // create path and map variables String localVarPath = "/taskgraphs/{namespace}/logs/{id}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1330,31 +1342,28 @@ public okhttp3.Call updateTaskGraphLogCall(String namespace, String id, TaskGrap localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateTaskGraphLogValidateBeforeCall(String namespace, String id, TaskGraphLog log, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling updateTaskGraphLog(Async)"); } - + // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling updateTaskGraphLog(Async)"); } - + // verify the required parameter 'log' is set if (log == null) { throw new ApiException("Missing the required parameter 'log' when calling updateTaskGraphLog(Async)"); } - - okhttp3.Call localVarCall = updateTaskGraphLogCall(namespace, id, log, _callback); - return localVarCall; + return updateTaskGraphLogCall(namespace, id, log, _callback); } @@ -1366,7 +1375,8 @@ private okhttp3.Call updateTaskGraphLogValidateBeforeCall(String namespace, Stri * @param log Updates to make to the task graph log. The only manual update that a client should need to make to a task graph log is to update its completion status to `succeeded`, `failed`, or `cancelled`. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Log entry updated successfully. -
502 Bad Gateway -
+
+ @@ -1386,7 +1396,8 @@ public void updateTaskGraphLog(String namespace, String id, TaskGraphLog log) th * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Log entry updated successfully. -
502 Bad Gateway -
+
+ @@ -1408,7 +1419,8 @@ public ApiResponse updateTaskGraphLogWithHttpInfo(String namespace, String * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Log entry updated successfully. -
502 Bad Gateway -
+
+ diff --git a/src/main/java/io/tiledb/cloud/rest_api/api/TaskGraphsApi.java b/src/main/java/io/tiledb/cloud/rest_api/api/TaskGraphsApi.java index a5d838b..4290469 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/api/TaskGraphsApi.java +++ b/src/main/java/io/tiledb/cloud/rest_api/api/TaskGraphsApi.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,20 +11,26 @@ */ -package io.tiledb.cloud.rest_api.api; +package org.openapitools.client.api; -import io.tiledb.cloud.rest_api.model.TaskGraphLog; -import io.tiledb.cloud.rest_api.model.TaskGraphs; -import io.tiledb.cloud.rest_api.model.TaskGraph; -import io.tiledb.cloud.rest_api.ApiCallback; -import io.tiledb.cloud.rest_api.ApiClient; -import io.tiledb.cloud.rest_api.ApiException; -import io.tiledb.cloud.rest_api.ApiResponse; -import io.tiledb.cloud.rest_api.Configuration; -import io.tiledb.cloud.rest_api.Pair; +import org.openapitools.client.ApiCallback; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.Pair; +import org.openapitools.client.ProgressRequestBody; +import org.openapitools.client.ProgressResponseBody; import com.google.gson.reflect.TypeToken; +import java.io.IOException; + + +import org.openapitools.client.model.Error; +import org.openapitools.client.model.TaskGraph; +import org.openapitools.client.model.TaskGraphLog; +import org.openapitools.client.model.TaskGraphs; import java.lang.reflect.Type; import java.util.ArrayList; @@ -77,7 +83,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Log entry updated successfully. -
502 Bad Gateway -
+
+ @@ -102,7 +109,7 @@ public okhttp3.Call createTaskGraphCall(String namespace, TaskGraph graph, final // create path and map variables String localVarPath = "/taskgraphs/{namespace}/graphs" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -126,26 +133,23 @@ public okhttp3.Call createTaskGraphCall(String namespace, TaskGraph graph, final localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createTaskGraphValidateBeforeCall(String namespace, TaskGraph graph, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling createTaskGraph(Async)"); } - + // verify the required parameter 'graph' is set if (graph == null) { throw new ApiException("Missing the required parameter 'graph' when calling createTaskGraph(Async)"); } - - okhttp3.Call localVarCall = createTaskGraphCall(namespace, graph, _callback); - return localVarCall; + return createTaskGraphCall(namespace, graph, _callback); } @@ -157,7 +161,8 @@ private okhttp3.Call createTaskGraphValidateBeforeCall(String namespace, TaskGra * @return TaskGraph * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
201 Task graph created successfully. -
502 Bad Gateway -
+
+ @@ -177,7 +182,8 @@ public TaskGraph createTaskGraph(String namespace, TaskGraph graph) throws ApiEx * @return ApiResponse<TaskGraph> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
201 Task graph created successfully. -
502 Bad Gateway -
+
+ @@ -199,7 +205,8 @@ public ApiResponse createTaskGraphWithHttpInfo(String namespace, Task * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
201 Task graph created successfully. -
502 Bad Gateway -
+
+ @@ -221,7 +228,8 @@ public okhttp3.Call createTaskGraphAsync(String namespace, TaskGraph graph, fina * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
201 Task graph created successfully. -
502 Bad Gateway -
+
+ @@ -246,8 +254,8 @@ public okhttp3.Call getTaskGraphCall(String namespace, String id, final ApiCallb // create path and map variables String localVarPath = "/taskgraphs/{namespace}/graphs/{id}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -264,33 +272,29 @@ public okhttp3.Call getTaskGraphCall(String namespace, String id, final ApiCallb } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getTaskGraphValidateBeforeCall(String namespace, String id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling getTaskGraph(Async)"); } - + // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling getTaskGraph(Async)"); } - - okhttp3.Call localVarCall = getTaskGraphCall(namespace, id, _callback); - return localVarCall; + return getTaskGraphCall(namespace, id, _callback); } @@ -302,7 +306,8 @@ private okhttp3.Call getTaskGraphValidateBeforeCall(String namespace, String id, * @return TaskGraph * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Information about the single task graph. -
502 Bad Gateway -
+
+ @@ -322,7 +327,8 @@ public TaskGraph getTaskGraph(String namespace, String id) throws ApiException { * @return ApiResponse<TaskGraph> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Information about the single task graph. -
502 Bad Gateway -
+
+ @@ -344,7 +350,8 @@ public ApiResponse getTaskGraphWithHttpInfo(String namespace, String * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Information about the single task graph. -
502 Bad Gateway -
+
+ @@ -365,7 +372,8 @@ public okhttp3.Call getTaskGraphAsync(String namespace, String id, final ApiCall * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Information about the single task graph. -
502 Bad Gateway -
+
+ @@ -390,7 +398,7 @@ public okhttp3.Call listTaskGraphsCall(String namespace, final ApiCallback _call // create path and map variables String localVarPath = "/taskgraphs/{namespace}/graphs" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -407,28 +415,24 @@ public okhttp3.Call listTaskGraphsCall(String namespace, final ApiCallback _call } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listTaskGraphsValidateBeforeCall(String namespace, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling listTaskGraphs(Async)"); } - - okhttp3.Call localVarCall = listTaskGraphsCall(namespace, _callback); - return localVarCall; + return listTaskGraphsCall(namespace, _callback); } @@ -439,7 +443,8 @@ private okhttp3.Call listTaskGraphsValidateBeforeCall(String namespace, final Ap * @return TaskGraphs * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 The task graphs that matched the user's query. -
502 Bad Gateway -
+
+ @@ -458,7 +463,8 @@ public TaskGraphs listTaskGraphs(String namespace) throws ApiException { * @return ApiResponse<TaskGraphs> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 The task graphs that matched the user's query. -
502 Bad Gateway -
+
+ @@ -479,7 +485,8 @@ public ApiResponse listTaskGraphsWithHttpInfo(String namespace) thro * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 The task graphs that matched the user's query. -
502 Bad Gateway -
+
+ @@ -501,7 +508,8 @@ public okhttp3.Call listTaskGraphsAsync(String namespace, final ApiCallback +
Response Details
Status Code Description Response Headers
200 The task graphs that matched the user's query. -
502 Bad Gateway -
+ @@ -526,8 +534,8 @@ public okhttp3.Call submitTaskGraphCall(String namespace, String id, final ApiCa // create path and map variables String localVarPath = "/taskgraphs/{namespace}/graphs/{id}/submit" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -544,33 +552,29 @@ public okhttp3.Call submitTaskGraphCall(String namespace, String id, final ApiCa } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call submitTaskGraphValidateBeforeCall(String namespace, String id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling submitTaskGraph(Async)"); } - + // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling submitTaskGraph(Async)"); } - - okhttp3.Call localVarCall = submitTaskGraphCall(namespace, id, _callback); - return localVarCall; + return submitTaskGraphCall(namespace, id, _callback); } @@ -582,7 +586,8 @@ private okhttp3.Call submitTaskGraphValidateBeforeCall(String namespace, String * @return TaskGraphLog * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
202 Information about the execution of a single task graph. -
502 Bad Gateway -
+
+ @@ -602,7 +607,8 @@ public TaskGraphLog submitTaskGraph(String namespace, String id) throws ApiExcep * @return ApiResponse<TaskGraphLog> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
202 Information about the execution of a single task graph. -
502 Bad Gateway -
+
+ @@ -624,7 +630,8 @@ public ApiResponse submitTaskGraphWithHttpInfo(String namespace, S * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
202 Information about the execution of a single task graph. -
502 Bad Gateway -
+
+ @@ -647,7 +654,8 @@ public okhttp3.Call submitTaskGraphAsync(String namespace, String id, final ApiC * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
202 Information about the execution of a single task graph. -
502 Bad Gateway -
+
+ @@ -672,8 +680,8 @@ public okhttp3.Call updateTaskGraphCall(String namespace, String id, TaskGraph g // create path and map variables String localVarPath = "/taskgraphs/{namespace}/graphs/{id}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -697,31 +705,28 @@ public okhttp3.Call updateTaskGraphCall(String namespace, String id, TaskGraph g localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateTaskGraphValidateBeforeCall(String namespace, String id, TaskGraph graph, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling updateTaskGraph(Async)"); } - + // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling updateTaskGraph(Async)"); } - + // verify the required parameter 'graph' is set if (graph == null) { throw new ApiException("Missing the required parameter 'graph' when calling updateTaskGraph(Async)"); } - - okhttp3.Call localVarCall = updateTaskGraphCall(namespace, id, graph, _callback); - return localVarCall; + return updateTaskGraphCall(namespace, id, graph, _callback); } @@ -733,7 +738,8 @@ private okhttp3.Call updateTaskGraphValidateBeforeCall(String namespace, String * @param graph Updates to make to the task graph. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Task graph created successfully. -
502 Bad Gateway -
+
+ @@ -753,7 +759,8 @@ public void updateTaskGraph(String namespace, String id, TaskGraph graph) throws * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 Task graph created successfully. -
502 Bad Gateway -
+
+ @@ -775,7 +782,8 @@ public ApiResponse updateTaskGraphWithHttpInfo(String namespace, String id * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Task graph created successfully. -
502 Bad Gateway -
+
+ diff --git a/src/main/java/io/tiledb/cloud/rest_api/api/TasksApi.java b/src/main/java/io/tiledb/cloud/rest_api/api/TasksApi.java index c61ffd6..c63517e 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/api/TasksApi.java +++ b/src/main/java/io/tiledb/cloud/rest_api/api/TasksApi.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,20 +11,26 @@ */ -package io.tiledb.cloud.rest_api.api; +package org.openapitools.client.api; -import io.tiledb.cloud.rest_api.ApiCallback; -import io.tiledb.cloud.rest_api.model.SQLParameters; -import io.tiledb.cloud.rest_api.model.ArrayTask; -import io.tiledb.cloud.rest_api.model.ArrayTaskData; -import io.tiledb.cloud.rest_api.ApiClient; -import io.tiledb.cloud.rest_api.ApiException; -import io.tiledb.cloud.rest_api.ApiResponse; -import io.tiledb.cloud.rest_api.Configuration; -import io.tiledb.cloud.rest_api.Pair; +import org.openapitools.client.ApiCallback; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.Pair; +import org.openapitools.client.ProgressRequestBody; +import org.openapitools.client.ProgressResponseBody; import com.google.gson.reflect.TypeToken; +import java.io.IOException; + + +import org.openapitools.client.model.ArrayTask; +import org.openapitools.client.model.ArrayTaskData; +import org.openapitools.client.model.Error; +import org.openapitools.client.model.SQLParameters; import java.lang.reflect.Type; import java.util.ArrayList; @@ -78,7 +84,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 Task graph created successfully. -
502 Bad Gateway -
+
+ @@ -104,7 +111,7 @@ public okhttp3.Call runSQLCall(String namespace, SQLParameters sql, String accep // create path and map variables String localVarPath = "/sql/{namespace}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -112,10 +119,6 @@ public okhttp3.Call runSQLCall(String namespace, SQLParameters sql, String accep Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (acceptEncoding != null) { - localVarHeaderParams.put("Accept-Encoding", localVarApiClient.parameterToString(acceptEncoding)); - } - final String[] localVarAccepts = { "application/json" }; @@ -132,26 +135,28 @@ public okhttp3.Call runSQLCall(String namespace, SQLParameters sql, String accep localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + if (acceptEncoding != null) { + localVarHeaderParams.put("Accept-Encoding", localVarApiClient.parameterToString(acceptEncoding)); + } + + + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call runSQLValidateBeforeCall(String namespace, SQLParameters sql, String acceptEncoding, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling runSQL(Async)"); } - + // verify the required parameter 'sql' is set if (sql == null) { throw new ApiException("Missing the required parameter 'sql' when calling runSQL(Async)"); } - - okhttp3.Call localVarCall = runSQLCall(namespace, sql, acceptEncoding, _callback); - return localVarCall; + return runSQLCall(namespace, sql, acceptEncoding, _callback); } @@ -161,10 +166,11 @@ private okhttp3.Call runSQLValidateBeforeCall(String namespace, SQLParameters sq * @param namespace namespace to run task under is in (an organization name or user's username) (required) * @param sql sql being submitted (required) * @param acceptEncoding Encoding to use (optional) - * @return List<Object> + * @return List<Map<String, Object>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 JSON results in array of objects form, if the query returns results * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
204 SQL executed successfully * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
+
+ @@ -172,8 +178,8 @@ private okhttp3.Call runSQLValidateBeforeCall(String namespace, SQLParameters sq
Response Details
Status Code Description Response Headers
200 JSON results in array of objects form, if the query returns results * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
204 SQL executed successfully * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
0 error response -
*/ - public List runSQL(String namespace, SQLParameters sql, String acceptEncoding) throws ApiException { - ApiResponse> localVarResp = runSQLWithHttpInfo(namespace, sql, acceptEncoding); + public List> runSQL(String namespace, SQLParameters sql, String acceptEncoding) throws ApiException { + ApiResponse>> localVarResp = runSQLWithHttpInfo(namespace, sql, acceptEncoding); return localVarResp.getData(); } @@ -183,10 +189,11 @@ public List runSQL(String namespace, SQLParameters sql, String acceptEnc * @param namespace namespace to run task under is in (an organization name or user's username) (required) * @param sql sql being submitted (required) * @param acceptEncoding Encoding to use (optional) - * @return ApiResponse<List<Object>> + * @return ApiResponse<List<Map<String, Object>>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -194,9 +201,9 @@ public List runSQL(String namespace, SQLParameters sql, String acceptEnc
Response Details
Status Code Description Response Headers
200 JSON results in array of objects form, if the query returns results * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
204 SQL executed successfully * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
0 error response -
*/ - public ApiResponse> runSQLWithHttpInfo(String namespace, SQLParameters sql, String acceptEncoding) throws ApiException { + public ApiResponse>> runSQLWithHttpInfo(String namespace, SQLParameters sql, String acceptEncoding) throws ApiException { okhttp3.Call localVarCall = runSQLValidateBeforeCall(namespace, sql, acceptEncoding, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + Type localVarReturnType = new TypeToken>>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -210,7 +217,8 @@ public ApiResponse> runSQLWithHttpInfo(String namespace, SQLParamet * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ @@ -218,10 +226,10 @@ public ApiResponse> runSQLWithHttpInfo(String namespace, SQLParamet
Response Details
Status Code Description Response Headers
200 JSON results in array of objects form, if the query returns results * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
204 SQL executed successfully * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
0 error response -
*/ - public okhttp3.Call runSQLAsync(String namespace, SQLParameters sql, String acceptEncoding, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call runSQLAsync(String namespace, SQLParameters sql, String acceptEncoding, final ApiCallback>> _callback) throws ApiException { okhttp3.Call localVarCall = runSQLValidateBeforeCall(namespace, sql, acceptEncoding, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); + Type localVarReturnType = new TypeToken>>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -232,7 +240,8 @@ public okhttp3.Call runSQLAsync(String namespace, SQLParameters sql, String acce * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -257,7 +266,7 @@ public okhttp3.Call taskIdGetCall(String id, final ApiCallback _callback) throws // create path and map variables String localVarPath = "/task/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -274,28 +283,24 @@ public okhttp3.Call taskIdGetCall(String id, final ApiCallback _callback) throws } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call taskIdGetValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling taskIdGet(Async)"); } - - okhttp3.Call localVarCall = taskIdGetCall(id, _callback); - return localVarCall; + return taskIdGetCall(id, _callback); } @@ -306,7 +311,8 @@ private okhttp3.Call taskIdGetValidateBeforeCall(String id, final ApiCallback _c * @return ArrayTask * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Array task -
502 Bad Gateway -
+
+ @@ -325,7 +331,8 @@ public ArrayTask taskIdGet(String id) throws ApiException { * @return ApiResponse<ArrayTask> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Array task -
502 Bad Gateway -
+
+ @@ -346,7 +353,8 @@ public ApiResponse taskIdGetWithHttpInfo(String id) throws ApiExcepti * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Array task -
502 Bad Gateway -
+
+ @@ -368,7 +376,8 @@ public okhttp3.Call taskIdGetAsync(String id, final ApiCallback _call * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Array task -
502 Bad Gateway -
+
+ @@ -395,7 +404,7 @@ public okhttp3.Call taskIdResultGetCall(String id, String acceptEncoding, final // create path and map variables String localVarPath = "/task/{id}/result" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -403,10 +412,6 @@ public okhttp3.Call taskIdResultGetCall(String id, String acceptEncoding, final Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (acceptEncoding != null) { - localVarHeaderParams.put("Accept-Encoding", localVarApiClient.parameterToString(acceptEncoding)); - } - final String[] localVarAccepts = { "application/json" }; @@ -416,28 +421,29 @@ public okhttp3.Call taskIdResultGetCall(String id, String acceptEncoding, final } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + if (acceptEncoding != null) { + localVarHeaderParams.put("Accept-Encoding", localVarApiClient.parameterToString(acceptEncoding)); + } + + + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call taskIdResultGetValidateBeforeCall(String id, String acceptEncoding, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling taskIdResultGet(Async)"); } - - okhttp3.Call localVarCall = taskIdResultGetCall(id, acceptEncoding, _callback); - return localVarCall; + return taskIdResultGetCall(id, acceptEncoding, _callback); } @@ -449,7 +455,8 @@ private okhttp3.Call taskIdResultGetValidateBeforeCall(String id, String acceptE * @return String * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 output and format of originating request * Content-Type - format results are delivered in
202 task is still executing -
+
+ @@ -471,7 +478,8 @@ public String taskIdResultGet(String id, String acceptEncoding) throws ApiExcept * @return ApiResponse<String> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 output and format of originating request * Content-Type - format results are delivered in
202 task is still executing -
+
+ @@ -495,7 +503,8 @@ public ApiResponse taskIdResultGetWithHttpInfo(String id, String acceptE * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 output and format of originating request * Content-Type - format results are delivered in
202 task is still executing -
+
+ @@ -531,7 +540,8 @@ public okhttp3.Call taskIdResultGetAsync(String id, String acceptEncoding, final * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 output and format of originating request * Content-Type - format results are delivered in
202 task is still executing -
+
+ @@ -628,23 +638,19 @@ public okhttp3.Call tasksGetCall(String namespace, String createdBy, String arra } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call tasksGetValidateBeforeCall(String namespace, String createdBy, String array, Integer start, Integer end, Integer page, Integer perPage, String type, List excludeType, List fileType, List excludeFileType, String status, String search, String orderby, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = tasksGetCall(namespace, createdBy, array, start, end, page, perPage, type, excludeType, fileType, excludeFileType, status, search, orderby, _callback); - return localVarCall; + return tasksGetCall(namespace, createdBy, array, start, end, page, perPage, type, excludeType, fileType, excludeFileType, status, search, orderby, _callback); } @@ -668,7 +674,8 @@ private okhttp3.Call tasksGetValidateBeforeCall(String namespace, String created * @return ArrayTaskData * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Array of all tasks user has access too -
502 Bad Gateway -
+
+ @@ -700,7 +707,8 @@ public ArrayTaskData tasksGet(String namespace, String createdBy, String array, * @return ApiResponse<ArrayTaskData> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Array of all tasks user has access too -
502 Bad Gateway -
+
+ @@ -734,7 +742,8 @@ public ApiResponse tasksGetWithHttpInfo(String namespace, String * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Array of all tasks user has access too -
502 Bad Gateway -
+
+ diff --git a/src/main/java/io/tiledb/cloud/rest_api/api/UdfApi.java b/src/main/java/io/tiledb/cloud/rest_api/api/UdfApi.java index f027490..e6b33e1 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/api/UdfApi.java +++ b/src/main/java/io/tiledb/cloud/rest_api/api/UdfApi.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,27 +11,32 @@ */ -package io.tiledb.cloud.rest_api.api; +package org.openapitools.client.api; -import io.tiledb.cloud.rest_api.model.ArrayEndTimestampData; -import io.tiledb.cloud.rest_api.model.UDFCopy; -import io.tiledb.cloud.rest_api.ApiCallback; -import io.tiledb.cloud.rest_api.ApiClient; -import io.tiledb.cloud.rest_api.ApiException; -import io.tiledb.cloud.rest_api.ApiResponse; -import io.tiledb.cloud.rest_api.Configuration; -import io.tiledb.cloud.rest_api.Pair; +import org.openapitools.client.ApiCallback; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.Pair; +import org.openapitools.client.ProgressRequestBody; +import org.openapitools.client.ProgressResponseBody; import com.google.gson.reflect.TypeToken; +import java.io.IOException; + +import org.openapitools.client.model.ArrayEndTimestampData; +import org.openapitools.client.model.Error; import java.io.File; -import io.tiledb.cloud.rest_api.model.GenericUDF; -import io.tiledb.cloud.rest_api.model.MultiArrayUDF; -import io.tiledb.cloud.rest_api.model.UDFCopied; -import io.tiledb.cloud.rest_api.model.UDFInfo; -import io.tiledb.cloud.rest_api.model.UDFInfoUpdate; -import io.tiledb.cloud.rest_api.model.UDFSharing; +import org.openapitools.client.model.GenericUDF; +import org.openapitools.client.model.MultiArrayUDF; +import org.openapitools.client.model.UDFCopied; +import org.openapitools.client.model.UDFCopy; +import org.openapitools.client.model.UDFInfo; +import org.openapitools.client.model.UDFInfoUpdate; +import org.openapitools.client.model.UDFSharing; import java.lang.reflect.Type; import java.util.ArrayList; @@ -84,7 +89,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Array of all tasks user has access too -
502 Bad Gateway -
+
+ @@ -109,8 +115,8 @@ public okhttp3.Call deleteUDFInfoCall(String namespace, String name, final ApiCa // create path and map variables String localVarPath = "/udf/{namespace}/{name}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -127,292 +133,30 @@ public okhttp3.Call deleteUDFInfoCall(String namespace, String name, final ApiCa } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteUDFInfoValidateBeforeCall(String namespace, String name, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling deleteUDFInfo(Async)"); } - + // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling deleteUDFInfo(Async)"); } - - - okhttp3.Call localVarCall = deleteUDFInfoCall(namespace, name, _callback); - return localVarCall; - - } - - /** - * - * submit a generic UDF in the given namespace - * @param namespace namespace array is in (an organization name or user's username) (required) - * @param udf UDF to run (required) - * @param acceptEncoding Encoding to use (optional) - * @return byte[] - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details -
Response Details
Status Code Description Response Headers
204 UDF deleted successfully -
502 Bad Gateway -
- - - -
Status Code Description Response Headers
200 UDF completed and the UDF-type specific result is returned * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
0 error response * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
- */ - public byte[] submitGenericUDFBytes(String namespace, GenericUDF udf, String acceptEncoding) throws ApiException { - ApiResponse localVarResp = submitGenericUDFWithHttpInfoBytes(namespace, udf, acceptEncoding); - return localVarResp.getData(); - } - - /** - * - * submit a generic UDF in the given namespace - * @param namespace namespace array is in (an organization name or user's username) (required) - * @param udf UDF to run (required) - * @param acceptEncoding Encoding to use (optional) - * @return ApiResponse<byte[]> - * @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 UDF completed and the UDF-type specific result is returned * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
0 error response * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
- */ - public ApiResponse submitGenericUDFWithHttpInfoBytes(String namespace, GenericUDF udf, String acceptEncoding) throws ApiException { - okhttp3.Call localVarCall = submitGenericUDFValidateBeforeCall(namespace, udf, acceptEncoding, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * - * submit a generic UDF in the given namespace - * @param namespace namespace array is in (an organization name or user's username) (required) - * @param udf UDF to run (required) - * @param acceptEncoding Encoding to use (optional) - * @return Object - * @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 UDF completed and the UDF-type specific result is returned * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
0 error response * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
- */ - public Object submitGenericUDFObj(String namespace, GenericUDF udf, String acceptEncoding) throws ApiException { - ApiResponse localVarResp = submitGenericUDFWithHttpInfoObj(namespace, udf, acceptEncoding); - return localVarResp.getData(); - } - - /** - * - * submit a multi-array UDF in the given namespace - * @param namespace namespace array is in (an organization name or user's username) (required) - * @param udf UDF to run (required) - * @param acceptEncoding Encoding to use (optional) - * @return String - * @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 UDF completed and the UDF-type specific result is returned * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
0 error response * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
- */ - public String submitMultiArrayUDFString(String namespace, MultiArrayUDF udf, String acceptEncoding) throws ApiException { - ApiResponse localVarResp = submitMultiArrayUDFWithHttpInfoString(namespace, udf, acceptEncoding); - return localVarResp.getData(); - } - - /** - * - * submit a multi-array UDF in the given namespace - * @param namespace namespace array is in (an organization name or user's username) (required) - * @param udf UDF to run (required) - * @param acceptEncoding Encoding to use (optional) - * @return ApiResponse<String> - * @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 UDF completed and the UDF-type specific result is returned * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
0 error response * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
- */ - public ApiResponse submitMultiArrayUDFWithHttpInfoString(String namespace, MultiArrayUDF udf, String acceptEncoding) throws ApiException { - okhttp3.Call localVarCall = submitMultiArrayUDFValidateBeforeCall(namespace, udf, acceptEncoding, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * - * submit a multi-array UDF in the given namespace - * @param namespace namespace array is in (an organization name or user's username) (required) - * @param udf UDF to run (required) - * @param acceptEncoding Encoding to use (optional) - * @return byte[] - * @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 UDF completed and the UDF-type specific result is returned * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
0 error response * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
- */ - public byte[] submitMultiArrayUDFBytes(String namespace, MultiArrayUDF udf, String acceptEncoding) throws ApiException { - ApiResponse localVarResp = submitMultiArrayUDFWithHttpInfoBytes(namespace, udf, acceptEncoding); - return localVarResp.getData(); - } - - /** - * - * send a UDF to run against a specified array/URI registered to a group/project - * @param namespace namespace array is in (an organization name or user's username) (required) - * @param array name/uri of array that is url-encoded (required) - * @param udf UDF to run (required) - * @param xPayer Name of organization or user who should be charged for this request (optional) - * @param acceptEncoding Encoding to use (optional) - * @param v2 flag to indicate if v2 array UDFs should be used, currently in beta testing. Setting any value will enable v2 array UDFs. (optional) - * @return String - * @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 UDF completed and the UDF-type specific result is returned * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
0 error response * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
- */ - public String submitUDFString(String namespace, String array, MultiArrayUDF udf, String xPayer, String acceptEncoding, String v2) throws ApiException { - ApiResponse localVarResp = submitUDFWithHttpInfoString(namespace, array, udf, xPayer, acceptEncoding, v2); - return localVarResp.getData(); - } - - /** - * - * send a UDF to run against a specified array/URI registered to a group/project - * @param namespace namespace array is in (an organization name or user's username) (required) - * @param array name/uri of array that is url-encoded (required) - * @param udf UDF to run (required) - * @param xPayer Name of organization or user who should be charged for this request (optional) - * @param acceptEncoding Encoding to use (optional) - * @param v2 flag to indicate if v2 array UDFs should be used, currently in beta testing. Setting any value will enable v2 array UDFs. (optional) - * @return ApiResponse<String> - * @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 UDF completed and the UDF-type specific result is returned * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
0 error response * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
- */ - public ApiResponse submitUDFWithHttpInfoString(String namespace, String array, MultiArrayUDF udf, String xPayer, String acceptEncoding, String v2) throws ApiException { - okhttp3.Call localVarCall = submitUDFValidateBeforeCall(namespace, array, udf, xPayer, acceptEncoding, v2, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * - * send a UDF to run against a specified array/URI registered to a group/project - * @param namespace namespace array is in (an organization name or user's username) (required) - * @param array name/uri of array that is url-encoded (required) - * @param udf UDF to run (required) - * @param xPayer Name of organization or user who should be charged for this request (optional) - * @param acceptEncoding Encoding to use (optional) - * @param v2 flag to indicate if v2 array UDFs should be used, currently in beta testing. Setting any value will enable v2 array UDFs. (optional) - * @return byte[] - * @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 UDF completed and the UDF-type specific result is returned * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
0 error response * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
- */ - public byte[] submitUDFBytes(String namespace, String array, MultiArrayUDF udf, String xPayer, String acceptEncoding, String v2) throws ApiException { - ApiResponse localVarResp = submitUDFWithHttpInfoBytes(namespace, array, udf, xPayer, acceptEncoding, v2); - return localVarResp.getData(); - } - - /** - * - * send a UDF to run against a specified array/URI registered to a group/project - * @param namespace namespace array is in (an organization name or user's username) (required) - * @param array name/uri of array that is url-encoded (required) - * @param udf UDF to run (required) - * @param xPayer Name of organization or user who should be charged for this request (optional) - * @param acceptEncoding Encoding to use (optional) - * @param v2 flag to indicate if v2 array UDFs should be used, currently in beta testing. Setting any value will enable v2 array UDFs. (optional) - * @return ApiResponse<byte[]> - * @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 UDF completed and the UDF-type specific result is returned * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
0 error response * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
- */ - public ApiResponse submitUDFWithHttpInfoBytes(String namespace, String array, MultiArrayUDF udf, String xPayer, String acceptEncoding, String v2) throws ApiException { - okhttp3.Call localVarCall = submitUDFValidateBeforeCall(namespace, array, udf, xPayer, acceptEncoding, v2, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - /** - * - * submit a multi-array UDF in the given namespace - * @param namespace namespace array is in (an organization name or user's username) (required) - * @param udf UDF to run (required) - * @param acceptEncoding Encoding to use (optional) - * @return ApiResponse<byte[]> - * @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 UDF completed and the UDF-type specific result is returned * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
0 error response * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
- */ - public ApiResponse submitMultiArrayUDFWithHttpInfoBytes(String namespace, MultiArrayUDF udf, String acceptEncoding) throws ApiException { - okhttp3.Call localVarCall = submitMultiArrayUDFValidateBeforeCall(namespace, udf, acceptEncoding, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } + return deleteUDFInfoCall(namespace, name, _callback); - /** - * - * submit a generic UDF in the given namespace - * @param namespace namespace array is in (an organization name or user's username) (required) - * @param udf UDF to run (required) - * @param acceptEncoding Encoding to use (optional) - * @return ApiResponse<Object> - * @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 UDF completed and the UDF-type specific result is returned * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
0 error response * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
- */ - public ApiResponse submitGenericUDFWithHttpInfoObj(String namespace, GenericUDF udf, String acceptEncoding) throws ApiException { - okhttp3.Call localVarCall = submitGenericUDFValidateBeforeCall(namespace, udf, acceptEncoding, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -422,7 +166,8 @@ public ApiResponse submitGenericUDFWithHttpInfoObj(String namespace, Gen * @param name name to register UDF under (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -433,47 +178,6 @@ public void deleteUDFInfo(String namespace, String name) throws ApiException { deleteUDFInfoWithHttpInfo(namespace, name); } - /** - * - * submit a generic UDF in the given namespace - * @param namespace namespace array is in (an organization name or user's username) (required) - * @param udf UDF to run (required) - * @param acceptEncoding Encoding to use (optional) - * @return ApiResponse<String> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details -
Response Details
Status Code Description Response Headers
204 UDF deleted successfully -
502 Bad Gateway -
- - - -
Status Code Description Response Headers
200 UDF completed and the UDF-type specific result is returned * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
0 error response * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
- */ - public ApiResponse submitGenericUDFWithHttpInfoString(String namespace, GenericUDF udf, String acceptEncoding) throws ApiException { - okhttp3.Call localVarCall = submitGenericUDFValidateBeforeCall(namespace, udf, acceptEncoding, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * - * submit a generic UDF in the given namespace - * @param namespace namespace array is in (an organization name or user's username) (required) - * @param udf UDF to run (required) - * @param acceptEncoding Encoding to use (optional) - * @return String - * @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 UDF completed and the UDF-type specific result is returned * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
0 error response * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
- */ - public String submitGenericUDFString(String namespace, GenericUDF udf, String acceptEncoding) throws ApiException { - ApiResponse localVarResp = submitGenericUDFWithHttpInfoString(namespace, udf, acceptEncoding); - return localVarResp.getData(); - } - /** * * delete a registered UDF -- this will remove all sharing and can not be undone @@ -482,7 +186,8 @@ public String submitGenericUDFString(String namespace, GenericUDF udf, String ac * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -503,7 +208,8 @@ public ApiResponse deleteUDFInfoWithHttpInfo(String namespace, String name * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 UDF deleted successfully -
502 Bad Gateway -
+
+ @@ -524,7 +230,8 @@ public okhttp3.Call deleteUDFInfoAsync(String namespace, String name, final ApiC * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 UDF deleted successfully -
502 Bad Gateway -
+
+ @@ -550,8 +257,8 @@ public okhttp3.Call getUDFInfoCall(String namespace, String name, final ApiCallb // create path and map variables String localVarPath = "/udf/{namespace}/{name}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -568,33 +275,29 @@ public okhttp3.Call getUDFInfoCall(String namespace, String name, final ApiCallb } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getUDFInfoValidateBeforeCall(String namespace, String name, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling getUDFInfo(Async)"); } - + // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling getUDFInfo(Async)"); } - - okhttp3.Call localVarCall = getUDFInfoCall(namespace, name, _callback); - return localVarCall; + return getUDFInfoCall(namespace, name, _callback); } @@ -606,7 +309,8 @@ private okhttp3.Call getUDFInfoValidateBeforeCall(String namespace, String name, * @return UDFInfo * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 UDFInfo was retrieved successfully -
404 UDF not found -
+
+ @@ -627,7 +331,8 @@ public UDFInfo getUDFInfo(String namespace, String name) throws ApiException { * @return ApiResponse<UDFInfo> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 UDFInfo was retrieved successfully -
404 UDF not found -
+
+ @@ -650,7 +355,8 @@ public ApiResponse getUDFInfoWithHttpInfo(String namespace, String name * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 UDFInfo was retrieved successfully -
404 UDF not found -
+
+ @@ -673,7 +379,8 @@ public okhttp3.Call getUDFInfoAsync(String namespace, String name, final ApiCall * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 UDFInfo was retrieved successfully -
404 UDF not found -
+
+ @@ -699,8 +406,8 @@ public okhttp3.Call getUDFInfoSharingPoliciesCall(String namespace, String name, // create path and map variables String localVarPath = "/udf/{namespace}/{name}/share" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -717,33 +424,29 @@ public okhttp3.Call getUDFInfoSharingPoliciesCall(String namespace, String name, } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getUDFInfoSharingPoliciesValidateBeforeCall(String namespace, String name, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling getUDFInfoSharingPolicies(Async)"); } - + // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling getUDFInfoSharingPolicies(Async)"); } - - okhttp3.Call localVarCall = getUDFInfoSharingPoliciesCall(namespace, name, _callback); - return localVarCall; + return getUDFInfoSharingPoliciesCall(namespace, name, _callback); } @@ -755,7 +458,8 @@ private okhttp3.Call getUDFInfoSharingPoliciesValidateBeforeCall(String namespac * @return List<UDFSharing> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of all specific sharing policies -
404 UDF does not exist or user does not have permissions to view array-sharing policies -
+
+ @@ -776,7 +480,8 @@ public List getUDFInfoSharingPolicies(String namespace, String name) * @return ApiResponse<List<UDFSharing>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of all specific sharing policies -
404 UDF does not exist or user does not have permissions to view array-sharing policies -
+
+ @@ -799,7 +504,8 @@ public ApiResponse> getUDFInfoSharingPoliciesWithHttpInfo(Strin * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of all specific sharing policies -
404 UDF does not exist or user does not have permissions to view array-sharing policies -
+
+ @@ -825,7 +531,8 @@ public okhttp3.Call getUDFInfoSharingPoliciesAsync(String namespace, String name * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 List of all specific sharing policies -
404 UDF does not exist or user does not have permissions to view array-sharing policies -
+
+ @@ -850,8 +557,8 @@ public okhttp3.Call handleCopyUDFCall(String namespace, String name, UDFCopy udF // create path and map variables String localVarPath = "/udf/{namespace}/{name}/copy" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -863,10 +570,6 @@ public okhttp3.Call handleCopyUDFCall(String namespace, String name, UDFCopy udF localVarQueryParams.addAll(localVarApiClient.parameterToPair("end_timestamp", endTimestamp)); } - if (X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME != null) { - localVarHeaderParams.put("X-TILEDB-CLOUD-ACCESS-CREDENTIALS-NAME", localVarApiClient.parameterToString(X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME)); - } - final String[] localVarAccepts = { "application/json" }; @@ -883,31 +586,33 @@ public okhttp3.Call handleCopyUDFCall(String namespace, String name, UDFCopy udF localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + if (X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME != null) { + localVarHeaderParams.put("X-TILEDB-CLOUD-ACCESS-CREDENTIALS-NAME", localVarApiClient.parameterToString(X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME)); + } + + + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call handleCopyUDFValidateBeforeCall(String namespace, String name, UDFCopy udFCopy, String X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME, Integer endTimestamp, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling handleCopyUDF(Async)"); } - + // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling handleCopyUDF(Async)"); } - + // verify the required parameter 'udFCopy' is set if (udFCopy == null) { throw new ApiException("Missing the required parameter 'udFCopy' when calling handleCopyUDF(Async)"); } - - okhttp3.Call localVarCall = handleCopyUDFCall(namespace, name, udFCopy, X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME, endTimestamp, _callback); - return localVarCall; + return handleCopyUDFCall(namespace, name, udFCopy, X_TILEDB_CLOUD_ACCESS_CREDENTIALS_NAME, endTimestamp, _callback); } @@ -922,7 +627,8 @@ private okhttp3.Call handleCopyUDFValidateBeforeCall(String namespace, String na * @return UDFCopied * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
201 UDF copied -
502 Bad Gateway -
+
+ @@ -945,7 +651,8 @@ public UDFCopied handleCopyUDF(String namespace, String name, UDFCopy udFCopy, S * @return ApiResponse<UDFCopied> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
201 UDF copied -
502 Bad Gateway -
+
+ @@ -970,7 +677,8 @@ public ApiResponse handleCopyUDFWithHttpInfo(String namespace, String * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
201 UDF copied -
502 Bad Gateway -
+
+ @@ -993,7 +701,8 @@ public okhttp3.Call handleCopyUDFAsync(String namespace, String name, UDFCopy ud * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
201 UDF copied -
502 Bad Gateway -
+
+ @@ -1018,8 +727,8 @@ public okhttp3.Call registerUDFInfoCall(String namespace, String name, UDFInfoUp // create path and map variables String localVarPath = "/udf/{namespace}/{name}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1043,31 +752,28 @@ public okhttp3.Call registerUDFInfoCall(String namespace, String name, UDFInfoUp localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call registerUDFInfoValidateBeforeCall(String namespace, String name, UDFInfoUpdate udf, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling registerUDFInfo(Async)"); } - + // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling registerUDFInfo(Async)"); } - + // verify the required parameter 'udf' is set if (udf == null) { throw new ApiException("Missing the required parameter 'udf' when calling registerUDFInfo(Async)"); } - - okhttp3.Call localVarCall = registerUDFInfoCall(namespace, name, udf, _callback); - return localVarCall; + return registerUDFInfoCall(namespace, name, udf, _callback); } @@ -1079,7 +785,8 @@ private okhttp3.Call registerUDFInfoValidateBeforeCall(String namespace, String * @param udf UDF to register (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 UDF registered successfully -
502 Bad Gateway -
+
+ @@ -1099,7 +806,8 @@ public void registerUDFInfo(String namespace, String name, UDFInfoUpdate udf) th * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 UDF registered successfully -
502 Bad Gateway -
+
+ @@ -1121,7 +829,8 @@ public ApiResponse registerUDFInfoWithHttpInfo(String namespace, String na * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 UDF registered successfully -
502 Bad Gateway -
+
+ @@ -1143,7 +852,8 @@ public okhttp3.Call registerUDFInfoAsync(String namespace, String name, UDFInfoU * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 UDF registered successfully -
502 Bad Gateway -
+
+ @@ -1169,8 +879,8 @@ public okhttp3.Call shareUDFInfoCall(String namespace, String name, UDFSharing u // create path and map variables String localVarPath = "/udf/{namespace}/{name}/share" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1194,31 +904,28 @@ public okhttp3.Call shareUDFInfoCall(String namespace, String name, UDFSharing u localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call shareUDFInfoValidateBeforeCall(String namespace, String name, UDFSharing udfSharing, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling shareUDFInfo(Async)"); } - + // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling shareUDFInfo(Async)"); } - + // verify the required parameter 'udfSharing' is set if (udfSharing == null) { throw new ApiException("Missing the required parameter 'udfSharing' when calling shareUDFInfo(Async)"); } - - okhttp3.Call localVarCall = shareUDFInfoCall(namespace, name, udfSharing, _callback); - return localVarCall; + return shareUDFInfoCall(namespace, name, udfSharing, _callback); } @@ -1230,7 +937,8 @@ private okhttp3.Call shareUDFInfoValidateBeforeCall(String namespace, String nam * @param udfSharing Namespace and list of permissions to share with. An empty list of permissions will remove the namespace; if permissions already exist they will be deleted then new ones added. In the event of a failure, the new policies will be rolled back to prevent partial policies, and it's likely the UDF will not be shared with the namespace at all. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 UDF shared successfully -
404 UDF does not exist or user does not have permissions to share UDF -
+
+ @@ -1251,7 +959,8 @@ public void shareUDFInfo(String namespace, String name, UDFSharing udfSharing) t * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 UDF shared successfully -
404 UDF does not exist or user does not have permissions to share UDF -
+
+ @@ -1274,7 +983,8 @@ public ApiResponse shareUDFInfoWithHttpInfo(String namespace, String name, * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 UDF shared successfully -
404 UDF does not exist or user does not have permissions to share UDF -
+
+ @@ -1297,7 +1007,8 @@ public okhttp3.Call shareUDFInfoAsync(String namespace, String name, UDFSharing * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 UDF shared successfully -
404 UDF does not exist or user does not have permissions to share UDF -
+
+ @@ -1322,7 +1033,7 @@ public okhttp3.Call submitGenericUDFCall(String namespace, GenericUDF udf, Strin // create path and map variables String localVarPath = "/udfs/generic/{namespace}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1330,10 +1041,6 @@ public okhttp3.Call submitGenericUDFCall(String namespace, GenericUDF udf, Strin Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (acceptEncoding != null) { - localVarHeaderParams.put("Accept-Encoding", localVarApiClient.parameterToString(acceptEncoding)); - } - final String[] localVarAccepts = { "application/octet-stream" }; @@ -1350,26 +1057,28 @@ public okhttp3.Call submitGenericUDFCall(String namespace, GenericUDF udf, Strin localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + if (acceptEncoding != null) { + localVarHeaderParams.put("Accept-Encoding", localVarApiClient.parameterToString(acceptEncoding)); + } + + + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call submitGenericUDFValidateBeforeCall(String namespace, GenericUDF udf, String acceptEncoding, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling submitGenericUDF(Async)"); } - + // verify the required parameter 'udf' is set if (udf == null) { throw new ApiException("Missing the required parameter 'udf' when calling submitGenericUDF(Async)"); } - - okhttp3.Call localVarCall = submitGenericUDFCall(namespace, udf, acceptEncoding, _callback); - return localVarCall; + return submitGenericUDFCall(namespace, udf, acceptEncoding, _callback); } @@ -1382,7 +1091,8 @@ private okhttp3.Call submitGenericUDFValidateBeforeCall(String namespace, Generi * @return File * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 UDF completed and the UDF-type specific result is returned * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
502 Bad Gateway -
+
+ @@ -1403,7 +1113,8 @@ public File submitGenericUDF(String namespace, GenericUDF udf, String acceptEnco * @return ApiResponse<File> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 UDF completed and the UDF-type specific result is returned * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
502 Bad Gateway -
+
+ @@ -1426,7 +1137,8 @@ public ApiResponse submitGenericUDFWithHttpInfo(String namespace, GenericU * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 UDF completed and the UDF-type specific result is returned * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
502 Bad Gateway -
+
+ @@ -1449,7 +1161,8 @@ public okhttp3.Call submitGenericUDFAsync(String namespace, GenericUDF udf, Stri * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 UDF completed and the UDF-type specific result is returned * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
502 Bad Gateway -
+
+ @@ -1474,7 +1187,7 @@ public okhttp3.Call submitMultiArrayUDFCall(String namespace, MultiArrayUDF udf, // create path and map variables String localVarPath = "/udfs/arrays/{namespace}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1482,10 +1195,6 @@ public okhttp3.Call submitMultiArrayUDFCall(String namespace, MultiArrayUDF udf, Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (acceptEncoding != null) { - localVarHeaderParams.put("Accept-Encoding", localVarApiClient.parameterToString(acceptEncoding)); - } - final String[] localVarAccepts = { "application/octet-stream" }; @@ -1502,26 +1211,28 @@ public okhttp3.Call submitMultiArrayUDFCall(String namespace, MultiArrayUDF udf, localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + if (acceptEncoding != null) { + localVarHeaderParams.put("Accept-Encoding", localVarApiClient.parameterToString(acceptEncoding)); + } + + + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call submitMultiArrayUDFValidateBeforeCall(String namespace, MultiArrayUDF udf, String acceptEncoding, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling submitMultiArrayUDF(Async)"); } - + // verify the required parameter 'udf' is set if (udf == null) { throw new ApiException("Missing the required parameter 'udf' when calling submitMultiArrayUDF(Async)"); } - - okhttp3.Call localVarCall = submitMultiArrayUDFCall(namespace, udf, acceptEncoding, _callback); - return localVarCall; + return submitMultiArrayUDFCall(namespace, udf, acceptEncoding, _callback); } @@ -1534,7 +1245,8 @@ private okhttp3.Call submitMultiArrayUDFValidateBeforeCall(String namespace, Mul * @return File * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 UDF completed and the UDF-type specific result is returned * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
502 Bad Gateway -
+
+ @@ -1555,7 +1267,8 @@ public File submitMultiArrayUDF(String namespace, MultiArrayUDF udf, String acce * @return ApiResponse<File> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 UDF completed and the UDF-type specific result is returned * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
502 Bad Gateway -
+
+ @@ -1578,7 +1291,8 @@ public ApiResponse submitMultiArrayUDFWithHttpInfo(String namespace, Multi * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 UDF completed and the UDF-type specific result is returned * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
502 Bad Gateway -
+
+ @@ -1604,7 +1318,8 @@ public okhttp3.Call submitMultiArrayUDFAsync(String namespace, MultiArrayUDF udf * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 UDF completed and the UDF-type specific result is returned * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
502 Bad Gateway -
+
+ @@ -1629,8 +1344,8 @@ public okhttp3.Call submitUDFCall(String namespace, String array, MultiArrayUDF // create path and map variables String localVarPath = "/arrays/{namespace}/{array}/udf/submit" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1642,14 +1357,6 @@ public okhttp3.Call submitUDFCall(String namespace, String array, MultiArrayUDF localVarQueryParams.addAll(localVarApiClient.parameterToPair("v2", v2)); } - if (xPayer != null) { - localVarHeaderParams.put("X-Payer", localVarApiClient.parameterToString(xPayer)); - } - - if (acceptEncoding != null) { - localVarHeaderParams.put("Accept-Encoding", localVarApiClient.parameterToString(acceptEncoding)); - } - final String[] localVarAccepts = { "application/octet-stream" }; @@ -1666,31 +1373,38 @@ public okhttp3.Call submitUDFCall(String namespace, String array, MultiArrayUDF localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + if (xPayer != null) { + localVarHeaderParams.put("X-Payer", localVarApiClient.parameterToString(xPayer)); + } + + + if (acceptEncoding != null) { + localVarHeaderParams.put("Accept-Encoding", localVarApiClient.parameterToString(acceptEncoding)); + } + + + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call submitUDFValidateBeforeCall(String namespace, String array, MultiArrayUDF udf, String xPayer, String acceptEncoding, String v2, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling submitUDF(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling submitUDF(Async)"); } - + // verify the required parameter 'udf' is set if (udf == null) { throw new ApiException("Missing the required parameter 'udf' when calling submitUDF(Async)"); } - - okhttp3.Call localVarCall = submitUDFCall(namespace, array, udf, xPayer, acceptEncoding, v2, _callback); - return localVarCall; + return submitUDFCall(namespace, array, udf, xPayer, acceptEncoding, v2, _callback); } @@ -1706,7 +1420,8 @@ private okhttp3.Call submitUDFValidateBeforeCall(String namespace, String array, * @return File * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 UDF completed and the UDF-type specific result is returned * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
502 Bad Gateway -
+
+ @@ -1730,7 +1445,8 @@ public File submitUDF(String namespace, String array, MultiArrayUDF udf, String * @return ApiResponse<File> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 UDF completed and the UDF-type specific result is returned * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
502 Bad Gateway -
+
+ @@ -1756,7 +1472,8 @@ public ApiResponse submitUDFWithHttpInfo(String namespace, String array, M * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 UDF completed and the UDF-type specific result is returned * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
502 Bad Gateway -
+
+ @@ -1780,7 +1497,8 @@ public okhttp3.Call submitUDFAsync(String namespace, String array, MultiArrayUDF * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 UDF completed and the UDF-type specific result is returned * X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
502 Bad Gateway -
+
+ @@ -1805,8 +1523,8 @@ public okhttp3.Call udfNamespaceArrayEndTimestampsGetCall(String namespace, Stri // create path and map variables String localVarPath = "/udf/{namespace}/{array}/end_timestamps" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "array" + "}", localVarApiClient.escapeString(array.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1831,33 +1549,29 @@ public okhttp3.Call udfNamespaceArrayEndTimestampsGetCall(String namespace, Stri } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call udfNamespaceArrayEndTimestampsGetValidateBeforeCall(String namespace, String array, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling udfNamespaceArrayEndTimestampsGet(Async)"); } - + // verify the required parameter 'array' is set if (array == null) { throw new ApiException("Missing the required parameter 'array' when calling udfNamespaceArrayEndTimestampsGet(Async)"); } - - okhttp3.Call localVarCall = udfNamespaceArrayEndTimestampsGetCall(namespace, array, page, perPage, _callback); - return localVarCall; + return udfNamespaceArrayEndTimestampsGetCall(namespace, array, page, perPage, _callback); } @@ -1871,7 +1585,8 @@ private okhttp3.Call udfNamespaceArrayEndTimestampsGetValidateBeforeCall(String * @return ArrayEndTimestampData * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 list of timestamps in milliseconds, paginated -
502 Bad Gateway -
+
+ @@ -1893,7 +1608,8 @@ public ArrayEndTimestampData udfNamespaceArrayEndTimestampsGet(String namespace, * @return ApiResponse<ArrayEndTimestampData> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 list of timestamps in milliseconds, paginated -
502 Bad Gateway -
+
+ @@ -1917,7 +1633,8 @@ public ApiResponse udfNamespaceArrayEndTimestampsGetWithH * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 list of timestamps in milliseconds, paginated -
502 Bad Gateway -
+
+ @@ -1940,7 +1657,8 @@ public okhttp3.Call udfNamespaceArrayEndTimestampsGetAsync(String namespace, Str * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 list of timestamps in milliseconds, paginated -
502 Bad Gateway -
+
+ @@ -1965,8 +1683,8 @@ public okhttp3.Call updateUDFInfoCall(String namespace, String name, UDFInfoUpda // create path and map variables String localVarPath = "/udf/{namespace}/{name}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1990,31 +1708,28 @@ public okhttp3.Call updateUDFInfoCall(String namespace, String name, UDFInfoUpda localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateUDFInfoValidateBeforeCall(String namespace, String name, UDFInfoUpdate udf, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling updateUDFInfo(Async)"); } - + // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling updateUDFInfo(Async)"); } - + // verify the required parameter 'udf' is set if (udf == null) { throw new ApiException("Missing the required parameter 'udf' when calling updateUDFInfo(Async)"); } - - okhttp3.Call localVarCall = updateUDFInfoCall(namespace, name, udf, _callback); - return localVarCall; + return updateUDFInfoCall(namespace, name, udf, _callback); } @@ -2026,7 +1741,8 @@ private okhttp3.Call updateUDFInfoValidateBeforeCall(String namespace, String na * @param udf UDF to update (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 UDF updated successfully -
502 Bad Gateway -
+
+ @@ -2046,7 +1762,8 @@ public void updateUDFInfo(String namespace, String name, UDFInfoUpdate udf) thro * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 UDF updated successfully -
502 Bad Gateway -
+
+ @@ -2068,7 +1785,8 @@ public ApiResponse updateUDFInfoWithHttpInfo(String namespace, String name * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 UDF updated successfully -
502 Bad Gateway -
+
+ diff --git a/src/main/java/io/tiledb/cloud/rest_api/api/UserApi.java b/src/main/java/io/tiledb/cloud/rest_api/api/UserApi.java index e6abdcf..5796606 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/api/UserApi.java +++ b/src/main/java/io/tiledb/cloud/rest_api/api/UserApi.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,25 +11,31 @@ */ -package io.tiledb.cloud.rest_api.api; +package org.openapitools.client.api; -import io.tiledb.cloud.rest_api.ApiCallback; -import io.tiledb.cloud.rest_api.model.ResetUserPasswordRequest; -import io.tiledb.cloud.rest_api.model.TokenScope; -import io.tiledb.cloud.rest_api.ApiClient; -import io.tiledb.cloud.rest_api.ApiException; -import io.tiledb.cloud.rest_api.ApiResponse; -import io.tiledb.cloud.rest_api.Configuration; -import io.tiledb.cloud.rest_api.Pair; +import org.openapitools.client.ApiCallback; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.Pair; +import org.openapitools.client.ProgressRequestBody; +import org.openapitools.client.ProgressResponseBody; import com.google.gson.reflect.TypeToken; +import java.io.IOException; -import io.tiledb.cloud.rest_api.model.AWSAccessCredentials; -import io.tiledb.cloud.rest_api.model.OrganizationUser; -import io.tiledb.cloud.rest_api.model.Token; -import io.tiledb.cloud.rest_api.model.TokenRequest; -import io.tiledb.cloud.rest_api.model.User; + +import org.openapitools.client.model.AWSAccessCredentials; +import org.openapitools.client.model.Error; +import java.time.OffsetDateTime; +import org.openapitools.client.model.OrganizationUser; +import org.openapitools.client.model.ResetUserPasswordRequest; +import org.openapitools.client.model.Token; +import org.openapitools.client.model.TokenRequest; +import org.openapitools.client.model.TokenScope; +import org.openapitools.client.model.User; import java.lang.reflect.Type; import java.util.ArrayList; @@ -82,7 +88,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 UDF updated successfully -
502 Bad Gateway -
+
+ @@ -107,7 +114,7 @@ public okhttp3.Call addAWSAccessCredentialsCall(String namespace, AWSAccessCrede // create path and map variables String localVarPath = "/credentials/{namespace}/aws" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -131,26 +138,23 @@ public okhttp3.Call addAWSAccessCredentialsCall(String namespace, AWSAccessCrede localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call addAWSAccessCredentialsValidateBeforeCall(String namespace, AWSAccessCredentials awsAccessCredentials, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling addAWSAccessCredentials(Async)"); } - + // verify the required parameter 'awsAccessCredentials' is set if (awsAccessCredentials == null) { throw new ApiException("Missing the required parameter 'awsAccessCredentials' when calling addAWSAccessCredentials(Async)"); } - - okhttp3.Call localVarCall = addAWSAccessCredentialsCall(namespace, awsAccessCredentials, _callback); - return localVarCall; + return addAWSAccessCredentialsCall(namespace, awsAccessCredentials, _callback); } @@ -161,7 +165,8 @@ private okhttp3.Call addAWSAccessCredentialsValidateBeforeCall(String namespace, * @param awsAccessCredentials aws access credentials to store for a namespace (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 AWS keys added successfully -
502 Bad Gateway -
+
+ @@ -180,7 +185,8 @@ public void addAWSAccessCredentials(String namespace, AWSAccessCredentials awsAc * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 AWS keys added successfully -
502 Bad Gateway -
+
+ @@ -201,7 +207,8 @@ public ApiResponse addAWSAccessCredentialsWithHttpInfo(String namespace, A * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 AWS keys added successfully -
502 Bad Gateway -
+
+ @@ -222,7 +229,8 @@ public okhttp3.Call addAWSAccessCredentialsAsync(String namespace, AWSAccessCred * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 AWS keys added successfully -
502 Bad Gateway -
+
+ @@ -247,7 +255,7 @@ public okhttp3.Call addUserToOrganizationCall(String organization, OrganizationU // create path and map variables String localVarPath = "/organizations/{organization}/user" - .replaceAll("\\{" + "organization" + "\\}", localVarApiClient.escapeString(organization.toString())); + .replace("{" + "organization" + "}", localVarApiClient.escapeString(organization.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -271,26 +279,23 @@ public okhttp3.Call addUserToOrganizationCall(String organization, OrganizationU localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call addUserToOrganizationValidateBeforeCall(String organization, OrganizationUser user, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'organization' is set if (organization == null) { throw new ApiException("Missing the required parameter 'organization' when calling addUserToOrganization(Async)"); } - + // verify the required parameter 'user' is set if (user == null) { throw new ApiException("Missing the required parameter 'user' when calling addUserToOrganization(Async)"); } - - okhttp3.Call localVarCall = addUserToOrganizationCall(organization, user, _callback); - return localVarCall; + return addUserToOrganizationCall(organization, user, _callback); } @@ -301,7 +306,8 @@ private okhttp3.Call addUserToOrganizationValidateBeforeCall(String organization * @param user user to add (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 user added to organization successfully -
502 Bad Gateway -
+
+ @@ -320,7 +326,8 @@ public void addUserToOrganization(String organization, OrganizationUser user) th * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 user added to organization successfully -
502 Bad Gateway -
+
+ @@ -341,7 +348,8 @@ public ApiResponse addUserToOrganizationWithHttpInfo(String organization, * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 user added to organization successfully -
502 Bad Gateway -
+
+ @@ -361,7 +369,8 @@ public okhttp3.Call addUserToOrganizationAsync(String organization, Organization * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 user added to organization successfully -
502 Bad Gateway -
+
+ @@ -386,7 +395,7 @@ public okhttp3.Call checkAWSAccessCredentialsCall(String namespace, final ApiCal // create path and map variables String localVarPath = "/credentials/{namespace}/aws" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -403,28 +412,24 @@ public okhttp3.Call checkAWSAccessCredentialsCall(String namespace, final ApiCal } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call checkAWSAccessCredentialsValidateBeforeCall(String namespace, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling checkAWSAccessCredentials(Async)"); } - - okhttp3.Call localVarCall = checkAWSAccessCredentialsCall(namespace, _callback); - return localVarCall; + return checkAWSAccessCredentialsCall(namespace, _callback); } @@ -435,7 +440,8 @@ private okhttp3.Call checkAWSAccessCredentialsValidateBeforeCall(String namespac * @return List<AWSAccessCredentials> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 AWS keys are set -
502 Bad Gateway -
+
+ @@ -454,7 +460,8 @@ public List checkAWSAccessCredentials(String namespace) th * @return ApiResponse<List<AWSAccessCredentials>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 AWS keys are set -
502 Bad Gateway -
+
+ @@ -475,7 +482,8 @@ public ApiResponse> checkAWSAccessCredentialsWithHttp * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 AWS keys are set -
502 Bad Gateway -
+
+ @@ -497,7 +505,8 @@ public okhttp3.Call checkAWSAccessCredentialsAsync(String namespace, final ApiCa * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 AWS keys are set -
502 Bad Gateway -
+
+ @@ -522,8 +531,8 @@ public okhttp3.Call checkAWSAccessCredentialsByNameCall(String namespace, String // create path and map variables String localVarPath = "/credentials/{namespace}/aws/{name}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -540,33 +549,29 @@ public okhttp3.Call checkAWSAccessCredentialsByNameCall(String namespace, String } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call checkAWSAccessCredentialsByNameValidateBeforeCall(String namespace, String name, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling checkAWSAccessCredentialsByName(Async)"); } - + // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling checkAWSAccessCredentialsByName(Async)"); } - - okhttp3.Call localVarCall = checkAWSAccessCredentialsByNameCall(namespace, name, _callback); - return localVarCall; + return checkAWSAccessCredentialsByNameCall(namespace, name, _callback); } @@ -578,7 +583,8 @@ private okhttp3.Call checkAWSAccessCredentialsByNameValidateBeforeCall(String na * @return AWSAccessCredentials * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 AWS keys are set -
502 Bad Gateway -
+
+ @@ -598,7 +604,8 @@ public AWSAccessCredentials checkAWSAccessCredentialsByName(String namespace, St * @return ApiResponse<AWSAccessCredentials> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 AWS keys are set -
502 Bad Gateway -
+
+ @@ -620,7 +627,8 @@ public ApiResponse checkAWSAccessCredentialsByNameWithHttp * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 AWS keys are set -
502 Bad Gateway -
+
+ @@ -640,7 +648,8 @@ public okhttp3.Call checkAWSAccessCredentialsByNameAsync(String namespace, Strin * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 AWS keys are set -
502 Bad Gateway -
+
+ @@ -681,23 +690,19 @@ public okhttp3.Call confirmEmailCall(final ApiCallback _callback) throws ApiExce } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call confirmEmailValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = confirmEmailCall(_callback); - return localVarCall; + return confirmEmailCall(_callback); } @@ -706,7 +711,8 @@ private okhttp3.Call confirmEmailValidateBeforeCall(final ApiCallback _callback) * confirm user email * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 User email confirmed successfully -
502 Bad Gateway -
+
+ @@ -723,7 +729,8 @@ public void confirmEmail() throws ApiException { * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 User email confirmed successfully -
502 Bad Gateway -
+
+ @@ -742,7 +749,8 @@ public ApiResponse confirmEmailWithHttpInfo() throws ApiException { * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 User email confirmed successfully -
502 Bad Gateway -
+
+ @@ -762,7 +770,8 @@ public okhttp3.Call confirmEmailAsync(final ApiCallback _callback) throws * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 User email confirmed successfully -
502 Bad Gateway -
+
+ @@ -810,21 +819,18 @@ public okhttp3.Call createUserCall(User user, final ApiCallback _callback) throw localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createUserValidateBeforeCall(User user, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'user' is set if (user == null) { throw new ApiException("Missing the required parameter 'user' when calling createUser(Async)"); } - - okhttp3.Call localVarCall = createUserCall(user, _callback); - return localVarCall; + return createUserCall(user, _callback); } @@ -834,7 +840,8 @@ private okhttp3.Call createUserValidateBeforeCall(User user, final ApiCallback _ * @param user user to create (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 user created successfully -
502 Bad Gateway -
+
+ @@ -852,7 +859,8 @@ public void createUser(User user) throws ApiException { * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 user created successfully -
502 Bad Gateway -
+
+ @@ -872,7 +880,8 @@ public ApiResponse createUserWithHttpInfo(User user) throws ApiException { * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 user created successfully -
502 Bad Gateway -
+
+ @@ -893,7 +902,8 @@ public okhttp3.Call createUserAsync(User user, final ApiCallback _callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 user created successfully -
502 Bad Gateway -
+
+ @@ -918,8 +928,8 @@ public okhttp3.Call deleteAWSAccessCredentialsCall(String namespace, String name // create path and map variables String localVarPath = "/credentials/{namespace}/aws/{name}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -936,33 +946,29 @@ public okhttp3.Call deleteAWSAccessCredentialsCall(String namespace, String name } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteAWSAccessCredentialsValidateBeforeCall(String namespace, String name, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling deleteAWSAccessCredentials(Async)"); } - + // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling deleteAWSAccessCredentials(Async)"); } - - okhttp3.Call localVarCall = deleteAWSAccessCredentialsCall(namespace, name, _callback); - return localVarCall; + return deleteAWSAccessCredentialsCall(namespace, name, _callback); } @@ -973,7 +979,8 @@ private okhttp3.Call deleteAWSAccessCredentialsValidateBeforeCall(String namespa * @param name name (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 AWS credentials deleted -
502 Bad Gateway -
+
+ @@ -992,7 +999,8 @@ public void deleteAWSAccessCredentials(String namespace, String name) throws Api * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 AWS credentials deleted -
502 Bad Gateway -
+
+ @@ -1013,7 +1021,8 @@ public ApiResponse deleteAWSAccessCredentialsWithHttpInfo(String namespace * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 AWS credentials deleted -
502 Bad Gateway -
+
+ @@ -1033,7 +1042,8 @@ public okhttp3.Call deleteAWSAccessCredentialsAsync(String namespace, String nam * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 AWS credentials deleted -
502 Bad Gateway -
+
+ @@ -1058,7 +1068,7 @@ public okhttp3.Call deleteUserCall(String username, final ApiCallback _callback) // create path and map variables String localVarPath = "/users/{username}" - .replaceAll("\\{" + "username" + "\\}", localVarApiClient.escapeString(username.toString())); + .replace("{" + "username" + "}", localVarApiClient.escapeString(username.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1075,28 +1085,24 @@ public okhttp3.Call deleteUserCall(String username, final ApiCallback _callback) } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteUserValidateBeforeCall(String username, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'username' is set if (username == null) { throw new ApiException("Missing the required parameter 'username' when calling deleteUser(Async)"); } - - okhttp3.Call localVarCall = deleteUserCall(username, _callback); - return localVarCall; + return deleteUserCall(username, _callback); } @@ -1106,7 +1112,8 @@ private okhttp3.Call deleteUserValidateBeforeCall(String username, final ApiCall * @param username username or ID (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 user deleted -
502 Bad Gateway -
+
+ @@ -1124,7 +1131,8 @@ public void deleteUser(String username) throws ApiException { * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 user deleted -
502 Bad Gateway -
+
+ @@ -1144,7 +1152,8 @@ public ApiResponse deleteUserWithHttpInfo(String username) throws ApiExcep * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 user deleted -
502 Bad Gateway -
+
+ @@ -1165,7 +1174,8 @@ public okhttp3.Call deleteUserAsync(String username, final ApiCallback _ca * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 user deleted -
502 Bad Gateway -
+
+ @@ -1190,8 +1200,8 @@ public okhttp3.Call deleteUserFromOrganizationCall(String organization, String u // create path and map variables String localVarPath = "/organizations/{organization}/{username}" - .replaceAll("\\{" + "organization" + "\\}", localVarApiClient.escapeString(organization.toString())) - .replaceAll("\\{" + "username" + "\\}", localVarApiClient.escapeString(username.toString())); + .replace("{" + "organization" + "}", localVarApiClient.escapeString(organization.toString())) + .replace("{" + "username" + "}", localVarApiClient.escapeString(username.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1208,33 +1218,29 @@ public okhttp3.Call deleteUserFromOrganizationCall(String organization, String u } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteUserFromOrganizationValidateBeforeCall(String organization, String username, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'organization' is set if (organization == null) { throw new ApiException("Missing the required parameter 'organization' when calling deleteUserFromOrganization(Async)"); } - + // verify the required parameter 'username' is set if (username == null) { throw new ApiException("Missing the required parameter 'username' when calling deleteUserFromOrganization(Async)"); } - - okhttp3.Call localVarCall = deleteUserFromOrganizationCall(organization, username, _callback); - return localVarCall; + return deleteUserFromOrganizationCall(organization, username, _callback); } @@ -1245,7 +1251,8 @@ private okhttp3.Call deleteUserFromOrganizationValidateBeforeCall(String organiz * @param username username to manipulate (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 user delete from organization successfully -
502 Bad Gateway -
+
+ @@ -1264,7 +1271,8 @@ public void deleteUserFromOrganization(String organization, String username) thr * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 user delete from organization successfully -
502 Bad Gateway -
+
+ @@ -1285,7 +1293,8 @@ public ApiResponse deleteUserFromOrganizationWithHttpInfo(String organizat * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 user delete from organization successfully -
502 Bad Gateway -
+
+ @@ -1306,7 +1315,8 @@ public okhttp3.Call deleteUserFromOrganizationAsync(String organization, String * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 user delete from organization successfully -
502 Bad Gateway -
+
+ @@ -1332,8 +1342,8 @@ public okhttp3.Call getOrganizationUserCall(String organization, String username // create path and map variables String localVarPath = "/organizations/{organization}/{username}" - .replaceAll("\\{" + "organization" + "\\}", localVarApiClient.escapeString(organization.toString())) - .replaceAll("\\{" + "username" + "\\}", localVarApiClient.escapeString(username.toString())); + .replace("{" + "organization" + "}", localVarApiClient.escapeString(organization.toString())) + .replace("{" + "username" + "}", localVarApiClient.escapeString(username.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1350,33 +1360,29 @@ public okhttp3.Call getOrganizationUserCall(String organization, String username } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getOrganizationUserValidateBeforeCall(String organization, String username, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'organization' is set if (organization == null) { throw new ApiException("Missing the required parameter 'organization' when calling getOrganizationUser(Async)"); } - + // verify the required parameter 'username' is set if (username == null) { throw new ApiException("Missing the required parameter 'username' when calling getOrganizationUser(Async)"); } - - okhttp3.Call localVarCall = getOrganizationUserCall(organization, username, _callback); - return localVarCall; + return getOrganizationUserCall(organization, username, _callback); } @@ -1388,7 +1394,8 @@ private okhttp3.Call getOrganizationUserValidateBeforeCall(String organization, * @return OrganizationUser * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 user from organization -
404 User is not in organization -
+
+ @@ -1409,7 +1416,8 @@ public OrganizationUser getOrganizationUser(String organization, String username * @return ApiResponse<OrganizationUser> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 user from organization -
404 User is not in organization -
+
+ @@ -1432,7 +1440,8 @@ public ApiResponse getOrganizationUserWithHttpInfo(String orga * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 user from organization -
404 User is not in organization -
+
+ @@ -1450,18 +1459,20 @@ public okhttp3.Call getOrganizationUserAsync(String organization, String usernam /** * Build call for getSession * @param rememberMe flag to create a token with expiration of 30 days, default is false (optional) + * @param expires Expiration date for token, if empty token defaults to 30 minutes (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 -
Response Details
Status Code Description Response Headers
200 user from organization -
404 User is not in organization -
+
+
Response Details
Status Code Description Response Headers
200 Session token -
502 Bad Gateway -
0 error response -
*/ - public okhttp3.Call getSessionCall(String rememberMe, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getSessionCall(String rememberMe, OffsetDateTime expires, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1490,6 +1501,10 @@ public okhttp3.Call getSessionCall(String rememberMe, final ApiCallback _callbac localVarQueryParams.addAll(localVarApiClient.parameterToPair("remember_me", rememberMe)); } + if (expires != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("expires", expires)); + } + final String[] localVarAccepts = { "application/json" }; @@ -1499,23 +1514,19 @@ public okhttp3.Call getSessionCall(String rememberMe, final ApiCallback _callbac } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getSessionValidateBeforeCall(String rememberMe, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = getSessionCall(rememberMe, _callback); - return localVarCall; + private okhttp3.Call getSessionValidateBeforeCall(String rememberMe, OffsetDateTime expires, final ApiCallback _callback) throws ApiException { + return getSessionCall(rememberMe, expires, _callback); } @@ -1523,18 +1534,20 @@ private okhttp3.Call getSessionValidateBeforeCall(String rememberMe, final ApiCa * * Get session token for user * @param rememberMe flag to create a token with expiration of 30 days, default is false (optional) + * @param expires Expiration date for token, if empty token defaults to 30 minutes (optional) * @return Token * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 Session token -
502 Bad Gateway -
0 error response -
*/ - public Token getSession(String rememberMe) throws ApiException { - ApiResponse localVarResp = getSessionWithHttpInfo(rememberMe); + public Token getSession(String rememberMe, OffsetDateTime expires) throws ApiException { + ApiResponse localVarResp = getSessionWithHttpInfo(rememberMe, expires); return localVarResp.getData(); } @@ -1542,18 +1555,20 @@ public Token getSession(String rememberMe) throws ApiException { * * Get session token for user * @param rememberMe flag to create a token with expiration of 30 days, default is false (optional) + * @param expires Expiration date for token, if empty token defaults to 30 minutes (optional) * @return ApiResponse<Token> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 Session token -
502 Bad Gateway -
0 error response -
*/ - public ApiResponse getSessionWithHttpInfo(String rememberMe) throws ApiException { - okhttp3.Call localVarCall = getSessionValidateBeforeCall(rememberMe, null); + public ApiResponse getSessionWithHttpInfo(String rememberMe, OffsetDateTime expires) throws ApiException { + okhttp3.Call localVarCall = getSessionValidateBeforeCall(rememberMe, expires, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -1562,20 +1577,22 @@ public ApiResponse getSessionWithHttpInfo(String rememberMe) throws ApiEx * (asynchronously) * Get session token for user * @param rememberMe flag to create a token with expiration of 30 days, default is false (optional) + * @param expires Expiration date for token, if empty token defaults to 30 minutes (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 - +
+
Response Details
Status Code Description Response Headers
200 Session token -
502 Bad Gateway -
0 error response -
*/ - public okhttp3.Call getSessionAsync(String rememberMe, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getSessionAsync(String rememberMe, OffsetDateTime expires, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getSessionValidateBeforeCall(rememberMe, _callback); + okhttp3.Call localVarCall = getSessionValidateBeforeCall(rememberMe, expires, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -1586,7 +1603,8 @@ public okhttp3.Call getSessionAsync(String rememberMe, final ApiCallback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -1627,23 +1645,19 @@ public okhttp3.Call getTokenScopesCall(final ApiCallback _callback) throws ApiEx } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getTokenScopesValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = getTokenScopesCall(_callback); - return localVarCall; + return getTokenScopesCall(_callback); } @@ -1653,7 +1667,8 @@ private okhttp3.Call getTokenScopesValidateBeforeCall(final ApiCallback _callbac * @return List<TokenScope> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 available token scopes -
502 Bad Gateway -
+
+ @@ -1671,7 +1686,8 @@ public List getTokenScopes() throws ApiException { * @return ApiResponse<List<TokenScope>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 available token scopes -
502 Bad Gateway -
+
+ @@ -1691,7 +1707,8 @@ public ApiResponse> getTokenScopesWithHttpInfo() throws ApiExce * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 available token scopes -
502 Bad Gateway -
+
+ @@ -1711,7 +1728,8 @@ public okhttp3.Call getTokenScopesAsync(final ApiCallback> _cal * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 available token scopes -
502 Bad Gateway -
+
+ @@ -1752,23 +1770,19 @@ public okhttp3.Call getUserCall(final ApiCallback _callback) throws ApiException } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getUserValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = getUserCall(_callback); - return localVarCall; + return getUserCall(_callback); } @@ -1778,7 +1792,8 @@ private okhttp3.Call getUserValidateBeforeCall(final ApiCallback _callback) thro * @return User * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 user details -
502 Bad Gateway -
+
+ @@ -1796,7 +1811,8 @@ public User getUser() throws ApiException { * @return ApiResponse<User> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 user details -
502 Bad Gateway -
+
+ @@ -1816,7 +1832,8 @@ public ApiResponse getUserWithHttpInfo() throws ApiException { * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 user details -
502 Bad Gateway -
+
+ @@ -1837,7 +1854,8 @@ public okhttp3.Call getUserAsync(final ApiCallback _callback) throws ApiEx * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 user details -
502 Bad Gateway -
+
+ @@ -1863,7 +1881,7 @@ public okhttp3.Call getUserWithUsernameCall(String username, final ApiCallback _ // create path and map variables String localVarPath = "/users/{username}" - .replaceAll("\\{" + "username" + "\\}", localVarApiClient.escapeString(username.toString())); + .replace("{" + "username" + "}", localVarApiClient.escapeString(username.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1880,28 +1898,24 @@ public okhttp3.Call getUserWithUsernameCall(String username, final ApiCallback _ } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getUserWithUsernameValidateBeforeCall(String username, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'username' is set if (username == null) { throw new ApiException("Missing the required parameter 'username' when calling getUserWithUsername(Async)"); } - - okhttp3.Call localVarCall = getUserWithUsernameCall(username, _callback); - return localVarCall; + return getUserWithUsernameCall(username, _callback); } @@ -1912,7 +1926,8 @@ private okhttp3.Call getUserWithUsernameValidateBeforeCall(String username, fina * @return User * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 user details -
404 User does not exist -
+
+ @@ -1932,7 +1947,8 @@ public User getUserWithUsername(String username) throws ApiException { * @return ApiResponse<User> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 user details -
404 User does not exist -
+
+ @@ -1954,7 +1970,8 @@ public ApiResponse getUserWithUsernameWithHttpInfo(String username) throws * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 user details -
404 User does not exist -
+
+ @@ -1976,7 +1993,8 @@ public okhttp3.Call getUserWithUsernameAsync(String username, final ApiCallback< * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 user details -
404 User does not exist -
+
+ @@ -2024,16 +2042,13 @@ public okhttp3.Call requestTokenCall(TokenRequest tokenRequest, final ApiCallbac localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call requestTokenValidateBeforeCall(TokenRequest tokenRequest, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = requestTokenCall(tokenRequest, _callback); - return localVarCall; + return requestTokenCall(tokenRequest, _callback); } @@ -2044,7 +2059,8 @@ private okhttp3.Call requestTokenValidateBeforeCall(TokenRequest tokenRequest, f * @return Token * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 token -
502 Bad Gateway -
+
+ @@ -2063,7 +2079,8 @@ public Token requestToken(TokenRequest tokenRequest) throws ApiException { * @return ApiResponse<Token> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 token -
502 Bad Gateway -
+
+ @@ -2084,7 +2101,8 @@ public ApiResponse requestTokenWithHttpInfo(TokenRequest tokenRequest) th * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 token -
502 Bad Gateway -
+
+ @@ -2105,7 +2123,8 @@ public okhttp3.Call requestTokenAsync(TokenRequest tokenRequest, final ApiCallba * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 token -
502 Bad Gateway -
+
+ @@ -2154,21 +2173,18 @@ public okhttp3.Call resetUserPasswordCall(ResetUserPasswordRequest user, final A localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call resetUserPasswordValidateBeforeCall(ResetUserPasswordRequest user, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'user' is set if (user == null) { throw new ApiException("Missing the required parameter 'user' when calling resetUserPassword(Async)"); } - - okhttp3.Call localVarCall = resetUserPasswordCall(user, _callback); - return localVarCall; + return resetUserPasswordCall(user, _callback); } @@ -2178,7 +2194,8 @@ private okhttp3.Call resetUserPasswordValidateBeforeCall(ResetUserPasswordReques * @param user password to update for user requesting update (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 User password updated successfully -
404 User not found -
+
+ @@ -2197,7 +2214,8 @@ public void resetUserPassword(ResetUserPasswordRequest user) throws ApiException * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 User password updated successfully -
404 User not found -
+
+ @@ -2218,7 +2236,8 @@ public ApiResponse resetUserPasswordWithHttpInfo(ResetUserPasswordRequest * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 User password updated successfully -
404 User not found -
+
+ @@ -2239,7 +2258,8 @@ public okhttp3.Call resetUserPasswordAsync(ResetUserPasswordRequest user, final * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 User password updated successfully -
404 User not found -
+
+ @@ -2264,7 +2284,7 @@ public okhttp3.Call revokeTokenCall(String token, final ApiCallback _callback) t // create path and map variables String localVarPath = "/tokens/{token}" - .replaceAll("\\{" + "token" + "\\}", localVarApiClient.escapeString(token.toString())); + .replace("{" + "token" + "}", localVarApiClient.escapeString(token.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2281,28 +2301,24 @@ public okhttp3.Call revokeTokenCall(String token, final ApiCallback _callback) t } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call revokeTokenValidateBeforeCall(String token, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'token' is set if (token == null) { throw new ApiException("Missing the required parameter 'token' when calling revokeToken(Async)"); } - - okhttp3.Call localVarCall = revokeTokenCall(token, _callback); - return localVarCall; + return revokeTokenCall(token, _callback); } @@ -2312,7 +2328,8 @@ private okhttp3.Call revokeTokenValidateBeforeCall(String token, final ApiCallba * @param token token name or token itself (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 revokation successfully -
502 Bad Gateway -
+
+ @@ -2330,7 +2347,8 @@ public void revokeToken(String token) throws ApiException { * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 revokation successfully -
502 Bad Gateway -
+
+ @@ -2350,7 +2368,8 @@ public ApiResponse revokeTokenWithHttpInfo(String token) throws ApiExcepti * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 revokation successfully -
502 Bad Gateway -
+
+ @@ -2369,7 +2388,8 @@ public okhttp3.Call revokeTokenAsync(String token, final ApiCallback _call * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 revokation successfully -
502 Bad Gateway -
+
+ @@ -2410,23 +2430,19 @@ public okhttp3.Call tokensGetCall(final ApiCallback _callback) throws ApiExcepti } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call tokensGetValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = tokensGetCall(_callback); - return localVarCall; + return tokensGetCall(_callback); } @@ -2436,7 +2452,8 @@ private okhttp3.Call tokensGetValidateBeforeCall(final ApiCallback _callback) th * @return List<Token> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Array of user created non-session tokens -
502 Bad Gateway -
+
+ @@ -2454,7 +2471,8 @@ public List tokensGet() throws ApiException { * @return ApiResponse<List<Token>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Array of user created non-session tokens -
502 Bad Gateway -
+
+ @@ -2474,7 +2492,8 @@ public ApiResponse> tokensGetWithHttpInfo() throws ApiException { * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Array of user created non-session tokens -
502 Bad Gateway -
+
+ @@ -2494,7 +2513,8 @@ public okhttp3.Call tokensGetAsync(final ApiCallback> _callback) thr * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Array of user created non-session tokens -
502 Bad Gateway -
+
+ @@ -2535,23 +2555,19 @@ public okhttp3.Call tokensSessionGetCall(final ApiCallback _callback) throws Api } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call tokensSessionGetValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = tokensSessionGetCall(_callback); - return localVarCall; + return tokensSessionGetCall(_callback); } @@ -2561,7 +2577,8 @@ private okhttp3.Call tokensSessionGetValidateBeforeCall(final ApiCallback _callb * @return List<Token> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Array of user created session tokens -
502 Bad Gateway -
+
+ @@ -2579,7 +2596,8 @@ public List tokensSessionGet() throws ApiException { * @return ApiResponse<List<Token>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Array of user created session tokens -
502 Bad Gateway -
+
+ @@ -2599,7 +2617,8 @@ public ApiResponse> tokensSessionGetWithHttpInfo() throws ApiExcepti * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Array of user created session tokens -
502 Bad Gateway -
+
+ @@ -2622,7 +2641,8 @@ public okhttp3.Call tokensSessionGetAsync(final ApiCallback> _callba * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 Array of user created session tokens -
502 Bad Gateway -
+
+ @@ -2647,8 +2667,8 @@ public okhttp3.Call updateAWSAccessCredentialsCall(String namespace, String name // create path and map variables String localVarPath = "/credentials/{namespace}/aws/{name}" - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) - .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + .replace("{" + "namespace" + "}", localVarApiClient.escapeString(namespace.toString())) + .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2672,31 +2692,28 @@ public okhttp3.Call updateAWSAccessCredentialsCall(String namespace, String name localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateAWSAccessCredentialsValidateBeforeCall(String namespace, String name, AWSAccessCredentials awsAccessCredentials, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'namespace' is set if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling updateAWSAccessCredentials(Async)"); } - + // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling updateAWSAccessCredentials(Async)"); } - + // verify the required parameter 'awsAccessCredentials' is set if (awsAccessCredentials == null) { throw new ApiException("Missing the required parameter 'awsAccessCredentials' when calling updateAWSAccessCredentials(Async)"); } - - okhttp3.Call localVarCall = updateAWSAccessCredentialsCall(namespace, name, awsAccessCredentials, _callback); - return localVarCall; + return updateAWSAccessCredentialsCall(namespace, name, awsAccessCredentials, _callback); } @@ -2708,7 +2725,8 @@ private okhttp3.Call updateAWSAccessCredentialsValidateBeforeCall(String namespa * @param awsAccessCredentials aws credentials to update (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 AWS keys updated successfully -
502 Bad Gateway -
+
+ @@ -2728,7 +2746,8 @@ public void updateAWSAccessCredentials(String namespace, String name, AWSAccessC * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 AWS keys updated successfully -
502 Bad Gateway -
+
+ @@ -2750,7 +2769,8 @@ public ApiResponse updateAWSAccessCredentialsWithHttpInfo(String namespace * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 AWS keys updated successfully -
502 Bad Gateway -
+
+ @@ -2771,7 +2791,8 @@ public okhttp3.Call updateAWSAccessCredentialsAsync(String namespace, String nam * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 AWS keys updated successfully -
502 Bad Gateway -
+
+ @@ -2796,7 +2817,7 @@ public okhttp3.Call updateUserCall(String username, User user, final ApiCallback // create path and map variables String localVarPath = "/users/{username}" - .replaceAll("\\{" + "username" + "\\}", localVarApiClient.escapeString(username.toString())); + .replace("{" + "username" + "}", localVarApiClient.escapeString(username.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2820,26 +2841,23 @@ public okhttp3.Call updateUserCall(String username, User user, final ApiCallback localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateUserValidateBeforeCall(String username, User user, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'username' is set if (username == null) { throw new ApiException("Missing the required parameter 'username' when calling updateUser(Async)"); } - + // verify the required parameter 'user' is set if (user == null) { throw new ApiException("Missing the required parameter 'user' when calling updateUser(Async)"); } - - okhttp3.Call localVarCall = updateUserCall(username, user, _callback); - return localVarCall; + return updateUserCall(username, user, _callback); } @@ -2850,7 +2868,8 @@ private okhttp3.Call updateUserValidateBeforeCall(String username, User user, fi * @param user user details to update (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 user updated successfully -
502 Bad Gateway -
+
+ @@ -2869,7 +2888,8 @@ public void updateUser(String username, User user) throws ApiException { * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 user updated successfully -
502 Bad Gateway -
+
+ @@ -2890,7 +2910,8 @@ public ApiResponse updateUserWithHttpInfo(String username, User user) thro * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 user updated successfully -
502 Bad Gateway -
+
+ @@ -2912,7 +2933,8 @@ public okhttp3.Call updateUserAsync(String username, User user, final ApiCallbac * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 user updated successfully -
502 Bad Gateway -
+
+ @@ -2937,8 +2959,8 @@ public okhttp3.Call updateUserInOrganizationCall(String organization, String use // create path and map variables String localVarPath = "/organizations/{organization}/{username}" - .replaceAll("\\{" + "organization" + "\\}", localVarApiClient.escapeString(organization.toString())) - .replaceAll("\\{" + "username" + "\\}", localVarApiClient.escapeString(username.toString())); + .replace("{" + "organization" + "}", localVarApiClient.escapeString(organization.toString())) + .replace("{" + "username" + "}", localVarApiClient.escapeString(username.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2962,31 +2984,28 @@ public okhttp3.Call updateUserInOrganizationCall(String organization, String use localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + String[] localVarAuthNames = new String[] { "BasicAuth", "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateUserInOrganizationValidateBeforeCall(String organization, String username, OrganizationUser user, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'organization' is set if (organization == null) { throw new ApiException("Missing the required parameter 'organization' when calling updateUserInOrganization(Async)"); } - + // verify the required parameter 'username' is set if (username == null) { throw new ApiException("Missing the required parameter 'username' when calling updateUserInOrganization(Async)"); } - + // verify the required parameter 'user' is set if (user == null) { throw new ApiException("Missing the required parameter 'user' when calling updateUserInOrganization(Async)"); } - - okhttp3.Call localVarCall = updateUserInOrganizationCall(organization, username, user, _callback); - return localVarCall; + return updateUserInOrganizationCall(organization, username, user, _callback); } @@ -2998,7 +3017,8 @@ private okhttp3.Call updateUserInOrganizationValidateBeforeCall(String organizat * @param user user details to update (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 user update in organization successfully -
502 Bad Gateway -
+
+ @@ -3018,7 +3038,8 @@ public void updateUserInOrganization(String organization, String username, Organ * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
204 user update in organization successfully -
502 Bad Gateway -
+
+ @@ -3040,7 +3061,8 @@ public ApiResponse updateUserInOrganizationWithHttpInfo(String organizatio * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
204 user update in organization successfully -
502 Bad Gateway -
+
+ diff --git a/src/main/java/io/tiledb/cloud/rest_api/auth/ApiKeyAuth.java b/src/main/java/io/tiledb/cloud/rest_api/auth/ApiKeyAuth.java index 0b12fd9..468249f 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/auth/ApiKeyAuth.java +++ b/src/main/java/io/tiledb/cloud/rest_api/auth/ApiKeyAuth.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,16 +11,16 @@ */ -package io.tiledb.cloud.rest_api.auth; +package org.openapitools.client.auth; -import io.tiledb.cloud.rest_api.ApiException; -import io.tiledb.cloud.rest_api.Pair; +import org.openapitools.client.ApiException; +import org.openapitools.client.Pair; import java.net.URI; import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/io/tiledb/cloud/rest_api/auth/Authentication.java b/src/main/java/io/tiledb/cloud/rest_api/auth/Authentication.java index f7face9..5672e5f 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/auth/Authentication.java +++ b/src/main/java/io/tiledb/cloud/rest_api/auth/Authentication.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,10 @@ */ -package io.tiledb.cloud.rest_api.auth; +package org.openapitools.client.auth; -import io.tiledb.cloud.rest_api.Pair; -import io.tiledb.cloud.rest_api.ApiException; +import org.openapitools.client.Pair; +import org.openapitools.client.ApiException; import java.net.URI; import java.util.Map; diff --git a/src/main/java/io/tiledb/cloud/rest_api/auth/HttpBasicAuth.java b/src/main/java/io/tiledb/cloud/rest_api/auth/HttpBasicAuth.java index fdf71ec..ddce31c 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/auth/HttpBasicAuth.java +++ b/src/main/java/io/tiledb/cloud/rest_api/auth/HttpBasicAuth.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,10 @@ */ -package io.tiledb.cloud.rest_api.auth; +package org.openapitools.client.auth; -import io.tiledb.cloud.rest_api.Pair; -import io.tiledb.cloud.rest_api.ApiException; +import org.openapitools.client.Pair; +import org.openapitools.client.ApiException; import okhttp3.Credentials; diff --git a/src/main/java/io/tiledb/cloud/rest_api/auth/HttpBearerAuth.java b/src/main/java/io/tiledb/cloud/rest_api/auth/HttpBearerAuth.java index 5e79465..2dd6664 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/auth/HttpBearerAuth.java +++ b/src/main/java/io/tiledb/cloud/rest_api/auth/HttpBearerAuth.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,19 +11,21 @@ */ -package io.tiledb.cloud.rest_api.auth; +package org.openapitools.client.auth; -import io.tiledb.cloud.rest_api.ApiException; -import io.tiledb.cloud.rest_api.Pair; +import org.openapitools.client.ApiException; +import org.openapitools.client.Pair; import java.net.URI; -import java.util.Map; 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 = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class HttpBearerAuth implements Authentication { private final String scheme; - private String bearerToken; + private Supplier tokenSupplier; public HttpBearerAuth(String scheme) { this.scheme = scheme; @@ -35,7 +37,7 @@ public HttpBearerAuth(String scheme) { * @return The bearer token */ public String getBearerToken() { - return bearerToken; + return tokenSupplier.get(); } /** @@ -44,12 +46,22 @@ public String getBearerToken() { * @param bearerToken The bearer token to send in the Authorization header */ public void setBearerToken(String bearerToken) { - this.bearerToken = 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; } diff --git a/src/main/java/io/tiledb/cloud/rest_api/auth/OAuth.java b/src/main/java/io/tiledb/cloud/rest_api/auth/OAuth.java index 8869cab..446a8df 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/auth/OAuth.java +++ b/src/main/java/io/tiledb/cloud/rest_api/auth/OAuth.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,16 +11,16 @@ */ -package io.tiledb.cloud.rest_api.auth; +package org.openapitools.client.auth; -import io.tiledb.cloud.rest_api.Pair; -import io.tiledb.cloud.rest_api.ApiException; +import org.openapitools.client.Pair; +import org.openapitools.client.ApiException; import java.net.URI; import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class OAuth implements Authentication { private String accessToken; diff --git a/src/main/java/io/tiledb/cloud/rest_api/auth/OAuthFlow.java b/src/main/java/io/tiledb/cloud/rest_api/auth/OAuthFlow.java index 85a361f..d9c661f 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/auth/OAuthFlow.java +++ b/src/main/java/io/tiledb/cloud/rest_api/auth/OAuthFlow.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package io.tiledb.cloud.rest_api.auth; +package org.openapitools.client.auth; /** * OAuth flows that are supported by this client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public enum OAuthFlow { ACCESS_CODE, //called authorizationCode in OpenAPI 3.0 IMPLICIT, diff --git a/src/main/java/io/tiledb/cloud/rest_api/auth/OAuthOkHttpClient.java b/src/main/java/io/tiledb/cloud/rest_api/auth/OAuthOkHttpClient.java index d50d3bc..b00ffab 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/auth/OAuthOkHttpClient.java +++ b/src/main/java/io/tiledb/cloud/rest_api/auth/OAuthOkHttpClient.java @@ -1,4 +1,17 @@ -package io.tiledb.cloud.rest_api.auth; +/* + * TileDB Storage Platform API + * TileDB Storage Platform REST API + * + * The version of the OpenAPI document: 2.17.51 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.auth; import okhttp3.OkHttpClient; import okhttp3.MediaType; @@ -55,6 +68,7 @@ public T execute(OAuthClientRequest request, Map response.body().string(), response.body().contentType().toString(), response.code(), + response.headers().toMultimap(), responseClass); } catch (IOException e) { throw new OAuthSystemException(e); diff --git a/src/main/java/io/tiledb/cloud/rest_api/auth/RetryingOAuth.java b/src/main/java/io/tiledb/cloud/rest_api/auth/RetryingOAuth.java index acfd332..1cc5ea2 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/auth/RetryingOAuth.java +++ b/src/main/java/io/tiledb/cloud/rest_api/auth/RetryingOAuth.java @@ -1,7 +1,20 @@ -package io.tiledb.cloud.rest_api.auth; +/* + * TileDB Storage Platform API + * TileDB Storage Platform REST API + * + * The version of the OpenAPI document: 2.17.51 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ -import io.tiledb.cloud.rest_api.ApiException; -import io.tiledb.cloud.rest_api.Pair; + +package org.openapitools.client.auth; + +import org.openapitools.client.ApiException; +import org.openapitools.client.Pair; import okhttp3.Interceptor; import okhttp3.OkHttpClient; @@ -65,8 +78,8 @@ public RetryingOAuth( .setClientSecret(clientSecret)); setFlow(flow); if (parameters != null) { - for (String paramName : parameters.keySet()) { - tokenRequestBuilder.setParameter(paramName, parameters.get(paramName)); + for (Map.Entry entry : parameters.entrySet()) { + tokenRequestBuilder.setParameter(entry.getKey(), entry.getValue()); } } } @@ -129,8 +142,8 @@ private Response retryingIntercept(Chain chain, boolean updateTokenAndRetryOnAut } Map headers = oAuthRequest.getHeaders(); - for (String headerName : headers.keySet()) { - requestBuilder.addHeader(headerName, headers.get(headerName)); + for (Map.Entry entry : headers.entrySet()) { + requestBuilder.addHeader(entry.getKey(), entry.getValue()); } requestBuilder.url(oAuthRequest.getLocationUri()); diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/AWSAccessCredentials.java b/src/main/java/io/tiledb/cloud/rest_api/model/AWSAccessCredentials.java index cfdb7a4..f12ded4 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/AWSAccessCredentials.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/AWSAccessCredentials.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,76 +11,91 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Model representing aws keys or service role, service roles are currently ignored, but will be preferred option in the future */ -@ApiModel(description = "Model representing aws keys or service role, service roles are currently ignored, but will be preferred option in the future") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class AWSAccessCredentials { public static final String SERIALIZED_NAME_SECRET_ACCESS_KEY = "secret_access_key"; @SerializedName(SERIALIZED_NAME_SECRET_ACCESS_KEY) + @javax.annotation.Nullable private String secretAccessKey; public static final String SERIALIZED_NAME_ACCESS_KEY_ID = "access_key_id"; @SerializedName(SERIALIZED_NAME_ACCESS_KEY_ID) + @javax.annotation.Nullable private String accessKeyId; public static final String SERIALIZED_NAME_SERVICE_ROLE_ARN = "service_role_arn"; @SerializedName(SERIALIZED_NAME_SERVICE_ROLE_ARN) + @javax.annotation.Nullable private String serviceRoleArn; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_DEFAULT = "default"; @SerializedName(SERIALIZED_NAME_DEFAULT) + @javax.annotation.Nullable private Boolean _default; public static final String SERIALIZED_NAME_BUCKETS = "buckets"; @SerializedName(SERIALIZED_NAME_BUCKETS) - private List buckets = null; + @javax.annotation.Nullable + private List buckets = new ArrayList<>(); public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; public AWSAccessCredentials() { } - public AWSAccessCredentials( OffsetDateTime createdAt, OffsetDateTime updatedAt @@ -90,123 +105,102 @@ public AWSAccessCredentials( this.updatedAt = updatedAt; } - public AWSAccessCredentials secretAccessKey(String secretAccessKey) { - + public AWSAccessCredentials secretAccessKey(@javax.annotation.Nullable String secretAccessKey) { this.secretAccessKey = secretAccessKey; return this; } - /** + /** * aws secret access key, never returned in get requests * @return secretAccessKey - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "aws secret access key, never returned in get requests") - public String getSecretAccessKey() { return secretAccessKey; } - - public void setSecretAccessKey(String secretAccessKey) { + public void setSecretAccessKey(@javax.annotation.Nullable String secretAccessKey) { this.secretAccessKey = secretAccessKey; } - public AWSAccessCredentials accessKeyId(String accessKeyId) { - + public AWSAccessCredentials accessKeyId(@javax.annotation.Nullable String accessKeyId) { this.accessKeyId = accessKeyId; return this; } - /** + /** * aws access key * @return accessKeyId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "aws access key") - public String getAccessKeyId() { return accessKeyId; } - - public void setAccessKeyId(String accessKeyId) { + public void setAccessKeyId(@javax.annotation.Nullable String accessKeyId) { this.accessKeyId = accessKeyId; } - public AWSAccessCredentials serviceRoleArn(String serviceRoleArn) { - + public AWSAccessCredentials serviceRoleArn(@javax.annotation.Nullable String serviceRoleArn) { this.serviceRoleArn = serviceRoleArn; return this; } - /** + /** * aws service role to use for access * @return serviceRoleArn - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "aws service role to use for access") - public String getServiceRoleArn() { return serviceRoleArn; } - - public void setServiceRoleArn(String serviceRoleArn) { + public void setServiceRoleArn(@javax.annotation.Nullable String serviceRoleArn) { this.serviceRoleArn = serviceRoleArn; } - public AWSAccessCredentials name(String name) { - + public AWSAccessCredentials name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * human readable name * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "human readable name") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public AWSAccessCredentials _default(Boolean _default) { - + public AWSAccessCredentials _default(@javax.annotation.Nullable Boolean _default) { this._default = _default; return this; } - /** + /** * true if this is the default credential to be used within this namespace * @return _default - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "true if this is the default credential to be used within this namespace") - public Boolean getDefault() { return _default; } - - public void setDefault(Boolean _default) { + public void setDefault(@javax.annotation.Nullable Boolean _default) { this._default = _default; } - public AWSAccessCredentials buckets(List buckets) { - + public AWSAccessCredentials buckets(@javax.annotation.Nullable List buckets) { this.buckets = buckets; return this; } @@ -219,86 +213,42 @@ public AWSAccessCredentials addBucketsItem(String bucketsItem) { return this; } - /** + /** * a whitelist of one or more buckets this key should access * @return buckets - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "a whitelist of one or more buckets this key should access") - public List getBuckets() { return buckets; } - - public void setBuckets(List buckets) { + public void setBuckets(@javax.annotation.Nullable List buckets) { this.buckets = buckets; } - /** + /** * Time when UDF dependencies were created (rfc3339) * @return createdAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Time when UDF dependencies were created (rfc3339)") - public OffsetDateTime getCreatedAt() { return createdAt; } - - /** + /** * Time when UDF dependencies was last updated (rfc3339) * @return updatedAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Time when UDF dependencies was last updated (rfc3339)") - public OffsetDateTime getUpdatedAt() { return updatedAt; } - /** - * 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. - */ - public AWSAccessCredentials 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - @Override public boolean equals(Object o) { @@ -316,13 +266,12 @@ public boolean equals(Object o) { Objects.equals(this._default, awSAccessCredentials._default) && Objects.equals(this.buckets, awSAccessCredentials.buckets) && Objects.equals(this.createdAt, awSAccessCredentials.createdAt) && - Objects.equals(this.updatedAt, awSAccessCredentials.updatedAt)&& - Objects.equals(this.additionalProperties, awSAccessCredentials.additionalProperties); + Objects.equals(this.updatedAt, awSAccessCredentials.updatedAt); } @Override public int hashCode() { - return Objects.hash(secretAccessKey, accessKeyId, serviceRoleArn, name, _default, buckets, createdAt, updatedAt, additionalProperties); + return Objects.hash(secretAccessKey, accessKeyId, serviceRoleArn, name, _default, buckets, createdAt, updatedAt); } @Override @@ -337,7 +286,6 @@ public String toString() { sb.append(" buckets: ").append(toIndentedString(buckets)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -373,20 +321,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AWSAccessCredentials - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (AWSAccessCredentials.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 AWSAccessCredentials + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AWSAccessCredentials.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in AWSAccessCredentials is not found in the empty JSON string", AWSAccessCredentials.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AWSAccessCredentials.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AWSAccessCredentials` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("secret_access_key") != null && !jsonObj.get("secret_access_key").isJsonNull()) && !jsonObj.get("secret_access_key").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `secret_access_key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secret_access_key").toString())); } @@ -399,8 +354,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !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())); } - // ensure the json data is an array - if ((jsonObj.get("buckets") != null && !jsonObj.get("buckets").isJsonNull()) && !jsonObj.get("buckets").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("buckets") != null && !jsonObj.get("buckets").isJsonNull() && !jsonObj.get("buckets").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `buckets` to be an array in the JSON string but got `%s`", jsonObj.get("buckets").toString())); } } @@ -420,71 +375,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, AWSAccessCredentials value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 AWSAccessCredentials read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - AWSAccessCredentials 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of AWSAccessCredentials given an JSON string - * - * @param jsonString JSON string - * @return An instance of AWSAccessCredentials - * @throws IOException if the JSON string is invalid with respect to AWSAccessCredentials - */ + /** + * Create an instance of AWSAccessCredentials given an JSON string + * + * @param jsonString JSON string + * @return An instance of AWSAccessCredentials + * @throws IOException if the JSON string is invalid with respect to AWSAccessCredentials + */ public static AWSAccessCredentials fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, AWSAccessCredentials.class); } - /** - * Convert an instance of AWSAccessCredentials to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of AWSAccessCredentials to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/AbstractOpenApiSchema.java b/src/main/java/io/tiledb/cloud/rest_api/model/AbstractOpenApiSchema.java index 8b19a5f..e3b42f0 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/AbstractOpenApiSchema.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/AbstractOpenApiSchema.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,18 +11,17 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; +import org.openapitools.client.ApiException; import java.util.Objects; +import java.lang.reflect.Type; import java.util.Map; -import javax.ws.rs.core.GenericType; - -//import com.fasterxml.jackson.annotation.JsonValue; /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object @@ -44,7 +43,7 @@ public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { * * @return an instance of the actual schema/object */ - public abstract Map getSchemas(); + public abstract Map> getSchemas(); /** * Get the actual instance diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/ActivityEventType.java b/src/main/java/io/tiledb/cloud/rest_api/model/ActivityEventType.java index d860b37..2a38361 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/ActivityEventType.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/ActivityEventType.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -53,7 +57,9 @@ public enum ActivityEventType { ESTIMATED_RESULT_SIZES("estimated_result_sizes"), - READ_FRAGMENT_INFO("read_fragment_info"); + READ_FRAGMENT_INFO("read_fragment_info"), + + READ_ENUMERATIONS("read_enumerations"); private String value; @@ -91,5 +97,10 @@ public ActivityEventType read(final JsonReader jsonReader) throws IOException { return ActivityEventType.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ActivityEventType.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/Array.java b/src/main/java/io/tiledb/cloud/rest_api/model/Array.java index e6d1bc6..e0d13b9 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/Array.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/Array.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,155 +11,121 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; +import java.util.Arrays; +import org.openapitools.client.model.Querytype; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Represents an open array */ -@ApiModel(description = "Represents an open array") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class Array { public static final String SERIALIZED_NAME_TIMESTAMP = "timestamp"; @SerializedName(SERIALIZED_NAME_TIMESTAMP) + @javax.annotation.Nonnull private BigDecimal timestamp; public static final String SERIALIZED_NAME_QUERY_TYPE = "queryType"; @SerializedName(SERIALIZED_NAME_QUERY_TYPE) + @javax.annotation.Nonnull private Querytype queryType; public static final String SERIALIZED_NAME_URI = "uri"; @SerializedName(SERIALIZED_NAME_URI) + @javax.annotation.Nonnull private String uri; public Array() { } - public Array timestamp(BigDecimal timestamp) { - + public Array timestamp(@javax.annotation.Nonnull BigDecimal timestamp) { this.timestamp = timestamp; return this; } - /** + /** * timestamp (epoch milliseconds) array is opened at * @return timestamp - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "1540471791873", required = true, value = "timestamp (epoch milliseconds) array is opened at") - public BigDecimal getTimestamp() { return timestamp; } - - public void setTimestamp(BigDecimal timestamp) { + public void setTimestamp(@javax.annotation.Nonnull BigDecimal timestamp) { this.timestamp = timestamp; } - public Array queryType(Querytype queryType) { - + public Array queryType(@javax.annotation.Nonnull Querytype queryType) { this.queryType = queryType; return this; } - /** + /** * Get queryType * @return queryType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Querytype getQueryType() { return queryType; } - - public void setQueryType(Querytype queryType) { + public void setQueryType(@javax.annotation.Nonnull Querytype queryType) { this.queryType = queryType; } - public Array uri(String uri) { - + public Array uri(@javax.annotation.Nonnull String uri) { this.uri = uri; return this; } - /** + /** * Array uri * @return uri - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Array uri") - public String getUri() { return uri; } - - public void setUri(String uri) { + public void setUri(@javax.annotation.Nonnull String uri) { this.uri = uri; } - /** - * 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. - */ - public Array 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -173,13 +139,12 @@ public boolean equals(Object o) { Array array = (Array) o; return Objects.equals(this.timestamp, array.timestamp) && Objects.equals(this.queryType, array.queryType) && - Objects.equals(this.uri, array.uri)&& - Objects.equals(this.additionalProperties, array.additionalProperties); + Objects.equals(this.uri, array.uri); } @Override public int hashCode() { - return Objects.hash(timestamp, queryType, uri, additionalProperties); + return Objects.hash(timestamp, queryType, uri); } @Override @@ -189,7 +154,6 @@ public String toString() { sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); sb.append(" queryType: ").append(toIndentedString(queryType)).append("\n"); sb.append(" uri: ").append(toIndentedString(uri)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -223,28 +187,37 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("uri"); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Array - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (Array.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 Array + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Array.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in Array is not found in the empty JSON string", Array.openapiRequiredFields.toString())); } } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Array.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Array` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Array.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + 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())); } } - if ((jsonObj.get("uri") != null && !jsonObj.get("uri").isJsonNull()) && !jsonObj.get("uri").isJsonPrimitive()) { + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `queryType` + Querytype.validateJsonElement(jsonObj.get("queryType")); + if (!jsonObj.get("uri").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `uri` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uri").toString())); } } @@ -264,71 +237,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, Array value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 Array read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - Array 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Array given an JSON string - * - * @param jsonString JSON string - * @return An instance of Array - * @throws IOException if the JSON string is invalid with respect to Array - */ + /** + * Create an instance of Array given an JSON string + * + * @param jsonString JSON string + * @return An instance of Array + * @throws IOException if the JSON string is invalid with respect to Array + */ public static Array fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Array.class); } - /** - * Convert an instance of Array to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Array to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayActions.java b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayActions.java index e940b20..0fefb18 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayActions.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayActions.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -73,5 +77,10 @@ public ArrayActions read(final JsonReader jsonReader) throws IOException { return ArrayActions.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ArrayActions.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayActivityLog.java b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayActivityLog.java index 55d283e..2e4ca71 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayActivityLog.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayActivityLog.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,317 +11,265 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; +import org.openapitools.client.model.ActivityEventType; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Actvity of an Array */ -@ApiModel(description = "Actvity of an Array") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ArrayActivityLog { public static final String SERIALIZED_NAME_EVENT_AT = "event_at"; @SerializedName(SERIALIZED_NAME_EVENT_AT) + @javax.annotation.Nullable private OffsetDateTime eventAt; public static final String SERIALIZED_NAME_ACTION = "action"; @SerializedName(SERIALIZED_NAME_ACTION) + @javax.annotation.Nullable private ActivityEventType action; public static final String SERIALIZED_NAME_USERNAME = "username"; @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nullable private String username; public static final String SERIALIZED_NAME_BYTES_SENT = "bytes_sent"; @SerializedName(SERIALIZED_NAME_BYTES_SENT) + @javax.annotation.Nullable private Integer bytesSent; public static final String SERIALIZED_NAME_BYTES_RECEIVED = "bytes_received"; @SerializedName(SERIALIZED_NAME_BYTES_RECEIVED) + @javax.annotation.Nullable private Integer bytesReceived; public static final String SERIALIZED_NAME_ARRAY_TASK_ID = "array_task_id"; @SerializedName(SERIALIZED_NAME_ARRAY_TASK_ID) + @javax.annotation.Nullable private String arrayTaskId; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private String id; public static final String SERIALIZED_NAME_QUERY_RANGES = "query_ranges"; @SerializedName(SERIALIZED_NAME_QUERY_RANGES) + @javax.annotation.Nullable private String queryRanges; public static final String SERIALIZED_NAME_QUERY_STATS = "query_stats"; @SerializedName(SERIALIZED_NAME_QUERY_STATS) + @javax.annotation.Nullable private String queryStats; public ArrayActivityLog() { } - public ArrayActivityLog eventAt(OffsetDateTime eventAt) { - + public ArrayActivityLog eventAt(@javax.annotation.Nullable OffsetDateTime eventAt) { this.eventAt = eventAt; return this; } - /** + /** * time event took place (RFC3339) * @return eventAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "time event took place (RFC3339)") - public OffsetDateTime getEventAt() { return eventAt; } - - public void setEventAt(OffsetDateTime eventAt) { + public void setEventAt(@javax.annotation.Nullable OffsetDateTime eventAt) { this.eventAt = eventAt; } - public ArrayActivityLog action(ActivityEventType action) { - + public ArrayActivityLog action(@javax.annotation.Nullable ActivityEventType action) { this.action = action; return this; } - /** + /** * Get action * @return action - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public ActivityEventType getAction() { return action; } - - public void setAction(ActivityEventType action) { + public void setAction(@javax.annotation.Nullable ActivityEventType action) { this.action = action; } - public ArrayActivityLog username(String username) { - + public ArrayActivityLog username(@javax.annotation.Nullable String username) { this.username = username; return this; } - /** + /** * User who performed action * @return username - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "user1", value = "User who performed action") - public String getUsername() { return username; } - - public void setUsername(String username) { + public void setUsername(@javax.annotation.Nullable String username) { this.username = username; } - public ArrayActivityLog bytesSent(Integer bytesSent) { - + public ArrayActivityLog bytesSent(@javax.annotation.Nullable Integer bytesSent) { this.bytesSent = bytesSent; return this; } - /** + /** * Bytes sent to client * @return bytesSent - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "1073741824", value = "Bytes sent to client") - public Integer getBytesSent() { return bytesSent; } - - public void setBytesSent(Integer bytesSent) { + public void setBytesSent(@javax.annotation.Nullable Integer bytesSent) { this.bytesSent = bytesSent; } - public ArrayActivityLog bytesReceived(Integer bytesReceived) { - + public ArrayActivityLog bytesReceived(@javax.annotation.Nullable Integer bytesReceived) { this.bytesReceived = bytesReceived; return this; } - /** + /** * Bytes recieved from client * @return bytesReceived - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "1073741824", value = "Bytes recieved from client") - public Integer getBytesReceived() { return bytesReceived; } - - public void setBytesReceived(Integer bytesReceived) { + public void setBytesReceived(@javax.annotation.Nullable Integer bytesReceived) { this.bytesReceived = bytesReceived; } - public ArrayActivityLog arrayTaskId(String arrayTaskId) { - + public ArrayActivityLog arrayTaskId(@javax.annotation.Nullable String arrayTaskId) { this.arrayTaskId = arrayTaskId; return this; } - /** + /** * UUID of associated array task * @return arrayTaskId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", value = "UUID of associated array task") - public String getArrayTaskId() { return arrayTaskId; } - - public void setArrayTaskId(String arrayTaskId) { + public void setArrayTaskId(@javax.annotation.Nullable String arrayTaskId) { this.arrayTaskId = arrayTaskId; } - public ArrayActivityLog id(String id) { - + public ArrayActivityLog id(@javax.annotation.Nullable String id) { this.id = id; return this; } - /** + /** * ID of the activity * @return id - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", value = "ID of the activity") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nullable String id) { this.id = id; } - public ArrayActivityLog queryRanges(String queryRanges) { - + public ArrayActivityLog queryRanges(@javax.annotation.Nullable String queryRanges) { this.queryRanges = queryRanges; return this; } - /** + /** * ranges for query * @return queryRanges - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "{\"rows\":[{\"start\": 1, \"end\": 1},{\"start\": 3, \"end\": 4}],\"cols\":[{\"start\": 1, \"end\": 4}]}", value = "ranges for query") - public String getQueryRanges() { return queryRanges; } - - public void setQueryRanges(String queryRanges) { + public void setQueryRanges(@javax.annotation.Nullable String queryRanges) { this.queryRanges = queryRanges; } - public ArrayActivityLog queryStats(String queryStats) { - + public ArrayActivityLog queryStats(@javax.annotation.Nullable String queryStats) { this.queryStats = queryStats; return this; } - /** + /** * stats for query * @return queryStats - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "{\"timers\": {\"Context.StorageManager.read_load_array_schema_from_uri.sum\": 0.0255293, \"...\": \"...\"}, \"counters\": {\"Context.StorageManager.read_unfiltered_byte_num\": 191, \"...\": \"...\"}}", value = "stats for query") - public String getQueryStats() { return queryStats; } - - public void setQueryStats(String queryStats) { + public void setQueryStats(@javax.annotation.Nullable String queryStats) { this.queryStats = queryStats; } - /** - * 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. - */ - public ArrayActivityLog 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -341,13 +289,12 @@ public boolean equals(Object o) { Objects.equals(this.arrayTaskId, arrayActivityLog.arrayTaskId) && Objects.equals(this.id, arrayActivityLog.id) && Objects.equals(this.queryRanges, arrayActivityLog.queryRanges) && - Objects.equals(this.queryStats, arrayActivityLog.queryStats)&& - Objects.equals(this.additionalProperties, arrayActivityLog.additionalProperties); + Objects.equals(this.queryStats, arrayActivityLog.queryStats); } @Override public int hashCode() { - return Objects.hash(eventAt, action, username, bytesSent, bytesReceived, arrayTaskId, id, queryRanges, queryStats, additionalProperties); + return Objects.hash(eventAt, action, username, bytesSent, bytesReceived, arrayTaskId, id, queryRanges, queryStats); } @Override @@ -363,7 +310,6 @@ public String toString() { sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" queryRanges: ").append(toIndentedString(queryRanges)).append("\n"); sb.append(" queryStats: ").append(toIndentedString(queryStats)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -400,20 +346,31 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ArrayActivityLog - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (ArrayActivityLog.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 ArrayActivityLog + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ArrayActivityLog.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in ArrayActivityLog is not found in the empty JSON string", ArrayActivityLog.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ArrayActivityLog.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ArrayActivityLog` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `action` + if (jsonObj.get("action") != null && !jsonObj.get("action").isJsonNull()) { + ActivityEventType.validateJsonElement(jsonObj.get("action")); + } if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } @@ -446,71 +403,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ArrayActivityLog value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 ArrayActivityLog read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - ArrayActivityLog 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ArrayActivityLog given an JSON string - * - * @param jsonString JSON string - * @return An instance of ArrayActivityLog - * @throws IOException if the JSON string is invalid with respect to ArrayActivityLog - */ + /** + * Create an instance of ArrayActivityLog given an JSON string + * + * @param jsonString JSON string + * @return An instance of ArrayActivityLog + * @throws IOException if the JSON string is invalid with respect to ArrayActivityLog + */ public static ArrayActivityLog fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ArrayActivityLog.class); } - /** - * Convert an instance of ArrayActivityLog to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ArrayActivityLog to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayBrowserData.java b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayBrowserData.java index ce34a3b..2b7727e 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayBrowserData.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayBrowserData.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,53 +11,63 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.ArrayInfo; +import org.openapitools.client.model.PaginationMetadata; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Object including array info and pagination metadata */ -@ApiModel(description = "Object including array info and pagination metadata") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ArrayBrowserData { public static final String SERIALIZED_NAME_ARRAYS = "arrays"; @SerializedName(SERIALIZED_NAME_ARRAYS) - private List arrays = null; + @javax.annotation.Nullable + private List arrays = new ArrayList<>(); public static final String SERIALIZED_NAME_PAGINATION_METADATA = "pagination_metadata"; @SerializedName(SERIALIZED_NAME_PAGINATION_METADATA) + @javax.annotation.Nullable private PaginationMetadata paginationMetadata; public ArrayBrowserData() { } - public ArrayBrowserData arrays(List arrays) { - + public ArrayBrowserData arrays(@javax.annotation.Nullable List arrays) { this.arrays = arrays; return this; } @@ -70,80 +80,38 @@ public ArrayBrowserData addArraysItem(ArrayInfo arraysItem) { return this; } - /** + /** * Array Info * @return arrays - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Array Info") - public List getArrays() { return arrays; } - - public void setArrays(List arrays) { + public void setArrays(@javax.annotation.Nullable List arrays) { this.arrays = arrays; } - public ArrayBrowserData paginationMetadata(PaginationMetadata paginationMetadata) { - + public ArrayBrowserData paginationMetadata(@javax.annotation.Nullable PaginationMetadata paginationMetadata) { this.paginationMetadata = paginationMetadata; return this; } - /** + /** * Get paginationMetadata * @return paginationMetadata - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public PaginationMetadata getPaginationMetadata() { return paginationMetadata; } - - public void setPaginationMetadata(PaginationMetadata paginationMetadata) { + public void setPaginationMetadata(@javax.annotation.Nullable PaginationMetadata paginationMetadata) { this.paginationMetadata = paginationMetadata; } - /** - * 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. - */ - public ArrayBrowserData 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -156,13 +124,12 @@ public boolean equals(Object o) { } ArrayBrowserData arrayBrowserData = (ArrayBrowserData) o; return Objects.equals(this.arrays, arrayBrowserData.arrays) && - Objects.equals(this.paginationMetadata, arrayBrowserData.paginationMetadata)&& - Objects.equals(this.additionalProperties, arrayBrowserData.additionalProperties); + Objects.equals(this.paginationMetadata, arrayBrowserData.paginationMetadata); } @Override public int hashCode() { - return Objects.hash(arrays, paginationMetadata, additionalProperties); + return Objects.hash(arrays, paginationMetadata); } @Override @@ -171,7 +138,6 @@ public String toString() { sb.append("class ArrayBrowserData {\n"); sb.append(" arrays: ").append(toIndentedString(arrays)).append("\n"); sb.append(" paginationMetadata: ").append(toIndentedString(paginationMetadata)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -201,35 +167,44 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ArrayBrowserData - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (ArrayBrowserData.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 ArrayBrowserData + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ArrayBrowserData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in ArrayBrowserData is not found in the empty JSON string", ArrayBrowserData.openapiRequiredFields.toString())); } } - JsonArray jsonArrayarrays = jsonObj.getAsJsonArray("arrays"); - if (jsonArrayarrays != null) { - // ensure the json data is an array - if (!jsonObj.get("arrays").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `arrays` to be an array in the JSON string but got `%s`", jsonObj.get("arrays").toString())); - } - // validate the optional field `arrays` (array) - for (int i = 0; i < jsonArrayarrays.size(); i++) { - ArrayInfo.validateJsonObject(jsonArrayarrays.get(i).getAsJsonObject()); - }; + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ArrayBrowserData.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ArrayBrowserData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("arrays") != null && !jsonObj.get("arrays").isJsonNull()) { + JsonArray jsonArrayarrays = jsonObj.getAsJsonArray("arrays"); + if (jsonArrayarrays != null) { + // ensure the json data is an array + if (!jsonObj.get("arrays").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `arrays` to be an array in the JSON string but got `%s`", jsonObj.get("arrays").toString())); + } + + // validate the optional field `arrays` (array) + for (int i = 0; i < jsonArrayarrays.size(); i++) { + ArrayInfo.validateJsonElement(jsonArrayarrays.get(i)); + }; + } } // validate the optional field `pagination_metadata` if (jsonObj.get("pagination_metadata") != null && !jsonObj.get("pagination_metadata").isJsonNull()) { - PaginationMetadata.validateJsonObject(jsonObj.getAsJsonObject("pagination_metadata")); + PaginationMetadata.validateJsonElement(jsonObj.get("pagination_metadata")); } } @@ -248,71 +223,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ArrayBrowserData value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 ArrayBrowserData read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - ArrayBrowserData 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ArrayBrowserData given an JSON string - * - * @param jsonString JSON string - * @return An instance of ArrayBrowserData - * @throws IOException if the JSON string is invalid with respect to ArrayBrowserData - */ + /** + * Create an instance of ArrayBrowserData given an JSON string + * + * @param jsonString JSON string + * @return An instance of ArrayBrowserData + * @throws IOException if the JSON string is invalid with respect to ArrayBrowserData + */ public static ArrayBrowserData fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ArrayBrowserData.class); } - /** - * Convert an instance of ArrayBrowserData to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ArrayBrowserData to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayBrowserSidebar.java b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayBrowserSidebar.java index 79e83f4..4bc350a 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayBrowserSidebar.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayBrowserSidebar.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,55 +11,66 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Object for ui array tasks browser page */ -@ApiModel(description = "Object for ui array tasks browser page") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ArrayBrowserSidebar { public static final String SERIALIZED_NAME_NAMESPACES = "namespaces"; @SerializedName(SERIALIZED_NAME_NAMESPACES) - private List namespaces = null; + @javax.annotation.Nullable + private List namespaces = new ArrayList<>(); public static final String SERIALIZED_NAME_RESULT_COUNT_FOR_ALL = "result_count_for_all"; @SerializedName(SERIALIZED_NAME_RESULT_COUNT_FOR_ALL) + @javax.annotation.Nullable private Integer resultCountForAll; public static final String SERIALIZED_NAME_RESULT_COUNT_BY_NAMESPACE = "result_count_by_namespace"; @SerializedName(SERIALIZED_NAME_RESULT_COUNT_BY_NAMESPACE) + @javax.annotation.Nullable private Object resultCountByNamespace; public ArrayBrowserSidebar() { } - public ArrayBrowserSidebar namespaces(List namespaces) { - + public ArrayBrowserSidebar namespaces(@javax.annotation.Nullable List namespaces) { this.namespaces = namespaces; return this; } @@ -72,103 +83,57 @@ public ArrayBrowserSidebar addNamespacesItem(String namespacesItem) { return this; } - /** + /** * list of all unique namespaces to display * @return namespaces - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "list of all unique namespaces to display") - public List getNamespaces() { return namespaces; } - - public void setNamespaces(List namespaces) { + public void setNamespaces(@javax.annotation.Nullable List namespaces) { this.namespaces = namespaces; } - public ArrayBrowserSidebar resultCountForAll(Integer resultCountForAll) { - + public ArrayBrowserSidebar resultCountForAll(@javax.annotation.Nullable Integer resultCountForAll) { this.resultCountForAll = resultCountForAll; return this; } - /** + /** * A count of \"all\" of category * @return resultCountForAll - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "A count of \"all\" of category") - public Integer getResultCountForAll() { return resultCountForAll; } - - public void setResultCountForAll(Integer resultCountForAll) { + public void setResultCountForAll(@javax.annotation.Nullable Integer resultCountForAll) { this.resultCountForAll = resultCountForAll; } - public ArrayBrowserSidebar resultCountByNamespace(Object resultCountByNamespace) { - + public ArrayBrowserSidebar resultCountByNamespace(@javax.annotation.Nullable Object resultCountByNamespace) { this.resultCountByNamespace = resultCountByNamespace; return this; } - /** + /** * A map that includes the result count by namespace * @return resultCountByNamespace - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "A map that includes the result count by namespace") - public Object getResultCountByNamespace() { return resultCountByNamespace; } - - public void setResultCountByNamespace(Object resultCountByNamespace) { + public void setResultCountByNamespace(@javax.annotation.Nullable Object resultCountByNamespace) { this.resultCountByNamespace = resultCountByNamespace; } - /** - * 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. - */ - public ArrayBrowserSidebar 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -182,13 +147,12 @@ public boolean equals(Object o) { ArrayBrowserSidebar arrayBrowserSidebar = (ArrayBrowserSidebar) o; return Objects.equals(this.namespaces, arrayBrowserSidebar.namespaces) && Objects.equals(this.resultCountForAll, arrayBrowserSidebar.resultCountForAll) && - Objects.equals(this.resultCountByNamespace, arrayBrowserSidebar.resultCountByNamespace)&& - Objects.equals(this.additionalProperties, arrayBrowserSidebar.additionalProperties); + Objects.equals(this.resultCountByNamespace, arrayBrowserSidebar.resultCountByNamespace); } @Override public int hashCode() { - return Objects.hash(namespaces, resultCountForAll, resultCountByNamespace, additionalProperties); + return Objects.hash(namespaces, resultCountForAll, resultCountByNamespace); } @Override @@ -198,7 +162,6 @@ public String toString() { sb.append(" namespaces: ").append(toIndentedString(namespaces)).append("\n"); sb.append(" resultCountForAll: ").append(toIndentedString(resultCountForAll)).append("\n"); sb.append(" resultCountByNamespace: ").append(toIndentedString(resultCountByNamespace)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -229,22 +192,29 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ArrayBrowserSidebar - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (ArrayBrowserSidebar.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 ArrayBrowserSidebar + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ArrayBrowserSidebar.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in ArrayBrowserSidebar is not found in the empty JSON string", ArrayBrowserSidebar.openapiRequiredFields.toString())); } } - // ensure the json data is an array - if ((jsonObj.get("namespaces") != null && !jsonObj.get("namespaces").isJsonNull()) && !jsonObj.get("namespaces").isJsonArray()) { + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ArrayBrowserSidebar.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ArrayBrowserSidebar` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("namespaces") != null && !jsonObj.get("namespaces").isJsonNull() && !jsonObj.get("namespaces").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `namespaces` to be an array in the JSON string but got `%s`", jsonObj.get("namespaces").toString())); } } @@ -264,71 +234,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ArrayBrowserSidebar value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 ArrayBrowserSidebar read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - ArrayBrowserSidebar 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ArrayBrowserSidebar given an JSON string - * - * @param jsonString JSON string - * @return An instance of ArrayBrowserSidebar - * @throws IOException if the JSON string is invalid with respect to ArrayBrowserSidebar - */ + /** + * Create an instance of ArrayBrowserSidebar given an JSON string + * + * @param jsonString JSON string + * @return An instance of ArrayBrowserSidebar + * @throws IOException if the JSON string is invalid with respect to ArrayBrowserSidebar + */ public static ArrayBrowserSidebar fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ArrayBrowserSidebar.class); } - /** - * Convert an instance of ArrayBrowserSidebar to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ArrayBrowserSidebar to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayConsolidationRequest.java b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayConsolidationRequest.java index e02cf61..0272126 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayConsolidationRequest.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayConsolidationRequest.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,102 +11,108 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.client.model.TileDBConfig; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Request to consolidate an array */ -@ApiModel(description = "Request to consolidate an array") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ArrayConsolidationRequest { public static final String SERIALIZED_NAME_CONFIG = "config"; @SerializedName(SERIALIZED_NAME_CONFIG) + @javax.annotation.Nullable private TileDBConfig config; + public static final String SERIALIZED_NAME_FRAGMENTS = "fragments"; + @SerializedName(SERIALIZED_NAME_FRAGMENTS) + @javax.annotation.Nullable + private List fragments = new ArrayList<>(); + public ArrayConsolidationRequest() { } - public ArrayConsolidationRequest config(TileDBConfig config) { - + public ArrayConsolidationRequest config(@javax.annotation.Nullable TileDBConfig config) { this.config = config; return this; } - /** + /** * Get config * @return config - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public TileDBConfig getConfig() { return config; } - - public void setConfig(TileDBConfig config) { + public void setConfig(@javax.annotation.Nullable TileDBConfig config) { this.config = config; } - /** - * 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. - */ - public ArrayConsolidationRequest putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); + public ArrayConsolidationRequest fragments(@javax.annotation.Nullable List fragments) { + this.fragments = fragments; + return this; + } + + public ArrayConsolidationRequest addFragmentsItem(String fragmentsItem) { + if (this.fragments == null) { + this.fragments = new ArrayList<>(); } - this.additionalProperties.put(key, value); + this.fragments.add(fragmentsItem); return this; } /** - * Return the additional (undeclared) property. + * list of fragments in the array to consolidate + * @return fragments */ - public Map getAdditionalProperties() { - return additionalProperties; + @javax.annotation.Nullable + public List getFragments() { + return fragments; } - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); + public void setFragments(@javax.annotation.Nullable List fragments) { + this.fragments = fragments; } + @Override public boolean equals(Object o) { if (this == o) { @@ -116,13 +122,13 @@ public boolean equals(Object o) { return false; } ArrayConsolidationRequest arrayConsolidationRequest = (ArrayConsolidationRequest) o; - return Objects.equals(this.config, arrayConsolidationRequest.config)&& - Objects.equals(this.additionalProperties, arrayConsolidationRequest.additionalProperties); + return Objects.equals(this.config, arrayConsolidationRequest.config) && + Objects.equals(this.fragments, arrayConsolidationRequest.fragments); } @Override public int hashCode() { - return Objects.hash(config, additionalProperties); + return Objects.hash(config, fragments); } @Override @@ -130,7 +136,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayConsolidationRequest {\n"); sb.append(" config: ").append(toIndentedString(config)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append(" fragments: ").append(toIndentedString(fragments)).append("\n"); sb.append("}"); return sb.toString(); } @@ -154,28 +160,40 @@ private String toIndentedString(Object o) { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); openapiFields.add("config"); + openapiFields.add("fragments"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ArrayConsolidationRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (ArrayConsolidationRequest.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 ArrayConsolidationRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ArrayConsolidationRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in ArrayConsolidationRequest is not found in the empty JSON string", ArrayConsolidationRequest.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ArrayConsolidationRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ArrayConsolidationRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `config` if (jsonObj.get("config") != null && !jsonObj.get("config").isJsonNull()) { - TileDBConfig.validateJsonObject(jsonObj.getAsJsonObject("config")); + TileDBConfig.validateJsonElement(jsonObj.get("config")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("fragments") != null && !jsonObj.get("fragments").isJsonNull() && !jsonObj.get("fragments").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `fragments` to be an array in the JSON string but got `%s`", jsonObj.get("fragments").toString())); } } @@ -194,71 +212,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ArrayConsolidationRequest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 ArrayConsolidationRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - ArrayConsolidationRequest 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ArrayConsolidationRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ArrayConsolidationRequest - * @throws IOException if the JSON string is invalid with respect to ArrayConsolidationRequest - */ + /** + * Create an instance of ArrayConsolidationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ArrayConsolidationRequest + * @throws IOException if the JSON string is invalid with respect to ArrayConsolidationRequest + */ public static ArrayConsolidationRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ArrayConsolidationRequest.class); } - /** - * Convert an instance of ArrayConsolidationRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ArrayConsolidationRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayEndTimestampData.java b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayEndTimestampData.java index 1eacdbc..041fb81 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayEndTimestampData.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayEndTimestampData.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,51 +11,62 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.PaginationMetadata; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Object including array end_timestamps (list of Unix epoch timestamps in milliseconds) and pagination metadata */ -@ApiModel(description = "Object including array end_timestamps (list of Unix epoch timestamps in milliseconds) and pagination metadata") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ArrayEndTimestampData { public static final String SERIALIZED_NAME_END_TIMESTAMPS = "end_timestamps"; @SerializedName(SERIALIZED_NAME_END_TIMESTAMPS) - private List endTimestamps = null; + @javax.annotation.Nullable + private List endTimestamps = new ArrayList<>(); public static final String SERIALIZED_NAME_PAGINATION_METADATA = "pagination_metadata"; @SerializedName(SERIALIZED_NAME_PAGINATION_METADATA) + @javax.annotation.Nullable private PaginationMetadata paginationMetadata; public ArrayEndTimestampData() { } - public ArrayEndTimestampData endTimestamps(List endTimestamps) { - + public ArrayEndTimestampData endTimestamps(@javax.annotation.Nullable List endTimestamps) { this.endTimestamps = endTimestamps; return this; } @@ -68,80 +79,38 @@ public ArrayEndTimestampData addEndTimestampsItem(Integer endTimestampsItem) { return this; } - /** + /** * List of timestamps expressed in milliseconds since Unix epoch * @return endTimestamps - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "List of timestamps expressed in milliseconds since Unix epoch") - public List getEndTimestamps() { return endTimestamps; } - - public void setEndTimestamps(List endTimestamps) { + public void setEndTimestamps(@javax.annotation.Nullable List endTimestamps) { this.endTimestamps = endTimestamps; } - public ArrayEndTimestampData paginationMetadata(PaginationMetadata paginationMetadata) { - + public ArrayEndTimestampData paginationMetadata(@javax.annotation.Nullable PaginationMetadata paginationMetadata) { this.paginationMetadata = paginationMetadata; return this; } - /** + /** * Get paginationMetadata * @return paginationMetadata - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public PaginationMetadata getPaginationMetadata() { return paginationMetadata; } - - public void setPaginationMetadata(PaginationMetadata paginationMetadata) { + public void setPaginationMetadata(@javax.annotation.Nullable PaginationMetadata paginationMetadata) { this.paginationMetadata = paginationMetadata; } - /** - * 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. - */ - public ArrayEndTimestampData 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -154,13 +123,12 @@ public boolean equals(Object o) { } ArrayEndTimestampData arrayEndTimestampData = (ArrayEndTimestampData) o; return Objects.equals(this.endTimestamps, arrayEndTimestampData.endTimestamps) && - Objects.equals(this.paginationMetadata, arrayEndTimestampData.paginationMetadata)&& - Objects.equals(this.additionalProperties, arrayEndTimestampData.additionalProperties); + Objects.equals(this.paginationMetadata, arrayEndTimestampData.paginationMetadata); } @Override public int hashCode() { - return Objects.hash(endTimestamps, paginationMetadata, additionalProperties); + return Objects.hash(endTimestamps, paginationMetadata); } @Override @@ -169,7 +137,6 @@ public String toString() { sb.append("class ArrayEndTimestampData {\n"); sb.append(" endTimestamps: ").append(toIndentedString(endTimestamps)).append("\n"); sb.append(" paginationMetadata: ").append(toIndentedString(paginationMetadata)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -199,27 +166,34 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ArrayEndTimestampData - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (ArrayEndTimestampData.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 ArrayEndTimestampData + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ArrayEndTimestampData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in ArrayEndTimestampData is not found in the empty JSON string", ArrayEndTimestampData.openapiRequiredFields.toString())); } } - // ensure the json data is an array - if ((jsonObj.get("end_timestamps") != null && !jsonObj.get("end_timestamps").isJsonNull()) && !jsonObj.get("end_timestamps").isJsonArray()) { + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ArrayEndTimestampData.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ArrayEndTimestampData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("end_timestamps") != null && !jsonObj.get("end_timestamps").isJsonNull() && !jsonObj.get("end_timestamps").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `end_timestamps` to be an array in the JSON string but got `%s`", jsonObj.get("end_timestamps").toString())); } // validate the optional field `pagination_metadata` if (jsonObj.get("pagination_metadata") != null && !jsonObj.get("pagination_metadata").isJsonNull()) { - PaginationMetadata.validateJsonObject(jsonObj.getAsJsonObject("pagination_metadata")); + PaginationMetadata.validateJsonElement(jsonObj.get("pagination_metadata")); } } @@ -238,71 +212,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ArrayEndTimestampData value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 ArrayEndTimestampData read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - ArrayEndTimestampData 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ArrayEndTimestampData given an JSON string - * - * @param jsonString JSON string - * @return An instance of ArrayEndTimestampData - * @throws IOException if the JSON string is invalid with respect to ArrayEndTimestampData - */ + /** + * Create an instance of ArrayEndTimestampData given an JSON string + * + * @param jsonString JSON string + * @return An instance of ArrayEndTimestampData + * @throws IOException if the JSON string is invalid with respect to ArrayEndTimestampData + */ public static ArrayEndTimestampData fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ArrayEndTimestampData.class); } - /** - * Convert an instance of ArrayEndTimestampData to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ArrayEndTimestampData to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayFavorite.java b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayFavorite.java index 2ad4d03..097d13f 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayFavorite.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayFavorite.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,155 +11,119 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * A user-favorite array item */ -@ApiModel(description = "A user-favorite array item") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ArrayFavorite { public static final String SERIALIZED_NAME_ARRAY_UUID = "array_uuid"; @SerializedName(SERIALIZED_NAME_ARRAY_UUID) + @javax.annotation.Nullable private String arrayUuid; public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; @SerializedName(SERIALIZED_NAME_NAMESPACE) + @javax.annotation.Nullable private String namespace; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public ArrayFavorite() { } - public ArrayFavorite arrayUuid(String arrayUuid) { - + public ArrayFavorite arrayUuid(@javax.annotation.Nullable String arrayUuid) { this.arrayUuid = arrayUuid; return this; } - /** + /** * unique UUID of the array * @return arrayUuid - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "unique UUID of the array") - public String getArrayUuid() { return arrayUuid; } - - public void setArrayUuid(String arrayUuid) { + public void setArrayUuid(@javax.annotation.Nullable String arrayUuid) { this.arrayUuid = arrayUuid; } - public ArrayFavorite namespace(String namespace) { - + public ArrayFavorite namespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; return this; } - /** + /** * the namespace of the array * @return namespace - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "the namespace of the array") - public String getNamespace() { return namespace; } - - public void setNamespace(String namespace) { + public void setNamespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; } - public ArrayFavorite name(String name) { - + public ArrayFavorite name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * the name of the array * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "the name of the array") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - /** - * 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. - */ - public ArrayFavorite 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -173,13 +137,12 @@ public boolean equals(Object o) { ArrayFavorite arrayFavorite = (ArrayFavorite) o; return Objects.equals(this.arrayUuid, arrayFavorite.arrayUuid) && Objects.equals(this.namespace, arrayFavorite.namespace) && - Objects.equals(this.name, arrayFavorite.name)&& - Objects.equals(this.additionalProperties, arrayFavorite.additionalProperties); + Objects.equals(this.name, arrayFavorite.name); } @Override public int hashCode() { - return Objects.hash(arrayUuid, namespace, name, additionalProperties); + return Objects.hash(arrayUuid, namespace, name); } @Override @@ -189,7 +152,6 @@ public String toString() { sb.append(" arrayUuid: ").append(toIndentedString(arrayUuid)).append("\n"); sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -220,20 +182,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ArrayFavorite - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (ArrayFavorite.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 ArrayFavorite + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ArrayFavorite.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in ArrayFavorite is not found in the empty JSON string", ArrayFavorite.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ArrayFavorite.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ArrayFavorite` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("array_uuid") != null && !jsonObj.get("array_uuid").isJsonNull()) && !jsonObj.get("array_uuid").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `array_uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("array_uuid").toString())); } @@ -260,71 +229,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ArrayFavorite value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 ArrayFavorite read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - ArrayFavorite 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ArrayFavorite given an JSON string - * - * @param jsonString JSON string - * @return An instance of ArrayFavorite - * @throws IOException if the JSON string is invalid with respect to ArrayFavorite - */ + /** + * Create an instance of ArrayFavorite given an JSON string + * + * @param jsonString JSON string + * @return An instance of ArrayFavorite + * @throws IOException if the JSON string is invalid with respect to ArrayFavorite + */ public static ArrayFavorite fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ArrayFavorite.class); } - /** - * Convert an instance of ArrayFavorite to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ArrayFavorite to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayFavoritesData.java b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayFavoritesData.java index 62976de..9a205c2 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayFavoritesData.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayFavoritesData.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,52 +11,63 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.ArrayInfo; +import org.openapitools.client.model.PaginationMetadata; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Object including array favorites and pagination metadata */ -@ApiModel(description = "Object including array favorites and pagination metadata") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ArrayFavoritesData { public static final String SERIALIZED_NAME_ARRAYS = "arrays"; @SerializedName(SERIALIZED_NAME_ARRAYS) - private List arrays = null; + @javax.annotation.Nullable + private List arrays = new ArrayList<>(); public static final String SERIALIZED_NAME_PAGINATION_METADATA = "pagination_metadata"; @SerializedName(SERIALIZED_NAME_PAGINATION_METADATA) + @javax.annotation.Nullable private PaginationMetadata paginationMetadata; public ArrayFavoritesData() { } - public ArrayFavoritesData arrays(List arrays) { - + public ArrayFavoritesData arrays(@javax.annotation.Nullable List arrays) { this.arrays = arrays; return this; } @@ -69,80 +80,38 @@ public ArrayFavoritesData addArraysItem(ArrayInfo arraysItem) { return this; } - /** + /** * List of array infos * @return arrays - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "List of array infos") - public List getArrays() { return arrays; } - - public void setArrays(List arrays) { + public void setArrays(@javax.annotation.Nullable List arrays) { this.arrays = arrays; } - public ArrayFavoritesData paginationMetadata(PaginationMetadata paginationMetadata) { - + public ArrayFavoritesData paginationMetadata(@javax.annotation.Nullable PaginationMetadata paginationMetadata) { this.paginationMetadata = paginationMetadata; return this; } - /** + /** * Get paginationMetadata * @return paginationMetadata - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public PaginationMetadata getPaginationMetadata() { return paginationMetadata; } - - public void setPaginationMetadata(PaginationMetadata paginationMetadata) { + public void setPaginationMetadata(@javax.annotation.Nullable PaginationMetadata paginationMetadata) { this.paginationMetadata = paginationMetadata; } - /** - * 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. - */ - public ArrayFavoritesData 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -155,13 +124,12 @@ public boolean equals(Object o) { } ArrayFavoritesData arrayFavoritesData = (ArrayFavoritesData) o; return Objects.equals(this.arrays, arrayFavoritesData.arrays) && - Objects.equals(this.paginationMetadata, arrayFavoritesData.paginationMetadata)&& - Objects.equals(this.additionalProperties, arrayFavoritesData.additionalProperties); + Objects.equals(this.paginationMetadata, arrayFavoritesData.paginationMetadata); } @Override public int hashCode() { - return Objects.hash(arrays, paginationMetadata, additionalProperties); + return Objects.hash(arrays, paginationMetadata); } @Override @@ -170,7 +138,6 @@ public String toString() { sb.append("class ArrayFavoritesData {\n"); sb.append(" arrays: ").append(toIndentedString(arrays)).append("\n"); sb.append(" paginationMetadata: ").append(toIndentedString(paginationMetadata)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -200,35 +167,44 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ArrayFavoritesData - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (ArrayFavoritesData.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 ArrayFavoritesData + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ArrayFavoritesData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in ArrayFavoritesData is not found in the empty JSON string", ArrayFavoritesData.openapiRequiredFields.toString())); } } - JsonArray jsonArrayarrays = jsonObj.getAsJsonArray("arrays"); - if (jsonArrayarrays != null) { - // ensure the json data is an array - if (!jsonObj.get("arrays").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `arrays` to be an array in the JSON string but got `%s`", jsonObj.get("arrays").toString())); - } - // validate the optional field `arrays` (array) - for (int i = 0; i < jsonArrayarrays.size(); i++) { - ArrayInfo.validateJsonObject(jsonArrayarrays.get(i).getAsJsonObject()); - }; + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ArrayFavoritesData.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ArrayFavoritesData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("arrays") != null && !jsonObj.get("arrays").isJsonNull()) { + JsonArray jsonArrayarrays = jsonObj.getAsJsonArray("arrays"); + if (jsonArrayarrays != null) { + // ensure the json data is an array + if (!jsonObj.get("arrays").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `arrays` to be an array in the JSON string but got `%s`", jsonObj.get("arrays").toString())); + } + + // validate the optional field `arrays` (array) + for (int i = 0; i < jsonArrayarrays.size(); i++) { + ArrayInfo.validateJsonElement(jsonArrayarrays.get(i)); + }; + } } // validate the optional field `pagination_metadata` if (jsonObj.get("pagination_metadata") != null && !jsonObj.get("pagination_metadata").isJsonNull()) { - PaginationMetadata.validateJsonObject(jsonObj.getAsJsonObject("pagination_metadata")); + PaginationMetadata.validateJsonElement(jsonObj.get("pagination_metadata")); } } @@ -247,71 +223,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ArrayFavoritesData value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 ArrayFavoritesData read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - ArrayFavoritesData 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ArrayFavoritesData given an JSON string - * - * @param jsonString JSON string - * @return An instance of ArrayFavoritesData - * @throws IOException if the JSON string is invalid with respect to ArrayFavoritesData - */ + /** + * Create an instance of ArrayFavoritesData given an JSON string + * + * @param jsonString JSON string + * @return An instance of ArrayFavoritesData + * @throws IOException if the JSON string is invalid with respect to ArrayFavoritesData + */ public static ArrayFavoritesData fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ArrayFavoritesData.class); } - /** - * Convert an instance of ArrayFavoritesData to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ArrayFavoritesData to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayInfo.java b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayInfo.java index 4e1ff3d..c569bc6 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayInfo.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayInfo.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,142 +11,196 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; - -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.model.ArrayActions; +import org.openapitools.client.model.ArrayType; +import org.openapitools.client.model.FileType; +import org.openapitools.client.model.MetadataStringifiedEntry; +import org.openapitools.client.model.Pricing; +import org.openapitools.client.model.Subscription; import org.openapitools.jackson.nullable.JsonNullable; 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.util.HashMap; import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; /** * metadata of an array */ -@ApiModel(description = "metadata of an array") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ArrayInfo { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private String id; public static final String SERIALIZED_NAME_FILE_TYPE = "file_type"; @SerializedName(SERIALIZED_NAME_FILE_TYPE) + @javax.annotation.Nullable private FileType fileType; public static final String SERIALIZED_NAME_FILE_PROPERTIES = "file_properties"; @SerializedName(SERIALIZED_NAME_FILE_PROPERTIES) - private Map fileProperties = null; + @javax.annotation.Nullable + private Map fileProperties = new HashMap<>(); public static final String SERIALIZED_NAME_URI = "uri"; @SerializedName(SERIALIZED_NAME_URI) + @javax.annotation.Nullable private String uri; public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; @SerializedName(SERIALIZED_NAME_NAMESPACE) + @javax.annotation.Nullable private String namespace; public static final String SERIALIZED_NAME_SIZE = "size"; @SerializedName(SERIALIZED_NAME_SIZE) + @javax.annotation.Nullable private BigDecimal size; public static final String SERIALIZED_NAME_LAST_ACCESSED = "last_accessed"; @SerializedName(SERIALIZED_NAME_LAST_ACCESSED) + @javax.annotation.Nullable private OffsetDateTime lastAccessed; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_ALLOWED_ACTIONS = "allowed_actions"; @SerializedName(SERIALIZED_NAME_ALLOWED_ACTIONS) - private List allowedActions = null; + @javax.annotation.Nullable + private List allowedActions = new ArrayList<>(); public static final String SERIALIZED_NAME_PRICING = "pricing"; @SerializedName(SERIALIZED_NAME_PRICING) - private List pricing = null; + @javax.annotation.Nullable + private List pricing = new ArrayList<>(); public static final String SERIALIZED_NAME_SUBSCRIPTIONS = "subscriptions"; @SerializedName(SERIALIZED_NAME_SUBSCRIPTIONS) - private List subscriptions = null; + @javax.annotation.Nullable + private List subscriptions = new ArrayList<>(); public static final String SERIALIZED_NAME_LOGO = "logo"; @SerializedName(SERIALIZED_NAME_LOGO) + @javax.annotation.Nullable private String logo; public static final String SERIALIZED_NAME_ACCESS_CREDENTIALS_NAME = "access_credentials_name"; @SerializedName(SERIALIZED_NAME_ACCESS_CREDENTIALS_NAME) + @javax.annotation.Nullable private String accessCredentialsName; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable private ArrayType type; public static final String SERIALIZED_NAME_SHARE_COUNT = "share_count"; @SerializedName(SERIALIZED_NAME_SHARE_COUNT) + @javax.annotation.Nullable private BigDecimal shareCount; public static final String SERIALIZED_NAME_PUBLIC_SHARE = "public_share"; @SerializedName(SERIALIZED_NAME_PUBLIC_SHARE) + @javax.annotation.Nullable private Boolean publicShare; public static final String SERIALIZED_NAME_NAMESPACE_SUBSCRIBED = "namespace_subscribed"; @SerializedName(SERIALIZED_NAME_NAMESPACE_SUBSCRIBED) + @javax.annotation.Nullable private Boolean namespaceSubscribed; public static final String SERIALIZED_NAME_TILEDB_URI = "tiledb_uri"; @SerializedName(SERIALIZED_NAME_TILEDB_URI) + @javax.annotation.Nullable private String tiledbUri; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; + @javax.annotation.Nullable + private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_LICENSE_ID = "license_id"; @SerializedName(SERIALIZED_NAME_LICENSE_ID) + @javax.annotation.Nullable private String licenseId; public static final String SERIALIZED_NAME_LICENSE_TEXT = "license_text"; @SerializedName(SERIALIZED_NAME_LICENSE_TEXT) + @javax.annotation.Nullable private String licenseText; public static final String SERIALIZED_NAME_READ_ONLY = "read_only"; @SerializedName(SERIALIZED_NAME_READ_ONLY) + @javax.annotation.Nullable private Boolean readOnly; public static final String SERIALIZED_NAME_IS_FAVORITE = "is_favorite"; @SerializedName(SERIALIZED_NAME_IS_FAVORITE) + @javax.annotation.Nullable private Boolean isFavorite; + public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; + @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable + private OffsetDateTime createdAt; + + public static final String SERIALIZED_NAME_CREATED_BY = "created_by"; + @SerializedName(SERIALIZED_NAME_CREATED_BY) + @javax.annotation.Nullable + private String createdBy; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nullable + private List metadata = new ArrayList<>(); + public ArrayInfo() { } - public ArrayInfo( Boolean namespaceSubscribed ) { @@ -154,54 +208,45 @@ public ArrayInfo( this.namespaceSubscribed = namespaceSubscribed; } - public ArrayInfo id(String id) { - + public ArrayInfo id(@javax.annotation.Nullable String id) { this.id = id; return this; } - /** + /** * unique ID of registered array * @return id - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", value = "unique ID of registered array") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nullable String id) { this.id = id; } - public ArrayInfo fileType(FileType fileType) { - + public ArrayInfo fileType(@javax.annotation.Nullable FileType fileType) { this.fileType = fileType; return this; } - /** + /** * Get fileType * @return fileType - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public FileType getFileType() { return fileType; } - - public void setFileType(FileType fileType) { + public void setFileType(@javax.annotation.Nullable FileType fileType) { this.fileType = fileType; } - public ArrayInfo fileProperties(Map fileProperties) { - + public ArrayInfo fileProperties(@javax.annotation.Nullable Map fileProperties) { this.fileProperties = fileProperties; return this; } @@ -214,163 +259,135 @@ public ArrayInfo putFilePropertiesItem(String key, String filePropertiesItem) { return this; } - /** + /** * map of file properties created for this array * @return fileProperties - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "map of file properties created for this array") - public Map getFileProperties() { return fileProperties; } - - public void setFileProperties(Map fileProperties) { + public void setFileProperties(@javax.annotation.Nullable Map fileProperties) { this.fileProperties = fileProperties; } - public ArrayInfo uri(String uri) { - + public ArrayInfo uri(@javax.annotation.Nullable String uri) { this.uri = uri; return this; } - /** + /** * uri of array * @return uri - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "s3://bucket/array", value = "uri of array") - public String getUri() { return uri; } - - public void setUri(String uri) { + public void setUri(@javax.annotation.Nullable String uri) { this.uri = uri; } - public ArrayInfo namespace(String namespace) { - + public ArrayInfo namespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; return this; } - /** + /** * namespace array is in * @return namespace - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "user1", value = "namespace array is in") - public String getNamespace() { return namespace; } - - public void setNamespace(String namespace) { + public void setNamespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; } - public ArrayInfo size(BigDecimal size) { - + public ArrayInfo size(@javax.annotation.Nullable BigDecimal size) { this.size = size; return this; } - /** + /** * size in bytes of array * @return size - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "1024.0", value = "size in bytes of array") - public BigDecimal getSize() { return size; } - - public void setSize(BigDecimal size) { + public void setSize(@javax.annotation.Nullable BigDecimal size) { this.size = size; } - public ArrayInfo lastAccessed(OffsetDateTime lastAccessed) { - + public ArrayInfo lastAccessed(@javax.annotation.Nullable OffsetDateTime lastAccessed) { this.lastAccessed = lastAccessed; return this; } - /** + /** * Datetime array was last accessed in UTC * @return lastAccessed - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Datetime array was last accessed in UTC") - public OffsetDateTime getLastAccessed() { return lastAccessed; } - - public void setLastAccessed(OffsetDateTime lastAccessed) { + public void setLastAccessed(@javax.annotation.Nullable OffsetDateTime lastAccessed) { this.lastAccessed = lastAccessed; } - public ArrayInfo description(String description) { - + public ArrayInfo description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * description of array * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "description of array") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public ArrayInfo name(String name) { - + public ArrayInfo name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * name of array * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "myarray1", value = "name of array") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public ArrayInfo allowedActions(List allowedActions) { - + public ArrayInfo allowedActions(@javax.annotation.Nullable List allowedActions) { this.allowedActions = allowedActions; return this; } @@ -383,25 +400,21 @@ public ArrayInfo addAllowedActionsItem(ArrayActions allowedActionsItem) { return this; } - /** + /** * list of actions user is allowed to do on this array * @return allowedActions - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "list of actions user is allowed to do on this array") - public List getAllowedActions() { return allowedActions; } - - public void setAllowedActions(List allowedActions) { + public void setAllowedActions(@javax.annotation.Nullable List allowedActions) { this.allowedActions = allowedActions; } - public ArrayInfo pricing(List pricing) { - + public ArrayInfo pricing(@javax.annotation.Nullable List pricing) { this.pricing = pricing; return this; } @@ -414,25 +427,21 @@ public ArrayInfo addPricingItem(Pricing pricingItem) { return this; } - /** + /** * list of pricing created for this array * @return pricing - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "list of pricing created for this array") - public List getPricing() { return pricing; } - - public void setPricing(List pricing) { + public void setPricing(@javax.annotation.Nullable List pricing) { this.pricing = pricing; } - public ArrayInfo subscriptions(List subscriptions) { - + public ArrayInfo subscriptions(@javax.annotation.Nullable List subscriptions) { this.subscriptions = subscriptions; return this; } @@ -445,177 +454,146 @@ public ArrayInfo addSubscriptionsItem(Subscription subscriptionsItem) { return this; } - /** + /** * list of subscriptions created for this array * @return subscriptions - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "list of subscriptions created for this array") - public List getSubscriptions() { return subscriptions; } - - public void setSubscriptions(List subscriptions) { + public void setSubscriptions(@javax.annotation.Nullable List subscriptions) { this.subscriptions = subscriptions; } - public ArrayInfo logo(String logo) { - + public ArrayInfo logo(@javax.annotation.Nullable String logo) { this.logo = logo; return this; } - /** + /** * logo (base64 encoded) for the array. Optional * @return logo - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "logo (base64 encoded) for the array. Optional") - public String getLogo() { return logo; } - - public void setLogo(String logo) { + public void setLogo(@javax.annotation.Nullable String logo) { this.logo = logo; } - public ArrayInfo accessCredentialsName(String accessCredentialsName) { - + public ArrayInfo accessCredentialsName(@javax.annotation.Nullable String accessCredentialsName) { this.accessCredentialsName = accessCredentialsName; return this; } - /** + /** * the name of the access credentials to use. if unset, the default credentials will be used * @return accessCredentialsName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "the name of the access credentials to use. if unset, the default credentials will be used") - public String getAccessCredentialsName() { return accessCredentialsName; } - - public void setAccessCredentialsName(String accessCredentialsName) { + public void setAccessCredentialsName(@javax.annotation.Nullable String accessCredentialsName) { this.accessCredentialsName = accessCredentialsName; } - public ArrayInfo type(ArrayType type) { - + public ArrayInfo type(@javax.annotation.Nullable ArrayType type) { this.type = type; return this; } - /** + /** * Get type * @return type - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public ArrayType getType() { return type; } - - public void setType(ArrayType type) { + public void setType(@javax.annotation.Nullable ArrayType type) { this.type = type; } - public ArrayInfo shareCount(BigDecimal shareCount) { - + public ArrayInfo shareCount(@javax.annotation.Nullable BigDecimal shareCount) { this.shareCount = shareCount; return this; } - /** + /** * number of unique namespaces this array is shared with * @return shareCount - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "number of unique namespaces this array is shared with") - public BigDecimal getShareCount() { return shareCount; } - - public void setShareCount(BigDecimal shareCount) { + public void setShareCount(@javax.annotation.Nullable BigDecimal shareCount) { this.shareCount = shareCount; } - public ArrayInfo publicShare(Boolean publicShare) { - + public ArrayInfo publicShare(@javax.annotation.Nullable Boolean publicShare) { this.publicShare = publicShare; return this; } - /** + /** * Suggests if the array was shared to public by owner * @return publicShare - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "Suggests if the array was shared to public by owner") - public Boolean getPublicShare() { return publicShare; } - - public void setPublicShare(Boolean publicShare) { + public void setPublicShare(@javax.annotation.Nullable Boolean publicShare) { this.publicShare = publicShare; } - /** + /** * Depends on the namespace asking, denotes the existence of subscription of namespace to this array * @return namespaceSubscribed - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "false", value = "Depends on the namespace asking, denotes the existence of subscription of namespace to this array") - public Boolean getNamespaceSubscribed() { return namespaceSubscribed; } - - public ArrayInfo tiledbUri(String tiledbUri) { - + public ArrayInfo tiledbUri(@javax.annotation.Nullable String tiledbUri) { this.tiledbUri = tiledbUri; return this; } - /** + /** * uri for access through TileDB cloud * @return tiledbUri - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "uri for access through TileDB cloud") - public String getTiledbUri() { return tiledbUri; } - - public void setTiledbUri(String tiledbUri) { + public void setTiledbUri(@javax.annotation.Nullable String tiledbUri) { this.tiledbUri = tiledbUri; } - public ArrayInfo tags(List tags) { - + public ArrayInfo tags(@javax.annotation.Nullable List tags) { this.tags = tags; return this; } @@ -628,151 +606,162 @@ public ArrayInfo addTagsItem(String tagsItem) { return this; } - /** + /** * optional tags for array * @return tags - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "optional tags for array") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nullable List tags) { this.tags = tags; } - public ArrayInfo licenseId(String licenseId) { - + public ArrayInfo licenseId(@javax.annotation.Nullable String licenseId) { this.licenseId = licenseId; return this; } - /** + /** * License identifier from SPDX License List or Custom * @return licenseId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "License identifier from SPDX License List or Custom") - public String getLicenseId() { return licenseId; } - - public void setLicenseId(String licenseId) { + public void setLicenseId(@javax.annotation.Nullable String licenseId) { this.licenseId = licenseId; } - public ArrayInfo licenseText(String licenseText) { - + public ArrayInfo licenseText(@javax.annotation.Nullable String licenseText) { this.licenseText = licenseText; return this; } - /** + /** * License text * @return licenseText - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "License text") - public String getLicenseText() { return licenseText; } - - public void setLicenseText(String licenseText) { + public void setLicenseText(@javax.annotation.Nullable String licenseText) { this.licenseText = licenseText; } - public ArrayInfo readOnly(Boolean readOnly) { - + public ArrayInfo readOnly(@javax.annotation.Nullable Boolean readOnly) { this.readOnly = readOnly; return this; } - /** + /** * Suggests if the array is in read_only mode * @return readOnly - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "false", value = "Suggests if the array is in read_only mode") - public Boolean getReadOnly() { return readOnly; } - - public void setReadOnly(Boolean readOnly) { + public void setReadOnly(@javax.annotation.Nullable Boolean readOnly) { this.readOnly = readOnly; } - public ArrayInfo isFavorite(Boolean isFavorite) { - + public ArrayInfo isFavorite(@javax.annotation.Nullable Boolean isFavorite) { this.isFavorite = isFavorite; return this; } - /** + /** * Indicates whether the array is in user favorites * @return isFavorite - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "Indicates whether the array is in user favorites") - public Boolean getIsFavorite() { return isFavorite; } - - public void setIsFavorite(Boolean isFavorite) { + public void setIsFavorite(@javax.annotation.Nullable Boolean isFavorite) { this.isFavorite = isFavorite; } + + public ArrayInfo createdAt(@javax.annotation.Nullable OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. + * Datetime array was registered with tiledb + * @return createdAt */ - private Map additionalProperties; + @javax.annotation.Nullable + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nullable OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public ArrayInfo createdBy(@javax.annotation.Nullable String createdBy) { + this.createdBy = createdBy; + return this; + } /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. + * The user who created the array, if known. + * @return createdBy */ - public ArrayInfo putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); + @javax.annotation.Nullable + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(@javax.annotation.Nullable String createdBy) { + this.createdBy = createdBy; + } + + + public ArrayInfo metadata(@javax.annotation.Nullable List metadata) { + this.metadata = metadata; + return this; + } + + public ArrayInfo addMetadataItem(MetadataStringifiedEntry metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); } - this.additionalProperties.put(key, value); + this.metadata.add(metadataItem); return this; } /** - * Return the additional (undeclared) property. + * Contains the metadata of the array. **Note:** This property is included in the response only if the `with_metadata` query parameter is set to `true`. + * @return metadata */ - public Map getAdditionalProperties() { - return additionalProperties; + @javax.annotation.Nullable + public List getMetadata() { + return metadata; } - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); + public void setMetadata(@javax.annotation.Nullable List metadata) { + this.metadata = metadata; } + @Override public boolean equals(Object o) { if (this == o) { @@ -805,8 +794,10 @@ public boolean equals(Object o) { Objects.equals(this.licenseId, arrayInfo.licenseId) && Objects.equals(this.licenseText, arrayInfo.licenseText) && Objects.equals(this.readOnly, arrayInfo.readOnly) && - Objects.equals(this.isFavorite, arrayInfo.isFavorite)&& - Objects.equals(this.additionalProperties, arrayInfo.additionalProperties); + Objects.equals(this.isFavorite, arrayInfo.isFavorite) && + Objects.equals(this.createdAt, arrayInfo.createdAt) && + Objects.equals(this.createdBy, arrayInfo.createdBy) && + Objects.equals(this.metadata, arrayInfo.metadata); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -815,7 +806,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, fileType, fileProperties, uri, namespace, size, lastAccessed, description, name, allowedActions, pricing, subscriptions, logo, accessCredentialsName, type, shareCount, publicShare, namespaceSubscribed, tiledbUri, tags, licenseId, licenseText, readOnly, isFavorite, additionalProperties); + return Objects.hash(id, fileType, fileProperties, uri, namespace, size, lastAccessed, description, name, allowedActions, pricing, subscriptions, logo, accessCredentialsName, type, shareCount, publicShare, namespaceSubscribed, tiledbUri, tags, licenseId, licenseText, readOnly, isFavorite, createdAt, createdBy, metadata); } private static int hashCodeNullable(JsonNullable a) { @@ -853,7 +844,9 @@ public String toString() { sb.append(" licenseText: ").append(toIndentedString(licenseText)).append("\n"); sb.append(" readOnly: ").append(toIndentedString(readOnly)).append("\n"); sb.append(" isFavorite: ").append(toIndentedString(isFavorite)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); sb.append("}"); return sb.toString(); } @@ -900,28 +893,42 @@ private String toIndentedString(Object o) { openapiFields.add("license_text"); openapiFields.add("read_only"); openapiFields.add("is_favorite"); + openapiFields.add("created_at"); + openapiFields.add("created_by"); + openapiFields.add("metadata"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ArrayInfo - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (ArrayInfo.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 ArrayInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ArrayInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in ArrayInfo is not found in the empty JSON string", ArrayInfo.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ArrayInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ArrayInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !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())); } + // validate the optional field `file_type` + if (jsonObj.get("file_type") != null && !jsonObj.get("file_type").isJsonNull()) { + FileType.validateJsonElement(jsonObj.get("file_type")); + } if ((jsonObj.get("uri") != null && !jsonObj.get("uri").isJsonNull()) && !jsonObj.get("uri").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `uri` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uri").toString())); } @@ -934,33 +941,37 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !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())); } - // ensure the json data is an array - if ((jsonObj.get("allowed_actions") != null && !jsonObj.get("allowed_actions").isJsonNull()) && !jsonObj.get("allowed_actions").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("allowed_actions") != null && !jsonObj.get("allowed_actions").isJsonNull() && !jsonObj.get("allowed_actions").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `allowed_actions` to be an array in the JSON string but got `%s`", jsonObj.get("allowed_actions").toString())); } - JsonArray jsonArraypricing = jsonObj.getAsJsonArray("pricing"); - if (jsonArraypricing != null) { - // ensure the json data is an array - if (!jsonObj.get("pricing").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `pricing` to be an array in the JSON string but got `%s`", jsonObj.get("pricing").toString())); + if (jsonObj.get("pricing") != null && !jsonObj.get("pricing").isJsonNull()) { + JsonArray jsonArraypricing = jsonObj.getAsJsonArray("pricing"); + if (jsonArraypricing != null) { + // ensure the json data is an array + if (!jsonObj.get("pricing").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `pricing` to be an array in the JSON string but got `%s`", jsonObj.get("pricing").toString())); + } + + // validate the optional field `pricing` (array) + for (int i = 0; i < jsonArraypricing.size(); i++) { + Pricing.validateJsonElement(jsonArraypricing.get(i)); + }; } - - // validate the optional field `pricing` (array) - for (int i = 0; i < jsonArraypricing.size(); i++) { - Pricing.validateJsonObject(jsonArraypricing.get(i).getAsJsonObject()); - }; } - JsonArray jsonArraysubscriptions = jsonObj.getAsJsonArray("subscriptions"); - if (jsonArraysubscriptions != null) { - // ensure the json data is an array - if (!jsonObj.get("subscriptions").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `subscriptions` to be an array in the JSON string but got `%s`", jsonObj.get("subscriptions").toString())); + if (jsonObj.get("subscriptions") != null && !jsonObj.get("subscriptions").isJsonNull()) { + JsonArray jsonArraysubscriptions = jsonObj.getAsJsonArray("subscriptions"); + if (jsonArraysubscriptions != null) { + // ensure the json data is an array + if (!jsonObj.get("subscriptions").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `subscriptions` to be an array in the JSON string but got `%s`", jsonObj.get("subscriptions").toString())); + } + + // validate the optional field `subscriptions` (array) + for (int i = 0; i < jsonArraysubscriptions.size(); i++) { + Subscription.validateJsonElement(jsonArraysubscriptions.get(i)); + }; } - - // validate the optional field `subscriptions` (array) - for (int i = 0; i < jsonArraysubscriptions.size(); i++) { - Subscription.validateJsonObject(jsonArraysubscriptions.get(i).getAsJsonObject()); - }; } if ((jsonObj.get("logo") != null && !jsonObj.get("logo").isJsonNull()) && !jsonObj.get("logo").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `logo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("logo").toString())); @@ -968,11 +979,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("access_credentials_name") != null && !jsonObj.get("access_credentials_name").isJsonNull()) && !jsonObj.get("access_credentials_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `access_credentials_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("access_credentials_name").toString())); } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + ArrayType.validateJsonElement(jsonObj.get("type")); + } if ((jsonObj.get("tiledb_uri") != null && !jsonObj.get("tiledb_uri").isJsonNull()) && !jsonObj.get("tiledb_uri").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `tiledb_uri` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tiledb_uri").toString())); } - // ensure the json data is an array - if ((jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) && !jsonObj.get("tags").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if ((jsonObj.get("license_id") != null && !jsonObj.get("license_id").isJsonNull()) && !jsonObj.get("license_id").isJsonPrimitive()) { @@ -981,6 +996,23 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("license_text") != null && !jsonObj.get("license_text").isJsonNull()) && !jsonObj.get("license_text").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `license_text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("license_text").toString())); } + if ((jsonObj.get("created_by") != null && !jsonObj.get("created_by").isJsonNull()) && !jsonObj.get("created_by").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `created_by` to be a primitive type in the JSON string but got `%s`", jsonObj.get("created_by").toString())); + } + if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + if (jsonArraymetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata` to be an array in the JSON string but got `%s`", jsonObj.get("metadata").toString())); + } + + // validate the optional field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + MetadataStringifiedEntry.validateJsonElement(jsonArraymetadata.get(i)); + }; + } + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -998,71 +1030,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ArrayInfo value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 ArrayInfo read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - ArrayInfo 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ArrayInfo given an JSON string - * - * @param jsonString JSON string - * @return An instance of ArrayInfo - * @throws IOException if the JSON string is invalid with respect to ArrayInfo - */ + /** + * Create an instance of ArrayInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of ArrayInfo + * @throws IOException if the JSON string is invalid with respect to ArrayInfo + */ public static ArrayInfo fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ArrayInfo.class); } - /** - * Convert an instance of ArrayInfo to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ArrayInfo to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayInfoUpdate.java b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayInfoUpdate.java index 7a70912..c46a946 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayInfoUpdate.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayInfoUpdate.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,180 +11,186 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; - -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.model.FileType; import org.openapitools.jackson.nullable.JsonNullable; 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.util.HashMap; import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; /** * metadata of an array */ -@ApiModel(description = "metadata of an array") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ArrayInfoUpdate { public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_URI = "uri"; @SerializedName(SERIALIZED_NAME_URI) + @javax.annotation.Nullable private String uri; public static final String SERIALIZED_NAME_FILE_TYPE = "file_type"; @SerializedName(SERIALIZED_NAME_FILE_TYPE) + @javax.annotation.Nullable private FileType fileType; public static final String SERIALIZED_NAME_FILE_PROPERTIES = "file_properties"; @SerializedName(SERIALIZED_NAME_FILE_PROPERTIES) - private Map fileProperties = null; + @javax.annotation.Nullable + private Map fileProperties = new HashMap<>(); public static final String SERIALIZED_NAME_ACCESS_CREDENTIALS_NAME = "access_credentials_name"; @SerializedName(SERIALIZED_NAME_ACCESS_CREDENTIALS_NAME) + @javax.annotation.Nullable private String accessCredentialsName; public static final String SERIALIZED_NAME_LOGO = "logo"; @SerializedName(SERIALIZED_NAME_LOGO) + @javax.annotation.Nullable private String logo; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; + @javax.annotation.Nullable + private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_LICENSE_ID = "license_id"; @SerializedName(SERIALIZED_NAME_LICENSE_ID) + @javax.annotation.Nullable private String licenseId; public static final String SERIALIZED_NAME_LICENSE_TEXT = "license_text"; @SerializedName(SERIALIZED_NAME_LICENSE_TEXT) + @javax.annotation.Nullable private String licenseText; public static final String SERIALIZED_NAME_READ_ONLY = "read_only"; @SerializedName(SERIALIZED_NAME_READ_ONLY) + @javax.annotation.Nullable private Boolean readOnly; public ArrayInfoUpdate() { } - public ArrayInfoUpdate description(String description) { - + public ArrayInfoUpdate description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * description of array * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "description of array") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public ArrayInfoUpdate name(String name) { - + public ArrayInfoUpdate name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * description of array * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "myarray1", value = "description of array") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public ArrayInfoUpdate uri(String uri) { - + public ArrayInfoUpdate uri(@javax.annotation.Nullable String uri) { this.uri = uri; return this; } - /** + /** * uri of array * @return uri - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "s3://bucket/array", value = "uri of array") - public String getUri() { return uri; } - - public void setUri(String uri) { + public void setUri(@javax.annotation.Nullable String uri) { this.uri = uri; } - public ArrayInfoUpdate fileType(FileType fileType) { - + public ArrayInfoUpdate fileType(@javax.annotation.Nullable FileType fileType) { this.fileType = fileType; return this; } - /** + /** * Get fileType * @return fileType - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public FileType getFileType() { return fileType; } - - public void setFileType(FileType fileType) { + public void setFileType(@javax.annotation.Nullable FileType fileType) { this.fileType = fileType; } - public ArrayInfoUpdate fileProperties(Map fileProperties) { - + public ArrayInfoUpdate fileProperties(@javax.annotation.Nullable Map fileProperties) { this.fileProperties = fileProperties; return this; } @@ -197,71 +203,59 @@ public ArrayInfoUpdate putFilePropertiesItem(String key, String filePropertiesIt return this; } - /** + /** * map of file properties created for this array * @return fileProperties - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "map of file properties created for this array") - public Map getFileProperties() { return fileProperties; } - - public void setFileProperties(Map fileProperties) { + public void setFileProperties(@javax.annotation.Nullable Map fileProperties) { this.fileProperties = fileProperties; } - public ArrayInfoUpdate accessCredentialsName(String accessCredentialsName) { - + public ArrayInfoUpdate accessCredentialsName(@javax.annotation.Nullable String accessCredentialsName) { this.accessCredentialsName = accessCredentialsName; return this; } - /** + /** * the name of the access credentials to use. if unset, the default credentials will be used * @return accessCredentialsName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "the name of the access credentials to use. if unset, the default credentials will be used") - public String getAccessCredentialsName() { return accessCredentialsName; } - - public void setAccessCredentialsName(String accessCredentialsName) { + public void setAccessCredentialsName(@javax.annotation.Nullable String accessCredentialsName) { this.accessCredentialsName = accessCredentialsName; } - public ArrayInfoUpdate logo(String logo) { - + public ArrayInfoUpdate logo(@javax.annotation.Nullable String logo) { this.logo = logo; return this; } - /** + /** * logo (base64 encoded) for the array. Optional * @return logo - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "logo (base64 encoded) for the array. Optional") - public String getLogo() { return logo; } - - public void setLogo(String logo) { + public void setLogo(@javax.annotation.Nullable String logo) { this.logo = logo; } - public ArrayInfoUpdate tags(List tags) { - + public ArrayInfoUpdate tags(@javax.annotation.Nullable List tags) { this.tags = tags; return this; } @@ -274,126 +268,76 @@ public ArrayInfoUpdate addTagsItem(String tagsItem) { return this; } - /** + /** * optional tags for array * @return tags - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "optional tags for array") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nullable List tags) { this.tags = tags; } - public ArrayInfoUpdate licenseId(String licenseId) { - + public ArrayInfoUpdate licenseId(@javax.annotation.Nullable String licenseId) { this.licenseId = licenseId; return this; } - /** + /** * License identifier from SPDX License List or Custom * @return licenseId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "License identifier from SPDX License List or Custom") - public String getLicenseId() { return licenseId; } - - public void setLicenseId(String licenseId) { + public void setLicenseId(@javax.annotation.Nullable String licenseId) { this.licenseId = licenseId; } - public ArrayInfoUpdate licenseText(String licenseText) { - + public ArrayInfoUpdate licenseText(@javax.annotation.Nullable String licenseText) { this.licenseText = licenseText; return this; } - /** + /** * License text * @return licenseText - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "License text") - public String getLicenseText() { return licenseText; } - - public void setLicenseText(String licenseText) { + public void setLicenseText(@javax.annotation.Nullable String licenseText) { this.licenseText = licenseText; } - public ArrayInfoUpdate readOnly(Boolean readOnly) { - + public ArrayInfoUpdate readOnly(@javax.annotation.Nullable Boolean readOnly) { this.readOnly = readOnly; return this; } - /** + /** * Suggests if the array is in read_only mode * @return readOnly - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "Suggests if the array is in read_only mode") - public Boolean getReadOnly() { return readOnly; } - - public void setReadOnly(Boolean readOnly) { + public void setReadOnly(@javax.annotation.Nullable Boolean readOnly) { this.readOnly = readOnly; } - /** - * 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. - */ - public ArrayInfoUpdate 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -415,8 +359,7 @@ public boolean equals(Object o) { Objects.equals(this.tags, arrayInfoUpdate.tags) && Objects.equals(this.licenseId, arrayInfoUpdate.licenseId) && Objects.equals(this.licenseText, arrayInfoUpdate.licenseText) && - Objects.equals(this.readOnly, arrayInfoUpdate.readOnly)&& - Objects.equals(this.additionalProperties, arrayInfoUpdate.additionalProperties); + Objects.equals(this.readOnly, arrayInfoUpdate.readOnly); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -425,7 +368,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(description, name, uri, fileType, fileProperties, accessCredentialsName, logo, tags, licenseId, licenseText, readOnly, additionalProperties); + return Objects.hash(description, name, uri, fileType, fileProperties, accessCredentialsName, logo, tags, licenseId, licenseText, readOnly); } private static int hashCodeNullable(JsonNullable a) { @@ -450,7 +393,6 @@ public String toString() { sb.append(" licenseId: ").append(toIndentedString(licenseId)).append("\n"); sb.append(" licenseText: ").append(toIndentedString(licenseText)).append("\n"); sb.append(" readOnly: ").append(toIndentedString(readOnly)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -489,20 +431,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ArrayInfoUpdate - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (ArrayInfoUpdate.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 ArrayInfoUpdate + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ArrayInfoUpdate.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in ArrayInfoUpdate is not found in the empty JSON string", ArrayInfoUpdate.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ArrayInfoUpdate.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ArrayInfoUpdate` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !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())); } @@ -512,14 +461,18 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("uri") != null && !jsonObj.get("uri").isJsonNull()) && !jsonObj.get("uri").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `uri` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uri").toString())); } + // validate the optional field `file_type` + if (jsonObj.get("file_type") != null && !jsonObj.get("file_type").isJsonNull()) { + FileType.validateJsonElement(jsonObj.get("file_type")); + } if ((jsonObj.get("access_credentials_name") != null && !jsonObj.get("access_credentials_name").isJsonNull()) && !jsonObj.get("access_credentials_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `access_credentials_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("access_credentials_name").toString())); } if ((jsonObj.get("logo") != null && !jsonObj.get("logo").isJsonNull()) && !jsonObj.get("logo").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `logo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("logo").toString())); } - // ensure the json data is an array - if ((jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) && !jsonObj.get("tags").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if ((jsonObj.get("license_id") != null && !jsonObj.get("license_id").isJsonNull()) && !jsonObj.get("license_id").isJsonPrimitive()) { @@ -545,71 +498,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ArrayInfoUpdate value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 ArrayInfoUpdate read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - ArrayInfoUpdate 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ArrayInfoUpdate given an JSON string - * - * @param jsonString JSON string - * @return An instance of ArrayInfoUpdate - * @throws IOException if the JSON string is invalid with respect to ArrayInfoUpdate - */ + /** + * Create an instance of ArrayInfoUpdate given an JSON string + * + * @param jsonString JSON string + * @return An instance of ArrayInfoUpdate + * @throws IOException if the JSON string is invalid with respect to ArrayInfoUpdate + */ public static ArrayInfoUpdate fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ArrayInfoUpdate.class); } - /** - * Convert an instance of ArrayInfoUpdate to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ArrayInfoUpdate to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayMetadata.java b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayMetadata.java index defbdda..9f0a6fc 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayMetadata.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayMetadata.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,48 +11,57 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.ArrayMetadataEntry; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * user's TileDB array metadata */ -@ApiModel(description = "user's TileDB array metadata") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ArrayMetadata { public static final String SERIALIZED_NAME_ENTRIES = "entries"; @SerializedName(SERIALIZED_NAME_ENTRIES) - private List entries = null; + @javax.annotation.Nullable + private List entries = new ArrayList<>(); public ArrayMetadata() { } - public ArrayMetadata entries(List entries) { - + public ArrayMetadata entries(@javax.annotation.Nullable List entries) { this.entries = entries; return this; } @@ -65,57 +74,19 @@ public ArrayMetadata addEntriesItem(ArrayMetadataEntry entriesItem) { return this; } - /** + /** * List of metadata entries * @return entries - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "List of metadata entries") - public List getEntries() { return entries; } - - public void setEntries(List entries) { + public void setEntries(@javax.annotation.Nullable List entries) { this.entries = entries; } - /** - * 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. - */ - public ArrayMetadata 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -127,13 +98,12 @@ public boolean equals(Object o) { return false; } ArrayMetadata arrayMetadata = (ArrayMetadata) o; - return Objects.equals(this.entries, arrayMetadata.entries)&& - Objects.equals(this.additionalProperties, arrayMetadata.additionalProperties); + return Objects.equals(this.entries, arrayMetadata.entries); } @Override public int hashCode() { - return Objects.hash(entries, additionalProperties); + return Objects.hash(entries); } @Override @@ -141,7 +111,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayMetadata {\n"); sb.append(" entries: ").append(toIndentedString(entries)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -170,31 +139,40 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ArrayMetadata - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (ArrayMetadata.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 ArrayMetadata + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ArrayMetadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in ArrayMetadata is not found in the empty JSON string", ArrayMetadata.openapiRequiredFields.toString())); } } - JsonArray jsonArrayentries = jsonObj.getAsJsonArray("entries"); - if (jsonArrayentries != null) { - // ensure the json data is an array - if (!jsonObj.get("entries").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `entries` to be an array in the JSON string but got `%s`", jsonObj.get("entries").toString())); - } - // validate the optional field `entries` (array) - for (int i = 0; i < jsonArrayentries.size(); i++) { - ArrayMetadataEntry.validateJsonObject(jsonArrayentries.get(i).getAsJsonObject()); - }; + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ArrayMetadata.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ArrayMetadata` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("entries") != null && !jsonObj.get("entries").isJsonNull()) { + JsonArray jsonArrayentries = jsonObj.getAsJsonArray("entries"); + if (jsonArrayentries != null) { + // ensure the json data is an array + if (!jsonObj.get("entries").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `entries` to be an array in the JSON string but got `%s`", jsonObj.get("entries").toString())); + } + + // validate the optional field `entries` (array) + for (int i = 0; i < jsonArrayentries.size(); i++) { + ArrayMetadataEntry.validateJsonElement(jsonArrayentries.get(i)); + }; + } } } @@ -213,71 +191,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ArrayMetadata value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 ArrayMetadata read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - ArrayMetadata 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ArrayMetadata given an JSON string - * - * @param jsonString JSON string - * @return An instance of ArrayMetadata - * @throws IOException if the JSON string is invalid with respect to ArrayMetadata - */ + /** + * Create an instance of ArrayMetadata given an JSON string + * + * @param jsonString JSON string + * @return An instance of ArrayMetadata + * @throws IOException if the JSON string is invalid with respect to ArrayMetadata + */ public static ArrayMetadata fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ArrayMetadata.class); } - /** - * Convert an instance of ArrayMetadata to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ArrayMetadata to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayMetadataEntry.java b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayMetadataEntry.java index fff00f8..3234888 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayMetadataEntry.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayMetadataEntry.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,133 +11,133 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * key/value pair representing an array metadata map entry */ -@ApiModel(description = "key/value pair representing an array metadata map entry") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ArrayMetadataEntry { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) + @javax.annotation.Nullable private String key; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable private String type; public static final String SERIALIZED_NAME_VALUE_NUM = "valueNum"; @SerializedName(SERIALIZED_NAME_VALUE_NUM) + @javax.annotation.Nullable private Integer valueNum; public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) - private List value = null; + @javax.annotation.Nullable + private List value = new ArrayList<>(); public static final String SERIALIZED_NAME_DEL = "del"; @SerializedName(SERIALIZED_NAME_DEL) + @javax.annotation.Nullable private Boolean del; public ArrayMetadataEntry() { } - public ArrayMetadataEntry key(String key) { - + public ArrayMetadataEntry key(@javax.annotation.Nullable String key) { this.key = key; return this; } - /** + /** * Get key * @return key - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getKey() { return key; } - - public void setKey(String key) { + public void setKey(@javax.annotation.Nullable String key) { this.key = key; } - public ArrayMetadataEntry type(String type) { - + public ArrayMetadataEntry type(@javax.annotation.Nullable String type) { this.type = type; return this; } - /** + /** * Get type * @return type - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getType() { return type; } - - public void setType(String type) { + public void setType(@javax.annotation.Nullable String type) { this.type = type; } - public ArrayMetadataEntry valueNum(Integer valueNum) { - + public ArrayMetadataEntry valueNum(@javax.annotation.Nullable Integer valueNum) { this.valueNum = valueNum; return this; } - /** + /** * Get valueNum * @return valueNum - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getValueNum() { return valueNum; } - - public void setValueNum(Integer valueNum) { + public void setValueNum(@javax.annotation.Nullable Integer valueNum) { this.valueNum = valueNum; } - public ArrayMetadataEntry value(List value) { - + public ArrayMetadataEntry value(@javax.annotation.Nullable List value) { this.value = value; return this; } @@ -150,80 +150,38 @@ public ArrayMetadataEntry addValueItem(Integer valueItem) { return this; } - /** + /** * Get value * @return value - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getValue() { return value; } - - public void setValue(List value) { + public void setValue(@javax.annotation.Nullable List value) { this.value = value; } - public ArrayMetadataEntry del(Boolean del) { - + public ArrayMetadataEntry del(@javax.annotation.Nullable Boolean del) { this.del = del; return this; } - /** + /** * Get del * @return del - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getDel() { return del; } - - public void setDel(Boolean del) { + public void setDel(@javax.annotation.Nullable Boolean del) { this.del = del; } - /** - * 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. - */ - public ArrayMetadataEntry 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -239,13 +197,12 @@ public boolean equals(Object o) { Objects.equals(this.type, arrayMetadataEntry.type) && Objects.equals(this.valueNum, arrayMetadataEntry.valueNum) && Objects.equals(this.value, arrayMetadataEntry.value) && - Objects.equals(this.del, arrayMetadataEntry.del)&& - Objects.equals(this.additionalProperties, arrayMetadataEntry.additionalProperties); + Objects.equals(this.del, arrayMetadataEntry.del); } @Override public int hashCode() { - return Objects.hash(key, type, valueNum, value, del, additionalProperties); + return Objects.hash(key, type, valueNum, value, del); } @Override @@ -257,7 +214,6 @@ public String toString() { sb.append(" valueNum: ").append(toIndentedString(valueNum)).append("\n"); sb.append(" value: ").append(toIndentedString(value)).append("\n"); sb.append(" del: ").append(toIndentedString(del)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -290,28 +246,35 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ArrayMetadataEntry - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (ArrayMetadataEntry.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 ArrayMetadataEntry + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ArrayMetadataEntry.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in ArrayMetadataEntry is not found in the empty JSON string", ArrayMetadataEntry.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ArrayMetadataEntry.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ArrayMetadataEntry` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("key") != null && !jsonObj.get("key").isJsonNull()) && !jsonObj.get("key").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); } if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !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())); } - // ensure the json data is an array - if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) && !jsonObj.get("value").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull() && !jsonObj.get("value").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `value` to be an array in the JSON string but got `%s`", jsonObj.get("value").toString())); } } @@ -331,71 +294,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ArrayMetadataEntry value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 ArrayMetadataEntry read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - ArrayMetadataEntry 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ArrayMetadataEntry given an JSON string - * - * @param jsonString JSON string - * @return An instance of ArrayMetadataEntry - * @throws IOException if the JSON string is invalid with respect to ArrayMetadataEntry - */ + /** + * Create an instance of ArrayMetadataEntry given an JSON string + * + * @param jsonString JSON string + * @return An instance of ArrayMetadataEntry + * @throws IOException if the JSON string is invalid with respect to ArrayMetadataEntry + */ public static ArrayMetadataEntry fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ArrayMetadataEntry.class); } - /** - * Convert an instance of ArrayMetadataEntry to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ArrayMetadataEntry to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/ArraySample.java b/src/main/java/io/tiledb/cloud/rest_api/model/ArraySample.java index 4410f69..9d1161e 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/ArraySample.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/ArraySample.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,101 +11,71 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Sample data from array */ -@ApiModel(description = "Sample data from array") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ArraySample { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable private Object data; public ArraySample() { } - public ArraySample data(Object data) { - + public ArraySample data(@javax.annotation.Nullable Object data) { this.data = data; return this; } - /** + /** * Get data * @return data - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Object getData() { return data; } - - public void setData(Object data) { + public void setData(@javax.annotation.Nullable Object data) { this.data = data; } - /** - * 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. - */ - public ArraySample 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -117,13 +87,12 @@ public boolean equals(Object o) { return false; } ArraySample arraySample = (ArraySample) o; - return Objects.equals(this.data, arraySample.data)&& - Objects.equals(this.additionalProperties, arraySample.additionalProperties); + return Objects.equals(this.data, arraySample.data); } @Override public int hashCode() { - return Objects.hash(data, additionalProperties); + return Objects.hash(data); } @Override @@ -131,7 +100,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArraySample {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -160,20 +128,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ArraySample - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (ArraySample.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 ArraySample + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ArraySample.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in ArraySample is not found in the empty JSON string", ArraySample.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ArraySample.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ArraySample` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -191,71 +166,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ArraySample value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 ArraySample read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - ArraySample 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ArraySample given an JSON string - * - * @param jsonString JSON string - * @return An instance of ArraySample - * @throws IOException if the JSON string is invalid with respect to ArraySample - */ + /** + * Create an instance of ArraySample given an JSON string + * + * @param jsonString JSON string + * @return An instance of ArraySample + * @throws IOException if the JSON string is invalid with respect to ArraySample + */ public static ArraySample fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ArraySample.class); } - /** - * Convert an instance of ArraySample to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ArraySample to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/ArraySchema.java b/src/main/java/io/tiledb/cloud/rest_api/model/ArraySchema.java index ba710cb..9c17fc8 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/ArraySchema.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/ArraySchema.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,384 +11,334 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.ArrayType; +import org.openapitools.client.model.Attribute; +import org.openapitools.client.model.Domain; +import org.openapitools.client.model.FilterPipeline; +import org.openapitools.client.model.Layout; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * ArraySchema during creation or retrieval */ -@ApiModel(description = "ArraySchema during creation or retrieval") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ArraySchema { public static final String SERIALIZED_NAME_URI = "uri"; @SerializedName(SERIALIZED_NAME_URI) + @javax.annotation.Nullable private String uri; public static final String SERIALIZED_NAME_VERSION = "version"; @SerializedName(SERIALIZED_NAME_VERSION) + @javax.annotation.Nonnull private List version = new ArrayList<>(); public static final String SERIALIZED_NAME_ARRAY_TYPE = "arrayType"; @SerializedName(SERIALIZED_NAME_ARRAY_TYPE) + @javax.annotation.Nonnull private ArrayType arrayType; public static final String SERIALIZED_NAME_TILE_ORDER = "tileOrder"; @SerializedName(SERIALIZED_NAME_TILE_ORDER) + @javax.annotation.Nonnull private Layout tileOrder; public static final String SERIALIZED_NAME_CELL_ORDER = "cellOrder"; @SerializedName(SERIALIZED_NAME_CELL_ORDER) + @javax.annotation.Nonnull private Layout cellOrder; public static final String SERIALIZED_NAME_CAPACITY = "capacity"; @SerializedName(SERIALIZED_NAME_CAPACITY) + @javax.annotation.Nonnull private Integer capacity; public static final String SERIALIZED_NAME_COORDS_FILTER_PIPELINE = "coordsFilterPipeline"; @SerializedName(SERIALIZED_NAME_COORDS_FILTER_PIPELINE) + @javax.annotation.Nonnull private FilterPipeline coordsFilterPipeline; public static final String SERIALIZED_NAME_OFFSET_FILTER_PIPELINE = "offsetFilterPipeline"; @SerializedName(SERIALIZED_NAME_OFFSET_FILTER_PIPELINE) + @javax.annotation.Nonnull private FilterPipeline offsetFilterPipeline; public static final String SERIALIZED_NAME_DOMAIN = "domain"; @SerializedName(SERIALIZED_NAME_DOMAIN) + @javax.annotation.Nonnull private Domain domain; public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + @javax.annotation.Nonnull private List attributes = new ArrayList<>(); public static final String SERIALIZED_NAME_ALLOWS_DUPLICATES = "allowsDuplicates"; @SerializedName(SERIALIZED_NAME_ALLOWS_DUPLICATES) + @javax.annotation.Nullable private Boolean allowsDuplicates; public ArraySchema() { } - public ArraySchema uri(String uri) { - + public ArraySchema uri(@javax.annotation.Nullable String uri) { this.uri = uri; return this; } - /** + /** * URI of schema * @return uri - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "s3:///test_array", value = "URI of schema") - public String getUri() { return uri; } - - public void setUri(String uri) { + public void setUri(@javax.annotation.Nullable String uri) { this.uri = uri; } - public ArraySchema version(List version) { - + public ArraySchema version(@javax.annotation.Nonnull List version) { this.version = version; return this; } public ArraySchema addVersionItem(Integer versionItem) { + if (this.version == null) { + this.version = new ArrayList<>(); + } this.version.add(versionItem); return this; } - /** + /** * file format version * @return version - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "[1, 3, 0]", required = true, value = "file format version") - public List getVersion() { return version; } - - public void setVersion(List version) { + public void setVersion(@javax.annotation.Nonnull List version) { this.version = version; } - public ArraySchema arrayType(ArrayType arrayType) { - + public ArraySchema arrayType(@javax.annotation.Nonnull ArrayType arrayType) { this.arrayType = arrayType; return this; } - /** + /** * Get arrayType * @return arrayType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public ArrayType getArrayType() { return arrayType; } - - public void setArrayType(ArrayType arrayType) { + public void setArrayType(@javax.annotation.Nonnull ArrayType arrayType) { this.arrayType = arrayType; } - public ArraySchema tileOrder(Layout tileOrder) { - + public ArraySchema tileOrder(@javax.annotation.Nonnull Layout tileOrder) { this.tileOrder = tileOrder; return this; } - /** + /** * Get tileOrder * @return tileOrder - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Layout getTileOrder() { return tileOrder; } - - public void setTileOrder(Layout tileOrder) { + public void setTileOrder(@javax.annotation.Nonnull Layout tileOrder) { this.tileOrder = tileOrder; } - public ArraySchema cellOrder(Layout cellOrder) { - + public ArraySchema cellOrder(@javax.annotation.Nonnull Layout cellOrder) { this.cellOrder = cellOrder; return this; } - /** + /** * Get cellOrder * @return cellOrder - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Layout getCellOrder() { return cellOrder; } - - public void setCellOrder(Layout cellOrder) { + public void setCellOrder(@javax.annotation.Nonnull Layout cellOrder) { this.cellOrder = cellOrder; } - public ArraySchema capacity(Integer capacity) { - + public ArraySchema capacity(@javax.annotation.Nonnull Integer capacity) { this.capacity = capacity; return this; } - /** + /** * Capacity of array * @return capacity - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "100000", required = true, value = "Capacity of array") - public Integer getCapacity() { return capacity; } - - public void setCapacity(Integer capacity) { + public void setCapacity(@javax.annotation.Nonnull Integer capacity) { this.capacity = capacity; } - public ArraySchema coordsFilterPipeline(FilterPipeline coordsFilterPipeline) { - + public ArraySchema coordsFilterPipeline(@javax.annotation.Nonnull FilterPipeline coordsFilterPipeline) { this.coordsFilterPipeline = coordsFilterPipeline; return this; } - /** + /** * Get coordsFilterPipeline * @return coordsFilterPipeline - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public FilterPipeline getCoordsFilterPipeline() { return coordsFilterPipeline; } - - public void setCoordsFilterPipeline(FilterPipeline coordsFilterPipeline) { + public void setCoordsFilterPipeline(@javax.annotation.Nonnull FilterPipeline coordsFilterPipeline) { this.coordsFilterPipeline = coordsFilterPipeline; } - public ArraySchema offsetFilterPipeline(FilterPipeline offsetFilterPipeline) { - + public ArraySchema offsetFilterPipeline(@javax.annotation.Nonnull FilterPipeline offsetFilterPipeline) { this.offsetFilterPipeline = offsetFilterPipeline; return this; } - /** + /** * Get offsetFilterPipeline * @return offsetFilterPipeline - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public FilterPipeline getOffsetFilterPipeline() { return offsetFilterPipeline; } - - public void setOffsetFilterPipeline(FilterPipeline offsetFilterPipeline) { + public void setOffsetFilterPipeline(@javax.annotation.Nonnull FilterPipeline offsetFilterPipeline) { this.offsetFilterPipeline = offsetFilterPipeline; } - public ArraySchema domain(Domain domain) { - + public ArraySchema domain(@javax.annotation.Nonnull Domain domain) { this.domain = domain; return this; } - /** + /** * Get domain * @return domain - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Domain getDomain() { return domain; } - - public void setDomain(Domain domain) { + public void setDomain(@javax.annotation.Nonnull Domain domain) { this.domain = domain; } - public ArraySchema attributes(List attributes) { - + public ArraySchema attributes(@javax.annotation.Nonnull List attributes) { this.attributes = attributes; return this; } public ArraySchema addAttributesItem(Attribute attributesItem) { + if (this.attributes == null) { + this.attributes = new ArrayList<>(); + } this.attributes.add(attributesItem); return this; } - /** + /** * Attributes of array * @return attributes - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Attributes of array") - public List getAttributes() { return attributes; } - - public void setAttributes(List attributes) { + public void setAttributes(@javax.annotation.Nonnull List attributes) { this.attributes = attributes; } - public ArraySchema allowsDuplicates(Boolean allowsDuplicates) { - + public ArraySchema allowsDuplicates(@javax.annotation.Nullable Boolean allowsDuplicates) { this.allowsDuplicates = allowsDuplicates; return this; } - /** + /** * True if the array allows coordinate duplicates. Applicable only to sparse arrays. * @return allowsDuplicates - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "True if the array allows coordinate duplicates. Applicable only to sparse arrays.") - public Boolean getAllowsDuplicates() { return allowsDuplicates; } - - public void setAllowsDuplicates(Boolean allowsDuplicates) { + public void setAllowsDuplicates(@javax.annotation.Nullable Boolean allowsDuplicates) { this.allowsDuplicates = allowsDuplicates; } - /** - * 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. - */ - public ArraySchema 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -410,13 +360,12 @@ public boolean equals(Object o) { Objects.equals(this.offsetFilterPipeline, arraySchema.offsetFilterPipeline) && Objects.equals(this.domain, arraySchema.domain) && Objects.equals(this.attributes, arraySchema.attributes) && - Objects.equals(this.allowsDuplicates, arraySchema.allowsDuplicates)&& - Objects.equals(this.additionalProperties, arraySchema.additionalProperties); + Objects.equals(this.allowsDuplicates, arraySchema.allowsDuplicates); } @Override public int hashCode() { - return Objects.hash(uri, version, arrayType, tileOrder, cellOrder, capacity, coordsFilterPipeline, offsetFilterPipeline, domain, attributes, allowsDuplicates, additionalProperties); + return Objects.hash(uri, version, arrayType, tileOrder, cellOrder, capacity, coordsFilterPipeline, offsetFilterPipeline, domain, attributes, allowsDuplicates); } @Override @@ -434,7 +383,6 @@ public String toString() { sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); sb.append(" allowsDuplicates: ").append(toIndentedString(allowsDuplicates)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -482,105 +430,112 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("attributes"); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ArraySchema - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (ArraySchema.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 ArraySchema + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ArraySchema.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in ArraySchema is not found in the empty JSON string", ArraySchema.openapiRequiredFields.toString())); } } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ArraySchema.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ArraySchema` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + // check to make sure all required properties/fields are present in the JSON string for (String requiredField : ArraySchema.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + 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("uri") != null && !jsonObj.get("uri").isJsonNull()) && !jsonObj.get("uri").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `uri` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uri").toString())); } - // ensure the json data is an array - if ((jsonObj.get("version") != null && !jsonObj.get("version").isJsonNull()) && !jsonObj.get("version").isJsonArray()) { + // ensure the required json array is present + if (jsonObj.get("version") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("version").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `version` to be an array in the JSON string but got `%s`", jsonObj.get("version").toString())); } - // validate the optional field `coordsFilterPipeline` - if (jsonObj.get("coordsFilterPipeline") != null && !jsonObj.get("coordsFilterPipeline").isJsonNull()) { - FilterPipeline.validateJsonObject(jsonObj.getAsJsonObject("coordsFilterPipeline")); - } - // validate the optional field `offsetFilterPipeline` - if (jsonObj.get("offsetFilterPipeline") != null && !jsonObj.get("offsetFilterPipeline").isJsonNull()) { - FilterPipeline.validateJsonObject(jsonObj.getAsJsonObject("offsetFilterPipeline")); - } - // validate the optional field `domain` - if (jsonObj.get("domain") != null && !jsonObj.get("domain").isJsonNull()) { - Domain.validateJsonObject(jsonObj.getAsJsonObject("domain")); + // validate the required field `arrayType` + ArrayType.validateJsonElement(jsonObj.get("arrayType")); + // validate the required field `tileOrder` + Layout.validateJsonElement(jsonObj.get("tileOrder")); + // validate the required field `cellOrder` + Layout.validateJsonElement(jsonObj.get("cellOrder")); + // validate the required field `coordsFilterPipeline` + FilterPipeline.validateJsonElement(jsonObj.get("coordsFilterPipeline")); + // validate the required field `offsetFilterPipeline` + FilterPipeline.validateJsonElement(jsonObj.get("offsetFilterPipeline")); + // validate the required field `domain` + Domain.validateJsonElement(jsonObj.get("domain")); + // ensure the json data is an array + if (!jsonObj.get("attributes").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `attributes` to be an array in the JSON string but got `%s`", jsonObj.get("attributes").toString())); } - JsonArray jsonArrayattributes = jsonObj.getAsJsonArray("attributes"); - if (jsonArrayattributes != null) { - // ensure the json data is an array - if (!jsonObj.get("attributes").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `attributes` to be an array in the JSON string but got `%s`", jsonObj.get("attributes").toString())); - } - // validate the optional field `attributes` (array) - for (int i = 0; i < jsonArrayattributes.size(); i++) { - Attribute.validateJsonObject(jsonArrayattributes.get(i).getAsJsonObject()); - }; - } + JsonArray jsonArrayattributes = jsonObj.getAsJsonArray("attributes"); + // validate the required field `attributes` (array) + for (int i = 0; i < jsonArrayattributes.size(); i++) { + Attribute.validateJsonElement(jsonArrayattributes.get(i)); + }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ArraySchema.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ArraySchema' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ArraySchema.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ArraySchema value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ArraySchema read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); + if (!ArraySchema.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ArraySchema' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ArraySchema.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ArraySchema value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ArraySchema read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } } - /** - * Create an instance of ArraySchema given an JSON string - * - * @param jsonString JSON string - * @return An instance of ArraySchema - * @throws IOException if the JSON string is invalid with respect to ArraySchema - */ + /** + * Create an instance of ArraySchema given an JSON string + * + * @param jsonString JSON string + * @return An instance of ArraySchema + * @throws IOException if the JSON string is invalid with respect to ArraySchema + */ public static ArraySchema fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ArraySchema.class); } - /** - * Convert an instance of ArraySchema to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ArraySchema to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/ArraySharing.java b/src/main/java/io/tiledb/cloud/rest_api/model/ArraySharing.java index 699939a..3a2feaa 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/ArraySharing.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/ArraySharing.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,55 +11,67 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.ArrayActions; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * details for sharing a given array */ -@ApiModel(description = "details for sharing a given array") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ArraySharing { public static final String SERIALIZED_NAME_ACTIONS = "actions"; @SerializedName(SERIALIZED_NAME_ACTIONS) - private List actions = null; + @javax.annotation.Nullable + private List actions = new ArrayList<>(); public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; @SerializedName(SERIALIZED_NAME_NAMESPACE) + @javax.annotation.Nullable private String namespace; public static final String SERIALIZED_NAME_NAMESPACE_TYPE = "namespace_type"; @SerializedName(SERIALIZED_NAME_NAMESPACE_TYPE) + @javax.annotation.Nullable private String namespaceType; public ArraySharing() { } - public ArraySharing actions(List actions) { - + public ArraySharing actions(@javax.annotation.Nullable List actions) { this.actions = actions; return this; } @@ -72,103 +84,57 @@ public ArraySharing addActionsItem(ArrayActions actionsItem) { return this; } - /** + /** * List of permitted actions * @return actions - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "[read, write]", value = "List of permitted actions") - public List getActions() { return actions; } - - public void setActions(List actions) { + public void setActions(@javax.annotation.Nullable List actions) { this.actions = actions; } - public ArraySharing namespace(String namespace) { - + public ArraySharing namespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; return this; } - /** + /** * namespace being granted array access can be a user or organization * @return namespace - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "MyOrganization", value = "namespace being granted array access can be a user or organization") - public String getNamespace() { return namespace; } - - public void setNamespace(String namespace) { + public void setNamespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; } - public ArraySharing namespaceType(String namespaceType) { - + public ArraySharing namespaceType(@javax.annotation.Nullable String namespaceType) { this.namespaceType = namespaceType; return this; } - /** + /** * details on if the namespace is a organization or user * @return namespaceType - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "organization", value = "details on if the namespace is a organization or user") - public String getNamespaceType() { return namespaceType; } - - public void setNamespaceType(String namespaceType) { + public void setNamespaceType(@javax.annotation.Nullable String namespaceType) { this.namespaceType = namespaceType; } - /** - * 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. - */ - public ArraySharing 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -182,13 +148,12 @@ public boolean equals(Object o) { ArraySharing arraySharing = (ArraySharing) o; return Objects.equals(this.actions, arraySharing.actions) && Objects.equals(this.namespace, arraySharing.namespace) && - Objects.equals(this.namespaceType, arraySharing.namespaceType)&& - Objects.equals(this.additionalProperties, arraySharing.additionalProperties); + Objects.equals(this.namespaceType, arraySharing.namespaceType); } @Override public int hashCode() { - return Objects.hash(actions, namespace, namespaceType, additionalProperties); + return Objects.hash(actions, namespace, namespaceType); } @Override @@ -198,7 +163,6 @@ public String toString() { sb.append(" actions: ").append(toIndentedString(actions)).append("\n"); sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); sb.append(" namespaceType: ").append(toIndentedString(namespaceType)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -229,22 +193,29 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ArraySharing - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (ArraySharing.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 ArraySharing + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ArraySharing.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in ArraySharing is not found in the empty JSON string", ArraySharing.openapiRequiredFields.toString())); } } - // ensure the json data is an array - if ((jsonObj.get("actions") != null && !jsonObj.get("actions").isJsonNull()) && !jsonObj.get("actions").isJsonArray()) { + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ArraySharing.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ArraySharing` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("actions") != null && !jsonObj.get("actions").isJsonNull() && !jsonObj.get("actions").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `actions` to be an array in the JSON string but got `%s`", jsonObj.get("actions").toString())); } if ((jsonObj.get("namespace") != null && !jsonObj.get("namespace").isJsonNull()) && !jsonObj.get("namespace").isJsonPrimitive()) { @@ -270,71 +241,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ArraySharing value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 ArraySharing read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - ArraySharing 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ArraySharing given an JSON string - * - * @param jsonString JSON string - * @return An instance of ArraySharing - * @throws IOException if the JSON string is invalid with respect to ArraySharing - */ + /** + * Create an instance of ArraySharing given an JSON string + * + * @param jsonString JSON string + * @return An instance of ArraySharing + * @throws IOException if the JSON string is invalid with respect to ArraySharing + */ public static ArraySharing fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ArraySharing.class); } - /** - * Convert an instance of ArraySharing to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ArraySharing to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayTask.java b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayTask.java index 5bd1e78..40f74ac 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayTask.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayTask.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,646 +11,615 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; - -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.model.ArrayActivityLog; +import org.openapitools.client.model.ArrayInfo; +import org.openapitools.client.model.ArrayTaskStatus; +import org.openapitools.client.model.ArrayTaskType; +import org.openapitools.client.model.DomainArray; +import org.openapitools.client.model.Querytype; +import org.openapitools.client.model.ResultFormat; import org.openapitools.jackson.nullable.JsonNullable; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; /** * Synchronous Task to Run */ -@ApiModel(description = "Synchronous Task to Run") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ArrayTask { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private String id; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_USERNAME = "username"; @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nullable private String username; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_ARRAY_METADATA = "array_metadata"; @SerializedName(SERIALIZED_NAME_ARRAY_METADATA) + @javax.annotation.Nullable private ArrayInfo arrayMetadata; public static final String SERIALIZED_NAME_SUBARRAY = "subarray"; @SerializedName(SERIALIZED_NAME_SUBARRAY) + @javax.annotation.Nullable private DomainArray subarray; public static final String SERIALIZED_NAME_MEMORY = "memory"; @SerializedName(SERIALIZED_NAME_MEMORY) + @javax.annotation.Nullable private Integer memory; public static final String SERIALIZED_NAME_CPU = "cpu"; @SerializedName(SERIALIZED_NAME_CPU) + @javax.annotation.Nullable private Integer cpu; public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; @SerializedName(SERIALIZED_NAME_NAMESPACE) + @javax.annotation.Nullable private String namespace; public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable private ArrayTaskStatus status; public static final String SERIALIZED_NAME_STATUS_MESSAGE = "status_message"; @SerializedName(SERIALIZED_NAME_STATUS_MESSAGE) + @javax.annotation.Nullable private String statusMessage; public static final String SERIALIZED_NAME_START_TIME = "start_time"; @SerializedName(SERIALIZED_NAME_START_TIME) + @javax.annotation.Nullable private OffsetDateTime startTime; public static final String SERIALIZED_NAME_FINISH_TIME = "finish_time"; @SerializedName(SERIALIZED_NAME_FINISH_TIME) + @javax.annotation.Nullable private OffsetDateTime finishTime; public static final String SERIALIZED_NAME_COST = "cost"; @SerializedName(SERIALIZED_NAME_COST) + @javax.annotation.Nullable private Double cost; public static final String SERIALIZED_NAME_EGRESS_COST = "egress_cost"; @SerializedName(SERIALIZED_NAME_EGRESS_COST) + @javax.annotation.Nullable private Double egressCost; public static final String SERIALIZED_NAME_ACCESS_COST = "access_cost"; @SerializedName(SERIALIZED_NAME_ACCESS_COST) + @javax.annotation.Nullable private Double accessCost; public static final String SERIALIZED_NAME_QUERY_TYPE = "query_type"; @SerializedName(SERIALIZED_NAME_QUERY_TYPE) + @javax.annotation.Nullable private Querytype queryType; public static final String SERIALIZED_NAME_UDF_CODE = "udf_code"; @SerializedName(SERIALIZED_NAME_UDF_CODE) + @javax.annotation.Nullable private String udfCode; public static final String SERIALIZED_NAME_UDF_LANGUAGE = "udf_language"; @SerializedName(SERIALIZED_NAME_UDF_LANGUAGE) + @javax.annotation.Nullable private String udfLanguage; public static final String SERIALIZED_NAME_SQL_QUERY = "sql_query"; @SerializedName(SERIALIZED_NAME_SQL_QUERY) + @javax.annotation.Nullable private String sqlQuery; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable private ArrayTaskType type; public static final String SERIALIZED_NAME_ACTIVITY = "activity"; @SerializedName(SERIALIZED_NAME_ACTIVITY) - private List activity = null; + @javax.annotation.Nullable + private List activity = new ArrayList<>(); public static final String SERIALIZED_NAME_LOGS = "logs"; @SerializedName(SERIALIZED_NAME_LOGS) + @javax.annotation.Nullable private String logs; public static final String SERIALIZED_NAME_DURATION = "duration"; @SerializedName(SERIALIZED_NAME_DURATION) + @javax.annotation.Nullable private BigDecimal duration; public static final String SERIALIZED_NAME_SQL_INIT_COMMANDS = "sql_init_commands"; @SerializedName(SERIALIZED_NAME_SQL_INIT_COMMANDS) - private List sqlInitCommands = null; + @javax.annotation.Nullable + private List sqlInitCommands = new ArrayList<>(); public static final String SERIALIZED_NAME_SQL_PARAMETERS = "sql_parameters"; @SerializedName(SERIALIZED_NAME_SQL_PARAMETERS) - private List sqlParameters = null; + @javax.annotation.Nullable + private List sqlParameters = new ArrayList<>(); public static final String SERIALIZED_NAME_RESULT_FORMAT = "result_format"; @SerializedName(SERIALIZED_NAME_RESULT_FORMAT) + @javax.annotation.Nullable private ResultFormat resultFormat; public static final String SERIALIZED_NAME_TASK_GRAPH_UUID = "task_graph_uuid"; @SerializedName(SERIALIZED_NAME_TASK_GRAPH_UUID) + @javax.annotation.Nullable private String taskGraphUuid; public static final String SERIALIZED_NAME_CLIENT_NODE_UUID = "client_node_uuid"; @SerializedName(SERIALIZED_NAME_CLIENT_NODE_UUID) + @javax.annotation.Nullable private String clientNodeUuid; + public static final String SERIALIZED_NAME_CLOUD_PROVIDER = "cloud_provider"; + @SerializedName(SERIALIZED_NAME_CLOUD_PROVIDER) + @javax.annotation.Nullable + private String cloudProvider; + + public static final String SERIALIZED_NAME_CLOUD_REGION = "cloud_region"; + @SerializedName(SERIALIZED_NAME_CLOUD_REGION) + @javax.annotation.Nullable + private String cloudRegion; + public ArrayTask() { } - public ArrayTask id(String id) { - + public ArrayTask id(@javax.annotation.Nullable String id) { this.id = id; return this; } - /** + /** * task ID * @return id - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "task ID") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nullable String id) { this.id = id; } - public ArrayTask name(String name) { - + public ArrayTask name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * Optional task name * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "subarray-multiplier", value = "Optional task name") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public ArrayTask username(String username) { - + public ArrayTask username(@javax.annotation.Nullable String username) { this.username = username; return this; } - /** + /** * username that executed this task * @return username - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "demo", value = "username that executed this task") - public String getUsername() { return username; } - - public void setUsername(String username) { + public void setUsername(@javax.annotation.Nullable String username) { this.username = username; } - public ArrayTask description(String description) { - + public ArrayTask description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * Optional task description (Tasks purpose) * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "Return attr a1 in the subarray bounded by coordinates and multiply attr1 by 2", value = "Optional task description (Tasks purpose)") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public ArrayTask arrayMetadata(ArrayInfo arrayMetadata) { - + public ArrayTask arrayMetadata(@javax.annotation.Nullable ArrayInfo arrayMetadata) { this.arrayMetadata = arrayMetadata; return this; } - /** + /** * Get arrayMetadata * @return arrayMetadata - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public ArrayInfo getArrayMetadata() { return arrayMetadata; } - - public void setArrayMetadata(ArrayInfo arrayMetadata) { + public void setArrayMetadata(@javax.annotation.Nullable ArrayInfo arrayMetadata) { this.arrayMetadata = arrayMetadata; } - public ArrayTask subarray(DomainArray subarray) { - + public ArrayTask subarray(@javax.annotation.Nullable DomainArray subarray) { this.subarray = subarray; return this; } - /** + /** * Get subarray * @return subarray - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public DomainArray getSubarray() { return subarray; } - - public void setSubarray(DomainArray subarray) { + public void setSubarray(@javax.annotation.Nullable DomainArray subarray) { this.subarray = subarray; } - public ArrayTask memory(Integer memory) { - + public ArrayTask memory(@javax.annotation.Nullable Integer memory) { this.memory = memory; return this; } - /** + /** * memory allocated to task in bytes * @return memory - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "1073741824", value = "memory allocated to task in bytes") - public Integer getMemory() { return memory; } - - public void setMemory(Integer memory) { + public void setMemory(@javax.annotation.Nullable Integer memory) { this.memory = memory; } - public ArrayTask cpu(Integer cpu) { - + public ArrayTask cpu(@javax.annotation.Nullable Integer cpu) { this.cpu = cpu; return this; } - /** + /** * millicpu allocated to task * @return cpu - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "4000", value = "millicpu allocated to task") - public Integer getCpu() { return cpu; } - - public void setCpu(Integer cpu) { + public void setCpu(@javax.annotation.Nullable Integer cpu) { this.cpu = cpu; } - public ArrayTask namespace(String namespace) { - + public ArrayTask namespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; return this; } - /** + /** * namespace task is tied to * @return namespace - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "organization1", value = "namespace task is tied to") - public String getNamespace() { return namespace; } - - public void setNamespace(String namespace) { + public void setNamespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; } - public ArrayTask status(ArrayTaskStatus status) { - + public ArrayTask status(@javax.annotation.Nullable ArrayTaskStatus status) { this.status = status; return this; } - /** + /** * Get status * @return status - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public ArrayTaskStatus getStatus() { return status; } - - public void setStatus(ArrayTaskStatus status) { + public void setStatus(@javax.annotation.Nullable ArrayTaskStatus status) { this.status = status; } - public ArrayTask statusMessage(String statusMessage) { - + public ArrayTask statusMessage(@javax.annotation.Nullable String statusMessage) { this.statusMessage = statusMessage; return this; } - /** + /** * The reason the array task status is in the state * @return statusMessage - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The reason the array task status is in the state") - public String getStatusMessage() { return statusMessage; } - - public void setStatusMessage(String statusMessage) { + public void setStatusMessage(@javax.annotation.Nullable String statusMessage) { this.statusMessage = statusMessage; } - public ArrayTask startTime(OffsetDateTime startTime) { - + public ArrayTask startTime(@javax.annotation.Nullable OffsetDateTime startTime) { this.startTime = startTime; return this; } - /** + /** * Start time RFC3339 for job * @return startTime - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Start time RFC3339 for job") - public OffsetDateTime getStartTime() { return startTime; } - - public void setStartTime(OffsetDateTime startTime) { + public void setStartTime(@javax.annotation.Nullable OffsetDateTime startTime) { this.startTime = startTime; } - public ArrayTask finishTime(OffsetDateTime finishTime) { - + public ArrayTask finishTime(@javax.annotation.Nullable OffsetDateTime finishTime) { this.finishTime = finishTime; return this; } - /** + /** * Finish time RFC3339 for job * @return finishTime - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Finish time RFC3339 for job") - public OffsetDateTime getFinishTime() { return finishTime; } - - public void setFinishTime(OffsetDateTime finishTime) { + public void setFinishTime(@javax.annotation.Nullable OffsetDateTime finishTime) { this.finishTime = finishTime; } - public ArrayTask cost(Double cost) { - + public ArrayTask cost(@javax.annotation.Nullable Double cost) { this.cost = cost; return this; } - /** + /** * Total accumulated for task in USD, example is $0.12 * @return cost - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "0.12", value = "Total accumulated for task in USD, example is $0.12") - public Double getCost() { return cost; } - - public void setCost(Double cost) { + public void setCost(@javax.annotation.Nullable Double cost) { this.cost = cost; } - public ArrayTask egressCost(Double egressCost) { - + public ArrayTask egressCost(@javax.annotation.Nullable Double egressCost) { this.egressCost = egressCost; return this; } - /** + /** * Total accumulated for egress task in USD, example is $0.12 * @return egressCost - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "0.12", value = "Total accumulated for egress task in USD, example is $0.12") - public Double getEgressCost() { return egressCost; } - - public void setEgressCost(Double egressCost) { + public void setEgressCost(@javax.annotation.Nullable Double egressCost) { this.egressCost = egressCost; } - public ArrayTask accessCost(Double accessCost) { - + public ArrayTask accessCost(@javax.annotation.Nullable Double accessCost) { this.accessCost = accessCost; return this; } - /** + /** * Cost accumulated for access task in USD, example is $0.12 * @return accessCost - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "0.12", value = "Cost accumulated for access task in USD, example is $0.12") - public Double getAccessCost() { return accessCost; } - - public void setAccessCost(Double accessCost) { + public void setAccessCost(@javax.annotation.Nullable Double accessCost) { this.accessCost = accessCost; } - public ArrayTask queryType(Querytype queryType) { - + public ArrayTask queryType(@javax.annotation.Nullable Querytype queryType) { this.queryType = queryType; return this; } - /** + /** * Get queryType * @return queryType - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Querytype getQueryType() { return queryType; } - - public void setQueryType(Querytype queryType) { + public void setQueryType(@javax.annotation.Nullable Querytype queryType) { this.queryType = queryType; } - public ArrayTask udfCode(String udfCode) { - + public ArrayTask udfCode(@javax.annotation.Nullable String udfCode) { this.udfCode = udfCode; return this; } - /** + /** * Optional actual code that is going to be executed * @return udfCode - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Optional actual code that is going to be executed") - public String getUdfCode() { return udfCode; } - - public void setUdfCode(String udfCode) { + public void setUdfCode(@javax.annotation.Nullable String udfCode) { this.udfCode = udfCode; } - public ArrayTask udfLanguage(String udfLanguage) { - + public ArrayTask udfLanguage(@javax.annotation.Nullable String udfLanguage) { this.udfLanguage = udfLanguage; return this; } - /** + /** * Optional actual language used to express udf_code * @return udfLanguage - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Optional actual language used to express udf_code") - public String getUdfLanguage() { return udfLanguage; } - - public void setUdfLanguage(String udfLanguage) { + public void setUdfLanguage(@javax.annotation.Nullable String udfLanguage) { this.udfLanguage = udfLanguage; } - public ArrayTask sqlQuery(String sqlQuery) { - + public ArrayTask sqlQuery(@javax.annotation.Nullable String sqlQuery) { this.sqlQuery = sqlQuery; return this; } - /** + /** * Optional actual sql query that is going to be executed * @return sqlQuery - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Optional actual sql query that is going to be executed") - public String getSqlQuery() { return sqlQuery; } - - public void setSqlQuery(String sqlQuery) { + public void setSqlQuery(@javax.annotation.Nullable String sqlQuery) { this.sqlQuery = sqlQuery; } - public ArrayTask type(ArrayTaskType type) { - + public ArrayTask type(@javax.annotation.Nullable ArrayTaskType type) { this.type = type; return this; } - /** + /** * Get type * @return type - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public ArrayTaskType getType() { return type; } - - public void setType(ArrayTaskType type) { + public void setType(@javax.annotation.Nullable ArrayTaskType type) { this.type = type; } - public ArrayTask activity(List activity) { - + public ArrayTask activity(@javax.annotation.Nullable List activity) { this.activity = activity; return this; } @@ -663,71 +632,59 @@ public ArrayTask addActivityItem(ArrayActivityLog activityItem) { return this; } - /** + /** * Array activity logs for task * @return activity - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Array activity logs for task") - public List getActivity() { return activity; } - - public void setActivity(List activity) { + public void setActivity(@javax.annotation.Nullable List activity) { this.activity = activity; } - public ArrayTask logs(String logs) { - + public ArrayTask logs(@javax.annotation.Nullable String logs) { this.logs = logs; return this; } - /** + /** * logs from array task * @return logs - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "logs from array task") - public String getLogs() { return logs; } - - public void setLogs(String logs) { + public void setLogs(@javax.annotation.Nullable String logs) { this.logs = logs; } - public ArrayTask duration(BigDecimal duration) { - + public ArrayTask duration(@javax.annotation.Nullable BigDecimal duration) { this.duration = duration; return this; } - /** + /** * duration in nanoseconds of an array task * @return duration - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "3.41E+11", value = "duration in nanoseconds of an array task") - public BigDecimal getDuration() { return duration; } - - public void setDuration(BigDecimal duration) { + public void setDuration(@javax.annotation.Nullable BigDecimal duration) { this.duration = duration; } - public ArrayTask sqlInitCommands(List sqlInitCommands) { - + public ArrayTask sqlInitCommands(@javax.annotation.Nullable List sqlInitCommands) { this.sqlInitCommands = sqlInitCommands; return this; } @@ -740,25 +697,21 @@ public ArrayTask addSqlInitCommandsItem(String sqlInitCommandsItem) { return this; } - /** + /** * SQL queries or commands to run before main sql query * @return sqlInitCommands - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "SQL queries or commands to run before main sql query") - public List getSqlInitCommands() { return sqlInitCommands; } - - public void setSqlInitCommands(List sqlInitCommands) { + public void setSqlInitCommands(@javax.annotation.Nullable List sqlInitCommands) { this.sqlInitCommands = sqlInitCommands; } - public ArrayTask sqlParameters(List sqlParameters) { - + public ArrayTask sqlParameters(@javax.annotation.Nullable List sqlParameters) { this.sqlParameters = sqlParameters; return this; } @@ -771,128 +724,116 @@ public ArrayTask addSqlParametersItem(Object sqlParametersItem) { return this; } - /** + /** * SQL query parameters * @return sqlParameters - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "SQL query parameters") - public List getSqlParameters() { return sqlParameters; } - - public void setSqlParameters(List sqlParameters) { + public void setSqlParameters(@javax.annotation.Nullable List sqlParameters) { this.sqlParameters = sqlParameters; } - public ArrayTask resultFormat(ResultFormat resultFormat) { - + public ArrayTask resultFormat(@javax.annotation.Nullable ResultFormat resultFormat) { this.resultFormat = resultFormat; return this; } - /** + /** * Get resultFormat * @return resultFormat - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public ResultFormat getResultFormat() { return resultFormat; } - - public void setResultFormat(ResultFormat resultFormat) { + public void setResultFormat(@javax.annotation.Nullable ResultFormat resultFormat) { this.resultFormat = resultFormat; } - public ArrayTask taskGraphUuid(String taskGraphUuid) { - + public ArrayTask taskGraphUuid(@javax.annotation.Nullable String taskGraphUuid) { this.taskGraphUuid = taskGraphUuid; return this; } - /** + /** * If set, the ID of the log for the task graph that this was part of. * @return taskGraphUuid - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "If set, the ID of the log for the task graph that this was part of. ") - public String getTaskGraphUuid() { return taskGraphUuid; } - - public void setTaskGraphUuid(String taskGraphUuid) { + public void setTaskGraphUuid(@javax.annotation.Nullable String taskGraphUuid) { this.taskGraphUuid = taskGraphUuid; } - public ArrayTask clientNodeUuid(String clientNodeUuid) { - + public ArrayTask clientNodeUuid(@javax.annotation.Nullable String clientNodeUuid) { this.clientNodeUuid = clientNodeUuid; return this; } - /** + /** * If set, the client-defined ID of the node within this task's graph. * @return clientNodeUuid - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "If set, the client-defined ID of the node within this task's graph. ") - public String getClientNodeUuid() { return clientNodeUuid; } - - public void setClientNodeUuid(String clientNodeUuid) { + public void setClientNodeUuid(@javax.annotation.Nullable String clientNodeUuid) { this.clientNodeUuid = clientNodeUuid; } - /** - * 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. - */ - public ArrayTask putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); + public ArrayTask cloudProvider(@javax.annotation.Nullable String cloudProvider) { + this.cloudProvider = cloudProvider; return this; } /** - * Return the additional (undeclared) property. + * The name of the cloud provider where this task executed. + * @return cloudProvider */ - public Map getAdditionalProperties() { - return additionalProperties; + @javax.annotation.Nullable + public String getCloudProvider() { + return cloudProvider; + } + + public void setCloudProvider(@javax.annotation.Nullable String cloudProvider) { + this.cloudProvider = cloudProvider; + } + + + public ArrayTask cloudRegion(@javax.annotation.Nullable String cloudRegion) { + this.cloudRegion = cloudRegion; + return this; } /** - * Return the additional (undeclared) property with the specified name. + * The region of the cloud provider where this task executed. + * @return cloudRegion */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); + @javax.annotation.Nullable + public String getCloudRegion() { + return cloudRegion; + } + + public void setCloudRegion(@javax.annotation.Nullable String cloudRegion) { + this.cloudRegion = cloudRegion; } + @Override public boolean equals(Object o) { if (this == o) { @@ -930,8 +871,9 @@ public boolean equals(Object o) { Objects.equals(this.sqlParameters, arrayTask.sqlParameters) && Objects.equals(this.resultFormat, arrayTask.resultFormat) && Objects.equals(this.taskGraphUuid, arrayTask.taskGraphUuid) && - Objects.equals(this.clientNodeUuid, arrayTask.clientNodeUuid)&& - Objects.equals(this.additionalProperties, arrayTask.additionalProperties); + Objects.equals(this.clientNodeUuid, arrayTask.clientNodeUuid) && + Objects.equals(this.cloudProvider, arrayTask.cloudProvider) && + Objects.equals(this.cloudRegion, arrayTask.cloudRegion); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -940,7 +882,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, name, username, description, arrayMetadata, subarray, memory, cpu, namespace, status, statusMessage, startTime, finishTime, cost, egressCost, accessCost, queryType, udfCode, udfLanguage, sqlQuery, type, activity, logs, duration, sqlInitCommands, sqlParameters, resultFormat, taskGraphUuid, clientNodeUuid, additionalProperties); + return Objects.hash(id, name, username, description, arrayMetadata, subarray, memory, cpu, namespace, status, statusMessage, startTime, finishTime, cost, egressCost, accessCost, queryType, udfCode, udfLanguage, sqlQuery, type, activity, logs, duration, sqlInitCommands, sqlParameters, resultFormat, taskGraphUuid, clientNodeUuid, cloudProvider, cloudRegion); } private static int hashCodeNullable(JsonNullable a) { @@ -983,7 +925,8 @@ public String toString() { sb.append(" resultFormat: ").append(toIndentedString(resultFormat)).append("\n"); sb.append(" taskGraphUuid: ").append(toIndentedString(taskGraphUuid)).append("\n"); sb.append(" clientNodeUuid: ").append(toIndentedString(clientNodeUuid)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append(" cloudProvider: ").append(toIndentedString(cloudProvider)).append("\n"); + sb.append(" cloudRegion: ").append(toIndentedString(cloudRegion)).append("\n"); sb.append("}"); return sb.toString(); } @@ -1035,25 +978,34 @@ private String toIndentedString(Object o) { openapiFields.add("result_format"); openapiFields.add("task_graph_uuid"); openapiFields.add("client_node_uuid"); + openapiFields.add("cloud_provider"); + openapiFields.add("cloud_region"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ArrayTask - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (ArrayTask.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 ArrayTask + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ArrayTask.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in ArrayTask is not found in the empty JSON string", ArrayTask.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ArrayTask.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ArrayTask` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !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())); } @@ -1068,18 +1020,26 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `array_metadata` if (jsonObj.get("array_metadata") != null && !jsonObj.get("array_metadata").isJsonNull()) { - ArrayInfo.validateJsonObject(jsonObj.getAsJsonObject("array_metadata")); + ArrayInfo.validateJsonElement(jsonObj.get("array_metadata")); } // validate the optional field `subarray` if (jsonObj.get("subarray") != null && !jsonObj.get("subarray").isJsonNull()) { - DomainArray.validateJsonObject(jsonObj.getAsJsonObject("subarray")); + DomainArray.validateJsonElement(jsonObj.get("subarray")); } if ((jsonObj.get("namespace") != null && !jsonObj.get("namespace").isJsonNull()) && !jsonObj.get("namespace").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `namespace` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespace").toString())); } + // validate the optional field `status` + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { + ArrayTaskStatus.validateJsonElement(jsonObj.get("status")); + } if ((jsonObj.get("status_message") != null && !jsonObj.get("status_message").isJsonNull()) && !jsonObj.get("status_message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `status_message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status_message").toString())); } + // validate the optional field `query_type` + if (jsonObj.get("query_type") != null && !jsonObj.get("query_type").isJsonNull()) { + Querytype.validateJsonElement(jsonObj.get("query_type")); + } if ((jsonObj.get("udf_code") != null && !jsonObj.get("udf_code").isJsonNull()) && !jsonObj.get("udf_code").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `udf_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("udf_code").toString())); } @@ -1089,35 +1049,51 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("sql_query") != null && !jsonObj.get("sql_query").isJsonNull()) && !jsonObj.get("sql_query").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `sql_query` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sql_query").toString())); } - JsonArray jsonArrayactivity = jsonObj.getAsJsonArray("activity"); - if (jsonArrayactivity != null) { - // ensure the json data is an array - if (!jsonObj.get("activity").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `activity` to be an array in the JSON string but got `%s`", jsonObj.get("activity").toString())); + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + ArrayTaskType.validateJsonElement(jsonObj.get("type")); + } + if (jsonObj.get("activity") != null && !jsonObj.get("activity").isJsonNull()) { + JsonArray jsonArrayactivity = jsonObj.getAsJsonArray("activity"); + if (jsonArrayactivity != null) { + // ensure the json data is an array + if (!jsonObj.get("activity").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `activity` to be an array in the JSON string but got `%s`", jsonObj.get("activity").toString())); + } + + // validate the optional field `activity` (array) + for (int i = 0; i < jsonArrayactivity.size(); i++) { + ArrayActivityLog.validateJsonElement(jsonArrayactivity.get(i)); + }; } - - // validate the optional field `activity` (array) - for (int i = 0; i < jsonArrayactivity.size(); i++) { - ArrayActivityLog.validateJsonObject(jsonArrayactivity.get(i).getAsJsonObject()); - }; } if ((jsonObj.get("logs") != null && !jsonObj.get("logs").isJsonNull()) && !jsonObj.get("logs").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `logs` to be a primitive type in the JSON string but got `%s`", jsonObj.get("logs").toString())); } - // ensure the json data is an array - if ((jsonObj.get("sql_init_commands") != null && !jsonObj.get("sql_init_commands").isJsonNull()) && !jsonObj.get("sql_init_commands").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("sql_init_commands") != null && !jsonObj.get("sql_init_commands").isJsonNull() && !jsonObj.get("sql_init_commands").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `sql_init_commands` to be an array in the JSON string but got `%s`", jsonObj.get("sql_init_commands").toString())); } - // ensure the json data is an array - if ((jsonObj.get("sql_parameters") != null && !jsonObj.get("sql_parameters").isJsonNull()) && !jsonObj.get("sql_parameters").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("sql_parameters") != null && !jsonObj.get("sql_parameters").isJsonNull() && !jsonObj.get("sql_parameters").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `sql_parameters` to be an array in the JSON string but got `%s`", jsonObj.get("sql_parameters").toString())); } + // validate the optional field `result_format` + if (jsonObj.get("result_format") != null && !jsonObj.get("result_format").isJsonNull()) { + ResultFormat.validateJsonElement(jsonObj.get("result_format")); + } if ((jsonObj.get("task_graph_uuid") != null && !jsonObj.get("task_graph_uuid").isJsonNull()) && !jsonObj.get("task_graph_uuid").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `task_graph_uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("task_graph_uuid").toString())); } if ((jsonObj.get("client_node_uuid") != null && !jsonObj.get("client_node_uuid").isJsonNull()) && !jsonObj.get("client_node_uuid").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `client_node_uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("client_node_uuid").toString())); } + if ((jsonObj.get("cloud_provider") != null && !jsonObj.get("cloud_provider").isJsonNull()) && !jsonObj.get("cloud_provider").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `cloud_provider` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cloud_provider").toString())); + } + if ((jsonObj.get("cloud_region") != null && !jsonObj.get("cloud_region").isJsonNull()) && !jsonObj.get("cloud_region").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `cloud_region` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cloud_region").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -1135,71 +1111,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ArrayTask value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 ArrayTask read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - ArrayTask 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ArrayTask given an JSON string - * - * @param jsonString JSON string - * @return An instance of ArrayTask - * @throws IOException if the JSON string is invalid with respect to ArrayTask - */ + /** + * Create an instance of ArrayTask given an JSON string + * + * @param jsonString JSON string + * @return An instance of ArrayTask + * @throws IOException if the JSON string is invalid with respect to ArrayTask + */ public static ArrayTask fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ArrayTask.class); } - /** - * Convert an instance of ArrayTask to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ArrayTask to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayTaskBrowserSidebar.java b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayTaskBrowserSidebar.java index f4d5e3a..00e33ef 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayTaskBrowserSidebar.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayTaskBrowserSidebar.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,55 +11,66 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Object for ui array tasks browser page */ -@ApiModel(description = "Object for ui array tasks browser page") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ArrayTaskBrowserSidebar { public static final String SERIALIZED_NAME_ORGANIZATIONS = "organizations"; @SerializedName(SERIALIZED_NAME_ORGANIZATIONS) - private List organizations = null; + @javax.annotation.Nullable + private List organizations = new ArrayList<>(); public static final String SERIALIZED_NAME_RESULT_COUNT_FOR_ALL = "result_count_for_all"; @SerializedName(SERIALIZED_NAME_RESULT_COUNT_FOR_ALL) + @javax.annotation.Nullable private Integer resultCountForAll; public static final String SERIALIZED_NAME_RESULT_COUNT_BY_NAMESPACE = "result_count_by_namespace"; @SerializedName(SERIALIZED_NAME_RESULT_COUNT_BY_NAMESPACE) + @javax.annotation.Nullable private Object resultCountByNamespace; public ArrayTaskBrowserSidebar() { } - public ArrayTaskBrowserSidebar organizations(List organizations) { - + public ArrayTaskBrowserSidebar organizations(@javax.annotation.Nullable List organizations) { this.organizations = organizations; return this; } @@ -72,103 +83,57 @@ public ArrayTaskBrowserSidebar addOrganizationsItem(String organizationsItem) { return this; } - /** + /** * list of all unique organizations the user is part of that have array tasks * @return organizations - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "list of all unique organizations the user is part of that have array tasks") - public List getOrganizations() { return organizations; } - - public void setOrganizations(List organizations) { + public void setOrganizations(@javax.annotation.Nullable List organizations) { this.organizations = organizations; } - public ArrayTaskBrowserSidebar resultCountForAll(Integer resultCountForAll) { - + public ArrayTaskBrowserSidebar resultCountForAll(@javax.annotation.Nullable Integer resultCountForAll) { this.resultCountForAll = resultCountForAll; return this; } - /** + /** * A count of \"all\" * @return resultCountForAll - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "A count of \"all\"") - public Integer getResultCountForAll() { return resultCountForAll; } - - public void setResultCountForAll(Integer resultCountForAll) { + public void setResultCountForAll(@javax.annotation.Nullable Integer resultCountForAll) { this.resultCountForAll = resultCountForAll; } - public ArrayTaskBrowserSidebar resultCountByNamespace(Object resultCountByNamespace) { - + public ArrayTaskBrowserSidebar resultCountByNamespace(@javax.annotation.Nullable Object resultCountByNamespace) { this.resultCountByNamespace = resultCountByNamespace; return this; } - /** + /** * A map that includes the result count by namespace * @return resultCountByNamespace - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "A map that includes the result count by namespace") - public Object getResultCountByNamespace() { return resultCountByNamespace; } - - public void setResultCountByNamespace(Object resultCountByNamespace) { + public void setResultCountByNamespace(@javax.annotation.Nullable Object resultCountByNamespace) { this.resultCountByNamespace = resultCountByNamespace; } - /** - * 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. - */ - public ArrayTaskBrowserSidebar 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -182,13 +147,12 @@ public boolean equals(Object o) { ArrayTaskBrowserSidebar arrayTaskBrowserSidebar = (ArrayTaskBrowserSidebar) o; return Objects.equals(this.organizations, arrayTaskBrowserSidebar.organizations) && Objects.equals(this.resultCountForAll, arrayTaskBrowserSidebar.resultCountForAll) && - Objects.equals(this.resultCountByNamespace, arrayTaskBrowserSidebar.resultCountByNamespace)&& - Objects.equals(this.additionalProperties, arrayTaskBrowserSidebar.additionalProperties); + Objects.equals(this.resultCountByNamespace, arrayTaskBrowserSidebar.resultCountByNamespace); } @Override public int hashCode() { - return Objects.hash(organizations, resultCountForAll, resultCountByNamespace, additionalProperties); + return Objects.hash(organizations, resultCountForAll, resultCountByNamespace); } @Override @@ -198,7 +162,6 @@ public String toString() { sb.append(" organizations: ").append(toIndentedString(organizations)).append("\n"); sb.append(" resultCountForAll: ").append(toIndentedString(resultCountForAll)).append("\n"); sb.append(" resultCountByNamespace: ").append(toIndentedString(resultCountByNamespace)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -229,22 +192,29 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ArrayTaskBrowserSidebar - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (ArrayTaskBrowserSidebar.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 ArrayTaskBrowserSidebar + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ArrayTaskBrowserSidebar.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in ArrayTaskBrowserSidebar is not found in the empty JSON string", ArrayTaskBrowserSidebar.openapiRequiredFields.toString())); } } - // ensure the json data is an array - if ((jsonObj.get("organizations") != null && !jsonObj.get("organizations").isJsonNull()) && !jsonObj.get("organizations").isJsonArray()) { + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ArrayTaskBrowserSidebar.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ArrayTaskBrowserSidebar` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("organizations") != null && !jsonObj.get("organizations").isJsonNull() && !jsonObj.get("organizations").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `organizations` to be an array in the JSON string but got `%s`", jsonObj.get("organizations").toString())); } } @@ -264,71 +234,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ArrayTaskBrowserSidebar value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 ArrayTaskBrowserSidebar read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - ArrayTaskBrowserSidebar 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ArrayTaskBrowserSidebar given an JSON string - * - * @param jsonString JSON string - * @return An instance of ArrayTaskBrowserSidebar - * @throws IOException if the JSON string is invalid with respect to ArrayTaskBrowserSidebar - */ + /** + * Create an instance of ArrayTaskBrowserSidebar given an JSON string + * + * @param jsonString JSON string + * @return An instance of ArrayTaskBrowserSidebar + * @throws IOException if the JSON string is invalid with respect to ArrayTaskBrowserSidebar + */ public static ArrayTaskBrowserSidebar fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ArrayTaskBrowserSidebar.class); } - /** - * Convert an instance of ArrayTaskBrowserSidebar to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ArrayTaskBrowserSidebar to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayTaskData.java b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayTaskData.java index da3a4b9..e0411e9 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayTaskData.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayTaskData.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,52 +11,63 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.ArrayTask; +import org.openapitools.client.model.PaginationMetadata; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Object including array tasks and metadata */ -@ApiModel(description = "Object including array tasks and metadata") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ArrayTaskData { public static final String SERIALIZED_NAME_ARRAY_TASKS = "array_tasks"; @SerializedName(SERIALIZED_NAME_ARRAY_TASKS) - private List arrayTasks = null; + @javax.annotation.Nullable + private List arrayTasks = new ArrayList<>(); public static final String SERIALIZED_NAME_PAGINATION_METADATA = "pagination_metadata"; @SerializedName(SERIALIZED_NAME_PAGINATION_METADATA) + @javax.annotation.Nullable private PaginationMetadata paginationMetadata; public ArrayTaskData() { } - public ArrayTaskData arrayTasks(List arrayTasks) { - + public ArrayTaskData arrayTasks(@javax.annotation.Nullable List arrayTasks) { this.arrayTasks = arrayTasks; return this; } @@ -69,80 +80,38 @@ public ArrayTaskData addArrayTasksItem(ArrayTask arrayTasksItem) { return this; } - /** + /** * Array Tasks * @return arrayTasks - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Array Tasks") - public List getArrayTasks() { return arrayTasks; } - - public void setArrayTasks(List arrayTasks) { + public void setArrayTasks(@javax.annotation.Nullable List arrayTasks) { this.arrayTasks = arrayTasks; } - public ArrayTaskData paginationMetadata(PaginationMetadata paginationMetadata) { - + public ArrayTaskData paginationMetadata(@javax.annotation.Nullable PaginationMetadata paginationMetadata) { this.paginationMetadata = paginationMetadata; return this; } - /** + /** * Get paginationMetadata * @return paginationMetadata - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public PaginationMetadata getPaginationMetadata() { return paginationMetadata; } - - public void setPaginationMetadata(PaginationMetadata paginationMetadata) { + public void setPaginationMetadata(@javax.annotation.Nullable PaginationMetadata paginationMetadata) { this.paginationMetadata = paginationMetadata; } - /** - * 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. - */ - public ArrayTaskData 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -155,13 +124,12 @@ public boolean equals(Object o) { } ArrayTaskData arrayTaskData = (ArrayTaskData) o; return Objects.equals(this.arrayTasks, arrayTaskData.arrayTasks) && - Objects.equals(this.paginationMetadata, arrayTaskData.paginationMetadata)&& - Objects.equals(this.additionalProperties, arrayTaskData.additionalProperties); + Objects.equals(this.paginationMetadata, arrayTaskData.paginationMetadata); } @Override public int hashCode() { - return Objects.hash(arrayTasks, paginationMetadata, additionalProperties); + return Objects.hash(arrayTasks, paginationMetadata); } @Override @@ -170,7 +138,6 @@ public String toString() { sb.append("class ArrayTaskData {\n"); sb.append(" arrayTasks: ").append(toIndentedString(arrayTasks)).append("\n"); sb.append(" paginationMetadata: ").append(toIndentedString(paginationMetadata)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -200,35 +167,44 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ArrayTaskData - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (ArrayTaskData.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 ArrayTaskData + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ArrayTaskData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in ArrayTaskData is not found in the empty JSON string", ArrayTaskData.openapiRequiredFields.toString())); } } - JsonArray jsonArrayarrayTasks = jsonObj.getAsJsonArray("array_tasks"); - if (jsonArrayarrayTasks != null) { - // ensure the json data is an array - if (!jsonObj.get("array_tasks").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `array_tasks` to be an array in the JSON string but got `%s`", jsonObj.get("array_tasks").toString())); - } - // validate the optional field `array_tasks` (array) - for (int i = 0; i < jsonArrayarrayTasks.size(); i++) { - ArrayTask.validateJsonObject(jsonArrayarrayTasks.get(i).getAsJsonObject()); - }; + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ArrayTaskData.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ArrayTaskData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("array_tasks") != null && !jsonObj.get("array_tasks").isJsonNull()) { + JsonArray jsonArrayarrayTasks = jsonObj.getAsJsonArray("array_tasks"); + if (jsonArrayarrayTasks != null) { + // ensure the json data is an array + if (!jsonObj.get("array_tasks").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `array_tasks` to be an array in the JSON string but got `%s`", jsonObj.get("array_tasks").toString())); + } + + // validate the optional field `array_tasks` (array) + for (int i = 0; i < jsonArrayarrayTasks.size(); i++) { + ArrayTask.validateJsonElement(jsonArrayarrayTasks.get(i)); + }; + } } // validate the optional field `pagination_metadata` if (jsonObj.get("pagination_metadata") != null && !jsonObj.get("pagination_metadata").isJsonNull()) { - PaginationMetadata.validateJsonObject(jsonObj.getAsJsonObject("pagination_metadata")); + PaginationMetadata.validateJsonElement(jsonObj.get("pagination_metadata")); } } @@ -247,71 +223,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ArrayTaskData value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 ArrayTaskData read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - ArrayTaskData 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ArrayTaskData given an JSON string - * - * @param jsonString JSON string - * @return An instance of ArrayTaskData - * @throws IOException if the JSON string is invalid with respect to ArrayTaskData - */ + /** + * Create an instance of ArrayTaskData given an JSON string + * + * @param jsonString JSON string + * @return An instance of ArrayTaskData + * @throws IOException if the JSON string is invalid with respect to ArrayTaskData + */ public static ArrayTaskData fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ArrayTaskData.class); } - /** - * Convert an instance of ArrayTaskData to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ArrayTaskData to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayTaskLog.java b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayTaskLog.java index 7e26d23..0641469 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayTaskLog.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayTaskLog.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,127 +11,95 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Array task stderr/stdout logs */ -@ApiModel(description = "Array task stderr/stdout logs") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ArrayTaskLog { public static final String SERIALIZED_NAME_ARRAY_TASK_ID = "array_task_id"; @SerializedName(SERIALIZED_NAME_ARRAY_TASK_ID) + @javax.annotation.Nullable private String arrayTaskId; public static final String SERIALIZED_NAME_LOGS = "logs"; @SerializedName(SERIALIZED_NAME_LOGS) + @javax.annotation.Nullable private String logs; public ArrayTaskLog() { } - public ArrayTaskLog arrayTaskId(String arrayTaskId) { - + public ArrayTaskLog arrayTaskId(@javax.annotation.Nullable String arrayTaskId) { this.arrayTaskId = arrayTaskId; return this; } - /** + /** * ID of associated task * @return arrayTaskId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "ID of associated task") - public String getArrayTaskId() { return arrayTaskId; } - - public void setArrayTaskId(String arrayTaskId) { + public void setArrayTaskId(@javax.annotation.Nullable String arrayTaskId) { this.arrayTaskId = arrayTaskId; } - public ArrayTaskLog logs(String logs) { - + public ArrayTaskLog logs(@javax.annotation.Nullable String logs) { this.logs = logs; return this; } - /** + /** * logs from array task * @return logs - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "logs from array task") - public String getLogs() { return logs; } - - public void setLogs(String logs) { + public void setLogs(@javax.annotation.Nullable String logs) { this.logs = logs; } - /** - * 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. - */ - public ArrayTaskLog 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -144,13 +112,12 @@ public boolean equals(Object o) { } ArrayTaskLog arrayTaskLog = (ArrayTaskLog) o; return Objects.equals(this.arrayTaskId, arrayTaskLog.arrayTaskId) && - Objects.equals(this.logs, arrayTaskLog.logs)&& - Objects.equals(this.additionalProperties, arrayTaskLog.additionalProperties); + Objects.equals(this.logs, arrayTaskLog.logs); } @Override public int hashCode() { - return Objects.hash(arrayTaskId, logs, additionalProperties); + return Objects.hash(arrayTaskId, logs); } @Override @@ -159,7 +126,6 @@ public String toString() { sb.append("class ArrayTaskLog {\n"); sb.append(" arrayTaskId: ").append(toIndentedString(arrayTaskId)).append("\n"); sb.append(" logs: ").append(toIndentedString(logs)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -189,20 +155,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ArrayTaskLog - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (ArrayTaskLog.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 ArrayTaskLog + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ArrayTaskLog.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in ArrayTaskLog is not found in the empty JSON string", ArrayTaskLog.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ArrayTaskLog.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ArrayTaskLog` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("array_task_id") != null && !jsonObj.get("array_task_id").isJsonNull()) && !jsonObj.get("array_task_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `array_task_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("array_task_id").toString())); } @@ -226,71 +199,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ArrayTaskLog value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 ArrayTaskLog read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - ArrayTaskLog 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ArrayTaskLog given an JSON string - * - * @param jsonString JSON string - * @return An instance of ArrayTaskLog - * @throws IOException if the JSON string is invalid with respect to ArrayTaskLog - */ + /** + * Create an instance of ArrayTaskLog given an JSON string + * + * @param jsonString JSON string + * @return An instance of ArrayTaskLog + * @throws IOException if the JSON string is invalid with respect to ArrayTaskLog + */ public static ArrayTaskLog fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ArrayTaskLog.class); } - /** - * Convert an instance of ArrayTaskLog to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ArrayTaskLog to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayTaskStatus.java b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayTaskStatus.java index 4c9622b..9d2ac71 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayTaskStatus.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayTaskStatus.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -77,5 +81,10 @@ public ArrayTaskStatus read(final JsonReader jsonReader) throws IOException { return ArrayTaskStatus.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ArrayTaskStatus.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayTaskType.java b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayTaskType.java index 0c9ee94..4dc8f20 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayTaskType.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayTaskType.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -73,5 +77,10 @@ public ArrayTaskType read(final JsonReader jsonReader) throws IOException { return ArrayTaskType.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ArrayTaskType.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayType.java b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayType.java index 0442677..144fcbd 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayType.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayType.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -65,5 +69,10 @@ public ArrayType read(final JsonReader jsonReader) throws IOException { return ArrayType.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ArrayType.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayVacuumRequest.java b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayVacuumRequest.java index b0dbffa..e1e0389 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/ArrayVacuumRequest.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/ArrayVacuumRequest.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,100 +11,72 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.TileDBConfig; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Request to consolidate an array */ -@ApiModel(description = "Request to consolidate an array") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ArrayVacuumRequest { public static final String SERIALIZED_NAME_CONFIG = "config"; @SerializedName(SERIALIZED_NAME_CONFIG) + @javax.annotation.Nullable private TileDBConfig config; public ArrayVacuumRequest() { } - public ArrayVacuumRequest config(TileDBConfig config) { - + public ArrayVacuumRequest config(@javax.annotation.Nullable TileDBConfig config) { this.config = config; return this; } - /** + /** * Get config * @return config - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public TileDBConfig getConfig() { return config; } - - public void setConfig(TileDBConfig config) { + public void setConfig(@javax.annotation.Nullable TileDBConfig config) { this.config = config; } - /** - * 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. - */ - public ArrayVacuumRequest 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -116,13 +88,12 @@ public boolean equals(Object o) { return false; } ArrayVacuumRequest arrayVacuumRequest = (ArrayVacuumRequest) o; - return Objects.equals(this.config, arrayVacuumRequest.config)&& - Objects.equals(this.additionalProperties, arrayVacuumRequest.additionalProperties); + return Objects.equals(this.config, arrayVacuumRequest.config); } @Override public int hashCode() { - return Objects.hash(config, additionalProperties); + return Objects.hash(config); } @Override @@ -130,7 +101,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayVacuumRequest {\n"); sb.append(" config: ").append(toIndentedString(config)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -159,23 +129,30 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ArrayVacuumRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (ArrayVacuumRequest.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 ArrayVacuumRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ArrayVacuumRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in ArrayVacuumRequest is not found in the empty JSON string", ArrayVacuumRequest.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ArrayVacuumRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ArrayVacuumRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `config` if (jsonObj.get("config") != null && !jsonObj.get("config").isJsonNull()) { - TileDBConfig.validateJsonObject(jsonObj.getAsJsonObject("config")); + TileDBConfig.validateJsonElement(jsonObj.get("config")); } } @@ -194,71 +171,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ArrayVacuumRequest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 ArrayVacuumRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - ArrayVacuumRequest 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ArrayVacuumRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ArrayVacuumRequest - * @throws IOException if the JSON string is invalid with respect to ArrayVacuumRequest - */ + /** + * Create an instance of ArrayVacuumRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ArrayVacuumRequest + * @throws IOException if the JSON string is invalid with respect to ArrayVacuumRequest + */ public static ArrayVacuumRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ArrayVacuumRequest.class); } - /** - * Convert an instance of ArrayVacuumRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ArrayVacuumRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/AssetBackingType.java b/src/main/java/io/tiledb/cloud/rest_api/model/AssetBackingType.java new file mode 100644 index 0000000..486fb4f --- /dev/null +++ b/src/main/java/io/tiledb/cloud/rest_api/model/AssetBackingType.java @@ -0,0 +1,78 @@ +/* + * TileDB Storage Platform API + * TileDB Storage Platform REST API + * + * The version of the OpenAPI document: 2.17.51 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +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; + +/** + * The technology that an asset is backed by + */ +@JsonAdapter(AssetBackingType.Adapter.class) +public enum AssetBackingType { + + ARRAY("array"), + + GROUP("group"); + + private String value; + + AssetBackingType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AssetBackingType fromValue(String value) { + for (AssetBackingType b : AssetBackingType.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 AssetBackingType enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AssetBackingType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AssetBackingType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AssetBackingType.fromValue(value); + } +} + diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/AssetInfo.java b/src/main/java/io/tiledb/cloud/rest_api/model/AssetInfo.java new file mode 100644 index 0000000..2c207d7 --- /dev/null +++ b/src/main/java/io/tiledb/cloud/rest_api/model/AssetInfo.java @@ -0,0 +1,481 @@ +/* + * TileDB Storage Platform API + * TileDB Storage Platform REST API + * + * The version of the OpenAPI document: 2.17.51 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +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.time.OffsetDateTime; +import java.util.Arrays; +import org.openapitools.client.model.AssetBackingType; +import org.openapitools.client.model.AssetOwnershipLevel; +import org.openapitools.client.model.AssetType; +import org.openapitools.client.model.MetadataStringified; + +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.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * metadata of an asset + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") +public class AssetInfo { + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nullable + private String uuid; + + public static final String SERIALIZED_NAME_ASSET_TYPE = "asset_type"; + @SerializedName(SERIALIZED_NAME_ASSET_TYPE) + @javax.annotation.Nullable + private AssetType assetType; + + public static final String SERIALIZED_NAME_ASSET_BACKING_TYPE = "asset_backing_type"; + @SerializedName(SERIALIZED_NAME_ASSET_BACKING_TYPE) + @javax.annotation.Nullable + private AssetBackingType assetBackingType; + + public static final String SERIALIZED_NAME_ASSET_OWNERSHIP_LEVEL = "asset_ownership_level"; + @SerializedName(SERIALIZED_NAME_ASSET_OWNERSHIP_LEVEL) + @javax.annotation.Nullable + private AssetOwnershipLevel assetOwnershipLevel; + + public static final String SERIALIZED_NAME_NAMESPACE_NAME = "namespace_name"; + @SerializedName(SERIALIZED_NAME_NAMESPACE_NAME) + @javax.annotation.Nullable + private String namespaceName; + + public static final String SERIALIZED_NAME_NAMESPACE_UUID = "namespace_uuid"; + @SerializedName(SERIALIZED_NAME_NAMESPACE_UUID) + @javax.annotation.Nullable + private String namespaceUuid; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_MIME_TYPE = "mime_type"; + @SerializedName(SERIALIZED_NAME_MIME_TYPE) + @javax.annotation.Nullable + private String mimeType; + + public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; + @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable + private OffsetDateTime createdAt; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nullable + private MetadataStringified metadata; + + public AssetInfo() { + } + + public AssetInfo( + OffsetDateTime createdAt + ) { + this(); + this.createdAt = createdAt; + } + + public AssetInfo uuid(@javax.annotation.Nullable String uuid) { + this.uuid = uuid; + return this; + } + + /** + * unique ID of a registered asset + * @return uuid + */ + @javax.annotation.Nullable + public String getUuid() { + return uuid; + } + + public void setUuid(@javax.annotation.Nullable String uuid) { + this.uuid = uuid; + } + + + public AssetInfo assetType(@javax.annotation.Nullable AssetType assetType) { + this.assetType = assetType; + return this; + } + + /** + * Get assetType + * @return assetType + */ + @javax.annotation.Nullable + public AssetType getAssetType() { + return assetType; + } + + public void setAssetType(@javax.annotation.Nullable AssetType assetType) { + this.assetType = assetType; + } + + + public AssetInfo assetBackingType(@javax.annotation.Nullable AssetBackingType assetBackingType) { + this.assetBackingType = assetBackingType; + return this; + } + + /** + * Get assetBackingType + * @return assetBackingType + */ + @javax.annotation.Nullable + public AssetBackingType getAssetBackingType() { + return assetBackingType; + } + + public void setAssetBackingType(@javax.annotation.Nullable AssetBackingType assetBackingType) { + this.assetBackingType = assetBackingType; + } + + + public AssetInfo assetOwnershipLevel(@javax.annotation.Nullable AssetOwnershipLevel assetOwnershipLevel) { + this.assetOwnershipLevel = assetOwnershipLevel; + return this; + } + + /** + * Get assetOwnershipLevel + * @return assetOwnershipLevel + */ + @javax.annotation.Nullable + public AssetOwnershipLevel getAssetOwnershipLevel() { + return assetOwnershipLevel; + } + + public void setAssetOwnershipLevel(@javax.annotation.Nullable AssetOwnershipLevel assetOwnershipLevel) { + this.assetOwnershipLevel = assetOwnershipLevel; + } + + + public AssetInfo namespaceName(@javax.annotation.Nullable String namespaceName) { + this.namespaceName = namespaceName; + return this; + } + + /** + * namespace_name that the asset is registered to + * @return namespaceName + */ + @javax.annotation.Nullable + public String getNamespaceName() { + return namespaceName; + } + + public void setNamespaceName(@javax.annotation.Nullable String namespaceName) { + this.namespaceName = namespaceName; + } + + + public AssetInfo namespaceUuid(@javax.annotation.Nullable String namespaceUuid) { + this.namespaceUuid = namespaceUuid; + return this; + } + + /** + * namespace_uuid that the asset is registered to + * @return namespaceUuid + */ + @javax.annotation.Nullable + public String getNamespaceUuid() { + return namespaceUuid; + } + + public void setNamespaceUuid(@javax.annotation.Nullable String namespaceUuid) { + this.namespaceUuid = namespaceUuid; + } + + + public AssetInfo name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * name of asset + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public AssetInfo mimeType(@javax.annotation.Nullable String mimeType) { + this.mimeType = mimeType; + return this; + } + + /** + * mime type of the asset + * @return mimeType + */ + @javax.annotation.Nullable + public String getMimeType() { + return mimeType; + } + + public void setMimeType(@javax.annotation.Nullable String mimeType) { + this.mimeType = mimeType; + } + + + /** + * Time when the asset was created (rfc3339) + * @return createdAt + */ + @javax.annotation.Nullable + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + + public AssetInfo metadata(@javax.annotation.Nullable MetadataStringified metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get metadata + * @return metadata + */ + @javax.annotation.Nullable + public MetadataStringified getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nullable MetadataStringified metadata) { + this.metadata = metadata; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssetInfo assetInfo = (AssetInfo) o; + return Objects.equals(this.uuid, assetInfo.uuid) && + Objects.equals(this.assetType, assetInfo.assetType) && + Objects.equals(this.assetBackingType, assetInfo.assetBackingType) && + Objects.equals(this.assetOwnershipLevel, assetInfo.assetOwnershipLevel) && + Objects.equals(this.namespaceName, assetInfo.namespaceName) && + Objects.equals(this.namespaceUuid, assetInfo.namespaceUuid) && + Objects.equals(this.name, assetInfo.name) && + Objects.equals(this.mimeType, assetInfo.mimeType) && + Objects.equals(this.createdAt, assetInfo.createdAt) && + Objects.equals(this.metadata, assetInfo.metadata); + } + + @Override + public int hashCode() { + return Objects.hash(uuid, assetType, assetBackingType, assetOwnershipLevel, namespaceName, namespaceUuid, name, mimeType, createdAt, metadata); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetInfo {\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" assetType: ").append(toIndentedString(assetType)).append("\n"); + sb.append(" assetBackingType: ").append(toIndentedString(assetBackingType)).append("\n"); + sb.append(" assetOwnershipLevel: ").append(toIndentedString(assetOwnershipLevel)).append("\n"); + sb.append(" namespaceName: ").append(toIndentedString(namespaceName)).append("\n"); + sb.append(" namespaceUuid: ").append(toIndentedString(namespaceUuid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" mimeType: ").append(toIndentedString(mimeType)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).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("uuid"); + openapiFields.add("asset_type"); + openapiFields.add("asset_backing_type"); + openapiFields.add("asset_ownership_level"); + openapiFields.add("namespace_name"); + openapiFields.add("namespace_uuid"); + openapiFields.add("name"); + openapiFields.add("mime_type"); + openapiFields.add("created_at"); + openapiFields.add("metadata"); + + // 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 AssetInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AssetInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AssetInfo is not found in the empty JSON string", AssetInfo.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AssetInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AssetInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + // validate the optional field `asset_type` + if (jsonObj.get("asset_type") != null && !jsonObj.get("asset_type").isJsonNull()) { + AssetType.validateJsonElement(jsonObj.get("asset_type")); + } + // validate the optional field `asset_backing_type` + if (jsonObj.get("asset_backing_type") != null && !jsonObj.get("asset_backing_type").isJsonNull()) { + AssetBackingType.validateJsonElement(jsonObj.get("asset_backing_type")); + } + // validate the optional field `asset_ownership_level` + if (jsonObj.get("asset_ownership_level") != null && !jsonObj.get("asset_ownership_level").isJsonNull()) { + AssetOwnershipLevel.validateJsonElement(jsonObj.get("asset_ownership_level")); + } + if ((jsonObj.get("namespace_name") != null && !jsonObj.get("namespace_name").isJsonNull()) && !jsonObj.get("namespace_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `namespace_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespace_name").toString())); + } + if ((jsonObj.get("namespace_uuid") != null && !jsonObj.get("namespace_uuid").isJsonNull()) && !jsonObj.get("namespace_uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `namespace_uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespace_uuid").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !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("mime_type") != null && !jsonObj.get("mime_type").isJsonNull()) && !jsonObj.get("mime_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `mime_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mime_type").toString())); + } + // validate the optional field `metadata` + if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { + MetadataStringified.validateJsonElement(jsonObj.get("metadata")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AssetInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AssetInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AssetInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AssetInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AssetInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AssetInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of AssetInfo + * @throws IOException if the JSON string is invalid with respect to AssetInfo + */ + public static AssetInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AssetInfo.class); + } + + /** + * Convert an instance of AssetInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/AssetListResponse.java b/src/main/java/io/tiledb/cloud/rest_api/model/AssetListResponse.java new file mode 100644 index 0000000..390cd37 --- /dev/null +++ b/src/main/java/io/tiledb/cloud/rest_api/model/AssetListResponse.java @@ -0,0 +1,260 @@ +/* + * TileDB Storage Platform API + * TileDB Storage Platform REST API + * + * The version of the OpenAPI document: 2.17.51 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +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 org.openapitools.client.model.AssetInfo; +import org.openapitools.client.model.PaginationMetadata; + +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.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * Asset associated with a TileDB Cloud account + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") +public class AssetListResponse { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private List data = new ArrayList<>(); + + public static final String SERIALIZED_NAME_PAGINATION_METADATA = "pagination_metadata"; + @SerializedName(SERIALIZED_NAME_PAGINATION_METADATA) + @javax.annotation.Nullable + private PaginationMetadata paginationMetadata; + + public AssetListResponse() { + } + + public AssetListResponse data(@javax.annotation.Nullable List data) { + this.data = data; + return this; + } + + public AssetListResponse addDataItem(AssetInfo dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * asset information for each asset + * @return data + */ + @javax.annotation.Nullable + public List getData() { + return data; + } + + public void setData(@javax.annotation.Nullable List data) { + this.data = data; + } + + + public AssetListResponse paginationMetadata(@javax.annotation.Nullable PaginationMetadata paginationMetadata) { + this.paginationMetadata = paginationMetadata; + return this; + } + + /** + * Get paginationMetadata + * @return paginationMetadata + */ + @javax.annotation.Nullable + public PaginationMetadata getPaginationMetadata() { + return paginationMetadata; + } + + public void setPaginationMetadata(@javax.annotation.Nullable PaginationMetadata paginationMetadata) { + this.paginationMetadata = paginationMetadata; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssetListResponse assetListResponse = (AssetListResponse) o; + return Objects.equals(this.data, assetListResponse.data) && + Objects.equals(this.paginationMetadata, assetListResponse.paginationMetadata); + } + + @Override + public int hashCode() { + return Objects.hash(data, paginationMetadata); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" paginationMetadata: ").append(toIndentedString(paginationMetadata)).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("data"); + openapiFields.add("pagination_metadata"); + + // 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 AssetListResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AssetListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AssetListResponse is not found in the empty JSON string", AssetListResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AssetListResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AssetListResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + AssetInfo.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + // validate the optional field `pagination_metadata` + if (jsonObj.get("pagination_metadata") != null && !jsonObj.get("pagination_metadata").isJsonNull()) { + PaginationMetadata.validateJsonElement(jsonObj.get("pagination_metadata")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AssetListResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AssetListResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AssetListResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AssetListResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AssetListResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AssetListResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of AssetListResponse + * @throws IOException if the JSON string is invalid with respect to AssetListResponse + */ + public static AssetListResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AssetListResponse.class); + } + + /** + * Convert an instance of AssetListResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/AssetLocations.java b/src/main/java/io/tiledb/cloud/rest_api/model/AssetLocations.java index 205ecf4..657a562 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/AssetLocations.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/AssetLocations.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,262 +11,216 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.StorageLocation; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Custom storage locations on a per–asset type basis. If any is unset, a suffix of the owning (user/organization) `default_s3_path` is used. */ -@ApiModel(description = "Custom storage locations on a per–asset type basis. If any is unset, a suffix of the owning (user/organization) `default_s3_path` is used. ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class AssetLocations { public static final String SERIALIZED_NAME_ARRAYS = "arrays"; @SerializedName(SERIALIZED_NAME_ARRAYS) + @javax.annotation.Nullable private StorageLocation arrays; public static final String SERIALIZED_NAME_FILES = "files"; @SerializedName(SERIALIZED_NAME_FILES) + @javax.annotation.Nullable private StorageLocation files; public static final String SERIALIZED_NAME_GROUPS = "groups"; @SerializedName(SERIALIZED_NAME_GROUPS) + @javax.annotation.Nullable private StorageLocation groups; public static final String SERIALIZED_NAME_ML_MODELS = "ml_models"; @SerializedName(SERIALIZED_NAME_ML_MODELS) + @javax.annotation.Nullable private StorageLocation mlModels; public static final String SERIALIZED_NAME_NOTEBOOKS = "notebooks"; @SerializedName(SERIALIZED_NAME_NOTEBOOKS) + @javax.annotation.Nullable private StorageLocation notebooks; public static final String SERIALIZED_NAME_TASK_GRAPHS = "task_graphs"; @SerializedName(SERIALIZED_NAME_TASK_GRAPHS) + @javax.annotation.Nullable private StorageLocation taskGraphs; public static final String SERIALIZED_NAME_UDFS = "udfs"; @SerializedName(SERIALIZED_NAME_UDFS) + @javax.annotation.Nullable private StorageLocation udfs; public AssetLocations() { } - public AssetLocations arrays(StorageLocation arrays) { - + public AssetLocations arrays(@javax.annotation.Nullable StorageLocation arrays) { this.arrays = arrays; return this; } - /** + /** * Get arrays * @return arrays - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public StorageLocation getArrays() { return arrays; } - - public void setArrays(StorageLocation arrays) { + public void setArrays(@javax.annotation.Nullable StorageLocation arrays) { this.arrays = arrays; } - public AssetLocations files(StorageLocation files) { - + public AssetLocations files(@javax.annotation.Nullable StorageLocation files) { this.files = files; return this; } - /** + /** * Get files * @return files - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public StorageLocation getFiles() { return files; } - - public void setFiles(StorageLocation files) { + public void setFiles(@javax.annotation.Nullable StorageLocation files) { this.files = files; } - public AssetLocations groups(StorageLocation groups) { - + public AssetLocations groups(@javax.annotation.Nullable StorageLocation groups) { this.groups = groups; return this; } - /** + /** * Get groups * @return groups - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public StorageLocation getGroups() { return groups; } - - public void setGroups(StorageLocation groups) { + public void setGroups(@javax.annotation.Nullable StorageLocation groups) { this.groups = groups; } - public AssetLocations mlModels(StorageLocation mlModels) { - + public AssetLocations mlModels(@javax.annotation.Nullable StorageLocation mlModels) { this.mlModels = mlModels; return this; } - /** + /** * Get mlModels * @return mlModels - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public StorageLocation getMlModels() { return mlModels; } - - public void setMlModels(StorageLocation mlModels) { + public void setMlModels(@javax.annotation.Nullable StorageLocation mlModels) { this.mlModels = mlModels; } - public AssetLocations notebooks(StorageLocation notebooks) { - + public AssetLocations notebooks(@javax.annotation.Nullable StorageLocation notebooks) { this.notebooks = notebooks; return this; } - /** + /** * Get notebooks * @return notebooks - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public StorageLocation getNotebooks() { return notebooks; } - - public void setNotebooks(StorageLocation notebooks) { + public void setNotebooks(@javax.annotation.Nullable StorageLocation notebooks) { this.notebooks = notebooks; } - public AssetLocations taskGraphs(StorageLocation taskGraphs) { - + public AssetLocations taskGraphs(@javax.annotation.Nullable StorageLocation taskGraphs) { this.taskGraphs = taskGraphs; return this; } - /** + /** * Get taskGraphs * @return taskGraphs - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public StorageLocation getTaskGraphs() { return taskGraphs; } - - public void setTaskGraphs(StorageLocation taskGraphs) { + public void setTaskGraphs(@javax.annotation.Nullable StorageLocation taskGraphs) { this.taskGraphs = taskGraphs; } - public AssetLocations udfs(StorageLocation udfs) { - + public AssetLocations udfs(@javax.annotation.Nullable StorageLocation udfs) { this.udfs = udfs; return this; } - /** + /** * Get udfs * @return udfs - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public StorageLocation getUdfs() { return udfs; } - - public void setUdfs(StorageLocation udfs) { + public void setUdfs(@javax.annotation.Nullable StorageLocation udfs) { this.udfs = udfs; } - /** - * 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. - */ - public AssetLocations 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -284,13 +238,12 @@ public boolean equals(Object o) { Objects.equals(this.mlModels, assetLocations.mlModels) && Objects.equals(this.notebooks, assetLocations.notebooks) && Objects.equals(this.taskGraphs, assetLocations.taskGraphs) && - Objects.equals(this.udfs, assetLocations.udfs)&& - Objects.equals(this.additionalProperties, assetLocations.additionalProperties); + Objects.equals(this.udfs, assetLocations.udfs); } @Override public int hashCode() { - return Objects.hash(arrays, files, groups, mlModels, notebooks, taskGraphs, udfs, additionalProperties); + return Objects.hash(arrays, files, groups, mlModels, notebooks, taskGraphs, udfs); } @Override @@ -304,7 +257,6 @@ public String toString() { sb.append(" notebooks: ").append(toIndentedString(notebooks)).append("\n"); sb.append(" taskGraphs: ").append(toIndentedString(taskGraphs)).append("\n"); sb.append(" udfs: ").append(toIndentedString(udfs)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -339,47 +291,54 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AssetLocations - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (AssetLocations.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 AssetLocations + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AssetLocations.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in AssetLocations is not found in the empty JSON string", AssetLocations.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AssetLocations.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AssetLocations` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `arrays` if (jsonObj.get("arrays") != null && !jsonObj.get("arrays").isJsonNull()) { - StorageLocation.validateJsonObject(jsonObj.getAsJsonObject("arrays")); + StorageLocation.validateJsonElement(jsonObj.get("arrays")); } // validate the optional field `files` if (jsonObj.get("files") != null && !jsonObj.get("files").isJsonNull()) { - StorageLocation.validateJsonObject(jsonObj.getAsJsonObject("files")); + StorageLocation.validateJsonElement(jsonObj.get("files")); } // validate the optional field `groups` if (jsonObj.get("groups") != null && !jsonObj.get("groups").isJsonNull()) { - StorageLocation.validateJsonObject(jsonObj.getAsJsonObject("groups")); + StorageLocation.validateJsonElement(jsonObj.get("groups")); } // validate the optional field `ml_models` if (jsonObj.get("ml_models") != null && !jsonObj.get("ml_models").isJsonNull()) { - StorageLocation.validateJsonObject(jsonObj.getAsJsonObject("ml_models")); + StorageLocation.validateJsonElement(jsonObj.get("ml_models")); } // validate the optional field `notebooks` if (jsonObj.get("notebooks") != null && !jsonObj.get("notebooks").isJsonNull()) { - StorageLocation.validateJsonObject(jsonObj.getAsJsonObject("notebooks")); + StorageLocation.validateJsonElement(jsonObj.get("notebooks")); } // validate the optional field `task_graphs` if (jsonObj.get("task_graphs") != null && !jsonObj.get("task_graphs").isJsonNull()) { - StorageLocation.validateJsonObject(jsonObj.getAsJsonObject("task_graphs")); + StorageLocation.validateJsonElement(jsonObj.get("task_graphs")); } // validate the optional field `udfs` if (jsonObj.get("udfs") != null && !jsonObj.get("udfs").isJsonNull()) { - StorageLocation.validateJsonObject(jsonObj.getAsJsonObject("udfs")); + StorageLocation.validateJsonElement(jsonObj.get("udfs")); } } @@ -398,71 +357,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, AssetLocations value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 AssetLocations read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - AssetLocations 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of AssetLocations given an JSON string - * - * @param jsonString JSON string - * @return An instance of AssetLocations - * @throws IOException if the JSON string is invalid with respect to AssetLocations - */ + /** + * Create an instance of AssetLocations given an JSON string + * + * @param jsonString JSON string + * @return An instance of AssetLocations + * @throws IOException if the JSON string is invalid with respect to AssetLocations + */ public static AssetLocations fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, AssetLocations.class); } - /** - * Convert an instance of AssetLocations to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of AssetLocations to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/AssetOwnershipLevel.java b/src/main/java/io/tiledb/cloud/rest_api/model/AssetOwnershipLevel.java new file mode 100644 index 0000000..d77608e --- /dev/null +++ b/src/main/java/io/tiledb/cloud/rest_api/model/AssetOwnershipLevel.java @@ -0,0 +1,78 @@ +/* + * TileDB Storage Platform API + * TileDB Storage Platform REST API + * + * The version of the OpenAPI document: 2.17.51 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +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; + +/** + * The ownership level of the asset + */ +@JsonAdapter(AssetOwnershipLevel.Adapter.class) +public enum AssetOwnershipLevel { + + OWNED("owned"), + + SHARED("shared"); + + private String value; + + AssetOwnershipLevel(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AssetOwnershipLevel fromValue(String value) { + for (AssetOwnershipLevel b : AssetOwnershipLevel.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 AssetOwnershipLevel enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AssetOwnershipLevel read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AssetOwnershipLevel.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AssetOwnershipLevel.fromValue(value); + } +} + diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/AssetType.java b/src/main/java/io/tiledb/cloud/rest_api/model/AssetType.java index 6264c63..79fde18 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/AssetType.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/AssetType.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -91,5 +95,10 @@ public AssetType read(final JsonReader jsonReader) throws IOException { return AssetType.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AssetType.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/Attribute.java b/src/main/java/io/tiledb/cloud/rest_api/model/Attribute.java index a441375..19a0b12 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/Attribute.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/Attribute.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,182 +11,178 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.Datatype; +import org.openapitools.client.model.FilterPipeline; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Attribute of array */ -@ApiModel(description = "Attribute of array") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class Attribute { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull private String name; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull private Datatype type; public static final String SERIALIZED_NAME_FILTER_PIPELINE = "filterPipeline"; @SerializedName(SERIALIZED_NAME_FILTER_PIPELINE) + @javax.annotation.Nonnull private FilterPipeline filterPipeline; public static final String SERIALIZED_NAME_CELL_VAL_NUM = "cellValNum"; @SerializedName(SERIALIZED_NAME_CELL_VAL_NUM) + @javax.annotation.Nonnull private Integer cellValNum; public static final String SERIALIZED_NAME_NULLABLE = "nullable"; @SerializedName(SERIALIZED_NAME_NULLABLE) + @javax.annotation.Nullable private Boolean nullable; public static final String SERIALIZED_NAME_FILL_VALUE = "fillValue"; @SerializedName(SERIALIZED_NAME_FILL_VALUE) - private List fillValue = null; + @javax.annotation.Nullable + private List fillValue = new ArrayList<>(); public Attribute() { } - public Attribute name(String name) { - + public Attribute name(@javax.annotation.Nonnull String name) { this.name = name; return this; } - /** + /** * Attribute name * @return name - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "attribute1", required = true, value = "Attribute name") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public Attribute type(Datatype type) { - + public Attribute type(@javax.annotation.Nonnull Datatype type) { this.type = type; return this; } - /** + /** * Get type * @return type - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Datatype getType() { return type; } - - public void setType(Datatype type) { + public void setType(@javax.annotation.Nonnull Datatype type) { this.type = type; } - public Attribute filterPipeline(FilterPipeline filterPipeline) { - + public Attribute filterPipeline(@javax.annotation.Nonnull FilterPipeline filterPipeline) { this.filterPipeline = filterPipeline; return this; } - /** + /** * Get filterPipeline * @return filterPipeline - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public FilterPipeline getFilterPipeline() { return filterPipeline; } - - public void setFilterPipeline(FilterPipeline filterPipeline) { + public void setFilterPipeline(@javax.annotation.Nonnull FilterPipeline filterPipeline) { this.filterPipeline = filterPipeline; } - public Attribute cellValNum(Integer cellValNum) { - + public Attribute cellValNum(@javax.annotation.Nonnull Integer cellValNum) { this.cellValNum = cellValNum; return this; } - /** + /** * Attribute number of values per cell * @return cellValNum - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "1", required = true, value = "Attribute number of values per cell") - public Integer getCellValNum() { return cellValNum; } - - public void setCellValNum(Integer cellValNum) { + public void setCellValNum(@javax.annotation.Nonnull Integer cellValNum) { this.cellValNum = cellValNum; } - public Attribute nullable(Boolean nullable) { - + public Attribute nullable(@javax.annotation.Nullable Boolean nullable) { this.nullable = nullable; return this; } - /** + /** * Is attribute nullable * @return nullable - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "Is attribute nullable") - public Boolean getNullable() { return nullable; } - - public void setNullable(Boolean nullable) { + public void setNullable(@javax.annotation.Nullable Boolean nullable) { this.nullable = nullable; } - public Attribute fillValue(List fillValue) { - + public Attribute fillValue(@javax.annotation.Nullable List fillValue) { this.fillValue = fillValue; return this; } @@ -199,57 +195,19 @@ public Attribute addFillValueItem(Integer fillValueItem) { return this; } - /** + /** * The default fill value * @return fillValue - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The default fill value") - public List getFillValue() { return fillValue; } - - public void setFillValue(List fillValue) { + public void setFillValue(@javax.annotation.Nullable List fillValue) { this.fillValue = fillValue; } - /** - * 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. - */ - public Attribute 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -266,13 +224,12 @@ public boolean equals(Object o) { Objects.equals(this.filterPipeline, attribute.filterPipeline) && Objects.equals(this.cellValNum, attribute.cellValNum) && Objects.equals(this.nullable, attribute.nullable) && - Objects.equals(this.fillValue, attribute.fillValue)&& - Objects.equals(this.additionalProperties, attribute.additionalProperties); + Objects.equals(this.fillValue, attribute.fillValue); } @Override public int hashCode() { - return Objects.hash(name, type, filterPipeline, cellValNum, nullable, fillValue, additionalProperties); + return Objects.hash(name, type, filterPipeline, cellValNum, nullable, fillValue); } @Override @@ -285,7 +242,6 @@ public String toString() { sb.append(" cellValNum: ").append(toIndentedString(cellValNum)).append("\n"); sb.append(" nullable: ").append(toIndentedString(nullable)).append("\n"); sb.append(" fillValue: ").append(toIndentedString(fillValue)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -323,36 +279,43 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("cellValNum"); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Attribute - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (Attribute.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 Attribute + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Attribute.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in Attribute is not found in the empty JSON string", Attribute.openapiRequiredFields.toString())); } } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Attribute.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Attribute` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Attribute.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + 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())); } } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + JsonObject jsonObj = jsonElement.getAsJsonObject(); + 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())); } - // validate the optional field `filterPipeline` - if (jsonObj.get("filterPipeline") != null && !jsonObj.get("filterPipeline").isJsonNull()) { - FilterPipeline.validateJsonObject(jsonObj.getAsJsonObject("filterPipeline")); - } - // ensure the json data is an array - if ((jsonObj.get("fillValue") != null && !jsonObj.get("fillValue").isJsonNull()) && !jsonObj.get("fillValue").isJsonArray()) { + // validate the required field `type` + Datatype.validateJsonElement(jsonObj.get("type")); + // validate the required field `filterPipeline` + FilterPipeline.validateJsonElement(jsonObj.get("filterPipeline")); + // ensure the optional json data is an array if present + if (jsonObj.get("fillValue") != null && !jsonObj.get("fillValue").isJsonNull() && !jsonObj.get("fillValue").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `fillValue` to be an array in the JSON string but got `%s`", jsonObj.get("fillValue").toString())); } } @@ -372,71 +335,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, Attribute value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 Attribute read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - Attribute 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Attribute given an JSON string - * - * @param jsonString JSON string - * @return An instance of Attribute - * @throws IOException if the JSON string is invalid with respect to Attribute - */ + /** + * Create an instance of Attribute given an JSON string + * + * @param jsonString JSON string + * @return An instance of Attribute + * @throws IOException if the JSON string is invalid with respect to Attribute + */ public static Attribute fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Attribute.class); } - /** - * Convert an instance of Attribute to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Attribute to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/AttributeBufferHeader.java b/src/main/java/io/tiledb/cloud/rest_api/model/AttributeBufferHeader.java index 796d0cf..a703c17 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/AttributeBufferHeader.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/AttributeBufferHeader.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,154 +11,119 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Represents an attribute buffer header information */ -@ApiModel(description = "Represents an attribute buffer header information") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class AttributeBufferHeader { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull private String name; public static final String SERIALIZED_NAME_FIXED_LEN_BUFFER_SIZE_IN_BYTES = "fixedLenBufferSizeInBytes"; @SerializedName(SERIALIZED_NAME_FIXED_LEN_BUFFER_SIZE_IN_BYTES) + @javax.annotation.Nonnull private Integer fixedLenBufferSizeInBytes; public static final String SERIALIZED_NAME_VAR_LEN_BUFFER_SIZE_IN_BYTES = "varLenBufferSizeInBytes"; @SerializedName(SERIALIZED_NAME_VAR_LEN_BUFFER_SIZE_IN_BYTES) + @javax.annotation.Nonnull private Integer varLenBufferSizeInBytes; public AttributeBufferHeader() { } - public AttributeBufferHeader name(String name) { - + public AttributeBufferHeader name(@javax.annotation.Nonnull String name) { this.name = name; return this; } - /** + /** * Attribute name * @return name - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "attribute1", required = true, value = "Attribute name") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public AttributeBufferHeader fixedLenBufferSizeInBytes(Integer fixedLenBufferSizeInBytes) { - + public AttributeBufferHeader fixedLenBufferSizeInBytes(@javax.annotation.Nonnull Integer fixedLenBufferSizeInBytes) { this.fixedLenBufferSizeInBytes = fixedLenBufferSizeInBytes; return this; } - /** + /** * Number of bytes in the fixed-length attribute data buffer (offsets for var-len attributes) * @return fixedLenBufferSizeInBytes - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Number of bytes in the fixed-length attribute data buffer (offsets for var-len attributes)") - public Integer getFixedLenBufferSizeInBytes() { return fixedLenBufferSizeInBytes; } - - public void setFixedLenBufferSizeInBytes(Integer fixedLenBufferSizeInBytes) { + public void setFixedLenBufferSizeInBytes(@javax.annotation.Nonnull Integer fixedLenBufferSizeInBytes) { this.fixedLenBufferSizeInBytes = fixedLenBufferSizeInBytes; } - public AttributeBufferHeader varLenBufferSizeInBytes(Integer varLenBufferSizeInBytes) { - + public AttributeBufferHeader varLenBufferSizeInBytes(@javax.annotation.Nonnull Integer varLenBufferSizeInBytes) { this.varLenBufferSizeInBytes = varLenBufferSizeInBytes; return this; } - /** + /** * Number of bytes in the var-length attribute data buffer * @return varLenBufferSizeInBytes - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Number of bytes in the var-length attribute data buffer") - public Integer getVarLenBufferSizeInBytes() { return varLenBufferSizeInBytes; } - - public void setVarLenBufferSizeInBytes(Integer varLenBufferSizeInBytes) { + public void setVarLenBufferSizeInBytes(@javax.annotation.Nonnull Integer varLenBufferSizeInBytes) { this.varLenBufferSizeInBytes = varLenBufferSizeInBytes; } - /** - * 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. - */ - public AttributeBufferHeader 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -172,13 +137,12 @@ public boolean equals(Object o) { AttributeBufferHeader attributeBufferHeader = (AttributeBufferHeader) o; return Objects.equals(this.name, attributeBufferHeader.name) && Objects.equals(this.fixedLenBufferSizeInBytes, attributeBufferHeader.fixedLenBufferSizeInBytes) && - Objects.equals(this.varLenBufferSizeInBytes, attributeBufferHeader.varLenBufferSizeInBytes)&& - Objects.equals(this.additionalProperties, attributeBufferHeader.additionalProperties); + Objects.equals(this.varLenBufferSizeInBytes, attributeBufferHeader.varLenBufferSizeInBytes); } @Override public int hashCode() { - return Objects.hash(name, fixedLenBufferSizeInBytes, varLenBufferSizeInBytes, additionalProperties); + return Objects.hash(name, fixedLenBufferSizeInBytes, varLenBufferSizeInBytes); } @Override @@ -188,7 +152,6 @@ public String toString() { sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" fixedLenBufferSizeInBytes: ").append(toIndentedString(fixedLenBufferSizeInBytes)).append("\n"); sb.append(" varLenBufferSizeInBytes: ").append(toIndentedString(varLenBufferSizeInBytes)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -222,28 +185,35 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("varLenBufferSizeInBytes"); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AttributeBufferHeader - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (AttributeBufferHeader.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 AttributeBufferHeader + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AttributeBufferHeader.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in AttributeBufferHeader is not found in the empty JSON string", AttributeBufferHeader.openapiRequiredFields.toString())); } } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AttributeBufferHeader.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AttributeBufferHeader` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + // check to make sure all required properties/fields are present in the JSON string for (String requiredField : AttributeBufferHeader.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + 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())); } } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + JsonObject jsonObj = jsonElement.getAsJsonObject(); + 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())); } } @@ -263,71 +233,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, AttributeBufferHeader value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 AttributeBufferHeader read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - AttributeBufferHeader 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of AttributeBufferHeader given an JSON string - * - * @param jsonString JSON string - * @return An instance of AttributeBufferHeader - * @throws IOException if the JSON string is invalid with respect to AttributeBufferHeader - */ + /** + * Create an instance of AttributeBufferHeader given an JSON string + * + * @param jsonString JSON string + * @return An instance of AttributeBufferHeader + * @throws IOException if the JSON string is invalid with respect to AttributeBufferHeader + */ public static AttributeBufferHeader fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, AttributeBufferHeader.class); } - /** - * Convert an instance of AttributeBufferHeader to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of AttributeBufferHeader to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/AttributeBufferSize.java b/src/main/java/io/tiledb/cloud/rest_api/model/AttributeBufferSize.java index df7d41f..8d0a3f5 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/AttributeBufferSize.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/AttributeBufferSize.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,154 +11,119 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * object representing buffer size of an attribute */ -@ApiModel(description = "object representing buffer size of an attribute") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class AttributeBufferSize { public static final String SERIALIZED_NAME_ATTRIBUTE = "attribute"; @SerializedName(SERIALIZED_NAME_ATTRIBUTE) + @javax.annotation.Nonnull private String attribute; public static final String SERIALIZED_NAME_OFFSET_BYTES = "offsetBytes"; @SerializedName(SERIALIZED_NAME_OFFSET_BYTES) + @javax.annotation.Nonnull private Integer offsetBytes; public static final String SERIALIZED_NAME_DATA_BYTES = "dataBytes"; @SerializedName(SERIALIZED_NAME_DATA_BYTES) + @javax.annotation.Nonnull private Integer dataBytes; public AttributeBufferSize() { } - public AttributeBufferSize attribute(String attribute) { - + public AttributeBufferSize attribute(@javax.annotation.Nonnull String attribute) { this.attribute = attribute; return this; } - /** + /** * name of attribute * @return attribute - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "name of attribute") - public String getAttribute() { return attribute; } - - public void setAttribute(String attribute) { + public void setAttribute(@javax.annotation.Nonnull String attribute) { this.attribute = attribute; } - public AttributeBufferSize offsetBytes(Integer offsetBytes) { - + public AttributeBufferSize offsetBytes(@javax.annotation.Nonnull Integer offsetBytes) { this.offsetBytes = offsetBytes; return this; } - /** + /** * buffer size (in bytes) of offset buffer * @return offsetBytes - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "buffer size (in bytes) of offset buffer") - public Integer getOffsetBytes() { return offsetBytes; } - - public void setOffsetBytes(Integer offsetBytes) { + public void setOffsetBytes(@javax.annotation.Nonnull Integer offsetBytes) { this.offsetBytes = offsetBytes; } - public AttributeBufferSize dataBytes(Integer dataBytes) { - + public AttributeBufferSize dataBytes(@javax.annotation.Nonnull Integer dataBytes) { this.dataBytes = dataBytes; return this; } - /** + /** * buffer size (in bytes) of data buffer * @return dataBytes - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "buffer size (in bytes) of data buffer") - public Integer getDataBytes() { return dataBytes; } - - public void setDataBytes(Integer dataBytes) { + public void setDataBytes(@javax.annotation.Nonnull Integer dataBytes) { this.dataBytes = dataBytes; } - /** - * 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. - */ - public AttributeBufferSize 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -172,13 +137,12 @@ public boolean equals(Object o) { AttributeBufferSize attributeBufferSize = (AttributeBufferSize) o; return Objects.equals(this.attribute, attributeBufferSize.attribute) && Objects.equals(this.offsetBytes, attributeBufferSize.offsetBytes) && - Objects.equals(this.dataBytes, attributeBufferSize.dataBytes)&& - Objects.equals(this.additionalProperties, attributeBufferSize.additionalProperties); + Objects.equals(this.dataBytes, attributeBufferSize.dataBytes); } @Override public int hashCode() { - return Objects.hash(attribute, offsetBytes, dataBytes, additionalProperties); + return Objects.hash(attribute, offsetBytes, dataBytes); } @Override @@ -188,7 +152,6 @@ public String toString() { sb.append(" attribute: ").append(toIndentedString(attribute)).append("\n"); sb.append(" offsetBytes: ").append(toIndentedString(offsetBytes)).append("\n"); sb.append(" dataBytes: ").append(toIndentedString(dataBytes)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -222,28 +185,35 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("dataBytes"); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AttributeBufferSize - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (AttributeBufferSize.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 AttributeBufferSize + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AttributeBufferSize.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in AttributeBufferSize is not found in the empty JSON string", AttributeBufferSize.openapiRequiredFields.toString())); } } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AttributeBufferSize.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AttributeBufferSize` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + // check to make sure all required properties/fields are present in the JSON string for (String requiredField : AttributeBufferSize.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + 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())); } } - if ((jsonObj.get("attribute") != null && !jsonObj.get("attribute").isJsonNull()) && !jsonObj.get("attribute").isJsonPrimitive()) { + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("attribute").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `attribute` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attribute").toString())); } } @@ -263,71 +233,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, AttributeBufferSize value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 AttributeBufferSize read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - AttributeBufferSize 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of AttributeBufferSize given an JSON string - * - * @param jsonString JSON string - * @return An instance of AttributeBufferSize - * @throws IOException if the JSON string is invalid with respect to AttributeBufferSize - */ + /** + * Create an instance of AttributeBufferSize given an JSON string + * + * @param jsonString JSON string + * @return An instance of AttributeBufferSize + * @throws IOException if the JSON string is invalid with respect to AttributeBufferSize + */ public static AttributeBufferSize fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, AttributeBufferSize.class); } - /** - * Convert an instance of AttributeBufferSize to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of AttributeBufferSize to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/Backoff.java b/src/main/java/io/tiledb/cloud/rest_api/model/Backoff.java index b479999..dd366ea 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/Backoff.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/Backoff.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,154 +11,119 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Backoff is a backoff strategy to use within retryStrategy */ -@ApiModel(description = "Backoff is a backoff strategy to use within retryStrategy") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class Backoff { public static final String SERIALIZED_NAME_DURATION = "duration"; @SerializedName(SERIALIZED_NAME_DURATION) + @javax.annotation.Nullable private String duration; public static final String SERIALIZED_NAME_FACTOR = "factor"; @SerializedName(SERIALIZED_NAME_FACTOR) + @javax.annotation.Nullable private Integer factor; public static final String SERIALIZED_NAME_MAX_DURATION = "maxDuration"; @SerializedName(SERIALIZED_NAME_MAX_DURATION) + @javax.annotation.Nullable private String maxDuration; public Backoff() { } - public Backoff duration(String duration) { - + public Backoff duration(@javax.annotation.Nullable String duration) { this.duration = duration; return this; } - /** + /** * Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. \"2m\", \"1h\") * @return duration - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. \"2m\", \"1h\")") - public String getDuration() { return duration; } - - public void setDuration(String duration) { + public void setDuration(@javax.annotation.Nullable String duration) { this.duration = duration; } - public Backoff factor(Integer factor) { - + public Backoff factor(@javax.annotation.Nullable Integer factor) { this.factor = factor; return this; } - /** + /** * Factor is a factor to multiply the base duration after each failed retry * @return factor - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Factor is a factor to multiply the base duration after each failed retry") - public Integer getFactor() { return factor; } - - public void setFactor(Integer factor) { + public void setFactor(@javax.annotation.Nullable Integer factor) { this.factor = factor; } - public Backoff maxDuration(String maxDuration) { - + public Backoff maxDuration(@javax.annotation.Nullable String maxDuration) { this.maxDuration = maxDuration; return this; } - /** + /** * MaxDuration is the maximum amount of time allowed for the backoff strategy * @return maxDuration - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "MaxDuration is the maximum amount of time allowed for the backoff strategy") - public String getMaxDuration() { return maxDuration; } - - public void setMaxDuration(String maxDuration) { + public void setMaxDuration(@javax.annotation.Nullable String maxDuration) { this.maxDuration = maxDuration; } - /** - * 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. - */ - public Backoff 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -172,13 +137,12 @@ public boolean equals(Object o) { Backoff backoff = (Backoff) o; return Objects.equals(this.duration, backoff.duration) && Objects.equals(this.factor, backoff.factor) && - Objects.equals(this.maxDuration, backoff.maxDuration)&& - Objects.equals(this.additionalProperties, backoff.additionalProperties); + Objects.equals(this.maxDuration, backoff.maxDuration); } @Override public int hashCode() { - return Objects.hash(duration, factor, maxDuration, additionalProperties); + return Objects.hash(duration, factor, maxDuration); } @Override @@ -188,7 +152,6 @@ public String toString() { sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); sb.append(" factor: ").append(toIndentedString(factor)).append("\n"); sb.append(" maxDuration: ").append(toIndentedString(maxDuration)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -219,20 +182,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Backoff - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (Backoff.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 Backoff + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Backoff.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in Backoff is not found in the empty JSON string", Backoff.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Backoff.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Backoff` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("duration") != null && !jsonObj.get("duration").isJsonNull()) && !jsonObj.get("duration").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); } @@ -256,71 +226,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, Backoff value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 Backoff read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - Backoff 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Backoff given an JSON string - * - * @param jsonString JSON string - * @return An instance of Backoff - * @throws IOException if the JSON string is invalid with respect to Backoff - */ + /** + * Create an instance of Backoff given an JSON string + * + * @param jsonString JSON string + * @return An instance of Backoff + * @throws IOException if the JSON string is invalid with respect to Backoff + */ public static Backoff fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Backoff.class); } - /** - * Convert an instance of Backoff to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Backoff to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/ChangeAssetCredentialsRequest.java b/src/main/java/io/tiledb/cloud/rest_api/model/ChangeAssetCredentialsRequest.java new file mode 100644 index 0000000..b1a86fa --- /dev/null +++ b/src/main/java/io/tiledb/cloud/rest_api/model/ChangeAssetCredentialsRequest.java @@ -0,0 +1,258 @@ +/* + * TileDB Storage Platform API + * TileDB Storage Platform REST API + * + * The version of the OpenAPI document: 2.17.51 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +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 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.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * Request body to change the credentials of the given assets + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") +public class ChangeAssetCredentialsRequest { + public static final String SERIALIZED_NAME_ACCESS_CREDENTIALS = "access_credentials"; + @SerializedName(SERIALIZED_NAME_ACCESS_CREDENTIALS) + @javax.annotation.Nonnull + private String accessCredentials; + + public static final String SERIALIZED_NAME_ASSET_UUIDS = "asset_uuids"; + @SerializedName(SERIALIZED_NAME_ASSET_UUIDS) + @javax.annotation.Nonnull + private List assetUuids = new ArrayList<>(); + + public ChangeAssetCredentialsRequest() { + } + + public ChangeAssetCredentialsRequest accessCredentials(@javax.annotation.Nonnull String accessCredentials) { + this.accessCredentials = accessCredentials; + return this; + } + + /** + * The name or uuid of the access credentials + * @return accessCredentials + */ + @javax.annotation.Nonnull + public String getAccessCredentials() { + return accessCredentials; + } + + public void setAccessCredentials(@javax.annotation.Nonnull String accessCredentials) { + this.accessCredentials = accessCredentials; + } + + + public ChangeAssetCredentialsRequest assetUuids(@javax.annotation.Nonnull List assetUuids) { + this.assetUuids = assetUuids; + return this; + } + + public ChangeAssetCredentialsRequest addAssetUuidsItem(String assetUuidsItem) { + if (this.assetUuids == null) { + this.assetUuids = new ArrayList<>(); + } + this.assetUuids.add(assetUuidsItem); + return this; + } + + /** + * The list of asset uuids to have their credentials changed + * @return assetUuids + */ + @javax.annotation.Nonnull + public List getAssetUuids() { + return assetUuids; + } + + public void setAssetUuids(@javax.annotation.Nonnull List assetUuids) { + this.assetUuids = assetUuids; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChangeAssetCredentialsRequest changeAssetCredentialsRequest = (ChangeAssetCredentialsRequest) o; + return Objects.equals(this.accessCredentials, changeAssetCredentialsRequest.accessCredentials) && + Objects.equals(this.assetUuids, changeAssetCredentialsRequest.assetUuids); + } + + @Override + public int hashCode() { + return Objects.hash(accessCredentials, assetUuids); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChangeAssetCredentialsRequest {\n"); + sb.append(" accessCredentials: ").append(toIndentedString(accessCredentials)).append("\n"); + sb.append(" assetUuids: ").append(toIndentedString(assetUuids)).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("access_credentials"); + openapiFields.add("asset_uuids"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("access_credentials"); + openapiRequiredFields.add("asset_uuids"); + } + + /** + * 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 ChangeAssetCredentialsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ChangeAssetCredentialsRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ChangeAssetCredentialsRequest is not found in the empty JSON string", ChangeAssetCredentialsRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ChangeAssetCredentialsRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ChangeAssetCredentialsRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ChangeAssetCredentialsRequest.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("access_credentials").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `access_credentials` to be a primitive type in the JSON string but got `%s`", jsonObj.get("access_credentials").toString())); + } + // ensure the required json array is present + if (jsonObj.get("asset_uuids") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("asset_uuids").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `asset_uuids` to be an array in the JSON string but got `%s`", jsonObj.get("asset_uuids").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ChangeAssetCredentialsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ChangeAssetCredentialsRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ChangeAssetCredentialsRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ChangeAssetCredentialsRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ChangeAssetCredentialsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ChangeAssetCredentialsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ChangeAssetCredentialsRequest + * @throws IOException if the JSON string is invalid with respect to ChangeAssetCredentialsRequest + */ + public static ChangeAssetCredentialsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ChangeAssetCredentialsRequest.class); + } + + /** + * Convert an instance of ChangeAssetCredentialsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/Datatype.java b/src/main/java/io/tiledb/cloud/rest_api/model/Datatype.java index aeb42fd..61dfc4e 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/Datatype.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/Datatype.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -58,54 +62,56 @@ public enum Datatype { STRING_UCS2("STRING_UCS2"), STRING_UCS4("STRING_UCS4"), - + + ANY("ANY"), + DATETIME_YEAR("DATETIME_YEAR"), - + DATETIME_MONTH("DATETIME_MONTH"), - + DATETIME_WEEK("DATETIME_WEEK"), - + DATETIME_DAY("DATETIME_DAY"), - + DATETIME_HR("DATETIME_HR"), - + DATETIME_MIN("DATETIME_MIN"), - + DATETIME_SEC("DATETIME_SEC"), - + DATETIME_MS("DATETIME_MS"), - + DATETIME_US("DATETIME_US"), - + DATETIME_NS("DATETIME_NS"), - + DATETIME_PS("DATETIME_PS"), - + DATETIME_FS("DATETIME_FS"), - + DATETIME_AS("DATETIME_AS"), - + TIME_HR("TIME_HR"), - + TIME_MIN("TIME_MIN"), - + TIME_SEC("TIME_SEC"), - + TIME_MS("TIME_MS"), - + TIME_US("TIME_US"), - + TIME_NS("TIME_NS"), - + TIME_PS("TIME_PS"), - + TIME_FS("TIME_FS"), - + TIME_AS("TIME_AS"), - - BOOL("BOOL"), - - ANY("ANY"); + + BLOB("BLOB"), + + BOOL("BOOL"); private String value; @@ -143,5 +149,10 @@ public Datatype read(final JsonReader jsonReader) throws IOException { return Datatype.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + Datatype.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/Dimension.java b/src/main/java/io/tiledb/cloud/rest_api/model/Dimension.java index f59148b..7e86e01 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/Dimension.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/Dimension.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,235 +11,195 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.Datatype; +import org.openapitools.client.model.DimensionTileExtent; +import org.openapitools.client.model.DomainArray; +import org.openapitools.client.model.FilterPipeline; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Dimension of array */ -@ApiModel(description = "Dimension of array") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class Dimension { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull private Datatype type; public static final String SERIALIZED_NAME_DOMAIN = "domain"; @SerializedName(SERIALIZED_NAME_DOMAIN) + @javax.annotation.Nonnull private DomainArray domain; public static final String SERIALIZED_NAME_NULL_TILE_EXTENT = "nullTileExtent"; @SerializedName(SERIALIZED_NAME_NULL_TILE_EXTENT) + @javax.annotation.Nonnull private Boolean nullTileExtent; public static final String SERIALIZED_NAME_TILE_EXTENT = "tileExtent"; @SerializedName(SERIALIZED_NAME_TILE_EXTENT) + @javax.annotation.Nullable private DimensionTileExtent tileExtent; public static final String SERIALIZED_NAME_FILTER_PIPELINE = "filterPipeline"; @SerializedName(SERIALIZED_NAME_FILTER_PIPELINE) + @javax.annotation.Nullable private FilterPipeline filterPipeline; public Dimension() { } - public Dimension name(String name) { - + public Dimension name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * Dimension name * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "row", value = "Dimension name") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public Dimension type(Datatype type) { - + public Dimension type(@javax.annotation.Nonnull Datatype type) { this.type = type; return this; } - /** + /** * Get type * @return type - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Datatype getType() { return type; } - - public void setType(Datatype type) { + public void setType(@javax.annotation.Nonnull Datatype type) { this.type = type; } - public Dimension domain(DomainArray domain) { - + public Dimension domain(@javax.annotation.Nonnull DomainArray domain) { this.domain = domain; return this; } - /** + /** * Get domain * @return domain - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public DomainArray getDomain() { return domain; } - - public void setDomain(DomainArray domain) { + public void setDomain(@javax.annotation.Nonnull DomainArray domain) { this.domain = domain; } - public Dimension nullTileExtent(Boolean nullTileExtent) { - + public Dimension nullTileExtent(@javax.annotation.Nonnull Boolean nullTileExtent) { this.nullTileExtent = nullTileExtent; return this; } - /** + /** * Is tile extent null * @return nullTileExtent - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "true", required = true, value = "Is tile extent null") - public Boolean getNullTileExtent() { return nullTileExtent; } - - public void setNullTileExtent(Boolean nullTileExtent) { + public void setNullTileExtent(@javax.annotation.Nonnull Boolean nullTileExtent) { this.nullTileExtent = nullTileExtent; } - public Dimension tileExtent(DimensionTileExtent tileExtent) { - + public Dimension tileExtent(@javax.annotation.Nullable DimensionTileExtent tileExtent) { this.tileExtent = tileExtent; return this; } - /** + /** * Get tileExtent * @return tileExtent - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public DimensionTileExtent getTileExtent() { return tileExtent; } - - public void setTileExtent(DimensionTileExtent tileExtent) { + public void setTileExtent(@javax.annotation.Nullable DimensionTileExtent tileExtent) { this.tileExtent = tileExtent; } - public Dimension filterPipeline(FilterPipeline filterPipeline) { - + public Dimension filterPipeline(@javax.annotation.Nullable FilterPipeline filterPipeline) { this.filterPipeline = filterPipeline; return this; } - /** + /** * Get filterPipeline * @return filterPipeline - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public FilterPipeline getFilterPipeline() { return filterPipeline; } - - public void setFilterPipeline(FilterPipeline filterPipeline) { + public void setFilterPipeline(@javax.annotation.Nullable FilterPipeline filterPipeline) { this.filterPipeline = filterPipeline; } - /** - * 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. - */ - public Dimension 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -256,13 +216,12 @@ public boolean equals(Object o) { Objects.equals(this.domain, dimension.domain) && Objects.equals(this.nullTileExtent, dimension.nullTileExtent) && Objects.equals(this.tileExtent, dimension.tileExtent) && - Objects.equals(this.filterPipeline, dimension.filterPipeline)&& - Objects.equals(this.additionalProperties, dimension.additionalProperties); + Objects.equals(this.filterPipeline, dimension.filterPipeline); } @Override public int hashCode() { - return Objects.hash(name, type, domain, nullTileExtent, tileExtent, filterPipeline, additionalProperties); + return Objects.hash(name, type, domain, nullTileExtent, tileExtent, filterPipeline); } @Override @@ -275,7 +234,6 @@ public String toString() { sb.append(" nullTileExtent: ").append(toIndentedString(nullTileExtent)).append("\n"); sb.append(" tileExtent: ").append(toIndentedString(tileExtent)).append("\n"); sb.append(" filterPipeline: ").append(toIndentedString(filterPipeline)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -312,41 +270,48 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("nullTileExtent"); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Dimension - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (Dimension.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 Dimension + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Dimension.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in Dimension is not found in the empty JSON string", Dimension.openapiRequiredFields.toString())); } } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Dimension.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Dimension` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Dimension.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + 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("name") != null && !jsonObj.get("name").isJsonNull()) && !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())); } - // validate the optional field `domain` - if (jsonObj.get("domain") != null && !jsonObj.get("domain").isJsonNull()) { - DomainArray.validateJsonObject(jsonObj.getAsJsonObject("domain")); - } + // validate the required field `type` + Datatype.validateJsonElement(jsonObj.get("type")); + // validate the required field `domain` + DomainArray.validateJsonElement(jsonObj.get("domain")); // validate the optional field `tileExtent` if (jsonObj.get("tileExtent") != null && !jsonObj.get("tileExtent").isJsonNull()) { - DimensionTileExtent.validateJsonObject(jsonObj.getAsJsonObject("tileExtent")); + DimensionTileExtent.validateJsonElement(jsonObj.get("tileExtent")); } // validate the optional field `filterPipeline` if (jsonObj.get("filterPipeline") != null && !jsonObj.get("filterPipeline").isJsonNull()) { - FilterPipeline.validateJsonObject(jsonObj.getAsJsonObject("filterPipeline")); + FilterPipeline.validateJsonElement(jsonObj.get("filterPipeline")); } } @@ -365,71 +330,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, Dimension value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 Dimension read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - Dimension 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Dimension given an JSON string - * - * @param jsonString JSON string - * @return An instance of Dimension - * @throws IOException if the JSON string is invalid with respect to Dimension - */ + /** + * Create an instance of Dimension given an JSON string + * + * @param jsonString JSON string + * @return An instance of Dimension + * @throws IOException if the JSON string is invalid with respect to Dimension + */ public static Dimension fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Dimension.class); } - /** - * Convert an instance of Dimension to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Dimension to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/DimensionCoordinate.java b/src/main/java/io/tiledb/cloud/rest_api/model/DimensionCoordinate.java index 7011bd1..d72860d 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/DimensionCoordinate.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/DimensionCoordinate.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,343 +11,287 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * A single, typed coordinate for a dimension */ -@ApiModel(description = "A single, typed coordinate for a dimension") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class DimensionCoordinate { public static final String SERIALIZED_NAME_INT8 = "int8"; @SerializedName(SERIALIZED_NAME_INT8) + @javax.annotation.Nullable private Integer int8; public static final String SERIALIZED_NAME_UINT8 = "uint8"; @SerializedName(SERIALIZED_NAME_UINT8) + @javax.annotation.Nullable private Integer uint8; public static final String SERIALIZED_NAME_INT16 = "int16"; @SerializedName(SERIALIZED_NAME_INT16) + @javax.annotation.Nullable private Integer int16; public static final String SERIALIZED_NAME_UINT16 = "uint16"; @SerializedName(SERIALIZED_NAME_UINT16) + @javax.annotation.Nullable private Integer uint16; public static final String SERIALIZED_NAME_INT32 = "int32"; @SerializedName(SERIALIZED_NAME_INT32) + @javax.annotation.Nullable private Integer int32; public static final String SERIALIZED_NAME_UINT32 = "uint32"; @SerializedName(SERIALIZED_NAME_UINT32) + @javax.annotation.Nullable private Integer uint32; public static final String SERIALIZED_NAME_INT64 = "int64"; @SerializedName(SERIALIZED_NAME_INT64) + @javax.annotation.Nullable private Long int64; public static final String SERIALIZED_NAME_UINT64 = "uint64"; @SerializedName(SERIALIZED_NAME_UINT64) + @javax.annotation.Nullable private Integer uint64; public static final String SERIALIZED_NAME_FLOAT32 = "float32"; @SerializedName(SERIALIZED_NAME_FLOAT32) + @javax.annotation.Nullable private Float float32; public static final String SERIALIZED_NAME_FLOAT64 = "float64"; @SerializedName(SERIALIZED_NAME_FLOAT64) + @javax.annotation.Nullable private Double float64; public DimensionCoordinate() { } - public DimensionCoordinate int8(Integer int8) { - + public DimensionCoordinate int8(@javax.annotation.Nullable Integer int8) { this.int8 = int8; return this; } - /** + /** * Get int8 * @return int8 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getInt8() { return int8; } - - public void setInt8(Integer int8) { + public void setInt8(@javax.annotation.Nullable Integer int8) { this.int8 = int8; } - public DimensionCoordinate uint8(Integer uint8) { - + public DimensionCoordinate uint8(@javax.annotation.Nullable Integer uint8) { this.uint8 = uint8; return this; } - /** + /** * Get uint8 * @return uint8 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getUint8() { return uint8; } - - public void setUint8(Integer uint8) { + public void setUint8(@javax.annotation.Nullable Integer uint8) { this.uint8 = uint8; } - public DimensionCoordinate int16(Integer int16) { - + public DimensionCoordinate int16(@javax.annotation.Nullable Integer int16) { this.int16 = int16; return this; } - /** + /** * Get int16 * @return int16 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getInt16() { return int16; } - - public void setInt16(Integer int16) { + public void setInt16(@javax.annotation.Nullable Integer int16) { this.int16 = int16; } - public DimensionCoordinate uint16(Integer uint16) { - + public DimensionCoordinate uint16(@javax.annotation.Nullable Integer uint16) { this.uint16 = uint16; return this; } - /** + /** * Get uint16 * @return uint16 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getUint16() { return uint16; } - - public void setUint16(Integer uint16) { + public void setUint16(@javax.annotation.Nullable Integer uint16) { this.uint16 = uint16; } - public DimensionCoordinate int32(Integer int32) { - + public DimensionCoordinate int32(@javax.annotation.Nullable Integer int32) { this.int32 = int32; return this; } - /** + /** * Get int32 * @return int32 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getInt32() { return int32; } - - public void setInt32(Integer int32) { + public void setInt32(@javax.annotation.Nullable Integer int32) { this.int32 = int32; } - public DimensionCoordinate uint32(Integer uint32) { - + public DimensionCoordinate uint32(@javax.annotation.Nullable Integer uint32) { this.uint32 = uint32; return this; } - /** + /** * Get uint32 * @return uint32 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getUint32() { return uint32; } - - public void setUint32(Integer uint32) { + public void setUint32(@javax.annotation.Nullable Integer uint32) { this.uint32 = uint32; } - public DimensionCoordinate int64(Long int64) { - + public DimensionCoordinate int64(@javax.annotation.Nullable Long int64) { this.int64 = int64; return this; } - /** + /** * Get int64 * @return int64 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Long getInt64() { return int64; } - - public void setInt64(Long int64) { + public void setInt64(@javax.annotation.Nullable Long int64) { this.int64 = int64; } - public DimensionCoordinate uint64(Integer uint64) { - + public DimensionCoordinate uint64(@javax.annotation.Nullable Integer uint64) { this.uint64 = uint64; return this; } - /** + /** * Get uint64 * @return uint64 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getUint64() { return uint64; } - - public void setUint64(Integer uint64) { + public void setUint64(@javax.annotation.Nullable Integer uint64) { this.uint64 = uint64; } - public DimensionCoordinate float32(Float float32) { - + public DimensionCoordinate float32(@javax.annotation.Nullable Float float32) { this.float32 = float32; return this; } - /** + /** * Get float32 * @return float32 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Float getFloat32() { return float32; } - - public void setFloat32(Float float32) { + public void setFloat32(@javax.annotation.Nullable Float float32) { this.float32 = float32; } - public DimensionCoordinate float64(Double float64) { - + public DimensionCoordinate float64(@javax.annotation.Nullable Double float64) { this.float64 = float64; return this; } - /** + /** * Get float64 * @return float64 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Double getFloat64() { return float64; } - - public void setFloat64(Double float64) { + public void setFloat64(@javax.annotation.Nullable Double float64) { this.float64 = float64; } - /** - * 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. - */ - public DimensionCoordinate 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -368,13 +312,12 @@ public boolean equals(Object o) { Objects.equals(this.int64, dimensionCoordinate.int64) && Objects.equals(this.uint64, dimensionCoordinate.uint64) && Objects.equals(this.float32, dimensionCoordinate.float32) && - Objects.equals(this.float64, dimensionCoordinate.float64)&& - Objects.equals(this.additionalProperties, dimensionCoordinate.additionalProperties); + Objects.equals(this.float64, dimensionCoordinate.float64); } @Override public int hashCode() { - return Objects.hash(int8, uint8, int16, uint16, int32, uint32, int64, uint64, float32, float64, additionalProperties); + return Objects.hash(int8, uint8, int16, uint16, int32, uint32, int64, uint64, float32, float64); } @Override @@ -391,7 +334,6 @@ public String toString() { sb.append(" uint64: ").append(toIndentedString(uint64)).append("\n"); sb.append(" float32: ").append(toIndentedString(float32)).append("\n"); sb.append(" float64: ").append(toIndentedString(float64)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -429,20 +371,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DimensionCoordinate - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (DimensionCoordinate.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 DimensionCoordinate + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DimensionCoordinate.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in DimensionCoordinate is not found in the empty JSON string", DimensionCoordinate.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!DimensionCoordinate.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DimensionCoordinate` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -460,71 +409,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, DimensionCoordinate value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 DimensionCoordinate read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - DimensionCoordinate 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of DimensionCoordinate given an JSON string - * - * @param jsonString JSON string - * @return An instance of DimensionCoordinate - * @throws IOException if the JSON string is invalid with respect to DimensionCoordinate - */ + /** + * Create an instance of DimensionCoordinate given an JSON string + * + * @param jsonString JSON string + * @return An instance of DimensionCoordinate + * @throws IOException if the JSON string is invalid with respect to DimensionCoordinate + */ public static DimensionCoordinate fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, DimensionCoordinate.class); } - /** - * Convert an instance of DimensionCoordinate to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of DimensionCoordinate to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/DimensionTileExtent.java b/src/main/java/io/tiledb/cloud/rest_api/model/DimensionTileExtent.java index d2380df..2e66fb2 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/DimensionTileExtent.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/DimensionTileExtent.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,344 +11,287 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Extent of tile */ -@ApiModel(description = "Extent of tile") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class DimensionTileExtent { public static final String SERIALIZED_NAME_INT8 = "int8"; @SerializedName(SERIALIZED_NAME_INT8) + @javax.annotation.Nullable private Integer int8; public static final String SERIALIZED_NAME_UINT8 = "uint8"; @SerializedName(SERIALIZED_NAME_UINT8) + @javax.annotation.Nullable private Integer uint8; public static final String SERIALIZED_NAME_INT16 = "int16"; @SerializedName(SERIALIZED_NAME_INT16) + @javax.annotation.Nullable private Integer int16; public static final String SERIALIZED_NAME_UINT16 = "uint16"; @SerializedName(SERIALIZED_NAME_UINT16) + @javax.annotation.Nullable private Integer uint16; public static final String SERIALIZED_NAME_INT32 = "int32"; @SerializedName(SERIALIZED_NAME_INT32) + @javax.annotation.Nullable private Integer int32; public static final String SERIALIZED_NAME_UINT32 = "uint32"; @SerializedName(SERIALIZED_NAME_UINT32) + @javax.annotation.Nullable private Integer uint32; public static final String SERIALIZED_NAME_INT64 = "int64"; @SerializedName(SERIALIZED_NAME_INT64) + @javax.annotation.Nullable private Long int64; public static final String SERIALIZED_NAME_UINT64 = "uint64"; @SerializedName(SERIALIZED_NAME_UINT64) + @javax.annotation.Nullable private Integer uint64; public static final String SERIALIZED_NAME_FLOAT32 = "float32"; @SerializedName(SERIALIZED_NAME_FLOAT32) + @javax.annotation.Nullable private Integer float32; public static final String SERIALIZED_NAME_FLOAT64 = "float64"; @SerializedName(SERIALIZED_NAME_FLOAT64) + @javax.annotation.Nullable private Integer float64; public DimensionTileExtent() { } - public DimensionTileExtent int8(Integer int8) { - + public DimensionTileExtent int8(@javax.annotation.Nullable Integer int8) { this.int8 = int8; return this; } - /** + /** * Get int8 * @return int8 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getInt8() { return int8; } - - public void setInt8(Integer int8) { + public void setInt8(@javax.annotation.Nullable Integer int8) { this.int8 = int8; } - public DimensionTileExtent uint8(Integer uint8) { - + public DimensionTileExtent uint8(@javax.annotation.Nullable Integer uint8) { this.uint8 = uint8; return this; } - /** + /** * Get uint8 * @return uint8 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getUint8() { return uint8; } - - public void setUint8(Integer uint8) { + public void setUint8(@javax.annotation.Nullable Integer uint8) { this.uint8 = uint8; } - public DimensionTileExtent int16(Integer int16) { - + public DimensionTileExtent int16(@javax.annotation.Nullable Integer int16) { this.int16 = int16; return this; } - /** + /** * Get int16 * @return int16 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getInt16() { return int16; } - - public void setInt16(Integer int16) { + public void setInt16(@javax.annotation.Nullable Integer int16) { this.int16 = int16; } - public DimensionTileExtent uint16(Integer uint16) { - + public DimensionTileExtent uint16(@javax.annotation.Nullable Integer uint16) { this.uint16 = uint16; return this; } - /** + /** * Get uint16 * @return uint16 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getUint16() { return uint16; } - - public void setUint16(Integer uint16) { + public void setUint16(@javax.annotation.Nullable Integer uint16) { this.uint16 = uint16; } - public DimensionTileExtent int32(Integer int32) { - + public DimensionTileExtent int32(@javax.annotation.Nullable Integer int32) { this.int32 = int32; return this; } - /** + /** * Get int32 * @return int32 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getInt32() { return int32; } - - public void setInt32(Integer int32) { + public void setInt32(@javax.annotation.Nullable Integer int32) { this.int32 = int32; } - public DimensionTileExtent uint32(Integer uint32) { - + public DimensionTileExtent uint32(@javax.annotation.Nullable Integer uint32) { this.uint32 = uint32; return this; } - /** + /** * Get uint32 * @return uint32 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getUint32() { return uint32; } - - public void setUint32(Integer uint32) { + public void setUint32(@javax.annotation.Nullable Integer uint32) { this.uint32 = uint32; } - public DimensionTileExtent int64(Long int64) { - + public DimensionTileExtent int64(@javax.annotation.Nullable Long int64) { this.int64 = int64; return this; } - /** + /** * Get int64 * @return int64 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Long getInt64() { return int64; } - - public void setInt64(Long int64) { + public void setInt64(@javax.annotation.Nullable Long int64) { this.int64 = int64; } - public DimensionTileExtent uint64(Integer uint64) { - + public DimensionTileExtent uint64(@javax.annotation.Nullable Integer uint64) { this.uint64 = uint64; return this; } - /** + /** * Get uint64 * @return uint64 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getUint64() { return uint64; } - - public void setUint64(Integer uint64) { + public void setUint64(@javax.annotation.Nullable Integer uint64) { this.uint64 = uint64; } - public DimensionTileExtent float32(Integer float32) { - + public DimensionTileExtent float32(@javax.annotation.Nullable Integer float32) { this.float32 = float32; return this; } - /** + /** * Get float32 * @return float32 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getFloat32() { return float32; } - - public void setFloat32(Integer float32) { + public void setFloat32(@javax.annotation.Nullable Integer float32) { this.float32 = float32; } - public DimensionTileExtent float64(Integer float64) { - + public DimensionTileExtent float64(@javax.annotation.Nullable Integer float64) { this.float64 = float64; return this; } - /** + /** * Get float64 * @return float64 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getFloat64() { return float64; } - - public void setFloat64(Integer float64) { + public void setFloat64(@javax.annotation.Nullable Integer float64) { this.float64 = float64; } - /** - * 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. - */ - public DimensionTileExtent 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -369,13 +312,12 @@ public boolean equals(Object o) { Objects.equals(this.int64, dimensionTileExtent.int64) && Objects.equals(this.uint64, dimensionTileExtent.uint64) && Objects.equals(this.float32, dimensionTileExtent.float32) && - Objects.equals(this.float64, dimensionTileExtent.float64)&& - Objects.equals(this.additionalProperties, dimensionTileExtent.additionalProperties); + Objects.equals(this.float64, dimensionTileExtent.float64); } @Override public int hashCode() { - return Objects.hash(int8, uint8, int16, uint16, int32, uint32, int64, uint64, float32, float64, additionalProperties); + return Objects.hash(int8, uint8, int16, uint16, int32, uint32, int64, uint64, float32, float64); } @Override @@ -392,7 +334,6 @@ public String toString() { sb.append(" uint64: ").append(toIndentedString(uint64)).append("\n"); sb.append(" float32: ").append(toIndentedString(float32)).append("\n"); sb.append(" float64: ").append(toIndentedString(float64)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -430,20 +371,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DimensionTileExtent - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (DimensionTileExtent.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 DimensionTileExtent + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DimensionTileExtent.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in DimensionTileExtent is not found in the empty JSON string", DimensionTileExtent.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!DimensionTileExtent.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DimensionTileExtent` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -461,71 +409,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, DimensionTileExtent value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 DimensionTileExtent read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - DimensionTileExtent 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of DimensionTileExtent given an JSON string - * - * @param jsonString JSON string - * @return An instance of DimensionTileExtent - * @throws IOException if the JSON string is invalid with respect to DimensionTileExtent - */ + /** + * Create an instance of DimensionTileExtent given an JSON string + * + * @param jsonString JSON string + * @return An instance of DimensionTileExtent + * @throws IOException if the JSON string is invalid with respect to DimensionTileExtent + */ public static DimensionTileExtent fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, DimensionTileExtent.class); } - /** - * Convert an instance of DimensionTileExtent to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of DimensionTileExtent to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/Domain.java b/src/main/java/io/tiledb/cloud/rest_api/model/Domain.java index d6b6a15..325c1f4 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/Domain.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/Domain.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,189 +11,156 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.Datatype; +import org.openapitools.client.model.Dimension; +import org.openapitools.client.model.Layout; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Domain of array */ -@ApiModel(description = "Domain of array") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class Domain { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull private Datatype type; public static final String SERIALIZED_NAME_TILE_ORDER = "tileOrder"; @SerializedName(SERIALIZED_NAME_TILE_ORDER) + @javax.annotation.Nonnull private Layout tileOrder; public static final String SERIALIZED_NAME_CELL_ORDER = "cellOrder"; @SerializedName(SERIALIZED_NAME_CELL_ORDER) + @javax.annotation.Nonnull private Layout cellOrder; public static final String SERIALIZED_NAME_DIMENSIONS = "dimensions"; @SerializedName(SERIALIZED_NAME_DIMENSIONS) + @javax.annotation.Nonnull private List dimensions = new ArrayList<>(); public Domain() { } - public Domain type(Datatype type) { - + public Domain type(@javax.annotation.Nonnull Datatype type) { this.type = type; return this; } - /** + /** * Get type * @return type - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Datatype getType() { return type; } - - public void setType(Datatype type) { + public void setType(@javax.annotation.Nonnull Datatype type) { this.type = type; } - public Domain tileOrder(Layout tileOrder) { - + public Domain tileOrder(@javax.annotation.Nonnull Layout tileOrder) { this.tileOrder = tileOrder; return this; } - /** + /** * Get tileOrder * @return tileOrder - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Layout getTileOrder() { return tileOrder; } - - public void setTileOrder(Layout tileOrder) { + public void setTileOrder(@javax.annotation.Nonnull Layout tileOrder) { this.tileOrder = tileOrder; } - public Domain cellOrder(Layout cellOrder) { - + public Domain cellOrder(@javax.annotation.Nonnull Layout cellOrder) { this.cellOrder = cellOrder; return this; } - /** + /** * Get cellOrder * @return cellOrder - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Layout getCellOrder() { return cellOrder; } - - public void setCellOrder(Layout cellOrder) { + public void setCellOrder(@javax.annotation.Nonnull Layout cellOrder) { this.cellOrder = cellOrder; } - public Domain dimensions(List dimensions) { - + public Domain dimensions(@javax.annotation.Nonnull List dimensions) { this.dimensions = dimensions; return this; } public Domain addDimensionsItem(Dimension dimensionsItem) { + if (this.dimensions == null) { + this.dimensions = new ArrayList<>(); + } this.dimensions.add(dimensionsItem); return this; } - /** + /** * Array of dimensions * @return dimensions - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Array of dimensions") - public List getDimensions() { return dimensions; } - - public void setDimensions(List dimensions) { + public void setDimensions(@javax.annotation.Nonnull List dimensions) { this.dimensions = dimensions; } - /** - * 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. - */ - public Domain 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -208,13 +175,12 @@ public boolean equals(Object o) { return Objects.equals(this.type, domain.type) && Objects.equals(this.tileOrder, domain.tileOrder) && Objects.equals(this.cellOrder, domain.cellOrder) && - Objects.equals(this.dimensions, domain.dimensions)&& - Objects.equals(this.additionalProperties, domain.additionalProperties); + Objects.equals(this.dimensions, domain.dimensions); } @Override public int hashCode() { - return Objects.hash(type, tileOrder, cellOrder, dimensions, additionalProperties); + return Objects.hash(type, tileOrder, cellOrder, dimensions); } @Override @@ -225,7 +191,6 @@ public String toString() { sb.append(" tileOrder: ").append(toIndentedString(tileOrder)).append("\n"); sb.append(" cellOrder: ").append(toIndentedString(cellOrder)).append("\n"); sb.append(" dimensions: ").append(toIndentedString(dimensions)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -261,39 +226,50 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("dimensions"); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Domain - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (Domain.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 Domain + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Domain.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in Domain is not found in the empty JSON string", Domain.openapiRequiredFields.toString())); } } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Domain.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Domain` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Domain.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + 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())); } } - JsonArray jsonArraydimensions = jsonObj.getAsJsonArray("dimensions"); - if (jsonArraydimensions != null) { - // ensure the json data is an array - if (!jsonObj.get("dimensions").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `dimensions` to be an array in the JSON string but got `%s`", jsonObj.get("dimensions").toString())); - } - - // validate the optional field `dimensions` (array) - for (int i = 0; i < jsonArraydimensions.size(); i++) { - Dimension.validateJsonObject(jsonArraydimensions.get(i).getAsJsonObject()); - }; + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `type` + Datatype.validateJsonElement(jsonObj.get("type")); + // validate the required field `tileOrder` + Layout.validateJsonElement(jsonObj.get("tileOrder")); + // validate the required field `cellOrder` + Layout.validateJsonElement(jsonObj.get("cellOrder")); + // ensure the json data is an array + if (!jsonObj.get("dimensions").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `dimensions` to be an array in the JSON string but got `%s`", jsonObj.get("dimensions").toString())); } + + JsonArray jsonArraydimensions = jsonObj.getAsJsonArray("dimensions"); + // validate the required field `dimensions` (array) + for (int i = 0; i < jsonArraydimensions.size(); i++) { + Dimension.validateJsonElement(jsonArraydimensions.get(i)); + }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -311,71 +287,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, Domain value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 Domain read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - Domain 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Domain given an JSON string - * - * @param jsonString JSON string - * @return An instance of Domain - * @throws IOException if the JSON string is invalid with respect to Domain - */ + /** + * Create an instance of Domain given an JSON string + * + * @param jsonString JSON string + * @return An instance of Domain + * @throws IOException if the JSON string is invalid with respect to Domain + */ public static Domain fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Domain.class); } - /** - * Convert an instance of Domain to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Domain to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/DomainArray.java b/src/main/java/io/tiledb/cloud/rest_api/model/DomainArray.java index 864474a..cac1f1a 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/DomainArray.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/DomainArray.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,83 +11,101 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Domain object for an array of each type */ -@ApiModel(description = "Domain object for an array of each type") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class DomainArray { public static final String SERIALIZED_NAME_INT8 = "int8"; @SerializedName(SERIALIZED_NAME_INT8) - private List int8 = null; + @javax.annotation.Nullable + private List int8 = new ArrayList<>(); public static final String SERIALIZED_NAME_UINT8 = "uint8"; @SerializedName(SERIALIZED_NAME_UINT8) - private List uint8 = null; + @javax.annotation.Nullable + private List uint8 = new ArrayList<>(); public static final String SERIALIZED_NAME_INT16 = "int16"; @SerializedName(SERIALIZED_NAME_INT16) - private List int16 = null; + @javax.annotation.Nullable + private List int16 = new ArrayList<>(); public static final String SERIALIZED_NAME_UINT16 = "uint16"; @SerializedName(SERIALIZED_NAME_UINT16) - private List uint16 = null; + @javax.annotation.Nullable + private List uint16 = new ArrayList<>(); public static final String SERIALIZED_NAME_INT32 = "int32"; @SerializedName(SERIALIZED_NAME_INT32) - private List int32 = null; + @javax.annotation.Nullable + private List int32 = new ArrayList<>(); public static final String SERIALIZED_NAME_UINT32 = "uint32"; @SerializedName(SERIALIZED_NAME_UINT32) - private List uint32 = null; + @javax.annotation.Nullable + private List uint32 = new ArrayList<>(); public static final String SERIALIZED_NAME_INT64 = "int64"; @SerializedName(SERIALIZED_NAME_INT64) - private List int64 = null; + @javax.annotation.Nullable + private List int64 = new ArrayList<>(); public static final String SERIALIZED_NAME_UINT64 = "uint64"; @SerializedName(SERIALIZED_NAME_UINT64) - private List uint64 = null; + @javax.annotation.Nullable + private List uint64 = new ArrayList<>(); public static final String SERIALIZED_NAME_FLOAT32 = "float32"; @SerializedName(SERIALIZED_NAME_FLOAT32) - private List float32 = null; + @javax.annotation.Nullable + private List float32 = new ArrayList<>(); public static final String SERIALIZED_NAME_FLOAT64 = "float64"; @SerializedName(SERIALIZED_NAME_FLOAT64) - private List float64 = null; + @javax.annotation.Nullable + private List float64 = new ArrayList<>(); public DomainArray() { } - public DomainArray int8(List int8) { - + public DomainArray int8(@javax.annotation.Nullable List int8) { this.int8 = int8; return this; } @@ -100,25 +118,21 @@ public DomainArray addInt8Item(Integer int8Item) { return this; } - /** + /** * Get int8 * @return int8 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getInt8() { return int8; } - - public void setInt8(List int8) { + public void setInt8(@javax.annotation.Nullable List int8) { this.int8 = int8; } - public DomainArray uint8(List uint8) { - + public DomainArray uint8(@javax.annotation.Nullable List uint8) { this.uint8 = uint8; return this; } @@ -131,25 +145,21 @@ public DomainArray addUint8Item(Integer uint8Item) { return this; } - /** + /** * Get uint8 * @return uint8 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getUint8() { return uint8; } - - public void setUint8(List uint8) { + public void setUint8(@javax.annotation.Nullable List uint8) { this.uint8 = uint8; } - public DomainArray int16(List int16) { - + public DomainArray int16(@javax.annotation.Nullable List int16) { this.int16 = int16; return this; } @@ -162,25 +172,21 @@ public DomainArray addInt16Item(Integer int16Item) { return this; } - /** + /** * Get int16 * @return int16 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getInt16() { return int16; } - - public void setInt16(List int16) { + public void setInt16(@javax.annotation.Nullable List int16) { this.int16 = int16; } - public DomainArray uint16(List uint16) { - + public DomainArray uint16(@javax.annotation.Nullable List uint16) { this.uint16 = uint16; return this; } @@ -193,25 +199,21 @@ public DomainArray addUint16Item(Integer uint16Item) { return this; } - /** + /** * Get uint16 * @return uint16 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getUint16() { return uint16; } - - public void setUint16(List uint16) { + public void setUint16(@javax.annotation.Nullable List uint16) { this.uint16 = uint16; } - public DomainArray int32(List int32) { - + public DomainArray int32(@javax.annotation.Nullable List int32) { this.int32 = int32; return this; } @@ -224,25 +226,21 @@ public DomainArray addInt32Item(Integer int32Item) { return this; } - /** + /** * Get int32 * @return int32 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getInt32() { return int32; } - - public void setInt32(List int32) { + public void setInt32(@javax.annotation.Nullable List int32) { this.int32 = int32; } - public DomainArray uint32(List uint32) { - + public DomainArray uint32(@javax.annotation.Nullable List uint32) { this.uint32 = uint32; return this; } @@ -255,25 +253,21 @@ public DomainArray addUint32Item(Integer uint32Item) { return this; } - /** + /** * Get uint32 * @return uint32 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getUint32() { return uint32; } - - public void setUint32(List uint32) { + public void setUint32(@javax.annotation.Nullable List uint32) { this.uint32 = uint32; } - public DomainArray int64(List int64) { - + public DomainArray int64(@javax.annotation.Nullable List int64) { this.int64 = int64; return this; } @@ -286,25 +280,21 @@ public DomainArray addInt64Item(Long int64Item) { return this; } - /** + /** * Get int64 * @return int64 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getInt64() { return int64; } - - public void setInt64(List int64) { + public void setInt64(@javax.annotation.Nullable List int64) { this.int64 = int64; } - public DomainArray uint64(List uint64) { - + public DomainArray uint64(@javax.annotation.Nullable List uint64) { this.uint64 = uint64; return this; } @@ -317,25 +307,21 @@ public DomainArray addUint64Item(Integer uint64Item) { return this; } - /** + /** * Get uint64 * @return uint64 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getUint64() { return uint64; } - - public void setUint64(List uint64) { + public void setUint64(@javax.annotation.Nullable List uint64) { this.uint64 = uint64; } - public DomainArray float32(List float32) { - + public DomainArray float32(@javax.annotation.Nullable List float32) { this.float32 = float32; return this; } @@ -348,25 +334,21 @@ public DomainArray addFloat32Item(Float float32Item) { return this; } - /** + /** * Get float32 * @return float32 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getFloat32() { return float32; } - - public void setFloat32(List float32) { + public void setFloat32(@javax.annotation.Nullable List float32) { this.float32 = float32; } - public DomainArray float64(List float64) { - + public DomainArray float64(@javax.annotation.Nullable List float64) { this.float64 = float64; return this; } @@ -379,57 +361,19 @@ public DomainArray addFloat64Item(Double float64Item) { return this; } - /** + /** * Get float64 * @return float64 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getFloat64() { return float64; } - - public void setFloat64(List float64) { + public void setFloat64(@javax.annotation.Nullable List float64) { this.float64 = float64; } - /** - * 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. - */ - public DomainArray 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -450,13 +394,12 @@ public boolean equals(Object o) { Objects.equals(this.int64, domainArray.int64) && Objects.equals(this.uint64, domainArray.uint64) && Objects.equals(this.float32, domainArray.float32) && - Objects.equals(this.float64, domainArray.float64)&& - Objects.equals(this.additionalProperties, domainArray.additionalProperties); + Objects.equals(this.float64, domainArray.float64); } @Override public int hashCode() { - return Objects.hash(int8, uint8, int16, uint16, int32, uint32, int64, uint64, float32, float64, additionalProperties); + return Objects.hash(int8, uint8, int16, uint16, int32, uint32, int64, uint64, float32, float64); } @Override @@ -473,7 +416,6 @@ public String toString() { sb.append(" uint64: ").append(toIndentedString(uint64)).append("\n"); sb.append(" float32: ").append(toIndentedString(float32)).append("\n"); sb.append(" float64: ").append(toIndentedString(float64)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -511,58 +453,65 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DomainArray - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (DomainArray.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 DomainArray + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DomainArray.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in DomainArray is not found in the empty JSON string", DomainArray.openapiRequiredFields.toString())); } } - // ensure the json data is an array - if ((jsonObj.get("int8") != null && !jsonObj.get("int8").isJsonNull()) && !jsonObj.get("int8").isJsonArray()) { + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!DomainArray.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DomainArray` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("int8") != null && !jsonObj.get("int8").isJsonNull() && !jsonObj.get("int8").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `int8` to be an array in the JSON string but got `%s`", jsonObj.get("int8").toString())); } - // ensure the json data is an array - if ((jsonObj.get("uint8") != null && !jsonObj.get("uint8").isJsonNull()) && !jsonObj.get("uint8").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("uint8") != null && !jsonObj.get("uint8").isJsonNull() && !jsonObj.get("uint8").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `uint8` to be an array in the JSON string but got `%s`", jsonObj.get("uint8").toString())); } - // ensure the json data is an array - if ((jsonObj.get("int16") != null && !jsonObj.get("int16").isJsonNull()) && !jsonObj.get("int16").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("int16") != null && !jsonObj.get("int16").isJsonNull() && !jsonObj.get("int16").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `int16` to be an array in the JSON string but got `%s`", jsonObj.get("int16").toString())); } - // ensure the json data is an array - if ((jsonObj.get("uint16") != null && !jsonObj.get("uint16").isJsonNull()) && !jsonObj.get("uint16").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("uint16") != null && !jsonObj.get("uint16").isJsonNull() && !jsonObj.get("uint16").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `uint16` to be an array in the JSON string but got `%s`", jsonObj.get("uint16").toString())); } - // ensure the json data is an array - if ((jsonObj.get("int32") != null && !jsonObj.get("int32").isJsonNull()) && !jsonObj.get("int32").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("int32") != null && !jsonObj.get("int32").isJsonNull() && !jsonObj.get("int32").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `int32` to be an array in the JSON string but got `%s`", jsonObj.get("int32").toString())); } - // ensure the json data is an array - if ((jsonObj.get("uint32") != null && !jsonObj.get("uint32").isJsonNull()) && !jsonObj.get("uint32").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("uint32") != null && !jsonObj.get("uint32").isJsonNull() && !jsonObj.get("uint32").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `uint32` to be an array in the JSON string but got `%s`", jsonObj.get("uint32").toString())); } - // ensure the json data is an array - if ((jsonObj.get("int64") != null && !jsonObj.get("int64").isJsonNull()) && !jsonObj.get("int64").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("int64") != null && !jsonObj.get("int64").isJsonNull() && !jsonObj.get("int64").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `int64` to be an array in the JSON string but got `%s`", jsonObj.get("int64").toString())); } - // ensure the json data is an array - if ((jsonObj.get("uint64") != null && !jsonObj.get("uint64").isJsonNull()) && !jsonObj.get("uint64").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("uint64") != null && !jsonObj.get("uint64").isJsonNull() && !jsonObj.get("uint64").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `uint64` to be an array in the JSON string but got `%s`", jsonObj.get("uint64").toString())); } - // ensure the json data is an array - if ((jsonObj.get("float32") != null && !jsonObj.get("float32").isJsonNull()) && !jsonObj.get("float32").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("float32") != null && !jsonObj.get("float32").isJsonNull() && !jsonObj.get("float32").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `float32` to be an array in the JSON string but got `%s`", jsonObj.get("float32").toString())); } - // ensure the json data is an array - if ((jsonObj.get("float64") != null && !jsonObj.get("float64").isJsonNull()) && !jsonObj.get("float64").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("float64") != null && !jsonObj.get("float64").isJsonNull() && !jsonObj.get("float64").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `float64` to be an array in the JSON string but got `%s`", jsonObj.get("float64").toString())); } } @@ -582,71 +531,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, DomainArray value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 DomainArray read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - DomainArray 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of DomainArray given an JSON string - * - * @param jsonString JSON string - * @return An instance of DomainArray - * @throws IOException if the JSON string is invalid with respect to DomainArray - */ + /** + * Create an instance of DomainArray given an JSON string + * + * @param jsonString JSON string + * @return An instance of DomainArray + * @throws IOException if the JSON string is invalid with respect to DomainArray + */ public static DomainArray fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, DomainArray.class); } - /** - * Convert an instance of DomainArray to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of DomainArray to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/DomainCheckResult.java b/src/main/java/io/tiledb/cloud/rest_api/model/DomainCheckResult.java index 07d164f..008e035 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/DomainCheckResult.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/DomainCheckResult.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,128 +11,97 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; +import org.openapitools.client.model.DomainCheckStatus; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * The record of a check of a single domain's status. */ -@ApiModel(description = "The record of a check of a single domain's status.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class DomainCheckResult { public static final String SERIALIZED_NAME_TIME = "time"; @SerializedName(SERIALIZED_NAME_TIME) + @javax.annotation.Nullable private OffsetDateTime time; public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable private DomainCheckStatus status; public DomainCheckResult() { } - public DomainCheckResult time(OffsetDateTime time) { - + public DomainCheckResult time(@javax.annotation.Nullable OffsetDateTime time) { this.time = time; return this; } - /** + /** * The timestamp when the check was performed. * @return time - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The timestamp when the check was performed.") - public OffsetDateTime getTime() { return time; } - - public void setTime(OffsetDateTime time) { + public void setTime(@javax.annotation.Nullable OffsetDateTime time) { this.time = time; } - public DomainCheckResult status(DomainCheckStatus status) { - + public DomainCheckResult status(@javax.annotation.Nullable DomainCheckStatus status) { this.status = status; return this; } - /** + /** * Get status * @return status - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public DomainCheckStatus getStatus() { return status; } - - public void setStatus(DomainCheckStatus status) { + public void setStatus(@javax.annotation.Nullable DomainCheckStatus status) { this.status = status; } - /** - * 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. - */ - public DomainCheckResult 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -145,13 +114,12 @@ public boolean equals(Object o) { } DomainCheckResult domainCheckResult = (DomainCheckResult) o; return Objects.equals(this.time, domainCheckResult.time) && - Objects.equals(this.status, domainCheckResult.status)&& - Objects.equals(this.additionalProperties, domainCheckResult.additionalProperties); + Objects.equals(this.status, domainCheckResult.status); } @Override public int hashCode() { - return Objects.hash(time, status, additionalProperties); + return Objects.hash(time, status); } @Override @@ -160,7 +128,6 @@ public String toString() { sb.append("class DomainCheckResult {\n"); sb.append(" time: ").append(toIndentedString(time)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -190,20 +157,31 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DomainCheckResult - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (DomainCheckResult.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 DomainCheckResult + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DomainCheckResult.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in DomainCheckResult is not found in the empty JSON string", DomainCheckResult.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!DomainCheckResult.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DomainCheckResult` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `status` + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { + DomainCheckStatus.validateJsonElement(jsonObj.get("status")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -221,71 +199,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, DomainCheckResult value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 DomainCheckResult read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - DomainCheckResult 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of DomainCheckResult given an JSON string - * - * @param jsonString JSON string - * @return An instance of DomainCheckResult - * @throws IOException if the JSON string is invalid with respect to DomainCheckResult - */ + /** + * Create an instance of DomainCheckResult given an JSON string + * + * @param jsonString JSON string + * @return An instance of DomainCheckResult + * @throws IOException if the JSON string is invalid with respect to DomainCheckResult + */ public static DomainCheckResult fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, DomainCheckResult.class); } - /** - * Convert an instance of DomainCheckResult to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of DomainCheckResult to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/DomainCheckStatus.java b/src/main/java/io/tiledb/cloud/rest_api/model/DomainCheckStatus.java index 4a95b20..ce92920 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/DomainCheckStatus.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/DomainCheckStatus.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -67,5 +71,10 @@ public DomainCheckStatus read(final JsonReader jsonReader) throws IOException { return DomainCheckStatus.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DomainCheckStatus.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/DomainVerificationStatus.java b/src/main/java/io/tiledb/cloud/rest_api/model/DomainVerificationStatus.java index f88c59c..1f6e27a 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/DomainVerificationStatus.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/DomainVerificationStatus.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -69,5 +73,10 @@ public DomainVerificationStatus read(final JsonReader jsonReader) throws IOExcep return DomainVerificationStatus.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DomainVerificationStatus.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/Enumeration.java b/src/main/java/io/tiledb/cloud/rest_api/model/Enumeration.java new file mode 100644 index 0000000..17644ba --- /dev/null +++ b/src/main/java/io/tiledb/cloud/rest_api/model/Enumeration.java @@ -0,0 +1,400 @@ +/* + * TileDB Storage Platform API + * TileDB Storage Platform REST API + * + * The version of the OpenAPI document: 2.17.51 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +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 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.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * The enumerations of a single attribute + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") +public class Enumeration { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_PATH_NAME = "path_name"; + @SerializedName(SERIALIZED_NAME_PATH_NAME) + @javax.annotation.Nullable + private String pathName; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private String type; + + public static final String SERIALIZED_NAME_CELL_VAL_NUM = "cell_val_num"; + @SerializedName(SERIALIZED_NAME_CELL_VAL_NUM) + @javax.annotation.Nullable + private Integer cellValNum; + + public static final String SERIALIZED_NAME_ORDERED = "ordered"; + @SerializedName(SERIALIZED_NAME_ORDERED) + @javax.annotation.Nullable + private Boolean ordered; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private List data = new ArrayList<>(); + + public static final String SERIALIZED_NAME_OFFSETS = "offsets"; + @SerializedName(SERIALIZED_NAME_OFFSETS) + @javax.annotation.Nullable + private List offsets = new ArrayList<>(); + + public Enumeration() { + } + + public Enumeration name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public Enumeration pathName(@javax.annotation.Nullable String pathName) { + this.pathName = pathName; + return this; + } + + /** + * Get pathName + * @return pathName + */ + @javax.annotation.Nullable + public String getPathName() { + return pathName; + } + + public void setPathName(@javax.annotation.Nullable String pathName) { + this.pathName = pathName; + } + + + public Enumeration type(@javax.annotation.Nullable String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nullable String type) { + this.type = type; + } + + + public Enumeration cellValNum(@javax.annotation.Nullable Integer cellValNum) { + this.cellValNum = cellValNum; + return this; + } + + /** + * Get cellValNum + * @return cellValNum + */ + @javax.annotation.Nullable + public Integer getCellValNum() { + return cellValNum; + } + + public void setCellValNum(@javax.annotation.Nullable Integer cellValNum) { + this.cellValNum = cellValNum; + } + + + public Enumeration ordered(@javax.annotation.Nullable Boolean ordered) { + this.ordered = ordered; + return this; + } + + /** + * Get ordered + * @return ordered + */ + @javax.annotation.Nullable + public Boolean getOrdered() { + return ordered; + } + + public void setOrdered(@javax.annotation.Nullable Boolean ordered) { + this.ordered = ordered; + } + + + public Enumeration data(@javax.annotation.Nullable List data) { + this.data = data; + return this; + } + + public Enumeration addDataItem(Integer dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + */ + @javax.annotation.Nullable + public List getData() { + return data; + } + + public void setData(@javax.annotation.Nullable List data) { + this.data = data; + } + + + public Enumeration offsets(@javax.annotation.Nullable List offsets) { + this.offsets = offsets; + return this; + } + + public Enumeration addOffsetsItem(Integer offsetsItem) { + if (this.offsets == null) { + this.offsets = new ArrayList<>(); + } + this.offsets.add(offsetsItem); + return this; + } + + /** + * Get offsets + * @return offsets + */ + @javax.annotation.Nullable + public List getOffsets() { + return offsets; + } + + public void setOffsets(@javax.annotation.Nullable List offsets) { + this.offsets = offsets; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Enumeration enumeration = (Enumeration) o; + return Objects.equals(this.name, enumeration.name) && + Objects.equals(this.pathName, enumeration.pathName) && + Objects.equals(this.type, enumeration.type) && + Objects.equals(this.cellValNum, enumeration.cellValNum) && + Objects.equals(this.ordered, enumeration.ordered) && + Objects.equals(this.data, enumeration.data) && + Objects.equals(this.offsets, enumeration.offsets); + } + + @Override + public int hashCode() { + return Objects.hash(name, pathName, type, cellValNum, ordered, data, offsets); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Enumeration {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" pathName: ").append(toIndentedString(pathName)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" cellValNum: ").append(toIndentedString(cellValNum)).append("\n"); + sb.append(" ordered: ").append(toIndentedString(ordered)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" offsets: ").append(toIndentedString(offsets)).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("name"); + openapiFields.add("path_name"); + openapiFields.add("type"); + openapiFields.add("cell_val_num"); + openapiFields.add("ordered"); + openapiFields.add("data"); + openapiFields.add("offsets"); + + // 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 Enumeration + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Enumeration.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Enumeration is not found in the empty JSON string", Enumeration.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Enumeration.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Enumeration` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !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("path_name") != null && !jsonObj.get("path_name").isJsonNull()) && !jsonObj.get("path_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `path_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("path_name").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !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())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull() && !jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("offsets") != null && !jsonObj.get("offsets").isJsonNull() && !jsonObj.get("offsets").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `offsets` to be an array in the JSON string but got `%s`", jsonObj.get("offsets").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Enumeration.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Enumeration' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Enumeration.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Enumeration value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Enumeration read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Enumeration given an JSON string + * + * @param jsonString JSON string + * @return An instance of Enumeration + * @throws IOException if the JSON string is invalid with respect to Enumeration + */ + public static Enumeration fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Enumeration.class); + } + + /** + * Convert an instance of Enumeration to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/Error.java b/src/main/java/io/tiledb/cloud/rest_api/model/Error.java index 2189a99..bc90558 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/Error.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/Error.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,152 +11,119 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModelProperty; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Error */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class Error { public static final String SERIALIZED_NAME_CODE = "code"; @SerializedName(SERIALIZED_NAME_CODE) + @javax.annotation.Nullable private Long code; public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) + @javax.annotation.Nullable private String message; public static final String SERIALIZED_NAME_REQUEST_ID = "request_id"; @SerializedName(SERIALIZED_NAME_REQUEST_ID) + @javax.annotation.Nullable private String requestId; public Error() { } - public Error code(Long code) { - + public Error code(@javax.annotation.Nullable Long code) { this.code = code; return this; } - /** + /** * Get code * @return code - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Long getCode() { return code; } - - public void setCode(Long code) { + public void setCode(@javax.annotation.Nullable Long code) { this.code = code; } - public Error message(String message) { - + public Error message(@javax.annotation.Nullable String message) { this.message = message; return this; } - /** + /** * Get message * @return message - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getMessage() { return message; } - - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } - public Error requestId(String requestId) { - + public Error requestId(@javax.annotation.Nullable String requestId) { this.requestId = requestId; return this; } - /** + /** * Get requestId * @return requestId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getRequestId() { return requestId; } - - public void setRequestId(String requestId) { + public void setRequestId(@javax.annotation.Nullable String requestId) { this.requestId = requestId; } - /** - * 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. - */ - 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -170,13 +137,12 @@ public boolean equals(Object o) { Error error = (Error) o; return Objects.equals(this.code, error.code) && Objects.equals(this.message, error.message) && - Objects.equals(this.requestId, error.requestId)&& - Objects.equals(this.additionalProperties, error.additionalProperties); + Objects.equals(this.requestId, error.requestId); } @Override public int hashCode() { - return Objects.hash(code, message, requestId, additionalProperties); + return Objects.hash(code, message, requestId); } @Override @@ -186,7 +152,6 @@ public String toString() { sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); sb.append(" requestId: ").append(toIndentedString(requestId)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -217,20 +182,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Error - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (Error.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Error + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Error.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in Error is not found in the empty JSON string", Error.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Error.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Error` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !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())); } @@ -254,71 +226,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, Error value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Error given an JSON string - * - * @param jsonString JSON string - * @return An instance of Error - * @throws IOException if the JSON string is invalid with respect to Error - */ + /** + * 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 - */ + /** + * 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/io/tiledb/cloud/rest_api/model/FileCreate.java b/src/main/java/io/tiledb/cloud/rest_api/model/FileCreate.java index 146e8f0..ad0675e 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/FileCreate.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/FileCreate.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,155 +11,119 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Input/Output information required to create a new file */ -@ApiModel(description = "Input/Output information required to create a new file") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class FileCreate { public static final String SERIALIZED_NAME_INPUT_URI = "input_uri"; @SerializedName(SERIALIZED_NAME_INPUT_URI) + @javax.annotation.Nullable private String inputUri; public static final String SERIALIZED_NAME_OUTPUT_URI = "output_uri"; @SerializedName(SERIALIZED_NAME_OUTPUT_URI) + @javax.annotation.Nullable private String outputUri; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public FileCreate() { } - public FileCreate inputUri(String inputUri) { - + public FileCreate inputUri(@javax.annotation.Nullable String inputUri) { this.inputUri = inputUri; return this; } - /** + /** * storage URI of the input file * @return inputUri - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "storage URI of the input file") - public String getInputUri() { return inputUri; } - - public void setInputUri(String inputUri) { + public void setInputUri(@javax.annotation.Nullable String inputUri) { this.inputUri = inputUri; } - public FileCreate outputUri(String outputUri) { - + public FileCreate outputUri(@javax.annotation.Nullable String outputUri) { this.outputUri = outputUri; return this; } - /** + /** * output location of the TileDB File * @return outputUri - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "output location of the TileDB File") - public String getOutputUri() { return outputUri; } - - public void setOutputUri(String outputUri) { + public void setOutputUri(@javax.annotation.Nullable String outputUri) { this.outputUri = outputUri; } - public FileCreate name(String name) { - + public FileCreate name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * name to set for registered file * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "name to set for registered file") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - /** - * 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. - */ - public FileCreate 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -173,13 +137,12 @@ public boolean equals(Object o) { FileCreate fileCreate = (FileCreate) o; return Objects.equals(this.inputUri, fileCreate.inputUri) && Objects.equals(this.outputUri, fileCreate.outputUri) && - Objects.equals(this.name, fileCreate.name)&& - Objects.equals(this.additionalProperties, fileCreate.additionalProperties); + Objects.equals(this.name, fileCreate.name); } @Override public int hashCode() { - return Objects.hash(inputUri, outputUri, name, additionalProperties); + return Objects.hash(inputUri, outputUri, name); } @Override @@ -189,7 +152,6 @@ public String toString() { sb.append(" inputUri: ").append(toIndentedString(inputUri)).append("\n"); sb.append(" outputUri: ").append(toIndentedString(outputUri)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -220,20 +182,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FileCreate - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (FileCreate.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 FileCreate + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FileCreate.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in FileCreate is not found in the empty JSON string", FileCreate.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FileCreate.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FileCreate` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("input_uri") != null && !jsonObj.get("input_uri").isJsonNull()) && !jsonObj.get("input_uri").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `input_uri` to be a primitive type in the JSON string but got `%s`", jsonObj.get("input_uri").toString())); } @@ -260,71 +229,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, FileCreate value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 FileCreate read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - FileCreate 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of FileCreate given an JSON string - * - * @param jsonString JSON string - * @return An instance of FileCreate - * @throws IOException if the JSON string is invalid with respect to FileCreate - */ + /** + * Create an instance of FileCreate given an JSON string + * + * @param jsonString JSON string + * @return An instance of FileCreate + * @throws IOException if the JSON string is invalid with respect to FileCreate + */ public static FileCreate fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, FileCreate.class); } - /** - * Convert an instance of FileCreate to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of FileCreate to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/FileCreated.java b/src/main/java/io/tiledb/cloud/rest_api/model/FileCreated.java index e409d13..995ae4f 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/FileCreated.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/FileCreated.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,128 +11,95 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Created file name and information */ -@ApiModel(description = "Created file name and information") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class FileCreated { public static final String SERIALIZED_NAME_OUTPUT_URI = "output_uri"; @SerializedName(SERIALIZED_NAME_OUTPUT_URI) + @javax.annotation.Nullable private String outputUri; public static final String SERIALIZED_NAME_FILE_NAME = "file_name"; @SerializedName(SERIALIZED_NAME_FILE_NAME) + @javax.annotation.Nullable private String fileName; public FileCreated() { } - public FileCreated outputUri(String outputUri) { - + public FileCreated outputUri(@javax.annotation.Nullable String outputUri) { this.outputUri = outputUri; return this; } - /** + /** * output location of the TileDB File * @return outputUri - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "output location of the TileDB File") - public String getOutputUri() { return outputUri; } - - public void setOutputUri(String outputUri) { + public void setOutputUri(@javax.annotation.Nullable String outputUri) { this.outputUri = outputUri; } - public FileCreated fileName(String fileName) { - + public FileCreated fileName(@javax.annotation.Nullable String fileName) { this.fileName = fileName; return this; } - /** + /** * name of the file created * @return fileName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "name of the file created") - public String getFileName() { return fileName; } - - public void setFileName(String fileName) { + public void setFileName(@javax.annotation.Nullable String fileName) { this.fileName = fileName; } - /** - * 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. - */ - public FileCreated 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -145,13 +112,12 @@ public boolean equals(Object o) { } FileCreated fileCreated = (FileCreated) o; return Objects.equals(this.outputUri, fileCreated.outputUri) && - Objects.equals(this.fileName, fileCreated.fileName)&& - Objects.equals(this.additionalProperties, fileCreated.additionalProperties); + Objects.equals(this.fileName, fileCreated.fileName); } @Override public int hashCode() { - return Objects.hash(outputUri, fileName, additionalProperties); + return Objects.hash(outputUri, fileName); } @Override @@ -160,7 +126,6 @@ public String toString() { sb.append("class FileCreated {\n"); sb.append(" outputUri: ").append(toIndentedString(outputUri)).append("\n"); sb.append(" fileName: ").append(toIndentedString(fileName)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -190,20 +155,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FileCreated - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (FileCreated.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 FileCreated + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FileCreated.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in FileCreated is not found in the empty JSON string", FileCreated.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FileCreated.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FileCreated` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("output_uri") != null && !jsonObj.get("output_uri").isJsonNull()) && !jsonObj.get("output_uri").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `output_uri` to be a primitive type in the JSON string but got `%s`", jsonObj.get("output_uri").toString())); } @@ -227,71 +199,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, FileCreated value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 FileCreated read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - FileCreated 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of FileCreated given an JSON string - * - * @param jsonString JSON string - * @return An instance of FileCreated - * @throws IOException if the JSON string is invalid with respect to FileCreated - */ + /** + * Create an instance of FileCreated given an JSON string + * + * @param jsonString JSON string + * @return An instance of FileCreated + * @throws IOException if the JSON string is invalid with respect to FileCreated + */ public static FileCreated fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, FileCreated.class); } - /** - * Convert an instance of FileCreated to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of FileCreated to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/FileExport.java b/src/main/java/io/tiledb/cloud/rest_api/model/FileExport.java index 5dcc4bc..d2c817f 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/FileExport.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/FileExport.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,100 +11,71 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Output information required to export a file */ -@ApiModel(description = "Output information required to export a file") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class FileExport { public static final String SERIALIZED_NAME_OUTPUT_URI = "output_uri"; @SerializedName(SERIALIZED_NAME_OUTPUT_URI) + @javax.annotation.Nullable private String outputUri; public FileExport() { } - public FileExport outputUri(String outputUri) { - + public FileExport outputUri(@javax.annotation.Nullable String outputUri) { this.outputUri = outputUri; return this; } - /** + /** * output location of the TileDB File * @return outputUri - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "output location of the TileDB File") - public String getOutputUri() { return outputUri; } - - public void setOutputUri(String outputUri) { + public void setOutputUri(@javax.annotation.Nullable String outputUri) { this.outputUri = outputUri; } - /** - * 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. - */ - public FileExport 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -116,13 +87,12 @@ public boolean equals(Object o) { return false; } FileExport fileExport = (FileExport) o; - return Objects.equals(this.outputUri, fileExport.outputUri)&& - Objects.equals(this.additionalProperties, fileExport.additionalProperties); + return Objects.equals(this.outputUri, fileExport.outputUri); } @Override public int hashCode() { - return Objects.hash(outputUri, additionalProperties); + return Objects.hash(outputUri); } @Override @@ -130,7 +100,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileExport {\n"); sb.append(" outputUri: ").append(toIndentedString(outputUri)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -159,20 +128,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FileExport - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (FileExport.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 FileExport + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FileExport.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in FileExport is not found in the empty JSON string", FileExport.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FileExport.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FileExport` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("output_uri") != null && !jsonObj.get("output_uri").isJsonNull()) && !jsonObj.get("output_uri").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `output_uri` to be a primitive type in the JSON string but got `%s`", jsonObj.get("output_uri").toString())); } @@ -193,71 +169,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, FileExport value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 FileExport read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - FileExport 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of FileExport given an JSON string - * - * @param jsonString JSON string - * @return An instance of FileExport - * @throws IOException if the JSON string is invalid with respect to FileExport - */ + /** + * Create an instance of FileExport given an JSON string + * + * @param jsonString JSON string + * @return An instance of FileExport + * @throws IOException if the JSON string is invalid with respect to FileExport + */ public static FileExport fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, FileExport.class); } - /** - * Convert an instance of FileExport to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of FileExport to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/FileExported.java b/src/main/java/io/tiledb/cloud/rest_api/model/FileExported.java index 427c35a..83c6078 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/FileExported.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/FileExported.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,100 +11,71 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Output uri of the exported file */ -@ApiModel(description = "Output uri of the exported file") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class FileExported { public static final String SERIALIZED_NAME_OUTPUT_URI = "output_uri"; @SerializedName(SERIALIZED_NAME_OUTPUT_URI) + @javax.annotation.Nullable private String outputUri; public FileExported() { } - public FileExported outputUri(String outputUri) { - + public FileExported outputUri(@javax.annotation.Nullable String outputUri) { this.outputUri = outputUri; return this; } - /** + /** * output location of the exported file * @return outputUri - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "output location of the exported file") - public String getOutputUri() { return outputUri; } - - public void setOutputUri(String outputUri) { + public void setOutputUri(@javax.annotation.Nullable String outputUri) { this.outputUri = outputUri; } - /** - * 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. - */ - public FileExported 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -116,13 +87,12 @@ public boolean equals(Object o) { return false; } FileExported fileExported = (FileExported) o; - return Objects.equals(this.outputUri, fileExported.outputUri)&& - Objects.equals(this.additionalProperties, fileExported.additionalProperties); + return Objects.equals(this.outputUri, fileExported.outputUri); } @Override public int hashCode() { - return Objects.hash(outputUri, additionalProperties); + return Objects.hash(outputUri); } @Override @@ -130,7 +100,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileExported {\n"); sb.append(" outputUri: ").append(toIndentedString(outputUri)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -159,20 +128,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FileExported - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (FileExported.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 FileExported + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FileExported.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in FileExported is not found in the empty JSON string", FileExported.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FileExported.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FileExported` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("output_uri") != null && !jsonObj.get("output_uri").isJsonNull()) && !jsonObj.get("output_uri").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `output_uri` to be a primitive type in the JSON string but got `%s`", jsonObj.get("output_uri").toString())); } @@ -193,71 +169,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, FileExported value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 FileExported read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - FileExported 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of FileExported given an JSON string - * - * @param jsonString JSON string - * @return An instance of FileExported - * @throws IOException if the JSON string is invalid with respect to FileExported - */ + /** + * Create an instance of FileExported given an JSON string + * + * @param jsonString JSON string + * @return An instance of FileExported + * @throws IOException if the JSON string is invalid with respect to FileExported + */ public static FileExported fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, FileExported.class); } - /** - * Convert an instance of FileExported to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of FileExported to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/FilePropertyName.java b/src/main/java/io/tiledb/cloud/rest_api/model/FilePropertyName.java index b6a0be4..a51bf1a 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/FilePropertyName.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/FilePropertyName.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -75,5 +79,10 @@ public FilePropertyName read(final JsonReader jsonReader) throws IOException { return FilePropertyName.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + FilePropertyName.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/FileType.java b/src/main/java/io/tiledb/cloud/rest_api/model/FileType.java index b4ec9a5..f8ea121 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/FileType.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/FileType.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -71,5 +75,10 @@ public FileType read(final JsonReader jsonReader) throws IOException { return FileType.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + FileType.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/FileUploaded.java b/src/main/java/io/tiledb/cloud/rest_api/model/FileUploaded.java index c77dcad..86a8021 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/FileUploaded.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/FileUploaded.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,154 +11,119 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Uploaded file name and information */ -@ApiModel(description = "Uploaded file name and information") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class FileUploaded { public static final String SERIALIZED_NAME_OUTPUT_URI = "output_uri"; @SerializedName(SERIALIZED_NAME_OUTPUT_URI) + @javax.annotation.Nullable private String outputUri; public static final String SERIALIZED_NAME_FILE_NAME = "file_name"; @SerializedName(SERIALIZED_NAME_FILE_NAME) + @javax.annotation.Nullable private String fileName; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public FileUploaded() { } - public FileUploaded outputUri(String outputUri) { - + public FileUploaded outputUri(@javax.annotation.Nullable String outputUri) { this.outputUri = outputUri; return this; } - /** + /** * output location of the TileDB File * @return outputUri - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "output location of the TileDB File") - public String getOutputUri() { return outputUri; } - - public void setOutputUri(String outputUri) { + public void setOutputUri(@javax.annotation.Nullable String outputUri) { this.outputUri = outputUri; } - public FileUploaded fileName(String fileName) { - + public FileUploaded fileName(@javax.annotation.Nullable String fileName) { this.fileName = fileName; return this; } - /** + /** * name of the file uploaded * @return fileName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "name of the file uploaded") - public String getFileName() { return fileName; } - - public void setFileName(String fileName) { + public void setFileName(@javax.annotation.Nullable String fileName) { this.fileName = fileName; } - public FileUploaded id(String id) { - + public FileUploaded id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * unique ID of the uploaded file * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", required = true, value = "unique ID of the uploaded file") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - /** - * 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. - */ - public FileUploaded 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -172,13 +137,12 @@ public boolean equals(Object o) { FileUploaded fileUploaded = (FileUploaded) o; return Objects.equals(this.outputUri, fileUploaded.outputUri) && Objects.equals(this.fileName, fileUploaded.fileName) && - Objects.equals(this.id, fileUploaded.id)&& - Objects.equals(this.additionalProperties, fileUploaded.additionalProperties); + Objects.equals(this.id, fileUploaded.id); } @Override public int hashCode() { - return Objects.hash(outputUri, fileName, id, additionalProperties); + return Objects.hash(outputUri, fileName, id); } @Override @@ -188,7 +152,6 @@ public String toString() { sb.append(" outputUri: ").append(toIndentedString(outputUri)).append("\n"); sb.append(" fileName: ").append(toIndentedString(fileName)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -220,34 +183,41 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("id"); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FileUploaded - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (FileUploaded.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 FileUploaded + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FileUploaded.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in FileUploaded is not found in the empty JSON string", FileUploaded.openapiRequiredFields.toString())); } } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FileUploaded.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FileUploaded` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + // check to make sure all required properties/fields are present in the JSON string for (String requiredField : FileUploaded.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + 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("output_uri") != null && !jsonObj.get("output_uri").isJsonNull()) && !jsonObj.get("output_uri").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `output_uri` to be a primitive type in the JSON string but got `%s`", jsonObj.get("output_uri").toString())); } if ((jsonObj.get("file_name") != null && !jsonObj.get("file_name").isJsonNull()) && !jsonObj.get("file_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `file_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("file_name").toString())); } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + 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())); } } @@ -267,71 +237,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, FileUploaded value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 FileUploaded read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - FileUploaded 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of FileUploaded given an JSON string - * - * @param jsonString JSON string - * @return An instance of FileUploaded - * @throws IOException if the JSON string is invalid with respect to FileUploaded - */ + /** + * Create an instance of FileUploaded given an JSON string + * + * @param jsonString JSON string + * @return An instance of FileUploaded + * @throws IOException if the JSON string is invalid with respect to FileUploaded + */ public static FileUploaded fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, FileUploaded.class); } - /** - * Convert an instance of FileUploaded to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of FileUploaded to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/Filter.java b/src/main/java/io/tiledb/cloud/rest_api/model/Filter.java index f593eff..60ab93f 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/Filter.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/Filter.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,127 +11,97 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.FilterData; +import org.openapitools.client.model.FilterType; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Filter */ -@ApiModel(description = "Filter") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class Filter { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull private FilterType type; public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable private FilterData data; public Filter() { } - public Filter type(FilterType type) { - + public Filter type(@javax.annotation.Nonnull FilterType type) { this.type = type; return this; } - /** + /** * Get type * @return type - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public FilterType getType() { return type; } - - public void setType(FilterType type) { + public void setType(@javax.annotation.Nonnull FilterType type) { this.type = type; } - public Filter data(FilterData data) { - + public Filter data(@javax.annotation.Nullable FilterData data) { this.data = data; return this; } - /** + /** * Get data * @return data - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public FilterData getData() { return data; } - - public void setData(FilterData data) { + public void setData(@javax.annotation.Nullable FilterData data) { this.data = data; } - /** - * 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. - */ - public Filter 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -144,13 +114,12 @@ public boolean equals(Object o) { } Filter filter = (Filter) o; return Objects.equals(this.type, filter.type) && - Objects.equals(this.data, filter.data)&& - Objects.equals(this.additionalProperties, filter.additionalProperties); + Objects.equals(this.data, filter.data); } @Override public int hashCode() { - return Objects.hash(type, data, additionalProperties); + return Objects.hash(type, data); } @Override @@ -159,7 +128,6 @@ public String toString() { sb.append("class Filter {\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -190,30 +158,39 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("type"); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Filter - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (Filter.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 Filter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Filter.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in Filter is not found in the empty JSON string", Filter.openapiRequiredFields.toString())); } } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Filter.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Filter` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Filter.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + 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(); + // validate the required field `type` + FilterType.validateJsonElement(jsonObj.get("type")); // validate the optional field `data` if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - FilterData.validateJsonObject(jsonObj.getAsJsonObject("data")); + FilterData.validateJsonElement(jsonObj.get("data")); } } @@ -232,71 +209,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, Filter value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 Filter read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - Filter 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Filter given an JSON string - * - * @param jsonString JSON string - * @return An instance of Filter - * @throws IOException if the JSON string is invalid with respect to Filter - */ + /** + * Create an instance of Filter given an JSON string + * + * @param jsonString JSON string + * @return An instance of Filter + * @throws IOException if the JSON string is invalid with respect to Filter + */ public static Filter fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Filter.class); } - /** - * Convert an instance of Filter to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Filter to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/FilterData.java b/src/main/java/io/tiledb/cloud/rest_api/model/FilterData.java index 74efd6d..96939a5 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/FilterData.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/FilterData.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,343 +11,287 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Filter data */ -@ApiModel(description = "Filter data") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class FilterData { public static final String SERIALIZED_NAME_INT8 = "int8"; @SerializedName(SERIALIZED_NAME_INT8) + @javax.annotation.Nullable private Integer int8; public static final String SERIALIZED_NAME_UINT8 = "uint8"; @SerializedName(SERIALIZED_NAME_UINT8) + @javax.annotation.Nullable private Integer uint8; public static final String SERIALIZED_NAME_INT16 = "int16"; @SerializedName(SERIALIZED_NAME_INT16) + @javax.annotation.Nullable private Integer int16; public static final String SERIALIZED_NAME_UINT16 = "uint16"; @SerializedName(SERIALIZED_NAME_UINT16) + @javax.annotation.Nullable private Integer uint16; public static final String SERIALIZED_NAME_INT32 = "int32"; @SerializedName(SERIALIZED_NAME_INT32) + @javax.annotation.Nullable private Integer int32; public static final String SERIALIZED_NAME_UINT32 = "uint32"; @SerializedName(SERIALIZED_NAME_UINT32) + @javax.annotation.Nullable private Integer uint32; public static final String SERIALIZED_NAME_INT64 = "int64"; @SerializedName(SERIALIZED_NAME_INT64) + @javax.annotation.Nullable private Long int64; public static final String SERIALIZED_NAME_UINT64 = "uint64"; @SerializedName(SERIALIZED_NAME_UINT64) + @javax.annotation.Nullable private Integer uint64; public static final String SERIALIZED_NAME_FLOAT32 = "float32"; @SerializedName(SERIALIZED_NAME_FLOAT32) + @javax.annotation.Nullable private Integer float32; public static final String SERIALIZED_NAME_FLOAT64 = "float64"; @SerializedName(SERIALIZED_NAME_FLOAT64) + @javax.annotation.Nullable private Integer float64; public FilterData() { } - public FilterData int8(Integer int8) { - + public FilterData int8(@javax.annotation.Nullable Integer int8) { this.int8 = int8; return this; } - /** + /** * Get int8 * @return int8 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getInt8() { return int8; } - - public void setInt8(Integer int8) { + public void setInt8(@javax.annotation.Nullable Integer int8) { this.int8 = int8; } - public FilterData uint8(Integer uint8) { - + public FilterData uint8(@javax.annotation.Nullable Integer uint8) { this.uint8 = uint8; return this; } - /** + /** * Get uint8 * @return uint8 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getUint8() { return uint8; } - - public void setUint8(Integer uint8) { + public void setUint8(@javax.annotation.Nullable Integer uint8) { this.uint8 = uint8; } - public FilterData int16(Integer int16) { - + public FilterData int16(@javax.annotation.Nullable Integer int16) { this.int16 = int16; return this; } - /** + /** * Get int16 * @return int16 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getInt16() { return int16; } - - public void setInt16(Integer int16) { + public void setInt16(@javax.annotation.Nullable Integer int16) { this.int16 = int16; } - public FilterData uint16(Integer uint16) { - + public FilterData uint16(@javax.annotation.Nullable Integer uint16) { this.uint16 = uint16; return this; } - /** + /** * Get uint16 * @return uint16 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getUint16() { return uint16; } - - public void setUint16(Integer uint16) { + public void setUint16(@javax.annotation.Nullable Integer uint16) { this.uint16 = uint16; } - public FilterData int32(Integer int32) { - + public FilterData int32(@javax.annotation.Nullable Integer int32) { this.int32 = int32; return this; } - /** + /** * Get int32 * @return int32 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getInt32() { return int32; } - - public void setInt32(Integer int32) { + public void setInt32(@javax.annotation.Nullable Integer int32) { this.int32 = int32; } - public FilterData uint32(Integer uint32) { - + public FilterData uint32(@javax.annotation.Nullable Integer uint32) { this.uint32 = uint32; return this; } - /** + /** * Get uint32 * @return uint32 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getUint32() { return uint32; } - - public void setUint32(Integer uint32) { + public void setUint32(@javax.annotation.Nullable Integer uint32) { this.uint32 = uint32; } - public FilterData int64(Long int64) { - + public FilterData int64(@javax.annotation.Nullable Long int64) { this.int64 = int64; return this; } - /** + /** * Get int64 * @return int64 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Long getInt64() { return int64; } - - public void setInt64(Long int64) { + public void setInt64(@javax.annotation.Nullable Long int64) { this.int64 = int64; } - public FilterData uint64(Integer uint64) { - + public FilterData uint64(@javax.annotation.Nullable Integer uint64) { this.uint64 = uint64; return this; } - /** + /** * Get uint64 * @return uint64 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getUint64() { return uint64; } - - public void setUint64(Integer uint64) { + public void setUint64(@javax.annotation.Nullable Integer uint64) { this.uint64 = uint64; } - public FilterData float32(Integer float32) { - + public FilterData float32(@javax.annotation.Nullable Integer float32) { this.float32 = float32; return this; } - /** + /** * Get float32 * @return float32 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getFloat32() { return float32; } - - public void setFloat32(Integer float32) { + public void setFloat32(@javax.annotation.Nullable Integer float32) { this.float32 = float32; } - public FilterData float64(Integer float64) { - + public FilterData float64(@javax.annotation.Nullable Integer float64) { this.float64 = float64; return this; } - /** + /** * Get float64 * @return float64 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getFloat64() { return float64; } - - public void setFloat64(Integer float64) { + public void setFloat64(@javax.annotation.Nullable Integer float64) { this.float64 = float64; } - /** - * 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. - */ - public FilterData 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -368,13 +312,12 @@ public boolean equals(Object o) { Objects.equals(this.int64, filterData.int64) && Objects.equals(this.uint64, filterData.uint64) && Objects.equals(this.float32, filterData.float32) && - Objects.equals(this.float64, filterData.float64)&& - Objects.equals(this.additionalProperties, filterData.additionalProperties); + Objects.equals(this.float64, filterData.float64); } @Override public int hashCode() { - return Objects.hash(int8, uint8, int16, uint16, int32, uint32, int64, uint64, float32, float64, additionalProperties); + return Objects.hash(int8, uint8, int16, uint16, int32, uint32, int64, uint64, float32, float64); } @Override @@ -391,7 +334,6 @@ public String toString() { sb.append(" uint64: ").append(toIndentedString(uint64)).append("\n"); sb.append(" float32: ").append(toIndentedString(float32)).append("\n"); sb.append(" float64: ").append(toIndentedString(float64)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -429,20 +371,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FilterData - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (FilterData.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 FilterData + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FilterData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in FilterData is not found in the empty JSON string", FilterData.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FilterData.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FilterData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -460,71 +409,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, FilterData value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 FilterData read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - FilterData 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of FilterData given an JSON string - * - * @param jsonString JSON string - * @return An instance of FilterData - * @throws IOException if the JSON string is invalid with respect to FilterData - */ + /** + * Create an instance of FilterData given an JSON string + * + * @param jsonString JSON string + * @return An instance of FilterData + * @throws IOException if the JSON string is invalid with respect to FilterData + */ public static FilterData fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, FilterData.class); } - /** - * Convert an instance of FilterData to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of FilterData to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/FilterOption.java b/src/main/java/io/tiledb/cloud/rest_api/model/FilterOption.java index 502568c..0c9a62d 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/FilterOption.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/FilterOption.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -67,5 +71,10 @@ public FilterOption read(final JsonReader jsonReader) throws IOException { return FilterOption.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + FilterOption.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/FilterPipeline.java b/src/main/java/io/tiledb/cloud/rest_api/model/FilterPipeline.java index dc65bb1..64af06c 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/FilterPipeline.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/FilterPipeline.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,48 +11,57 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.Filter; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * One or more filters to apply */ -@ApiModel(description = "One or more filters to apply") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class FilterPipeline { public static final String SERIALIZED_NAME_FILTERS = "filters"; @SerializedName(SERIALIZED_NAME_FILTERS) - private List filters = null; + @javax.annotation.Nullable + private List filters = new ArrayList<>(); public FilterPipeline() { } - public FilterPipeline filters(List filters) { - + public FilterPipeline filters(@javax.annotation.Nullable List filters) { this.filters = filters; return this; } @@ -65,57 +74,19 @@ public FilterPipeline addFiltersItem(Filter filtersItem) { return this; } - /** + /** * Get filters * @return filters - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getFilters() { return filters; } - - public void setFilters(List filters) { + public void setFilters(@javax.annotation.Nullable List filters) { this.filters = filters; } - /** - * 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. - */ - public FilterPipeline 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -127,13 +98,12 @@ public boolean equals(Object o) { return false; } FilterPipeline filterPipeline = (FilterPipeline) o; - return Objects.equals(this.filters, filterPipeline.filters)&& - Objects.equals(this.additionalProperties, filterPipeline.additionalProperties); + return Objects.equals(this.filters, filterPipeline.filters); } @Override public int hashCode() { - return Objects.hash(filters, additionalProperties); + return Objects.hash(filters); } @Override @@ -141,7 +111,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FilterPipeline {\n"); sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -170,31 +139,40 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FilterPipeline - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (FilterPipeline.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 FilterPipeline + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FilterPipeline.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in FilterPipeline is not found in the empty JSON string", FilterPipeline.openapiRequiredFields.toString())); } } - JsonArray jsonArrayfilters = jsonObj.getAsJsonArray("filters"); - if (jsonArrayfilters != null) { - // ensure the json data is an array - if (!jsonObj.get("filters").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `filters` to be an array in the JSON string but got `%s`", jsonObj.get("filters").toString())); - } - // validate the optional field `filters` (array) - for (int i = 0; i < jsonArrayfilters.size(); i++) { - Filter.validateJsonObject(jsonArrayfilters.get(i).getAsJsonObject()); - }; + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FilterPipeline.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FilterPipeline` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("filters") != null && !jsonObj.get("filters").isJsonNull()) { + JsonArray jsonArrayfilters = jsonObj.getAsJsonArray("filters"); + if (jsonArrayfilters != null) { + // ensure the json data is an array + if (!jsonObj.get("filters").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `filters` to be an array in the JSON string but got `%s`", jsonObj.get("filters").toString())); + } + + // validate the optional field `filters` (array) + for (int i = 0; i < jsonArrayfilters.size(); i++) { + Filter.validateJsonElement(jsonArrayfilters.get(i)); + }; + } } } @@ -213,71 +191,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, FilterPipeline value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 FilterPipeline read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - FilterPipeline 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of FilterPipeline given an JSON string - * - * @param jsonString JSON string - * @return An instance of FilterPipeline - * @throws IOException if the JSON string is invalid with respect to FilterPipeline - */ + /** + * Create an instance of FilterPipeline given an JSON string + * + * @param jsonString JSON string + * @return An instance of FilterPipeline + * @throws IOException if the JSON string is invalid with respect to FilterPipeline + */ public static FilterPipeline fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, FilterPipeline.class); } - /** - * Convert an instance of FilterPipeline to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of FilterPipeline to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/FilterType.java b/src/main/java/io/tiledb/cloud/rest_api/model/FilterType.java index 7f62564..35877ce 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/FilterType.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/FilterType.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -25,27 +29,27 @@ @JsonAdapter(FilterType.Adapter.class) public enum FilterType { - NONE("NONE"), + FILTER_NONE("FILTER_NONE"), - GZIP("GZIP"), + FILTER_GZIP("FILTER_GZIP"), - ZSTD("ZSTD"), + FILTER_ZSTD("FILTER_ZSTD"), - LZ4("LZ4"), + FILTER_LZ4("FILTER_LZ4"), - RLE("RLE"), + FILTER_RLE("FILTER_RLE"), - BZIP2("BZIP2"), + FILTER_BZIP2("FILTER_BZIP2"), - DOUBLE_DELTA("DOUBLE_DELTA"), + FILTER_DOUBLE_DELTA("FILTER_DOUBLE_DELTA"), - BIT_WIDTH_REDUCTION("BIT_WIDTH_REDUCTION"), + FILTER_BIT_WIDTH_REDUCTION("FILTER_BIT_WIDTH_REDUCTION"), - BITSHUFFLE("BITSHUFFLE"), + FILTER_BITSHUFFLE("FILTER_BITSHUFFLE"), - BYTESHUFFLE("BYTESHUFFLE"), + FILTER_BYTESHUFFLE("FILTER_BYTESHUFFLE"), - POSITIVE_DELTA("POSITIVE_DELTA"); + FILTER_POSITIVE_DELTA("FILTER_POSITIVE_DELTA"); private String value; @@ -83,5 +87,10 @@ public FilterType read(final JsonReader jsonReader) throws IOException { return FilterType.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + FilterType.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/FragmentInfo.java b/src/main/java/io/tiledb/cloud/rest_api/model/FragmentInfo.java index 31a51b0..9861a6b 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/FragmentInfo.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/FragmentInfo.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,56 +11,70 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.client.model.ArraySchema; +import org.openapitools.client.model.SingleFragmentInfo; 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.util.HashMap; import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Fragment info of an array */ -@ApiModel(description = "Fragment info of an array") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class FragmentInfo { public static final String SERIALIZED_NAME_ARRAY_SCHEMA_ALL = "arraySchemaAll"; @SerializedName(SERIALIZED_NAME_ARRAY_SCHEMA_ALL) - private Map arraySchemaAll = null; + @javax.annotation.Nullable + private Map arraySchemaAll = new HashMap<>(); public static final String SERIALIZED_NAME_FRAGMENT_INFO = "fragmentInfo"; @SerializedName(SERIALIZED_NAME_FRAGMENT_INFO) - private List fragmentInfo = null; + @javax.annotation.Nullable + private List fragmentInfo = new ArrayList<>(); public static final String SERIALIZED_NAME_TO_VACUUM = "toVacuum"; @SerializedName(SERIALIZED_NAME_TO_VACUUM) - private List toVacuum = null; + @javax.annotation.Nullable + private List toVacuum = new ArrayList<>(); public FragmentInfo() { } - public FragmentInfo arraySchemaAll(Map arraySchemaAll) { - + public FragmentInfo arraySchemaAll(@javax.annotation.Nullable Map arraySchemaAll) { this.arraySchemaAll = arraySchemaAll; return this; } @@ -73,25 +87,21 @@ public FragmentInfo putArraySchemaAllItem(String key, ArraySchema arraySchemaAll return this; } - /** + /** * map of all array schemas * @return arraySchemaAll - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "map of all array schemas") - public Map getArraySchemaAll() { return arraySchemaAll; } - - public void setArraySchemaAll(Map arraySchemaAll) { + public void setArraySchemaAll(@javax.annotation.Nullable Map arraySchemaAll) { this.arraySchemaAll = arraySchemaAll; } - public FragmentInfo fragmentInfo(List fragmentInfo) { - + public FragmentInfo fragmentInfo(@javax.annotation.Nullable List fragmentInfo) { this.fragmentInfo = fragmentInfo; return this; } @@ -104,25 +114,21 @@ public FragmentInfo addFragmentInfoItem(SingleFragmentInfo fragmentInfoItem) { return this; } - /** + /** * information about fragments in the array * @return fragmentInfo - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "information about fragments in the array") - public List getFragmentInfo() { return fragmentInfo; } - - public void setFragmentInfo(List fragmentInfo) { + public void setFragmentInfo(@javax.annotation.Nullable List fragmentInfo) { this.fragmentInfo = fragmentInfo; } - public FragmentInfo toVacuum(List toVacuum) { - + public FragmentInfo toVacuum(@javax.annotation.Nullable List toVacuum) { this.toVacuum = toVacuum; return this; } @@ -135,57 +141,19 @@ public FragmentInfo addToVacuumItem(String toVacuumItem) { return this; } - /** + /** * the URIs of the fragments to vacuum * @return toVacuum - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "the URIs of the fragments to vacuum") - public List getToVacuum() { return toVacuum; } - - public void setToVacuum(List toVacuum) { + public void setToVacuum(@javax.annotation.Nullable List toVacuum) { this.toVacuum = toVacuum; } - /** - * 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. - */ - public FragmentInfo 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -199,13 +167,12 @@ public boolean equals(Object o) { FragmentInfo fragmentInfo = (FragmentInfo) o; return Objects.equals(this.arraySchemaAll, fragmentInfo.arraySchemaAll) && Objects.equals(this.fragmentInfo, fragmentInfo.fragmentInfo) && - Objects.equals(this.toVacuum, fragmentInfo.toVacuum)&& - Objects.equals(this.additionalProperties, fragmentInfo.additionalProperties); + Objects.equals(this.toVacuum, fragmentInfo.toVacuum); } @Override public int hashCode() { - return Objects.hash(arraySchemaAll, fragmentInfo, toVacuum, additionalProperties); + return Objects.hash(arraySchemaAll, fragmentInfo, toVacuum); } @Override @@ -215,7 +182,6 @@ public String toString() { sb.append(" arraySchemaAll: ").append(toIndentedString(arraySchemaAll)).append("\n"); sb.append(" fragmentInfo: ").append(toIndentedString(fragmentInfo)).append("\n"); sb.append(" toVacuum: ").append(toIndentedString(toVacuum)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -246,34 +212,43 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FragmentInfo - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (FragmentInfo.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 FragmentInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FragmentInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in FragmentInfo is not found in the empty JSON string", FragmentInfo.openapiRequiredFields.toString())); } } - JsonArray jsonArrayfragmentInfo = jsonObj.getAsJsonArray("fragmentInfo"); - if (jsonArrayfragmentInfo != null) { - // ensure the json data is an array - if (!jsonObj.get("fragmentInfo").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `fragmentInfo` to be an array in the JSON string but got `%s`", jsonObj.get("fragmentInfo").toString())); - } - // validate the optional field `fragmentInfo` (array) - for (int i = 0; i < jsonArrayfragmentInfo.size(); i++) { - SingleFragmentInfo.validateJsonObject(jsonArrayfragmentInfo.get(i).getAsJsonObject()); - }; + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FragmentInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FragmentInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } } - // ensure the json data is an array - if ((jsonObj.get("toVacuum") != null && !jsonObj.get("toVacuum").isJsonNull()) && !jsonObj.get("toVacuum").isJsonArray()) { + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("fragmentInfo") != null && !jsonObj.get("fragmentInfo").isJsonNull()) { + JsonArray jsonArrayfragmentInfo = jsonObj.getAsJsonArray("fragmentInfo"); + if (jsonArrayfragmentInfo != null) { + // ensure the json data is an array + if (!jsonObj.get("fragmentInfo").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `fragmentInfo` to be an array in the JSON string but got `%s`", jsonObj.get("fragmentInfo").toString())); + } + + // validate the optional field `fragmentInfo` (array) + for (int i = 0; i < jsonArrayfragmentInfo.size(); i++) { + SingleFragmentInfo.validateJsonElement(jsonArrayfragmentInfo.get(i)); + }; + } + } + // ensure the optional json data is an array if present + if (jsonObj.get("toVacuum") != null && !jsonObj.get("toVacuum").isJsonNull() && !jsonObj.get("toVacuum").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `toVacuum` to be an array in the JSON string but got `%s`", jsonObj.get("toVacuum").toString())); } } @@ -293,71 +268,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, FragmentInfo value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 FragmentInfo read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - FragmentInfo 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of FragmentInfo given an JSON string - * - * @param jsonString JSON string - * @return An instance of FragmentInfo - * @throws IOException if the JSON string is invalid with respect to FragmentInfo - */ + /** + * Create an instance of FragmentInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of FragmentInfo + * @throws IOException if the JSON string is invalid with respect to FragmentInfo + */ public static FragmentInfo fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, FragmentInfo.class); } - /** - * Convert an instance of FragmentInfo to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of FragmentInfo to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/FragmentInfoRequest.java b/src/main/java/io/tiledb/cloud/rest_api/model/FragmentInfoRequest.java index 0bc0f1f..33682ce 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/FragmentInfoRequest.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/FragmentInfoRequest.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,100 +11,72 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.TileDBConfig; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Fragment info request */ -@ApiModel(description = "Fragment info request") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class FragmentInfoRequest { public static final String SERIALIZED_NAME_CONFIG = "config"; @SerializedName(SERIALIZED_NAME_CONFIG) + @javax.annotation.Nullable private TileDBConfig config; public FragmentInfoRequest() { } - public FragmentInfoRequest config(TileDBConfig config) { - + public FragmentInfoRequest config(@javax.annotation.Nullable TileDBConfig config) { this.config = config; return this; } - /** + /** * Get config * @return config - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public TileDBConfig getConfig() { return config; } - - public void setConfig(TileDBConfig config) { + public void setConfig(@javax.annotation.Nullable TileDBConfig config) { this.config = config; } - /** - * 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. - */ - public FragmentInfoRequest 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -116,13 +88,12 @@ public boolean equals(Object o) { return false; } FragmentInfoRequest fragmentInfoRequest = (FragmentInfoRequest) o; - return Objects.equals(this.config, fragmentInfoRequest.config)&& - Objects.equals(this.additionalProperties, fragmentInfoRequest.additionalProperties); + return Objects.equals(this.config, fragmentInfoRequest.config); } @Override public int hashCode() { - return Objects.hash(config, additionalProperties); + return Objects.hash(config); } @Override @@ -130,7 +101,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FragmentInfoRequest {\n"); sb.append(" config: ").append(toIndentedString(config)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -159,23 +129,30 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FragmentInfoRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (FragmentInfoRequest.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 FragmentInfoRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FragmentInfoRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in FragmentInfoRequest is not found in the empty JSON string", FragmentInfoRequest.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FragmentInfoRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FragmentInfoRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `config` if (jsonObj.get("config") != null && !jsonObj.get("config").isJsonNull()) { - TileDBConfig.validateJsonObject(jsonObj.getAsJsonObject("config")); + TileDBConfig.validateJsonElement(jsonObj.get("config")); } } @@ -194,71 +171,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, FragmentInfoRequest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 FragmentInfoRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - FragmentInfoRequest 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of FragmentInfoRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of FragmentInfoRequest - * @throws IOException if the JSON string is invalid with respect to FragmentInfoRequest - */ + /** + * Create an instance of FragmentInfoRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of FragmentInfoRequest + * @throws IOException if the JSON string is invalid with respect to FragmentInfoRequest + */ public static FragmentInfoRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, FragmentInfoRequest.class); } - /** - * Convert an instance of FragmentInfoRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of FragmentInfoRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/FragmentMetadata.java b/src/main/java/io/tiledb/cloud/rest_api/model/FragmentMetadata.java index 7de1e32..13bac09 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/FragmentMetadata.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/FragmentMetadata.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,143 +11,176 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Fragment Metadata */ -@ApiModel(description = "Fragment Metadata") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class FragmentMetadata { public static final String SERIALIZED_NAME_FILE_SIZES = "fileSizes"; @SerializedName(SERIALIZED_NAME_FILE_SIZES) - private List fileSizes = null; + @javax.annotation.Nullable + private List fileSizes = new ArrayList<>(); public static final String SERIALIZED_NAME_FILE_VAR_SIZES = "fileVarSizes"; @SerializedName(SERIALIZED_NAME_FILE_VAR_SIZES) - private List fileVarSizes = null; + @javax.annotation.Nullable + private List fileVarSizes = new ArrayList<>(); public static final String SERIALIZED_NAME_FILE_VALIDITY_SIZES = "fileValiditySizes"; @SerializedName(SERIALIZED_NAME_FILE_VALIDITY_SIZES) - private List fileValiditySizes = null; + @javax.annotation.Nullable + private List fileValiditySizes = new ArrayList<>(); public static final String SERIALIZED_NAME_FRAGMENT_URI = "fragmentUri"; @SerializedName(SERIALIZED_NAME_FRAGMENT_URI) + @javax.annotation.Nullable private String fragmentUri; public static final String SERIALIZED_NAME_HAS_TIMESTAMPS = "hasTimestamps"; @SerializedName(SERIALIZED_NAME_HAS_TIMESTAMPS) + @javax.annotation.Nullable private Boolean hasTimestamps; public static final String SERIALIZED_NAME_HAS_DELETE_META = "hasDeleteMeta"; @SerializedName(SERIALIZED_NAME_HAS_DELETE_META) + @javax.annotation.Nullable private Boolean hasDeleteMeta; public static final String SERIALIZED_NAME_SPARSE_TILE_NUM = "sparseTileNum"; @SerializedName(SERIALIZED_NAME_SPARSE_TILE_NUM) + @javax.annotation.Nullable private Integer sparseTileNum; public static final String SERIALIZED_NAME_TILE_INDEX_BASE = "tileIndexBase"; @SerializedName(SERIALIZED_NAME_TILE_INDEX_BASE) + @javax.annotation.Nullable private Integer tileIndexBase; public static final String SERIALIZED_NAME_TILE_OFFSETS = "tileOffsets"; @SerializedName(SERIALIZED_NAME_TILE_OFFSETS) - private List> tileOffsets = null; + @javax.annotation.Nullable + private List> tileOffsets = new ArrayList<>(); public static final String SERIALIZED_NAME_TILE_VAR_OFFSETS = "tileVarOffsets"; @SerializedName(SERIALIZED_NAME_TILE_VAR_OFFSETS) - private List> tileVarOffsets = null; + @javax.annotation.Nullable + private List> tileVarOffsets = new ArrayList<>(); public static final String SERIALIZED_NAME_TILE_VAR_SIZES = "tileVarSizes"; @SerializedName(SERIALIZED_NAME_TILE_VAR_SIZES) - private List> tileVarSizes = null; + @javax.annotation.Nullable + private List> tileVarSizes = new ArrayList<>(); public static final String SERIALIZED_NAME_TILE_VALIDITY_OFFSETS = "tileValidityOffsets"; @SerializedName(SERIALIZED_NAME_TILE_VALIDITY_OFFSETS) - private List> tileValidityOffsets = null; + @javax.annotation.Nullable + private List> tileValidityOffsets = new ArrayList<>(); public static final String SERIALIZED_NAME_TILE_MIN_BUFFER = "tileMinBuffer"; @SerializedName(SERIALIZED_NAME_TILE_MIN_BUFFER) - private List> tileMinBuffer = null; + @javax.annotation.Nullable + private List> tileMinBuffer = new ArrayList<>(); public static final String SERIALIZED_NAME_TILE_MIN_VAR_BUFFER = "tileMinVarBuffer"; @SerializedName(SERIALIZED_NAME_TILE_MIN_VAR_BUFFER) - private List> tileMinVarBuffer = null; + @javax.annotation.Nullable + private List> tileMinVarBuffer = new ArrayList<>(); public static final String SERIALIZED_NAME_TILE_MAX_BUFFER = "tileMaxBuffer"; @SerializedName(SERIALIZED_NAME_TILE_MAX_BUFFER) - private List> tileMaxBuffer = null; + @javax.annotation.Nullable + private List> tileMaxBuffer = new ArrayList<>(); public static final String SERIALIZED_NAME_TILE_MAX_VAR_BUFFER = "tileMaxVarBuffer"; @SerializedName(SERIALIZED_NAME_TILE_MAX_VAR_BUFFER) - private List> tileMaxVarBuffer = null; + @javax.annotation.Nullable + private List> tileMaxVarBuffer = new ArrayList<>(); public static final String SERIALIZED_NAME_TILE_SUMS = "tileSums"; @SerializedName(SERIALIZED_NAME_TILE_SUMS) - private List> tileSums = null; + @javax.annotation.Nullable + private List> tileSums = new ArrayList<>(); public static final String SERIALIZED_NAME_TILE_NULL_COUNTS = "tileNullCounts"; @SerializedName(SERIALIZED_NAME_TILE_NULL_COUNTS) - private List> tileNullCounts = null; + @javax.annotation.Nullable + private List> tileNullCounts = new ArrayList<>(); public static final String SERIALIZED_NAME_FRAGMENT_MINS = "fragmentMins"; @SerializedName(SERIALIZED_NAME_FRAGMENT_MINS) - private List> fragmentMins = null; + @javax.annotation.Nullable + private List> fragmentMins = new ArrayList<>(); public static final String SERIALIZED_NAME_FRAGMENT_MAXS = "fragmentMaxs"; @SerializedName(SERIALIZED_NAME_FRAGMENT_MAXS) - private List> fragmentMaxs = null; + @javax.annotation.Nullable + private List> fragmentMaxs = new ArrayList<>(); public static final String SERIALIZED_NAME_FRAGMENT_SUMS = "fragmentSums"; @SerializedName(SERIALIZED_NAME_FRAGMENT_SUMS) - private List fragmentSums = null; + @javax.annotation.Nullable + private List fragmentSums = new ArrayList<>(); public static final String SERIALIZED_NAME_FRAGMENT_NULL_COUNTS = "fragmentNullCounts"; @SerializedName(SERIALIZED_NAME_FRAGMENT_NULL_COUNTS) - private List fragmentNullCounts = null; + @javax.annotation.Nullable + private List fragmentNullCounts = new ArrayList<>(); public static final String SERIALIZED_NAME_VERSION = "version"; @SerializedName(SERIALIZED_NAME_VERSION) + @javax.annotation.Nullable private Integer version; public static final String SERIALIZED_NAME_TIMESTAMP_RANGE = "timestampRange"; @SerializedName(SERIALIZED_NAME_TIMESTAMP_RANGE) - private List timestampRange = null; + @javax.annotation.Nullable + private List timestampRange = new ArrayList<>(); public static final String SERIALIZED_NAME_LAST_TILE_CELL_NUM = "lastTileCellNum"; @SerializedName(SERIALIZED_NAME_LAST_TILE_CELL_NUM) + @javax.annotation.Nullable private Integer lastTileCellNum; public FragmentMetadata() { } - public FragmentMetadata fileSizes(List fileSizes) { - + public FragmentMetadata fileSizes(@javax.annotation.Nullable List fileSizes) { this.fileSizes = fileSizes; return this; } @@ -160,25 +193,21 @@ public FragmentMetadata addFileSizesItem(Integer fileSizesItem) { return this; } - /** + /** * fixed sizes * @return fileSizes - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "fixed sizes") - public List getFileSizes() { return fileSizes; } - - public void setFileSizes(List fileSizes) { + public void setFileSizes(@javax.annotation.Nullable List fileSizes) { this.fileSizes = fileSizes; } - public FragmentMetadata fileVarSizes(List fileVarSizes) { - + public FragmentMetadata fileVarSizes(@javax.annotation.Nullable List fileVarSizes) { this.fileVarSizes = fileVarSizes; return this; } @@ -191,25 +220,21 @@ public FragmentMetadata addFileVarSizesItem(Integer fileVarSizesItem) { return this; } - /** + /** * var length sizes * @return fileVarSizes - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "var length sizes") - public List getFileVarSizes() { return fileVarSizes; } - - public void setFileVarSizes(List fileVarSizes) { + public void setFileVarSizes(@javax.annotation.Nullable List fileVarSizes) { this.fileVarSizes = fileVarSizes; } - public FragmentMetadata fileValiditySizes(List fileValiditySizes) { - + public FragmentMetadata fileValiditySizes(@javax.annotation.Nullable List fileValiditySizes) { this.fileValiditySizes = fileValiditySizes; return this; } @@ -222,140 +247,116 @@ public FragmentMetadata addFileValiditySizesItem(Integer fileValiditySizesItem) return this; } - /** + /** * validity sizes * @return fileValiditySizes - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "validity sizes") - public List getFileValiditySizes() { return fileValiditySizes; } - - public void setFileValiditySizes(List fileValiditySizes) { + public void setFileValiditySizes(@javax.annotation.Nullable List fileValiditySizes) { this.fileValiditySizes = fileValiditySizes; } - public FragmentMetadata fragmentUri(String fragmentUri) { - + public FragmentMetadata fragmentUri(@javax.annotation.Nullable String fragmentUri) { this.fragmentUri = fragmentUri; return this; } - /** + /** * Get fragmentUri * @return fragmentUri - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getFragmentUri() { return fragmentUri; } - - public void setFragmentUri(String fragmentUri) { + public void setFragmentUri(@javax.annotation.Nullable String fragmentUri) { this.fragmentUri = fragmentUri; } - public FragmentMetadata hasTimestamps(Boolean hasTimestamps) { - + public FragmentMetadata hasTimestamps(@javax.annotation.Nullable Boolean hasTimestamps) { this.hasTimestamps = hasTimestamps; return this; } - /** + /** * Get hasTimestamps * @return hasTimestamps - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getHasTimestamps() { return hasTimestamps; } - - public void setHasTimestamps(Boolean hasTimestamps) { + public void setHasTimestamps(@javax.annotation.Nullable Boolean hasTimestamps) { this.hasTimestamps = hasTimestamps; } - public FragmentMetadata hasDeleteMeta(Boolean hasDeleteMeta) { - + public FragmentMetadata hasDeleteMeta(@javax.annotation.Nullable Boolean hasDeleteMeta) { this.hasDeleteMeta = hasDeleteMeta; return this; } - /** + /** * Get hasDeleteMeta * @return hasDeleteMeta - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getHasDeleteMeta() { return hasDeleteMeta; } - - public void setHasDeleteMeta(Boolean hasDeleteMeta) { + public void setHasDeleteMeta(@javax.annotation.Nullable Boolean hasDeleteMeta) { this.hasDeleteMeta = hasDeleteMeta; } - public FragmentMetadata sparseTileNum(Integer sparseTileNum) { - + public FragmentMetadata sparseTileNum(@javax.annotation.Nullable Integer sparseTileNum) { this.sparseTileNum = sparseTileNum; return this; } - /** + /** * Get sparseTileNum * @return sparseTileNum - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getSparseTileNum() { return sparseTileNum; } - - public void setSparseTileNum(Integer sparseTileNum) { + public void setSparseTileNum(@javax.annotation.Nullable Integer sparseTileNum) { this.sparseTileNum = sparseTileNum; } - public FragmentMetadata tileIndexBase(Integer tileIndexBase) { - + public FragmentMetadata tileIndexBase(@javax.annotation.Nullable Integer tileIndexBase) { this.tileIndexBase = tileIndexBase; return this; } - /** + /** * Get tileIndexBase * @return tileIndexBase - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getTileIndexBase() { return tileIndexBase; } - - public void setTileIndexBase(Integer tileIndexBase) { + public void setTileIndexBase(@javax.annotation.Nullable Integer tileIndexBase) { this.tileIndexBase = tileIndexBase; } - public FragmentMetadata tileOffsets(List> tileOffsets) { - + public FragmentMetadata tileOffsets(@javax.annotation.Nullable List> tileOffsets) { this.tileOffsets = tileOffsets; return this; } @@ -368,25 +369,21 @@ public FragmentMetadata addTileOffsetsItem(List tileOffsetsItem) { return this; } - /** + /** * Get tileOffsets * @return tileOffsets - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List> getTileOffsets() { return tileOffsets; } - - public void setTileOffsets(List> tileOffsets) { + public void setTileOffsets(@javax.annotation.Nullable List> tileOffsets) { this.tileOffsets = tileOffsets; } - public FragmentMetadata tileVarOffsets(List> tileVarOffsets) { - + public FragmentMetadata tileVarOffsets(@javax.annotation.Nullable List> tileVarOffsets) { this.tileVarOffsets = tileVarOffsets; return this; } @@ -399,25 +396,21 @@ public FragmentMetadata addTileVarOffsetsItem(List tileVarOffsetsItem) return this; } - /** + /** * Get tileVarOffsets * @return tileVarOffsets - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List> getTileVarOffsets() { return tileVarOffsets; } - - public void setTileVarOffsets(List> tileVarOffsets) { + public void setTileVarOffsets(@javax.annotation.Nullable List> tileVarOffsets) { this.tileVarOffsets = tileVarOffsets; } - public FragmentMetadata tileVarSizes(List> tileVarSizes) { - + public FragmentMetadata tileVarSizes(@javax.annotation.Nullable List> tileVarSizes) { this.tileVarSizes = tileVarSizes; return this; } @@ -430,25 +423,21 @@ public FragmentMetadata addTileVarSizesItem(List tileVarSizesItem) { return this; } - /** + /** * Get tileVarSizes * @return tileVarSizes - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List> getTileVarSizes() { return tileVarSizes; } - - public void setTileVarSizes(List> tileVarSizes) { + public void setTileVarSizes(@javax.annotation.Nullable List> tileVarSizes) { this.tileVarSizes = tileVarSizes; } - public FragmentMetadata tileValidityOffsets(List> tileValidityOffsets) { - + public FragmentMetadata tileValidityOffsets(@javax.annotation.Nullable List> tileValidityOffsets) { this.tileValidityOffsets = tileValidityOffsets; return this; } @@ -461,25 +450,21 @@ public FragmentMetadata addTileValidityOffsetsItem(List tileValidityOff return this; } - /** + /** * Get tileValidityOffsets * @return tileValidityOffsets - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List> getTileValidityOffsets() { return tileValidityOffsets; } - - public void setTileValidityOffsets(List> tileValidityOffsets) { + public void setTileValidityOffsets(@javax.annotation.Nullable List> tileValidityOffsets) { this.tileValidityOffsets = tileValidityOffsets; } - public FragmentMetadata tileMinBuffer(List> tileMinBuffer) { - + public FragmentMetadata tileMinBuffer(@javax.annotation.Nullable List> tileMinBuffer) { this.tileMinBuffer = tileMinBuffer; return this; } @@ -492,25 +477,21 @@ public FragmentMetadata addTileMinBufferItem(List tileMinBufferItem) { return this; } - /** + /** * Get tileMinBuffer * @return tileMinBuffer - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List> getTileMinBuffer() { return tileMinBuffer; } - - public void setTileMinBuffer(List> tileMinBuffer) { + public void setTileMinBuffer(@javax.annotation.Nullable List> tileMinBuffer) { this.tileMinBuffer = tileMinBuffer; } - public FragmentMetadata tileMinVarBuffer(List> tileMinVarBuffer) { - + public FragmentMetadata tileMinVarBuffer(@javax.annotation.Nullable List> tileMinVarBuffer) { this.tileMinVarBuffer = tileMinVarBuffer; return this; } @@ -523,25 +504,21 @@ public FragmentMetadata addTileMinVarBufferItem(List tileMinVarBufferIt return this; } - /** + /** * Get tileMinVarBuffer * @return tileMinVarBuffer - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List> getTileMinVarBuffer() { return tileMinVarBuffer; } - - public void setTileMinVarBuffer(List> tileMinVarBuffer) { + public void setTileMinVarBuffer(@javax.annotation.Nullable List> tileMinVarBuffer) { this.tileMinVarBuffer = tileMinVarBuffer; } - public FragmentMetadata tileMaxBuffer(List> tileMaxBuffer) { - + public FragmentMetadata tileMaxBuffer(@javax.annotation.Nullable List> tileMaxBuffer) { this.tileMaxBuffer = tileMaxBuffer; return this; } @@ -554,25 +531,21 @@ public FragmentMetadata addTileMaxBufferItem(List tileMaxBufferItem) { return this; } - /** + /** * Get tileMaxBuffer * @return tileMaxBuffer - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List> getTileMaxBuffer() { return tileMaxBuffer; } - - public void setTileMaxBuffer(List> tileMaxBuffer) { + public void setTileMaxBuffer(@javax.annotation.Nullable List> tileMaxBuffer) { this.tileMaxBuffer = tileMaxBuffer; } - public FragmentMetadata tileMaxVarBuffer(List> tileMaxVarBuffer) { - + public FragmentMetadata tileMaxVarBuffer(@javax.annotation.Nullable List> tileMaxVarBuffer) { this.tileMaxVarBuffer = tileMaxVarBuffer; return this; } @@ -585,25 +558,21 @@ public FragmentMetadata addTileMaxVarBufferItem(List tileMaxVarBufferIt return this; } - /** + /** * Get tileMaxVarBuffer * @return tileMaxVarBuffer - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List> getTileMaxVarBuffer() { return tileMaxVarBuffer; } - - public void setTileMaxVarBuffer(List> tileMaxVarBuffer) { + public void setTileMaxVarBuffer(@javax.annotation.Nullable List> tileMaxVarBuffer) { this.tileMaxVarBuffer = tileMaxVarBuffer; } - public FragmentMetadata tileSums(List> tileSums) { - + public FragmentMetadata tileSums(@javax.annotation.Nullable List> tileSums) { this.tileSums = tileSums; return this; } @@ -616,25 +585,21 @@ public FragmentMetadata addTileSumsItem(List tileSumsItem) { return this; } - /** + /** * Get tileSums * @return tileSums - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List> getTileSums() { return tileSums; } - - public void setTileSums(List> tileSums) { + public void setTileSums(@javax.annotation.Nullable List> tileSums) { this.tileSums = tileSums; } - public FragmentMetadata tileNullCounts(List> tileNullCounts) { - + public FragmentMetadata tileNullCounts(@javax.annotation.Nullable List> tileNullCounts) { this.tileNullCounts = tileNullCounts; return this; } @@ -647,25 +612,21 @@ public FragmentMetadata addTileNullCountsItem(List tileNullCountsItem) return this; } - /** + /** * Get tileNullCounts * @return tileNullCounts - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List> getTileNullCounts() { return tileNullCounts; } - - public void setTileNullCounts(List> tileNullCounts) { + public void setTileNullCounts(@javax.annotation.Nullable List> tileNullCounts) { this.tileNullCounts = tileNullCounts; } - public FragmentMetadata fragmentMins(List> fragmentMins) { - + public FragmentMetadata fragmentMins(@javax.annotation.Nullable List> fragmentMins) { this.fragmentMins = fragmentMins; return this; } @@ -678,25 +639,21 @@ public FragmentMetadata addFragmentMinsItem(List fragmentMinsItem) { return this; } - /** + /** * Get fragmentMins * @return fragmentMins - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List> getFragmentMins() { return fragmentMins; } - - public void setFragmentMins(List> fragmentMins) { + public void setFragmentMins(@javax.annotation.Nullable List> fragmentMins) { this.fragmentMins = fragmentMins; } - public FragmentMetadata fragmentMaxs(List> fragmentMaxs) { - + public FragmentMetadata fragmentMaxs(@javax.annotation.Nullable List> fragmentMaxs) { this.fragmentMaxs = fragmentMaxs; return this; } @@ -709,25 +666,21 @@ public FragmentMetadata addFragmentMaxsItem(List fragmentMaxsItem) { return this; } - /** + /** * Get fragmentMaxs * @return fragmentMaxs - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List> getFragmentMaxs() { return fragmentMaxs; } - - public void setFragmentMaxs(List> fragmentMaxs) { + public void setFragmentMaxs(@javax.annotation.Nullable List> fragmentMaxs) { this.fragmentMaxs = fragmentMaxs; } - public FragmentMetadata fragmentSums(List fragmentSums) { - + public FragmentMetadata fragmentSums(@javax.annotation.Nullable List fragmentSums) { this.fragmentSums = fragmentSums; return this; } @@ -740,25 +693,21 @@ public FragmentMetadata addFragmentSumsItem(Integer fragmentSumsItem) { return this; } - /** + /** * Get fragmentSums * @return fragmentSums - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getFragmentSums() { return fragmentSums; } - - public void setFragmentSums(List fragmentSums) { + public void setFragmentSums(@javax.annotation.Nullable List fragmentSums) { this.fragmentSums = fragmentSums; } - public FragmentMetadata fragmentNullCounts(List fragmentNullCounts) { - + public FragmentMetadata fragmentNullCounts(@javax.annotation.Nullable List fragmentNullCounts) { this.fragmentNullCounts = fragmentNullCounts; return this; } @@ -771,48 +720,40 @@ public FragmentMetadata addFragmentNullCountsItem(Integer fragmentNullCountsItem return this; } - /** + /** * Get fragmentNullCounts * @return fragmentNullCounts - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getFragmentNullCounts() { return fragmentNullCounts; } - - public void setFragmentNullCounts(List fragmentNullCounts) { + public void setFragmentNullCounts(@javax.annotation.Nullable List fragmentNullCounts) { this.fragmentNullCounts = fragmentNullCounts; } - public FragmentMetadata version(Integer version) { - + public FragmentMetadata version(@javax.annotation.Nullable Integer version) { this.version = version; return this; } - /** + /** * Get version * @return version - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getVersion() { return version; } - - public void setVersion(Integer version) { + public void setVersion(@javax.annotation.Nullable Integer version) { this.version = version; } - public FragmentMetadata timestampRange(List timestampRange) { - + public FragmentMetadata timestampRange(@javax.annotation.Nullable List timestampRange) { this.timestampRange = timestampRange; return this; } @@ -825,80 +766,38 @@ public FragmentMetadata addTimestampRangeItem(Integer timestampRangeItem) { return this; } - /** + /** * Get timestampRange * @return timestampRange - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getTimestampRange() { return timestampRange; } - - public void setTimestampRange(List timestampRange) { + public void setTimestampRange(@javax.annotation.Nullable List timestampRange) { this.timestampRange = timestampRange; } - public FragmentMetadata lastTileCellNum(Integer lastTileCellNum) { - + public FragmentMetadata lastTileCellNum(@javax.annotation.Nullable Integer lastTileCellNum) { this.lastTileCellNum = lastTileCellNum; return this; } - /** + /** * Get lastTileCellNum * @return lastTileCellNum - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getLastTileCellNum() { return lastTileCellNum; } - - public void setLastTileCellNum(Integer lastTileCellNum) { + public void setLastTileCellNum(@javax.annotation.Nullable Integer lastTileCellNum) { this.lastTileCellNum = lastTileCellNum; } - /** - * 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. - */ - public FragmentMetadata 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -934,13 +833,12 @@ public boolean equals(Object o) { Objects.equals(this.fragmentNullCounts, fragmentMetadata.fragmentNullCounts) && Objects.equals(this.version, fragmentMetadata.version) && Objects.equals(this.timestampRange, fragmentMetadata.timestampRange) && - Objects.equals(this.lastTileCellNum, fragmentMetadata.lastTileCellNum)&& - Objects.equals(this.additionalProperties, fragmentMetadata.additionalProperties); + Objects.equals(this.lastTileCellNum, fragmentMetadata.lastTileCellNum); } @Override public int hashCode() { - return Objects.hash(fileSizes, fileVarSizes, fileValiditySizes, fragmentUri, hasTimestamps, hasDeleteMeta, sparseTileNum, tileIndexBase, tileOffsets, tileVarOffsets, tileVarSizes, tileValidityOffsets, tileMinBuffer, tileMinVarBuffer, tileMaxBuffer, tileMaxVarBuffer, tileSums, tileNullCounts, fragmentMins, fragmentMaxs, fragmentSums, fragmentNullCounts, version, timestampRange, lastTileCellNum, additionalProperties); + return Objects.hash(fileSizes, fileVarSizes, fileValiditySizes, fragmentUri, hasTimestamps, hasDeleteMeta, sparseTileNum, tileIndexBase, tileOffsets, tileVarOffsets, tileVarSizes, tileValidityOffsets, tileMinBuffer, tileMinVarBuffer, tileMaxBuffer, tileMaxVarBuffer, tileSums, tileNullCounts, fragmentMins, fragmentMaxs, fragmentSums, fragmentNullCounts, version, timestampRange, lastTileCellNum); } @Override @@ -972,7 +870,6 @@ public String toString() { sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append(" timestampRange: ").append(toIndentedString(timestampRange)).append("\n"); sb.append(" lastTileCellNum: ").append(toIndentedString(lastTileCellNum)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -1025,93 +922,100 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FragmentMetadata - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (FragmentMetadata.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 FragmentMetadata + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FragmentMetadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in FragmentMetadata is not found in the empty JSON string", FragmentMetadata.openapiRequiredFields.toString())); } } - // ensure the json data is an array - if ((jsonObj.get("fileSizes") != null && !jsonObj.get("fileSizes").isJsonNull()) && !jsonObj.get("fileSizes").isJsonArray()) { + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FragmentMetadata.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FragmentMetadata` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("fileSizes") != null && !jsonObj.get("fileSizes").isJsonNull() && !jsonObj.get("fileSizes").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `fileSizes` to be an array in the JSON string but got `%s`", jsonObj.get("fileSizes").toString())); } - // ensure the json data is an array - if ((jsonObj.get("fileVarSizes") != null && !jsonObj.get("fileVarSizes").isJsonNull()) && !jsonObj.get("fileVarSizes").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("fileVarSizes") != null && !jsonObj.get("fileVarSizes").isJsonNull() && !jsonObj.get("fileVarSizes").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `fileVarSizes` to be an array in the JSON string but got `%s`", jsonObj.get("fileVarSizes").toString())); } - // ensure the json data is an array - if ((jsonObj.get("fileValiditySizes") != null && !jsonObj.get("fileValiditySizes").isJsonNull()) && !jsonObj.get("fileValiditySizes").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("fileValiditySizes") != null && !jsonObj.get("fileValiditySizes").isJsonNull() && !jsonObj.get("fileValiditySizes").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `fileValiditySizes` to be an array in the JSON string but got `%s`", jsonObj.get("fileValiditySizes").toString())); } if ((jsonObj.get("fragmentUri") != null && !jsonObj.get("fragmentUri").isJsonNull()) && !jsonObj.get("fragmentUri").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `fragmentUri` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fragmentUri").toString())); } - // ensure the json data is an array - if ((jsonObj.get("tileOffsets") != null && !jsonObj.get("tileOffsets").isJsonNull()) && !jsonObj.get("tileOffsets").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("tileOffsets") != null && !jsonObj.get("tileOffsets").isJsonNull() && !jsonObj.get("tileOffsets").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tileOffsets` to be an array in the JSON string but got `%s`", jsonObj.get("tileOffsets").toString())); } - // ensure the json data is an array - if ((jsonObj.get("tileVarOffsets") != null && !jsonObj.get("tileVarOffsets").isJsonNull()) && !jsonObj.get("tileVarOffsets").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("tileVarOffsets") != null && !jsonObj.get("tileVarOffsets").isJsonNull() && !jsonObj.get("tileVarOffsets").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tileVarOffsets` to be an array in the JSON string but got `%s`", jsonObj.get("tileVarOffsets").toString())); } - // ensure the json data is an array - if ((jsonObj.get("tileVarSizes") != null && !jsonObj.get("tileVarSizes").isJsonNull()) && !jsonObj.get("tileVarSizes").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("tileVarSizes") != null && !jsonObj.get("tileVarSizes").isJsonNull() && !jsonObj.get("tileVarSizes").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tileVarSizes` to be an array in the JSON string but got `%s`", jsonObj.get("tileVarSizes").toString())); } - // ensure the json data is an array - if ((jsonObj.get("tileValidityOffsets") != null && !jsonObj.get("tileValidityOffsets").isJsonNull()) && !jsonObj.get("tileValidityOffsets").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("tileValidityOffsets") != null && !jsonObj.get("tileValidityOffsets").isJsonNull() && !jsonObj.get("tileValidityOffsets").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tileValidityOffsets` to be an array in the JSON string but got `%s`", jsonObj.get("tileValidityOffsets").toString())); } - // ensure the json data is an array - if ((jsonObj.get("tileMinBuffer") != null && !jsonObj.get("tileMinBuffer").isJsonNull()) && !jsonObj.get("tileMinBuffer").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("tileMinBuffer") != null && !jsonObj.get("tileMinBuffer").isJsonNull() && !jsonObj.get("tileMinBuffer").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tileMinBuffer` to be an array in the JSON string but got `%s`", jsonObj.get("tileMinBuffer").toString())); } - // ensure the json data is an array - if ((jsonObj.get("tileMinVarBuffer") != null && !jsonObj.get("tileMinVarBuffer").isJsonNull()) && !jsonObj.get("tileMinVarBuffer").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("tileMinVarBuffer") != null && !jsonObj.get("tileMinVarBuffer").isJsonNull() && !jsonObj.get("tileMinVarBuffer").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tileMinVarBuffer` to be an array in the JSON string but got `%s`", jsonObj.get("tileMinVarBuffer").toString())); } - // ensure the json data is an array - if ((jsonObj.get("tileMaxBuffer") != null && !jsonObj.get("tileMaxBuffer").isJsonNull()) && !jsonObj.get("tileMaxBuffer").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("tileMaxBuffer") != null && !jsonObj.get("tileMaxBuffer").isJsonNull() && !jsonObj.get("tileMaxBuffer").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tileMaxBuffer` to be an array in the JSON string but got `%s`", jsonObj.get("tileMaxBuffer").toString())); } - // ensure the json data is an array - if ((jsonObj.get("tileMaxVarBuffer") != null && !jsonObj.get("tileMaxVarBuffer").isJsonNull()) && !jsonObj.get("tileMaxVarBuffer").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("tileMaxVarBuffer") != null && !jsonObj.get("tileMaxVarBuffer").isJsonNull() && !jsonObj.get("tileMaxVarBuffer").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tileMaxVarBuffer` to be an array in the JSON string but got `%s`", jsonObj.get("tileMaxVarBuffer").toString())); } - // ensure the json data is an array - if ((jsonObj.get("tileSums") != null && !jsonObj.get("tileSums").isJsonNull()) && !jsonObj.get("tileSums").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("tileSums") != null && !jsonObj.get("tileSums").isJsonNull() && !jsonObj.get("tileSums").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tileSums` to be an array in the JSON string but got `%s`", jsonObj.get("tileSums").toString())); } - // ensure the json data is an array - if ((jsonObj.get("tileNullCounts") != null && !jsonObj.get("tileNullCounts").isJsonNull()) && !jsonObj.get("tileNullCounts").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("tileNullCounts") != null && !jsonObj.get("tileNullCounts").isJsonNull() && !jsonObj.get("tileNullCounts").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tileNullCounts` to be an array in the JSON string but got `%s`", jsonObj.get("tileNullCounts").toString())); } - // ensure the json data is an array - if ((jsonObj.get("fragmentMins") != null && !jsonObj.get("fragmentMins").isJsonNull()) && !jsonObj.get("fragmentMins").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("fragmentMins") != null && !jsonObj.get("fragmentMins").isJsonNull() && !jsonObj.get("fragmentMins").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `fragmentMins` to be an array in the JSON string but got `%s`", jsonObj.get("fragmentMins").toString())); } - // ensure the json data is an array - if ((jsonObj.get("fragmentMaxs") != null && !jsonObj.get("fragmentMaxs").isJsonNull()) && !jsonObj.get("fragmentMaxs").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("fragmentMaxs") != null && !jsonObj.get("fragmentMaxs").isJsonNull() && !jsonObj.get("fragmentMaxs").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `fragmentMaxs` to be an array in the JSON string but got `%s`", jsonObj.get("fragmentMaxs").toString())); } - // ensure the json data is an array - if ((jsonObj.get("fragmentSums") != null && !jsonObj.get("fragmentSums").isJsonNull()) && !jsonObj.get("fragmentSums").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("fragmentSums") != null && !jsonObj.get("fragmentSums").isJsonNull() && !jsonObj.get("fragmentSums").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `fragmentSums` to be an array in the JSON string but got `%s`", jsonObj.get("fragmentSums").toString())); } - // ensure the json data is an array - if ((jsonObj.get("fragmentNullCounts") != null && !jsonObj.get("fragmentNullCounts").isJsonNull()) && !jsonObj.get("fragmentNullCounts").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("fragmentNullCounts") != null && !jsonObj.get("fragmentNullCounts").isJsonNull() && !jsonObj.get("fragmentNullCounts").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `fragmentNullCounts` to be an array in the JSON string but got `%s`", jsonObj.get("fragmentNullCounts").toString())); } - // ensure the json data is an array - if ((jsonObj.get("timestampRange") != null && !jsonObj.get("timestampRange").isJsonNull()) && !jsonObj.get("timestampRange").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("timestampRange") != null && !jsonObj.get("timestampRange").isJsonNull() && !jsonObj.get("timestampRange").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `timestampRange` to be an array in the JSON string but got `%s`", jsonObj.get("timestampRange").toString())); } } @@ -1131,71 +1035,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, FragmentMetadata value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 FragmentMetadata read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - FragmentMetadata 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of FragmentMetadata given an JSON string - * - * @param jsonString JSON string - * @return An instance of FragmentMetadata - * @throws IOException if the JSON string is invalid with respect to FragmentMetadata - */ + /** + * Create an instance of FragmentMetadata given an JSON string + * + * @param jsonString JSON string + * @return An instance of FragmentMetadata + * @throws IOException if the JSON string is invalid with respect to FragmentMetadata + */ public static FragmentMetadata fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, FragmentMetadata.class); } - /** - * Convert an instance of FragmentMetadata to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of FragmentMetadata to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/GenericUDF.java b/src/main/java/io/tiledb/cloud/rest_api/model/GenericUDF.java index 2642b82..b736f45 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/GenericUDF.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/GenericUDF.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,318 +11,309 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.ResultFormat; +import org.openapitools.client.model.UDFLanguage; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * User-defined function */ -@ApiModel(description = "User-defined function") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class GenericUDF { public static final String SERIALIZED_NAME_UDF_INFO_NAME = "udf_info_name"; @SerializedName(SERIALIZED_NAME_UDF_INFO_NAME) + @javax.annotation.Nullable private String udfInfoName; public static final String SERIALIZED_NAME_LANGUAGE = "language"; @SerializedName(SERIALIZED_NAME_LANGUAGE) + @javax.annotation.Nullable private UDFLanguage language; public static final String SERIALIZED_NAME_VERSION = "version"; @SerializedName(SERIALIZED_NAME_VERSION) + @javax.annotation.Nullable private String version; public static final String SERIALIZED_NAME_IMAGE_NAME = "image_name"; @SerializedName(SERIALIZED_NAME_IMAGE_NAME) + @javax.annotation.Nullable private String imageName; public static final String SERIALIZED_NAME_ACCESS_CREDENTIALS_NAME = "access_credentials_name"; @SerializedName(SERIALIZED_NAME_ACCESS_CREDENTIALS_NAME) + @javax.annotation.Nullable private String accessCredentialsName; public static final String SERIALIZED_NAME_RESOURCE_CLASS = "resource_class"; @SerializedName(SERIALIZED_NAME_RESOURCE_CLASS) + @javax.annotation.Nullable private String resourceClass; public static final String SERIALIZED_NAME_EXEC = "exec"; @SerializedName(SERIALIZED_NAME_EXEC) + @javax.annotation.Nullable private String exec; public static final String SERIALIZED_NAME_EXEC_RAW = "exec_raw"; @SerializedName(SERIALIZED_NAME_EXEC_RAW) + @javax.annotation.Nullable private String execRaw; public static final String SERIALIZED_NAME_ARGUMENT = "argument"; @SerializedName(SERIALIZED_NAME_ARGUMENT) + @javax.annotation.Nullable private String argument; public static final String SERIALIZED_NAME_STORED_PARAM_UUIDS = "stored_param_uuids"; @SerializedName(SERIALIZED_NAME_STORED_PARAM_UUIDS) - private List storedParamUuids = null; + @javax.annotation.Nullable + private List storedParamUuids = new ArrayList<>(); public static final String SERIALIZED_NAME_RESULT_FORMAT = "result_format"; @SerializedName(SERIALIZED_NAME_RESULT_FORMAT) + @javax.annotation.Nullable private ResultFormat resultFormat; public static final String SERIALIZED_NAME_TASK_NAME = "task_name"; @SerializedName(SERIALIZED_NAME_TASK_NAME) + @javax.annotation.Nullable private String taskName; public static final String SERIALIZED_NAME_STORE_RESULTS = "store_results"; @SerializedName(SERIALIZED_NAME_STORE_RESULTS) + @javax.annotation.Nullable private Boolean storeResults; public static final String SERIALIZED_NAME_TIMEOUT = "timeout"; @SerializedName(SERIALIZED_NAME_TIMEOUT) + @javax.annotation.Nullable private Integer timeout; public static final String SERIALIZED_NAME_DONT_DOWNLOAD_RESULTS = "dont_download_results"; @SerializedName(SERIALIZED_NAME_DONT_DOWNLOAD_RESULTS) + @javax.annotation.Nullable private Boolean dontDownloadResults; public static final String SERIALIZED_NAME_TASK_GRAPH_UUID = "task_graph_uuid"; @SerializedName(SERIALIZED_NAME_TASK_GRAPH_UUID) + @javax.annotation.Nullable private String taskGraphUuid; public static final String SERIALIZED_NAME_CLIENT_NODE_UUID = "client_node_uuid"; @SerializedName(SERIALIZED_NAME_CLIENT_NODE_UUID) + @javax.annotation.Nullable private String clientNodeUuid; public GenericUDF() { } - public GenericUDF udfInfoName(String udfInfoName) { - + public GenericUDF udfInfoName(@javax.annotation.Nullable String udfInfoName) { this.udfInfoName = udfInfoName; return this; } - /** + /** * name of UDFInfo to run, format is {namespace}/{udf_name}. Can not be used with exec * @return udfInfoName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "TileDB-Inc/csv_ingestor", value = "name of UDFInfo to run, format is {namespace}/{udf_name}. Can not be used with exec") - public String getUdfInfoName() { return udfInfoName; } - - public void setUdfInfoName(String udfInfoName) { + public void setUdfInfoName(@javax.annotation.Nullable String udfInfoName) { this.udfInfoName = udfInfoName; } - public GenericUDF language(UDFLanguage language) { - + public GenericUDF language(@javax.annotation.Nullable UDFLanguage language) { this.language = language; return this; } - /** + /** * Get language * @return language - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public UDFLanguage getLanguage() { return language; } - - public void setLanguage(UDFLanguage language) { + public void setLanguage(@javax.annotation.Nullable UDFLanguage language) { this.language = language; } - public GenericUDF version(String version) { - + public GenericUDF version(@javax.annotation.Nullable String version) { this.version = version; return this; } - /** + /** * Type-specific version * @return version - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Type-specific version") - public String getVersion() { return version; } - - public void setVersion(String version) { + public void setVersion(@javax.annotation.Nullable String version) { this.version = version; } - public GenericUDF imageName(String imageName) { - + public GenericUDF imageName(@javax.annotation.Nullable String imageName) { this.imageName = imageName; return this; } - /** + /** * Docker image name to use for UDF * @return imageName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Docker image name to use for UDF") - public String getImageName() { return imageName; } - - public void setImageName(String imageName) { + public void setImageName(@javax.annotation.Nullable String imageName) { this.imageName = imageName; } - public GenericUDF accessCredentialsName(String accessCredentialsName) { - + public GenericUDF accessCredentialsName(@javax.annotation.Nullable String accessCredentialsName) { this.accessCredentialsName = accessCredentialsName; return this; } - /** + /** * The name of the access credentials to use. if unset, no credentials will be configured in the environment. * @return accessCredentialsName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The name of the access credentials to use. if unset, no credentials will be configured in the environment.") - public String getAccessCredentialsName() { return accessCredentialsName; } - - public void setAccessCredentialsName(String accessCredentialsName) { + public void setAccessCredentialsName(@javax.annotation.Nullable String accessCredentialsName) { this.accessCredentialsName = accessCredentialsName; } - public GenericUDF resourceClass(String resourceClass) { - + public GenericUDF resourceClass(@javax.annotation.Nullable String resourceClass) { this.resourceClass = resourceClass; return this; } - /** + /** * The resource class to use for the UDF execution. Resource classes define resource limits for memory and CPUs. If this is empty, then the UDF will execute in the standard resource class of the TileDB Cloud provider. * @return resourceClass - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "standard", value = "The resource class to use for the UDF execution. Resource classes define resource limits for memory and CPUs. If this is empty, then the UDF will execute in the standard resource class of the TileDB Cloud provider. ") - public String getResourceClass() { return resourceClass; } - - public void setResourceClass(String resourceClass) { + public void setResourceClass(@javax.annotation.Nullable String resourceClass) { this.resourceClass = resourceClass; } - public GenericUDF exec(String exec) { - + public GenericUDF exec(@javax.annotation.Nullable String exec) { this.exec = exec; return this; } - /** + /** * Type-specific executable text * @return exec - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Type-specific executable text") - public String getExec() { return exec; } - - public void setExec(String exec) { + public void setExec(@javax.annotation.Nullable String exec) { this.exec = exec; } - public GenericUDF execRaw(String execRaw) { - + public GenericUDF execRaw(@javax.annotation.Nullable String execRaw) { this.execRaw = execRaw; return this; } - /** + /** * optional raw text to store of serialized function, used for showing in UI * @return execRaw - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "optional raw text to store of serialized function, used for showing in UI") - public String getExecRaw() { return execRaw; } - - public void setExecRaw(String execRaw) { + public void setExecRaw(@javax.annotation.Nullable String execRaw) { this.execRaw = execRaw; } - public GenericUDF argument(String argument) { - + public GenericUDF argument(@javax.annotation.Nullable String argument) { this.argument = argument; return this; } - /** + /** * Argument(s) to pass to UDF function, tuple or list of args/kwargs which can be in native or JSON format * @return argument - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Argument(s) to pass to UDF function, tuple or list of args/kwargs which can be in native or JSON format") - public String getArgument() { return argument; } - - public void setArgument(String argument) { + public void setArgument(@javax.annotation.Nullable String argument) { this.argument = argument; } - public GenericUDF storedParamUuids(List storedParamUuids) { - + public GenericUDF storedParamUuids(@javax.annotation.Nullable List storedParamUuids) { this.storedParamUuids = storedParamUuids; return this; } @@ -335,218 +326,152 @@ public GenericUDF addStoredParamUuidsItem(String storedParamUuidsItem) { return this; } - /** + /** * The UUIDs of stored input parameters (passed in a language-specific format within \"argument\") to be retrieved from the server-side cache. Serialized in standard hex format with no {}. * @return storedParamUuids - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The UUIDs of stored input parameters (passed in a language-specific format within \"argument\") to be retrieved from the server-side cache. Serialized in standard hex format with no {}.") - public List getStoredParamUuids() { return storedParamUuids; } - - public void setStoredParamUuids(List storedParamUuids) { + public void setStoredParamUuids(@javax.annotation.Nullable List storedParamUuids) { this.storedParamUuids = storedParamUuids; } - public GenericUDF resultFormat(ResultFormat resultFormat) { - + public GenericUDF resultFormat(@javax.annotation.Nullable ResultFormat resultFormat) { this.resultFormat = resultFormat; return this; } - /** + /** * Get resultFormat * @return resultFormat - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public ResultFormat getResultFormat() { return resultFormat; } - - public void setResultFormat(ResultFormat resultFormat) { + public void setResultFormat(@javax.annotation.Nullable ResultFormat resultFormat) { this.resultFormat = resultFormat; } - public GenericUDF taskName(String taskName) { - + public GenericUDF taskName(@javax.annotation.Nullable String taskName) { this.taskName = taskName; return this; } - /** + /** * name of task, optional * @return taskName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "name of task, optional") - public String getTaskName() { return taskName; } - - public void setTaskName(String taskName) { + public void setTaskName(@javax.annotation.Nullable String taskName) { this.taskName = taskName; } - public GenericUDF storeResults(Boolean storeResults) { - + public GenericUDF storeResults(@javax.annotation.Nullable Boolean storeResults) { this.storeResults = storeResults; return this; } - /** + /** * store results for later retrieval * @return storeResults - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "store results for later retrieval") - public Boolean getStoreResults() { return storeResults; } - - public void setStoreResults(Boolean storeResults) { + public void setStoreResults(@javax.annotation.Nullable Boolean storeResults) { this.storeResults = storeResults; } - public GenericUDF timeout(Integer timeout) { - + public GenericUDF timeout(@javax.annotation.Nullable Integer timeout) { this.timeout = timeout; return this; } - /** + /** * UDF-type timeout in seconds (default: 900) * @return timeout - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "UDF-type timeout in seconds (default: 900)") - public Integer getTimeout() { return timeout; } - - public void setTimeout(Integer timeout) { + public void setTimeout(@javax.annotation.Nullable Integer timeout) { this.timeout = timeout; } - public GenericUDF dontDownloadResults(Boolean dontDownloadResults) { - + public GenericUDF dontDownloadResults(@javax.annotation.Nullable Boolean dontDownloadResults) { this.dontDownloadResults = dontDownloadResults; return this; } - /** + /** * Set to true to avoid downloading the results of this UDF. Useful for intermediate nodes in a task graph where you will not be using the results of your function. Defaults to false (\"yes download results\"). * @return dontDownloadResults - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Set to true to avoid downloading the results of this UDF. Useful for intermediate nodes in a task graph where you will not be using the results of your function. Defaults to false (\"yes download results\").") - public Boolean getDontDownloadResults() { return dontDownloadResults; } - - public void setDontDownloadResults(Boolean dontDownloadResults) { + public void setDontDownloadResults(@javax.annotation.Nullable Boolean dontDownloadResults) { this.dontDownloadResults = dontDownloadResults; } - public GenericUDF taskGraphUuid(String taskGraphUuid) { - + public GenericUDF taskGraphUuid(@javax.annotation.Nullable String taskGraphUuid) { this.taskGraphUuid = taskGraphUuid; return this; } - /** + /** * If set, the ID of the log for the task graph that this was part of. * @return taskGraphUuid - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "If set, the ID of the log for the task graph that this was part of. ") - public String getTaskGraphUuid() { return taskGraphUuid; } - - public void setTaskGraphUuid(String taskGraphUuid) { + public void setTaskGraphUuid(@javax.annotation.Nullable String taskGraphUuid) { this.taskGraphUuid = taskGraphUuid; } - public GenericUDF clientNodeUuid(String clientNodeUuid) { - + public GenericUDF clientNodeUuid(@javax.annotation.Nullable String clientNodeUuid) { this.clientNodeUuid = clientNodeUuid; return this; } - /** + /** * If set, the client-defined ID of the node within this task's graph. * @return clientNodeUuid - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "If set, the client-defined ID of the node within this task's graph. ") - public String getClientNodeUuid() { return clientNodeUuid; } - - public void setClientNodeUuid(String clientNodeUuid) { + public void setClientNodeUuid(@javax.annotation.Nullable String clientNodeUuid) { this.clientNodeUuid = clientNodeUuid; } - /** - * 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. - */ - public GenericUDF 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -574,13 +499,12 @@ public boolean equals(Object o) { Objects.equals(this.timeout, genericUDF.timeout) && Objects.equals(this.dontDownloadResults, genericUDF.dontDownloadResults) && Objects.equals(this.taskGraphUuid, genericUDF.taskGraphUuid) && - Objects.equals(this.clientNodeUuid, genericUDF.clientNodeUuid)&& - Objects.equals(this.additionalProperties, genericUDF.additionalProperties); + Objects.equals(this.clientNodeUuid, genericUDF.clientNodeUuid); } @Override public int hashCode() { - return Objects.hash(udfInfoName, language, version, imageName, accessCredentialsName, resourceClass, exec, execRaw, argument, storedParamUuids, resultFormat, taskName, storeResults, timeout, dontDownloadResults, taskGraphUuid, clientNodeUuid, additionalProperties); + return Objects.hash(udfInfoName, language, version, imageName, accessCredentialsName, resourceClass, exec, execRaw, argument, storedParamUuids, resultFormat, taskName, storeResults, timeout, dontDownloadResults, taskGraphUuid, clientNodeUuid); } @Override @@ -604,7 +528,6 @@ public String toString() { sb.append(" dontDownloadResults: ").append(toIndentedString(dontDownloadResults)).append("\n"); sb.append(" taskGraphUuid: ").append(toIndentedString(taskGraphUuid)).append("\n"); sb.append(" clientNodeUuid: ").append(toIndentedString(clientNodeUuid)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -649,23 +572,34 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GenericUDF - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (GenericUDF.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 GenericUDF + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GenericUDF.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in GenericUDF is not found in the empty JSON string", GenericUDF.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GenericUDF.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GenericUDF` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("udf_info_name") != null && !jsonObj.get("udf_info_name").isJsonNull()) && !jsonObj.get("udf_info_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `udf_info_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("udf_info_name").toString())); } + // validate the optional field `language` + if (jsonObj.get("language") != null && !jsonObj.get("language").isJsonNull()) { + UDFLanguage.validateJsonElement(jsonObj.get("language")); + } if ((jsonObj.get("version") != null && !jsonObj.get("version").isJsonNull()) && !jsonObj.get("version").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `version` to be a primitive type in the JSON string but got `%s`", jsonObj.get("version").toString())); } @@ -687,10 +621,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("argument") != null && !jsonObj.get("argument").isJsonNull()) && !jsonObj.get("argument").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `argument` to be a primitive type in the JSON string but got `%s`", jsonObj.get("argument").toString())); } - // ensure the json data is an array - if ((jsonObj.get("stored_param_uuids") != null && !jsonObj.get("stored_param_uuids").isJsonNull()) && !jsonObj.get("stored_param_uuids").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("stored_param_uuids") != null && !jsonObj.get("stored_param_uuids").isJsonNull() && !jsonObj.get("stored_param_uuids").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `stored_param_uuids` to be an array in the JSON string but got `%s`", jsonObj.get("stored_param_uuids").toString())); } + // validate the optional field `result_format` + if (jsonObj.get("result_format") != null && !jsonObj.get("result_format").isJsonNull()) { + ResultFormat.validateJsonElement(jsonObj.get("result_format")); + } if ((jsonObj.get("task_name") != null && !jsonObj.get("task_name").isJsonNull()) && !jsonObj.get("task_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `task_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("task_name").toString())); } @@ -717,71 +655,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, GenericUDF value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 GenericUDF read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - GenericUDF 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GenericUDF given an JSON string - * - * @param jsonString JSON string - * @return An instance of GenericUDF - * @throws IOException if the JSON string is invalid with respect to GenericUDF - */ + /** + * Create an instance of GenericUDF given an JSON string + * + * @param jsonString JSON string + * @return An instance of GenericUDF + * @throws IOException if the JSON string is invalid with respect to GenericUDF + */ public static GenericUDF fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GenericUDF.class); } - /** - * Convert an instance of GenericUDF to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GenericUDF to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/GetTiledbStats200Response.java b/src/main/java/io/tiledb/cloud/rest_api/model/GetTiledbStats200Response.java index 7b9da9a..3fac57b 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/GetTiledbStats200Response.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/GetTiledbStats200Response.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,99 +11,71 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModelProperty; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * GetTiledbStats200Response */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class GetTiledbStats200Response { public static final String SERIALIZED_NAME_STATS = "stats"; @SerializedName(SERIALIZED_NAME_STATS) + @javax.annotation.Nullable private String stats; public GetTiledbStats200Response() { } - public GetTiledbStats200Response stats(String stats) { - + public GetTiledbStats200Response stats(@javax.annotation.Nullable String stats) { this.stats = stats; return this; } - /** + /** * string of stats from tiledb * @return stats - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "123", value = "string of stats from tiledb") - public String getStats() { return stats; } - - public void setStats(String stats) { + public void setStats(@javax.annotation.Nullable String stats) { this.stats = stats; } - /** - * 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. - */ - public GetTiledbStats200Response 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -115,13 +87,12 @@ public boolean equals(Object o) { return false; } GetTiledbStats200Response getTiledbStats200Response = (GetTiledbStats200Response) o; - return Objects.equals(this.stats, getTiledbStats200Response.stats)&& - Objects.equals(this.additionalProperties, getTiledbStats200Response.additionalProperties); + return Objects.equals(this.stats, getTiledbStats200Response.stats); } @Override public int hashCode() { - return Objects.hash(stats, additionalProperties); + return Objects.hash(stats); } @Override @@ -129,7 +100,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class GetTiledbStats200Response {\n"); sb.append(" stats: ").append(toIndentedString(stats)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -158,20 +128,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GetTiledbStats200Response - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (GetTiledbStats200Response.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 GetTiledbStats200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetTiledbStats200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in GetTiledbStats200Response is not found in the empty JSON string", GetTiledbStats200Response.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GetTiledbStats200Response.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GetTiledbStats200Response` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("stats") != null && !jsonObj.get("stats").isJsonNull()) && !jsonObj.get("stats").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `stats` to be a primitive type in the JSON string but got `%s`", jsonObj.get("stats").toString())); } @@ -192,71 +169,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, GetTiledbStats200Response value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 GetTiledbStats200Response read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - GetTiledbStats200Response 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GetTiledbStats200Response given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetTiledbStats200Response - * @throws IOException if the JSON string is invalid with respect to GetTiledbStats200Response - */ + /** + * Create an instance of GetTiledbStats200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetTiledbStats200Response + * @throws IOException if the JSON string is invalid with respect to GetTiledbStats200Response + */ public static GetTiledbStats200Response fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GetTiledbStats200Response.class); } - /** - * Convert an instance of GetTiledbStats200Response to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GetTiledbStats200Response to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/GroupActions.java b/src/main/java/io/tiledb/cloud/rest_api/model/GroupActions.java index c163a08..b24d6dd 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/GroupActions.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/GroupActions.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -67,5 +71,10 @@ public GroupActions read(final JsonReader jsonReader) throws IOException { return GroupActions.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + GroupActions.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/GroupActivity.java b/src/main/java/io/tiledb/cloud/rest_api/model/GroupActivity.java index 2e121ce..3d769aa 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/GroupActivity.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/GroupActivity.java @@ -11,127 +11,97 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.ArrayActivityLog; +import org.openapitools.client.model.GroupActivityAsset; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Object containing activity of an asset of a group */ -@ApiModel(description = "Object containing activity of an asset of a group") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:29:59.905132591Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class GroupActivity { public static final String SERIALIZED_NAME_ASSET = "asset"; @SerializedName(SERIALIZED_NAME_ASSET) + @javax.annotation.Nullable private GroupActivityAsset asset; public static final String SERIALIZED_NAME_ACTIVITY_LOG = "activity_log"; @SerializedName(SERIALIZED_NAME_ACTIVITY_LOG) + @javax.annotation.Nullable private ArrayActivityLog activityLog; public GroupActivity() { } - public GroupActivity asset(GroupActivityAsset asset) { - + public GroupActivity asset(@javax.annotation.Nullable GroupActivityAsset asset) { this.asset = asset; return this; } - /** + /** * Get asset * @return asset - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public GroupActivityAsset getAsset() { return asset; } - - public void setAsset(GroupActivityAsset asset) { + public void setAsset(@javax.annotation.Nullable GroupActivityAsset asset) { this.asset = asset; } - public GroupActivity activityLog(ArrayActivityLog activityLog) { - + public GroupActivity activityLog(@javax.annotation.Nullable ArrayActivityLog activityLog) { this.activityLog = activityLog; return this; } - /** + /** * Get activityLog * @return activityLog - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public ArrayActivityLog getActivityLog() { return activityLog; } - - public void setActivityLog(ArrayActivityLog activityLog) { + public void setActivityLog(@javax.annotation.Nullable ArrayActivityLog activityLog) { this.activityLog = activityLog; } - /** - * 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. - */ - public GroupActivity 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -144,13 +114,12 @@ public boolean equals(Object o) { } GroupActivity groupActivity = (GroupActivity) o; return Objects.equals(this.asset, groupActivity.asset) && - Objects.equals(this.activityLog, groupActivity.activityLog)&& - Objects.equals(this.additionalProperties, groupActivity.additionalProperties); + Objects.equals(this.activityLog, groupActivity.activityLog); } @Override public int hashCode() { - return Objects.hash(asset, activityLog, additionalProperties); + return Objects.hash(asset, activityLog); } @Override @@ -159,7 +128,6 @@ public String toString() { sb.append("class GroupActivity {\n"); sb.append(" asset: ").append(toIndentedString(asset)).append("\n"); sb.append(" activityLog: ").append(toIndentedString(activityLog)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -189,27 +157,34 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GroupActivity - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (GroupActivity.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 GroupActivity + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupActivity.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in GroupActivity is not found in the empty JSON string", GroupActivity.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupActivity.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupActivity` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `asset` if (jsonObj.get("asset") != null && !jsonObj.get("asset").isJsonNull()) { - GroupActivityAsset.validateJsonObject(jsonObj.getAsJsonObject("asset")); + GroupActivityAsset.validateJsonElement(jsonObj.get("asset")); } // validate the optional field `activity_log` if (jsonObj.get("activity_log") != null && !jsonObj.get("activity_log").isJsonNull()) { - ArrayActivityLog.validateJsonObject(jsonObj.getAsJsonObject("activity_log")); + ArrayActivityLog.validateJsonElement(jsonObj.get("activity_log")); } } @@ -228,71 +203,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, GroupActivity value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 GroupActivity read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - GroupActivity 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GroupActivity given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupActivity - * @throws IOException if the JSON string is invalid with respect to GroupActivity - */ + /** + * Create an instance of GroupActivity given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupActivity + * @throws IOException if the JSON string is invalid with respect to GroupActivity + */ public static GroupActivity fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GroupActivity.class); } - /** - * Convert an instance of GroupActivity to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GroupActivity to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/GroupActivityAsset.java b/src/main/java/io/tiledb/cloud/rest_api/model/GroupActivityAsset.java index f4302a5..e527e6f 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/GroupActivityAsset.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/GroupActivityAsset.java @@ -11,181 +11,144 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.AssetType; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * The asset details */ -@ApiModel(description = "The asset details") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:29:59.905132591Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class GroupActivityAsset { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private String id; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; @SerializedName(SERIALIZED_NAME_NAMESPACE) + @javax.annotation.Nullable private String namespace; public static final String SERIALIZED_NAME_ASSET_TYPE = "asset_type"; @SerializedName(SERIALIZED_NAME_ASSET_TYPE) + @javax.annotation.Nullable private AssetType assetType; public GroupActivityAsset() { } - public GroupActivityAsset id(String id) { - + public GroupActivityAsset id(@javax.annotation.Nullable String id) { this.id = id; return this; } - /** + /** * The asset ID * @return id - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The asset ID") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nullable String id) { this.id = id; } - public GroupActivityAsset name(String name) { - + public GroupActivityAsset name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * The asset name * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The asset name") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public GroupActivityAsset namespace(String namespace) { - + public GroupActivityAsset namespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; return this; } - /** + /** * The namespace that the asset belongs to * @return namespace - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The namespace that the asset belongs to") - public String getNamespace() { return namespace; } - - public void setNamespace(String namespace) { + public void setNamespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; } - public GroupActivityAsset assetType(AssetType assetType) { - + public GroupActivityAsset assetType(@javax.annotation.Nullable AssetType assetType) { this.assetType = assetType; return this; } - /** + /** * Get assetType * @return assetType - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public AssetType getAssetType() { return assetType; } - - public void setAssetType(AssetType assetType) { + public void setAssetType(@javax.annotation.Nullable AssetType assetType) { this.assetType = assetType; } - /** - * 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. - */ - public GroupActivityAsset 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -200,13 +163,12 @@ public boolean equals(Object o) { return Objects.equals(this.id, groupActivityAsset.id) && Objects.equals(this.name, groupActivityAsset.name) && Objects.equals(this.namespace, groupActivityAsset.namespace) && - Objects.equals(this.assetType, groupActivityAsset.assetType)&& - Objects.equals(this.additionalProperties, groupActivityAsset.additionalProperties); + Objects.equals(this.assetType, groupActivityAsset.assetType); } @Override public int hashCode() { - return Objects.hash(id, name, namespace, assetType, additionalProperties); + return Objects.hash(id, name, namespace, assetType); } @Override @@ -217,7 +179,6 @@ public String toString() { sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); sb.append(" assetType: ").append(toIndentedString(assetType)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -249,20 +210,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GroupActivityAsset - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (GroupActivityAsset.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 GroupActivityAsset + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupActivityAsset.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in GroupActivityAsset is not found in the empty JSON string", GroupActivityAsset.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupActivityAsset.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupActivityAsset` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !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())); } @@ -272,6 +240,10 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("namespace") != null && !jsonObj.get("namespace").isJsonNull()) && !jsonObj.get("namespace").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `namespace` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespace").toString())); } + // validate the optional field `asset_type` + if (jsonObj.get("asset_type") != null && !jsonObj.get("asset_type").isJsonNull()) { + AssetType.validateJsonElement(jsonObj.get("asset_type")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -289,71 +261,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, GroupActivityAsset value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 GroupActivityAsset read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - GroupActivityAsset 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GroupActivityAsset given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupActivityAsset - * @throws IOException if the JSON string is invalid with respect to GroupActivityAsset - */ + /** + * Create an instance of GroupActivityAsset given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupActivityAsset + * @throws IOException if the JSON string is invalid with respect to GroupActivityAsset + */ public static GroupActivityAsset fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GroupActivityAsset.class); } - /** - * Convert an instance of GroupActivityAsset to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GroupActivityAsset to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/GroupActivityResponse.java b/src/main/java/io/tiledb/cloud/rest_api/model/GroupActivityResponse.java index 8cd3c58..1113dd5 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/GroupActivityResponse.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/GroupActivityResponse.java @@ -11,52 +11,63 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.GroupActivity; +import org.openapitools.client.model.PaginationMetadata; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Object containing activity logs of group content along with the pagination metadata */ -@ApiModel(description = "Object containing activity logs of group content along with the pagination metadata") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:29:59.905132591Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class GroupActivityResponse { public static final String SERIALIZED_NAME_ACTIVITY = "activity"; @SerializedName(SERIALIZED_NAME_ACTIVITY) - private List activity = null; + @javax.annotation.Nullable + private List activity = new ArrayList<>(); public static final String SERIALIZED_NAME_PAGINATION_METADATA = "pagination_metadata"; @SerializedName(SERIALIZED_NAME_PAGINATION_METADATA) + @javax.annotation.Nullable private PaginationMetadata paginationMetadata; public GroupActivityResponse() { } - public GroupActivityResponse activity(List activity) { - + public GroupActivityResponse activity(@javax.annotation.Nullable List activity) { this.activity = activity; return this; } @@ -69,80 +80,38 @@ public GroupActivityResponse addActivityItem(GroupActivity activityItem) { return this; } - /** + /** * Activity of a group's content * @return activity - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Activity of a group's content") - public List getActivity() { return activity; } - - public void setActivity(List activity) { + public void setActivity(@javax.annotation.Nullable List activity) { this.activity = activity; } - public GroupActivityResponse paginationMetadata(PaginationMetadata paginationMetadata) { - + public GroupActivityResponse paginationMetadata(@javax.annotation.Nullable PaginationMetadata paginationMetadata) { this.paginationMetadata = paginationMetadata; return this; } - /** + /** * Get paginationMetadata * @return paginationMetadata - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public PaginationMetadata getPaginationMetadata() { return paginationMetadata; } - - public void setPaginationMetadata(PaginationMetadata paginationMetadata) { + public void setPaginationMetadata(@javax.annotation.Nullable PaginationMetadata paginationMetadata) { this.paginationMetadata = paginationMetadata; } - /** - * 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. - */ - public GroupActivityResponse 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -155,13 +124,12 @@ public boolean equals(Object o) { } GroupActivityResponse groupActivityResponse = (GroupActivityResponse) o; return Objects.equals(this.activity, groupActivityResponse.activity) && - Objects.equals(this.paginationMetadata, groupActivityResponse.paginationMetadata)&& - Objects.equals(this.additionalProperties, groupActivityResponse.additionalProperties); + Objects.equals(this.paginationMetadata, groupActivityResponse.paginationMetadata); } @Override public int hashCode() { - return Objects.hash(activity, paginationMetadata, additionalProperties); + return Objects.hash(activity, paginationMetadata); } @Override @@ -170,7 +138,6 @@ public String toString() { sb.append("class GroupActivityResponse {\n"); sb.append(" activity: ").append(toIndentedString(activity)).append("\n"); sb.append(" paginationMetadata: ").append(toIndentedString(paginationMetadata)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -200,35 +167,44 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GroupActivityResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (GroupActivityResponse.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 GroupActivityResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupActivityResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in GroupActivityResponse is not found in the empty JSON string", GroupActivityResponse.openapiRequiredFields.toString())); } } - JsonArray jsonArrayactivity = jsonObj.getAsJsonArray("activity"); - if (jsonArrayactivity != null) { - // ensure the json data is an array - if (!jsonObj.get("activity").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `activity` to be an array in the JSON string but got `%s`", jsonObj.get("activity").toString())); - } - // validate the optional field `activity` (array) - for (int i = 0; i < jsonArrayactivity.size(); i++) { - GroupActivity.validateJsonObject(jsonArrayactivity.get(i).getAsJsonObject()); - }; + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupActivityResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupActivityResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("activity") != null && !jsonObj.get("activity").isJsonNull()) { + JsonArray jsonArrayactivity = jsonObj.getAsJsonArray("activity"); + if (jsonArrayactivity != null) { + // ensure the json data is an array + if (!jsonObj.get("activity").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `activity` to be an array in the JSON string but got `%s`", jsonObj.get("activity").toString())); + } + + // validate the optional field `activity` (array) + for (int i = 0; i < jsonArrayactivity.size(); i++) { + GroupActivity.validateJsonElement(jsonArrayactivity.get(i)); + }; + } } // validate the optional field `pagination_metadata` if (jsonObj.get("pagination_metadata") != null && !jsonObj.get("pagination_metadata").isJsonNull()) { - PaginationMetadata.validateJsonObject(jsonObj.getAsJsonObject("pagination_metadata")); + PaginationMetadata.validateJsonElement(jsonObj.get("pagination_metadata")); } } @@ -247,71 +223,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, GroupActivityResponse value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 GroupActivityResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - GroupActivityResponse 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GroupActivityResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupActivityResponse - * @throws IOException if the JSON string is invalid with respect to GroupActivityResponse - */ + /** + * Create an instance of GroupActivityResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupActivityResponse + * @throws IOException if the JSON string is invalid with respect to GroupActivityResponse + */ public static GroupActivityResponse fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GroupActivityResponse.class); } - /** - * Convert an instance of GroupActivityResponse to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GroupActivityResponse to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/GroupBrowserData.java b/src/main/java/io/tiledb/cloud/rest_api/model/GroupBrowserData.java index a1f7649..cac1a03 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/GroupBrowserData.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/GroupBrowserData.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,53 +11,63 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.GroupInfo; +import org.openapitools.client.model.PaginationMetadata; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Object including group info and pagination metadata */ -@ApiModel(description = "Object including group info and pagination metadata") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class GroupBrowserData { public static final String SERIALIZED_NAME_GROUPS = "groups"; @SerializedName(SERIALIZED_NAME_GROUPS) - private List groups = null; + @javax.annotation.Nullable + private List groups = new ArrayList<>(); public static final String SERIALIZED_NAME_PAGINATION_METADATA = "pagination_metadata"; @SerializedName(SERIALIZED_NAME_PAGINATION_METADATA) + @javax.annotation.Nullable private PaginationMetadata paginationMetadata; public GroupBrowserData() { } - public GroupBrowserData groups(List groups) { - + public GroupBrowserData groups(@javax.annotation.Nullable List groups) { this.groups = groups; return this; } @@ -70,80 +80,38 @@ public GroupBrowserData addGroupsItem(GroupInfo groupsItem) { return this; } - /** + /** * Groups Info * @return groups - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Groups Info") - public List getGroups() { return groups; } - - public void setGroups(List groups) { + public void setGroups(@javax.annotation.Nullable List groups) { this.groups = groups; } - public GroupBrowserData paginationMetadata(PaginationMetadata paginationMetadata) { - + public GroupBrowserData paginationMetadata(@javax.annotation.Nullable PaginationMetadata paginationMetadata) { this.paginationMetadata = paginationMetadata; return this; } - /** + /** * Get paginationMetadata * @return paginationMetadata - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public PaginationMetadata getPaginationMetadata() { return paginationMetadata; } - - public void setPaginationMetadata(PaginationMetadata paginationMetadata) { + public void setPaginationMetadata(@javax.annotation.Nullable PaginationMetadata paginationMetadata) { this.paginationMetadata = paginationMetadata; } - /** - * 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. - */ - public GroupBrowserData 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -156,13 +124,12 @@ public boolean equals(Object o) { } GroupBrowserData groupBrowserData = (GroupBrowserData) o; return Objects.equals(this.groups, groupBrowserData.groups) && - Objects.equals(this.paginationMetadata, groupBrowserData.paginationMetadata)&& - Objects.equals(this.additionalProperties, groupBrowserData.additionalProperties); + Objects.equals(this.paginationMetadata, groupBrowserData.paginationMetadata); } @Override public int hashCode() { - return Objects.hash(groups, paginationMetadata, additionalProperties); + return Objects.hash(groups, paginationMetadata); } @Override @@ -171,7 +138,6 @@ public String toString() { sb.append("class GroupBrowserData {\n"); sb.append(" groups: ").append(toIndentedString(groups)).append("\n"); sb.append(" paginationMetadata: ").append(toIndentedString(paginationMetadata)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -201,35 +167,44 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GroupBrowserData - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (GroupBrowserData.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 GroupBrowserData + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupBrowserData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in GroupBrowserData is not found in the empty JSON string", GroupBrowserData.openapiRequiredFields.toString())); } } - JsonArray jsonArraygroups = jsonObj.getAsJsonArray("groups"); - if (jsonArraygroups != null) { - // ensure the json data is an array - if (!jsonObj.get("groups").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `groups` to be an array in the JSON string but got `%s`", jsonObj.get("groups").toString())); - } - // validate the optional field `groups` (array) - for (int i = 0; i < jsonArraygroups.size(); i++) { - GroupInfo.validateJsonObject(jsonArraygroups.get(i).getAsJsonObject()); - }; + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupBrowserData.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupBrowserData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("groups") != null && !jsonObj.get("groups").isJsonNull()) { + JsonArray jsonArraygroups = jsonObj.getAsJsonArray("groups"); + if (jsonArraygroups != null) { + // ensure the json data is an array + if (!jsonObj.get("groups").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `groups` to be an array in the JSON string but got `%s`", jsonObj.get("groups").toString())); + } + + // validate the optional field `groups` (array) + for (int i = 0; i < jsonArraygroups.size(); i++) { + GroupInfo.validateJsonElement(jsonArraygroups.get(i)); + }; + } } // validate the optional field `pagination_metadata` if (jsonObj.get("pagination_metadata") != null && !jsonObj.get("pagination_metadata").isJsonNull()) { - PaginationMetadata.validateJsonObject(jsonObj.getAsJsonObject("pagination_metadata")); + PaginationMetadata.validateJsonElement(jsonObj.get("pagination_metadata")); } } @@ -248,71 +223,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, GroupBrowserData value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 GroupBrowserData read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - GroupBrowserData 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GroupBrowserData given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupBrowserData - * @throws IOException if the JSON string is invalid with respect to GroupBrowserData - */ + /** + * Create an instance of GroupBrowserData given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupBrowserData + * @throws IOException if the JSON string is invalid with respect to GroupBrowserData + */ public static GroupBrowserData fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GroupBrowserData.class); } - /** - * Convert an instance of GroupBrowserData to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GroupBrowserData to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/GroupBrowserFilterData.java b/src/main/java/io/tiledb/cloud/rest_api/model/GroupBrowserFilterData.java index 336fea5..65017b2 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/GroupBrowserFilterData.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/GroupBrowserFilterData.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,52 +11,62 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.GroupType; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Object with data to fill browser filter */ -@ApiModel(description = "Object with data to fill browser filter") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class GroupBrowserFilterData { public static final String SERIALIZED_NAME_NAMESPACES = "namespaces"; @SerializedName(SERIALIZED_NAME_NAMESPACES) - private List namespaces = null; + @javax.annotation.Nullable + private List namespaces = new ArrayList<>(); public static final String SERIALIZED_NAME_GROUP_TYPES = "group_types"; @SerializedName(SERIALIZED_NAME_GROUP_TYPES) - private List groupTypes = null; + @javax.annotation.Nullable + private List groupTypes = new ArrayList<>(); public GroupBrowserFilterData() { } - public GroupBrowserFilterData namespaces(List namespaces) { - + public GroupBrowserFilterData namespaces(@javax.annotation.Nullable List namespaces) { this.namespaces = namespaces; return this; } @@ -69,25 +79,21 @@ public GroupBrowserFilterData addNamespacesItem(String namespacesItem) { return this; } - /** + /** * list of all unique namespaces to display * @return namespaces - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "list of all unique namespaces to display") - public List getNamespaces() { return namespaces; } - - public void setNamespaces(List namespaces) { + public void setNamespaces(@javax.annotation.Nullable List namespaces) { this.namespaces = namespaces; } - public GroupBrowserFilterData groupTypes(List groupTypes) { - + public GroupBrowserFilterData groupTypes(@javax.annotation.Nullable List groupTypes) { this.groupTypes = groupTypes; return this; } @@ -100,57 +106,19 @@ public GroupBrowserFilterData addGroupTypesItem(GroupType groupTypesItem) { return this; } - /** + /** * list of all available group types to display * @return groupTypes - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "list of all available group types to display") - public List getGroupTypes() { return groupTypes; } - - public void setGroupTypes(List groupTypes) { + public void setGroupTypes(@javax.annotation.Nullable List groupTypes) { this.groupTypes = groupTypes; } - /** - * 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. - */ - public GroupBrowserFilterData 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -163,13 +131,12 @@ public boolean equals(Object o) { } GroupBrowserFilterData groupBrowserFilterData = (GroupBrowserFilterData) o; return Objects.equals(this.namespaces, groupBrowserFilterData.namespaces) && - Objects.equals(this.groupTypes, groupBrowserFilterData.groupTypes)&& - Objects.equals(this.additionalProperties, groupBrowserFilterData.additionalProperties); + Objects.equals(this.groupTypes, groupBrowserFilterData.groupTypes); } @Override public int hashCode() { - return Objects.hash(namespaces, groupTypes, additionalProperties); + return Objects.hash(namespaces, groupTypes); } @Override @@ -178,7 +145,6 @@ public String toString() { sb.append("class GroupBrowserFilterData {\n"); sb.append(" namespaces: ").append(toIndentedString(namespaces)).append("\n"); sb.append(" groupTypes: ").append(toIndentedString(groupTypes)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -208,26 +174,33 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GroupBrowserFilterData - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (GroupBrowserFilterData.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 GroupBrowserFilterData + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupBrowserFilterData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in GroupBrowserFilterData is not found in the empty JSON string", GroupBrowserFilterData.openapiRequiredFields.toString())); } } - // ensure the json data is an array - if ((jsonObj.get("namespaces") != null && !jsonObj.get("namespaces").isJsonNull()) && !jsonObj.get("namespaces").isJsonArray()) { + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupBrowserFilterData.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupBrowserFilterData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("namespaces") != null && !jsonObj.get("namespaces").isJsonNull() && !jsonObj.get("namespaces").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `namespaces` to be an array in the JSON string but got `%s`", jsonObj.get("namespaces").toString())); } - // ensure the json data is an array - if ((jsonObj.get("group_types") != null && !jsonObj.get("group_types").isJsonNull()) && !jsonObj.get("group_types").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("group_types") != null && !jsonObj.get("group_types").isJsonNull() && !jsonObj.get("group_types").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `group_types` to be an array in the JSON string but got `%s`", jsonObj.get("group_types").toString())); } } @@ -247,71 +220,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, GroupBrowserFilterData value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 GroupBrowserFilterData read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - GroupBrowserFilterData 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GroupBrowserFilterData given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupBrowserFilterData - * @throws IOException if the JSON string is invalid with respect to GroupBrowserFilterData - */ + /** + * Create an instance of GroupBrowserFilterData given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupBrowserFilterData + * @throws IOException if the JSON string is invalid with respect to GroupBrowserFilterData + */ public static GroupBrowserFilterData fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GroupBrowserFilterData.class); } - /** - * Convert an instance of GroupBrowserFilterData to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GroupBrowserFilterData to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/GroupChanges.java b/src/main/java/io/tiledb/cloud/rest_api/model/GroupChanges.java index d78ff41..a6ee09c 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/GroupChanges.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/GroupChanges.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,53 +11,62 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.GroupMember; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * A request to change the members of a group. Contains assets to add or remove. */ -@ApiModel(description = "A request to change the members of a group. Contains assets to add or remove.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class GroupChanges { public static final String SERIALIZED_NAME_ADD = "add"; @SerializedName(SERIALIZED_NAME_ADD) - private List add = null; + @javax.annotation.Nullable + private List add = new ArrayList<>(); public static final String SERIALIZED_NAME_REMOVE = "remove"; @SerializedName(SERIALIZED_NAME_REMOVE) - private List remove = null; + @javax.annotation.Nullable + private List remove = new ArrayList<>(); public GroupChanges() { } - public GroupChanges add(List add) { - + public GroupChanges add(@javax.annotation.Nullable List add) { this.add = add; return this; } @@ -70,25 +79,21 @@ public GroupChanges addAddItem(GroupMember addItem) { return this; } - /** + /** * the assets, arrays or groups, to add to the group. * @return add - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "the assets, arrays or groups, to add to the group.") - public List getAdd() { return add; } - - public void setAdd(List add) { + public void setAdd(@javax.annotation.Nullable List add) { this.add = add; } - public GroupChanges remove(List remove) { - + public GroupChanges remove(@javax.annotation.Nullable List remove) { this.remove = remove; return this; } @@ -101,57 +106,19 @@ public GroupChanges addRemoveItem(GroupMember removeItem) { return this; } - /** + /** * the assets, arrays or groups, to remove from the group. * @return remove - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "the assets, arrays or groups, to remove from the group.") - public List getRemove() { return remove; } - - public void setRemove(List remove) { + public void setRemove(@javax.annotation.Nullable List remove) { this.remove = remove; } - /** - * 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. - */ - public GroupChanges 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -164,13 +131,12 @@ public boolean equals(Object o) { } GroupChanges groupChanges = (GroupChanges) o; return Objects.equals(this.add, groupChanges.add) && - Objects.equals(this.remove, groupChanges.remove)&& - Objects.equals(this.additionalProperties, groupChanges.additionalProperties); + Objects.equals(this.remove, groupChanges.remove); } @Override public int hashCode() { - return Objects.hash(add, remove, additionalProperties); + return Objects.hash(add, remove); } @Override @@ -179,7 +145,6 @@ public String toString() { sb.append("class GroupChanges {\n"); sb.append(" add: ").append(toIndentedString(add)).append("\n"); sb.append(" remove: ").append(toIndentedString(remove)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -209,43 +174,54 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GroupChanges - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (GroupChanges.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 GroupChanges + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupChanges.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in GroupChanges is not found in the empty JSON string", GroupChanges.openapiRequiredFields.toString())); } } - JsonArray jsonArrayadd = jsonObj.getAsJsonArray("add"); - if (jsonArrayadd != null) { - // ensure the json data is an array - if (!jsonObj.get("add").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `add` to be an array in the JSON string but got `%s`", jsonObj.get("add").toString())); - } - // validate the optional field `add` (array) - for (int i = 0; i < jsonArrayadd.size(); i++) { - GroupMember.validateJsonObject(jsonArrayadd.get(i).getAsJsonObject()); - }; + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupChanges.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupChanges` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } } - JsonArray jsonArrayremove = jsonObj.getAsJsonArray("remove"); - if (jsonArrayremove != null) { - // ensure the json data is an array - if (!jsonObj.get("remove").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `remove` to be an array in the JSON string but got `%s`", jsonObj.get("remove").toString())); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("add") != null && !jsonObj.get("add").isJsonNull()) { + JsonArray jsonArrayadd = jsonObj.getAsJsonArray("add"); + if (jsonArrayadd != null) { + // ensure the json data is an array + if (!jsonObj.get("add").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `add` to be an array in the JSON string but got `%s`", jsonObj.get("add").toString())); + } + + // validate the optional field `add` (array) + for (int i = 0; i < jsonArrayadd.size(); i++) { + GroupMember.validateJsonElement(jsonArrayadd.get(i)); + }; + } + } + if (jsonObj.get("remove") != null && !jsonObj.get("remove").isJsonNull()) { + JsonArray jsonArrayremove = jsonObj.getAsJsonArray("remove"); + if (jsonArrayremove != null) { + // ensure the json data is an array + if (!jsonObj.get("remove").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `remove` to be an array in the JSON string but got `%s`", jsonObj.get("remove").toString())); + } + + // validate the optional field `remove` (array) + for (int i = 0; i < jsonArrayremove.size(); i++) { + GroupMember.validateJsonElement(jsonArrayremove.get(i)); + }; } - - // validate the optional field `remove` (array) - for (int i = 0; i < jsonArrayremove.size(); i++) { - GroupMember.validateJsonObject(jsonArrayremove.get(i).getAsJsonObject()); - }; } } @@ -264,71 +240,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, GroupChanges value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 GroupChanges read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - GroupChanges 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GroupChanges given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupChanges - * @throws IOException if the JSON string is invalid with respect to GroupChanges - */ + /** + * Create an instance of GroupChanges given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupChanges + * @throws IOException if the JSON string is invalid with respect to GroupChanges + */ public static GroupChanges fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GroupChanges.class); } - /** - * Convert an instance of GroupChanges to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GroupChanges to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/GroupContentActivity.java b/src/main/java/io/tiledb/cloud/rest_api/model/GroupContentActivity.java new file mode 100644 index 0000000..2ec6998 --- /dev/null +++ b/src/main/java/io/tiledb/cloud/rest_api/model/GroupContentActivity.java @@ -0,0 +1,240 @@ +/* + * TileDB Storage Platform API + * TileDB Storage Platform REST API + * + * The version of the OpenAPI document: 2.17.51 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +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 org.openapitools.client.model.ArrayActivityLog; +import org.openapitools.client.model.GroupContentActivityAsset; + +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.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * Object containing activity of an asset of a group + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") +public class GroupContentActivity { + public static final String SERIALIZED_NAME_ASSET = "asset"; + @SerializedName(SERIALIZED_NAME_ASSET) + @javax.annotation.Nullable + private GroupContentActivityAsset asset; + + public static final String SERIALIZED_NAME_ACTIVITY_LOG = "activity_log"; + @SerializedName(SERIALIZED_NAME_ACTIVITY_LOG) + @javax.annotation.Nullable + private ArrayActivityLog activityLog; + + public GroupContentActivity() { + } + + public GroupContentActivity asset(@javax.annotation.Nullable GroupContentActivityAsset asset) { + this.asset = asset; + return this; + } + + /** + * Get asset + * @return asset + */ + @javax.annotation.Nullable + public GroupContentActivityAsset getAsset() { + return asset; + } + + public void setAsset(@javax.annotation.Nullable GroupContentActivityAsset asset) { + this.asset = asset; + } + + + public GroupContentActivity activityLog(@javax.annotation.Nullable ArrayActivityLog activityLog) { + this.activityLog = activityLog; + return this; + } + + /** + * Get activityLog + * @return activityLog + */ + @javax.annotation.Nullable + public ArrayActivityLog getActivityLog() { + return activityLog; + } + + public void setActivityLog(@javax.annotation.Nullable ArrayActivityLog activityLog) { + this.activityLog = activityLog; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GroupContentActivity groupContentActivity = (GroupContentActivity) o; + return Objects.equals(this.asset, groupContentActivity.asset) && + Objects.equals(this.activityLog, groupContentActivity.activityLog); + } + + @Override + public int hashCode() { + return Objects.hash(asset, activityLog); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GroupContentActivity {\n"); + sb.append(" asset: ").append(toIndentedString(asset)).append("\n"); + sb.append(" activityLog: ").append(toIndentedString(activityLog)).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("asset"); + openapiFields.add("activity_log"); + + // 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 GroupContentActivity + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupContentActivity.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GroupContentActivity is not found in the empty JSON string", GroupContentActivity.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupContentActivity.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupContentActivity` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `asset` + if (jsonObj.get("asset") != null && !jsonObj.get("asset").isJsonNull()) { + GroupContentActivityAsset.validateJsonElement(jsonObj.get("asset")); + } + // validate the optional field `activity_log` + if (jsonObj.get("activity_log") != null && !jsonObj.get("activity_log").isJsonNull()) { + ArrayActivityLog.validateJsonElement(jsonObj.get("activity_log")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GroupContentActivity.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GroupContentActivity' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GroupContentActivity.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GroupContentActivity value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GroupContentActivity read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GroupContentActivity given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupContentActivity + * @throws IOException if the JSON string is invalid with respect to GroupContentActivity + */ + public static GroupContentActivity fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GroupContentActivity.class); + } + + /** + * Convert an instance of GroupContentActivity to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/GroupContentActivityAsset.java b/src/main/java/io/tiledb/cloud/rest_api/model/GroupContentActivityAsset.java new file mode 100644 index 0000000..40eda06 --- /dev/null +++ b/src/main/java/io/tiledb/cloud/rest_api/model/GroupContentActivityAsset.java @@ -0,0 +1,298 @@ +/* + * TileDB Storage Platform API + * TileDB Storage Platform REST API + * + * The version of the OpenAPI document: 2.17.51 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +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 org.openapitools.client.model.AssetType; + +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.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * The asset details + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") +public class GroupContentActivityAsset { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; + @SerializedName(SERIALIZED_NAME_NAMESPACE) + @javax.annotation.Nullable + private String namespace; + + public static final String SERIALIZED_NAME_ASSET_TYPE = "asset_type"; + @SerializedName(SERIALIZED_NAME_ASSET_TYPE) + @javax.annotation.Nullable + private AssetType assetType; + + public GroupContentActivityAsset() { + } + + public GroupContentActivityAsset id(@javax.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * The asset ID + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nullable String id) { + this.id = id; + } + + + public GroupContentActivityAsset name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * The asset name + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public GroupContentActivityAsset namespace(@javax.annotation.Nullable String namespace) { + this.namespace = namespace; + return this; + } + + /** + * The namespace that the asset belongs to + * @return namespace + */ + @javax.annotation.Nullable + public String getNamespace() { + return namespace; + } + + public void setNamespace(@javax.annotation.Nullable String namespace) { + this.namespace = namespace; + } + + + public GroupContentActivityAsset assetType(@javax.annotation.Nullable AssetType assetType) { + this.assetType = assetType; + return this; + } + + /** + * Get assetType + * @return assetType + */ + @javax.annotation.Nullable + public AssetType getAssetType() { + return assetType; + } + + public void setAssetType(@javax.annotation.Nullable AssetType assetType) { + this.assetType = assetType; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GroupContentActivityAsset groupContentActivityAsset = (GroupContentActivityAsset) o; + return Objects.equals(this.id, groupContentActivityAsset.id) && + Objects.equals(this.name, groupContentActivityAsset.name) && + Objects.equals(this.namespace, groupContentActivityAsset.namespace) && + Objects.equals(this.assetType, groupContentActivityAsset.assetType); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, namespace, assetType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GroupContentActivityAsset {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); + sb.append(" assetType: ").append(toIndentedString(assetType)).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("name"); + openapiFields.add("namespace"); + openapiFields.add("asset_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 GroupContentActivityAsset + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupContentActivityAsset.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GroupContentActivityAsset is not found in the empty JSON string", GroupContentActivityAsset.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupContentActivityAsset.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupContentActivityAsset` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !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())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !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("namespace") != null && !jsonObj.get("namespace").isJsonNull()) && !jsonObj.get("namespace").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `namespace` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespace").toString())); + } + // validate the optional field `asset_type` + if (jsonObj.get("asset_type") != null && !jsonObj.get("asset_type").isJsonNull()) { + AssetType.validateJsonElement(jsonObj.get("asset_type")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GroupContentActivityAsset.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GroupContentActivityAsset' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GroupContentActivityAsset.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GroupContentActivityAsset value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GroupContentActivityAsset read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GroupContentActivityAsset given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupContentActivityAsset + * @throws IOException if the JSON string is invalid with respect to GroupContentActivityAsset + */ + public static GroupContentActivityAsset fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GroupContentActivityAsset.class); + } + + /** + * Convert an instance of GroupContentActivityAsset to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/GroupContentActivityResponse.java b/src/main/java/io/tiledb/cloud/rest_api/model/GroupContentActivityResponse.java new file mode 100644 index 0000000..83a9b33 --- /dev/null +++ b/src/main/java/io/tiledb/cloud/rest_api/model/GroupContentActivityResponse.java @@ -0,0 +1,260 @@ +/* + * TileDB Storage Platform API + * TileDB Storage Platform REST API + * + * The version of the OpenAPI document: 2.17.51 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +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 org.openapitools.client.model.GroupContentActivity; +import org.openapitools.client.model.PaginationMetadata; + +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.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * Object containing activity logs of group content along with the pagination metadata + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") +public class GroupContentActivityResponse { + public static final String SERIALIZED_NAME_ACTIVITY = "activity"; + @SerializedName(SERIALIZED_NAME_ACTIVITY) + @javax.annotation.Nullable + private List activity = new ArrayList<>(); + + public static final String SERIALIZED_NAME_PAGINATION_METADATA = "pagination_metadata"; + @SerializedName(SERIALIZED_NAME_PAGINATION_METADATA) + @javax.annotation.Nullable + private PaginationMetadata paginationMetadata; + + public GroupContentActivityResponse() { + } + + public GroupContentActivityResponse activity(@javax.annotation.Nullable List activity) { + this.activity = activity; + return this; + } + + public GroupContentActivityResponse addActivityItem(GroupContentActivity activityItem) { + if (this.activity == null) { + this.activity = new ArrayList<>(); + } + this.activity.add(activityItem); + return this; + } + + /** + * Activity of a group's content + * @return activity + */ + @javax.annotation.Nullable + public List getActivity() { + return activity; + } + + public void setActivity(@javax.annotation.Nullable List activity) { + this.activity = activity; + } + + + public GroupContentActivityResponse paginationMetadata(@javax.annotation.Nullable PaginationMetadata paginationMetadata) { + this.paginationMetadata = paginationMetadata; + return this; + } + + /** + * Get paginationMetadata + * @return paginationMetadata + */ + @javax.annotation.Nullable + public PaginationMetadata getPaginationMetadata() { + return paginationMetadata; + } + + public void setPaginationMetadata(@javax.annotation.Nullable PaginationMetadata paginationMetadata) { + this.paginationMetadata = paginationMetadata; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GroupContentActivityResponse groupContentActivityResponse = (GroupContentActivityResponse) o; + return Objects.equals(this.activity, groupContentActivityResponse.activity) && + Objects.equals(this.paginationMetadata, groupContentActivityResponse.paginationMetadata); + } + + @Override + public int hashCode() { + return Objects.hash(activity, paginationMetadata); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GroupContentActivityResponse {\n"); + sb.append(" activity: ").append(toIndentedString(activity)).append("\n"); + sb.append(" paginationMetadata: ").append(toIndentedString(paginationMetadata)).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("activity"); + openapiFields.add("pagination_metadata"); + + // 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 GroupContentActivityResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupContentActivityResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GroupContentActivityResponse is not found in the empty JSON string", GroupContentActivityResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupContentActivityResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupContentActivityResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("activity") != null && !jsonObj.get("activity").isJsonNull()) { + JsonArray jsonArrayactivity = jsonObj.getAsJsonArray("activity"); + if (jsonArrayactivity != null) { + // ensure the json data is an array + if (!jsonObj.get("activity").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `activity` to be an array in the JSON string but got `%s`", jsonObj.get("activity").toString())); + } + + // validate the optional field `activity` (array) + for (int i = 0; i < jsonArrayactivity.size(); i++) { + GroupContentActivity.validateJsonElement(jsonArrayactivity.get(i)); + }; + } + } + // validate the optional field `pagination_metadata` + if (jsonObj.get("pagination_metadata") != null && !jsonObj.get("pagination_metadata").isJsonNull()) { + PaginationMetadata.validateJsonElement(jsonObj.get("pagination_metadata")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GroupContentActivityResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GroupContentActivityResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GroupContentActivityResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GroupContentActivityResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GroupContentActivityResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GroupContentActivityResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupContentActivityResponse + * @throws IOException if the JSON string is invalid with respect to GroupContentActivityResponse + */ + public static GroupContentActivityResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GroupContentActivityResponse.class); + } + + /** + * Convert an instance of GroupContentActivityResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/GroupContents.java b/src/main/java/io/tiledb/cloud/rest_api/model/GroupContents.java index 8edd821..e912e68 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/GroupContents.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/GroupContents.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,52 +11,63 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.GroupEntry; +import org.openapitools.client.model.PaginationMetadata; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Object including a page of members of a group and pagination metadata */ -@ApiModel(description = "Object including a page of members of a group and pagination metadata") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class GroupContents { public static final String SERIALIZED_NAME_ENTRIES = "entries"; @SerializedName(SERIALIZED_NAME_ENTRIES) - private List entries = null; + @javax.annotation.Nullable + private List entries = new ArrayList<>(); public static final String SERIALIZED_NAME_PAGINATION_METADATA = "pagination_metadata"; @SerializedName(SERIALIZED_NAME_PAGINATION_METADATA) + @javax.annotation.Nullable private PaginationMetadata paginationMetadata; public GroupContents() { } - public GroupContents entries(List entries) { - + public GroupContents entries(@javax.annotation.Nullable List entries) { this.entries = entries; return this; } @@ -69,80 +80,38 @@ public GroupContents addEntriesItem(GroupEntry entriesItem) { return this; } - /** + /** * Groups members * @return entries - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Groups members") - public List getEntries() { return entries; } - - public void setEntries(List entries) { + public void setEntries(@javax.annotation.Nullable List entries) { this.entries = entries; } - public GroupContents paginationMetadata(PaginationMetadata paginationMetadata) { - + public GroupContents paginationMetadata(@javax.annotation.Nullable PaginationMetadata paginationMetadata) { this.paginationMetadata = paginationMetadata; return this; } - /** + /** * Get paginationMetadata * @return paginationMetadata - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public PaginationMetadata getPaginationMetadata() { return paginationMetadata; } - - public void setPaginationMetadata(PaginationMetadata paginationMetadata) { + public void setPaginationMetadata(@javax.annotation.Nullable PaginationMetadata paginationMetadata) { this.paginationMetadata = paginationMetadata; } - /** - * 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. - */ - public GroupContents 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -155,13 +124,12 @@ public boolean equals(Object o) { } GroupContents groupContents = (GroupContents) o; return Objects.equals(this.entries, groupContents.entries) && - Objects.equals(this.paginationMetadata, groupContents.paginationMetadata)&& - Objects.equals(this.additionalProperties, groupContents.additionalProperties); + Objects.equals(this.paginationMetadata, groupContents.paginationMetadata); } @Override public int hashCode() { - return Objects.hash(entries, paginationMetadata, additionalProperties); + return Objects.hash(entries, paginationMetadata); } @Override @@ -170,7 +138,6 @@ public String toString() { sb.append("class GroupContents {\n"); sb.append(" entries: ").append(toIndentedString(entries)).append("\n"); sb.append(" paginationMetadata: ").append(toIndentedString(paginationMetadata)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -200,35 +167,44 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GroupContents - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (GroupContents.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 GroupContents + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupContents.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in GroupContents is not found in the empty JSON string", GroupContents.openapiRequiredFields.toString())); } } - JsonArray jsonArrayentries = jsonObj.getAsJsonArray("entries"); - if (jsonArrayentries != null) { - // ensure the json data is an array - if (!jsonObj.get("entries").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `entries` to be an array in the JSON string but got `%s`", jsonObj.get("entries").toString())); - } - // validate the optional field `entries` (array) - for (int i = 0; i < jsonArrayentries.size(); i++) { - GroupEntry.validateJsonObject(jsonArrayentries.get(i).getAsJsonObject()); - }; + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupContents.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupContents` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("entries") != null && !jsonObj.get("entries").isJsonNull()) { + JsonArray jsonArrayentries = jsonObj.getAsJsonArray("entries"); + if (jsonArrayentries != null) { + // ensure the json data is an array + if (!jsonObj.get("entries").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `entries` to be an array in the JSON string but got `%s`", jsonObj.get("entries").toString())); + } + + // validate the optional field `entries` (array) + for (int i = 0; i < jsonArrayentries.size(); i++) { + GroupEntry.validateJsonElement(jsonArrayentries.get(i)); + }; + } } // validate the optional field `pagination_metadata` if (jsonObj.get("pagination_metadata") != null && !jsonObj.get("pagination_metadata").isJsonNull()) { - PaginationMetadata.validateJsonObject(jsonObj.getAsJsonObject("pagination_metadata")); + PaginationMetadata.validateJsonElement(jsonObj.get("pagination_metadata")); } } @@ -247,71 +223,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, GroupContents value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 GroupContents read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - GroupContents 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GroupContents given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupContents - * @throws IOException if the JSON string is invalid with respect to GroupContents - */ + /** + * Create an instance of GroupContents given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupContents + * @throws IOException if the JSON string is invalid with respect to GroupContents + */ public static GroupContents fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GroupContents.class); } - /** - * Convert an instance of GroupContents to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GroupContents to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/GroupContentsFilterData.java b/src/main/java/io/tiledb/cloud/rest_api/model/GroupContentsFilterData.java index 2c2c072..9f9a670 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/GroupContentsFilterData.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/GroupContentsFilterData.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,47 +11,56 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Object with data to fill contents filter */ -@ApiModel(description = "Object with data to fill contents filter") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class GroupContentsFilterData { public static final String SERIALIZED_NAME_NAMESPACES = "namespaces"; @SerializedName(SERIALIZED_NAME_NAMESPACES) - private List namespaces = null; + @javax.annotation.Nullable + private List namespaces = new ArrayList<>(); public GroupContentsFilterData() { } - public GroupContentsFilterData namespaces(List namespaces) { - + public GroupContentsFilterData namespaces(@javax.annotation.Nullable List namespaces) { this.namespaces = namespaces; return this; } @@ -64,57 +73,19 @@ public GroupContentsFilterData addNamespacesItem(String namespacesItem) { return this; } - /** + /** * list of all unique namespaces to display * @return namespaces - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "list of all unique namespaces to display") - public List getNamespaces() { return namespaces; } - - public void setNamespaces(List namespaces) { + public void setNamespaces(@javax.annotation.Nullable List namespaces) { this.namespaces = namespaces; } - /** - * 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. - */ - public GroupContentsFilterData 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -126,13 +97,12 @@ public boolean equals(Object o) { return false; } GroupContentsFilterData groupContentsFilterData = (GroupContentsFilterData) o; - return Objects.equals(this.namespaces, groupContentsFilterData.namespaces)&& - Objects.equals(this.additionalProperties, groupContentsFilterData.additionalProperties); + return Objects.equals(this.namespaces, groupContentsFilterData.namespaces); } @Override public int hashCode() { - return Objects.hash(namespaces, additionalProperties); + return Objects.hash(namespaces); } @Override @@ -140,7 +110,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class GroupContentsFilterData {\n"); sb.append(" namespaces: ").append(toIndentedString(namespaces)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -169,22 +138,29 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GroupContentsFilterData - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (GroupContentsFilterData.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 GroupContentsFilterData + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupContentsFilterData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in GroupContentsFilterData is not found in the empty JSON string", GroupContentsFilterData.openapiRequiredFields.toString())); } } - // ensure the json data is an array - if ((jsonObj.get("namespaces") != null && !jsonObj.get("namespaces").isJsonNull()) && !jsonObj.get("namespaces").isJsonArray()) { + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupContentsFilterData.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupContentsFilterData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("namespaces") != null && !jsonObj.get("namespaces").isJsonNull() && !jsonObj.get("namespaces").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `namespaces` to be an array in the JSON string but got `%s`", jsonObj.get("namespaces").toString())); } } @@ -204,71 +180,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, GroupContentsFilterData value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 GroupContentsFilterData read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - GroupContentsFilterData 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GroupContentsFilterData given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupContentsFilterData - * @throws IOException if the JSON string is invalid with respect to GroupContentsFilterData - */ + /** + * Create an instance of GroupContentsFilterData given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupContentsFilterData + * @throws IOException if the JSON string is invalid with respect to GroupContentsFilterData + */ public static GroupContentsFilterData fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GroupContentsFilterData.class); } - /** - * Convert an instance of GroupContentsFilterData to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GroupContentsFilterData to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/GroupCreate.java b/src/main/java/io/tiledb/cloud/rest_api/model/GroupCreate.java index f10112b..9958b51 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/GroupCreate.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/GroupCreate.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,217 +11,210 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Initial attributes for the creation of a group. */ -@ApiModel(description = "Initial attributes for the creation of a group.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class GroupCreate { public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_PARENT = "parent"; @SerializedName(SERIALIZED_NAME_PARENT) + @javax.annotation.Nullable private String parent; public static final String SERIALIZED_NAME_URI = "uri"; @SerializedName(SERIALIZED_NAME_URI) + @javax.annotation.Nullable private String uri; public static final String SERIALIZED_NAME_LOGO = "logo"; @SerializedName(SERIALIZED_NAME_LOGO) + @javax.annotation.Nullable private String logo; public static final String SERIALIZED_NAME_ACCESS_CREDENTIALS_NAME = "access_credentials_name"; @SerializedName(SERIALIZED_NAME_ACCESS_CREDENTIALS_NAME) + @javax.annotation.Nullable private String accessCredentialsName; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; + @javax.annotation.Nullable + private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_LICENSE_ID = "license_id"; @SerializedName(SERIALIZED_NAME_LICENSE_ID) + @javax.annotation.Nullable private String licenseId; public static final String SERIALIZED_NAME_LICENSE_TEXT = "license_text"; @SerializedName(SERIALIZED_NAME_LICENSE_TEXT) + @javax.annotation.Nullable private String licenseText; public GroupCreate() { } - public GroupCreate description(String description) { - + public GroupCreate description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * A human readable description of the contents of the group. * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "A human readable description of the contents of the group.") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public GroupCreate name(String name) { - + public GroupCreate name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * The name of the group. If must be unique within the group. * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The name of the group. If must be unique within the group.") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public GroupCreate parent(String parent) { - + public GroupCreate parent(@javax.annotation.Nullable String parent) { this.parent = parent; return this; } - /** + /** * The unique name or id of the parent of the group. If empty, then the new group will be a top level group. * @return parent - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The unique name or id of the parent of the group. If empty, then the new group will be a top level group.") - public String getParent() { return parent; } - - public void setParent(String parent) { + public void setParent(@javax.annotation.Nullable String parent) { this.parent = parent; } - public GroupCreate uri(String uri) { - + public GroupCreate uri(@javax.annotation.Nullable String uri) { this.uri = uri; return this; } - /** + /** * uri of group. * @return uri - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "uri of group.") - public String getUri() { return uri; } - - public void setUri(String uri) { + public void setUri(@javax.annotation.Nullable String uri) { this.uri = uri; } - public GroupCreate logo(String logo) { - + public GroupCreate logo(@javax.annotation.Nullable String logo) { this.logo = logo; return this; } - /** + /** * logo (base64 encoded) for the group. Optional * @return logo - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "logo (base64 encoded) for the group. Optional") - public String getLogo() { return logo; } - - public void setLogo(String logo) { + public void setLogo(@javax.annotation.Nullable String logo) { this.logo = logo; } - public GroupCreate accessCredentialsName(String accessCredentialsName) { - + public GroupCreate accessCredentialsName(@javax.annotation.Nullable String accessCredentialsName) { this.accessCredentialsName = accessCredentialsName; return this; } - /** + /** * the name of the access credentials to use. if unset, the default credentials will be used. * @return accessCredentialsName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "the name of the access credentials to use. if unset, the default credentials will be used.") - public String getAccessCredentialsName() { return accessCredentialsName; } - - public void setAccessCredentialsName(String accessCredentialsName) { + public void setAccessCredentialsName(@javax.annotation.Nullable String accessCredentialsName) { this.accessCredentialsName = accessCredentialsName; } - public GroupCreate tags(List tags) { - + public GroupCreate tags(@javax.annotation.Nullable List tags) { this.tags = tags; return this; } @@ -234,103 +227,57 @@ public GroupCreate addTagsItem(String tagsItem) { return this; } - /** + /** * optional tags for groups. * @return tags - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "optional tags for groups.") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nullable List tags) { this.tags = tags; } - public GroupCreate licenseId(String licenseId) { - + public GroupCreate licenseId(@javax.annotation.Nullable String licenseId) { this.licenseId = licenseId; return this; } - /** + /** * License identifier from SPDX License List or Custom. * @return licenseId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "License identifier from SPDX License List or Custom.") - public String getLicenseId() { return licenseId; } - - public void setLicenseId(String licenseId) { + public void setLicenseId(@javax.annotation.Nullable String licenseId) { this.licenseId = licenseId; } - public GroupCreate licenseText(String licenseText) { - + public GroupCreate licenseText(@javax.annotation.Nullable String licenseText) { this.licenseText = licenseText; return this; } - /** + /** * License text * @return licenseText - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "License text") - public String getLicenseText() { return licenseText; } - - public void setLicenseText(String licenseText) { + public void setLicenseText(@javax.annotation.Nullable String licenseText) { this.licenseText = licenseText; } - /** - * 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. - */ - public GroupCreate 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -350,13 +297,12 @@ public boolean equals(Object o) { Objects.equals(this.accessCredentialsName, groupCreate.accessCredentialsName) && Objects.equals(this.tags, groupCreate.tags) && Objects.equals(this.licenseId, groupCreate.licenseId) && - Objects.equals(this.licenseText, groupCreate.licenseText)&& - Objects.equals(this.additionalProperties, groupCreate.additionalProperties); + Objects.equals(this.licenseText, groupCreate.licenseText); } @Override public int hashCode() { - return Objects.hash(description, name, parent, uri, logo, accessCredentialsName, tags, licenseId, licenseText, additionalProperties); + return Objects.hash(description, name, parent, uri, logo, accessCredentialsName, tags, licenseId, licenseText); } @Override @@ -372,7 +318,6 @@ public String toString() { sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" licenseId: ").append(toIndentedString(licenseId)).append("\n"); sb.append(" licenseText: ").append(toIndentedString(licenseText)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -409,20 +354,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GroupCreate - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (GroupCreate.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 GroupCreate + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupCreate.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in GroupCreate is not found in the empty JSON string", GroupCreate.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupCreate.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupCreate` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !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())); } @@ -441,8 +393,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("access_credentials_name") != null && !jsonObj.get("access_credentials_name").isJsonNull()) && !jsonObj.get("access_credentials_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `access_credentials_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("access_credentials_name").toString())); } - // ensure the json data is an array - if ((jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) && !jsonObj.get("tags").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if ((jsonObj.get("license_id") != null && !jsonObj.get("license_id").isJsonNull()) && !jsonObj.get("license_id").isJsonPrimitive()) { @@ -468,71 +420,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, GroupCreate value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 GroupCreate read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - GroupCreate 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GroupCreate given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupCreate - * @throws IOException if the JSON string is invalid with respect to GroupCreate - */ + /** + * Create an instance of GroupCreate given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupCreate + * @throws IOException if the JSON string is invalid with respect to GroupCreate + */ public static GroupCreate fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GroupCreate.class); } - /** - * Convert an instance of GroupCreate to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GroupCreate to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/GroupEntry.java b/src/main/java/io/tiledb/cloud/rest_api/model/GroupEntry.java index 9c9e8b3..3f46ffd 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/GroupEntry.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/GroupEntry.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,53 +11,65 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.ArrayInfo; +import org.openapitools.client.model.GroupInfo; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Object describing a single member of a group, which can be an array or a group */ -@ApiModel(description = "Object describing a single member of a group, which can be an array or a group") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class GroupEntry { public static final String SERIALIZED_NAME_MEMBER_ID = "member_id"; @SerializedName(SERIALIZED_NAME_MEMBER_ID) + @javax.annotation.Nullable private String memberId; public static final String SERIALIZED_NAME_GROUP = "group"; @SerializedName(SERIALIZED_NAME_GROUP) + @javax.annotation.Nullable private GroupInfo group; public static final String SERIALIZED_NAME_ARRAY = "array"; @SerializedName(SERIALIZED_NAME_ARRAY) + @javax.annotation.Nullable private ArrayInfo array; public GroupEntry() { } - public GroupEntry( String memberId ) { @@ -65,100 +77,54 @@ public GroupEntry( this.memberId = memberId; } - /** + /** * The unique member id for the entry * @return memberId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The unique member id for the entry") - public String getMemberId() { return memberId; } - - public GroupEntry group(GroupInfo group) { - + public GroupEntry group(@javax.annotation.Nullable GroupInfo group) { this.group = group; return this; } - /** + /** * Get group * @return group - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public GroupInfo getGroup() { return group; } - - public void setGroup(GroupInfo group) { + public void setGroup(@javax.annotation.Nullable GroupInfo group) { this.group = group; } - public GroupEntry array(ArrayInfo array) { - + public GroupEntry array(@javax.annotation.Nullable ArrayInfo array) { this.array = array; return this; } - /** + /** * Get array * @return array - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public ArrayInfo getArray() { return array; } - - public void setArray(ArrayInfo array) { + public void setArray(@javax.annotation.Nullable ArrayInfo array) { this.array = array; } - /** - * 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. - */ - public GroupEntry 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -172,13 +138,12 @@ public boolean equals(Object o) { GroupEntry groupEntry = (GroupEntry) o; return Objects.equals(this.memberId, groupEntry.memberId) && Objects.equals(this.group, groupEntry.group) && - Objects.equals(this.array, groupEntry.array)&& - Objects.equals(this.additionalProperties, groupEntry.additionalProperties); + Objects.equals(this.array, groupEntry.array); } @Override public int hashCode() { - return Objects.hash(memberId, group, array, additionalProperties); + return Objects.hash(memberId, group, array); } @Override @@ -188,7 +153,6 @@ public String toString() { sb.append(" memberId: ").append(toIndentedString(memberId)).append("\n"); sb.append(" group: ").append(toIndentedString(group)).append("\n"); sb.append(" array: ").append(toIndentedString(array)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -219,30 +183,37 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GroupEntry - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (GroupEntry.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 GroupEntry + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupEntry.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in GroupEntry is not found in the empty JSON string", GroupEntry.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupEntry.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupEntry` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("member_id") != null && !jsonObj.get("member_id").isJsonNull()) && !jsonObj.get("member_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `member_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("member_id").toString())); } // validate the optional field `group` if (jsonObj.get("group") != null && !jsonObj.get("group").isJsonNull()) { - GroupInfo.validateJsonObject(jsonObj.getAsJsonObject("group")); + GroupInfo.validateJsonElement(jsonObj.get("group")); } // validate the optional field `array` if (jsonObj.get("array") != null && !jsonObj.get("array").isJsonNull()) { - ArrayInfo.validateJsonObject(jsonObj.getAsJsonObject("array")); + ArrayInfo.validateJsonElement(jsonObj.get("array")); } } @@ -261,71 +232,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, GroupEntry value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 GroupEntry read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - GroupEntry 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GroupEntry given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupEntry - * @throws IOException if the JSON string is invalid with respect to GroupEntry - */ + /** + * Create an instance of GroupEntry given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupEntry + * @throws IOException if the JSON string is invalid with respect to GroupEntry + */ public static GroupEntry fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GroupEntry.class); } - /** - * Convert an instance of GroupEntry to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GroupEntry to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/GroupInfo.java b/src/main/java/io/tiledb/cloud/rest_api/model/GroupInfo.java index 13f5d45..f4c689b 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/GroupInfo.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/GroupInfo.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,352 +11,357 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; - -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.model.GroupActions; +import org.openapitools.client.model.GroupType; +import org.openapitools.client.model.MetadataStringifiedEntry; import org.openapitools.jackson.nullable.JsonNullable; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; /** * metadata of a group */ -@ApiModel(description = "metadata of a group") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class GroupInfo { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private String id; public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; @SerializedName(SERIALIZED_NAME_NAMESPACE) + @javax.annotation.Nullable private String namespace; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_URI = "uri"; @SerializedName(SERIALIZED_NAME_URI) + @javax.annotation.Nullable private String uri; public static final String SERIALIZED_NAME_TILEDB_URI = "tiledb_uri"; @SerializedName(SERIALIZED_NAME_TILEDB_URI) + @javax.annotation.Nullable private String tiledbUri; public static final String SERIALIZED_NAME_ASSET_COUNT = "asset_count"; @SerializedName(SERIALIZED_NAME_ASSET_COUNT) + @javax.annotation.Nullable private BigDecimal assetCount; public static final String SERIALIZED_NAME_GROUP_COUNT = "group_count"; @SerializedName(SERIALIZED_NAME_GROUP_COUNT) + @javax.annotation.Nullable private BigDecimal groupCount; public static final String SERIALIZED_NAME_SIZE = "size"; @SerializedName(SERIALIZED_NAME_SIZE) + @javax.annotation.Nullable private BigDecimal size; public static final String SERIALIZED_NAME_LAST_ACCESSED = "last_accessed"; @SerializedName(SERIALIZED_NAME_LAST_ACCESSED) + @javax.annotation.Nullable private OffsetDateTime lastAccessed; public static final String SERIALIZED_NAME_ALLOWED_ACTIONS = "allowed_actions"; @SerializedName(SERIALIZED_NAME_ALLOWED_ACTIONS) - private List allowedActions = null; + @javax.annotation.Nullable + private List allowedActions = new ArrayList<>(); public static final String SERIALIZED_NAME_GROUP_TYPE = "group_type"; @SerializedName(SERIALIZED_NAME_GROUP_TYPE) + @javax.annotation.Nullable private GroupType groupType; public static final String SERIALIZED_NAME_LOGO = "logo"; @SerializedName(SERIALIZED_NAME_LOGO) + @javax.annotation.Nullable private String logo; public static final String SERIALIZED_NAME_ACCESS_CREDENTIALS_NAME = "access_credentials_name"; @SerializedName(SERIALIZED_NAME_ACCESS_CREDENTIALS_NAME) + @javax.annotation.Nullable private String accessCredentialsName; public static final String SERIALIZED_NAME_SHARE_COUNT = "share_count"; @SerializedName(SERIALIZED_NAME_SHARE_COUNT) + @javax.annotation.Nullable private BigDecimal shareCount; public static final String SERIALIZED_NAME_PUBLIC_SHARE = "public_share"; @SerializedName(SERIALIZED_NAME_PUBLIC_SHARE) + @javax.annotation.Nullable private Boolean publicShare; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; + @javax.annotation.Nullable + private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_LICENSE_ID = "license_id"; @SerializedName(SERIALIZED_NAME_LICENSE_ID) + @javax.annotation.Nullable private String licenseId; public static final String SERIALIZED_NAME_LICENSE_TEXT = "license_text"; @SerializedName(SERIALIZED_NAME_LICENSE_TEXT) + @javax.annotation.Nullable private String licenseText; + public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; + @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable + private OffsetDateTime createdAt; + + public static final String SERIALIZED_NAME_CREATED_BY = "created_by"; + @SerializedName(SERIALIZED_NAME_CREATED_BY) + @javax.annotation.Nullable + private String createdBy; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nullable + private List metadata = new ArrayList<>(); + public GroupInfo() { } - public GroupInfo id(String id) { - + public GroupInfo id(@javax.annotation.Nullable String id) { this.id = id; return this; } - /** + /** * unique ID of registered group * @return id - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", value = "unique ID of registered group") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nullable String id) { this.id = id; } - public GroupInfo namespace(String namespace) { - + public GroupInfo namespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; return this; } - /** + /** * namespace group is in * @return namespace - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "user1", value = "namespace group is in") - public String getNamespace() { return namespace; } - - public void setNamespace(String namespace) { + public void setNamespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; } - public GroupInfo name(String name) { - + public GroupInfo name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * name of group * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "myarray1", value = "name of group") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public GroupInfo description(String description) { - + public GroupInfo description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * description of group * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "description of group") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public GroupInfo uri(String uri) { - + public GroupInfo uri(@javax.annotation.Nullable String uri) { this.uri = uri; return this; } - /** + /** * uri of group * @return uri - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "s3://bucket/asset", value = "uri of group") - public String getUri() { return uri; } - - public void setUri(String uri) { + public void setUri(@javax.annotation.Nullable String uri) { this.uri = uri; } - public GroupInfo tiledbUri(String tiledbUri) { - + public GroupInfo tiledbUri(@javax.annotation.Nullable String tiledbUri) { this.tiledbUri = tiledbUri; return this; } - /** + /** * uri for access through TileDB cloud * @return tiledbUri - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "uri for access through TileDB cloud") - public String getTiledbUri() { return tiledbUri; } - - public void setTiledbUri(String tiledbUri) { + public void setTiledbUri(@javax.annotation.Nullable String tiledbUri) { this.tiledbUri = tiledbUri; } - public GroupInfo assetCount(BigDecimal assetCount) { - + public GroupInfo assetCount(@javax.annotation.Nullable BigDecimal assetCount) { this.assetCount = assetCount; return this; } - /** + /** * A count of direct array members * @return assetCount - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "12.0", value = "A count of direct array members") - public BigDecimal getAssetCount() { return assetCount; } - - public void setAssetCount(BigDecimal assetCount) { + public void setAssetCount(@javax.annotation.Nullable BigDecimal assetCount) { this.assetCount = assetCount; } - public GroupInfo groupCount(BigDecimal groupCount) { - + public GroupInfo groupCount(@javax.annotation.Nullable BigDecimal groupCount) { this.groupCount = groupCount; return this; } - /** + /** * A count of direct group members * @return groupCount - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "4.0", value = "A count of direct group members") - public BigDecimal getGroupCount() { return groupCount; } - - public void setGroupCount(BigDecimal groupCount) { + public void setGroupCount(@javax.annotation.Nullable BigDecimal groupCount) { this.groupCount = groupCount; } - public GroupInfo size(BigDecimal size) { - + public GroupInfo size(@javax.annotation.Nullable BigDecimal size) { this.size = size; return this; } - /** + /** * A count of direct members. This is the sum of asset_count and group_count * @return size - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "16.0", value = "A count of direct members. This is the sum of asset_count and group_count") - public BigDecimal getSize() { return size; } - - public void setSize(BigDecimal size) { + public void setSize(@javax.annotation.Nullable BigDecimal size) { this.size = size; } - public GroupInfo lastAccessed(OffsetDateTime lastAccessed) { - + public GroupInfo lastAccessed(@javax.annotation.Nullable OffsetDateTime lastAccessed) { this.lastAccessed = lastAccessed; return this; } - /** + /** * Datetime groups was last accessed in UTC * @return lastAccessed - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Datetime groups was last accessed in UTC") - public OffsetDateTime getLastAccessed() { return lastAccessed; } - - public void setLastAccessed(OffsetDateTime lastAccessed) { + public void setLastAccessed(@javax.annotation.Nullable OffsetDateTime lastAccessed) { this.lastAccessed = lastAccessed; } - public GroupInfo allowedActions(List allowedActions) { - + public GroupInfo allowedActions(@javax.annotation.Nullable List allowedActions) { this.allowedActions = allowedActions; return this; } @@ -369,140 +374,116 @@ public GroupInfo addAllowedActionsItem(GroupActions allowedActionsItem) { return this; } - /** + /** * list of actions user is allowed to do on this group * @return allowedActions - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "list of actions user is allowed to do on this group") - public List getAllowedActions() { return allowedActions; } - - public void setAllowedActions(List allowedActions) { + public void setAllowedActions(@javax.annotation.Nullable List allowedActions) { this.allowedActions = allowedActions; } - public GroupInfo groupType(GroupType groupType) { - + public GroupInfo groupType(@javax.annotation.Nullable GroupType groupType) { this.groupType = groupType; return this; } - /** + /** * Get groupType * @return groupType - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public GroupType getGroupType() { return groupType; } - - public void setGroupType(GroupType groupType) { + public void setGroupType(@javax.annotation.Nullable GroupType groupType) { this.groupType = groupType; } - public GroupInfo logo(String logo) { - + public GroupInfo logo(@javax.annotation.Nullable String logo) { this.logo = logo; return this; } - /** + /** * logo (base64 encoded) for the gruop. Optional * @return logo - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "logo (base64 encoded) for the gruop. Optional") - public String getLogo() { return logo; } - - public void setLogo(String logo) { + public void setLogo(@javax.annotation.Nullable String logo) { this.logo = logo; } - public GroupInfo accessCredentialsName(String accessCredentialsName) { - + public GroupInfo accessCredentialsName(@javax.annotation.Nullable String accessCredentialsName) { this.accessCredentialsName = accessCredentialsName; return this; } - /** + /** * the name of the access credentials to use. if unset, the default credentials will be used * @return accessCredentialsName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "the name of the access credentials to use. if unset, the default credentials will be used") - public String getAccessCredentialsName() { return accessCredentialsName; } - - public void setAccessCredentialsName(String accessCredentialsName) { + public void setAccessCredentialsName(@javax.annotation.Nullable String accessCredentialsName) { this.accessCredentialsName = accessCredentialsName; } - public GroupInfo shareCount(BigDecimal shareCount) { - + public GroupInfo shareCount(@javax.annotation.Nullable BigDecimal shareCount) { this.shareCount = shareCount; return this; } - /** + /** * number of unique namespaces this group is shared with * @return shareCount - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "number of unique namespaces this group is shared with") - public BigDecimal getShareCount() { return shareCount; } - - public void setShareCount(BigDecimal shareCount) { + public void setShareCount(@javax.annotation.Nullable BigDecimal shareCount) { this.shareCount = shareCount; } - public GroupInfo publicShare(Boolean publicShare) { - + public GroupInfo publicShare(@javax.annotation.Nullable Boolean publicShare) { this.publicShare = publicShare; return this; } - /** + /** * Suggests if the group was shared to public by owner * @return publicShare - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "Suggests if the group was shared to public by owner") - public Boolean getPublicShare() { return publicShare; } - - public void setPublicShare(Boolean publicShare) { + public void setPublicShare(@javax.annotation.Nullable Boolean publicShare) { this.publicShare = publicShare; } - public GroupInfo tags(List tags) { - + public GroupInfo tags(@javax.annotation.Nullable List tags) { this.tags = tags; return this; } @@ -515,105 +496,124 @@ public GroupInfo addTagsItem(String tagsItem) { return this; } - /** + /** * optional tags for group * @return tags - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "optional tags for group") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nullable List tags) { this.tags = tags; } - public GroupInfo licenseId(String licenseId) { - + public GroupInfo licenseId(@javax.annotation.Nullable String licenseId) { this.licenseId = licenseId; return this; } - /** + /** * License identifier from SPDX License List or Custom * @return licenseId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "License identifier from SPDX License List or Custom") - public String getLicenseId() { return licenseId; } - - public void setLicenseId(String licenseId) { + public void setLicenseId(@javax.annotation.Nullable String licenseId) { this.licenseId = licenseId; } - public GroupInfo licenseText(String licenseText) { - + public GroupInfo licenseText(@javax.annotation.Nullable String licenseText) { this.licenseText = licenseText; return this; } - /** + /** * License text * @return licenseText - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "License text") - public String getLicenseText() { return licenseText; } - - public void setLicenseText(String licenseText) { + public void setLicenseText(@javax.annotation.Nullable String licenseText) { this.licenseText = licenseText; } + + public GroupInfo createdAt(@javax.annotation.Nullable OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. + * Datetime the group was registered with tiledb + * @return createdAt */ - private Map additionalProperties; + @javax.annotation.Nullable + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nullable OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public GroupInfo createdBy(@javax.annotation.Nullable String createdBy) { + this.createdBy = createdBy; + return this; + } /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. + * The username of the group's creator, if known. + * @return createdBy */ - public GroupInfo putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); + @javax.annotation.Nullable + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(@javax.annotation.Nullable String createdBy) { + this.createdBy = createdBy; + } + + + public GroupInfo metadata(@javax.annotation.Nullable List metadata) { + this.metadata = metadata; + return this; + } + + public GroupInfo addMetadataItem(MetadataStringifiedEntry metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); } - this.additionalProperties.put(key, value); + this.metadata.add(metadataItem); return this; } /** - * Return the additional (undeclared) property. + * Contains metadata of the group. **Note:** This property is included in the response only if the `with_metadata` query parameter is set to `true`. + * @return metadata */ - public Map getAdditionalProperties() { - return additionalProperties; + @javax.annotation.Nullable + public List getMetadata() { + return metadata; } - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); + public void setMetadata(@javax.annotation.Nullable List metadata) { + this.metadata = metadata; } + @Override public boolean equals(Object o) { if (this == o) { @@ -641,8 +641,10 @@ public boolean equals(Object o) { Objects.equals(this.publicShare, groupInfo.publicShare) && Objects.equals(this.tags, groupInfo.tags) && Objects.equals(this.licenseId, groupInfo.licenseId) && - Objects.equals(this.licenseText, groupInfo.licenseText)&& - Objects.equals(this.additionalProperties, groupInfo.additionalProperties); + Objects.equals(this.licenseText, groupInfo.licenseText) && + Objects.equals(this.createdAt, groupInfo.createdAt) && + Objects.equals(this.createdBy, groupInfo.createdBy) && + Objects.equals(this.metadata, groupInfo.metadata); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -651,7 +653,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, namespace, name, description, uri, tiledbUri, assetCount, groupCount, size, lastAccessed, allowedActions, groupType, logo, accessCredentialsName, shareCount, publicShare, tags, licenseId, licenseText, additionalProperties); + return Objects.hash(id, namespace, name, description, uri, tiledbUri, assetCount, groupCount, size, lastAccessed, allowedActions, groupType, logo, accessCredentialsName, shareCount, publicShare, tags, licenseId, licenseText, createdAt, createdBy, metadata); } private static int hashCodeNullable(JsonNullable a) { @@ -684,7 +686,9 @@ public String toString() { sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" licenseId: ").append(toIndentedString(licenseId)).append("\n"); sb.append(" licenseText: ").append(toIndentedString(licenseText)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); sb.append("}"); return sb.toString(); } @@ -726,25 +730,35 @@ private String toIndentedString(Object o) { openapiFields.add("tags"); openapiFields.add("license_id"); openapiFields.add("license_text"); + openapiFields.add("created_at"); + openapiFields.add("created_by"); + openapiFields.add("metadata"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GroupInfo - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (GroupInfo.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 GroupInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in GroupInfo is not found in the empty JSON string", GroupInfo.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !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())); } @@ -763,18 +777,22 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("tiledb_uri") != null && !jsonObj.get("tiledb_uri").isJsonNull()) && !jsonObj.get("tiledb_uri").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `tiledb_uri` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tiledb_uri").toString())); } - // ensure the json data is an array - if ((jsonObj.get("allowed_actions") != null && !jsonObj.get("allowed_actions").isJsonNull()) && !jsonObj.get("allowed_actions").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("allowed_actions") != null && !jsonObj.get("allowed_actions").isJsonNull() && !jsonObj.get("allowed_actions").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `allowed_actions` to be an array in the JSON string but got `%s`", jsonObj.get("allowed_actions").toString())); } + // validate the optional field `group_type` + if (jsonObj.get("group_type") != null && !jsonObj.get("group_type").isJsonNull()) { + GroupType.validateJsonElement(jsonObj.get("group_type")); + } if ((jsonObj.get("logo") != null && !jsonObj.get("logo").isJsonNull()) && !jsonObj.get("logo").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `logo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("logo").toString())); } if ((jsonObj.get("access_credentials_name") != null && !jsonObj.get("access_credentials_name").isJsonNull()) && !jsonObj.get("access_credentials_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `access_credentials_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("access_credentials_name").toString())); } - // ensure the json data is an array - if ((jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) && !jsonObj.get("tags").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if ((jsonObj.get("license_id") != null && !jsonObj.get("license_id").isJsonNull()) && !jsonObj.get("license_id").isJsonPrimitive()) { @@ -783,6 +801,23 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("license_text") != null && !jsonObj.get("license_text").isJsonNull()) && !jsonObj.get("license_text").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `license_text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("license_text").toString())); } + if ((jsonObj.get("created_by") != null && !jsonObj.get("created_by").isJsonNull()) && !jsonObj.get("created_by").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `created_by` to be a primitive type in the JSON string but got `%s`", jsonObj.get("created_by").toString())); + } + if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + if (jsonArraymetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata` to be an array in the JSON string but got `%s`", jsonObj.get("metadata").toString())); + } + + // validate the optional field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + MetadataStringifiedEntry.validateJsonElement(jsonArraymetadata.get(i)); + }; + } + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -800,71 +835,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, GroupInfo value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 GroupInfo read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - GroupInfo 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GroupInfo given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupInfo - * @throws IOException if the JSON string is invalid with respect to GroupInfo - */ + /** + * Create an instance of GroupInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupInfo + * @throws IOException if the JSON string is invalid with respect to GroupInfo + */ public static GroupInfo fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GroupInfo.class); } - /** - * Convert an instance of GroupInfo to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GroupInfo to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/GroupMember.java b/src/main/java/io/tiledb/cloud/rest_api/model/GroupMember.java index df2b9b1..19dea54 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/GroupMember.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/GroupMember.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,154 +11,120 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.GroupMemberType; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * A groups member, array or another groups, to add or remove from an existing group. */ -@ApiModel(description = "A groups member, array or another groups, to add or remove from an existing group.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class GroupMember { public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; @SerializedName(SERIALIZED_NAME_NAMESPACE) + @javax.annotation.Nullable private String namespace; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_MEMBER_TYPE = "member_type"; @SerializedName(SERIALIZED_NAME_MEMBER_TYPE) + @javax.annotation.Nullable private GroupMemberType memberType; public GroupMember() { } - public GroupMember namespace(String namespace) { - + public GroupMember namespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; return this; } - /** + /** * The namespace of the asset. * @return namespace - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The namespace of the asset.") - public String getNamespace() { return namespace; } - - public void setNamespace(String namespace) { + public void setNamespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; } - public GroupMember name(String name) { - + public GroupMember name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * The name or id of the asset. * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The name or id of the asset.") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public GroupMember memberType(GroupMemberType memberType) { - + public GroupMember memberType(@javax.annotation.Nullable GroupMemberType memberType) { this.memberType = memberType; return this; } - /** + /** * Get memberType * @return memberType - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public GroupMemberType getMemberType() { return memberType; } - - public void setMemberType(GroupMemberType memberType) { + public void setMemberType(@javax.annotation.Nullable GroupMemberType memberType) { this.memberType = memberType; } - /** - * 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. - */ - public GroupMember 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -172,13 +138,12 @@ public boolean equals(Object o) { GroupMember groupMember = (GroupMember) o; return Objects.equals(this.namespace, groupMember.namespace) && Objects.equals(this.name, groupMember.name) && - Objects.equals(this.memberType, groupMember.memberType)&& - Objects.equals(this.additionalProperties, groupMember.additionalProperties); + Objects.equals(this.memberType, groupMember.memberType); } @Override public int hashCode() { - return Objects.hash(namespace, name, memberType, additionalProperties); + return Objects.hash(namespace, name, memberType); } @Override @@ -188,7 +153,6 @@ public String toString() { sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" memberType: ").append(toIndentedString(memberType)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -219,26 +183,37 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GroupMember - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (GroupMember.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 GroupMember + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupMember.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in GroupMember is not found in the empty JSON string", GroupMember.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupMember.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupMember` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("namespace") != null && !jsonObj.get("namespace").isJsonNull()) && !jsonObj.get("namespace").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `namespace` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespace").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !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())); } + // validate the optional field `member_type` + if (jsonObj.get("member_type") != null && !jsonObj.get("member_type").isJsonNull()) { + GroupMemberType.validateJsonElement(jsonObj.get("member_type")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -256,71 +231,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, GroupMember value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 GroupMember read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - GroupMember 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GroupMember given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupMember - * @throws IOException if the JSON string is invalid with respect to GroupMember - */ + /** + * Create an instance of GroupMember given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupMember + * @throws IOException if the JSON string is invalid with respect to GroupMember + */ public static GroupMember fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GroupMember.class); } - /** - * Convert an instance of GroupMember to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GroupMember to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/GroupMemberAssetType.java b/src/main/java/io/tiledb/cloud/rest_api/model/GroupMemberAssetType.java index 079806a..57fbc37 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/GroupMemberAssetType.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/GroupMemberAssetType.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -89,5 +93,10 @@ public GroupMemberAssetType read(final JsonReader jsonReader) throws IOException return GroupMemberAssetType.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + GroupMemberAssetType.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/GroupMemberType.java b/src/main/java/io/tiledb/cloud/rest_api/model/GroupMemberType.java index 98fa6a5..3ead6c1 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/GroupMemberType.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/GroupMemberType.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -65,5 +69,10 @@ public GroupMemberType read(final JsonReader jsonReader) throws IOException { return GroupMemberType.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + GroupMemberType.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/GroupRegister.java b/src/main/java/io/tiledb/cloud/rest_api/model/GroupRegister.java index cb9e953..53b1c27 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/GroupRegister.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/GroupRegister.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,217 +11,210 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Initial attributes for the registration of a an existing group. */ -@ApiModel(description = "Initial attributes for the registration of a an existing group.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class GroupRegister { public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_PARENT = "parent"; @SerializedName(SERIALIZED_NAME_PARENT) + @javax.annotation.Nullable private String parent; public static final String SERIALIZED_NAME_URI = "uri"; @SerializedName(SERIALIZED_NAME_URI) + @javax.annotation.Nullable private String uri; public static final String SERIALIZED_NAME_LOGO = "logo"; @SerializedName(SERIALIZED_NAME_LOGO) + @javax.annotation.Nullable private String logo; public static final String SERIALIZED_NAME_ACCESS_CREDENTIALS_NAME = "access_credentials_name"; @SerializedName(SERIALIZED_NAME_ACCESS_CREDENTIALS_NAME) + @javax.annotation.Nullable private String accessCredentialsName; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; + @javax.annotation.Nullable + private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_LICENSE_ID = "license_id"; @SerializedName(SERIALIZED_NAME_LICENSE_ID) + @javax.annotation.Nullable private String licenseId; public static final String SERIALIZED_NAME_LICENSE_TEXT = "license_text"; @SerializedName(SERIALIZED_NAME_LICENSE_TEXT) + @javax.annotation.Nullable private String licenseText; public GroupRegister() { } - public GroupRegister description(String description) { - + public GroupRegister description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * A human readable description of the contents of the group. * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "A human readable description of the contents of the group.") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public GroupRegister name(String name) { - + public GroupRegister name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * The name of the group. If must be unique within the group. * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The name of the group. If must be unique within the group.") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public GroupRegister parent(String parent) { - + public GroupRegister parent(@javax.annotation.Nullable String parent) { this.parent = parent; return this; } - /** + /** * The unique name or id of the parent of the group. If empty, then the new group will be a top level group. * @return parent - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The unique name or id of the parent of the group. If empty, then the new group will be a top level group.") - public String getParent() { return parent; } - - public void setParent(String parent) { + public void setParent(@javax.annotation.Nullable String parent) { this.parent = parent; } - public GroupRegister uri(String uri) { - + public GroupRegister uri(@javax.annotation.Nullable String uri) { this.uri = uri; return this; } - /** + /** * uri of group. * @return uri - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "uri of group.") - public String getUri() { return uri; } - - public void setUri(String uri) { + public void setUri(@javax.annotation.Nullable String uri) { this.uri = uri; } - public GroupRegister logo(String logo) { - + public GroupRegister logo(@javax.annotation.Nullable String logo) { this.logo = logo; return this; } - /** + /** * logo (base64 encoded) for the group. Optional * @return logo - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "logo (base64 encoded) for the group. Optional") - public String getLogo() { return logo; } - - public void setLogo(String logo) { + public void setLogo(@javax.annotation.Nullable String logo) { this.logo = logo; } - public GroupRegister accessCredentialsName(String accessCredentialsName) { - + public GroupRegister accessCredentialsName(@javax.annotation.Nullable String accessCredentialsName) { this.accessCredentialsName = accessCredentialsName; return this; } - /** + /** * the name of the access credentials to use. if unset, the default credentials will be used. * @return accessCredentialsName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "the name of the access credentials to use. if unset, the default credentials will be used.") - public String getAccessCredentialsName() { return accessCredentialsName; } - - public void setAccessCredentialsName(String accessCredentialsName) { + public void setAccessCredentialsName(@javax.annotation.Nullable String accessCredentialsName) { this.accessCredentialsName = accessCredentialsName; } - public GroupRegister tags(List tags) { - + public GroupRegister tags(@javax.annotation.Nullable List tags) { this.tags = tags; return this; } @@ -234,103 +227,57 @@ public GroupRegister addTagsItem(String tagsItem) { return this; } - /** + /** * optional tags for groups. * @return tags - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "optional tags for groups.") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nullable List tags) { this.tags = tags; } - public GroupRegister licenseId(String licenseId) { - + public GroupRegister licenseId(@javax.annotation.Nullable String licenseId) { this.licenseId = licenseId; return this; } - /** + /** * License identifier from SPDX License List or Custom. * @return licenseId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "License identifier from SPDX License List or Custom.") - public String getLicenseId() { return licenseId; } - - public void setLicenseId(String licenseId) { + public void setLicenseId(@javax.annotation.Nullable String licenseId) { this.licenseId = licenseId; } - public GroupRegister licenseText(String licenseText) { - + public GroupRegister licenseText(@javax.annotation.Nullable String licenseText) { this.licenseText = licenseText; return this; } - /** + /** * License text * @return licenseText - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "License text") - public String getLicenseText() { return licenseText; } - - public void setLicenseText(String licenseText) { + public void setLicenseText(@javax.annotation.Nullable String licenseText) { this.licenseText = licenseText; } - /** - * 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. - */ - public GroupRegister 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -350,13 +297,12 @@ public boolean equals(Object o) { Objects.equals(this.accessCredentialsName, groupRegister.accessCredentialsName) && Objects.equals(this.tags, groupRegister.tags) && Objects.equals(this.licenseId, groupRegister.licenseId) && - Objects.equals(this.licenseText, groupRegister.licenseText)&& - Objects.equals(this.additionalProperties, groupRegister.additionalProperties); + Objects.equals(this.licenseText, groupRegister.licenseText); } @Override public int hashCode() { - return Objects.hash(description, name, parent, uri, logo, accessCredentialsName, tags, licenseId, licenseText, additionalProperties); + return Objects.hash(description, name, parent, uri, logo, accessCredentialsName, tags, licenseId, licenseText); } @Override @@ -372,7 +318,6 @@ public String toString() { sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" licenseId: ").append(toIndentedString(licenseId)).append("\n"); sb.append(" licenseText: ").append(toIndentedString(licenseText)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -409,20 +354,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GroupRegister - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (GroupRegister.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 GroupRegister + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupRegister.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in GroupRegister is not found in the empty JSON string", GroupRegister.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupRegister.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupRegister` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !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())); } @@ -441,8 +393,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("access_credentials_name") != null && !jsonObj.get("access_credentials_name").isJsonNull()) && !jsonObj.get("access_credentials_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `access_credentials_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("access_credentials_name").toString())); } - // ensure the json data is an array - if ((jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) && !jsonObj.get("tags").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if ((jsonObj.get("license_id") != null && !jsonObj.get("license_id").isJsonNull()) && !jsonObj.get("license_id").isJsonPrimitive()) { @@ -468,71 +420,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, GroupRegister value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 GroupRegister read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - GroupRegister 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GroupRegister given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupRegister - * @throws IOException if the JSON string is invalid with respect to GroupRegister - */ + /** + * Create an instance of GroupRegister given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupRegister + * @throws IOException if the JSON string is invalid with respect to GroupRegister + */ public static GroupRegister fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GroupRegister.class); } - /** - * Convert an instance of GroupRegister to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GroupRegister to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/GroupSharing.java b/src/main/java/io/tiledb/cloud/rest_api/model/GroupSharing.java index 731ac3a..549b43d 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/GroupSharing.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/GroupSharing.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,59 +11,73 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.ArrayActions; +import org.openapitools.client.model.GroupActions; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * sharing state of a group with a namespace */ -@ApiModel(description = "sharing state of a group with a namespace") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class GroupSharing { public static final String SERIALIZED_NAME_GROUP_ACTIONS = "group_actions"; @SerializedName(SERIALIZED_NAME_GROUP_ACTIONS) - private List groupActions = null; + @javax.annotation.Nullable + private List groupActions = new ArrayList<>(); public static final String SERIALIZED_NAME_ARRAY_ACTIONS = "array_actions"; @SerializedName(SERIALIZED_NAME_ARRAY_ACTIONS) - private List arrayActions = null; + @javax.annotation.Nullable + private List arrayActions = new ArrayList<>(); public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; @SerializedName(SERIALIZED_NAME_NAMESPACE) + @javax.annotation.Nullable private String namespace; public static final String SERIALIZED_NAME_NAMESPACE_TYPE = "namespace_type"; @SerializedName(SERIALIZED_NAME_NAMESPACE_TYPE) + @javax.annotation.Nullable private String namespaceType; public GroupSharing() { } - public GroupSharing groupActions(List groupActions) { - + public GroupSharing groupActions(@javax.annotation.Nullable List groupActions) { this.groupActions = groupActions; return this; } @@ -76,25 +90,21 @@ public GroupSharing addGroupActionsItem(GroupActions groupActionsItem) { return this; } - /** + /** * List of permitted actions for the group and all subgroups * @return groupActions - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "[read, write]", value = "List of permitted actions for the group and all subgroups") - public List getGroupActions() { return groupActions; } - - public void setGroupActions(List groupActions) { + public void setGroupActions(@javax.annotation.Nullable List groupActions) { this.groupActions = groupActions; } - public GroupSharing arrayActions(List arrayActions) { - + public GroupSharing arrayActions(@javax.annotation.Nullable List arrayActions) { this.arrayActions = arrayActions; return this; } @@ -107,103 +117,57 @@ public GroupSharing addArrayActionsItem(ArrayActions arrayActionsItem) { return this; } - /** + /** * List of permitted actions for all the subarrays of the group * @return arrayActions - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "[read, write]", value = "List of permitted actions for all the subarrays of the group") - public List getArrayActions() { return arrayActions; } - - public void setArrayActions(List arrayActions) { + public void setArrayActions(@javax.annotation.Nullable List arrayActions) { this.arrayActions = arrayActions; } - public GroupSharing namespace(String namespace) { - + public GroupSharing namespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; return this; } - /** + /** * namespace being granted group access can be a user or organization * @return namespace - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "MyOrganization", value = "namespace being granted group access can be a user or organization") - public String getNamespace() { return namespace; } - - public void setNamespace(String namespace) { + public void setNamespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; } - public GroupSharing namespaceType(String namespaceType) { - + public GroupSharing namespaceType(@javax.annotation.Nullable String namespaceType) { this.namespaceType = namespaceType; return this; } - /** + /** * details on if the namespace is a organization or user * @return namespaceType - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "organization", value = "details on if the namespace is a organization or user") - public String getNamespaceType() { return namespaceType; } - - public void setNamespaceType(String namespaceType) { + public void setNamespaceType(@javax.annotation.Nullable String namespaceType) { this.namespaceType = namespaceType; } - /** - * 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. - */ - public GroupSharing 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -218,13 +182,12 @@ public boolean equals(Object o) { return Objects.equals(this.groupActions, groupSharing.groupActions) && Objects.equals(this.arrayActions, groupSharing.arrayActions) && Objects.equals(this.namespace, groupSharing.namespace) && - Objects.equals(this.namespaceType, groupSharing.namespaceType)&& - Objects.equals(this.additionalProperties, groupSharing.additionalProperties); + Objects.equals(this.namespaceType, groupSharing.namespaceType); } @Override public int hashCode() { - return Objects.hash(groupActions, arrayActions, namespace, namespaceType, additionalProperties); + return Objects.hash(groupActions, arrayActions, namespace, namespaceType); } @Override @@ -235,7 +198,6 @@ public String toString() { sb.append(" arrayActions: ").append(toIndentedString(arrayActions)).append("\n"); sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); sb.append(" namespaceType: ").append(toIndentedString(namespaceType)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -267,26 +229,33 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GroupSharing - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (GroupSharing.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 GroupSharing + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupSharing.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in GroupSharing is not found in the empty JSON string", GroupSharing.openapiRequiredFields.toString())); } } - // ensure the json data is an array - if ((jsonObj.get("group_actions") != null && !jsonObj.get("group_actions").isJsonNull()) && !jsonObj.get("group_actions").isJsonArray()) { + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupSharing.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupSharing` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("group_actions") != null && !jsonObj.get("group_actions").isJsonNull() && !jsonObj.get("group_actions").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `group_actions` to be an array in the JSON string but got `%s`", jsonObj.get("group_actions").toString())); } - // ensure the json data is an array - if ((jsonObj.get("array_actions") != null && !jsonObj.get("array_actions").isJsonNull()) && !jsonObj.get("array_actions").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("array_actions") != null && !jsonObj.get("array_actions").isJsonNull() && !jsonObj.get("array_actions").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `array_actions` to be an array in the JSON string but got `%s`", jsonObj.get("array_actions").toString())); } if ((jsonObj.get("namespace") != null && !jsonObj.get("namespace").isJsonNull()) && !jsonObj.get("namespace").isJsonPrimitive()) { @@ -312,71 +281,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, GroupSharing value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 GroupSharing read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - GroupSharing 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GroupSharing given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupSharing - * @throws IOException if the JSON string is invalid with respect to GroupSharing - */ + /** + * Create an instance of GroupSharing given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupSharing + * @throws IOException if the JSON string is invalid with respect to GroupSharing + */ public static GroupSharing fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GroupSharing.class); } - /** - * Convert an instance of GroupSharing to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GroupSharing to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/GroupSharingRequest.java b/src/main/java/io/tiledb/cloud/rest_api/model/GroupSharingRequest.java index c5b8d56..cacadcb 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/GroupSharingRequest.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/GroupSharingRequest.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,55 +11,68 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.ArrayActions; +import org.openapitools.client.model.GroupActions; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * a request to share a group and all the contents with a namespace */ -@ApiModel(description = "a request to share a group and all the contents with a namespace") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class GroupSharingRequest { public static final String SERIALIZED_NAME_GROUP_ACTIONS = "group_actions"; @SerializedName(SERIALIZED_NAME_GROUP_ACTIONS) - private List groupActions = null; + @javax.annotation.Nullable + private List groupActions = new ArrayList<>(); public static final String SERIALIZED_NAME_ARRAY_ACTIONS = "array_actions"; @SerializedName(SERIALIZED_NAME_ARRAY_ACTIONS) - private List arrayActions = null; + @javax.annotation.Nullable + private List arrayActions = new ArrayList<>(); public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; @SerializedName(SERIALIZED_NAME_NAMESPACE) + @javax.annotation.Nullable private String namespace; public GroupSharingRequest() { } - public GroupSharingRequest groupActions(List groupActions) { - + public GroupSharingRequest groupActions(@javax.annotation.Nullable List groupActions) { this.groupActions = groupActions; return this; } @@ -72,25 +85,21 @@ public GroupSharingRequest addGroupActionsItem(GroupActions groupActionsItem) { return this; } - /** + /** * List of permitted actions for the group and all subgroups * @return groupActions - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "[read, write]", value = "List of permitted actions for the group and all subgroups") - public List getGroupActions() { return groupActions; } - - public void setGroupActions(List groupActions) { + public void setGroupActions(@javax.annotation.Nullable List groupActions) { this.groupActions = groupActions; } - public GroupSharingRequest arrayActions(List arrayActions) { - + public GroupSharingRequest arrayActions(@javax.annotation.Nullable List arrayActions) { this.arrayActions = arrayActions; return this; } @@ -103,80 +112,38 @@ public GroupSharingRequest addArrayActionsItem(ArrayActions arrayActionsItem) { return this; } - /** + /** * List of permitted actions for all the subarrays of the group * @return arrayActions - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "[read, write]", value = "List of permitted actions for all the subarrays of the group") - public List getArrayActions() { return arrayActions; } - - public void setArrayActions(List arrayActions) { + public void setArrayActions(@javax.annotation.Nullable List arrayActions) { this.arrayActions = arrayActions; } - public GroupSharingRequest namespace(String namespace) { - + public GroupSharingRequest namespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; return this; } - /** + /** * namespace being granted group access can be a user or organization * @return namespace - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "MyOrganization", value = "namespace being granted group access can be a user or organization") - public String getNamespace() { return namespace; } - - public void setNamespace(String namespace) { + public void setNamespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; } - /** - * 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. - */ - public GroupSharingRequest 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -190,13 +157,12 @@ public boolean equals(Object o) { GroupSharingRequest groupSharingRequest = (GroupSharingRequest) o; return Objects.equals(this.groupActions, groupSharingRequest.groupActions) && Objects.equals(this.arrayActions, groupSharingRequest.arrayActions) && - Objects.equals(this.namespace, groupSharingRequest.namespace)&& - Objects.equals(this.additionalProperties, groupSharingRequest.additionalProperties); + Objects.equals(this.namespace, groupSharingRequest.namespace); } @Override public int hashCode() { - return Objects.hash(groupActions, arrayActions, namespace, additionalProperties); + return Objects.hash(groupActions, arrayActions, namespace); } @Override @@ -206,7 +172,6 @@ public String toString() { sb.append(" groupActions: ").append(toIndentedString(groupActions)).append("\n"); sb.append(" arrayActions: ").append(toIndentedString(arrayActions)).append("\n"); sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -237,26 +202,33 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GroupSharingRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (GroupSharingRequest.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 GroupSharingRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupSharingRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in GroupSharingRequest is not found in the empty JSON string", GroupSharingRequest.openapiRequiredFields.toString())); } } - // ensure the json data is an array - if ((jsonObj.get("group_actions") != null && !jsonObj.get("group_actions").isJsonNull()) && !jsonObj.get("group_actions").isJsonArray()) { + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupSharingRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupSharingRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("group_actions") != null && !jsonObj.get("group_actions").isJsonNull() && !jsonObj.get("group_actions").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `group_actions` to be an array in the JSON string but got `%s`", jsonObj.get("group_actions").toString())); } - // ensure the json data is an array - if ((jsonObj.get("array_actions") != null && !jsonObj.get("array_actions").isJsonNull()) && !jsonObj.get("array_actions").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("array_actions") != null && !jsonObj.get("array_actions").isJsonNull() && !jsonObj.get("array_actions").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `array_actions` to be an array in the JSON string but got `%s`", jsonObj.get("array_actions").toString())); } if ((jsonObj.get("namespace") != null && !jsonObj.get("namespace").isJsonNull()) && !jsonObj.get("namespace").isJsonPrimitive()) { @@ -279,71 +251,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, GroupSharingRequest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 GroupSharingRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - GroupSharingRequest 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GroupSharingRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupSharingRequest - * @throws IOException if the JSON string is invalid with respect to GroupSharingRequest - */ + /** + * Create an instance of GroupSharingRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupSharingRequest + * @throws IOException if the JSON string is invalid with respect to GroupSharingRequest + */ public static GroupSharingRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GroupSharingRequest.class); } - /** - * Convert an instance of GroupSharingRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GroupSharingRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/GroupType.java b/src/main/java/io/tiledb/cloud/rest_api/model/GroupType.java index 42869a4..393b205 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/GroupType.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/GroupType.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -77,5 +81,10 @@ public GroupType read(final JsonReader jsonReader) throws IOException { return GroupType.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + GroupType.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/GroupTypeMetadataKey.java b/src/main/java/io/tiledb/cloud/rest_api/model/GroupTypeMetadataKey.java index 9ddc9e0..3de7c74 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/GroupTypeMetadataKey.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/GroupTypeMetadataKey.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -63,5 +67,10 @@ public GroupTypeMetadataKey read(final JsonReader jsonReader) throws IOException return GroupTypeMetadataKey.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + GroupTypeMetadataKey.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/GroupUpdate.java b/src/main/java/io/tiledb/cloud/rest_api/model/GroupUpdate.java index 1b4c4a1..94a7681 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/GroupUpdate.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/GroupUpdate.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,165 +11,163 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Updates for a group. New values for the attributes. */ -@ApiModel(description = "Updates for a group. New values for the attributes.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class GroupUpdate { public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_LOGO = "logo"; @SerializedName(SERIALIZED_NAME_LOGO) + @javax.annotation.Nullable private String logo; public static final String SERIALIZED_NAME_ACCESS_CREDENTIALS_NAME = "access_credentials_name"; @SerializedName(SERIALIZED_NAME_ACCESS_CREDENTIALS_NAME) + @javax.annotation.Nullable private String accessCredentialsName; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; + @javax.annotation.Nullable + private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_LICENSE_ID = "license_id"; @SerializedName(SERIALIZED_NAME_LICENSE_ID) + @javax.annotation.Nullable private String licenseId; public static final String SERIALIZED_NAME_LICENSE_TEXT = "license_text"; @SerializedName(SERIALIZED_NAME_LICENSE_TEXT) + @javax.annotation.Nullable private String licenseText; public GroupUpdate() { } - public GroupUpdate description(String description) { - + public GroupUpdate description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * A human readable description of the content of the group * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "A human readable description of the content of the group") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public GroupUpdate name(String name) { - + public GroupUpdate name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * The name of the group. If must be unique within the group. * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The name of the group. If must be unique within the group.") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public GroupUpdate logo(String logo) { - + public GroupUpdate logo(@javax.annotation.Nullable String logo) { this.logo = logo; return this; } - /** + /** * logo (base64 encoded) for the group. Optional * @return logo - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "logo (base64 encoded) for the group. Optional") - public String getLogo() { return logo; } - - public void setLogo(String logo) { + public void setLogo(@javax.annotation.Nullable String logo) { this.logo = logo; } - public GroupUpdate accessCredentialsName(String accessCredentialsName) { - + public GroupUpdate accessCredentialsName(@javax.annotation.Nullable String accessCredentialsName) { this.accessCredentialsName = accessCredentialsName; return this; } - /** + /** * the name of the access credentials to use. if unset, the default credentials will be used * @return accessCredentialsName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "the name of the access credentials to use. if unset, the default credentials will be used") - public String getAccessCredentialsName() { return accessCredentialsName; } - - public void setAccessCredentialsName(String accessCredentialsName) { + public void setAccessCredentialsName(@javax.annotation.Nullable String accessCredentialsName) { this.accessCredentialsName = accessCredentialsName; } - public GroupUpdate tags(List tags) { - + public GroupUpdate tags(@javax.annotation.Nullable List tags) { this.tags = tags; return this; } @@ -182,103 +180,57 @@ public GroupUpdate addTagsItem(String tagsItem) { return this; } - /** + /** * optional tags for groups * @return tags - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "optional tags for groups") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nullable List tags) { this.tags = tags; } - public GroupUpdate licenseId(String licenseId) { - + public GroupUpdate licenseId(@javax.annotation.Nullable String licenseId) { this.licenseId = licenseId; return this; } - /** + /** * License identifier from SPDX License List or Custom * @return licenseId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "License identifier from SPDX License List or Custom") - public String getLicenseId() { return licenseId; } - - public void setLicenseId(String licenseId) { + public void setLicenseId(@javax.annotation.Nullable String licenseId) { this.licenseId = licenseId; } - public GroupUpdate licenseText(String licenseText) { - + public GroupUpdate licenseText(@javax.annotation.Nullable String licenseText) { this.licenseText = licenseText; return this; } - /** + /** * License text * @return licenseText - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "License text") - public String getLicenseText() { return licenseText; } - - public void setLicenseText(String licenseText) { + public void setLicenseText(@javax.annotation.Nullable String licenseText) { this.licenseText = licenseText; } - /** - * 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. - */ - public GroupUpdate 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -296,8 +248,7 @@ public boolean equals(Object o) { Objects.equals(this.accessCredentialsName, groupUpdate.accessCredentialsName) && Objects.equals(this.tags, groupUpdate.tags) && Objects.equals(this.licenseId, groupUpdate.licenseId) && - Objects.equals(this.licenseText, groupUpdate.licenseText)&& - Objects.equals(this.additionalProperties, groupUpdate.additionalProperties); + Objects.equals(this.licenseText, groupUpdate.licenseText); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -306,7 +257,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(description, name, logo, accessCredentialsName, tags, licenseId, licenseText, additionalProperties); + return Objects.hash(description, name, logo, accessCredentialsName, tags, licenseId, licenseText); } private static int hashCodeNullable(JsonNullable a) { @@ -327,7 +278,6 @@ public String toString() { sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" licenseId: ").append(toIndentedString(licenseId)).append("\n"); sb.append(" licenseText: ").append(toIndentedString(licenseText)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -362,20 +312,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GroupUpdate - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (GroupUpdate.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 GroupUpdate + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupUpdate.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in GroupUpdate is not found in the empty JSON string", GroupUpdate.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupUpdate.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupUpdate` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !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())); } @@ -388,8 +345,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("access_credentials_name") != null && !jsonObj.get("access_credentials_name").isJsonNull()) && !jsonObj.get("access_credentials_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `access_credentials_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("access_credentials_name").toString())); } - // ensure the json data is an array - if ((jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) && !jsonObj.get("tags").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if ((jsonObj.get("license_id") != null && !jsonObj.get("license_id").isJsonNull()) && !jsonObj.get("license_id").isJsonPrimitive()) { @@ -415,71 +372,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, GroupUpdate value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 GroupUpdate read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - GroupUpdate 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GroupUpdate given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupUpdate - * @throws IOException if the JSON string is invalid with respect to GroupUpdate - */ + /** + * Create an instance of GroupUpdate given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupUpdate + * @throws IOException if the JSON string is invalid with respect to GroupUpdate + */ public static GroupUpdate fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GroupUpdate.class); } - /** - * Convert an instance of GroupUpdate to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GroupUpdate to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/Invitation.java b/src/main/java/io/tiledb/cloud/rest_api/model/Invitation.java index 84e3a0e..ef1156b 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/Invitation.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/Invitation.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,614 +11,531 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; +import org.openapitools.client.model.InvitationStatus; +import org.openapitools.client.model.InvitationType; +import org.openapitools.client.model.OrganizationRoles; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Invitations to share or collaborate */ -@ApiModel(description = "Invitations to share or collaborate") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class Invitation { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private String id; public static final String SERIALIZED_NAME_INVITATION_TYPE = "invitation_type"; @SerializedName(SERIALIZED_NAME_INVITATION_TYPE) + @javax.annotation.Nullable private InvitationType invitationType; public static final String SERIALIZED_NAME_OWNER_NAMESPACE_UUID = "owner_namespace_uuid"; @SerializedName(SERIALIZED_NAME_OWNER_NAMESPACE_UUID) + @javax.annotation.Nullable private String ownerNamespaceUuid; public static final String SERIALIZED_NAME_INVITER_UUID = "inviter_uuid"; @SerializedName(SERIALIZED_NAME_INVITER_UUID) + @javax.annotation.Nullable private String inviterUuid; public static final String SERIALIZED_NAME_USER_NAMESPACE_UUID = "user_namespace_uuid"; @SerializedName(SERIALIZED_NAME_USER_NAMESPACE_UUID) + @javax.annotation.Nullable private String userNamespaceUuid; public static final String SERIALIZED_NAME_ORGANIZATION_USER_UUID = "organization_user_uuid"; @SerializedName(SERIALIZED_NAME_ORGANIZATION_USER_UUID) + @javax.annotation.Nullable private String organizationUserUuid; public static final String SERIALIZED_NAME_ORGANIZATION_NAME = "organization_name"; @SerializedName(SERIALIZED_NAME_ORGANIZATION_NAME) + @javax.annotation.Nullable private String organizationName; public static final String SERIALIZED_NAME_ORGANIZATION_ROLE = "organization_role"; @SerializedName(SERIALIZED_NAME_ORGANIZATION_ROLE) + @javax.annotation.Nullable private OrganizationRoles organizationRole; public static final String SERIALIZED_NAME_ORGANIZATION_UUID = "organization_uuid"; @SerializedName(SERIALIZED_NAME_ORGANIZATION_UUID) + @javax.annotation.Nullable private String organizationUuid; public static final String SERIALIZED_NAME_ARRAY_UUID = "array_uuid"; @SerializedName(SERIALIZED_NAME_ARRAY_UUID) + @javax.annotation.Nullable private String arrayUuid; public static final String SERIALIZED_NAME_GROUP_UUID = "group_uuid"; @SerializedName(SERIALIZED_NAME_GROUP_UUID) + @javax.annotation.Nullable private String groupUuid; public static final String SERIALIZED_NAME_ARRAY_NAME = "array_name"; @SerializedName(SERIALIZED_NAME_ARRAY_NAME) + @javax.annotation.Nullable private String arrayName; public static final String SERIALIZED_NAME_EMAIL = "email"; @SerializedName(SERIALIZED_NAME_EMAIL) + @javax.annotation.Nullable private String email; public static final String SERIALIZED_NAME_ACTIONS = "actions"; @SerializedName(SERIALIZED_NAME_ACTIONS) + @javax.annotation.Nullable private String actions; public static final String SERIALIZED_NAME_GROUP_ACTIONS = "group_actions"; @SerializedName(SERIALIZED_NAME_GROUP_ACTIONS) + @javax.annotation.Nullable private String groupActions; public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable private InvitationStatus status; public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_EXPIRES_AT = "expires_at"; @SerializedName(SERIALIZED_NAME_EXPIRES_AT) + @javax.annotation.Nullable private OffsetDateTime expiresAt; public static final String SERIALIZED_NAME_ACCEPTED_AT = "accepted_at"; @SerializedName(SERIALIZED_NAME_ACCEPTED_AT) + @javax.annotation.Nullable private OffsetDateTime acceptedAt; public static final String SERIALIZED_NAME_NAMESPACE_INVITED = "namespace_invited"; @SerializedName(SERIALIZED_NAME_NAMESPACE_INVITED) + @javax.annotation.Nullable private String namespaceInvited; public Invitation() { } - public Invitation id(String id) { - + public Invitation id(@javax.annotation.Nullable String id) { this.id = id; return this; } - /** + /** * Unique ID of invitation added to magic link * @return id - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", value = "Unique ID of invitation added to magic link") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nullable String id) { this.id = id; } - public Invitation invitationType(InvitationType invitationType) { - + public Invitation invitationType(@javax.annotation.Nullable InvitationType invitationType) { this.invitationType = invitationType; return this; } - /** + /** * Get invitationType * @return invitationType - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public InvitationType getInvitationType() { return invitationType; } - - public void setInvitationType(InvitationType invitationType) { + public void setInvitationType(@javax.annotation.Nullable InvitationType invitationType) { this.invitationType = invitationType; } - public Invitation ownerNamespaceUuid(String ownerNamespaceUuid) { - + public Invitation ownerNamespaceUuid(@javax.annotation.Nullable String ownerNamespaceUuid) { this.ownerNamespaceUuid = ownerNamespaceUuid; return this; } - /** + /** * Namespace of the owner of the invitation (user or organization) * @return ownerNamespaceUuid - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", value = "Namespace of the owner of the invitation (user or organization)") - public String getOwnerNamespaceUuid() { return ownerNamespaceUuid; } - - public void setOwnerNamespaceUuid(String ownerNamespaceUuid) { + public void setOwnerNamespaceUuid(@javax.annotation.Nullable String ownerNamespaceUuid) { this.ownerNamespaceUuid = ownerNamespaceUuid; } - public Invitation inviterUuid(String inviterUuid) { - + public Invitation inviterUuid(@javax.annotation.Nullable String inviterUuid) { this.inviterUuid = inviterUuid; return this; } - /** + /** * Unique ID of the user that sent the invitation * @return inviterUuid - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", value = "Unique ID of the user that sent the invitation") - public String getInviterUuid() { return inviterUuid; } - - public void setInviterUuid(String inviterUuid) { + public void setInviterUuid(@javax.annotation.Nullable String inviterUuid) { this.inviterUuid = inviterUuid; } - public Invitation userNamespaceUuid(String userNamespaceUuid) { - + public Invitation userNamespaceUuid(@javax.annotation.Nullable String userNamespaceUuid) { this.userNamespaceUuid = userNamespaceUuid; return this; } - /** + /** * Unique ID of the user accepted the invitation * @return userNamespaceUuid - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", value = "Unique ID of the user accepted the invitation") - public String getUserNamespaceUuid() { return userNamespaceUuid; } - - public void setUserNamespaceUuid(String userNamespaceUuid) { + public void setUserNamespaceUuid(@javax.annotation.Nullable String userNamespaceUuid) { this.userNamespaceUuid = userNamespaceUuid; } - public Invitation organizationUserUuid(String organizationUserUuid) { - + public Invitation organizationUserUuid(@javax.annotation.Nullable String organizationUserUuid) { this.organizationUserUuid = organizationUserUuid; return this; } - /** + /** * Unique ID of the organization user accepted the invitation * @return organizationUserUuid - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", value = "Unique ID of the organization user accepted the invitation") - public String getOrganizationUserUuid() { return organizationUserUuid; } - - public void setOrganizationUserUuid(String organizationUserUuid) { + public void setOrganizationUserUuid(@javax.annotation.Nullable String organizationUserUuid) { this.organizationUserUuid = organizationUserUuid; } - public Invitation organizationName(String organizationName) { - + public Invitation organizationName(@javax.annotation.Nullable String organizationName) { this.organizationName = organizationName; return this; } - /** + /** * Name of the organization, does not persist in database * @return organizationName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "organization_name", value = "Name of the organization, does not persist in database") - public String getOrganizationName() { return organizationName; } - - public void setOrganizationName(String organizationName) { + public void setOrganizationName(@javax.annotation.Nullable String organizationName) { this.organizationName = organizationName; } - public Invitation organizationRole(OrganizationRoles organizationRole) { - + public Invitation organizationRole(@javax.annotation.Nullable OrganizationRoles organizationRole) { this.organizationRole = organizationRole; return this; } - /** + /** * Get organizationRole * @return organizationRole - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OrganizationRoles getOrganizationRole() { return organizationRole; } - - public void setOrganizationRole(OrganizationRoles organizationRole) { + public void setOrganizationRole(@javax.annotation.Nullable OrganizationRoles organizationRole) { this.organizationRole = organizationRole; } - public Invitation organizationUuid(String organizationUuid) { - + public Invitation organizationUuid(@javax.annotation.Nullable String organizationUuid) { this.organizationUuid = organizationUuid; return this; } - /** + /** * Unique ID of the organization whose user(s) accepted the invitation * @return organizationUuid - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", value = "Unique ID of the organization whose user(s) accepted the invitation") - public String getOrganizationUuid() { return organizationUuid; } - - public void setOrganizationUuid(String organizationUuid) { + public void setOrganizationUuid(@javax.annotation.Nullable String organizationUuid) { this.organizationUuid = organizationUuid; } - public Invitation arrayUuid(String arrayUuid) { - + public Invitation arrayUuid(@javax.annotation.Nullable String arrayUuid) { this.arrayUuid = arrayUuid; return this; } - /** + /** * Unique ID of the array * @return arrayUuid - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", value = "Unique ID of the array") - public String getArrayUuid() { return arrayUuid; } - - public void setArrayUuid(String arrayUuid) { + public void setArrayUuid(@javax.annotation.Nullable String arrayUuid) { this.arrayUuid = arrayUuid; } - public Invitation groupUuid(String groupUuid) { - + public Invitation groupUuid(@javax.annotation.Nullable String groupUuid) { this.groupUuid = groupUuid; return this; } - /** + /** * Unique ID of the group * @return groupUuid - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", value = "Unique ID of the group") - public String getGroupUuid() { return groupUuid; } - - public void setGroupUuid(String groupUuid) { + public void setGroupUuid(@javax.annotation.Nullable String groupUuid) { this.groupUuid = groupUuid; } - public Invitation arrayName(String arrayName) { - + public Invitation arrayName(@javax.annotation.Nullable String arrayName) { this.arrayName = arrayName; return this; } - /** + /** * Name of the array, does not persist in database * @return arrayName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "array_name", value = "Name of the array, does not persist in database") - public String getArrayName() { return arrayName; } - - public void setArrayName(String arrayName) { + public void setArrayName(@javax.annotation.Nullable String arrayName) { this.arrayName = arrayName; } - public Invitation email(String email) { - + public Invitation email(@javax.annotation.Nullable String email) { this.email = email; return this; } - /** + /** * Email of the individual we send the invitation to * @return email - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "jane@doe.com", value = "Email of the individual we send the invitation to") - public String getEmail() { return email; } - - public void setEmail(String email) { + public void setEmail(@javax.annotation.Nullable String email) { this.email = email; } - public Invitation actions(String actions) { - + public Invitation actions(@javax.annotation.Nullable String actions) { this.actions = actions; return this; } - /** + /** * A comma separated list of ArrayActions or NamespaceActions * @return actions - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "read,write", value = "A comma separated list of ArrayActions or NamespaceActions") - public String getActions() { return actions; } - - public void setActions(String actions) { + public void setActions(@javax.annotation.Nullable String actions) { this.actions = actions; } - public Invitation groupActions(String groupActions) { - + public Invitation groupActions(@javax.annotation.Nullable String groupActions) { this.groupActions = groupActions; return this; } - /** + /** * A comma separated list of GroupActions * @return groupActions - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "read,write", value = "A comma separated list of GroupActions") - public String getGroupActions() { return groupActions; } - - public void setGroupActions(String groupActions) { + public void setGroupActions(@javax.annotation.Nullable String groupActions) { this.groupActions = groupActions; } - public Invitation status(InvitationStatus status) { - + public Invitation status(@javax.annotation.Nullable InvitationStatus status) { this.status = status; return this; } - /** + /** * Get status * @return status - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public InvitationStatus getStatus() { return status; } - - public void setStatus(InvitationStatus status) { + public void setStatus(@javax.annotation.Nullable InvitationStatus status) { this.status = status; } - public Invitation createdAt(OffsetDateTime createdAt) { - + public Invitation createdAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Datetime the invitation was created in UTC * @return createdAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Datetime the invitation was created in UTC") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; } - public Invitation expiresAt(OffsetDateTime expiresAt) { - + public Invitation expiresAt(@javax.annotation.Nullable OffsetDateTime expiresAt) { this.expiresAt = expiresAt; return this; } - /** + /** * Datetime the invitation is expected to expire in UTC * @return expiresAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Datetime the invitation is expected to expire in UTC") - public OffsetDateTime getExpiresAt() { return expiresAt; } - - public void setExpiresAt(OffsetDateTime expiresAt) { + public void setExpiresAt(@javax.annotation.Nullable OffsetDateTime expiresAt) { this.expiresAt = expiresAt; } - public Invitation acceptedAt(OffsetDateTime acceptedAt) { - + public Invitation acceptedAt(@javax.annotation.Nullable OffsetDateTime acceptedAt) { this.acceptedAt = acceptedAt; return this; } - /** + /** * Datetime the invitation was accepted in UTC * @return acceptedAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Datetime the invitation was accepted in UTC") - public OffsetDateTime getAcceptedAt() { return acceptedAt; } - - public void setAcceptedAt(OffsetDateTime acceptedAt) { + public void setAcceptedAt(@javax.annotation.Nullable OffsetDateTime acceptedAt) { this.acceptedAt = acceptedAt; } - public Invitation namespaceInvited(String namespaceInvited) { - + public Invitation namespaceInvited(@javax.annotation.Nullable String namespaceInvited) { this.namespaceInvited = namespaceInvited; return this; } - /** + /** * The namespace invited (user or organization, if it exists in the DB) * @return namespaceInvited - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The namespace invited (user or organization, if it exists in the DB)") - public String getNamespaceInvited() { return namespaceInvited; } - - public void setNamespaceInvited(String namespaceInvited) { + public void setNamespaceInvited(@javax.annotation.Nullable String namespaceInvited) { this.namespaceInvited = namespaceInvited; } - /** - * 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. - */ - public Invitation 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -649,13 +566,12 @@ public boolean equals(Object o) { Objects.equals(this.createdAt, invitation.createdAt) && Objects.equals(this.expiresAt, invitation.expiresAt) && Objects.equals(this.acceptedAt, invitation.acceptedAt) && - Objects.equals(this.namespaceInvited, invitation.namespaceInvited)&& - Objects.equals(this.additionalProperties, invitation.additionalProperties); + Objects.equals(this.namespaceInvited, invitation.namespaceInvited); } @Override public int hashCode() { - return Objects.hash(id, invitationType, ownerNamespaceUuid, inviterUuid, userNamespaceUuid, organizationUserUuid, organizationName, organizationRole, organizationUuid, arrayUuid, groupUuid, arrayName, email, actions, groupActions, status, createdAt, expiresAt, acceptedAt, namespaceInvited, additionalProperties); + return Objects.hash(id, invitationType, ownerNamespaceUuid, inviterUuid, userNamespaceUuid, organizationUserUuid, organizationName, organizationRole, organizationUuid, arrayUuid, groupUuid, arrayName, email, actions, groupActions, status, createdAt, expiresAt, acceptedAt, namespaceInvited); } @Override @@ -682,7 +598,6 @@ public String toString() { sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); sb.append(" acceptedAt: ").append(toIndentedString(acceptedAt)).append("\n"); sb.append(" namespaceInvited: ").append(toIndentedString(namespaceInvited)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -730,23 +645,34 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Invitation - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (Invitation.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 Invitation + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Invitation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in Invitation is not found in the empty JSON string", Invitation.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Invitation.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Invitation` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !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())); } + // validate the optional field `invitation_type` + if (jsonObj.get("invitation_type") != null && !jsonObj.get("invitation_type").isJsonNull()) { + InvitationType.validateJsonElement(jsonObj.get("invitation_type")); + } if ((jsonObj.get("owner_namespace_uuid") != null && !jsonObj.get("owner_namespace_uuid").isJsonNull()) && !jsonObj.get("owner_namespace_uuid").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `owner_namespace_uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner_namespace_uuid").toString())); } @@ -762,6 +688,10 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("organization_name") != null && !jsonObj.get("organization_name").isJsonNull()) && !jsonObj.get("organization_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `organization_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("organization_name").toString())); } + // validate the optional field `organization_role` + if (jsonObj.get("organization_role") != null && !jsonObj.get("organization_role").isJsonNull()) { + OrganizationRoles.validateJsonElement(jsonObj.get("organization_role")); + } if ((jsonObj.get("organization_uuid") != null && !jsonObj.get("organization_uuid").isJsonNull()) && !jsonObj.get("organization_uuid").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `organization_uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("organization_uuid").toString())); } @@ -783,6 +713,10 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("group_actions") != null && !jsonObj.get("group_actions").isJsonNull()) && !jsonObj.get("group_actions").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `group_actions` to be a primitive type in the JSON string but got `%s`", jsonObj.get("group_actions").toString())); } + // validate the optional field `status` + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { + InvitationStatus.validateJsonElement(jsonObj.get("status")); + } if ((jsonObj.get("namespace_invited") != null && !jsonObj.get("namespace_invited").isJsonNull()) && !jsonObj.get("namespace_invited").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `namespace_invited` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespace_invited").toString())); } @@ -803,71 +737,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, Invitation value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 Invitation read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - Invitation 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Invitation given an JSON string - * - * @param jsonString JSON string - * @return An instance of Invitation - * @throws IOException if the JSON string is invalid with respect to Invitation - */ + /** + * Create an instance of Invitation given an JSON string + * + * @param jsonString JSON string + * @return An instance of Invitation + * @throws IOException if the JSON string is invalid with respect to Invitation + */ public static Invitation fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Invitation.class); } - /** - * Convert an instance of Invitation to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Invitation to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/InvitationArrayShareEmail.java b/src/main/java/io/tiledb/cloud/rest_api/model/InvitationArrayShareEmail.java index ab800d2..41d15df 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/InvitationArrayShareEmail.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/InvitationArrayShareEmail.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,139 +11,114 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.ArrayActions; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Encapsulates information regarding inviting people using email to share array, same permissions for all invitees */ -@ApiModel(description = "Encapsulates information regarding inviting people using email to share array, same permissions for all invitees") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class InvitationArrayShareEmail { public static final String SERIALIZED_NAME_ACTIONS = "actions"; @SerializedName(SERIALIZED_NAME_ACTIONS) + @javax.annotation.Nonnull private List actions = new ArrayList<>(); public static final String SERIALIZED_NAME_INVITEE_EMAIL = "invitee_email"; @SerializedName(SERIALIZED_NAME_INVITEE_EMAIL) + @javax.annotation.Nonnull private List inviteeEmail = new ArrayList<>(); public InvitationArrayShareEmail() { } - public InvitationArrayShareEmail actions(List actions) { - + public InvitationArrayShareEmail actions(@javax.annotation.Nonnull List actions) { this.actions = actions; return this; } public InvitationArrayShareEmail addActionsItem(ArrayActions actionsItem) { + if (this.actions == null) { + this.actions = new ArrayList<>(); + } this.actions.add(actionsItem); return this; } - /** + /** * List of permitted actions * @return actions - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "[read, write]", required = true, value = "List of permitted actions") - public List getActions() { return actions; } - - public void setActions(List actions) { + public void setActions(@javax.annotation.Nonnull List actions) { this.actions = actions; } - public InvitationArrayShareEmail inviteeEmail(List inviteeEmail) { - + public InvitationArrayShareEmail inviteeEmail(@javax.annotation.Nonnull List inviteeEmail) { this.inviteeEmail = inviteeEmail; return this; } public InvitationArrayShareEmail addInviteeEmailItem(String inviteeEmailItem) { + if (this.inviteeEmail == null) { + this.inviteeEmail = new ArrayList<>(); + } this.inviteeEmail.add(inviteeEmailItem); return this; } - /** + /** * Get inviteeEmail * @return inviteeEmail - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getInviteeEmail() { return inviteeEmail; } - - public void setInviteeEmail(List inviteeEmail) { + public void setInviteeEmail(@javax.annotation.Nonnull List inviteeEmail) { this.inviteeEmail = inviteeEmail; } - /** - * 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. - */ - public InvitationArrayShareEmail 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -156,13 +131,12 @@ public boolean equals(Object o) { } InvitationArrayShareEmail invitationArrayShareEmail = (InvitationArrayShareEmail) o; return Objects.equals(this.actions, invitationArrayShareEmail.actions) && - Objects.equals(this.inviteeEmail, invitationArrayShareEmail.inviteeEmail)&& - Objects.equals(this.additionalProperties, invitationArrayShareEmail.additionalProperties); + Objects.equals(this.inviteeEmail, invitationArrayShareEmail.inviteeEmail); } @Override public int hashCode() { - return Objects.hash(actions, inviteeEmail, additionalProperties); + return Objects.hash(actions, inviteeEmail); } @Override @@ -171,7 +145,6 @@ public String toString() { sb.append("class InvitationArrayShareEmail {\n"); sb.append(" actions: ").append(toIndentedString(actions)).append("\n"); sb.append(" inviteeEmail: ").append(toIndentedString(inviteeEmail)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -203,33 +176,44 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("invitee_email"); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to InvitationArrayShareEmail - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (InvitationArrayShareEmail.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 InvitationArrayShareEmail + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InvitationArrayShareEmail.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in InvitationArrayShareEmail is not found in the empty JSON string", InvitationArrayShareEmail.openapiRequiredFields.toString())); } } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InvitationArrayShareEmail.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InvitationArrayShareEmail` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + // check to make sure all required properties/fields are present in the JSON string for (String requiredField : InvitationArrayShareEmail.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + 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())); } } - // ensure the json data is an array - if ((jsonObj.get("actions") != null && !jsonObj.get("actions").isJsonNull()) && !jsonObj.get("actions").isJsonArray()) { + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the required json array is present + if (jsonObj.get("actions") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("actions").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `actions` to be an array in the JSON string but got `%s`", jsonObj.get("actions").toString())); } - // ensure the json data is an array - if ((jsonObj.get("invitee_email") != null && !jsonObj.get("invitee_email").isJsonNull()) && !jsonObj.get("invitee_email").isJsonArray()) { + // ensure the required json array is present + if (jsonObj.get("invitee_email") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("invitee_email").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `invitee_email` to be an array in the JSON string but got `%s`", jsonObj.get("invitee_email").toString())); } } @@ -249,71 +233,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, InvitationArrayShareEmail value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 InvitationArrayShareEmail read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - InvitationArrayShareEmail 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of InvitationArrayShareEmail given an JSON string - * - * @param jsonString JSON string - * @return An instance of InvitationArrayShareEmail - * @throws IOException if the JSON string is invalid with respect to InvitationArrayShareEmail - */ + /** + * Create an instance of InvitationArrayShareEmail given an JSON string + * + * @param jsonString JSON string + * @return An instance of InvitationArrayShareEmail + * @throws IOException if the JSON string is invalid with respect to InvitationArrayShareEmail + */ public static InvitationArrayShareEmail fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, InvitationArrayShareEmail.class); } - /** - * Convert an instance of InvitationArrayShareEmail to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of InvitationArrayShareEmail to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/InvitationData.java b/src/main/java/io/tiledb/cloud/rest_api/model/InvitationData.java index aa30c70..86b0b33 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/InvitationData.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/InvitationData.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,52 +11,63 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.Invitation; +import org.openapitools.client.model.PaginationMetadata; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Object including invitations and metadata */ -@ApiModel(description = "Object including invitations and metadata") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class InvitationData { public static final String SERIALIZED_NAME_INVITATIONS = "invitations"; @SerializedName(SERIALIZED_NAME_INVITATIONS) - private List invitations = null; + @javax.annotation.Nullable + private List invitations = new ArrayList<>(); public static final String SERIALIZED_NAME_PAGINATION_METADATA = "pagination_metadata"; @SerializedName(SERIALIZED_NAME_PAGINATION_METADATA) + @javax.annotation.Nullable private PaginationMetadata paginationMetadata; public InvitationData() { } - public InvitationData invitations(List invitations) { - + public InvitationData invitations(@javax.annotation.Nullable List invitations) { this.invitations = invitations; return this; } @@ -69,80 +80,38 @@ public InvitationData addInvitationsItem(Invitation invitationsItem) { return this; } - /** + /** * List of invitations * @return invitations - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "List of invitations") - public List getInvitations() { return invitations; } - - public void setInvitations(List invitations) { + public void setInvitations(@javax.annotation.Nullable List invitations) { this.invitations = invitations; } - public InvitationData paginationMetadata(PaginationMetadata paginationMetadata) { - + public InvitationData paginationMetadata(@javax.annotation.Nullable PaginationMetadata paginationMetadata) { this.paginationMetadata = paginationMetadata; return this; } - /** + /** * Get paginationMetadata * @return paginationMetadata - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public PaginationMetadata getPaginationMetadata() { return paginationMetadata; } - - public void setPaginationMetadata(PaginationMetadata paginationMetadata) { + public void setPaginationMetadata(@javax.annotation.Nullable PaginationMetadata paginationMetadata) { this.paginationMetadata = paginationMetadata; } - /** - * 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. - */ - public InvitationData 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -155,13 +124,12 @@ public boolean equals(Object o) { } InvitationData invitationData = (InvitationData) o; return Objects.equals(this.invitations, invitationData.invitations) && - Objects.equals(this.paginationMetadata, invitationData.paginationMetadata)&& - Objects.equals(this.additionalProperties, invitationData.additionalProperties); + Objects.equals(this.paginationMetadata, invitationData.paginationMetadata); } @Override public int hashCode() { - return Objects.hash(invitations, paginationMetadata, additionalProperties); + return Objects.hash(invitations, paginationMetadata); } @Override @@ -170,7 +138,6 @@ public String toString() { sb.append("class InvitationData {\n"); sb.append(" invitations: ").append(toIndentedString(invitations)).append("\n"); sb.append(" paginationMetadata: ").append(toIndentedString(paginationMetadata)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -200,35 +167,44 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to InvitationData - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (InvitationData.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 InvitationData + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InvitationData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in InvitationData is not found in the empty JSON string", InvitationData.openapiRequiredFields.toString())); } } - JsonArray jsonArrayinvitations = jsonObj.getAsJsonArray("invitations"); - if (jsonArrayinvitations != null) { - // ensure the json data is an array - if (!jsonObj.get("invitations").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `invitations` to be an array in the JSON string but got `%s`", jsonObj.get("invitations").toString())); - } - // validate the optional field `invitations` (array) - for (int i = 0; i < jsonArrayinvitations.size(); i++) { - Invitation.validateJsonObject(jsonArrayinvitations.get(i).getAsJsonObject()); - }; + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InvitationData.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InvitationData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("invitations") != null && !jsonObj.get("invitations").isJsonNull()) { + JsonArray jsonArrayinvitations = jsonObj.getAsJsonArray("invitations"); + if (jsonArrayinvitations != null) { + // ensure the json data is an array + if (!jsonObj.get("invitations").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `invitations` to be an array in the JSON string but got `%s`", jsonObj.get("invitations").toString())); + } + + // validate the optional field `invitations` (array) + for (int i = 0; i < jsonArrayinvitations.size(); i++) { + Invitation.validateJsonElement(jsonArrayinvitations.get(i)); + }; + } } // validate the optional field `pagination_metadata` if (jsonObj.get("pagination_metadata") != null && !jsonObj.get("pagination_metadata").isJsonNull()) { - PaginationMetadata.validateJsonObject(jsonObj.getAsJsonObject("pagination_metadata")); + PaginationMetadata.validateJsonElement(jsonObj.get("pagination_metadata")); } } @@ -247,71 +223,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, InvitationData value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 InvitationData read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - InvitationData 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of InvitationData given an JSON string - * - * @param jsonString JSON string - * @return An instance of InvitationData - * @throws IOException if the JSON string is invalid with respect to InvitationData - */ + /** + * Create an instance of InvitationData given an JSON string + * + * @param jsonString JSON string + * @return An instance of InvitationData + * @throws IOException if the JSON string is invalid with respect to InvitationData + */ public static InvitationData fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, InvitationData.class); } - /** - * Convert an instance of InvitationData to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of InvitationData to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/InvitationFailedRecipients.java b/src/main/java/io/tiledb/cloud/rest_api/model/InvitationFailedRecipients.java index caff6b6..e9b6aac 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/InvitationFailedRecipients.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/InvitationFailedRecipients.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,107 +11,81 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Encapsulates information regarding the failed invitation recipients */ -@ApiModel(description = "Encapsulates information regarding the failed invitation recipients") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class InvitationFailedRecipients { public static final String SERIALIZED_NAME_FAILED_RECIPIENTS = "failed_recipients"; @SerializedName(SERIALIZED_NAME_FAILED_RECIPIENTS) + @javax.annotation.Nonnull private List failedRecipients = new ArrayList<>(); public InvitationFailedRecipients() { } - public InvitationFailedRecipients failedRecipients(List failedRecipients) { - + public InvitationFailedRecipients failedRecipients(@javax.annotation.Nonnull List failedRecipients) { this.failedRecipients = failedRecipients; return this; } public InvitationFailedRecipients addFailedRecipientsItem(String failedRecipientsItem) { + if (this.failedRecipients == null) { + this.failedRecipients = new ArrayList<>(); + } this.failedRecipients.add(failedRecipientsItem); return this; } - /** + /** * Get failedRecipients * @return failedRecipients - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getFailedRecipients() { return failedRecipients; } - - public void setFailedRecipients(List failedRecipients) { + public void setFailedRecipients(@javax.annotation.Nonnull List failedRecipients) { this.failedRecipients = failedRecipients; } - /** - * 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. - */ - public InvitationFailedRecipients 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -123,13 +97,12 @@ public boolean equals(Object o) { return false; } InvitationFailedRecipients invitationFailedRecipients = (InvitationFailedRecipients) o; - return Objects.equals(this.failedRecipients, invitationFailedRecipients.failedRecipients)&& - Objects.equals(this.additionalProperties, invitationFailedRecipients.additionalProperties); + return Objects.equals(this.failedRecipients, invitationFailedRecipients.failedRecipients); } @Override public int hashCode() { - return Objects.hash(failedRecipients, additionalProperties); + return Objects.hash(failedRecipients); } @Override @@ -137,7 +110,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class InvitationFailedRecipients {\n"); sb.append(" failedRecipients: ").append(toIndentedString(failedRecipients)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -167,29 +139,38 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("failed_recipients"); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to InvitationFailedRecipients - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (InvitationFailedRecipients.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 InvitationFailedRecipients + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InvitationFailedRecipients.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in InvitationFailedRecipients is not found in the empty JSON string", InvitationFailedRecipients.openapiRequiredFields.toString())); } } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InvitationFailedRecipients.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InvitationFailedRecipients` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + // check to make sure all required properties/fields are present in the JSON string for (String requiredField : InvitationFailedRecipients.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + 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())); } } - // ensure the json data is an array - if ((jsonObj.get("failed_recipients") != null && !jsonObj.get("failed_recipients").isJsonNull()) && !jsonObj.get("failed_recipients").isJsonArray()) { + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the required json array is present + if (jsonObj.get("failed_recipients") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("failed_recipients").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `failed_recipients` to be an array in the JSON string but got `%s`", jsonObj.get("failed_recipients").toString())); } } @@ -209,71 +190,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, InvitationFailedRecipients value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 InvitationFailedRecipients read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - InvitationFailedRecipients 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of InvitationFailedRecipients given an JSON string - * - * @param jsonString JSON string - * @return An instance of InvitationFailedRecipients - * @throws IOException if the JSON string is invalid with respect to InvitationFailedRecipients - */ + /** + * Create an instance of InvitationFailedRecipients given an JSON string + * + * @param jsonString JSON string + * @return An instance of InvitationFailedRecipients + * @throws IOException if the JSON string is invalid with respect to InvitationFailedRecipients + */ public static InvitationFailedRecipients fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, InvitationFailedRecipients.class); } - /** - * Convert an instance of InvitationFailedRecipients to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of InvitationFailedRecipients to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/InvitationGroupShareEmail.java b/src/main/java/io/tiledb/cloud/rest_api/model/InvitationGroupShareEmail.java index 946f4db..417a544 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/InvitationGroupShareEmail.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/InvitationGroupShareEmail.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,171 +11,147 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.ArrayActions; +import org.openapitools.client.model.GroupActions; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Encapsulates information regarding inviting people using email to share group, same permissions for all invitees */ -@ApiModel(description = "Encapsulates information regarding inviting people using email to share group, same permissions for all invitees") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class InvitationGroupShareEmail { public static final String SERIALIZED_NAME_ARRAY_ACTIONS = "array_actions"; @SerializedName(SERIALIZED_NAME_ARRAY_ACTIONS) + @javax.annotation.Nonnull private List arrayActions = new ArrayList<>(); public static final String SERIALIZED_NAME_GROUP_ACTIONS = "group_actions"; @SerializedName(SERIALIZED_NAME_GROUP_ACTIONS) + @javax.annotation.Nonnull private List groupActions = new ArrayList<>(); public static final String SERIALIZED_NAME_INVITEE_EMAIL_OR_NAME = "invitee_email_or_name"; @SerializedName(SERIALIZED_NAME_INVITEE_EMAIL_OR_NAME) + @javax.annotation.Nonnull private List inviteeEmailOrName = new ArrayList<>(); public InvitationGroupShareEmail() { } - public InvitationGroupShareEmail arrayActions(List arrayActions) { - + public InvitationGroupShareEmail arrayActions(@javax.annotation.Nonnull List arrayActions) { this.arrayActions = arrayActions; return this; } public InvitationGroupShareEmail addArrayActionsItem(ArrayActions arrayActionsItem) { + if (this.arrayActions == null) { + this.arrayActions = new ArrayList<>(); + } this.arrayActions.add(arrayActionsItem); return this; } - /** + /** * List of permitted array actions * @return arrayActions - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "[read, write]", required = true, value = "List of permitted array actions") - public List getArrayActions() { return arrayActions; } - - public void setArrayActions(List arrayActions) { + public void setArrayActions(@javax.annotation.Nonnull List arrayActions) { this.arrayActions = arrayActions; } - public InvitationGroupShareEmail groupActions(List groupActions) { - + public InvitationGroupShareEmail groupActions(@javax.annotation.Nonnull List groupActions) { this.groupActions = groupActions; return this; } public InvitationGroupShareEmail addGroupActionsItem(GroupActions groupActionsItem) { + if (this.groupActions == null) { + this.groupActions = new ArrayList<>(); + } this.groupActions.add(groupActionsItem); return this; } - /** + /** * List of permitted group actions * @return groupActions - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "[read, write]", required = true, value = "List of permitted group actions") - public List getGroupActions() { return groupActions; } - - public void setGroupActions(List groupActions) { + public void setGroupActions(@javax.annotation.Nonnull List groupActions) { this.groupActions = groupActions; } - public InvitationGroupShareEmail inviteeEmailOrName(List inviteeEmailOrName) { - + public InvitationGroupShareEmail inviteeEmailOrName(@javax.annotation.Nonnull List inviteeEmailOrName) { this.inviteeEmailOrName = inviteeEmailOrName; return this; } public InvitationGroupShareEmail addInviteeEmailOrNameItem(String inviteeEmailOrNameItem) { + if (this.inviteeEmailOrName == null) { + this.inviteeEmailOrName = new ArrayList<>(); + } this.inviteeEmailOrName.add(inviteeEmailOrNameItem); return this; } - /** + /** * Get inviteeEmailOrName * @return inviteeEmailOrName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getInviteeEmailOrName() { return inviteeEmailOrName; } - - public void setInviteeEmailOrName(List inviteeEmailOrName) { + public void setInviteeEmailOrName(@javax.annotation.Nonnull List inviteeEmailOrName) { this.inviteeEmailOrName = inviteeEmailOrName; } - /** - * 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. - */ - public InvitationGroupShareEmail 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -189,13 +165,12 @@ public boolean equals(Object o) { InvitationGroupShareEmail invitationGroupShareEmail = (InvitationGroupShareEmail) o; return Objects.equals(this.arrayActions, invitationGroupShareEmail.arrayActions) && Objects.equals(this.groupActions, invitationGroupShareEmail.groupActions) && - Objects.equals(this.inviteeEmailOrName, invitationGroupShareEmail.inviteeEmailOrName)&& - Objects.equals(this.additionalProperties, invitationGroupShareEmail.additionalProperties); + Objects.equals(this.inviteeEmailOrName, invitationGroupShareEmail.inviteeEmailOrName); } @Override public int hashCode() { - return Objects.hash(arrayActions, groupActions, inviteeEmailOrName, additionalProperties); + return Objects.hash(arrayActions, groupActions, inviteeEmailOrName); } @Override @@ -205,7 +180,6 @@ public String toString() { sb.append(" arrayActions: ").append(toIndentedString(arrayActions)).append("\n"); sb.append(" groupActions: ").append(toIndentedString(groupActions)).append("\n"); sb.append(" inviteeEmailOrName: ").append(toIndentedString(inviteeEmailOrName)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -239,37 +213,50 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("invitee_email_or_name"); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to InvitationGroupShareEmail - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (InvitationGroupShareEmail.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 InvitationGroupShareEmail + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InvitationGroupShareEmail.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in InvitationGroupShareEmail is not found in the empty JSON string", InvitationGroupShareEmail.openapiRequiredFields.toString())); } } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InvitationGroupShareEmail.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InvitationGroupShareEmail` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + // check to make sure all required properties/fields are present in the JSON string for (String requiredField : InvitationGroupShareEmail.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + 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())); } } - // ensure the json data is an array - if ((jsonObj.get("array_actions") != null && !jsonObj.get("array_actions").isJsonNull()) && !jsonObj.get("array_actions").isJsonArray()) { + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the required json array is present + if (jsonObj.get("array_actions") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("array_actions").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `array_actions` to be an array in the JSON string but got `%s`", jsonObj.get("array_actions").toString())); } - // ensure the json data is an array - if ((jsonObj.get("group_actions") != null && !jsonObj.get("group_actions").isJsonNull()) && !jsonObj.get("group_actions").isJsonArray()) { + // ensure the required json array is present + if (jsonObj.get("group_actions") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("group_actions").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `group_actions` to be an array in the JSON string but got `%s`", jsonObj.get("group_actions").toString())); } - // ensure the json data is an array - if ((jsonObj.get("invitee_email_or_name") != null && !jsonObj.get("invitee_email_or_name").isJsonNull()) && !jsonObj.get("invitee_email_or_name").isJsonArray()) { + // ensure the required json array is present + if (jsonObj.get("invitee_email_or_name") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("invitee_email_or_name").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `invitee_email_or_name` to be an array in the JSON string but got `%s`", jsonObj.get("invitee_email_or_name").toString())); } } @@ -289,71 +276,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, InvitationGroupShareEmail value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 InvitationGroupShareEmail read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - InvitationGroupShareEmail 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of InvitationGroupShareEmail given an JSON string - * - * @param jsonString JSON string - * @return An instance of InvitationGroupShareEmail - * @throws IOException if the JSON string is invalid with respect to InvitationGroupShareEmail - */ + /** + * Create an instance of InvitationGroupShareEmail given an JSON string + * + * @param jsonString JSON string + * @return An instance of InvitationGroupShareEmail + * @throws IOException if the JSON string is invalid with respect to InvitationGroupShareEmail + */ public static InvitationGroupShareEmail fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, InvitationGroupShareEmail.class); } - /** - * Convert an instance of InvitationGroupShareEmail to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of InvitationGroupShareEmail to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/InvitationOrganizationJoinEmail.java b/src/main/java/io/tiledb/cloud/rest_api/model/InvitationOrganizationJoinEmail.java index db83662..7cf137d 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/InvitationOrganizationJoinEmail.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/InvitationOrganizationJoinEmail.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,56 +11,68 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.NamespaceActions; +import org.openapitools.client.model.OrganizationRoles; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Encapsulates information regarding inviting people using email to join organization, same permissions for all invitees */ -@ApiModel(description = "Encapsulates information regarding inviting people using email to join organization, same permissions for all invitees") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class InvitationOrganizationJoinEmail { public static final String SERIALIZED_NAME_ACTIONS = "actions"; @SerializedName(SERIALIZED_NAME_ACTIONS) - private List actions = null; + @javax.annotation.Nullable + private List actions = new ArrayList<>(); public static final String SERIALIZED_NAME_ORGANIZATION_ROLE = "organization_role"; @SerializedName(SERIALIZED_NAME_ORGANIZATION_ROLE) + @javax.annotation.Nonnull private OrganizationRoles organizationRole; public static final String SERIALIZED_NAME_INVITEE_EMAIL = "invitee_email"; @SerializedName(SERIALIZED_NAME_INVITEE_EMAIL) + @javax.annotation.Nonnull private List inviteeEmail = new ArrayList<>(); public InvitationOrganizationJoinEmail() { } - public InvitationOrganizationJoinEmail actions(List actions) { - + public InvitationOrganizationJoinEmail actions(@javax.annotation.Nullable List actions) { this.actions = actions; return this; } @@ -73,108 +85,65 @@ public InvitationOrganizationJoinEmail addActionsItem(NamespaceActions actionsIt return this; } - /** + /** * List of permitted actions * @return actions - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "[read, write]", value = "List of permitted actions") - public List getActions() { return actions; } - - public void setActions(List actions) { + public void setActions(@javax.annotation.Nullable List actions) { this.actions = actions; } - public InvitationOrganizationJoinEmail organizationRole(OrganizationRoles organizationRole) { - + public InvitationOrganizationJoinEmail organizationRole(@javax.annotation.Nonnull OrganizationRoles organizationRole) { this.organizationRole = organizationRole; return this; } - /** + /** * Get organizationRole * @return organizationRole - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OrganizationRoles getOrganizationRole() { return organizationRole; } - - public void setOrganizationRole(OrganizationRoles organizationRole) { + public void setOrganizationRole(@javax.annotation.Nonnull OrganizationRoles organizationRole) { this.organizationRole = organizationRole; } - public InvitationOrganizationJoinEmail inviteeEmail(List inviteeEmail) { - + public InvitationOrganizationJoinEmail inviteeEmail(@javax.annotation.Nonnull List inviteeEmail) { this.inviteeEmail = inviteeEmail; return this; } public InvitationOrganizationJoinEmail addInviteeEmailItem(String inviteeEmailItem) { + if (this.inviteeEmail == null) { + this.inviteeEmail = new ArrayList<>(); + } this.inviteeEmail.add(inviteeEmailItem); return this; } - /** + /** * Get inviteeEmail * @return inviteeEmail - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getInviteeEmail() { return inviteeEmail; } - - public void setInviteeEmail(List inviteeEmail) { + public void setInviteeEmail(@javax.annotation.Nonnull List inviteeEmail) { this.inviteeEmail = inviteeEmail; } - /** - * 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. - */ - public InvitationOrganizationJoinEmail 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -188,13 +157,12 @@ public boolean equals(Object o) { InvitationOrganizationJoinEmail invitationOrganizationJoinEmail = (InvitationOrganizationJoinEmail) o; return Objects.equals(this.actions, invitationOrganizationJoinEmail.actions) && Objects.equals(this.organizationRole, invitationOrganizationJoinEmail.organizationRole) && - Objects.equals(this.inviteeEmail, invitationOrganizationJoinEmail.inviteeEmail)&& - Objects.equals(this.additionalProperties, invitationOrganizationJoinEmail.additionalProperties); + Objects.equals(this.inviteeEmail, invitationOrganizationJoinEmail.inviteeEmail); } @Override public int hashCode() { - return Objects.hash(actions, organizationRole, inviteeEmail, additionalProperties); + return Objects.hash(actions, organizationRole, inviteeEmail); } @Override @@ -204,7 +172,6 @@ public String toString() { sb.append(" actions: ").append(toIndentedString(actions)).append("\n"); sb.append(" organizationRole: ").append(toIndentedString(organizationRole)).append("\n"); sb.append(" inviteeEmail: ").append(toIndentedString(inviteeEmail)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -237,33 +204,44 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("invitee_email"); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to InvitationOrganizationJoinEmail - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (InvitationOrganizationJoinEmail.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 InvitationOrganizationJoinEmail + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InvitationOrganizationJoinEmail.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in InvitationOrganizationJoinEmail is not found in the empty JSON string", InvitationOrganizationJoinEmail.openapiRequiredFields.toString())); } } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InvitationOrganizationJoinEmail.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InvitationOrganizationJoinEmail` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + // check to make sure all required properties/fields are present in the JSON string for (String requiredField : InvitationOrganizationJoinEmail.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + 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())); } } - // ensure the json data is an array - if ((jsonObj.get("actions") != null && !jsonObj.get("actions").isJsonNull()) && !jsonObj.get("actions").isJsonArray()) { + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("actions") != null && !jsonObj.get("actions").isJsonNull() && !jsonObj.get("actions").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `actions` to be an array in the JSON string but got `%s`", jsonObj.get("actions").toString())); } - // ensure the json data is an array - if ((jsonObj.get("invitee_email") != null && !jsonObj.get("invitee_email").isJsonNull()) && !jsonObj.get("invitee_email").isJsonArray()) { + // validate the required field `organization_role` + OrganizationRoles.validateJsonElement(jsonObj.get("organization_role")); + // ensure the required json array is present + if (jsonObj.get("invitee_email") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("invitee_email").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `invitee_email` to be an array in the JSON string but got `%s`", jsonObj.get("invitee_email").toString())); } } @@ -283,71 +261,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, InvitationOrganizationJoinEmail value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 InvitationOrganizationJoinEmail read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - InvitationOrganizationJoinEmail 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of InvitationOrganizationJoinEmail given an JSON string - * - * @param jsonString JSON string - * @return An instance of InvitationOrganizationJoinEmail - * @throws IOException if the JSON string is invalid with respect to InvitationOrganizationJoinEmail - */ + /** + * Create an instance of InvitationOrganizationJoinEmail given an JSON string + * + * @param jsonString JSON string + * @return An instance of InvitationOrganizationJoinEmail + * @throws IOException if the JSON string is invalid with respect to InvitationOrganizationJoinEmail + */ public static InvitationOrganizationJoinEmail fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, InvitationOrganizationJoinEmail.class); } - /** - * Convert an instance of InvitationOrganizationJoinEmail to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of InvitationOrganizationJoinEmail to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/InvitationStatus.java b/src/main/java/io/tiledb/cloud/rest_api/model/InvitationStatus.java index 7a94bd6..3f76575 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/InvitationStatus.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/InvitationStatus.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -65,5 +69,10 @@ public InvitationStatus read(final JsonReader jsonReader) throws IOException { return InvitationStatus.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + InvitationStatus.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/InvitationType.java b/src/main/java/io/tiledb/cloud/rest_api/model/InvitationType.java index 4b73767..20bf4c4 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/InvitationType.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/InvitationType.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -29,7 +33,9 @@ public enum InvitationType { GROUP_SHARE("GROUP_SHARE"), - JOIN_ORGANIZATION("JOIN_ORGANIZATION"); + JOIN_ORGANIZATION("JOIN_ORGANIZATION"), + + PAYMENT_SHARE("PAYMENT_SHARE"); private String value; @@ -67,5 +73,10 @@ public InvitationType read(final JsonReader jsonReader) throws IOException { return InvitationType.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + InvitationType.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/LastAccessedArray.java b/src/main/java/io/tiledb/cloud/rest_api/model/LastAccessedArray.java index f538f94..42e41f7 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/LastAccessedArray.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/LastAccessedArray.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,209 +11,169 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; +import java.util.Arrays; +import org.openapitools.client.model.ActivityEventType; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Information related to last access of an array */ -@ApiModel(description = "Information related to last access of an array") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class LastAccessedArray { public static final String SERIALIZED_NAME_ARRAY_ID = "array_id"; @SerializedName(SERIALIZED_NAME_ARRAY_ID) + @javax.annotation.Nullable private String arrayId; public static final String SERIALIZED_NAME_ARRAY_NAME = "array_name"; @SerializedName(SERIALIZED_NAME_ARRAY_NAME) + @javax.annotation.Nullable private String arrayName; public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; @SerializedName(SERIALIZED_NAME_NAMESPACE) + @javax.annotation.Nullable private String namespace; public static final String SERIALIZED_NAME_ACCESSED_TIME = "accessed_time"; @SerializedName(SERIALIZED_NAME_ACCESSED_TIME) + @javax.annotation.Nullable private BigDecimal accessedTime; public static final String SERIALIZED_NAME_ACCESS_TYPE = "access_type"; @SerializedName(SERIALIZED_NAME_ACCESS_TYPE) + @javax.annotation.Nullable private ActivityEventType accessType; public LastAccessedArray() { } - public LastAccessedArray arrayId(String arrayId) { - + public LastAccessedArray arrayId(@javax.annotation.Nullable String arrayId) { this.arrayId = arrayId; return this; } - /** + /** * unique ID of array * @return arrayId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", value = "unique ID of array") - public String getArrayId() { return arrayId; } - - public void setArrayId(String arrayId) { + public void setArrayId(@javax.annotation.Nullable String arrayId) { this.arrayId = arrayId; } - public LastAccessedArray arrayName(String arrayName) { - + public LastAccessedArray arrayName(@javax.annotation.Nullable String arrayName) { this.arrayName = arrayName; return this; } - /** + /** * name of the array * @return arrayName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "array1", value = "name of the array") - public String getArrayName() { return arrayName; } - - public void setArrayName(String arrayName) { + public void setArrayName(@javax.annotation.Nullable String arrayName) { this.arrayName = arrayName; } - public LastAccessedArray namespace(String namespace) { - + public LastAccessedArray namespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; return this; } - /** + /** * namespace of a user or organization * @return namespace - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "mockuser", value = "namespace of a user or organization") - public String getNamespace() { return namespace; } - - public void setNamespace(String namespace) { + public void setNamespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; } - public LastAccessedArray accessedTime(BigDecimal accessedTime) { - + public LastAccessedArray accessedTime(@javax.annotation.Nullable BigDecimal accessedTime) { this.accessedTime = accessedTime; return this; } - /** + /** * timestamp (epoch milliseconds) array is last accessed * @return accessedTime - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "1540471791873", value = "timestamp (epoch milliseconds) array is last accessed") - public BigDecimal getAccessedTime() { return accessedTime; } - - public void setAccessedTime(BigDecimal accessedTime) { + public void setAccessedTime(@javax.annotation.Nullable BigDecimal accessedTime) { this.accessedTime = accessedTime; } - public LastAccessedArray accessType(ActivityEventType accessType) { - + public LastAccessedArray accessType(@javax.annotation.Nullable ActivityEventType accessType) { this.accessType = accessType; return this; } - /** + /** * Get accessType * @return accessType - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public ActivityEventType getAccessType() { return accessType; } - - public void setAccessType(ActivityEventType accessType) { + public void setAccessType(@javax.annotation.Nullable ActivityEventType accessType) { this.accessType = accessType; } - /** - * 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. - */ - public LastAccessedArray 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -229,13 +189,12 @@ public boolean equals(Object o) { Objects.equals(this.arrayName, lastAccessedArray.arrayName) && Objects.equals(this.namespace, lastAccessedArray.namespace) && Objects.equals(this.accessedTime, lastAccessedArray.accessedTime) && - Objects.equals(this.accessType, lastAccessedArray.accessType)&& - Objects.equals(this.additionalProperties, lastAccessedArray.additionalProperties); + Objects.equals(this.accessType, lastAccessedArray.accessType); } @Override public int hashCode() { - return Objects.hash(arrayId, arrayName, namespace, accessedTime, accessType, additionalProperties); + return Objects.hash(arrayId, arrayName, namespace, accessedTime, accessType); } @Override @@ -247,7 +206,6 @@ public String toString() { sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); sb.append(" accessedTime: ").append(toIndentedString(accessedTime)).append("\n"); sb.append(" accessType: ").append(toIndentedString(accessType)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -280,20 +238,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LastAccessedArray - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (LastAccessedArray.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 LastAccessedArray + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LastAccessedArray.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in LastAccessedArray is not found in the empty JSON string", LastAccessedArray.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!LastAccessedArray.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LastAccessedArray` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("array_id") != null && !jsonObj.get("array_id").isJsonNull()) && !jsonObj.get("array_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `array_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("array_id").toString())); } @@ -303,6 +268,10 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("namespace") != null && !jsonObj.get("namespace").isJsonNull()) && !jsonObj.get("namespace").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `namespace` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespace").toString())); } + // validate the optional field `access_type` + if (jsonObj.get("access_type") != null && !jsonObj.get("access_type").isJsonNull()) { + ActivityEventType.validateJsonElement(jsonObj.get("access_type")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -320,71 +289,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, LastAccessedArray value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 LastAccessedArray read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - LastAccessedArray 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of LastAccessedArray given an JSON string - * - * @param jsonString JSON string - * @return An instance of LastAccessedArray - * @throws IOException if the JSON string is invalid with respect to LastAccessedArray - */ + /** + * Create an instance of LastAccessedArray given an JSON string + * + * @param jsonString JSON string + * @return An instance of LastAccessedArray + * @throws IOException if the JSON string is invalid with respect to LastAccessedArray + */ public static LastAccessedArray fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, LastAccessedArray.class); } - /** - * Convert an instance of LastAccessedArray to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of LastAccessedArray to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/Layout.java b/src/main/java/io/tiledb/cloud/rest_api/model/Layout.java index 1590f22..244264d 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/Layout.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/Layout.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -69,5 +73,10 @@ public Layout read(final JsonReader jsonReader) throws IOException { return Layout.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + Layout.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/LoadArraySchemaRequest.java b/src/main/java/io/tiledb/cloud/rest_api/model/LoadArraySchemaRequest.java new file mode 100644 index 0000000..fecb1f6 --- /dev/null +++ b/src/main/java/io/tiledb/cloud/rest_api/model/LoadArraySchemaRequest.java @@ -0,0 +1,208 @@ +/* + * TileDB Storage Platform API + * TileDB Storage Platform REST API + * + * The version of the OpenAPI document: 2.17.51 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +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 org.openapitools.client.model.TileDBConfig; + +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.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * Request to load an array schema + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") +public class LoadArraySchemaRequest { + public static final String SERIALIZED_NAME_CONFIG = "config"; + @SerializedName(SERIALIZED_NAME_CONFIG) + @javax.annotation.Nullable + private TileDBConfig config; + + public LoadArraySchemaRequest() { + } + + public LoadArraySchemaRequest config(@javax.annotation.Nullable TileDBConfig config) { + this.config = config; + return this; + } + + /** + * Get config + * @return config + */ + @javax.annotation.Nullable + public TileDBConfig getConfig() { + return config; + } + + public void setConfig(@javax.annotation.Nullable TileDBConfig config) { + this.config = config; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LoadArraySchemaRequest loadArraySchemaRequest = (LoadArraySchemaRequest) o; + return Objects.equals(this.config, loadArraySchemaRequest.config); + } + + @Override + public int hashCode() { + return Objects.hash(config); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LoadArraySchemaRequest {\n"); + sb.append(" config: ").append(toIndentedString(config)).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("config"); + + // 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 LoadArraySchemaRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LoadArraySchemaRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in LoadArraySchemaRequest is not found in the empty JSON string", LoadArraySchemaRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!LoadArraySchemaRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LoadArraySchemaRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `config` + if (jsonObj.get("config") != null && !jsonObj.get("config").isJsonNull()) { + TileDBConfig.validateJsonElement(jsonObj.get("config")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LoadArraySchemaRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoadArraySchemaRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LoadArraySchemaRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LoadArraySchemaRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public LoadArraySchemaRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LoadArraySchemaRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of LoadArraySchemaRequest + * @throws IOException if the JSON string is invalid with respect to LoadArraySchemaRequest + */ + public static LoadArraySchemaRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoadArraySchemaRequest.class); + } + + /** + * Convert an instance of LoadArraySchemaRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/LoadArraySchemaResponse.java b/src/main/java/io/tiledb/cloud/rest_api/model/LoadArraySchemaResponse.java new file mode 100644 index 0000000..fe37824 --- /dev/null +++ b/src/main/java/io/tiledb/cloud/rest_api/model/LoadArraySchemaResponse.java @@ -0,0 +1,245 @@ +/* + * TileDB Storage Platform API + * TileDB Storage Platform REST API + * + * The version of the OpenAPI document: 2.17.51 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +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 java.util.HashMap; +import java.util.Map; +import org.openapitools.client.model.ArraySchema; + +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.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * Contains the latest schema and all schemas for the opened array + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") +public class LoadArraySchemaResponse { + public static final String SERIALIZED_NAME_LATEST_ARRAY_SCHEMA = "latest_array_schema"; + @SerializedName(SERIALIZED_NAME_LATEST_ARRAY_SCHEMA) + @javax.annotation.Nullable + private ArraySchema latestArraySchema; + + public static final String SERIALIZED_NAME_ALL_ARRAY_SCHEMAS = "all_array_schemas"; + @SerializedName(SERIALIZED_NAME_ALL_ARRAY_SCHEMAS) + @javax.annotation.Nullable + private Map allArraySchemas = new HashMap<>(); + + public LoadArraySchemaResponse() { + } + + public LoadArraySchemaResponse latestArraySchema(@javax.annotation.Nullable ArraySchema latestArraySchema) { + this.latestArraySchema = latestArraySchema; + return this; + } + + /** + * Get latestArraySchema + * @return latestArraySchema + */ + @javax.annotation.Nullable + public ArraySchema getLatestArraySchema() { + return latestArraySchema; + } + + public void setLatestArraySchema(@javax.annotation.Nullable ArraySchema latestArraySchema) { + this.latestArraySchema = latestArraySchema; + } + + + public LoadArraySchemaResponse allArraySchemas(@javax.annotation.Nullable Map allArraySchemas) { + this.allArraySchemas = allArraySchemas; + return this; + } + + public LoadArraySchemaResponse putAllArraySchemasItem(String key, ArraySchema allArraySchemasItem) { + if (this.allArraySchemas == null) { + this.allArraySchemas = new HashMap<>(); + } + this.allArraySchemas.put(key, allArraySchemasItem); + return this; + } + + /** + * map of all array schemas + * @return allArraySchemas + */ + @javax.annotation.Nullable + public Map getAllArraySchemas() { + return allArraySchemas; + } + + public void setAllArraySchemas(@javax.annotation.Nullable Map allArraySchemas) { + this.allArraySchemas = allArraySchemas; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LoadArraySchemaResponse loadArraySchemaResponse = (LoadArraySchemaResponse) o; + return Objects.equals(this.latestArraySchema, loadArraySchemaResponse.latestArraySchema) && + Objects.equals(this.allArraySchemas, loadArraySchemaResponse.allArraySchemas); + } + + @Override + public int hashCode() { + return Objects.hash(latestArraySchema, allArraySchemas); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LoadArraySchemaResponse {\n"); + sb.append(" latestArraySchema: ").append(toIndentedString(latestArraySchema)).append("\n"); + sb.append(" allArraySchemas: ").append(toIndentedString(allArraySchemas)).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("latest_array_schema"); + openapiFields.add("all_array_schemas"); + + // 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 LoadArraySchemaResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LoadArraySchemaResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in LoadArraySchemaResponse is not found in the empty JSON string", LoadArraySchemaResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!LoadArraySchemaResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LoadArraySchemaResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `latest_array_schema` + if (jsonObj.get("latest_array_schema") != null && !jsonObj.get("latest_array_schema").isJsonNull()) { + ArraySchema.validateJsonElement(jsonObj.get("latest_array_schema")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LoadArraySchemaResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoadArraySchemaResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LoadArraySchemaResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LoadArraySchemaResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public LoadArraySchemaResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LoadArraySchemaResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of LoadArraySchemaResponse + * @throws IOException if the JSON string is invalid with respect to LoadArraySchemaResponse + */ + public static LoadArraySchemaResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoadArraySchemaResponse.class); + } + + /** + * Convert an instance of LoadArraySchemaResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/LoadEnumerationsRequest.java b/src/main/java/io/tiledb/cloud/rest_api/model/LoadEnumerationsRequest.java new file mode 100644 index 0000000..019a0d8 --- /dev/null +++ b/src/main/java/io/tiledb/cloud/rest_api/model/LoadEnumerationsRequest.java @@ -0,0 +1,249 @@ +/* + * TileDB Storage Platform API + * TileDB Storage Platform REST API + * + * The version of the OpenAPI document: 2.17.51 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +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 org.openapitools.client.model.TileDBConfig; + +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.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * Request to return enumerations for attributes + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") +public class LoadEnumerationsRequest { + public static final String SERIALIZED_NAME_CONFIG = "config"; + @SerializedName(SERIALIZED_NAME_CONFIG) + @javax.annotation.Nullable + private TileDBConfig config; + + public static final String SERIALIZED_NAME_ENUMERATIONS = "enumerations"; + @SerializedName(SERIALIZED_NAME_ENUMERATIONS) + @javax.annotation.Nullable + private List enumerations = new ArrayList<>(); + + public LoadEnumerationsRequest() { + } + + public LoadEnumerationsRequest config(@javax.annotation.Nullable TileDBConfig config) { + this.config = config; + return this; + } + + /** + * Get config + * @return config + */ + @javax.annotation.Nullable + public TileDBConfig getConfig() { + return config; + } + + public void setConfig(@javax.annotation.Nullable TileDBConfig config) { + this.config = config; + } + + + public LoadEnumerationsRequest enumerations(@javax.annotation.Nullable List enumerations) { + this.enumerations = enumerations; + return this; + } + + public LoadEnumerationsRequest addEnumerationsItem(String enumerationsItem) { + if (this.enumerations == null) { + this.enumerations = new ArrayList<>(); + } + this.enumerations.add(enumerationsItem); + return this; + } + + /** + * Get enumerations + * @return enumerations + */ + @javax.annotation.Nullable + public List getEnumerations() { + return enumerations; + } + + public void setEnumerations(@javax.annotation.Nullable List enumerations) { + this.enumerations = enumerations; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LoadEnumerationsRequest loadEnumerationsRequest = (LoadEnumerationsRequest) o; + return Objects.equals(this.config, loadEnumerationsRequest.config) && + Objects.equals(this.enumerations, loadEnumerationsRequest.enumerations); + } + + @Override + public int hashCode() { + return Objects.hash(config, enumerations); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LoadEnumerationsRequest {\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append(" enumerations: ").append(toIndentedString(enumerations)).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("config"); + openapiFields.add("enumerations"); + + // 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 LoadEnumerationsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LoadEnumerationsRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in LoadEnumerationsRequest is not found in the empty JSON string", LoadEnumerationsRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!LoadEnumerationsRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LoadEnumerationsRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `config` + if (jsonObj.get("config") != null && !jsonObj.get("config").isJsonNull()) { + TileDBConfig.validateJsonElement(jsonObj.get("config")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("enumerations") != null && !jsonObj.get("enumerations").isJsonNull() && !jsonObj.get("enumerations").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `enumerations` to be an array in the JSON string but got `%s`", jsonObj.get("enumerations").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LoadEnumerationsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoadEnumerationsRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LoadEnumerationsRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LoadEnumerationsRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public LoadEnumerationsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LoadEnumerationsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of LoadEnumerationsRequest + * @throws IOException if the JSON string is invalid with respect to LoadEnumerationsRequest + */ + public static LoadEnumerationsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoadEnumerationsRequest.class); + } + + /** + * Convert an instance of LoadEnumerationsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/LoadEnumerationsResponse.java b/src/main/java/io/tiledb/cloud/rest_api/model/LoadEnumerationsResponse.java new file mode 100644 index 0000000..ceadd0b --- /dev/null +++ b/src/main/java/io/tiledb/cloud/rest_api/model/LoadEnumerationsResponse.java @@ -0,0 +1,228 @@ +/* + * TileDB Storage Platform API + * TileDB Storage Platform REST API + * + * The version of the OpenAPI document: 2.17.51 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +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 org.openapitools.client.model.Enumeration; + +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.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * Contains the enumerations of the array's attributes + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") +public class LoadEnumerationsResponse { + public static final String SERIALIZED_NAME_ENUMERATIONS = "enumerations"; + @SerializedName(SERIALIZED_NAME_ENUMERATIONS) + @javax.annotation.Nullable + private List enumerations = new ArrayList<>(); + + public LoadEnumerationsResponse() { + } + + public LoadEnumerationsResponse enumerations(@javax.annotation.Nullable List enumerations) { + this.enumerations = enumerations; + return this; + } + + public LoadEnumerationsResponse addEnumerationsItem(Enumeration enumerationsItem) { + if (this.enumerations == null) { + this.enumerations = new ArrayList<>(); + } + this.enumerations.add(enumerationsItem); + return this; + } + + /** + * Get enumerations + * @return enumerations + */ + @javax.annotation.Nullable + public List getEnumerations() { + return enumerations; + } + + public void setEnumerations(@javax.annotation.Nullable List enumerations) { + this.enumerations = enumerations; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LoadEnumerationsResponse loadEnumerationsResponse = (LoadEnumerationsResponse) o; + return Objects.equals(this.enumerations, loadEnumerationsResponse.enumerations); + } + + @Override + public int hashCode() { + return Objects.hash(enumerations); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LoadEnumerationsResponse {\n"); + sb.append(" enumerations: ").append(toIndentedString(enumerations)).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("enumerations"); + + // 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 LoadEnumerationsResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LoadEnumerationsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in LoadEnumerationsResponse is not found in the empty JSON string", LoadEnumerationsResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!LoadEnumerationsResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LoadEnumerationsResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("enumerations") != null && !jsonObj.get("enumerations").isJsonNull()) { + JsonArray jsonArrayenumerations = jsonObj.getAsJsonArray("enumerations"); + if (jsonArrayenumerations != null) { + // ensure the json data is an array + if (!jsonObj.get("enumerations").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `enumerations` to be an array in the JSON string but got `%s`", jsonObj.get("enumerations").toString())); + } + + // validate the optional field `enumerations` (array) + for (int i = 0; i < jsonArrayenumerations.size(); i++) { + Enumeration.validateJsonElement(jsonArrayenumerations.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LoadEnumerationsResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoadEnumerationsResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LoadEnumerationsResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LoadEnumerationsResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public LoadEnumerationsResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LoadEnumerationsResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of LoadEnumerationsResponse + * @throws IOException if the JSON string is invalid with respect to LoadEnumerationsResponse + */ + public static LoadEnumerationsResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoadEnumerationsResponse.class); + } + + /** + * Convert an instance of LoadEnumerationsResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/MLModelFavorite.java b/src/main/java/io/tiledb/cloud/rest_api/model/MLModelFavorite.java index b2e1648..70e970f 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/MLModelFavorite.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/MLModelFavorite.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,154 +11,119 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * A user-favorite MLModel item */ -@ApiModel(description = "A user-favorite MLModel item") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class MLModelFavorite { public static final String SERIALIZED_NAME_MLMODEL_UUID = "mlmodel_uuid"; @SerializedName(SERIALIZED_NAME_MLMODEL_UUID) + @javax.annotation.Nullable private String mlmodelUuid; public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; @SerializedName(SERIALIZED_NAME_NAMESPACE) + @javax.annotation.Nullable private String namespace; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public MLModelFavorite() { } - public MLModelFavorite mlmodelUuid(String mlmodelUuid) { - + public MLModelFavorite mlmodelUuid(@javax.annotation.Nullable String mlmodelUuid) { this.mlmodelUuid = mlmodelUuid; return this; } - /** + /** * unique UUID of the MLModel * @return mlmodelUuid - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "unique UUID of the MLModel") - public String getMlmodelUuid() { return mlmodelUuid; } - - public void setMlmodelUuid(String mlmodelUuid) { + public void setMlmodelUuid(@javax.annotation.Nullable String mlmodelUuid) { this.mlmodelUuid = mlmodelUuid; } - public MLModelFavorite namespace(String namespace) { - + public MLModelFavorite namespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; return this; } - /** + /** * the namespace of the MLModel * @return namespace - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "the namespace of the MLModel") - public String getNamespace() { return namespace; } - - public void setNamespace(String namespace) { + public void setNamespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; } - public MLModelFavorite name(String name) { - + public MLModelFavorite name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * the name of the MLModel * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "the name of the MLModel") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - /** - * 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. - */ - public MLModelFavorite 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -172,13 +137,12 @@ public boolean equals(Object o) { MLModelFavorite mlModelFavorite = (MLModelFavorite) o; return Objects.equals(this.mlmodelUuid, mlModelFavorite.mlmodelUuid) && Objects.equals(this.namespace, mlModelFavorite.namespace) && - Objects.equals(this.name, mlModelFavorite.name)&& - Objects.equals(this.additionalProperties, mlModelFavorite.additionalProperties); + Objects.equals(this.name, mlModelFavorite.name); } @Override public int hashCode() { - return Objects.hash(mlmodelUuid, namespace, name, additionalProperties); + return Objects.hash(mlmodelUuid, namespace, name); } @Override @@ -188,7 +152,6 @@ public String toString() { sb.append(" mlmodelUuid: ").append(toIndentedString(mlmodelUuid)).append("\n"); sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -219,20 +182,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to MLModelFavorite - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (MLModelFavorite.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 MLModelFavorite + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MLModelFavorite.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in MLModelFavorite is not found in the empty JSON string", MLModelFavorite.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!MLModelFavorite.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MLModelFavorite` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("mlmodel_uuid") != null && !jsonObj.get("mlmodel_uuid").isJsonNull()) && !jsonObj.get("mlmodel_uuid").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `mlmodel_uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mlmodel_uuid").toString())); } @@ -259,71 +229,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, MLModelFavorite value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 MLModelFavorite read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - MLModelFavorite 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of MLModelFavorite given an JSON string - * - * @param jsonString JSON string - * @return An instance of MLModelFavorite - * @throws IOException if the JSON string is invalid with respect to MLModelFavorite - */ + /** + * Create an instance of MLModelFavorite given an JSON string + * + * @param jsonString JSON string + * @return An instance of MLModelFavorite + * @throws IOException if the JSON string is invalid with respect to MLModelFavorite + */ public static MLModelFavorite fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, MLModelFavorite.class); } - /** - * Convert an instance of MLModelFavorite to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of MLModelFavorite to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/MLModelFavoritesData.java b/src/main/java/io/tiledb/cloud/rest_api/model/MLModelFavoritesData.java index d17853c..93b268b 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/MLModelFavoritesData.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/MLModelFavoritesData.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,52 +11,63 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.ArrayInfo; +import org.openapitools.client.model.PaginationMetadata; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Object including MLModel favorites and pagination metadata */ -@ApiModel(description = "Object including MLModel favorites and pagination metadata") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class MLModelFavoritesData { public static final String SERIALIZED_NAME_MLMODELS = "mlmodels"; @SerializedName(SERIALIZED_NAME_MLMODELS) - private List mlmodels = null; + @javax.annotation.Nullable + private List mlmodels = new ArrayList<>(); public static final String SERIALIZED_NAME_PAGINATION_METADATA = "pagination_metadata"; @SerializedName(SERIALIZED_NAME_PAGINATION_METADATA) + @javax.annotation.Nullable private PaginationMetadata paginationMetadata; public MLModelFavoritesData() { } - public MLModelFavoritesData mlmodels(List mlmodels) { - + public MLModelFavoritesData mlmodels(@javax.annotation.Nullable List mlmodels) { this.mlmodels = mlmodels; return this; } @@ -69,80 +80,38 @@ public MLModelFavoritesData addMlmodelsItem(ArrayInfo mlmodelsItem) { return this; } - /** + /** * List of MLModel infos * @return mlmodels - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "List of MLModel infos") - public List getMlmodels() { return mlmodels; } - - public void setMlmodels(List mlmodels) { + public void setMlmodels(@javax.annotation.Nullable List mlmodels) { this.mlmodels = mlmodels; } - public MLModelFavoritesData paginationMetadata(PaginationMetadata paginationMetadata) { - + public MLModelFavoritesData paginationMetadata(@javax.annotation.Nullable PaginationMetadata paginationMetadata) { this.paginationMetadata = paginationMetadata; return this; } - /** + /** * Get paginationMetadata * @return paginationMetadata - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public PaginationMetadata getPaginationMetadata() { return paginationMetadata; } - - public void setPaginationMetadata(PaginationMetadata paginationMetadata) { + public void setPaginationMetadata(@javax.annotation.Nullable PaginationMetadata paginationMetadata) { this.paginationMetadata = paginationMetadata; } - /** - * 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. - */ - public MLModelFavoritesData 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -155,13 +124,12 @@ public boolean equals(Object o) { } MLModelFavoritesData mlModelFavoritesData = (MLModelFavoritesData) o; return Objects.equals(this.mlmodels, mlModelFavoritesData.mlmodels) && - Objects.equals(this.paginationMetadata, mlModelFavoritesData.paginationMetadata)&& - Objects.equals(this.additionalProperties, mlModelFavoritesData.additionalProperties); + Objects.equals(this.paginationMetadata, mlModelFavoritesData.paginationMetadata); } @Override public int hashCode() { - return Objects.hash(mlmodels, paginationMetadata, additionalProperties); + return Objects.hash(mlmodels, paginationMetadata); } @Override @@ -170,7 +138,6 @@ public String toString() { sb.append("class MLModelFavoritesData {\n"); sb.append(" mlmodels: ").append(toIndentedString(mlmodels)).append("\n"); sb.append(" paginationMetadata: ").append(toIndentedString(paginationMetadata)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -200,35 +167,44 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to MLModelFavoritesData - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (MLModelFavoritesData.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 MLModelFavoritesData + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MLModelFavoritesData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in MLModelFavoritesData is not found in the empty JSON string", MLModelFavoritesData.openapiRequiredFields.toString())); } } - JsonArray jsonArraymlmodels = jsonObj.getAsJsonArray("mlmodels"); - if (jsonArraymlmodels != null) { - // ensure the json data is an array - if (!jsonObj.get("mlmodels").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `mlmodels` to be an array in the JSON string but got `%s`", jsonObj.get("mlmodels").toString())); - } - // validate the optional field `mlmodels` (array) - for (int i = 0; i < jsonArraymlmodels.size(); i++) { - ArrayInfo.validateJsonObject(jsonArraymlmodels.get(i).getAsJsonObject()); - }; + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!MLModelFavoritesData.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MLModelFavoritesData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("mlmodels") != null && !jsonObj.get("mlmodels").isJsonNull()) { + JsonArray jsonArraymlmodels = jsonObj.getAsJsonArray("mlmodels"); + if (jsonArraymlmodels != null) { + // ensure the json data is an array + if (!jsonObj.get("mlmodels").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `mlmodels` to be an array in the JSON string but got `%s`", jsonObj.get("mlmodels").toString())); + } + + // validate the optional field `mlmodels` (array) + for (int i = 0; i < jsonArraymlmodels.size(); i++) { + ArrayInfo.validateJsonElement(jsonArraymlmodels.get(i)); + }; + } } // validate the optional field `pagination_metadata` if (jsonObj.get("pagination_metadata") != null && !jsonObj.get("pagination_metadata").isJsonNull()) { - PaginationMetadata.validateJsonObject(jsonObj.getAsJsonObject("pagination_metadata")); + PaginationMetadata.validateJsonElement(jsonObj.get("pagination_metadata")); } } @@ -247,71 +223,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, MLModelFavoritesData value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 MLModelFavoritesData read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - MLModelFavoritesData 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of MLModelFavoritesData given an JSON string - * - * @param jsonString JSON string - * @return An instance of MLModelFavoritesData - * @throws IOException if the JSON string is invalid with respect to MLModelFavoritesData - */ + /** + * Create an instance of MLModelFavoritesData given an JSON string + * + * @param jsonString JSON string + * @return An instance of MLModelFavoritesData + * @throws IOException if the JSON string is invalid with respect to MLModelFavoritesData + */ public static MLModelFavoritesData fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, MLModelFavoritesData.class); } - /** - * Convert an instance of MLModelFavoritesData to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of MLModelFavoritesData to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/MaxBufferSizes.java b/src/main/java/io/tiledb/cloud/rest_api/model/MaxBufferSizes.java index e82a328..31efa4d 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/MaxBufferSizes.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/MaxBufferSizes.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,48 +11,57 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.AttributeBufferSize; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * a list of max buffer sizes, one per attribute */ -@ApiModel(description = "a list of max buffer sizes, one per attribute") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class MaxBufferSizes { public static final String SERIALIZED_NAME_MAX_BUFFER_SIZES = "maxBufferSizes"; @SerializedName(SERIALIZED_NAME_MAX_BUFFER_SIZES) - private List maxBufferSizes = null; + @javax.annotation.Nullable + private List maxBufferSizes = new ArrayList<>(); public MaxBufferSizes() { } - public MaxBufferSizes maxBufferSizes(List maxBufferSizes) { - + public MaxBufferSizes maxBufferSizes(@javax.annotation.Nullable List maxBufferSizes) { this.maxBufferSizes = maxBufferSizes; return this; } @@ -65,57 +74,19 @@ public MaxBufferSizes addMaxBufferSizesItem(AttributeBufferSize maxBufferSizesIt return this; } - /** + /** * Get maxBufferSizes * @return maxBufferSizes - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getMaxBufferSizes() { return maxBufferSizes; } - - public void setMaxBufferSizes(List maxBufferSizes) { + public void setMaxBufferSizes(@javax.annotation.Nullable List maxBufferSizes) { this.maxBufferSizes = maxBufferSizes; } - /** - * 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. - */ - public MaxBufferSizes 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -127,13 +98,12 @@ public boolean equals(Object o) { return false; } MaxBufferSizes maxBufferSizes = (MaxBufferSizes) o; - return Objects.equals(this.maxBufferSizes, maxBufferSizes.maxBufferSizes)&& - Objects.equals(this.additionalProperties, maxBufferSizes.additionalProperties); + return Objects.equals(this.maxBufferSizes, maxBufferSizes.maxBufferSizes); } @Override public int hashCode() { - return Objects.hash(maxBufferSizes, additionalProperties); + return Objects.hash(maxBufferSizes); } @Override @@ -141,7 +111,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MaxBufferSizes {\n"); sb.append(" maxBufferSizes: ").append(toIndentedString(maxBufferSizes)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -170,31 +139,40 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to MaxBufferSizes - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (MaxBufferSizes.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 MaxBufferSizes + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MaxBufferSizes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in MaxBufferSizes is not found in the empty JSON string", MaxBufferSizes.openapiRequiredFields.toString())); } } - JsonArray jsonArraymaxBufferSizes = jsonObj.getAsJsonArray("maxBufferSizes"); - if (jsonArraymaxBufferSizes != null) { - // ensure the json data is an array - if (!jsonObj.get("maxBufferSizes").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `maxBufferSizes` to be an array in the JSON string but got `%s`", jsonObj.get("maxBufferSizes").toString())); - } - // validate the optional field `maxBufferSizes` (array) - for (int i = 0; i < jsonArraymaxBufferSizes.size(); i++) { - AttributeBufferSize.validateJsonObject(jsonArraymaxBufferSizes.get(i).getAsJsonObject()); - }; + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!MaxBufferSizes.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MaxBufferSizes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("maxBufferSizes") != null && !jsonObj.get("maxBufferSizes").isJsonNull()) { + JsonArray jsonArraymaxBufferSizes = jsonObj.getAsJsonArray("maxBufferSizes"); + if (jsonArraymaxBufferSizes != null) { + // ensure the json data is an array + if (!jsonObj.get("maxBufferSizes").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `maxBufferSizes` to be an array in the JSON string but got `%s`", jsonObj.get("maxBufferSizes").toString())); + } + + // validate the optional field `maxBufferSizes` (array) + for (int i = 0; i < jsonArraymaxBufferSizes.size(); i++) { + AttributeBufferSize.validateJsonElement(jsonArraymaxBufferSizes.get(i)); + }; + } } } @@ -213,71 +191,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, MaxBufferSizes value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 MaxBufferSizes read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - MaxBufferSizes 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of MaxBufferSizes given an JSON string - * - * @param jsonString JSON string - * @return An instance of MaxBufferSizes - * @throws IOException if the JSON string is invalid with respect to MaxBufferSizes - */ + /** + * Create an instance of MaxBufferSizes given an JSON string + * + * @param jsonString JSON string + * @return An instance of MaxBufferSizes + * @throws IOException if the JSON string is invalid with respect to MaxBufferSizes + */ public static MaxBufferSizes fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, MaxBufferSizes.class); } - /** - * Convert an instance of MaxBufferSizes to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of MaxBufferSizes to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/MetadataStringified.java b/src/main/java/io/tiledb/cloud/rest_api/model/MetadataStringified.java new file mode 100644 index 0000000..cbc1af3 --- /dev/null +++ b/src/main/java/io/tiledb/cloud/rest_api/model/MetadataStringified.java @@ -0,0 +1,228 @@ +/* + * TileDB Storage Platform API + * TileDB Storage Platform REST API + * + * The version of the OpenAPI document: 2.17.51 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +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 org.openapitools.client.model.MetadataStringifiedEntry; + +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.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * The user's TileDB metadata + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") +public class MetadataStringified { + public static final String SERIALIZED_NAME_ENTRIES = "entries"; + @SerializedName(SERIALIZED_NAME_ENTRIES) + @javax.annotation.Nullable + private List entries = new ArrayList<>(); + + public MetadataStringified() { + } + + public MetadataStringified entries(@javax.annotation.Nullable List entries) { + this.entries = entries; + return this; + } + + public MetadataStringified addEntriesItem(MetadataStringifiedEntry entriesItem) { + if (this.entries == null) { + this.entries = new ArrayList<>(); + } + this.entries.add(entriesItem); + return this; + } + + /** + * List of metadata entries + * @return entries + */ + @javax.annotation.Nullable + public List getEntries() { + return entries; + } + + public void setEntries(@javax.annotation.Nullable List entries) { + this.entries = entries; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MetadataStringified metadataStringified = (MetadataStringified) o; + return Objects.equals(this.entries, metadataStringified.entries); + } + + @Override + public int hashCode() { + return Objects.hash(entries); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MetadataStringified {\n"); + sb.append(" entries: ").append(toIndentedString(entries)).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("entries"); + + // 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 MetadataStringified + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MetadataStringified.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in MetadataStringified is not found in the empty JSON string", MetadataStringified.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!MetadataStringified.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MetadataStringified` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("entries") != null && !jsonObj.get("entries").isJsonNull()) { + JsonArray jsonArrayentries = jsonObj.getAsJsonArray("entries"); + if (jsonArrayentries != null) { + // ensure the json data is an array + if (!jsonObj.get("entries").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `entries` to be an array in the JSON string but got `%s`", jsonObj.get("entries").toString())); + } + + // validate the optional field `entries` (array) + for (int i = 0; i < jsonArrayentries.size(); i++) { + MetadataStringifiedEntry.validateJsonElement(jsonArrayentries.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MetadataStringified.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MetadataStringified' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MetadataStringified.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MetadataStringified value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public MetadataStringified read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of MetadataStringified given an JSON string + * + * @param jsonString JSON string + * @return An instance of MetadataStringified + * @throws IOException if the JSON string is invalid with respect to MetadataStringified + */ + public static MetadataStringified fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MetadataStringified.class); + } + + /** + * Convert an instance of MetadataStringified to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/MetadataStringifiedEntry.java b/src/main/java/io/tiledb/cloud/rest_api/model/MetadataStringifiedEntry.java new file mode 100644 index 0000000..9e0c1a7 --- /dev/null +++ b/src/main/java/io/tiledb/cloud/rest_api/model/MetadataStringifiedEntry.java @@ -0,0 +1,266 @@ +/* + * TileDB Storage Platform API + * TileDB Storage Platform REST API + * + * The version of the OpenAPI document: 2.17.51 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +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.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * key/value pair representing an asset metadata map entry + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") +public class MetadataStringifiedEntry { + public static final String SERIALIZED_NAME_KEY = "key"; + @SerializedName(SERIALIZED_NAME_KEY) + @javax.annotation.Nullable + private String key; + + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nullable + private String value; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private String type; + + public MetadataStringifiedEntry() { + } + + public MetadataStringifiedEntry key(@javax.annotation.Nullable String key) { + this.key = key; + return this; + } + + /** + * The metadata key + * @return key + */ + @javax.annotation.Nullable + public String getKey() { + return key; + } + + public void setKey(@javax.annotation.Nullable String key) { + this.key = key; + } + + + public MetadataStringifiedEntry value(@javax.annotation.Nullable String value) { + this.value = value; + return this; + } + + /** + * The metadata value + * @return value + */ + @javax.annotation.Nullable + public String getValue() { + return value; + } + + public void setValue(@javax.annotation.Nullable String value) { + this.value = value; + } + + + public MetadataStringifiedEntry type(@javax.annotation.Nullable String type) { + this.type = type; + return this; + } + + /** + * The metadata type + * @return type + */ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nullable String type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MetadataStringifiedEntry metadataStringifiedEntry = (MetadataStringifiedEntry) o; + return Objects.equals(this.key, metadataStringifiedEntry.key) && + Objects.equals(this.value, metadataStringifiedEntry.value) && + Objects.equals(this.type, metadataStringifiedEntry.type); + } + + @Override + public int hashCode() { + return Objects.hash(key, value, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MetadataStringifiedEntry {\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).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("key"); + openapiFields.add("value"); + openapiFields.add("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 MetadataStringifiedEntry + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MetadataStringifiedEntry.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in MetadataStringifiedEntry is not found in the empty JSON string", MetadataStringifiedEntry.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!MetadataStringifiedEntry.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MetadataStringifiedEntry` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("key") != null && !jsonObj.get("key").isJsonNull()) && !jsonObj.get("key").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); + } + if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) && !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())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MetadataStringifiedEntry.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MetadataStringifiedEntry' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MetadataStringifiedEntry.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MetadataStringifiedEntry value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public MetadataStringifiedEntry read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of MetadataStringifiedEntry given an JSON string + * + * @param jsonString JSON string + * @return An instance of MetadataStringifiedEntry + * @throws IOException if the JSON string is invalid with respect to MetadataStringifiedEntry + */ + public static MetadataStringifiedEntry fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MetadataStringifiedEntry.class); + } + + /** + * Convert an instance of MetadataStringifiedEntry to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/MultiArrayUDF.java b/src/main/java/io/tiledb/cloud/rest_api/model/MultiArrayUDF.java index 4f31df8..5d2927b 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/MultiArrayUDF.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/MultiArrayUDF.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,387 +11,377 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; - -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.model.QueryRanges; +import org.openapitools.client.model.ResultFormat; +import org.openapitools.client.model.TGUDFArgument; +import org.openapitools.client.model.UDFArrayDetails; +import org.openapitools.client.model.UDFLanguage; +import org.openapitools.client.model.UDFSubarray; import org.openapitools.jackson.nullable.JsonNullable; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; /** * User-defined function */ -@ApiModel(description = "User-defined function") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class MultiArrayUDF { public static final String SERIALIZED_NAME_UDF_INFO_NAME = "udf_info_name"; @SerializedName(SERIALIZED_NAME_UDF_INFO_NAME) + @javax.annotation.Nullable private String udfInfoName; public static final String SERIALIZED_NAME_LANGUAGE = "language"; @SerializedName(SERIALIZED_NAME_LANGUAGE) + @javax.annotation.Nullable private UDFLanguage language; public static final String SERIALIZED_NAME_VERSION = "version"; @SerializedName(SERIALIZED_NAME_VERSION) + @javax.annotation.Nullable private String version; public static final String SERIALIZED_NAME_IMAGE_NAME = "image_name"; @SerializedName(SERIALIZED_NAME_IMAGE_NAME) + @javax.annotation.Nullable private String imageName; public static final String SERIALIZED_NAME_ACCESS_CREDENTIALS_NAME = "access_credentials_name"; @SerializedName(SERIALIZED_NAME_ACCESS_CREDENTIALS_NAME) + @javax.annotation.Nullable private String accessCredentialsName; public static final String SERIALIZED_NAME_RESOURCE_CLASS = "resource_class"; @SerializedName(SERIALIZED_NAME_RESOURCE_CLASS) + @javax.annotation.Nullable private String resourceClass; public static final String SERIALIZED_NAME_EXEC = "exec"; @SerializedName(SERIALIZED_NAME_EXEC) + @javax.annotation.Nullable private String exec; public static final String SERIALIZED_NAME_EXEC_RAW = "exec_raw"; @SerializedName(SERIALIZED_NAME_EXEC_RAW) + @javax.annotation.Nullable private String execRaw; public static final String SERIALIZED_NAME_RESULT_FORMAT = "result_format"; @SerializedName(SERIALIZED_NAME_RESULT_FORMAT) + @javax.annotation.Nullable private ResultFormat resultFormat; public static final String SERIALIZED_NAME_TASK_NAME = "task_name"; @SerializedName(SERIALIZED_NAME_TASK_NAME) + @javax.annotation.Nullable private String taskName; public static final String SERIALIZED_NAME_ARGUMENT = "argument"; @SerializedName(SERIALIZED_NAME_ARGUMENT) + @javax.annotation.Nullable private String argument; public static final String SERIALIZED_NAME_ARGUMENTS_JSON = "arguments_json"; @SerializedName(SERIALIZED_NAME_ARGUMENTS_JSON) - private List argumentsJson = null; + @javax.annotation.Nullable + private List argumentsJson; public static final String SERIALIZED_NAME_STORED_PARAM_UUIDS = "stored_param_uuids"; @SerializedName(SERIALIZED_NAME_STORED_PARAM_UUIDS) - private List storedParamUuids = null; + @javax.annotation.Nullable + private List storedParamUuids = new ArrayList<>(); public static final String SERIALIZED_NAME_STORE_RESULTS = "store_results"; @SerializedName(SERIALIZED_NAME_STORE_RESULTS) + @javax.annotation.Nullable private Boolean storeResults; public static final String SERIALIZED_NAME_DONT_DOWNLOAD_RESULTS = "dont_download_results"; @SerializedName(SERIALIZED_NAME_DONT_DOWNLOAD_RESULTS) + @javax.annotation.Nullable private Boolean dontDownloadResults; public static final String SERIALIZED_NAME_RANGES = "ranges"; @SerializedName(SERIALIZED_NAME_RANGES) + @javax.annotation.Nullable private QueryRanges ranges; public static final String SERIALIZED_NAME_SUBARRAY = "subarray"; @SerializedName(SERIALIZED_NAME_SUBARRAY) + @javax.annotation.Nullable private UDFSubarray subarray; public static final String SERIALIZED_NAME_BUFFERS = "buffers"; @SerializedName(SERIALIZED_NAME_BUFFERS) - private List buffers = null; + @javax.annotation.Nullable + private List buffers = new ArrayList<>(); public static final String SERIALIZED_NAME_ARRAYS = "arrays"; @SerializedName(SERIALIZED_NAME_ARRAYS) - private List arrays = null; + @javax.annotation.Nullable + private List arrays = new ArrayList<>(); public static final String SERIALIZED_NAME_TIMEOUT = "timeout"; @SerializedName(SERIALIZED_NAME_TIMEOUT) + @javax.annotation.Nullable private Integer timeout; public static final String SERIALIZED_NAME_TASK_GRAPH_UUID = "task_graph_uuid"; @SerializedName(SERIALIZED_NAME_TASK_GRAPH_UUID) + @javax.annotation.Nullable private String taskGraphUuid; public static final String SERIALIZED_NAME_CLIENT_NODE_UUID = "client_node_uuid"; @SerializedName(SERIALIZED_NAME_CLIENT_NODE_UUID) + @javax.annotation.Nullable private String clientNodeUuid; public MultiArrayUDF() { } - public MultiArrayUDF udfInfoName(String udfInfoName) { - + public MultiArrayUDF udfInfoName(@javax.annotation.Nullable String udfInfoName) { this.udfInfoName = udfInfoName; return this; } - /** + /** * name of UDFInfo to run, format is {namespace}/{udf_name}. Can not be used with exec * @return udfInfoName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "TileDB-Inc/quickstart_median", value = "name of UDFInfo to run, format is {namespace}/{udf_name}. Can not be used with exec") - public String getUdfInfoName() { return udfInfoName; } - - public void setUdfInfoName(String udfInfoName) { + public void setUdfInfoName(@javax.annotation.Nullable String udfInfoName) { this.udfInfoName = udfInfoName; } - public MultiArrayUDF language(UDFLanguage language) { - + public MultiArrayUDF language(@javax.annotation.Nullable UDFLanguage language) { this.language = language; return this; } - /** + /** * Get language * @return language - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public UDFLanguage getLanguage() { return language; } - - public void setLanguage(UDFLanguage language) { + public void setLanguage(@javax.annotation.Nullable UDFLanguage language) { this.language = language; } - public MultiArrayUDF version(String version) { - + public MultiArrayUDF version(@javax.annotation.Nullable String version) { this.version = version; return this; } - /** + /** * Type-specific version * @return version - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Type-specific version") - public String getVersion() { return version; } - - public void setVersion(String version) { + public void setVersion(@javax.annotation.Nullable String version) { this.version = version; } - public MultiArrayUDF imageName(String imageName) { - + public MultiArrayUDF imageName(@javax.annotation.Nullable String imageName) { this.imageName = imageName; return this; } - /** + /** * Docker image name to use for UDF * @return imageName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Docker image name to use for UDF") - public String getImageName() { return imageName; } - - public void setImageName(String imageName) { + public void setImageName(@javax.annotation.Nullable String imageName) { this.imageName = imageName; } - public MultiArrayUDF accessCredentialsName(String accessCredentialsName) { - + public MultiArrayUDF accessCredentialsName(@javax.annotation.Nullable String accessCredentialsName) { this.accessCredentialsName = accessCredentialsName; return this; } - /** + /** * The name of the access credentials to use. if unset, no credentials will be configured in the environment. * @return accessCredentialsName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The name of the access credentials to use. if unset, no credentials will be configured in the environment.") - public String getAccessCredentialsName() { return accessCredentialsName; } - - public void setAccessCredentialsName(String accessCredentialsName) { + public void setAccessCredentialsName(@javax.annotation.Nullable String accessCredentialsName) { this.accessCredentialsName = accessCredentialsName; } - public MultiArrayUDF resourceClass(String resourceClass) { - + public MultiArrayUDF resourceClass(@javax.annotation.Nullable String resourceClass) { this.resourceClass = resourceClass; return this; } - /** + /** * The resource class to use for the UDF execution. Resource classes define resource limits for memory and CPUs. If this is empty, then the UDF will execute in the standard resource class of the TileDB Cloud provider. * @return resourceClass - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "standard", value = "The resource class to use for the UDF execution. Resource classes define resource limits for memory and CPUs. If this is empty, then the UDF will execute in the standard resource class of the TileDB Cloud provider. ") - public String getResourceClass() { return resourceClass; } - - public void setResourceClass(String resourceClass) { + public void setResourceClass(@javax.annotation.Nullable String resourceClass) { this.resourceClass = resourceClass; } - public MultiArrayUDF exec(String exec) { - + public MultiArrayUDF exec(@javax.annotation.Nullable String exec) { this.exec = exec; return this; } - /** + /** * Type-specific executable text * @return exec - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Type-specific executable text") - public String getExec() { return exec; } - - public void setExec(String exec) { + public void setExec(@javax.annotation.Nullable String exec) { this.exec = exec; } - public MultiArrayUDF execRaw(String execRaw) { - + public MultiArrayUDF execRaw(@javax.annotation.Nullable String execRaw) { this.execRaw = execRaw; return this; } - /** + /** * optional raw text to store of serialized function, used for showing in UI * @return execRaw - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "optional raw text to store of serialized function, used for showing in UI") - public String getExecRaw() { return execRaw; } - - public void setExecRaw(String execRaw) { + public void setExecRaw(@javax.annotation.Nullable String execRaw) { this.execRaw = execRaw; } - public MultiArrayUDF resultFormat(ResultFormat resultFormat) { - + public MultiArrayUDF resultFormat(@javax.annotation.Nullable ResultFormat resultFormat) { this.resultFormat = resultFormat; return this; } - /** + /** * Get resultFormat * @return resultFormat - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public ResultFormat getResultFormat() { return resultFormat; } - - public void setResultFormat(ResultFormat resultFormat) { + public void setResultFormat(@javax.annotation.Nullable ResultFormat resultFormat) { this.resultFormat = resultFormat; } - public MultiArrayUDF taskName(String taskName) { - + public MultiArrayUDF taskName(@javax.annotation.Nullable String taskName) { this.taskName = taskName; return this; } - /** + /** * name of task, optional * @return taskName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "name of task, optional") - public String getTaskName() { return taskName; } - - public void setTaskName(String taskName) { + public void setTaskName(@javax.annotation.Nullable String taskName) { this.taskName = taskName; } - public MultiArrayUDF argument(String argument) { - + public MultiArrayUDF argument(@javax.annotation.Nullable String argument) { this.argument = argument; return this; } - /** + /** * Deprecated: Prefer to use `argument_json` instead. Argument(s) to pass to UDF function, tuple or list of args/kwargs which can be in native or JSON format * @return argument - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Deprecated: Prefer to use `argument_json` instead. Argument(s) to pass to UDF function, tuple or list of args/kwargs which can be in native or JSON format ") - public String getArgument() { return argument; } - - public void setArgument(String argument) { + public void setArgument(@javax.annotation.Nullable String argument) { this.argument = argument; } - public MultiArrayUDF argumentsJson(List argumentsJson) { - + public MultiArrayUDF argumentsJson(@javax.annotation.Nullable List argumentsJson) { this.argumentsJson = argumentsJson; return this; } @@ -404,25 +394,21 @@ public MultiArrayUDF addArgumentsJsonItem(TGUDFArgument argumentsJsonItem) { return this; } - /** + /** * A series of key-value pairs to be passed as arguments into the UDF. See `TGUDFNodeData.arguments` for more information. If this format is used to pass arguments, arrays will be passed into the UDF as specified by the Node placeholders passed in here, rather than the classic method of putting all array arguments in the first parameter. Either this or `argument` should be set. * @return argumentsJson - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "A series of key-value pairs to be passed as arguments into the UDF. See `TGUDFNodeData.arguments` for more information. If this format is used to pass arguments, arrays will be passed into the UDF as specified by the Node placeholders passed in here, rather than the classic method of putting all array arguments in the first parameter. Either this or `argument` should be set. ") - public List getArgumentsJson() { return argumentsJson; } - - public void setArgumentsJson(List argumentsJson) { + public void setArgumentsJson(@javax.annotation.Nullable List argumentsJson) { this.argumentsJson = argumentsJson; } - public MultiArrayUDF storedParamUuids(List storedParamUuids) { - + public MultiArrayUDF storedParamUuids(@javax.annotation.Nullable List storedParamUuids) { this.storedParamUuids = storedParamUuids; return this; } @@ -435,117 +421,97 @@ public MultiArrayUDF addStoredParamUuidsItem(String storedParamUuidsItem) { return this; } - /** + /** * The UUIDs of stored input parameters (passed in a language-specific format within \"argument\") to be retrieved from the server-side cache. Serialized in standard hex format with no {}. * @return storedParamUuids - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The UUIDs of stored input parameters (passed in a language-specific format within \"argument\") to be retrieved from the server-side cache. Serialized in standard hex format with no {}.") - public List getStoredParamUuids() { return storedParamUuids; } - - public void setStoredParamUuids(List storedParamUuids) { + public void setStoredParamUuids(@javax.annotation.Nullable List storedParamUuids) { this.storedParamUuids = storedParamUuids; } - public MultiArrayUDF storeResults(Boolean storeResults) { - + public MultiArrayUDF storeResults(@javax.annotation.Nullable Boolean storeResults) { this.storeResults = storeResults; return this; } - /** + /** * store results for later retrieval * @return storeResults - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "store results for later retrieval") - public Boolean getStoreResults() { return storeResults; } - - public void setStoreResults(Boolean storeResults) { + public void setStoreResults(@javax.annotation.Nullable Boolean storeResults) { this.storeResults = storeResults; } - public MultiArrayUDF dontDownloadResults(Boolean dontDownloadResults) { - + public MultiArrayUDF dontDownloadResults(@javax.annotation.Nullable Boolean dontDownloadResults) { this.dontDownloadResults = dontDownloadResults; return this; } - /** + /** * Set to true to avoid downloading the results of this UDF. Useful for intermediate nodes in a task graph where you will not be using the results of your function. Defaults to false (\"yes download results\"). * @return dontDownloadResults - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Set to true to avoid downloading the results of this UDF. Useful for intermediate nodes in a task graph where you will not be using the results of your function. Defaults to false (\"yes download results\").") - public Boolean getDontDownloadResults() { return dontDownloadResults; } - - public void setDontDownloadResults(Boolean dontDownloadResults) { + public void setDontDownloadResults(@javax.annotation.Nullable Boolean dontDownloadResults) { this.dontDownloadResults = dontDownloadResults; } - public MultiArrayUDF ranges(QueryRanges ranges) { - + public MultiArrayUDF ranges(@javax.annotation.Nullable QueryRanges ranges) { this.ranges = ranges; return this; } - /** + /** * Get ranges * @return ranges - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public QueryRanges getRanges() { return ranges; } - - public void setRanges(QueryRanges ranges) { + public void setRanges(@javax.annotation.Nullable QueryRanges ranges) { this.ranges = ranges; } - public MultiArrayUDF subarray(UDFSubarray subarray) { - + public MultiArrayUDF subarray(@javax.annotation.Nullable UDFSubarray subarray) { this.subarray = subarray; return this; } - /** + /** * Get subarray * @return subarray - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public UDFSubarray getSubarray() { return subarray; } - - public void setSubarray(UDFSubarray subarray) { + public void setSubarray(@javax.annotation.Nullable UDFSubarray subarray) { this.subarray = subarray; } - public MultiArrayUDF buffers(List buffers) { - + public MultiArrayUDF buffers(@javax.annotation.Nullable List buffers) { this.buffers = buffers; return this; } @@ -558,25 +524,21 @@ public MultiArrayUDF addBuffersItem(String buffersItem) { return this; } - /** + /** * List of buffers to fetch (attributes + dimensions). Deprecated; please set arrays with `UDFArrayDetails`. * @return buffers - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "List of buffers to fetch (attributes + dimensions). Deprecated; please set arrays with `UDFArrayDetails`.") - public List getBuffers() { return buffers; } - - public void setBuffers(List buffers) { + public void setBuffers(@javax.annotation.Nullable List buffers) { this.buffers = buffers; } - public MultiArrayUDF arrays(List arrays) { - + public MultiArrayUDF arrays(@javax.annotation.Nullable List arrays) { this.arrays = arrays; return this; } @@ -589,126 +551,76 @@ public MultiArrayUDF addArraysItem(UDFArrayDetails arraysItem) { return this; } - /** + /** * Array ranges/buffer into to run UDF on * @return arrays - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Array ranges/buffer into to run UDF on") - public List getArrays() { return arrays; } - - public void setArrays(List arrays) { + public void setArrays(@javax.annotation.Nullable List arrays) { this.arrays = arrays; } - public MultiArrayUDF timeout(Integer timeout) { - + public MultiArrayUDF timeout(@javax.annotation.Nullable Integer timeout) { this.timeout = timeout; return this; } - /** + /** * UDF-type timeout in seconds (default: 900) * @return timeout - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "UDF-type timeout in seconds (default: 900)") - public Integer getTimeout() { return timeout; } - - public void setTimeout(Integer timeout) { + public void setTimeout(@javax.annotation.Nullable Integer timeout) { this.timeout = timeout; } - public MultiArrayUDF taskGraphUuid(String taskGraphUuid) { - + public MultiArrayUDF taskGraphUuid(@javax.annotation.Nullable String taskGraphUuid) { this.taskGraphUuid = taskGraphUuid; return this; } - /** + /** * If set, the ID of the log for the task graph that this was part of. * @return taskGraphUuid - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "If set, the ID of the log for the task graph that this was part of. ") - public String getTaskGraphUuid() { return taskGraphUuid; } - - public void setTaskGraphUuid(String taskGraphUuid) { + public void setTaskGraphUuid(@javax.annotation.Nullable String taskGraphUuid) { this.taskGraphUuid = taskGraphUuid; } - public MultiArrayUDF clientNodeUuid(String clientNodeUuid) { - + public MultiArrayUDF clientNodeUuid(@javax.annotation.Nullable String clientNodeUuid) { this.clientNodeUuid = clientNodeUuid; return this; } - /** + /** * If set, the client-defined ID of the node within this task's graph. * @return clientNodeUuid - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "If set, the client-defined ID of the node within this task's graph. ") - public String getClientNodeUuid() { return clientNodeUuid; } - - public void setClientNodeUuid(String clientNodeUuid) { + public void setClientNodeUuid(@javax.annotation.Nullable String clientNodeUuid) { this.clientNodeUuid = clientNodeUuid; } - /** - * 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. - */ - public MultiArrayUDF 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -741,8 +653,7 @@ public boolean equals(Object o) { Objects.equals(this.arrays, multiArrayUDF.arrays) && Objects.equals(this.timeout, multiArrayUDF.timeout) && Objects.equals(this.taskGraphUuid, multiArrayUDF.taskGraphUuid) && - Objects.equals(this.clientNodeUuid, multiArrayUDF.clientNodeUuid)&& - Objects.equals(this.additionalProperties, multiArrayUDF.additionalProperties); + Objects.equals(this.clientNodeUuid, multiArrayUDF.clientNodeUuid); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -751,7 +662,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(udfInfoName, language, version, imageName, accessCredentialsName, resourceClass, exec, execRaw, resultFormat, taskName, argument, argumentsJson, storedParamUuids, storeResults, dontDownloadResults, ranges, subarray, buffers, arrays, timeout, taskGraphUuid, clientNodeUuid, additionalProperties); + return Objects.hash(udfInfoName, language, version, imageName, accessCredentialsName, resourceClass, exec, execRaw, resultFormat, taskName, argument, argumentsJson, storedParamUuids, storeResults, dontDownloadResults, ranges, subarray, buffers, arrays, timeout, taskGraphUuid, clientNodeUuid); } private static int hashCodeNullable(JsonNullable a) { @@ -787,7 +698,6 @@ public String toString() { sb.append(" timeout: ").append(toIndentedString(timeout)).append("\n"); sb.append(" taskGraphUuid: ").append(toIndentedString(taskGraphUuid)).append("\n"); sb.append(" clientNodeUuid: ").append(toIndentedString(clientNodeUuid)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -837,23 +747,34 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to MultiArrayUDF - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (MultiArrayUDF.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 MultiArrayUDF + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MultiArrayUDF.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in MultiArrayUDF is not found in the empty JSON string", MultiArrayUDF.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!MultiArrayUDF.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MultiArrayUDF` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("udf_info_name") != null && !jsonObj.get("udf_info_name").isJsonNull()) && !jsonObj.get("udf_info_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `udf_info_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("udf_info_name").toString())); } + // validate the optional field `language` + if (jsonObj.get("language") != null && !jsonObj.get("language").isJsonNull()) { + UDFLanguage.validateJsonElement(jsonObj.get("language")); + } if ((jsonObj.get("version") != null && !jsonObj.get("version").isJsonNull()) && !jsonObj.get("version").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `version` to be a primitive type in the JSON string but got `%s`", jsonObj.get("version").toString())); } @@ -872,51 +793,59 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("exec_raw") != null && !jsonObj.get("exec_raw").isJsonNull()) && !jsonObj.get("exec_raw").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `exec_raw` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exec_raw").toString())); } + // validate the optional field `result_format` + if (jsonObj.get("result_format") != null && !jsonObj.get("result_format").isJsonNull()) { + ResultFormat.validateJsonElement(jsonObj.get("result_format")); + } if ((jsonObj.get("task_name") != null && !jsonObj.get("task_name").isJsonNull()) && !jsonObj.get("task_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `task_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("task_name").toString())); } if ((jsonObj.get("argument") != null && !jsonObj.get("argument").isJsonNull()) && !jsonObj.get("argument").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `argument` to be a primitive type in the JSON string but got `%s`", jsonObj.get("argument").toString())); } - JsonArray jsonArrayargumentsJson = jsonObj.getAsJsonArray("arguments_json"); - if (jsonArrayargumentsJson != null) { - // ensure the json data is an array - if (!jsonObj.get("arguments_json").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `arguments_json` to be an array in the JSON string but got `%s`", jsonObj.get("arguments_json").toString())); + if (jsonObj.get("arguments_json") != null && !jsonObj.get("arguments_json").isJsonNull()) { + JsonArray jsonArrayargumentsJson = jsonObj.getAsJsonArray("arguments_json"); + if (jsonArrayargumentsJson != null) { + // ensure the json data is an array + if (!jsonObj.get("arguments_json").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `arguments_json` to be an array in the JSON string but got `%s`", jsonObj.get("arguments_json").toString())); + } + + // validate the optional field `arguments_json` (array) + for (int i = 0; i < jsonArrayargumentsJson.size(); i++) { + TGUDFArgument.validateJsonElement(jsonArrayargumentsJson.get(i)); + }; } - - // validate the optional field `arguments_json` (array) - for (int i = 0; i < jsonArrayargumentsJson.size(); i++) { - TGUDFArgument.validateJsonObject(jsonArrayargumentsJson.get(i).getAsJsonObject()); - }; } - // ensure the json data is an array - if ((jsonObj.get("stored_param_uuids") != null && !jsonObj.get("stored_param_uuids").isJsonNull()) && !jsonObj.get("stored_param_uuids").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("stored_param_uuids") != null && !jsonObj.get("stored_param_uuids").isJsonNull() && !jsonObj.get("stored_param_uuids").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `stored_param_uuids` to be an array in the JSON string but got `%s`", jsonObj.get("stored_param_uuids").toString())); } // validate the optional field `ranges` if (jsonObj.get("ranges") != null && !jsonObj.get("ranges").isJsonNull()) { - QueryRanges.validateJsonObject(jsonObj.getAsJsonObject("ranges")); + QueryRanges.validateJsonElement(jsonObj.get("ranges")); } // validate the optional field `subarray` if (jsonObj.get("subarray") != null && !jsonObj.get("subarray").isJsonNull()) { - UDFSubarray.validateJsonObject(jsonObj.getAsJsonObject("subarray")); + UDFSubarray.validateJsonElement(jsonObj.get("subarray")); } - // ensure the json data is an array - if ((jsonObj.get("buffers") != null && !jsonObj.get("buffers").isJsonNull()) && !jsonObj.get("buffers").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("buffers") != null && !jsonObj.get("buffers").isJsonNull() && !jsonObj.get("buffers").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `buffers` to be an array in the JSON string but got `%s`", jsonObj.get("buffers").toString())); } - JsonArray jsonArrayarrays = jsonObj.getAsJsonArray("arrays"); - if (jsonArrayarrays != null) { - // ensure the json data is an array - if (!jsonObj.get("arrays").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `arrays` to be an array in the JSON string but got `%s`", jsonObj.get("arrays").toString())); + if (jsonObj.get("arrays") != null && !jsonObj.get("arrays").isJsonNull()) { + JsonArray jsonArrayarrays = jsonObj.getAsJsonArray("arrays"); + if (jsonArrayarrays != null) { + // ensure the json data is an array + if (!jsonObj.get("arrays").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `arrays` to be an array in the JSON string but got `%s`", jsonObj.get("arrays").toString())); + } + + // validate the optional field `arrays` (array) + for (int i = 0; i < jsonArrayarrays.size(); i++) { + UDFArrayDetails.validateJsonElement(jsonArrayarrays.get(i)); + }; } - - // validate the optional field `arrays` (array) - for (int i = 0; i < jsonArrayarrays.size(); i++) { - UDFArrayDetails.validateJsonObject(jsonArrayarrays.get(i).getAsJsonObject()); - }; } if ((jsonObj.get("task_graph_uuid") != null && !jsonObj.get("task_graph_uuid").isJsonNull()) && !jsonObj.get("task_graph_uuid").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `task_graph_uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("task_graph_uuid").toString())); @@ -941,71 +870,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, MultiArrayUDF value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 MultiArrayUDF read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - MultiArrayUDF 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of MultiArrayUDF given an JSON string - * - * @param jsonString JSON string - * @return An instance of MultiArrayUDF - * @throws IOException if the JSON string is invalid with respect to MultiArrayUDF - */ + /** + * Create an instance of MultiArrayUDF given an JSON string + * + * @param jsonString JSON string + * @return An instance of MultiArrayUDF + * @throws IOException if the JSON string is invalid with respect to MultiArrayUDF + */ public static MultiArrayUDF fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, MultiArrayUDF.class); } - /** - * Convert an instance of MultiArrayUDF to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of MultiArrayUDF to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/NamespaceActions.java b/src/main/java/io/tiledb/cloud/rest_api/model/NamespaceActions.java index a83622d..4b3f9b6 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/NamespaceActions.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/NamespaceActions.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -85,5 +89,10 @@ public NamespaceActions read(final JsonReader jsonReader) throws IOException { return NamespaceActions.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + NamespaceActions.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/NonEmptyDomain.java b/src/main/java/io/tiledb/cloud/rest_api/model/NonEmptyDomain.java index eec5a32..7ca4351 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/NonEmptyDomain.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/NonEmptyDomain.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,127 +11,96 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.DomainArray; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * object representing a non-empty domain */ -@ApiModel(description = "object representing a non-empty domain") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class NonEmptyDomain { public static final String SERIALIZED_NAME_NON_EMPTY_DOMAIN = "nonEmptyDomain"; @SerializedName(SERIALIZED_NAME_NON_EMPTY_DOMAIN) + @javax.annotation.Nonnull private DomainArray nonEmptyDomain; public static final String SERIALIZED_NAME_IS_EMPTY = "isEmpty"; @SerializedName(SERIALIZED_NAME_IS_EMPTY) + @javax.annotation.Nonnull private Boolean isEmpty; public NonEmptyDomain() { } - public NonEmptyDomain nonEmptyDomain(DomainArray nonEmptyDomain) { - + public NonEmptyDomain nonEmptyDomain(@javax.annotation.Nonnull DomainArray nonEmptyDomain) { this.nonEmptyDomain = nonEmptyDomain; return this; } - /** + /** * Get nonEmptyDomain * @return nonEmptyDomain - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public DomainArray getNonEmptyDomain() { return nonEmptyDomain; } - - public void setNonEmptyDomain(DomainArray nonEmptyDomain) { + public void setNonEmptyDomain(@javax.annotation.Nonnull DomainArray nonEmptyDomain) { this.nonEmptyDomain = nonEmptyDomain; } - public NonEmptyDomain isEmpty(Boolean isEmpty) { - + public NonEmptyDomain isEmpty(@javax.annotation.Nonnull Boolean isEmpty) { this.isEmpty = isEmpty; return this; } - /** + /** * Is non-empty domain really empty? * @return isEmpty - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "false", required = true, value = "Is non-empty domain really empty?") - public Boolean getIsEmpty() { return isEmpty; } - - public void setIsEmpty(Boolean isEmpty) { + public void setIsEmpty(@javax.annotation.Nonnull Boolean isEmpty) { this.isEmpty = isEmpty; } - /** - * 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. - */ - public NonEmptyDomain 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -144,13 +113,12 @@ public boolean equals(Object o) { } NonEmptyDomain nonEmptyDomain = (NonEmptyDomain) o; return Objects.equals(this.nonEmptyDomain, nonEmptyDomain.nonEmptyDomain) && - Objects.equals(this.isEmpty, nonEmptyDomain.isEmpty)&& - Objects.equals(this.additionalProperties, nonEmptyDomain.additionalProperties); + Objects.equals(this.isEmpty, nonEmptyDomain.isEmpty); } @Override public int hashCode() { - return Objects.hash(nonEmptyDomain, isEmpty, additionalProperties); + return Objects.hash(nonEmptyDomain, isEmpty); } @Override @@ -159,7 +127,6 @@ public String toString() { sb.append("class NonEmptyDomain {\n"); sb.append(" nonEmptyDomain: ").append(toIndentedString(nonEmptyDomain)).append("\n"); sb.append(" isEmpty: ").append(toIndentedString(isEmpty)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -191,31 +158,36 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("isEmpty"); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to NonEmptyDomain - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (NonEmptyDomain.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 NonEmptyDomain + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!NonEmptyDomain.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in NonEmptyDomain is not found in the empty JSON string", NonEmptyDomain.openapiRequiredFields.toString())); } } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!NonEmptyDomain.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `NonEmptyDomain` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + // check to make sure all required properties/fields are present in the JSON string for (String requiredField : NonEmptyDomain.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + 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())); } } - // validate the optional field `nonEmptyDomain` - if (jsonObj.get("nonEmptyDomain") != null && !jsonObj.get("nonEmptyDomain").isJsonNull()) { - DomainArray.validateJsonObject(jsonObj.getAsJsonObject("nonEmptyDomain")); - } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `nonEmptyDomain` + DomainArray.validateJsonElement(jsonObj.get("nonEmptyDomain")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -233,71 +205,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, NonEmptyDomain value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 NonEmptyDomain read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - NonEmptyDomain 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of NonEmptyDomain given an JSON string - * - * @param jsonString JSON string - * @return An instance of NonEmptyDomain - * @throws IOException if the JSON string is invalid with respect to NonEmptyDomain - */ + /** + * Create an instance of NonEmptyDomain given an JSON string + * + * @param jsonString JSON string + * @return An instance of NonEmptyDomain + * @throws IOException if the JSON string is invalid with respect to NonEmptyDomain + */ public static NonEmptyDomain fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, NonEmptyDomain.class); } - /** - * Convert an instance of NonEmptyDomain to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of NonEmptyDomain to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/NotebookCopied.java b/src/main/java/io/tiledb/cloud/rest_api/model/NotebookCopied.java index dedf556..6dcbb4d 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/NotebookCopied.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/NotebookCopied.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,181 +11,143 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Copied notebook uri and information */ -@ApiModel(description = "Copied notebook uri and information") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class NotebookCopied { public static final String SERIALIZED_NAME_OUTPUT_URI = "output_uri"; @SerializedName(SERIALIZED_NAME_OUTPUT_URI) + @javax.annotation.Nullable private String outputUri; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; @SerializedName(SERIALIZED_NAME_NAMESPACE) + @javax.annotation.Nullable private String namespace; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public NotebookCopied() { } - public NotebookCopied outputUri(String outputUri) { - + public NotebookCopied outputUri(@javax.annotation.Nullable String outputUri) { this.outputUri = outputUri; return this; } - /** + /** * output location of the TileDB Notebook * @return outputUri - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "output location of the TileDB Notebook") - public String getOutputUri() { return outputUri; } - - public void setOutputUri(String outputUri) { + public void setOutputUri(@javax.annotation.Nullable String outputUri) { this.outputUri = outputUri; } - public NotebookCopied name(String name) { - + public NotebookCopied name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * name of the notebook created * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "name of the notebook created") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public NotebookCopied namespace(String namespace) { - + public NotebookCopied namespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; return this; } - /** + /** * namespace copied to * @return namespace - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "namespace copied to") - public String getNamespace() { return namespace; } - - public void setNamespace(String namespace) { + public void setNamespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; } - public NotebookCopied id(String id) { - + public NotebookCopied id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * unique ID of the copied notebook * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", required = true, value = "unique ID of the copied notebook") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - /** - * 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. - */ - public NotebookCopied 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -200,13 +162,12 @@ public boolean equals(Object o) { return Objects.equals(this.outputUri, notebookCopied.outputUri) && Objects.equals(this.name, notebookCopied.name) && Objects.equals(this.namespace, notebookCopied.namespace) && - Objects.equals(this.id, notebookCopied.id)&& - Objects.equals(this.additionalProperties, notebookCopied.additionalProperties); + Objects.equals(this.id, notebookCopied.id); } @Override public int hashCode() { - return Objects.hash(outputUri, name, namespace, id, additionalProperties); + return Objects.hash(outputUri, name, namespace, id); } @Override @@ -217,7 +178,6 @@ public String toString() { sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -250,27 +210,34 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("id"); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to NotebookCopied - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (NotebookCopied.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 NotebookCopied + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!NotebookCopied.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in NotebookCopied is not found in the empty JSON string", NotebookCopied.openapiRequiredFields.toString())); } } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!NotebookCopied.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `NotebookCopied` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + // check to make sure all required properties/fields are present in the JSON string for (String requiredField : NotebookCopied.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + 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("output_uri") != null && !jsonObj.get("output_uri").isJsonNull()) && !jsonObj.get("output_uri").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `output_uri` to be a primitive type in the JSON string but got `%s`", jsonObj.get("output_uri").toString())); } @@ -280,7 +247,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("namespace") != null && !jsonObj.get("namespace").isJsonNull()) && !jsonObj.get("namespace").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `namespace` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespace").toString())); } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + 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())); } } @@ -300,71 +267,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, NotebookCopied value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 NotebookCopied read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - NotebookCopied 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of NotebookCopied given an JSON string - * - * @param jsonString JSON string - * @return An instance of NotebookCopied - * @throws IOException if the JSON string is invalid with respect to NotebookCopied - */ + /** + * Create an instance of NotebookCopied given an JSON string + * + * @param jsonString JSON string + * @return An instance of NotebookCopied + * @throws IOException if the JSON string is invalid with respect to NotebookCopied + */ public static NotebookCopied fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, NotebookCopied.class); } - /** - * Convert an instance of NotebookCopied to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of NotebookCopied to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/NotebookCopy.java b/src/main/java/io/tiledb/cloud/rest_api/model/NotebookCopy.java index 069be7f..ac844aa 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/NotebookCopy.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/NotebookCopy.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,154 +11,119 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Output information required to copy a notebook */ -@ApiModel(description = "Output information required to copy a notebook") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class NotebookCopy { public static final String SERIALIZED_NAME_OUTPUT_URI = "output_uri"; @SerializedName(SERIALIZED_NAME_OUTPUT_URI) + @javax.annotation.Nullable private String outputUri; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; @SerializedName(SERIALIZED_NAME_NAMESPACE) + @javax.annotation.Nullable private String namespace; public NotebookCopy() { } - public NotebookCopy outputUri(String outputUri) { - + public NotebookCopy outputUri(@javax.annotation.Nullable String outputUri) { this.outputUri = outputUri; return this; } - /** + /** * output location of the TileDB File * @return outputUri - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "output location of the TileDB File") - public String getOutputUri() { return outputUri; } - - public void setOutputUri(String outputUri) { + public void setOutputUri(@javax.annotation.Nullable String outputUri) { this.outputUri = outputUri; } - public NotebookCopy name(String name) { - + public NotebookCopy name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * name to set for registered notebook * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "name to set for registered notebook") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public NotebookCopy namespace(String namespace) { - + public NotebookCopy namespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; return this; } - /** + /** * namespace to copy to * @return namespace - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "namespace to copy to") - public String getNamespace() { return namespace; } - - public void setNamespace(String namespace) { + public void setNamespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; } - /** - * 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. - */ - public NotebookCopy 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -172,13 +137,12 @@ public boolean equals(Object o) { NotebookCopy notebookCopy = (NotebookCopy) o; return Objects.equals(this.outputUri, notebookCopy.outputUri) && Objects.equals(this.name, notebookCopy.name) && - Objects.equals(this.namespace, notebookCopy.namespace)&& - Objects.equals(this.additionalProperties, notebookCopy.additionalProperties); + Objects.equals(this.namespace, notebookCopy.namespace); } @Override public int hashCode() { - return Objects.hash(outputUri, name, namespace, additionalProperties); + return Objects.hash(outputUri, name, namespace); } @Override @@ -188,7 +152,6 @@ public String toString() { sb.append(" outputUri: ").append(toIndentedString(outputUri)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -219,20 +182,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to NotebookCopy - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (NotebookCopy.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 NotebookCopy + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!NotebookCopy.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in NotebookCopy is not found in the empty JSON string", NotebookCopy.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!NotebookCopy.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `NotebookCopy` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("output_uri") != null && !jsonObj.get("output_uri").isJsonNull()) && !jsonObj.get("output_uri").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `output_uri` to be a primitive type in the JSON string but got `%s`", jsonObj.get("output_uri").toString())); } @@ -259,71 +229,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, NotebookCopy value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 NotebookCopy read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - NotebookCopy 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of NotebookCopy given an JSON string - * - * @param jsonString JSON string - * @return An instance of NotebookCopy - * @throws IOException if the JSON string is invalid with respect to NotebookCopy - */ + /** + * Create an instance of NotebookCopy given an JSON string + * + * @param jsonString JSON string + * @return An instance of NotebookCopy + * @throws IOException if the JSON string is invalid with respect to NotebookCopy + */ public static NotebookCopy fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, NotebookCopy.class); } - /** - * Convert an instance of NotebookCopy to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of NotebookCopy to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/NotebookFavorite.java b/src/main/java/io/tiledb/cloud/rest_api/model/NotebookFavorite.java index 3523de4..ab16926 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/NotebookFavorite.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/NotebookFavorite.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,154 +11,119 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * A user-favorite notebook item */ -@ApiModel(description = "A user-favorite notebook item") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class NotebookFavorite { public static final String SERIALIZED_NAME_NOTEBOOK_UUID = "notebook_uuid"; @SerializedName(SERIALIZED_NAME_NOTEBOOK_UUID) + @javax.annotation.Nullable private String notebookUuid; public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; @SerializedName(SERIALIZED_NAME_NAMESPACE) + @javax.annotation.Nullable private String namespace; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public NotebookFavorite() { } - public NotebookFavorite notebookUuid(String notebookUuid) { - + public NotebookFavorite notebookUuid(@javax.annotation.Nullable String notebookUuid) { this.notebookUuid = notebookUuid; return this; } - /** + /** * unique UUID of the notebook * @return notebookUuid - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "unique UUID of the notebook") - public String getNotebookUuid() { return notebookUuid; } - - public void setNotebookUuid(String notebookUuid) { + public void setNotebookUuid(@javax.annotation.Nullable String notebookUuid) { this.notebookUuid = notebookUuid; } - public NotebookFavorite namespace(String namespace) { - + public NotebookFavorite namespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; return this; } - /** + /** * the namespace of the notebook * @return namespace - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "the namespace of the notebook") - public String getNamespace() { return namespace; } - - public void setNamespace(String namespace) { + public void setNamespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; } - public NotebookFavorite name(String name) { - + public NotebookFavorite name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * the name of the notebook * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "the name of the notebook") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - /** - * 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. - */ - public NotebookFavorite 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -172,13 +137,12 @@ public boolean equals(Object o) { NotebookFavorite notebookFavorite = (NotebookFavorite) o; return Objects.equals(this.notebookUuid, notebookFavorite.notebookUuid) && Objects.equals(this.namespace, notebookFavorite.namespace) && - Objects.equals(this.name, notebookFavorite.name)&& - Objects.equals(this.additionalProperties, notebookFavorite.additionalProperties); + Objects.equals(this.name, notebookFavorite.name); } @Override public int hashCode() { - return Objects.hash(notebookUuid, namespace, name, additionalProperties); + return Objects.hash(notebookUuid, namespace, name); } @Override @@ -188,7 +152,6 @@ public String toString() { sb.append(" notebookUuid: ").append(toIndentedString(notebookUuid)).append("\n"); sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -219,20 +182,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to NotebookFavorite - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (NotebookFavorite.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 NotebookFavorite + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!NotebookFavorite.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in NotebookFavorite is not found in the empty JSON string", NotebookFavorite.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!NotebookFavorite.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `NotebookFavorite` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("notebook_uuid") != null && !jsonObj.get("notebook_uuid").isJsonNull()) && !jsonObj.get("notebook_uuid").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `notebook_uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("notebook_uuid").toString())); } @@ -259,71 +229,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, NotebookFavorite value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 NotebookFavorite read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - NotebookFavorite 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of NotebookFavorite given an JSON string - * - * @param jsonString JSON string - * @return An instance of NotebookFavorite - * @throws IOException if the JSON string is invalid with respect to NotebookFavorite - */ + /** + * Create an instance of NotebookFavorite given an JSON string + * + * @param jsonString JSON string + * @return An instance of NotebookFavorite + * @throws IOException if the JSON string is invalid with respect to NotebookFavorite + */ public static NotebookFavorite fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, NotebookFavorite.class); } - /** - * Convert an instance of NotebookFavorite to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of NotebookFavorite to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/NotebookFavoritesData.java b/src/main/java/io/tiledb/cloud/rest_api/model/NotebookFavoritesData.java index e31b860..a5534bb 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/NotebookFavoritesData.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/NotebookFavoritesData.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,53 +11,63 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.ArrayInfo; +import org.openapitools.client.model.PaginationMetadata; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Object including notebook favorites and pagination metadata */ -@ApiModel(description = "Object including notebook favorites and pagination metadata") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class NotebookFavoritesData { public static final String SERIALIZED_NAME_NOTEBOOKS = "notebooks"; @SerializedName(SERIALIZED_NAME_NOTEBOOKS) - private List notebooks = null; + @javax.annotation.Nullable + private List notebooks = new ArrayList<>(); public static final String SERIALIZED_NAME_PAGINATION_METADATA = "pagination_metadata"; @SerializedName(SERIALIZED_NAME_PAGINATION_METADATA) + @javax.annotation.Nullable private PaginationMetadata paginationMetadata; public NotebookFavoritesData() { } - public NotebookFavoritesData notebooks(List notebooks) { - + public NotebookFavoritesData notebooks(@javax.annotation.Nullable List notebooks) { this.notebooks = notebooks; return this; } @@ -70,80 +80,38 @@ public NotebookFavoritesData addNotebooksItem(ArrayInfo notebooksItem) { return this; } - /** + /** * List of notebook infos * @return notebooks - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "List of notebook infos") - public List getNotebooks() { return notebooks; } - - public void setNotebooks(List notebooks) { + public void setNotebooks(@javax.annotation.Nullable List notebooks) { this.notebooks = notebooks; } - public NotebookFavoritesData paginationMetadata(PaginationMetadata paginationMetadata) { - + public NotebookFavoritesData paginationMetadata(@javax.annotation.Nullable PaginationMetadata paginationMetadata) { this.paginationMetadata = paginationMetadata; return this; } - /** + /** * Get paginationMetadata * @return paginationMetadata - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public PaginationMetadata getPaginationMetadata() { return paginationMetadata; } - - public void setPaginationMetadata(PaginationMetadata paginationMetadata) { + public void setPaginationMetadata(@javax.annotation.Nullable PaginationMetadata paginationMetadata) { this.paginationMetadata = paginationMetadata; } - /** - * 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. - */ - public NotebookFavoritesData 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -156,13 +124,12 @@ public boolean equals(Object o) { } NotebookFavoritesData notebookFavoritesData = (NotebookFavoritesData) o; return Objects.equals(this.notebooks, notebookFavoritesData.notebooks) && - Objects.equals(this.paginationMetadata, notebookFavoritesData.paginationMetadata)&& - Objects.equals(this.additionalProperties, notebookFavoritesData.additionalProperties); + Objects.equals(this.paginationMetadata, notebookFavoritesData.paginationMetadata); } @Override public int hashCode() { - return Objects.hash(notebooks, paginationMetadata, additionalProperties); + return Objects.hash(notebooks, paginationMetadata); } @Override @@ -171,7 +138,6 @@ public String toString() { sb.append("class NotebookFavoritesData {\n"); sb.append(" notebooks: ").append(toIndentedString(notebooks)).append("\n"); sb.append(" paginationMetadata: ").append(toIndentedString(paginationMetadata)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -201,35 +167,44 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to NotebookFavoritesData - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (NotebookFavoritesData.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 NotebookFavoritesData + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!NotebookFavoritesData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in NotebookFavoritesData is not found in the empty JSON string", NotebookFavoritesData.openapiRequiredFields.toString())); } } - JsonArray jsonArraynotebooks = jsonObj.getAsJsonArray("notebooks"); - if (jsonArraynotebooks != null) { - // ensure the json data is an array - if (!jsonObj.get("notebooks").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `notebooks` to be an array in the JSON string but got `%s`", jsonObj.get("notebooks").toString())); - } - // validate the optional field `notebooks` (array) - for (int i = 0; i < jsonArraynotebooks.size(); i++) { - ArrayInfo.validateJsonObject(jsonArraynotebooks.get(i).getAsJsonObject()); - }; + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!NotebookFavoritesData.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `NotebookFavoritesData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("notebooks") != null && !jsonObj.get("notebooks").isJsonNull()) { + JsonArray jsonArraynotebooks = jsonObj.getAsJsonArray("notebooks"); + if (jsonArraynotebooks != null) { + // ensure the json data is an array + if (!jsonObj.get("notebooks").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `notebooks` to be an array in the JSON string but got `%s`", jsonObj.get("notebooks").toString())); + } + + // validate the optional field `notebooks` (array) + for (int i = 0; i < jsonArraynotebooks.size(); i++) { + ArrayInfo.validateJsonElement(jsonArraynotebooks.get(i)); + }; + } } // validate the optional field `pagination_metadata` if (jsonObj.get("pagination_metadata") != null && !jsonObj.get("pagination_metadata").isJsonNull()) { - PaginationMetadata.validateJsonObject(jsonObj.getAsJsonObject("pagination_metadata")); + PaginationMetadata.validateJsonElement(jsonObj.get("pagination_metadata")); } } @@ -248,71 +223,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, NotebookFavoritesData value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 NotebookFavoritesData read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - NotebookFavoritesData 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of NotebookFavoritesData given an JSON string - * - * @param jsonString JSON string - * @return An instance of NotebookFavoritesData - * @throws IOException if the JSON string is invalid with respect to NotebookFavoritesData - */ + /** + * Create an instance of NotebookFavoritesData given an JSON string + * + * @param jsonString JSON string + * @return An instance of NotebookFavoritesData + * @throws IOException if the JSON string is invalid with respect to NotebookFavoritesData + */ public static NotebookFavoritesData fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, NotebookFavoritesData.class); } - /** - * Convert an instance of NotebookFavoritesData to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of NotebookFavoritesData to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/NotebookStatus.java b/src/main/java/io/tiledb/cloud/rest_api/model/NotebookStatus.java index 8a9f708..599ef98 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/NotebookStatus.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/NotebookStatus.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,373 +11,339 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; - -import io.tiledb.cloud.rest_api.JSON; +import java.util.Arrays; +import org.openapitools.client.model.PodStatus; import org.openapitools.jackson.nullable.JsonNullable; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; /** * Status details of a notebook server */ -@ApiModel(description = "Status details of a notebook server") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class NotebookStatus { public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; @SerializedName(SERIALIZED_NAME_NAMESPACE) + @javax.annotation.Nullable private String namespace; public static final String SERIALIZED_NAME_UPTIME = "uptime"; @SerializedName(SERIALIZED_NAME_UPTIME) + @javax.annotation.Nullable private Integer uptime; public static final String SERIALIZED_NAME_CPU_USAGE = "cpu_usage"; @SerializedName(SERIALIZED_NAME_CPU_USAGE) + @javax.annotation.Nullable private Integer cpuUsage; public static final String SERIALIZED_NAME_GPU_USAGE = "gpu_usage"; @SerializedName(SERIALIZED_NAME_GPU_USAGE) + @javax.annotation.Nullable private Integer gpuUsage; public static final String SERIALIZED_NAME_MEMORY_USAGE = "memory_usage"; @SerializedName(SERIALIZED_NAME_MEMORY_USAGE) + @javax.annotation.Nullable private Integer memoryUsage; public static final String SERIALIZED_NAME_GPU_LIMIT = "gpu_limit"; @SerializedName(SERIALIZED_NAME_GPU_LIMIT) + @javax.annotation.Nullable private Integer gpuLimit; public static final String SERIALIZED_NAME_MEMORY_LIMIT = "memory_limit"; @SerializedName(SERIALIZED_NAME_MEMORY_LIMIT) + @javax.annotation.Nullable private Integer memoryLimit; public static final String SERIALIZED_NAME_STORAGE_USAGE = "storage_usage"; @SerializedName(SERIALIZED_NAME_STORAGE_USAGE) + @javax.annotation.Nullable private Integer storageUsage; public static final String SERIALIZED_NAME_STORAGE_LIMIT = "storage_limit"; @SerializedName(SERIALIZED_NAME_STORAGE_LIMIT) + @javax.annotation.Nullable private Integer storageLimit; public static final String SERIALIZED_NAME_CPU_COUNT = "cpu_count"; @SerializedName(SERIALIZED_NAME_CPU_COUNT) + @javax.annotation.Nullable private Integer cpuCount; public static final String SERIALIZED_NAME_COST = "cost"; @SerializedName(SERIALIZED_NAME_COST) + @javax.annotation.Nullable private Double cost; + public static final String SERIALIZED_NAME_POD_STATUS = "pod_status"; + @SerializedName(SERIALIZED_NAME_POD_STATUS) + @javax.annotation.Nullable + private PodStatus podStatus; + public NotebookStatus() { } - public NotebookStatus namespace(String namespace) { - + public NotebookStatus namespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; return this; } - /** + /** * namespace of notebook * @return namespace - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "namespace of notebook") - public String getNamespace() { return namespace; } - - public void setNamespace(String namespace) { + public void setNamespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; } - public NotebookStatus uptime(Integer uptime) { - + public NotebookStatus uptime(@javax.annotation.Nullable Integer uptime) { this.uptime = uptime; return this; } - /** + /** * duration notebook has been running in seconds * @return uptime - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "120", value = "duration notebook has been running in seconds") - public Integer getUptime() { return uptime; } - - public void setUptime(Integer uptime) { + public void setUptime(@javax.annotation.Nullable Integer uptime) { this.uptime = uptime; } - public NotebookStatus cpuUsage(Integer cpuUsage) { - + public NotebookStatus cpuUsage(@javax.annotation.Nullable Integer cpuUsage) { this.cpuUsage = cpuUsage; return this; } - /** + /** * current cpu usage in millicpu * @return cpuUsage - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "4000", value = "current cpu usage in millicpu") - public Integer getCpuUsage() { return cpuUsage; } - - public void setCpuUsage(Integer cpuUsage) { + public void setCpuUsage(@javax.annotation.Nullable Integer cpuUsage) { this.cpuUsage = cpuUsage; } - public NotebookStatus gpuUsage(Integer gpuUsage) { - + public NotebookStatus gpuUsage(@javax.annotation.Nullable Integer gpuUsage) { this.gpuUsage = gpuUsage; return this; } - /** + /** * gpu usage in milligpu * @return gpuUsage - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "4000", value = "gpu usage in milligpu") - public Integer getGpuUsage() { return gpuUsage; } - - public void setGpuUsage(Integer gpuUsage) { + public void setGpuUsage(@javax.annotation.Nullable Integer gpuUsage) { this.gpuUsage = gpuUsage; } - public NotebookStatus memoryUsage(Integer memoryUsage) { - + public NotebookStatus memoryUsage(@javax.annotation.Nullable Integer memoryUsage) { this.memoryUsage = memoryUsage; return this; } - /** + /** * memory usage in bytes * @return memoryUsage - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "1073741824", value = "memory usage in bytes") - public Integer getMemoryUsage() { return memoryUsage; } - - public void setMemoryUsage(Integer memoryUsage) { + public void setMemoryUsage(@javax.annotation.Nullable Integer memoryUsage) { this.memoryUsage = memoryUsage; } - public NotebookStatus gpuLimit(Integer gpuLimit) { - + public NotebookStatus gpuLimit(@javax.annotation.Nullable Integer gpuLimit) { this.gpuLimit = gpuLimit; return this; } - /** + /** * gpu limit in milligpu * @return gpuLimit - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "1073741824", value = "gpu limit in milligpu") - public Integer getGpuLimit() { return gpuLimit; } - - public void setGpuLimit(Integer gpuLimit) { + public void setGpuLimit(@javax.annotation.Nullable Integer gpuLimit) { this.gpuLimit = gpuLimit; } - public NotebookStatus memoryLimit(Integer memoryLimit) { - + public NotebookStatus memoryLimit(@javax.annotation.Nullable Integer memoryLimit) { this.memoryLimit = memoryLimit; return this; } - /** + /** * memory allocated to notebook server in bytes * @return memoryLimit - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "1073741824", value = "memory allocated to notebook server in bytes") - public Integer getMemoryLimit() { return memoryLimit; } - - public void setMemoryLimit(Integer memoryLimit) { + public void setMemoryLimit(@javax.annotation.Nullable Integer memoryLimit) { this.memoryLimit = memoryLimit; } - public NotebookStatus storageUsage(Integer storageUsage) { - + public NotebookStatus storageUsage(@javax.annotation.Nullable Integer storageUsage) { this.storageUsage = storageUsage; return this; } - /** + /** * storage usage in bytes * @return storageUsage - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "1073741824", value = "storage usage in bytes") - public Integer getStorageUsage() { return storageUsage; } - - public void setStorageUsage(Integer storageUsage) { + public void setStorageUsage(@javax.annotation.Nullable Integer storageUsage) { this.storageUsage = storageUsage; } - public NotebookStatus storageLimit(Integer storageLimit) { - + public NotebookStatus storageLimit(@javax.annotation.Nullable Integer storageLimit) { this.storageLimit = storageLimit; return this; } - /** + /** * storage allocated to notebook server in bytes * @return storageLimit - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "1073741824", value = "storage allocated to notebook server in bytes") - public Integer getStorageLimit() { return storageLimit; } - - public void setStorageLimit(Integer storageLimit) { + public void setStorageLimit(@javax.annotation.Nullable Integer storageLimit) { this.storageLimit = storageLimit; } - public NotebookStatus cpuCount(Integer cpuCount) { - + public NotebookStatus cpuCount(@javax.annotation.Nullable Integer cpuCount) { this.cpuCount = cpuCount; return this; } - /** + /** * millicpu allocated to notebook server * @return cpuCount - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "4000", value = "millicpu allocated to notebook server") - public Integer getCpuCount() { return cpuCount; } - - public void setCpuCount(Integer cpuCount) { + public void setCpuCount(@javax.annotation.Nullable Integer cpuCount) { this.cpuCount = cpuCount; } - public NotebookStatus cost(Double cost) { - + public NotebookStatus cost(@javax.annotation.Nullable Double cost) { this.cost = cost; return this; } - /** + /** * cost in USD for the current notebook session * @return cost - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "0.27", value = "cost in USD for the current notebook session") - public Double getCost() { return cost; } - - public void setCost(Double cost) { + public void setCost(@javax.annotation.Nullable Double cost) { this.cost = cost; } - /** - * 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. - */ - public NotebookStatus putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); + public NotebookStatus podStatus(@javax.annotation.Nullable PodStatus podStatus) { + this.podStatus = podStatus; return this; } /** - * Return the additional (undeclared) property. + * Get podStatus + * @return podStatus */ - public Map getAdditionalProperties() { - return additionalProperties; + @javax.annotation.Nullable + public PodStatus getPodStatus() { + return podStatus; } - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); + public void setPodStatus(@javax.annotation.Nullable PodStatus podStatus) { + this.podStatus = podStatus; } + @Override public boolean equals(Object o) { if (this == o) { @@ -397,8 +363,8 @@ public boolean equals(Object o) { Objects.equals(this.storageUsage, notebookStatus.storageUsage) && Objects.equals(this.storageLimit, notebookStatus.storageLimit) && Objects.equals(this.cpuCount, notebookStatus.cpuCount) && - Objects.equals(this.cost, notebookStatus.cost)&& - Objects.equals(this.additionalProperties, notebookStatus.additionalProperties); + Objects.equals(this.cost, notebookStatus.cost) && + Objects.equals(this.podStatus, notebookStatus.podStatus); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -407,7 +373,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(namespace, uptime, cpuUsage, gpuUsage, memoryUsage, gpuLimit, memoryLimit, storageUsage, storageLimit, cpuCount, cost, additionalProperties); + return Objects.hash(namespace, uptime, cpuUsage, gpuUsage, memoryUsage, gpuLimit, memoryLimit, storageUsage, storageLimit, cpuCount, cost, podStatus); } private static int hashCodeNullable(JsonNullable a) { @@ -432,7 +398,7 @@ public String toString() { sb.append(" storageLimit: ").append(toIndentedString(storageLimit)).append("\n"); sb.append(" cpuCount: ").append(toIndentedString(cpuCount)).append("\n"); sb.append(" cost: ").append(toIndentedString(cost)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append(" podStatus: ").append(toIndentedString(podStatus)).append("\n"); sb.append("}"); return sb.toString(); } @@ -466,28 +432,40 @@ private String toIndentedString(Object o) { openapiFields.add("storage_limit"); openapiFields.add("cpu_count"); openapiFields.add("cost"); + openapiFields.add("pod_status"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to NotebookStatus - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (NotebookStatus.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 NotebookStatus + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!NotebookStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in NotebookStatus is not found in the empty JSON string", NotebookStatus.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!NotebookStatus.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `NotebookStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("namespace") != null && !jsonObj.get("namespace").isJsonNull()) && !jsonObj.get("namespace").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `namespace` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespace").toString())); } + // validate the optional field `pod_status` + if (jsonObj.get("pod_status") != null && !jsonObj.get("pod_status").isJsonNull()) { + PodStatus.validateJsonElement(jsonObj.get("pod_status")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -505,71 +483,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, NotebookStatus value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 NotebookStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - NotebookStatus 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of NotebookStatus given an JSON string - * - * @param jsonString JSON string - * @return An instance of NotebookStatus - * @throws IOException if the JSON string is invalid with respect to NotebookStatus - */ + /** + * Create an instance of NotebookStatus given an JSON string + * + * @param jsonString JSON string + * @return An instance of NotebookStatus + * @throws IOException if the JSON string is invalid with respect to NotebookStatus + */ public static NotebookStatus fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, NotebookStatus.class); } - /** - * Convert an instance of NotebookStatus to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of NotebookStatus to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/Organization.java b/src/main/java/io/tiledb/cloud/rest_api/model/Organization.java index 5837ce6..7d9a1fa 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/Organization.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/Organization.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,111 +11,142 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; - -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.model.AssetLocations; +import org.openapitools.client.model.NamespaceActions; +import org.openapitools.client.model.OrganizationRoles; +import org.openapitools.client.model.OrganizationUser; import org.openapitools.jackson.nullable.JsonNullable; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; /** * Organization */ -@ApiModel(description = "Organization") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class Organization { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private String id; public static final String SERIALIZED_NAME_ROLE = "role"; @SerializedName(SERIALIZED_NAME_ROLE) + @javax.annotation.Nullable private OrganizationRoles role; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull private String name; public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; public static final String SERIALIZED_NAME_LOGO = "logo"; @SerializedName(SERIALIZED_NAME_LOGO) + @javax.annotation.Nullable private String logo; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_USERS = "users"; @SerializedName(SERIALIZED_NAME_USERS) - private List users = null; + @javax.annotation.Nullable + private List users = new ArrayList<>(); public static final String SERIALIZED_NAME_ALLOWED_ACTIONS = "allowed_actions"; @SerializedName(SERIALIZED_NAME_ALLOWED_ACTIONS) - private List allowedActions = null; + @javax.annotation.Nullable + private List allowedActions = new ArrayList<>(); public static final String SERIALIZED_NAME_NUM_OF_ARRAYS = "num_of_arrays"; @SerializedName(SERIALIZED_NAME_NUM_OF_ARRAYS) + @javax.annotation.Nullable private BigDecimal numOfArrays; public static final String SERIALIZED_NAME_ENABLED_FEATURES = "enabled_features"; @SerializedName(SERIALIZED_NAME_ENABLED_FEATURES) - private List enabledFeatures = null; + @javax.annotation.Nullable + private List enabledFeatures = new ArrayList<>(); public static final String SERIALIZED_NAME_UNPAID_SUBSCRIPTION = "unpaid_subscription"; @SerializedName(SERIALIZED_NAME_UNPAID_SUBSCRIPTION) + @javax.annotation.Nullable private Boolean unpaidSubscription; public static final String SERIALIZED_NAME_DEFAULT_S3_PATH = "default_s3_path"; @SerializedName(SERIALIZED_NAME_DEFAULT_S3_PATH) + @javax.annotation.Nullable private String defaultS3Path; public static final String SERIALIZED_NAME_DEFAULT_S3_PATH_CREDENTIALS_NAME = "default_s3_path_credentials_name"; @SerializedName(SERIALIZED_NAME_DEFAULT_S3_PATH_CREDENTIALS_NAME) + @javax.annotation.Nullable private String defaultS3PathCredentialsName; public static final String SERIALIZED_NAME_ASSET_LOCATIONS = "asset_locations"; @SerializedName(SERIALIZED_NAME_ASSET_LOCATIONS) + @javax.annotation.Nullable private AssetLocations assetLocations; public static final String SERIALIZED_NAME_STRIPE_CONNECT = "stripe_connect"; @SerializedName(SERIALIZED_NAME_STRIPE_CONNECT) + @javax.annotation.Nullable private Boolean stripeConnect; + public static final String SERIALIZED_NAME_ASSUME_ROLE_ARN = "assume_role_arn"; + @SerializedName(SERIALIZED_NAME_ASSUME_ROLE_ARN) + @javax.annotation.Nullable + private String assumeRoleArn; + public Organization() { } - public Organization( List enabledFeatures, Boolean unpaidSubscription, @@ -127,169 +158,140 @@ public Organization( this.stripeConnect = stripeConnect; } - public Organization id(String id) { - + public Organization id(@javax.annotation.Nullable String id) { this.id = id; return this; } - /** + /** * unique ID of organization * @return id - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", value = "unique ID of organization") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nullable String id) { this.id = id; } - public Organization role(OrganizationRoles role) { - + public Organization role(@javax.annotation.Nullable OrganizationRoles role) { this.role = role; return this; } - /** + /** * Get role * @return role - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OrganizationRoles getRole() { return role; } - - public void setRole(OrganizationRoles role) { + public void setRole(@javax.annotation.Nullable OrganizationRoles role) { this.role = role; } - public Organization name(String name) { - + public Organization name(@javax.annotation.Nonnull String name) { this.name = name; return this; } - /** + /** * organization name must be unique * @return name - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "organization name must be unique") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public Organization createdAt(OffsetDateTime createdAt) { - + public Organization createdAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Datetime organization was created in UTC * @return createdAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Datetime organization was created in UTC") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; } - public Organization updatedAt(OffsetDateTime updatedAt) { - + public Organization updatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } - /** + /** * Datetime organization was updated in UTC * @return updatedAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Datetime organization was updated in UTC") - public OffsetDateTime getUpdatedAt() { return updatedAt; } - - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } - public Organization logo(String logo) { - + public Organization logo(@javax.annotation.Nullable String logo) { this.logo = logo; return this; } - /** + /** * Organization logo * @return logo - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Organization logo") - public String getLogo() { return logo; } - - public void setLogo(String logo) { + public void setLogo(@javax.annotation.Nullable String logo) { this.logo = logo; } - public Organization description(String description) { - + public Organization description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * Organization description * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Organization description") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public Organization users(List users) { - + public Organization users(@javax.annotation.Nullable List users) { this.users = users; return this; } @@ -302,25 +304,21 @@ public Organization addUsersItem(OrganizationUser usersItem) { return this; } - /** + /** * Get users * @return users - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getUsers() { return users; } - - public void setUsers(List users) { + public void setUsers(@javax.annotation.Nullable List users) { this.users = users; } - public Organization allowedActions(List allowedActions) { - + public Organization allowedActions(@javax.annotation.Nullable List allowedActions) { this.allowedActions = allowedActions; return this; } @@ -333,193 +331,149 @@ public Organization addAllowedActionsItem(NamespaceActions allowedActionsItem) { return this; } - /** + /** * list of actions user is allowed to do on this organization * @return allowedActions - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "list of actions user is allowed to do on this organization") - public List getAllowedActions() { return allowedActions; } - - public void setAllowedActions(List allowedActions) { + public void setAllowedActions(@javax.annotation.Nullable List allowedActions) { this.allowedActions = allowedActions; } - public Organization numOfArrays(BigDecimal numOfArrays) { - + public Organization numOfArrays(@javax.annotation.Nullable BigDecimal numOfArrays) { this.numOfArrays = numOfArrays; return this; } - /** + /** * number of registered arrays for this organization * @return numOfArrays - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "number of registered arrays for this organization") - public BigDecimal getNumOfArrays() { return numOfArrays; } - - public void setNumOfArrays(BigDecimal numOfArrays) { + public void setNumOfArrays(@javax.annotation.Nullable BigDecimal numOfArrays) { this.numOfArrays = numOfArrays; } - /** + /** * List of extra/optional/beta features to enable for namespace * @return enabledFeatures - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "List of extra/optional/beta features to enable for namespace") - public List getEnabledFeatures() { return enabledFeatures; } - - /** + /** * A notice that the user has an unpaid subscription * @return unpaidSubscription - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "A notice that the user has an unpaid subscription") - public Boolean getUnpaidSubscription() { return unpaidSubscription; } - - public Organization defaultS3Path(String defaultS3Path) { - + public Organization defaultS3Path(@javax.annotation.Nullable String defaultS3Path) { this.defaultS3Path = defaultS3Path; return this; } - /** + /** * The default location to store newly-created notebooks and other assets like UDFs. The name `default_s3_path` is a legacy holdover; it may refer to any supported storage location. * @return defaultS3Path - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The default location to store newly-created notebooks and other assets like UDFs. The name `default_s3_path` is a legacy holdover; it may refer to any supported storage location. ") - public String getDefaultS3Path() { return defaultS3Path; } - - public void setDefaultS3Path(String defaultS3Path) { + public void setDefaultS3Path(@javax.annotation.Nullable String defaultS3Path) { this.defaultS3Path = defaultS3Path; } - public Organization defaultS3PathCredentialsName(String defaultS3PathCredentialsName) { - + public Organization defaultS3PathCredentialsName(@javax.annotation.Nullable String defaultS3PathCredentialsName) { this.defaultS3PathCredentialsName = defaultS3PathCredentialsName; return this; } - /** + /** * The name of the credentials used to create and access files in the `default_s3_path`, if needed. * @return defaultS3PathCredentialsName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The name of the credentials used to create and access files in the `default_s3_path`, if needed. ") - public String getDefaultS3PathCredentialsName() { return defaultS3PathCredentialsName; } - - public void setDefaultS3PathCredentialsName(String defaultS3PathCredentialsName) { + public void setDefaultS3PathCredentialsName(@javax.annotation.Nullable String defaultS3PathCredentialsName) { this.defaultS3PathCredentialsName = defaultS3PathCredentialsName; } - public Organization assetLocations(AssetLocations assetLocations) { - + public Organization assetLocations(@javax.annotation.Nullable AssetLocations assetLocations) { this.assetLocations = assetLocations; return this; } - /** + /** * Get assetLocations * @return assetLocations - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public AssetLocations getAssetLocations() { return assetLocations; } - - public void setAssetLocations(AssetLocations assetLocations) { + public void setAssetLocations(@javax.annotation.Nullable AssetLocations assetLocations) { this.assetLocations = assetLocations; } - /** + /** * Denotes that the organization is able to apply pricing to arrays by means of Stripe Connect * @return stripeConnect - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "false", value = "Denotes that the organization is able to apply pricing to arrays by means of Stripe Connect") - public Boolean getStripeConnect() { return stripeConnect; } - /** - * 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. - */ - public Organization putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); + public Organization assumeRoleArn(@javax.annotation.Nullable String assumeRoleArn) { + this.assumeRoleArn = assumeRoleArn; return this; } /** - * Return the additional (undeclared) property. + * A AWS Role that will be first assumed before assuming the organization's AWS Role. Visible to owners and admins. + * @return assumeRoleArn */ - public Map getAdditionalProperties() { - return additionalProperties; + @javax.annotation.Nullable + public String getAssumeRoleArn() { + return assumeRoleArn; } - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); + public void setAssumeRoleArn(@javax.annotation.Nullable String assumeRoleArn) { + this.assumeRoleArn = assumeRoleArn; } + @Override public boolean equals(Object o) { if (this == o) { @@ -544,8 +498,8 @@ public boolean equals(Object o) { Objects.equals(this.defaultS3Path, organization.defaultS3Path) && Objects.equals(this.defaultS3PathCredentialsName, organization.defaultS3PathCredentialsName) && Objects.equals(this.assetLocations, organization.assetLocations) && - Objects.equals(this.stripeConnect, organization.stripeConnect)&& - Objects.equals(this.additionalProperties, organization.additionalProperties); + Objects.equals(this.stripeConnect, organization.stripeConnect) && + Objects.equals(this.assumeRoleArn, organization.assumeRoleArn); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -554,7 +508,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, role, name, createdAt, updatedAt, logo, description, users, allowedActions, numOfArrays, enabledFeatures, unpaidSubscription, defaultS3Path, defaultS3PathCredentialsName, assetLocations, stripeConnect, additionalProperties); + return Objects.hash(id, role, name, createdAt, updatedAt, logo, description, users, allowedActions, numOfArrays, enabledFeatures, unpaidSubscription, defaultS3Path, defaultS3PathCredentialsName, assetLocations, stripeConnect, assumeRoleArn); } private static int hashCodeNullable(JsonNullable a) { @@ -584,7 +538,7 @@ public String toString() { sb.append(" defaultS3PathCredentialsName: ").append(toIndentedString(defaultS3PathCredentialsName)).append("\n"); sb.append(" assetLocations: ").append(toIndentedString(assetLocations)).append("\n"); sb.append(" stripeConnect: ").append(toIndentedString(stripeConnect)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append(" assumeRoleArn: ").append(toIndentedString(assumeRoleArn)).append("\n"); sb.append("}"); return sb.toString(); } @@ -623,37 +577,49 @@ private String toIndentedString(Object o) { openapiFields.add("default_s3_path_credentials_name"); openapiFields.add("asset_locations"); openapiFields.add("stripe_connect"); + openapiFields.add("assume_role_arn"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("name"); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Organization - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (Organization.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 Organization + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Organization.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in Organization is not found in the empty JSON string", Organization.openapiRequiredFields.toString())); } } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Organization.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Organization` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Organization.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + 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") != null && !jsonObj.get("id").isJsonNull()) && !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())); } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + // validate the optional field `role` + if (jsonObj.get("role") != null && !jsonObj.get("role").isJsonNull()) { + OrganizationRoles.validateJsonElement(jsonObj.get("role")); + } + 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("logo") != null && !jsonObj.get("logo").isJsonNull()) && !jsonObj.get("logo").isJsonPrimitive()) { @@ -662,24 +628,26 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !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())); } - JsonArray jsonArrayusers = jsonObj.getAsJsonArray("users"); - if (jsonArrayusers != null) { - // ensure the json data is an array - if (!jsonObj.get("users").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `users` to be an array in the JSON string but got `%s`", jsonObj.get("users").toString())); + if (jsonObj.get("users") != null && !jsonObj.get("users").isJsonNull()) { + JsonArray jsonArrayusers = jsonObj.getAsJsonArray("users"); + if (jsonArrayusers != null) { + // ensure the json data is an array + if (!jsonObj.get("users").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `users` to be an array in the JSON string but got `%s`", jsonObj.get("users").toString())); + } + + // validate the optional field `users` (array) + for (int i = 0; i < jsonArrayusers.size(); i++) { + OrganizationUser.validateJsonElement(jsonArrayusers.get(i)); + }; } - - // validate the optional field `users` (array) - for (int i = 0; i < jsonArrayusers.size(); i++) { - OrganizationUser.validateJsonObject(jsonArrayusers.get(i).getAsJsonObject()); - }; } - // ensure the json data is an array - if ((jsonObj.get("allowed_actions") != null && !jsonObj.get("allowed_actions").isJsonNull()) && !jsonObj.get("allowed_actions").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("allowed_actions") != null && !jsonObj.get("allowed_actions").isJsonNull() && !jsonObj.get("allowed_actions").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `allowed_actions` to be an array in the JSON string but got `%s`", jsonObj.get("allowed_actions").toString())); } - // ensure the json data is an array - if ((jsonObj.get("enabled_features") != null && !jsonObj.get("enabled_features").isJsonNull()) && !jsonObj.get("enabled_features").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("enabled_features") != null && !jsonObj.get("enabled_features").isJsonNull() && !jsonObj.get("enabled_features").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `enabled_features` to be an array in the JSON string but got `%s`", jsonObj.get("enabled_features").toString())); } if ((jsonObj.get("default_s3_path") != null && !jsonObj.get("default_s3_path").isJsonNull()) && !jsonObj.get("default_s3_path").isJsonPrimitive()) { @@ -690,7 +658,10 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `asset_locations` if (jsonObj.get("asset_locations") != null && !jsonObj.get("asset_locations").isJsonNull()) { - AssetLocations.validateJsonObject(jsonObj.getAsJsonObject("asset_locations")); + AssetLocations.validateJsonElement(jsonObj.get("asset_locations")); + } + if ((jsonObj.get("assume_role_arn") != null && !jsonObj.get("assume_role_arn").isJsonNull()) && !jsonObj.get("assume_role_arn").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `assume_role_arn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("assume_role_arn").toString())); } } @@ -709,71 +680,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, Organization value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 Organization read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - Organization 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Organization given an JSON string - * - * @param jsonString JSON string - * @return An instance of Organization - * @throws IOException if the JSON string is invalid with respect to Organization - */ + /** + * Create an instance of Organization given an JSON string + * + * @param jsonString JSON string + * @return An instance of Organization + * @throws IOException if the JSON string is invalid with respect to Organization + */ public static Organization fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Organization.class); } - /** - * Convert an instance of Organization to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Organization to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/OrganizationRoles.java b/src/main/java/io/tiledb/cloud/rest_api/model/OrganizationRoles.java index 167d012..3f37761 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/OrganizationRoles.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/OrganizationRoles.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -29,6 +33,8 @@ public enum OrganizationRoles { ADMIN("admin"), + READ_WRITE_DELETE("read_write_delete"), + READ_WRITE("read_write"), READ_ONLY("read_only"); @@ -69,5 +75,10 @@ public OrganizationRoles read(final JsonReader jsonReader) throws IOException { return OrganizationRoles.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OrganizationRoles.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/OrganizationUpdate.java b/src/main/java/io/tiledb/cloud/rest_api/model/OrganizationUpdate.java new file mode 100644 index 0000000..b6139b2 --- /dev/null +++ b/src/main/java/io/tiledb/cloud/rest_api/model/OrganizationUpdate.java @@ -0,0 +1,370 @@ +/* + * TileDB Storage Platform API + * TileDB Storage Platform REST API + * + * The version of the OpenAPI document: 2.17.51 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +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 org.openapitools.client.model.AssetLocations; +import org.openapitools.jackson.nullable.JsonNullable; + +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.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * OrganizationUpdate + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") +public class OrganizationUpdate { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_LOGO = "logo"; + @SerializedName(SERIALIZED_NAME_LOGO) + @javax.annotation.Nullable + private String logo; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_DEFAULT_S3_PATH = "default_s3_path"; + @SerializedName(SERIALIZED_NAME_DEFAULT_S3_PATH) + @javax.annotation.Nullable + private String defaultS3Path; + + public static final String SERIALIZED_NAME_DEFAULT_S3_PATH_CREDENTIALS_NAME = "default_s3_path_credentials_name"; + @SerializedName(SERIALIZED_NAME_DEFAULT_S3_PATH_CREDENTIALS_NAME) + @javax.annotation.Nullable + private String defaultS3PathCredentialsName; + + public static final String SERIALIZED_NAME_ASSET_LOCATIONS = "asset_locations"; + @SerializedName(SERIALIZED_NAME_ASSET_LOCATIONS) + @javax.annotation.Nullable + private AssetLocations assetLocations; + + public OrganizationUpdate() { + } + + public OrganizationUpdate name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * organization name must be unique + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public OrganizationUpdate logo(@javax.annotation.Nullable String logo) { + this.logo = logo; + return this; + } + + /** + * Organization logo + * @return logo + */ + @javax.annotation.Nullable + public String getLogo() { + return logo; + } + + public void setLogo(@javax.annotation.Nullable String logo) { + this.logo = logo; + } + + + public OrganizationUpdate description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Organization description + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public OrganizationUpdate defaultS3Path(@javax.annotation.Nullable String defaultS3Path) { + this.defaultS3Path = defaultS3Path; + return this; + } + + /** + * The default location to store newly-created notebooks and other assets like UDFs. The name `default_s3_path` is a legacy holdover; it may refer to any supported storage location. + * @return defaultS3Path + */ + @javax.annotation.Nullable + public String getDefaultS3Path() { + return defaultS3Path; + } + + public void setDefaultS3Path(@javax.annotation.Nullable String defaultS3Path) { + this.defaultS3Path = defaultS3Path; + } + + + public OrganizationUpdate defaultS3PathCredentialsName(@javax.annotation.Nullable String defaultS3PathCredentialsName) { + this.defaultS3PathCredentialsName = defaultS3PathCredentialsName; + return this; + } + + /** + * The name of the credentials used to create and access files in the `default_s3_path`, if needed. + * @return defaultS3PathCredentialsName + */ + @javax.annotation.Nullable + public String getDefaultS3PathCredentialsName() { + return defaultS3PathCredentialsName; + } + + public void setDefaultS3PathCredentialsName(@javax.annotation.Nullable String defaultS3PathCredentialsName) { + this.defaultS3PathCredentialsName = defaultS3PathCredentialsName; + } + + + public OrganizationUpdate assetLocations(@javax.annotation.Nullable AssetLocations assetLocations) { + this.assetLocations = assetLocations; + return this; + } + + /** + * Get assetLocations + * @return assetLocations + */ + @javax.annotation.Nullable + public AssetLocations getAssetLocations() { + return assetLocations; + } + + public void setAssetLocations(@javax.annotation.Nullable AssetLocations assetLocations) { + this.assetLocations = assetLocations; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrganizationUpdate organizationUpdate = (OrganizationUpdate) o; + return Objects.equals(this.name, organizationUpdate.name) && + Objects.equals(this.logo, organizationUpdate.logo) && + Objects.equals(this.description, organizationUpdate.description) && + Objects.equals(this.defaultS3Path, organizationUpdate.defaultS3Path) && + Objects.equals(this.defaultS3PathCredentialsName, organizationUpdate.defaultS3PathCredentialsName) && + Objects.equals(this.assetLocations, organizationUpdate.assetLocations); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, logo, description, defaultS3Path, defaultS3PathCredentialsName, assetLocations); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrganizationUpdate {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" logo: ").append(toIndentedString(logo)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" defaultS3Path: ").append(toIndentedString(defaultS3Path)).append("\n"); + sb.append(" defaultS3PathCredentialsName: ").append(toIndentedString(defaultS3PathCredentialsName)).append("\n"); + sb.append(" assetLocations: ").append(toIndentedString(assetLocations)).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("name"); + openapiFields.add("logo"); + openapiFields.add("description"); + openapiFields.add("default_s3_path"); + openapiFields.add("default_s3_path_credentials_name"); + openapiFields.add("asset_locations"); + + // 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 OrganizationUpdate + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrganizationUpdate.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrganizationUpdate is not found in the empty JSON string", OrganizationUpdate.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrganizationUpdate.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrganizationUpdate` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !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("logo") != null && !jsonObj.get("logo").isJsonNull()) && !jsonObj.get("logo").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `logo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("logo").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !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())); + } + if ((jsonObj.get("default_s3_path") != null && !jsonObj.get("default_s3_path").isJsonNull()) && !jsonObj.get("default_s3_path").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `default_s3_path` to be a primitive type in the JSON string but got `%s`", jsonObj.get("default_s3_path").toString())); + } + if ((jsonObj.get("default_s3_path_credentials_name") != null && !jsonObj.get("default_s3_path_credentials_name").isJsonNull()) && !jsonObj.get("default_s3_path_credentials_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `default_s3_path_credentials_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("default_s3_path_credentials_name").toString())); + } + // validate the optional field `asset_locations` + if (jsonObj.get("asset_locations") != null && !jsonObj.get("asset_locations").isJsonNull()) { + AssetLocations.validateJsonElement(jsonObj.get("asset_locations")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrganizationUpdate.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrganizationUpdate' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrganizationUpdate.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrganizationUpdate value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrganizationUpdate read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrganizationUpdate given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrganizationUpdate + * @throws IOException if the JSON string is invalid with respect to OrganizationUpdate + */ + public static OrganizationUpdate fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrganizationUpdate.class); + } + + /** + * Convert an instance of OrganizationUpdate to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/OrganizationUser.java b/src/main/java/io/tiledb/cloud/rest_api/model/OrganizationUser.java index f1ed197..290dbfb 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/OrganizationUser.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/OrganizationUser.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,182 +11,226 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.NamespaceActions; +import org.openapitools.client.model.OrganizationRoles; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * user in an organization */ -@ApiModel(description = "user in an organization") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class OrganizationUser { public static final String SERIALIZED_NAME_USER_ID = "user_id"; @SerializedName(SERIALIZED_NAME_USER_ID) + @javax.annotation.Nullable private String userId; public static final String SERIALIZED_NAME_ORGANIZATION_ID = "organization_id"; @SerializedName(SERIALIZED_NAME_ORGANIZATION_ID) + @javax.annotation.Nullable private String organizationId; public static final String SERIALIZED_NAME_USERNAME = "username"; @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nullable private String username; + public static final String SERIALIZED_NAME_USER_FULL_NAME = "user_full_name"; + @SerializedName(SERIALIZED_NAME_USER_FULL_NAME) + @javax.annotation.Nullable + private String userFullName; + + public static final String SERIALIZED_NAME_USER_EMAIL = "user_email"; + @SerializedName(SERIALIZED_NAME_USER_EMAIL) + @javax.annotation.Nullable + private String userEmail; + public static final String SERIALIZED_NAME_ORGANIZATION_NAME = "organization_name"; @SerializedName(SERIALIZED_NAME_ORGANIZATION_NAME) + @javax.annotation.Nullable private String organizationName; public static final String SERIALIZED_NAME_ROLE = "role"; @SerializedName(SERIALIZED_NAME_ROLE) + @javax.annotation.Nullable private OrganizationRoles role; public static final String SERIALIZED_NAME_ALLOWED_ACTIONS = "allowed_actions"; @SerializedName(SERIALIZED_NAME_ALLOWED_ACTIONS) - private List allowedActions = null; + @javax.annotation.Nullable + private List allowedActions = new ArrayList<>(); public OrganizationUser() { } - public OrganizationUser userId(String userId) { - + public OrganizationUser userId(@javax.annotation.Nullable String userId) { this.userId = userId; return this; } - /** + /** * unique ID of user * @return userId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", value = "unique ID of user") - public String getUserId() { return userId; } - - public void setUserId(String userId) { + public void setUserId(@javax.annotation.Nullable String userId) { this.userId = userId; } - public OrganizationUser organizationId(String organizationId) { - + public OrganizationUser organizationId(@javax.annotation.Nullable String organizationId) { this.organizationId = organizationId; return this; } - /** + /** * unique ID of organization * @return organizationId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", value = "unique ID of organization") - public String getOrganizationId() { return organizationId; } - - public void setOrganizationId(String organizationId) { + public void setOrganizationId(@javax.annotation.Nullable String organizationId) { this.organizationId = organizationId; } - public OrganizationUser username(String username) { - + public OrganizationUser username(@javax.annotation.Nullable String username) { this.username = username; return this; } - /** + /** * username for user * @return username - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "username", value = "username for user") - public String getUsername() { return username; } - - public void setUsername(String username) { + public void setUsername(@javax.annotation.Nullable String username) { this.username = username; } - public OrganizationUser organizationName(String organizationName) { - + public OrganizationUser userFullName(@javax.annotation.Nullable String userFullName) { + this.userFullName = userFullName; + return this; + } + + /** + * full name of the user; available to organization admins + * @return userFullName + */ + @javax.annotation.Nullable + public String getUserFullName() { + return userFullName; + } + + public void setUserFullName(@javax.annotation.Nullable String userFullName) { + this.userFullName = userFullName; + } + + + public OrganizationUser userEmail(@javax.annotation.Nullable String userEmail) { + this.userEmail = userEmail; + return this; + } + + /** + * email address of the user; available to organization admins + * @return userEmail + */ + @javax.annotation.Nullable + public String getUserEmail() { + return userEmail; + } + + public void setUserEmail(@javax.annotation.Nullable String userEmail) { + this.userEmail = userEmail; + } + + + public OrganizationUser organizationName(@javax.annotation.Nullable String organizationName) { this.organizationName = organizationName; return this; } - /** + /** * name of organization * @return organizationName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "MyOrganization", value = "name of organization") - public String getOrganizationName() { return organizationName; } - - public void setOrganizationName(String organizationName) { + public void setOrganizationName(@javax.annotation.Nullable String organizationName) { this.organizationName = organizationName; } - public OrganizationUser role(OrganizationRoles role) { - + public OrganizationUser role(@javax.annotation.Nullable OrganizationRoles role) { this.role = role; return this; } - /** + /** * Get role * @return role - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OrganizationRoles getRole() { return role; } - - public void setRole(OrganizationRoles role) { + public void setRole(@javax.annotation.Nullable OrganizationRoles role) { this.role = role; } - public OrganizationUser allowedActions(List allowedActions) { - + public OrganizationUser allowedActions(@javax.annotation.Nullable List allowedActions) { this.allowedActions = allowedActions; return this; } @@ -199,57 +243,19 @@ public OrganizationUser addAllowedActionsItem(NamespaceActions allowedActionsIte return this; } - /** + /** * list of actions user is allowed to do on this organization * @return allowedActions - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "list of actions user is allowed to do on this organization") - public List getAllowedActions() { return allowedActions; } - - public void setAllowedActions(List allowedActions) { + public void setAllowedActions(@javax.annotation.Nullable List allowedActions) { this.allowedActions = allowedActions; } - /** - * 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. - */ - public OrganizationUser 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -264,15 +270,16 @@ public boolean equals(Object o) { return Objects.equals(this.userId, organizationUser.userId) && Objects.equals(this.organizationId, organizationUser.organizationId) && Objects.equals(this.username, organizationUser.username) && + Objects.equals(this.userFullName, organizationUser.userFullName) && + Objects.equals(this.userEmail, organizationUser.userEmail) && Objects.equals(this.organizationName, organizationUser.organizationName) && Objects.equals(this.role, organizationUser.role) && - Objects.equals(this.allowedActions, organizationUser.allowedActions)&& - Objects.equals(this.additionalProperties, organizationUser.additionalProperties); + Objects.equals(this.allowedActions, organizationUser.allowedActions); } @Override public int hashCode() { - return Objects.hash(userId, organizationId, username, organizationName, role, allowedActions, additionalProperties); + return Objects.hash(userId, organizationId, username, userFullName, userEmail, organizationName, role, allowedActions); } @Override @@ -282,10 +289,11 @@ public String toString() { sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); sb.append(" organizationId: ").append(toIndentedString(organizationId)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" userFullName: ").append(toIndentedString(userFullName)).append("\n"); + sb.append(" userEmail: ").append(toIndentedString(userEmail)).append("\n"); sb.append(" organizationName: ").append(toIndentedString(organizationName)).append("\n"); sb.append(" role: ").append(toIndentedString(role)).append("\n"); sb.append(" allowedActions: ").append(toIndentedString(allowedActions)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -311,6 +319,8 @@ private String toIndentedString(Object o) { openapiFields.add("user_id"); openapiFields.add("organization_id"); openapiFields.add("username"); + openapiFields.add("user_full_name"); + openapiFields.add("user_email"); openapiFields.add("organization_name"); openapiFields.add("role"); openapiFields.add("allowed_actions"); @@ -319,20 +329,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OrganizationUser - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (OrganizationUser.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 OrganizationUser + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrganizationUser.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in OrganizationUser is not found in the empty JSON string", OrganizationUser.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrganizationUser.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrganizationUser` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); 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())); } @@ -342,11 +359,21 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } + if ((jsonObj.get("user_full_name") != null && !jsonObj.get("user_full_name").isJsonNull()) && !jsonObj.get("user_full_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `user_full_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_full_name").toString())); + } + if ((jsonObj.get("user_email") != null && !jsonObj.get("user_email").isJsonNull()) && !jsonObj.get("user_email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `user_email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_email").toString())); + } if ((jsonObj.get("organization_name") != null && !jsonObj.get("organization_name").isJsonNull()) && !jsonObj.get("organization_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `organization_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("organization_name").toString())); } - // ensure the json data is an array - if ((jsonObj.get("allowed_actions") != null && !jsonObj.get("allowed_actions").isJsonNull()) && !jsonObj.get("allowed_actions").isJsonArray()) { + // validate the optional field `role` + if (jsonObj.get("role") != null && !jsonObj.get("role").isJsonNull()) { + OrganizationRoles.validateJsonElement(jsonObj.get("role")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("allowed_actions") != null && !jsonObj.get("allowed_actions").isJsonNull() && !jsonObj.get("allowed_actions").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `allowed_actions` to be an array in the JSON string but got `%s`", jsonObj.get("allowed_actions").toString())); } } @@ -366,71 +393,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, OrganizationUser value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 OrganizationUser read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - OrganizationUser 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of OrganizationUser given an JSON string - * - * @param jsonString JSON string - * @return An instance of OrganizationUser - * @throws IOException if the JSON string is invalid with respect to OrganizationUser - */ + /** + * Create an instance of OrganizationUser given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrganizationUser + * @throws IOException if the JSON string is invalid with respect to OrganizationUser + */ public static OrganizationUser fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, OrganizationUser.class); } - /** - * Convert an instance of OrganizationUser to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OrganizationUser to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/PaginationMetadata.java b/src/main/java/io/tiledb/cloud/rest_api/model/PaginationMetadata.java index ac60f87..e779c2d 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/PaginationMetadata.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/PaginationMetadata.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,180 +11,144 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; +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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * PaginationMetadata */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class PaginationMetadata { public static final String SERIALIZED_NAME_PAGE = "page"; @SerializedName(SERIALIZED_NAME_PAGE) + @javax.annotation.Nullable private BigDecimal page; public static final String SERIALIZED_NAME_PER_PAGE = "per_page"; @SerializedName(SERIALIZED_NAME_PER_PAGE) + @javax.annotation.Nullable private BigDecimal perPage; public static final String SERIALIZED_NAME_TOTAL_PAGES = "total_pages"; @SerializedName(SERIALIZED_NAME_TOTAL_PAGES) + @javax.annotation.Nullable private BigDecimal totalPages; public static final String SERIALIZED_NAME_TOTAL_ITEMS = "total_items"; @SerializedName(SERIALIZED_NAME_TOTAL_ITEMS) + @javax.annotation.Nullable private BigDecimal totalItems; public PaginationMetadata() { } - public PaginationMetadata page(BigDecimal page) { - + public PaginationMetadata page(@javax.annotation.Nullable BigDecimal page) { this.page = page; return this; } - /** + /** * pagination offset. Use it to skip the first ((page - 1) * per_page) items * @return page - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "1.0", value = "pagination offset. Use it to skip the first ((page - 1) * per_page) items") - public BigDecimal getPage() { return page; } - - public void setPage(BigDecimal page) { + public void setPage(@javax.annotation.Nullable BigDecimal page) { this.page = page; } - public PaginationMetadata perPage(BigDecimal perPage) { - + public PaginationMetadata perPage(@javax.annotation.Nullable BigDecimal perPage) { this.perPage = perPage; return this; } - /** + /** * pagination limit (page size) * @return perPage - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "10.0", value = "pagination limit (page size)") - public BigDecimal getPerPage() { return perPage; } - - public void setPerPage(BigDecimal perPage) { + public void setPerPage(@javax.annotation.Nullable BigDecimal perPage) { this.perPage = perPage; } - public PaginationMetadata totalPages(BigDecimal totalPages) { - + public PaginationMetadata totalPages(@javax.annotation.Nullable BigDecimal totalPages) { this.totalPages = totalPages; return this; } - /** + /** * number of total pages with current limit * @return totalPages - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "14.0", value = "number of total pages with current limit") - public BigDecimal getTotalPages() { return totalPages; } - - public void setTotalPages(BigDecimal totalPages) { + public void setTotalPages(@javax.annotation.Nullable BigDecimal totalPages) { this.totalPages = totalPages; } - public PaginationMetadata totalItems(BigDecimal totalItems) { - + public PaginationMetadata totalItems(@javax.annotation.Nullable BigDecimal totalItems) { this.totalItems = totalItems; return this; } - /** + /** * number of total available items * @return totalItems - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "138.0", value = "number of total available items") - public BigDecimal getTotalItems() { return totalItems; } - - public void setTotalItems(BigDecimal totalItems) { + public void setTotalItems(@javax.annotation.Nullable BigDecimal totalItems) { this.totalItems = totalItems; } - /** - * 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. - */ - public PaginationMetadata 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -199,13 +163,12 @@ public boolean equals(Object o) { return Objects.equals(this.page, paginationMetadata.page) && Objects.equals(this.perPage, paginationMetadata.perPage) && Objects.equals(this.totalPages, paginationMetadata.totalPages) && - Objects.equals(this.totalItems, paginationMetadata.totalItems)&& - Objects.equals(this.additionalProperties, paginationMetadata.additionalProperties); + Objects.equals(this.totalItems, paginationMetadata.totalItems); } @Override public int hashCode() { - return Objects.hash(page, perPage, totalPages, totalItems, additionalProperties); + return Objects.hash(page, perPage, totalPages, totalItems); } @Override @@ -216,7 +179,6 @@ public String toString() { sb.append(" perPage: ").append(toIndentedString(perPage)).append("\n"); sb.append(" totalPages: ").append(toIndentedString(totalPages)).append("\n"); sb.append(" totalItems: ").append(toIndentedString(totalItems)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -248,20 +210,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to PaginationMetadata - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (PaginationMetadata.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 PaginationMetadata + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PaginationMetadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in PaginationMetadata is not found in the empty JSON string", PaginationMetadata.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PaginationMetadata.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PaginationMetadata` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -279,71 +248,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, PaginationMetadata value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 PaginationMetadata read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - PaginationMetadata 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of PaginationMetadata given an JSON string - * - * @param jsonString JSON string - * @return An instance of PaginationMetadata - * @throws IOException if the JSON string is invalid with respect to PaginationMetadata - */ + /** + * Create an instance of PaginationMetadata given an JSON string + * + * @param jsonString JSON string + * @return An instance of PaginationMetadata + * @throws IOException if the JSON string is invalid with respect to PaginationMetadata + */ public static PaginationMetadata fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, PaginationMetadata.class); } - /** - * Convert an instance of PaginationMetadata to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of PaginationMetadata to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/PodStatus.java b/src/main/java/io/tiledb/cloud/rest_api/model/PodStatus.java new file mode 100644 index 0000000..921162f --- /dev/null +++ b/src/main/java/io/tiledb/cloud/rest_api/model/PodStatus.java @@ -0,0 +1,80 @@ +/* + * TileDB Storage Platform API + * TileDB Storage Platform REST API + * + * The version of the OpenAPI document: 2.17.51 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +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; + +/** + * List of all available pod statuses + */ +@JsonAdapter(PodStatus.Adapter.class) +public enum PodStatus { + + TERMINATING("TERMINATING"), + + RUNNING("RUNNING"), + + LAUNCHING("LAUNCHING"); + + private String value; + + PodStatus(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PodStatus fromValue(String value) { + for (PodStatus b : PodStatus.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 PodStatus enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PodStatus read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PodStatus.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PodStatus.fromValue(value); + } +} + diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/Pricing.java b/src/main/java/io/tiledb/cloud/rest_api/model/Pricing.java index 91b5ca8..4f8111c 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/Pricing.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/Pricing.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,424 +11,364 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.PricingAggregateUsage; +import org.openapitools.client.model.PricingCurrency; +import org.openapitools.client.model.PricingInterval; +import org.openapitools.client.model.PricingType; +import org.openapitools.client.model.PricingUnitLabel; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Pricing created by converting an array to product */ -@ApiModel(description = "Pricing created by converting an array to product") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class Pricing { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private String id; public static final String SERIALIZED_NAME_ARRAY_UUID = "array_uuid"; @SerializedName(SERIALIZED_NAME_ARRAY_UUID) + @javax.annotation.Nullable private String arrayUuid; public static final String SERIALIZED_NAME_PRICING_NAME = "pricing_name"; @SerializedName(SERIALIZED_NAME_PRICING_NAME) + @javax.annotation.Nullable private String pricingName; public static final String SERIALIZED_NAME_PRICING_TYPE = "pricing_type"; @SerializedName(SERIALIZED_NAME_PRICING_TYPE) + @javax.annotation.Nullable private PricingType pricingType; public static final String SERIALIZED_NAME_PRODUCT_NAME = "product_name"; @SerializedName(SERIALIZED_NAME_PRODUCT_NAME) + @javax.annotation.Nullable private String productName; public static final String SERIALIZED_NAME_PRODUCT_STATEMENT_DESCRIPTOR = "product_statement_descriptor"; @SerializedName(SERIALIZED_NAME_PRODUCT_STATEMENT_DESCRIPTOR) + @javax.annotation.Nullable private String productStatementDescriptor; public static final String SERIALIZED_NAME_PRODUCT_UNIT_LABEL = "product_unit_label"; @SerializedName(SERIALIZED_NAME_PRODUCT_UNIT_LABEL) + @javax.annotation.Nullable private PricingUnitLabel productUnitLabel; public static final String SERIALIZED_NAME_CURRENCY = "currency"; @SerializedName(SERIALIZED_NAME_CURRENCY) + @javax.annotation.Nullable private PricingCurrency currency; public static final String SERIALIZED_NAME_AGGREGATE_USAGE = "aggregate_usage"; @SerializedName(SERIALIZED_NAME_AGGREGATE_USAGE) + @javax.annotation.Nullable private PricingAggregateUsage aggregateUsage; public static final String SERIALIZED_NAME_INTERVAL = "interval"; @SerializedName(SERIALIZED_NAME_INTERVAL) + @javax.annotation.Nullable private PricingInterval interval; public static final String SERIALIZED_NAME_DIVIDED_BY = "divided_by"; @SerializedName(SERIALIZED_NAME_DIVIDED_BY) + @javax.annotation.Nullable private Long dividedBy; public static final String SERIALIZED_NAME_CHARGE = "charge"; @SerializedName(SERIALIZED_NAME_CHARGE) + @javax.annotation.Nullable private Double charge; public static final String SERIALIZED_NAME_ACTIVATED = "activated"; @SerializedName(SERIALIZED_NAME_ACTIVATED) + @javax.annotation.Nullable private Boolean activated; public Pricing() { } - public Pricing id(String id) { - + public Pricing id(@javax.annotation.Nullable String id) { this.id = id; return this; } - /** + /** * Unique ID of plan as defined by Stripe * @return id - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "planID", value = "Unique ID of plan as defined by Stripe") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nullable String id) { this.id = id; } - public Pricing arrayUuid(String arrayUuid) { - + public Pricing arrayUuid(@javax.annotation.Nullable String arrayUuid) { this.arrayUuid = arrayUuid; return this; } - /** + /** * Unique ID of registered array * @return arrayUuid - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", value = "Unique ID of registered array") - public String getArrayUuid() { return arrayUuid; } - - public void setArrayUuid(String arrayUuid) { + public void setArrayUuid(@javax.annotation.Nullable String arrayUuid) { this.arrayUuid = arrayUuid; } - public Pricing pricingName(String pricingName) { - + public Pricing pricingName(@javax.annotation.Nullable String pricingName) { this.pricingName = pricingName; return this; } - /** + /** * Name of pricing * @return pricingName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Name of pricing") - public String getPricingName() { return pricingName; } - - public void setPricingName(String pricingName) { + public void setPricingName(@javax.annotation.Nullable String pricingName) { this.pricingName = pricingName; } - public Pricing pricingType(PricingType pricingType) { - + public Pricing pricingType(@javax.annotation.Nullable PricingType pricingType) { this.pricingType = pricingType; return this; } - /** + /** * Get pricingType * @return pricingType - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public PricingType getPricingType() { return pricingType; } - - public void setPricingType(PricingType pricingType) { + public void setPricingType(@javax.annotation.Nullable PricingType pricingType) { this.pricingType = pricingType; } - public Pricing productName(String productName) { - + public Pricing productName(@javax.annotation.Nullable String productName) { this.productName = productName; return this; } - /** + /** * Name of product * @return productName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Name of product") - public String getProductName() { return productName; } - - public void setProductName(String productName) { + public void setProductName(@javax.annotation.Nullable String productName) { this.productName = productName; } - public Pricing productStatementDescriptor(String productStatementDescriptor) { - + public Pricing productStatementDescriptor(@javax.annotation.Nullable String productStatementDescriptor) { this.productStatementDescriptor = productStatementDescriptor; return this; } - /** + /** * Extra information about a product which will appear on the credit card statement of the customer * @return productStatementDescriptor - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Extra information about a product which will appear on the credit card statement of the customer") - public String getProductStatementDescriptor() { return productStatementDescriptor; } - - public void setProductStatementDescriptor(String productStatementDescriptor) { + public void setProductStatementDescriptor(@javax.annotation.Nullable String productStatementDescriptor) { this.productStatementDescriptor = productStatementDescriptor; } - public Pricing productUnitLabel(PricingUnitLabel productUnitLabel) { - + public Pricing productUnitLabel(@javax.annotation.Nullable PricingUnitLabel productUnitLabel) { this.productUnitLabel = productUnitLabel; return this; } - /** + /** * Get productUnitLabel * @return productUnitLabel - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public PricingUnitLabel getProductUnitLabel() { return productUnitLabel; } - - public void setProductUnitLabel(PricingUnitLabel productUnitLabel) { + public void setProductUnitLabel(@javax.annotation.Nullable PricingUnitLabel productUnitLabel) { this.productUnitLabel = productUnitLabel; } - public Pricing currency(PricingCurrency currency) { - + public Pricing currency(@javax.annotation.Nullable PricingCurrency currency) { this.currency = currency; return this; } - /** + /** * Get currency * @return currency - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public PricingCurrency getCurrency() { return currency; } - - public void setCurrency(PricingCurrency currency) { + public void setCurrency(@javax.annotation.Nullable PricingCurrency currency) { this.currency = currency; } - public Pricing aggregateUsage(PricingAggregateUsage aggregateUsage) { - + public Pricing aggregateUsage(@javax.annotation.Nullable PricingAggregateUsage aggregateUsage) { this.aggregateUsage = aggregateUsage; return this; } - /** + /** * Get aggregateUsage * @return aggregateUsage - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public PricingAggregateUsage getAggregateUsage() { return aggregateUsage; } - - public void setAggregateUsage(PricingAggregateUsage aggregateUsage) { + public void setAggregateUsage(@javax.annotation.Nullable PricingAggregateUsage aggregateUsage) { this.aggregateUsage = aggregateUsage; } - public Pricing interval(PricingInterval interval) { - + public Pricing interval(@javax.annotation.Nullable PricingInterval interval) { this.interval = interval; return this; } - /** + /** * Get interval * @return interval - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public PricingInterval getInterval() { return interval; } - - public void setInterval(PricingInterval interval) { + public void setInterval(@javax.annotation.Nullable PricingInterval interval) { this.interval = interval; } - public Pricing dividedBy(Long dividedBy) { - + public Pricing dividedBy(@javax.annotation.Nullable Long dividedBy) { this.dividedBy = dividedBy; return this; } - /** + /** * Group of n product unit labels * @return dividedBy - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "1048576", value = "Group of n product unit labels") - public Long getDividedBy() { return dividedBy; } - - public void setDividedBy(Long dividedBy) { + public void setDividedBy(@javax.annotation.Nullable Long dividedBy) { this.dividedBy = dividedBy; } - public Pricing charge(Double charge) { - + public Pricing charge(@javax.annotation.Nullable Double charge) { this.charge = charge; return this; } - /** + /** * Price in cents (decimal) per unitlabel * @return charge - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Price in cents (decimal) per unitlabel") - public Double getCharge() { return charge; } - - public void setCharge(Double charge) { + public void setCharge(@javax.annotation.Nullable Double charge) { this.charge = charge; } - public Pricing activated(Boolean activated) { - + public Pricing activated(@javax.annotation.Nullable Boolean activated) { this.activated = activated; return this; } - /** + /** * If pricing is activated * @return activated - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "false", value = "If pricing is activated") - public Boolean getActivated() { return activated; } - - public void setActivated(Boolean activated) { + public void setActivated(@javax.annotation.Nullable Boolean activated) { this.activated = activated; } - /** - * 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. - */ - public Pricing 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -452,13 +392,12 @@ public boolean equals(Object o) { Objects.equals(this.interval, pricing.interval) && Objects.equals(this.dividedBy, pricing.dividedBy) && Objects.equals(this.charge, pricing.charge) && - Objects.equals(this.activated, pricing.activated)&& - Objects.equals(this.additionalProperties, pricing.additionalProperties); + Objects.equals(this.activated, pricing.activated); } @Override public int hashCode() { - return Objects.hash(id, arrayUuid, pricingName, pricingType, productName, productStatementDescriptor, productUnitLabel, currency, aggregateUsage, interval, dividedBy, charge, activated, additionalProperties); + return Objects.hash(id, arrayUuid, pricingName, pricingType, productName, productStatementDescriptor, productUnitLabel, currency, aggregateUsage, interval, dividedBy, charge, activated); } @Override @@ -478,7 +417,6 @@ public String toString() { sb.append(" dividedBy: ").append(toIndentedString(dividedBy)).append("\n"); sb.append(" charge: ").append(toIndentedString(charge)).append("\n"); sb.append(" activated: ").append(toIndentedString(activated)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -519,20 +457,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Pricing - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (Pricing.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 Pricing + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Pricing.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in Pricing is not found in the empty JSON string", Pricing.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Pricing.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Pricing` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !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())); } @@ -542,12 +487,32 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("pricing_name") != null && !jsonObj.get("pricing_name").isJsonNull()) && !jsonObj.get("pricing_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `pricing_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pricing_name").toString())); } + // validate the optional field `pricing_type` + if (jsonObj.get("pricing_type") != null && !jsonObj.get("pricing_type").isJsonNull()) { + PricingType.validateJsonElement(jsonObj.get("pricing_type")); + } if ((jsonObj.get("product_name") != null && !jsonObj.get("product_name").isJsonNull()) && !jsonObj.get("product_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `product_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("product_name").toString())); } if ((jsonObj.get("product_statement_descriptor") != null && !jsonObj.get("product_statement_descriptor").isJsonNull()) && !jsonObj.get("product_statement_descriptor").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `product_statement_descriptor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("product_statement_descriptor").toString())); } + // validate the optional field `product_unit_label` + if (jsonObj.get("product_unit_label") != null && !jsonObj.get("product_unit_label").isJsonNull()) { + PricingUnitLabel.validateJsonElement(jsonObj.get("product_unit_label")); + } + // validate the optional field `currency` + if (jsonObj.get("currency") != null && !jsonObj.get("currency").isJsonNull()) { + PricingCurrency.validateJsonElement(jsonObj.get("currency")); + } + // validate the optional field `aggregate_usage` + if (jsonObj.get("aggregate_usage") != null && !jsonObj.get("aggregate_usage").isJsonNull()) { + PricingAggregateUsage.validateJsonElement(jsonObj.get("aggregate_usage")); + } + // validate the optional field `interval` + if (jsonObj.get("interval") != null && !jsonObj.get("interval").isJsonNull()) { + PricingInterval.validateJsonElement(jsonObj.get("interval")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -565,71 +530,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, Pricing value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 Pricing read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - Pricing 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Pricing given an JSON string - * - * @param jsonString JSON string - * @return An instance of Pricing - * @throws IOException if the JSON string is invalid with respect to Pricing - */ + /** + * Create an instance of Pricing given an JSON string + * + * @param jsonString JSON string + * @return An instance of Pricing + * @throws IOException if the JSON string is invalid with respect to Pricing + */ public static Pricing fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Pricing.class); } - /** - * Convert an instance of Pricing to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Pricing to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/PricingAggregateUsage.java b/src/main/java/io/tiledb/cloud/rest_api/model/PricingAggregateUsage.java index b80ac94..5abc16c 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/PricingAggregateUsage.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/PricingAggregateUsage.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -63,5 +67,10 @@ public PricingAggregateUsage read(final JsonReader jsonReader) throws IOExceptio return PricingAggregateUsage.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PricingAggregateUsage.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/PricingCurrency.java b/src/main/java/io/tiledb/cloud/rest_api/model/PricingCurrency.java index 45357ef..012a9fb 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/PricingCurrency.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/PricingCurrency.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -63,5 +67,10 @@ public PricingCurrency read(final JsonReader jsonReader) throws IOException { return PricingCurrency.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PricingCurrency.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/PricingInterval.java b/src/main/java/io/tiledb/cloud/rest_api/model/PricingInterval.java index 3b60c65..937d3db 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/PricingInterval.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/PricingInterval.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -63,5 +67,10 @@ public PricingInterval read(final JsonReader jsonReader) throws IOException { return PricingInterval.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PricingInterval.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/PricingType.java b/src/main/java/io/tiledb/cloud/rest_api/model/PricingType.java index 7ff4557..576c6d9 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/PricingType.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/PricingType.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -65,5 +69,10 @@ public PricingType read(final JsonReader jsonReader) throws IOException { return PricingType.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PricingType.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/PricingUnitLabel.java b/src/main/java/io/tiledb/cloud/rest_api/model/PricingUnitLabel.java index e4217f0..171f589 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/PricingUnitLabel.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/PricingUnitLabel.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -65,5 +69,10 @@ public PricingUnitLabel read(final JsonReader jsonReader) throws IOException { return PricingUnitLabel.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PricingUnitLabel.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/PublicShareFilter.java b/src/main/java/io/tiledb/cloud/rest_api/model/PublicShareFilter.java index ccb029e..aa3051e 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/PublicShareFilter.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/PublicShareFilter.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -65,5 +69,10 @@ public PublicShareFilter read(final JsonReader jsonReader) throws IOException { return PublicShareFilter.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PublicShareFilter.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/Query.java b/src/main/java/io/tiledb/cloud/rest_api/model/Query.java index 3040526..9d2c881 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/Query.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/Query.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,323 +11,279 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.AttributeBufferHeader; +import org.openapitools.client.model.Layout; +import org.openapitools.client.model.QueryReader; +import org.openapitools.client.model.Querystatus; +import org.openapitools.client.model.Querytype; +import org.openapitools.client.model.Writer; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Query */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class Query { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull private Querytype type; public static final String SERIALIZED_NAME_LAYOUT = "layout"; @SerializedName(SERIALIZED_NAME_LAYOUT) + @javax.annotation.Nonnull private Layout layout; public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull private Querystatus status; public static final String SERIALIZED_NAME_ATTRIBUTE_BUFFER_HEADERS = "attributeBufferHeaders"; @SerializedName(SERIALIZED_NAME_ATTRIBUTE_BUFFER_HEADERS) + @javax.annotation.Nonnull private List attributeBufferHeaders = new ArrayList<>(); public static final String SERIALIZED_NAME_WRITER = "writer"; @SerializedName(SERIALIZED_NAME_WRITER) + @javax.annotation.Nullable private Writer writer; public static final String SERIALIZED_NAME_READER = "reader"; @SerializedName(SERIALIZED_NAME_READER) + @javax.annotation.Nullable private QueryReader reader; public static final String SERIALIZED_NAME_ARRAY = "array"; @SerializedName(SERIALIZED_NAME_ARRAY) + @javax.annotation.Nonnull private Array array; public static final String SERIALIZED_NAME_TOTAL_FIXED_LENGTH_BUFFER_BYTES = "totalFixedLengthBufferBytes"; @SerializedName(SERIALIZED_NAME_TOTAL_FIXED_LENGTH_BUFFER_BYTES) + @javax.annotation.Nonnull private Integer totalFixedLengthBufferBytes; public static final String SERIALIZED_NAME_TOTAL_VAR_LEN_BUFFER_BYTES = "totalVarLenBufferBytes"; @SerializedName(SERIALIZED_NAME_TOTAL_VAR_LEN_BUFFER_BYTES) + @javax.annotation.Nonnull private Integer totalVarLenBufferBytes; public Query() { } - public Query type(Querytype type) { - + public Query type(@javax.annotation.Nonnull Querytype type) { this.type = type; return this; } - /** + /** * Get type * @return type - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Querytype getType() { return type; } - - public void setType(Querytype type) { + public void setType(@javax.annotation.Nonnull Querytype type) { this.type = type; } - public Query layout(Layout layout) { - + public Query layout(@javax.annotation.Nonnull Layout layout) { this.layout = layout; return this; } - /** + /** * Get layout * @return layout - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Layout getLayout() { return layout; } - - public void setLayout(Layout layout) { + public void setLayout(@javax.annotation.Nonnull Layout layout) { this.layout = layout; } - public Query status(Querystatus status) { - + public Query status(@javax.annotation.Nonnull Querystatus status) { this.status = status; return this; } - /** + /** * Get status * @return status - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Querystatus getStatus() { return status; } - - public void setStatus(Querystatus status) { + public void setStatus(@javax.annotation.Nonnull Querystatus status) { this.status = status; } - public Query attributeBufferHeaders(List attributeBufferHeaders) { - + public Query attributeBufferHeaders(@javax.annotation.Nonnull List attributeBufferHeaders) { this.attributeBufferHeaders = attributeBufferHeaders; return this; } public Query addAttributeBufferHeadersItem(AttributeBufferHeader attributeBufferHeadersItem) { + if (this.attributeBufferHeaders == null) { + this.attributeBufferHeaders = new ArrayList<>(); + } this.attributeBufferHeaders.add(attributeBufferHeadersItem); return this; } - /** + /** * List of attribute buffer headers * @return attributeBufferHeaders - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "List of attribute buffer headers") - public List getAttributeBufferHeaders() { return attributeBufferHeaders; } - - public void setAttributeBufferHeaders(List attributeBufferHeaders) { + public void setAttributeBufferHeaders(@javax.annotation.Nonnull List attributeBufferHeaders) { this.attributeBufferHeaders = attributeBufferHeaders; } - public Query writer(Writer writer) { - + public Query writer(@javax.annotation.Nullable Writer writer) { this.writer = writer; return this; } - /** + /** * Get writer * @return writer - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Writer getWriter() { return writer; } - - public void setWriter(Writer writer) { + public void setWriter(@javax.annotation.Nullable Writer writer) { this.writer = writer; } - public Query reader(QueryReader reader) { - + public Query reader(@javax.annotation.Nullable QueryReader reader) { this.reader = reader; return this; } - /** + /** * Get reader * @return reader - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public QueryReader getReader() { return reader; } - - public void setReader(QueryReader reader) { + public void setReader(@javax.annotation.Nullable QueryReader reader) { this.reader = reader; } - public Query array(Array array) { - + public Query array(@javax.annotation.Nonnull Array array) { this.array = array; return this; } - /** + /** * Get array * @return array - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Array getArray() { return array; } - - public void setArray(Array array) { + public void setArray(@javax.annotation.Nonnull Array array) { this.array = array; } - public Query totalFixedLengthBufferBytes(Integer totalFixedLengthBufferBytes) { - + public Query totalFixedLengthBufferBytes(@javax.annotation.Nonnull Integer totalFixedLengthBufferBytes) { this.totalFixedLengthBufferBytes = totalFixedLengthBufferBytes; return this; } - /** + /** * Total number of bytes in fixed size attribute buffers. * @return totalFixedLengthBufferBytes - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Total number of bytes in fixed size attribute buffers.") - public Integer getTotalFixedLengthBufferBytes() { return totalFixedLengthBufferBytes; } - - public void setTotalFixedLengthBufferBytes(Integer totalFixedLengthBufferBytes) { + public void setTotalFixedLengthBufferBytes(@javax.annotation.Nonnull Integer totalFixedLengthBufferBytes) { this.totalFixedLengthBufferBytes = totalFixedLengthBufferBytes; } - public Query totalVarLenBufferBytes(Integer totalVarLenBufferBytes) { - + public Query totalVarLenBufferBytes(@javax.annotation.Nonnull Integer totalVarLenBufferBytes) { this.totalVarLenBufferBytes = totalVarLenBufferBytes; return this; } - /** + /** * Total number of bytes in variable size attribute buffers. * @return totalVarLenBufferBytes - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Total number of bytes in variable size attribute buffers.") - public Integer getTotalVarLenBufferBytes() { return totalVarLenBufferBytes; } - - public void setTotalVarLenBufferBytes(Integer totalVarLenBufferBytes) { + public void setTotalVarLenBufferBytes(@javax.annotation.Nonnull Integer totalVarLenBufferBytes) { this.totalVarLenBufferBytes = totalVarLenBufferBytes; } - /** - * 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. - */ - public Query 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -347,13 +303,12 @@ public boolean equals(Object o) { Objects.equals(this.reader, query.reader) && Objects.equals(this.array, query.array) && Objects.equals(this.totalFixedLengthBufferBytes, query.totalFixedLengthBufferBytes) && - Objects.equals(this.totalVarLenBufferBytes, query.totalVarLenBufferBytes)&& - Objects.equals(this.additionalProperties, query.additionalProperties); + Objects.equals(this.totalVarLenBufferBytes, query.totalVarLenBufferBytes); } @Override public int hashCode() { - return Objects.hash(type, layout, status, attributeBufferHeaders, writer, reader, array, totalFixedLengthBufferBytes, totalVarLenBufferBytes, additionalProperties); + return Objects.hash(type, layout, status, attributeBufferHeaders, writer, reader, array, totalFixedLengthBufferBytes, totalVarLenBufferBytes); } @Override @@ -369,7 +324,6 @@ public String toString() { sb.append(" array: ").append(toIndentedString(array)).append("\n"); sb.append(" totalFixedLengthBufferBytes: ").append(toIndentedString(totalFixedLengthBufferBytes)).append("\n"); sb.append(" totalVarLenBufferBytes: ").append(toIndentedString(totalVarLenBufferBytes)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -413,51 +367,60 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("totalVarLenBufferBytes"); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Query - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (Query.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 Query + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Query.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in Query is not found in the empty JSON string", Query.openapiRequiredFields.toString())); } } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Query.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Query` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Query.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + 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())); } } - JsonArray jsonArrayattributeBufferHeaders = jsonObj.getAsJsonArray("attributeBufferHeaders"); - if (jsonArrayattributeBufferHeaders != null) { - // ensure the json data is an array - if (!jsonObj.get("attributeBufferHeaders").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `attributeBufferHeaders` to be an array in the JSON string but got `%s`", jsonObj.get("attributeBufferHeaders").toString())); - } - - // validate the optional field `attributeBufferHeaders` (array) - for (int i = 0; i < jsonArrayattributeBufferHeaders.size(); i++) { - AttributeBufferHeader.validateJsonObject(jsonArrayattributeBufferHeaders.get(i).getAsJsonObject()); - }; + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `type` + Querytype.validateJsonElement(jsonObj.get("type")); + // validate the required field `layout` + Layout.validateJsonElement(jsonObj.get("layout")); + // validate the required field `status` + Querystatus.validateJsonElement(jsonObj.get("status")); + // ensure the json data is an array + if (!jsonObj.get("attributeBufferHeaders").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeBufferHeaders` to be an array in the JSON string but got `%s`", jsonObj.get("attributeBufferHeaders").toString())); } + + JsonArray jsonArrayattributeBufferHeaders = jsonObj.getAsJsonArray("attributeBufferHeaders"); + // validate the required field `attributeBufferHeaders` (array) + for (int i = 0; i < jsonArrayattributeBufferHeaders.size(); i++) { + AttributeBufferHeader.validateJsonElement(jsonArrayattributeBufferHeaders.get(i)); + }; // validate the optional field `writer` if (jsonObj.get("writer") != null && !jsonObj.get("writer").isJsonNull()) { - Writer.validateJsonObject(jsonObj.getAsJsonObject("writer")); + Writer.validateJsonElement(jsonObj.get("writer")); } // validate the optional field `reader` if (jsonObj.get("reader") != null && !jsonObj.get("reader").isJsonNull()) { - QueryReader.validateJsonObject(jsonObj.getAsJsonObject("reader")); - } - // validate the optional field `array` - if (jsonObj.get("array") != null && !jsonObj.get("array").isJsonNull()) { - Array.validateJsonObject(jsonObj.getAsJsonObject("array")); + QueryReader.validateJsonElement(jsonObj.get("reader")); } + // validate the required field `array` + Array.validateJsonElement(jsonObj.get("array")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -475,71 +438,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, Query value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 Query read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - Query 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Query given an JSON string - * - * @param jsonString JSON string - * @return An instance of Query - * @throws IOException if the JSON string is invalid with respect to Query - */ + /** + * Create an instance of Query given an JSON string + * + * @param jsonString JSON string + * @return An instance of Query + * @throws IOException if the JSON string is invalid with respect to Query + */ public static Query fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Query.class); } - /** - * Convert an instance of Query to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Query to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/QueryJson.java b/src/main/java/io/tiledb/cloud/rest_api/model/QueryJson.java index 824c792..9459c64 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/QueryJson.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/QueryJson.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,75 +11,81 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.QueryRanges; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Query returning results as JSON */ -@ApiModel(description = "Query returning results as JSON") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class QueryJson { public static final String SERIALIZED_NAME_QUERY_RANGES = "query_ranges"; @SerializedName(SERIALIZED_NAME_QUERY_RANGES) + @javax.annotation.Nullable private QueryRanges queryRanges; public static final String SERIALIZED_NAME_FIELDS = "fields"; @SerializedName(SERIALIZED_NAME_FIELDS) - private List fields = null; + @javax.annotation.Nullable + private List fields = new ArrayList<>(); public QueryJson() { } - public QueryJson queryRanges(QueryRanges queryRanges) { - + public QueryJson queryRanges(@javax.annotation.Nullable QueryRanges queryRanges) { this.queryRanges = queryRanges; return this; } - /** + /** * Get queryRanges * @return queryRanges - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public QueryRanges getQueryRanges() { return queryRanges; } - - public void setQueryRanges(QueryRanges queryRanges) { + public void setQueryRanges(@javax.annotation.Nullable QueryRanges queryRanges) { this.queryRanges = queryRanges; } - public QueryJson fields(List fields) { - + public QueryJson fields(@javax.annotation.Nullable List fields) { this.fields = fields; return this; } @@ -92,57 +98,19 @@ public QueryJson addFieldsItem(String fieldsItem) { return this; } - /** + /** * List of fields to return data from, empty means return data for all fields * @return fields - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "List of fields to return data from, empty means return data for all fields") - public List getFields() { return fields; } - - public void setFields(List fields) { + public void setFields(@javax.annotation.Nullable List fields) { this.fields = fields; } - /** - * 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. - */ - public QueryJson 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -155,13 +123,12 @@ public boolean equals(Object o) { } QueryJson queryJson = (QueryJson) o; return Objects.equals(this.queryRanges, queryJson.queryRanges) && - Objects.equals(this.fields, queryJson.fields)&& - Objects.equals(this.additionalProperties, queryJson.additionalProperties); + Objects.equals(this.fields, queryJson.fields); } @Override public int hashCode() { - return Objects.hash(queryRanges, fields, additionalProperties); + return Objects.hash(queryRanges, fields); } @Override @@ -170,7 +137,6 @@ public String toString() { sb.append("class QueryJson {\n"); sb.append(" queryRanges: ").append(toIndentedString(queryRanges)).append("\n"); sb.append(" fields: ").append(toIndentedString(fields)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -200,26 +166,33 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to QueryJson - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (QueryJson.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 QueryJson + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QueryJson.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in QueryJson is not found in the empty JSON string", QueryJson.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QueryJson.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QueryJson` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `query_ranges` if (jsonObj.get("query_ranges") != null && !jsonObj.get("query_ranges").isJsonNull()) { - QueryRanges.validateJsonObject(jsonObj.getAsJsonObject("query_ranges")); + QueryRanges.validateJsonElement(jsonObj.get("query_ranges")); } - // ensure the json data is an array - if ((jsonObj.get("fields") != null && !jsonObj.get("fields").isJsonNull()) && !jsonObj.get("fields").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("fields") != null && !jsonObj.get("fields").isJsonNull() && !jsonObj.get("fields").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `fields` to be an array in the JSON string but got `%s`", jsonObj.get("fields").toString())); } } @@ -239,71 +212,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, QueryJson value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 QueryJson read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - QueryJson 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of QueryJson given an JSON string - * - * @param jsonString JSON string - * @return An instance of QueryJson - * @throws IOException if the JSON string is invalid with respect to QueryJson - */ + /** + * Create an instance of QueryJson given an JSON string + * + * @param jsonString JSON string + * @return An instance of QueryJson + * @throws IOException if the JSON string is invalid with respect to QueryJson + */ public static QueryJson fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, QueryJson.class); } - /** - * Convert an instance of QueryJson to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of QueryJson to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/QueryRanges.java b/src/main/java/io/tiledb/cloud/rest_api/model/QueryRanges.java index dd96261..31bc609 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/QueryRanges.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/QueryRanges.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,76 +11,82 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.Layout; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Subarray bounds to query */ -@ApiModel(description = "Subarray bounds to query") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class QueryRanges { public static final String SERIALIZED_NAME_LAYOUT = "layout"; @SerializedName(SERIALIZED_NAME_LAYOUT) + @javax.annotation.Nullable private Layout layout; public static final String SERIALIZED_NAME_RANGES = "ranges"; @SerializedName(SERIALIZED_NAME_RANGES) - private List> ranges = null; + @javax.annotation.Nullable + private List> ranges = new ArrayList<>(); public QueryRanges() { } - public QueryRanges layout(Layout layout) { - + public QueryRanges layout(@javax.annotation.Nullable Layout layout) { this.layout = layout; return this; } - /** + /** * Get layout * @return layout - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Layout getLayout() { return layout; } - - public void setLayout(Layout layout) { + public void setLayout(@javax.annotation.Nullable Layout layout) { this.layout = layout; } - public QueryRanges ranges(List> ranges) { - + public QueryRanges ranges(@javax.annotation.Nullable List> ranges) { this.ranges = ranges; return this; } @@ -93,57 +99,19 @@ public QueryRanges addRangesItem(List rangesItem) { return this; } - /** + /** * List of ranges, * @return ranges - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "List of ranges,") - public List> getRanges() { return ranges; } - - public void setRanges(List> ranges) { + public void setRanges(@javax.annotation.Nullable List> ranges) { this.ranges = ranges; } - /** - * 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. - */ - public QueryRanges 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -156,13 +124,12 @@ public boolean equals(Object o) { } QueryRanges queryRanges = (QueryRanges) o; return Objects.equals(this.layout, queryRanges.layout) && - Objects.equals(this.ranges, queryRanges.ranges)&& - Objects.equals(this.additionalProperties, queryRanges.additionalProperties); + Objects.equals(this.ranges, queryRanges.ranges); } @Override public int hashCode() { - return Objects.hash(layout, ranges, additionalProperties); + return Objects.hash(layout, ranges); } @Override @@ -171,7 +138,6 @@ public String toString() { sb.append("class QueryRanges {\n"); sb.append(" layout: ").append(toIndentedString(layout)).append("\n"); sb.append(" ranges: ").append(toIndentedString(ranges)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -201,22 +167,33 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to QueryRanges - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (QueryRanges.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 QueryRanges + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QueryRanges.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in QueryRanges is not found in the empty JSON string", QueryRanges.openapiRequiredFields.toString())); } } - // ensure the json data is an array - if ((jsonObj.get("ranges") != null && !jsonObj.get("ranges").isJsonNull()) && !jsonObj.get("ranges").isJsonArray()) { + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QueryRanges.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QueryRanges` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `layout` + if (jsonObj.get("layout") != null && !jsonObj.get("layout").isJsonNull()) { + Layout.validateJsonElement(jsonObj.get("layout")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("ranges") != null && !jsonObj.get("ranges").isJsonNull() && !jsonObj.get("ranges").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `ranges` to be an array in the JSON string but got `%s`", jsonObj.get("ranges").toString())); } } @@ -236,71 +213,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, QueryRanges value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 QueryRanges read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - QueryRanges 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of QueryRanges given an JSON string - * - * @param jsonString JSON string - * @return An instance of QueryRanges - * @throws IOException if the JSON string is invalid with respect to QueryRanges - */ + /** + * Create an instance of QueryRanges given an JSON string + * + * @param jsonString JSON string + * @return An instance of QueryRanges + * @throws IOException if the JSON string is invalid with respect to QueryRanges + */ public static QueryRanges fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, QueryRanges.class); } - /** - * Convert an instance of QueryRanges to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of QueryRanges to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/QueryReader.java b/src/main/java/io/tiledb/cloud/rest_api/model/QueryReader.java index 932117c..5d8d897 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/QueryReader.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/QueryReader.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,236 +11,194 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.Layout; +import org.openapitools.client.model.ReadState; +import org.openapitools.client.model.Subarray; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Read struct (can't be called reader due to class name conflict) */ -@ApiModel(description = "Read struct (can't be called reader due to class name conflict)") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class QueryReader { public static final String SERIALIZED_NAME_LAYOUT = "layout"; @SerializedName(SERIALIZED_NAME_LAYOUT) + @javax.annotation.Nullable private Layout layout; public static final String SERIALIZED_NAME_SUBARRAY = "subarray"; @SerializedName(SERIALIZED_NAME_SUBARRAY) + @javax.annotation.Nullable private Subarray subarray; public static final String SERIALIZED_NAME_READ_STATE = "readState"; @SerializedName(SERIALIZED_NAME_READ_STATE) + @javax.annotation.Nullable private ReadState readState; public static final String SERIALIZED_NAME_VAR_OFFSETS_MODE = "varOffsetsMode"; @SerializedName(SERIALIZED_NAME_VAR_OFFSETS_MODE) + @javax.annotation.Nullable private String varOffsetsMode; public static final String SERIALIZED_NAME_VAR_OFFSETS_ADD_EXTRA_ELEMENT = "varOffsetsAddExtraElement"; @SerializedName(SERIALIZED_NAME_VAR_OFFSETS_ADD_EXTRA_ELEMENT) + @javax.annotation.Nullable private Boolean varOffsetsAddExtraElement; public static final String SERIALIZED_NAME_VAR_OFFSETS_BITSIZE = "varOffsetsBitsize"; @SerializedName(SERIALIZED_NAME_VAR_OFFSETS_BITSIZE) + @javax.annotation.Nullable private Integer varOffsetsBitsize; public QueryReader() { } - public QueryReader layout(Layout layout) { - + public QueryReader layout(@javax.annotation.Nullable Layout layout) { this.layout = layout; return this; } - /** + /** * Get layout * @return layout - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Layout getLayout() { return layout; } - - public void setLayout(Layout layout) { + public void setLayout(@javax.annotation.Nullable Layout layout) { this.layout = layout; } - public QueryReader subarray(Subarray subarray) { - + public QueryReader subarray(@javax.annotation.Nullable Subarray subarray) { this.subarray = subarray; return this; } - /** + /** * Get subarray * @return subarray - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Subarray getSubarray() { return subarray; } - - public void setSubarray(Subarray subarray) { + public void setSubarray(@javax.annotation.Nullable Subarray subarray) { this.subarray = subarray; } - public QueryReader readState(ReadState readState) { - + public QueryReader readState(@javax.annotation.Nullable ReadState readState) { this.readState = readState; return this; } - /** + /** * Get readState * @return readState - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public ReadState getReadState() { return readState; } - - public void setReadState(ReadState readState) { + public void setReadState(@javax.annotation.Nullable ReadState readState) { this.readState = readState; } - public QueryReader varOffsetsMode(String varOffsetsMode) { - + public QueryReader varOffsetsMode(@javax.annotation.Nullable String varOffsetsMode) { this.varOffsetsMode = varOffsetsMode; return this; } - /** + /** * The offsets format (bytes or elements) to be used. * @return varOffsetsMode - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The offsets format (bytes or elements) to be used.") - public String getVarOffsetsMode() { return varOffsetsMode; } - - public void setVarOffsetsMode(String varOffsetsMode) { + public void setVarOffsetsMode(@javax.annotation.Nullable String varOffsetsMode) { this.varOffsetsMode = varOffsetsMode; } - public QueryReader varOffsetsAddExtraElement(Boolean varOffsetsAddExtraElement) { - + public QueryReader varOffsetsAddExtraElement(@javax.annotation.Nullable Boolean varOffsetsAddExtraElement) { this.varOffsetsAddExtraElement = varOffsetsAddExtraElement; return this; } - /** + /** * True if an extra element will be added to the end of the offsets buffer. * @return varOffsetsAddExtraElement - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "True if an extra element will be added to the end of the offsets buffer.") - public Boolean getVarOffsetsAddExtraElement() { return varOffsetsAddExtraElement; } - - public void setVarOffsetsAddExtraElement(Boolean varOffsetsAddExtraElement) { + public void setVarOffsetsAddExtraElement(@javax.annotation.Nullable Boolean varOffsetsAddExtraElement) { this.varOffsetsAddExtraElement = varOffsetsAddExtraElement; } - public QueryReader varOffsetsBitsize(Integer varOffsetsBitsize) { - + public QueryReader varOffsetsBitsize(@javax.annotation.Nullable Integer varOffsetsBitsize) { this.varOffsetsBitsize = varOffsetsBitsize; return this; } - /** + /** * The offsets bitsize (32 or 64) to be used. * @return varOffsetsBitsize - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The offsets bitsize (32 or 64) to be used.") - public Integer getVarOffsetsBitsize() { return varOffsetsBitsize; } - - public void setVarOffsetsBitsize(Integer varOffsetsBitsize) { + public void setVarOffsetsBitsize(@javax.annotation.Nullable Integer varOffsetsBitsize) { this.varOffsetsBitsize = varOffsetsBitsize; } - /** - * 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. - */ - public QueryReader 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -257,13 +215,12 @@ public boolean equals(Object o) { Objects.equals(this.readState, queryReader.readState) && Objects.equals(this.varOffsetsMode, queryReader.varOffsetsMode) && Objects.equals(this.varOffsetsAddExtraElement, queryReader.varOffsetsAddExtraElement) && - Objects.equals(this.varOffsetsBitsize, queryReader.varOffsetsBitsize)&& - Objects.equals(this.additionalProperties, queryReader.additionalProperties); + Objects.equals(this.varOffsetsBitsize, queryReader.varOffsetsBitsize); } @Override public int hashCode() { - return Objects.hash(layout, subarray, readState, varOffsetsMode, varOffsetsAddExtraElement, varOffsetsBitsize, additionalProperties); + return Objects.hash(layout, subarray, readState, varOffsetsMode, varOffsetsAddExtraElement, varOffsetsBitsize); } @Override @@ -276,7 +233,6 @@ public String toString() { sb.append(" varOffsetsMode: ").append(toIndentedString(varOffsetsMode)).append("\n"); sb.append(" varOffsetsAddExtraElement: ").append(toIndentedString(varOffsetsAddExtraElement)).append("\n"); sb.append(" varOffsetsBitsize: ").append(toIndentedString(varOffsetsBitsize)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -310,27 +266,38 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to QueryReader - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (QueryReader.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 QueryReader + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QueryReader.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in QueryReader is not found in the empty JSON string", QueryReader.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QueryReader.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QueryReader` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `layout` + if (jsonObj.get("layout") != null && !jsonObj.get("layout").isJsonNull()) { + Layout.validateJsonElement(jsonObj.get("layout")); + } // validate the optional field `subarray` if (jsonObj.get("subarray") != null && !jsonObj.get("subarray").isJsonNull()) { - Subarray.validateJsonObject(jsonObj.getAsJsonObject("subarray")); + Subarray.validateJsonElement(jsonObj.get("subarray")); } // validate the optional field `readState` if (jsonObj.get("readState") != null && !jsonObj.get("readState").isJsonNull()) { - ReadState.validateJsonObject(jsonObj.getAsJsonObject("readState")); + ReadState.validateJsonElement(jsonObj.get("readState")); } if ((jsonObj.get("varOffsetsMode") != null && !jsonObj.get("varOffsetsMode").isJsonNull()) && !jsonObj.get("varOffsetsMode").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `varOffsetsMode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("varOffsetsMode").toString())); @@ -352,71 +319,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, QueryReader value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 QueryReader read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - QueryReader 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of QueryReader given an JSON string - * - * @param jsonString JSON string - * @return An instance of QueryReader - * @throws IOException if the JSON string is invalid with respect to QueryReader - */ + /** + * Create an instance of QueryReader given an JSON string + * + * @param jsonString JSON string + * @return An instance of QueryReader + * @throws IOException if the JSON string is invalid with respect to QueryReader + */ public static QueryReader fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, QueryReader.class); } - /** - * Convert an instance of QueryReader to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of QueryReader to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/Querystatus.java b/src/main/java/io/tiledb/cloud/rest_api/model/Querystatus.java index 081a679..4ba00c9 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/Querystatus.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/Querystatus.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -71,5 +75,10 @@ public Querystatus read(final JsonReader jsonReader) throws IOException { return Querystatus.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + Querystatus.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/Querytype.java b/src/main/java/io/tiledb/cloud/rest_api/model/Querytype.java index 79a70a8..438b6a6 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/Querytype.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/Querytype.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -67,5 +71,10 @@ public Querytype read(final JsonReader jsonReader) throws IOException { return Querytype.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + Querytype.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/ReadState.java b/src/main/java/io/tiledb/cloud/rest_api/model/ReadState.java index b4daaea..fa225a3 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/ReadState.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/ReadState.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,182 +11,144 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.SubarrayPartitioner; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * state for reads */ -@ApiModel(description = "state for reads") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ReadState { public static final String SERIALIZED_NAME_INITIALIZED = "initialized"; @SerializedName(SERIALIZED_NAME_INITIALIZED) + @javax.annotation.Nullable private Boolean initialized; public static final String SERIALIZED_NAME_OVERFLOWED = "overflowed"; @SerializedName(SERIALIZED_NAME_OVERFLOWED) + @javax.annotation.Nullable private Boolean overflowed; public static final String SERIALIZED_NAME_UNSPLITTABLE = "unsplittable"; @SerializedName(SERIALIZED_NAME_UNSPLITTABLE) + @javax.annotation.Nullable private Boolean unsplittable; public static final String SERIALIZED_NAME_SUBARRAY_PARTITIONER = "subarrayPartitioner"; @SerializedName(SERIALIZED_NAME_SUBARRAY_PARTITIONER) + @javax.annotation.Nullable private SubarrayPartitioner subarrayPartitioner; public ReadState() { } - public ReadState initialized(Boolean initialized) { - + public ReadState initialized(@javax.annotation.Nullable Boolean initialized) { this.initialized = initialized; return this; } - /** + /** * True if the reader has been initialized. * @return initialized - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "True if the reader has been initialized.") - public Boolean getInitialized() { return initialized; } - - public void setInitialized(Boolean initialized) { + public void setInitialized(@javax.annotation.Nullable Boolean initialized) { this.initialized = initialized; } - public ReadState overflowed(Boolean overflowed) { - + public ReadState overflowed(@javax.annotation.Nullable Boolean overflowed) { this.overflowed = overflowed; return this; } - /** + /** * True if the query produced results that could not fit in some buffer. * @return overflowed - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "True if the query produced results that could not fit in some buffer.") - public Boolean getOverflowed() { return overflowed; } - - public void setOverflowed(Boolean overflowed) { + public void setOverflowed(@javax.annotation.Nullable Boolean overflowed) { this.overflowed = overflowed; } - public ReadState unsplittable(Boolean unsplittable) { - + public ReadState unsplittable(@javax.annotation.Nullable Boolean unsplittable) { this.unsplittable = unsplittable; return this; } - /** + /** * True if the current subarray partition is unsplittable. * @return unsplittable - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "True if the current subarray partition is unsplittable.") - public Boolean getUnsplittable() { return unsplittable; } - - public void setUnsplittable(Boolean unsplittable) { + public void setUnsplittable(@javax.annotation.Nullable Boolean unsplittable) { this.unsplittable = unsplittable; } - public ReadState subarrayPartitioner(SubarrayPartitioner subarrayPartitioner) { - + public ReadState subarrayPartitioner(@javax.annotation.Nullable SubarrayPartitioner subarrayPartitioner) { this.subarrayPartitioner = subarrayPartitioner; return this; } - /** + /** * Get subarrayPartitioner * @return subarrayPartitioner - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public SubarrayPartitioner getSubarrayPartitioner() { return subarrayPartitioner; } - - public void setSubarrayPartitioner(SubarrayPartitioner subarrayPartitioner) { + public void setSubarrayPartitioner(@javax.annotation.Nullable SubarrayPartitioner subarrayPartitioner) { this.subarrayPartitioner = subarrayPartitioner; } - /** - * 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. - */ - public ReadState 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -201,13 +163,12 @@ public boolean equals(Object o) { return Objects.equals(this.initialized, readState.initialized) && Objects.equals(this.overflowed, readState.overflowed) && Objects.equals(this.unsplittable, readState.unsplittable) && - Objects.equals(this.subarrayPartitioner, readState.subarrayPartitioner)&& - Objects.equals(this.additionalProperties, readState.additionalProperties); + Objects.equals(this.subarrayPartitioner, readState.subarrayPartitioner); } @Override public int hashCode() { - return Objects.hash(initialized, overflowed, unsplittable, subarrayPartitioner, additionalProperties); + return Objects.hash(initialized, overflowed, unsplittable, subarrayPartitioner); } @Override @@ -218,7 +179,6 @@ public String toString() { sb.append(" overflowed: ").append(toIndentedString(overflowed)).append("\n"); sb.append(" unsplittable: ").append(toIndentedString(unsplittable)).append("\n"); sb.append(" subarrayPartitioner: ").append(toIndentedString(subarrayPartitioner)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -250,23 +210,30 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadState - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (ReadState.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 ReadState + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ReadState.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in ReadState is not found in the empty JSON string", ReadState.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ReadState.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReadState` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `subarrayPartitioner` if (jsonObj.get("subarrayPartitioner") != null && !jsonObj.get("subarrayPartitioner").isJsonNull()) { - SubarrayPartitioner.validateJsonObject(jsonObj.getAsJsonObject("subarrayPartitioner")); + SubarrayPartitioner.validateJsonElement(jsonObj.get("subarrayPartitioner")); } } @@ -285,71 +252,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ReadState value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 ReadState read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - ReadState 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ReadState given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReadState - * @throws IOException if the JSON string is invalid with respect to ReadState - */ + /** + * Create an instance of ReadState given an JSON string + * + * @param jsonString JSON string + * @return An instance of ReadState + * @throws IOException if the JSON string is invalid with respect to ReadState + */ public static ReadState fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ReadState.class); } - /** - * Convert an instance of ReadState to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ReadState to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/RegisteredTaskGraph.java b/src/main/java/io/tiledb/cloud/rest_api/model/RegisteredTaskGraph.java index 8a9dc4b..828462d 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/RegisteredTaskGraph.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/RegisteredTaskGraph.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,216 +11,207 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; - -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.model.TaskGraphNode; import org.openapitools.jackson.nullable.JsonNullable; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; /** * The structure and metadata of a task graph that can be stored on TileDB Cloud and executed by users who have access to it. */ -@ApiModel(description = "The structure and metadata of a task graph that can be stored on TileDB Cloud and executed by users who have access to it. ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class RegisteredTaskGraph { public static final String SERIALIZED_NAME_UUID = "uuid"; @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nullable private String uuid; public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; @SerializedName(SERIALIZED_NAME_NAMESPACE) + @javax.annotation.Nullable private String namespace; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_README = "readme"; @SerializedName(SERIALIZED_NAME_README) + @javax.annotation.Nullable private String readme; public static final String SERIALIZED_NAME_LICENSE_ID = "license_id"; @SerializedName(SERIALIZED_NAME_LICENSE_ID) + @javax.annotation.Nullable private String licenseId; public static final String SERIALIZED_NAME_LICENSE_TEXT = "license_text"; @SerializedName(SERIALIZED_NAME_LICENSE_TEXT) + @javax.annotation.Nullable private String licenseText; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; + @javax.annotation.Nullable + private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_NODES = "nodes"; @SerializedName(SERIALIZED_NAME_NODES) - private List nodes = null; + @javax.annotation.Nullable + private List nodes = new ArrayList<>(); public RegisteredTaskGraph() { } - public RegisteredTaskGraph uuid(String uuid) { - + public RegisteredTaskGraph uuid(@javax.annotation.Nullable String uuid) { this.uuid = uuid; return this; } - /** + /** * A server-assigned unique ID for the UDF, in UUID format. * @return uuid - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "A server-assigned unique ID for the UDF, in UUID format.") - public String getUuid() { return uuid; } - - public void setUuid(String uuid) { + public void setUuid(@javax.annotation.Nullable String uuid) { this.uuid = uuid; } - public RegisteredTaskGraph namespace(String namespace) { - + public RegisteredTaskGraph namespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; return this; } - /** + /** * The namespace that owns this task graph log. * @return namespace - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The namespace that owns this task graph log.") - public String getNamespace() { return namespace; } - - public void setNamespace(String namespace) { + public void setNamespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; } - public RegisteredTaskGraph name(String name) { - + public RegisteredTaskGraph name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * The name of this graph, to appear in URLs. Must be unique per-namespace. * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The name of this graph, to appear in URLs. Must be unique per-namespace. ") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public RegisteredTaskGraph readme(String readme) { - + public RegisteredTaskGraph readme(@javax.annotation.Nullable String readme) { this.readme = readme; return this; } - /** + /** * Documentation for the task graph, in Markdown format. * @return readme - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Documentation for the task graph, in Markdown format.") - public String getReadme() { return readme; } - - public void setReadme(String readme) { + public void setReadme(@javax.annotation.Nullable String readme) { this.readme = readme; } - public RegisteredTaskGraph licenseId(String licenseId) { - + public RegisteredTaskGraph licenseId(@javax.annotation.Nullable String licenseId) { this.licenseId = licenseId; return this; } - /** + /** * SPDX license identifier. * @return licenseId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "SPDX license identifier.") - public String getLicenseId() { return licenseId; } - - public void setLicenseId(String licenseId) { + public void setLicenseId(@javax.annotation.Nullable String licenseId) { this.licenseId = licenseId; } - public RegisteredTaskGraph licenseText(String licenseText) { - + public RegisteredTaskGraph licenseText(@javax.annotation.Nullable String licenseText) { this.licenseText = licenseText; return this; } - /** + /** * Full text of the license. * @return licenseText - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Full text of the license.") - public String getLicenseText() { return licenseText; } - - public void setLicenseText(String licenseText) { + public void setLicenseText(@javax.annotation.Nullable String licenseText) { this.licenseText = licenseText; } - public RegisteredTaskGraph tags(List tags) { - + public RegisteredTaskGraph tags(@javax.annotation.Nullable List tags) { this.tags = tags; return this; } @@ -233,25 +224,21 @@ public RegisteredTaskGraph addTagsItem(String tagsItem) { return this; } - /** + /** * Optional tags to classify the graph. * @return tags - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Optional tags to classify the graph.") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nullable List tags) { this.tags = tags; } - public RegisteredTaskGraph nodes(List nodes) { - + public RegisteredTaskGraph nodes(@javax.annotation.Nullable List nodes) { this.nodes = nodes; return this; } @@ -264,57 +251,19 @@ public RegisteredTaskGraph addNodesItem(TaskGraphNode nodesItem) { return this; } - /** + /** * The structure of the graph, in the form of the nodes that make it up. As with `TaskGraphLog`, nodes must topologically sorted, so that any node appears after all the nodes it depends on. * @return nodes - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The structure of the graph, in the form of the nodes that make it up. As with `TaskGraphLog`, nodes must topologically sorted, so that any node appears after all the nodes it depends on. ") - public List getNodes() { return nodes; } - - public void setNodes(List nodes) { + public void setNodes(@javax.annotation.Nullable List nodes) { this.nodes = nodes; } - /** - * 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. - */ - public RegisteredTaskGraph 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -333,8 +282,7 @@ public boolean equals(Object o) { Objects.equals(this.licenseId, registeredTaskGraph.licenseId) && Objects.equals(this.licenseText, registeredTaskGraph.licenseText) && Objects.equals(this.tags, registeredTaskGraph.tags) && - Objects.equals(this.nodes, registeredTaskGraph.nodes)&& - Objects.equals(this.additionalProperties, registeredTaskGraph.additionalProperties); + Objects.equals(this.nodes, registeredTaskGraph.nodes); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -343,7 +291,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(uuid, namespace, name, readme, licenseId, licenseText, tags, nodes, additionalProperties); + return Objects.hash(uuid, namespace, name, readme, licenseId, licenseText, tags, nodes); } private static int hashCodeNullable(JsonNullable a) { @@ -365,7 +313,6 @@ public String toString() { sb.append(" licenseText: ").append(toIndentedString(licenseText)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" nodes: ").append(toIndentedString(nodes)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -401,20 +348,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to RegisteredTaskGraph - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (RegisteredTaskGraph.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 RegisteredTaskGraph + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RegisteredTaskGraph.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in RegisteredTaskGraph is not found in the empty JSON string", RegisteredTaskGraph.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RegisteredTaskGraph.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RegisteredTaskGraph` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); } @@ -433,21 +387,23 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("license_text") != null && !jsonObj.get("license_text").isJsonNull()) && !jsonObj.get("license_text").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `license_text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("license_text").toString())); } - // ensure the json data is an array - if ((jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) && !jsonObj.get("tags").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } - JsonArray jsonArraynodes = jsonObj.getAsJsonArray("nodes"); - if (jsonArraynodes != null) { - // ensure the json data is an array - if (!jsonObj.get("nodes").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `nodes` to be an array in the JSON string but got `%s`", jsonObj.get("nodes").toString())); + if (jsonObj.get("nodes") != null && !jsonObj.get("nodes").isJsonNull()) { + JsonArray jsonArraynodes = jsonObj.getAsJsonArray("nodes"); + if (jsonArraynodes != null) { + // ensure the json data is an array + if (!jsonObj.get("nodes").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `nodes` to be an array in the JSON string but got `%s`", jsonObj.get("nodes").toString())); + } + + // validate the optional field `nodes` (array) + for (int i = 0; i < jsonArraynodes.size(); i++) { + TaskGraphNode.validateJsonElement(jsonArraynodes.get(i)); + }; } - - // validate the optional field `nodes` (array) - for (int i = 0; i < jsonArraynodes.size(); i++) { - TaskGraphNode.validateJsonObject(jsonArraynodes.get(i).getAsJsonObject()); - }; } } @@ -466,71 +422,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, RegisteredTaskGraph value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 RegisteredTaskGraph read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - RegisteredTaskGraph 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of RegisteredTaskGraph given an JSON string - * - * @param jsonString JSON string - * @return An instance of RegisteredTaskGraph - * @throws IOException if the JSON string is invalid with respect to RegisteredTaskGraph - */ + /** + * Create an instance of RegisteredTaskGraph given an JSON string + * + * @param jsonString JSON string + * @return An instance of RegisteredTaskGraph + * @throws IOException if the JSON string is invalid with respect to RegisteredTaskGraph + */ public static RegisteredTaskGraph fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, RegisteredTaskGraph.class); } - /** - * Convert an instance of RegisteredTaskGraph to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of RegisteredTaskGraph to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/ResetUserPasswordRequest.java b/src/main/java/io/tiledb/cloud/rest_api/model/ResetUserPasswordRequest.java index 9fd739e..d79f601 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/ResetUserPasswordRequest.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/ResetUserPasswordRequest.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,101 +11,71 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Password to update */ -@ApiModel(description = "Password to update") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class ResetUserPasswordRequest { public static final String SERIALIZED_NAME_PASSWORD = "password"; @SerializedName(SERIALIZED_NAME_PASSWORD) + @javax.annotation.Nullable private String password; public ResetUserPasswordRequest() { } - public ResetUserPasswordRequest password(String password) { - + public ResetUserPasswordRequest password(@javax.annotation.Nullable String password) { this.password = password; return this; } - /** + /** * password * @return password - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "password", value = "password") - public String getPassword() { return password; } - - public void setPassword(String password) { + public void setPassword(@javax.annotation.Nullable String password) { this.password = password; } - /** - * 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. - */ - public ResetUserPasswordRequest 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -117,13 +87,12 @@ public boolean equals(Object o) { return false; } ResetUserPasswordRequest resetUserPasswordRequest = (ResetUserPasswordRequest) o; - return Objects.equals(this.password, resetUserPasswordRequest.password)&& - Objects.equals(this.additionalProperties, resetUserPasswordRequest.additionalProperties); + return Objects.equals(this.password, resetUserPasswordRequest.password); } @Override public int hashCode() { - return Objects.hash(password, additionalProperties); + return Objects.hash(password); } @Override @@ -131,7 +100,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ResetUserPasswordRequest {\n"); sb.append(" password: ").append(toIndentedString(password)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -160,20 +128,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ResetUserPasswordRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (ResetUserPasswordRequest.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 ResetUserPasswordRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResetUserPasswordRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in ResetUserPasswordRequest is not found in the empty JSON string", ResetUserPasswordRequest.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ResetUserPasswordRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ResetUserPasswordRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); 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())); } @@ -194,71 +169,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, ResetUserPasswordRequest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 ResetUserPasswordRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - ResetUserPasswordRequest 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ResetUserPasswordRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ResetUserPasswordRequest - * @throws IOException if the JSON string is invalid with respect to ResetUserPasswordRequest - */ + /** + * Create an instance of ResetUserPasswordRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResetUserPasswordRequest + * @throws IOException if the JSON string is invalid with respect to ResetUserPasswordRequest + */ public static ResetUserPasswordRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ResetUserPasswordRequest.class); } - /** - * Convert an instance of ResetUserPasswordRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ResetUserPasswordRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/ResultFormat.java b/src/main/java/io/tiledb/cloud/rest_api/model/ResultFormat.java index 3855536..afe020b 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/ResultFormat.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/ResultFormat.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -75,5 +79,10 @@ public ResultFormat read(final JsonReader jsonReader) throws IOException { return ResultFormat.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ResultFormat.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/RetryPolicy.java b/src/main/java/io/tiledb/cloud/rest_api/model/RetryPolicy.java index 95603ba..c358316 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/RetryPolicy.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/RetryPolicy.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -27,11 +31,11 @@ public enum RetryPolicy { ALWAYS("Always"), - ONFAILURE("OnFailure"), + ON_FAILURE("OnFailure"), - ONERROR("OnError"), + ON_ERROR("OnError"), - ONTRANSIENTERROR("OnTransientError"); + ON_TRANSIENT_ERROR("OnTransientError"); private String value; @@ -69,5 +73,10 @@ public RetryPolicy read(final JsonReader jsonReader) throws IOException { return RetryPolicy.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + RetryPolicy.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/RetryStrategy.java b/src/main/java/io/tiledb/cloud/rest_api/model/RetryStrategy.java index 6e8d937..94f1120 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/RetryStrategy.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/RetryStrategy.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,181 +11,145 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.Backoff; +import org.openapitools.client.model.RetryPolicy; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * RetryStrategy provides controls on how to retry a taskgraph node */ -@ApiModel(description = "RetryStrategy provides controls on how to retry a taskgraph node") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class RetryStrategy { public static final String SERIALIZED_NAME_BACKOFF = "backoff"; @SerializedName(SERIALIZED_NAME_BACKOFF) + @javax.annotation.Nullable private Backoff backoff; public static final String SERIALIZED_NAME_EXPRESSION = "expression"; @SerializedName(SERIALIZED_NAME_EXPRESSION) + @javax.annotation.Nullable private String expression; public static final String SERIALIZED_NAME_LIMIT = "limit"; @SerializedName(SERIALIZED_NAME_LIMIT) + @javax.annotation.Nullable private Integer limit; public static final String SERIALIZED_NAME_RETRY_POLICY = "retryPolicy"; @SerializedName(SERIALIZED_NAME_RETRY_POLICY) + @javax.annotation.Nullable private RetryPolicy retryPolicy; public RetryStrategy() { } - public RetryStrategy backoff(Backoff backoff) { - + public RetryStrategy backoff(@javax.annotation.Nullable Backoff backoff) { this.backoff = backoff; return this; } - /** + /** * Get backoff * @return backoff - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Backoff getBackoff() { return backoff; } - - public void setBackoff(Backoff backoff) { + public void setBackoff(@javax.annotation.Nullable Backoff backoff) { this.backoff = backoff; } - public RetryStrategy expression(String expression) { - + public RetryStrategy expression(@javax.annotation.Nullable String expression) { this.expression = expression; return this; } - /** + /** * Expression is a condition expression for when a node will be retried. If it evaluates to false, the node will not be retried and the retry strategy will be ignored * @return expression - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Expression is a condition expression for when a node will be retried. If it evaluates to false, the node will not be retried and the retry strategy will be ignored") - public String getExpression() { return expression; } - - public void setExpression(String expression) { + public void setExpression(@javax.annotation.Nullable String expression) { this.expression = expression; } - public RetryStrategy limit(Integer limit) { - + public RetryStrategy limit(@javax.annotation.Nullable Integer limit) { this.limit = limit; return this; } - /** + /** * Limit is the maximum number of retry attempts when retrying a container. It does not include the original container; the maximum number of total attempts will be `limit + 1`. * @return limit - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Limit is the maximum number of retry attempts when retrying a container. It does not include the original container; the maximum number of total attempts will be `limit + 1`.") - public Integer getLimit() { return limit; } - - public void setLimit(Integer limit) { + public void setLimit(@javax.annotation.Nullable Integer limit) { this.limit = limit; } - public RetryStrategy retryPolicy(RetryPolicy retryPolicy) { - + public RetryStrategy retryPolicy(@javax.annotation.Nullable RetryPolicy retryPolicy) { this.retryPolicy = retryPolicy; return this; } - /** + /** * Get retryPolicy * @return retryPolicy - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public RetryPolicy getRetryPolicy() { return retryPolicy; } - - public void setRetryPolicy(RetryPolicy retryPolicy) { + public void setRetryPolicy(@javax.annotation.Nullable RetryPolicy retryPolicy) { this.retryPolicy = retryPolicy; } - /** - * 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. - */ - public RetryStrategy 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -200,13 +164,12 @@ public boolean equals(Object o) { return Objects.equals(this.backoff, retryStrategy.backoff) && Objects.equals(this.expression, retryStrategy.expression) && Objects.equals(this.limit, retryStrategy.limit) && - Objects.equals(this.retryPolicy, retryStrategy.retryPolicy)&& - Objects.equals(this.additionalProperties, retryStrategy.additionalProperties); + Objects.equals(this.retryPolicy, retryStrategy.retryPolicy); } @Override public int hashCode() { - return Objects.hash(backoff, expression, limit, retryPolicy, additionalProperties); + return Objects.hash(backoff, expression, limit, retryPolicy); } @Override @@ -217,7 +180,6 @@ public String toString() { sb.append(" expression: ").append(toIndentedString(expression)).append("\n"); sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); sb.append(" retryPolicy: ").append(toIndentedString(retryPolicy)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -249,27 +211,38 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to RetryStrategy - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (RetryStrategy.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 RetryStrategy + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RetryStrategy.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in RetryStrategy is not found in the empty JSON string", RetryStrategy.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RetryStrategy.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RetryStrategy` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `backoff` if (jsonObj.get("backoff") != null && !jsonObj.get("backoff").isJsonNull()) { - Backoff.validateJsonObject(jsonObj.getAsJsonObject("backoff")); + Backoff.validateJsonElement(jsonObj.get("backoff")); } if ((jsonObj.get("expression") != null && !jsonObj.get("expression").isJsonNull()) && !jsonObj.get("expression").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `expression` to be a primitive type in the JSON string but got `%s`", jsonObj.get("expression").toString())); } + // validate the optional field `retryPolicy` + if (jsonObj.get("retryPolicy") != null && !jsonObj.get("retryPolicy").isJsonNull()) { + RetryPolicy.validateJsonElement(jsonObj.get("retryPolicy")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -287,71 +260,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, RetryStrategy value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 RetryStrategy read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - RetryStrategy 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of RetryStrategy given an JSON string - * - * @param jsonString JSON string - * @return An instance of RetryStrategy - * @throws IOException if the JSON string is invalid with respect to RetryStrategy - */ + /** + * Create an instance of RetryStrategy given an JSON string + * + * @param jsonString JSON string + * @return An instance of RetryStrategy + * @throws IOException if the JSON string is invalid with respect to RetryStrategy + */ public static RetryStrategy fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, RetryStrategy.class); } - /** - * Convert an instance of RetryStrategy to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of RetryStrategy to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/SQLParameters.java b/src/main/java/io/tiledb/cloud/rest_api/model/SQLParameters.java index 75ae1e7..717905b 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/SQLParameters.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/SQLParameters.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,249 +11,240 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.ResultFormat; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Parameters for running sql query */ -@ApiModel(description = "Parameters for running sql query") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class SQLParameters { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_QUERY = "query"; @SerializedName(SERIALIZED_NAME_QUERY) + @javax.annotation.Nullable private String query; public static final String SERIALIZED_NAME_OUTPUT_URI = "output_uri"; @SerializedName(SERIALIZED_NAME_OUTPUT_URI) + @javax.annotation.Nullable private String outputUri; public static final String SERIALIZED_NAME_STORE_RESULTS = "store_results"; @SerializedName(SERIALIZED_NAME_STORE_RESULTS) + @javax.annotation.Nullable private Boolean storeResults; public static final String SERIALIZED_NAME_DONT_DOWNLOAD_RESULTS = "dont_download_results"; @SerializedName(SERIALIZED_NAME_DONT_DOWNLOAD_RESULTS) + @javax.annotation.Nullable private Boolean dontDownloadResults; public static final String SERIALIZED_NAME_RESOURCE_CLASS = "resource_class"; @SerializedName(SERIALIZED_NAME_RESOURCE_CLASS) + @javax.annotation.Nullable private String resourceClass; public static final String SERIALIZED_NAME_RESULT_FORMAT = "result_format"; @SerializedName(SERIALIZED_NAME_RESULT_FORMAT) + @javax.annotation.Nullable private ResultFormat resultFormat; public static final String SERIALIZED_NAME_INIT_COMMANDS = "init_commands"; @SerializedName(SERIALIZED_NAME_INIT_COMMANDS) - private List initCommands = null; + @javax.annotation.Nullable + private List initCommands = new ArrayList<>(); public static final String SERIALIZED_NAME_PARAMETERS = "parameters"; @SerializedName(SERIALIZED_NAME_PARAMETERS) - private List parameters = null; + @javax.annotation.Nullable + private List parameters = new ArrayList<>(); public static final String SERIALIZED_NAME_TASK_GRAPH_UUID = "task_graph_uuid"; @SerializedName(SERIALIZED_NAME_TASK_GRAPH_UUID) + @javax.annotation.Nullable private String taskGraphUuid; public static final String SERIALIZED_NAME_CLIENT_NODE_UUID = "client_node_uuid"; @SerializedName(SERIALIZED_NAME_CLIENT_NODE_UUID) + @javax.annotation.Nullable private String clientNodeUuid; public SQLParameters() { } - public SQLParameters name(String name) { - + public SQLParameters name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * name of task, optional * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "name of task, optional") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public SQLParameters query(String query) { - + public SQLParameters query(@javax.annotation.Nullable String query) { this.query = query; return this; } - /** + /** * query to run * @return query - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "query to run") - public String getQuery() { return query; } - - public void setQuery(String query) { + public void setQuery(@javax.annotation.Nullable String query) { this.query = query; } - public SQLParameters outputUri(String outputUri) { - + public SQLParameters outputUri(@javax.annotation.Nullable String outputUri) { this.outputUri = outputUri; return this; } - /** + /** * Output array uri * @return outputUri - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "s3://my_bucket/my_output_array", value = "Output array uri") - public String getOutputUri() { return outputUri; } - - public void setOutputUri(String outputUri) { + public void setOutputUri(@javax.annotation.Nullable String outputUri) { this.outputUri = outputUri; } - public SQLParameters storeResults(Boolean storeResults) { - + public SQLParameters storeResults(@javax.annotation.Nullable Boolean storeResults) { this.storeResults = storeResults; return this; } - /** + /** * store results for later retrieval * @return storeResults - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "store results for later retrieval") - public Boolean getStoreResults() { return storeResults; } - - public void setStoreResults(Boolean storeResults) { + public void setStoreResults(@javax.annotation.Nullable Boolean storeResults) { this.storeResults = storeResults; } - public SQLParameters dontDownloadResults(Boolean dontDownloadResults) { - + public SQLParameters dontDownloadResults(@javax.annotation.Nullable Boolean dontDownloadResults) { this.dontDownloadResults = dontDownloadResults; return this; } - /** + /** * Set to true to avoid downloading the results of this UDF. Useful for intermediate nodes in a task graph where you will not be using the results of your function. Defaults to false (\"yes download results\"). * @return dontDownloadResults - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Set to true to avoid downloading the results of this UDF. Useful for intermediate nodes in a task graph where you will not be using the results of your function. Defaults to false (\"yes download results\").") - public Boolean getDontDownloadResults() { return dontDownloadResults; } - - public void setDontDownloadResults(Boolean dontDownloadResults) { + public void setDontDownloadResults(@javax.annotation.Nullable Boolean dontDownloadResults) { this.dontDownloadResults = dontDownloadResults; } - public SQLParameters resourceClass(String resourceClass) { - + public SQLParameters resourceClass(@javax.annotation.Nullable String resourceClass) { this.resourceClass = resourceClass; return this; } - /** + /** * The resource class to use for the SQL execution. Resource classes define resource limits for memory and CPUs. If this is empty, then the SQL will execute in the standard resource class of the TileDB Cloud provider. * @return resourceClass - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "standard", value = "The resource class to use for the SQL execution. Resource classes define resource limits for memory and CPUs. If this is empty, then the SQL will execute in the standard resource class of the TileDB Cloud provider. ") - public String getResourceClass() { return resourceClass; } - - public void setResourceClass(String resourceClass) { + public void setResourceClass(@javax.annotation.Nullable String resourceClass) { this.resourceClass = resourceClass; } - public SQLParameters resultFormat(ResultFormat resultFormat) { - + public SQLParameters resultFormat(@javax.annotation.Nullable ResultFormat resultFormat) { this.resultFormat = resultFormat; return this; } - /** + /** * Get resultFormat * @return resultFormat - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public ResultFormat getResultFormat() { return resultFormat; } - - public void setResultFormat(ResultFormat resultFormat) { + public void setResultFormat(@javax.annotation.Nullable ResultFormat resultFormat) { this.resultFormat = resultFormat; } - public SQLParameters initCommands(List initCommands) { - + public SQLParameters initCommands(@javax.annotation.Nullable List initCommands) { this.initCommands = initCommands; return this; } @@ -266,25 +257,21 @@ public SQLParameters addInitCommandsItem(String initCommandsItem) { return this; } - /** + /** * Queries or commands to run before main query * @return initCommands - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Queries or commands to run before main query") - public List getInitCommands() { return initCommands; } - - public void setInitCommands(List initCommands) { + public void setInitCommands(@javax.annotation.Nullable List initCommands) { this.initCommands = initCommands; } - public SQLParameters parameters(List parameters) { - + public SQLParameters parameters(@javax.annotation.Nullable List parameters) { this.parameters = parameters; return this; } @@ -297,103 +284,57 @@ public SQLParameters addParametersItem(Object parametersItem) { return this; } - /** + /** * SQL query parameters * @return parameters - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "SQL query parameters") - public List getParameters() { return parameters; } - - public void setParameters(List parameters) { + public void setParameters(@javax.annotation.Nullable List parameters) { this.parameters = parameters; } - public SQLParameters taskGraphUuid(String taskGraphUuid) { - + public SQLParameters taskGraphUuid(@javax.annotation.Nullable String taskGraphUuid) { this.taskGraphUuid = taskGraphUuid; return this; } - /** + /** * If set, the ID of the log for the task graph that this was part of. * @return taskGraphUuid - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "If set, the ID of the log for the task graph that this was part of. ") - public String getTaskGraphUuid() { return taskGraphUuid; } - - public void setTaskGraphUuid(String taskGraphUuid) { + public void setTaskGraphUuid(@javax.annotation.Nullable String taskGraphUuid) { this.taskGraphUuid = taskGraphUuid; } - public SQLParameters clientNodeUuid(String clientNodeUuid) { - + public SQLParameters clientNodeUuid(@javax.annotation.Nullable String clientNodeUuid) { this.clientNodeUuid = clientNodeUuid; return this; } - /** + /** * If set, the client-defined ID of the node within this task's graph. * @return clientNodeUuid - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "If set, the client-defined ID of the node within this task's graph. ") - public String getClientNodeUuid() { return clientNodeUuid; } - - public void setClientNodeUuid(String clientNodeUuid) { + public void setClientNodeUuid(@javax.annotation.Nullable String clientNodeUuid) { this.clientNodeUuid = clientNodeUuid; } - /** - * 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. - */ - public SQLParameters 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -415,13 +356,12 @@ public boolean equals(Object o) { Objects.equals(this.initCommands, sqLParameters.initCommands) && Objects.equals(this.parameters, sqLParameters.parameters) && Objects.equals(this.taskGraphUuid, sqLParameters.taskGraphUuid) && - Objects.equals(this.clientNodeUuid, sqLParameters.clientNodeUuid)&& - Objects.equals(this.additionalProperties, sqLParameters.additionalProperties); + Objects.equals(this.clientNodeUuid, sqLParameters.clientNodeUuid); } @Override public int hashCode() { - return Objects.hash(name, query, outputUri, storeResults, dontDownloadResults, resourceClass, resultFormat, initCommands, parameters, taskGraphUuid, clientNodeUuid, additionalProperties); + return Objects.hash(name, query, outputUri, storeResults, dontDownloadResults, resourceClass, resultFormat, initCommands, parameters, taskGraphUuid, clientNodeUuid); } @Override @@ -439,7 +379,6 @@ public String toString() { sb.append(" parameters: ").append(toIndentedString(parameters)).append("\n"); sb.append(" taskGraphUuid: ").append(toIndentedString(taskGraphUuid)).append("\n"); sb.append(" clientNodeUuid: ").append(toIndentedString(clientNodeUuid)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -478,20 +417,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to SQLParameters - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (SQLParameters.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 SQLParameters + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SQLParameters.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in SQLParameters is not found in the empty JSON string", SQLParameters.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SQLParameters.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SQLParameters` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !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())); } @@ -504,12 +450,16 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("resource_class") != null && !jsonObj.get("resource_class").isJsonNull()) && !jsonObj.get("resource_class").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `resource_class` to be a primitive type in the JSON string but got `%s`", jsonObj.get("resource_class").toString())); } - // ensure the json data is an array - if ((jsonObj.get("init_commands") != null && !jsonObj.get("init_commands").isJsonNull()) && !jsonObj.get("init_commands").isJsonArray()) { + // validate the optional field `result_format` + if (jsonObj.get("result_format") != null && !jsonObj.get("result_format").isJsonNull()) { + ResultFormat.validateJsonElement(jsonObj.get("result_format")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("init_commands") != null && !jsonObj.get("init_commands").isJsonNull() && !jsonObj.get("init_commands").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `init_commands` to be an array in the JSON string but got `%s`", jsonObj.get("init_commands").toString())); } - // ensure the json data is an array - if ((jsonObj.get("parameters") != null && !jsonObj.get("parameters").isJsonNull()) && !jsonObj.get("parameters").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("parameters") != null && !jsonObj.get("parameters").isJsonNull() && !jsonObj.get("parameters").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `parameters` to be an array in the JSON string but got `%s`", jsonObj.get("parameters").toString())); } if ((jsonObj.get("task_graph_uuid") != null && !jsonObj.get("task_graph_uuid").isJsonNull()) && !jsonObj.get("task_graph_uuid").isJsonPrimitive()) { @@ -535,71 +485,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, SQLParameters value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 SQLParameters read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - SQLParameters 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of SQLParameters given an JSON string - * - * @param jsonString JSON string - * @return An instance of SQLParameters - * @throws IOException if the JSON string is invalid with respect to SQLParameters - */ + /** + * Create an instance of SQLParameters given an JSON string + * + * @param jsonString JSON string + * @return An instance of SQLParameters + * @throws IOException if the JSON string is invalid with respect to SQLParameters + */ public static SQLParameters fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, SQLParameters.class); } - /** - * Convert an instance of SQLParameters to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of SQLParameters to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/SSODomainConfig.java b/src/main/java/io/tiledb/cloud/rest_api/model/SSODomainConfig.java index 2aa1220..df90980 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/SSODomainConfig.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/SSODomainConfig.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,240 +11,228 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; - +import org.openapitools.client.model.DomainCheckResult; +import org.openapitools.client.model.DomainVerificationStatus; +import org.openapitools.client.model.SSODomainSetup; import org.openapitools.jackson.nullable.JsonNullable; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * The information used to set up a single-sign on connection to a customer domain. */ -@ApiModel(description = "The information used to set up a single-sign on connection to a customer domain. ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class SSODomainConfig { public static final String SERIALIZED_NAME_UUID = "uuid"; @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nullable private String uuid; public static final String SERIALIZED_NAME_DOMAIN = "domain"; @SerializedName(SERIALIZED_NAME_DOMAIN) + @javax.annotation.Nullable private String domain; public static final String SERIALIZED_NAME_OIDC_ISSUER = "oidc_issuer"; @SerializedName(SERIALIZED_NAME_OIDC_ISSUER) + @javax.annotation.Nullable private String oidcIssuer; public static final String SERIALIZED_NAME_OIDC_CLIENT_ID = "oidc_client_id"; @SerializedName(SERIALIZED_NAME_OIDC_CLIENT_ID) + @javax.annotation.Nullable private String oidcClientId; public static final String SERIALIZED_NAME_OIDC_CLIENT_SECRET = "oidc_client_secret"; @SerializedName(SERIALIZED_NAME_OIDC_CLIENT_SECRET) + @javax.annotation.Nullable private String oidcClientSecret; public static final String SERIALIZED_NAME_DOMAIN_SETUP = "domain_setup"; @SerializedName(SERIALIZED_NAME_DOMAIN_SETUP) + @javax.annotation.Nullable private SSODomainSetup domainSetup; public static final String SERIALIZED_NAME_VERIFICATION_STATUS = "verification_status"; @SerializedName(SERIALIZED_NAME_VERIFICATION_STATUS) + @javax.annotation.Nullable private DomainVerificationStatus verificationStatus; public static final String SERIALIZED_NAME_CHECK_RESULTS = "check_results"; @SerializedName(SERIALIZED_NAME_CHECK_RESULTS) - private List checkResults = null; + @javax.annotation.Nullable + private List checkResults = new ArrayList<>(); public SSODomainConfig() { } - public SSODomainConfig uuid(String uuid) { - + public SSODomainConfig uuid(@javax.annotation.Nullable String uuid) { this.uuid = uuid; return this; } - /** + /** * A server-generated ID for the configuration. * @return uuid - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "A server-generated ID for the configuration.") - public String getUuid() { return uuid; } - - public void setUuid(String uuid) { + public void setUuid(@javax.annotation.Nullable String uuid) { this.uuid = uuid; } - public SSODomainConfig domain(String domain) { - + public SSODomainConfig domain(@javax.annotation.Nullable String domain) { this.domain = domain; return this; } - /** + /** * The fully-qualified domain (but with no trailing dot) to connect for single sign-on. This may not be changed after creation. * @return domain - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The fully-qualified domain (but with no trailing dot) to connect for single sign-on. This may not be changed after creation. ") - public String getDomain() { return domain; } - - public void setDomain(String domain) { + public void setDomain(@javax.annotation.Nullable String domain) { this.domain = domain; } - public SSODomainConfig oidcIssuer(String oidcIssuer) { - + public SSODomainConfig oidcIssuer(@javax.annotation.Nullable String oidcIssuer) { this.oidcIssuer = oidcIssuer; return this; } - /** + /** * The URL of the OpenID Connect issuer that can be used to authenticate this domain's users. The prefix where the `/.well-known/openid-configuration` file can be found; usually without a trailing slash. * @return oidcIssuer - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The URL of the OpenID Connect issuer that can be used to authenticate this domain's users. The prefix where the `/.well-known/openid-configuration` file can be found; usually without a trailing slash. ") - public String getOidcIssuer() { return oidcIssuer; } - - public void setOidcIssuer(String oidcIssuer) { + public void setOidcIssuer(@javax.annotation.Nullable String oidcIssuer) { this.oidcIssuer = oidcIssuer; } - public SSODomainConfig oidcClientId(String oidcClientId) { - + public SSODomainConfig oidcClientId(@javax.annotation.Nullable String oidcClientId) { this.oidcClientId = oidcClientId; return this; } - /** + /** * The OpenID Connect client ID for this SSO instance. * @return oidcClientId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The OpenID Connect client ID for this SSO instance.") - public String getOidcClientId() { return oidcClientId; } - - public void setOidcClientId(String oidcClientId) { + public void setOidcClientId(@javax.annotation.Nullable String oidcClientId) { this.oidcClientId = oidcClientId; } - public SSODomainConfig oidcClientSecret(String oidcClientSecret) { - + public SSODomainConfig oidcClientSecret(@javax.annotation.Nullable String oidcClientSecret) { this.oidcClientSecret = oidcClientSecret; return this; } - /** + /** * The OpenID Connect client secret for this SSO instance. * @return oidcClientSecret - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The OpenID Connect client secret for this SSO instance.") - public String getOidcClientSecret() { return oidcClientSecret; } - - public void setOidcClientSecret(String oidcClientSecret) { + public void setOidcClientSecret(@javax.annotation.Nullable String oidcClientSecret) { this.oidcClientSecret = oidcClientSecret; } - public SSODomainConfig domainSetup(SSODomainSetup domainSetup) { - + public SSODomainConfig domainSetup(@javax.annotation.Nullable SSODomainSetup domainSetup) { this.domainSetup = domainSetup; return this; } - /** + /** * Get domainSetup * @return domainSetup - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public SSODomainSetup getDomainSetup() { return domainSetup; } - - public void setDomainSetup(SSODomainSetup domainSetup) { + public void setDomainSetup(@javax.annotation.Nullable SSODomainSetup domainSetup) { this.domainSetup = domainSetup; } - public SSODomainConfig verificationStatus(DomainVerificationStatus verificationStatus) { - + public SSODomainConfig verificationStatus(@javax.annotation.Nullable DomainVerificationStatus verificationStatus) { this.verificationStatus = verificationStatus; return this; } - /** + /** * Get verificationStatus * @return verificationStatus - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public DomainVerificationStatus getVerificationStatus() { return verificationStatus; } - - public void setVerificationStatus(DomainVerificationStatus verificationStatus) { + public void setVerificationStatus(@javax.annotation.Nullable DomainVerificationStatus verificationStatus) { this.verificationStatus = verificationStatus; } - public SSODomainConfig checkResults(List checkResults) { - + public SSODomainConfig checkResults(@javax.annotation.Nullable List checkResults) { this.checkResults = checkResults; return this; } @@ -257,57 +245,19 @@ public SSODomainConfig addCheckResultsItem(DomainCheckResult checkResultsItem) { return this; } - /** + /** * A list of the results of recent attempts to verify this domain. * @return checkResults - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "A list of the results of recent attempts to verify this domain. ") - public List getCheckResults() { return checkResults; } - - public void setCheckResults(List checkResults) { + public void setCheckResults(@javax.annotation.Nullable List checkResults) { this.checkResults = checkResults; } - /** - * 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. - */ - public SSODomainConfig 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -326,8 +276,7 @@ public boolean equals(Object o) { Objects.equals(this.oidcClientSecret, ssODomainConfig.oidcClientSecret) && Objects.equals(this.domainSetup, ssODomainConfig.domainSetup) && Objects.equals(this.verificationStatus, ssODomainConfig.verificationStatus) && - Objects.equals(this.checkResults, ssODomainConfig.checkResults)&& - Objects.equals(this.additionalProperties, ssODomainConfig.additionalProperties); + Objects.equals(this.checkResults, ssODomainConfig.checkResults); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -336,7 +285,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(uuid, domain, oidcIssuer, oidcClientId, oidcClientSecret, domainSetup, verificationStatus, checkResults, additionalProperties); + return Objects.hash(uuid, domain, oidcIssuer, oidcClientId, oidcClientSecret, domainSetup, verificationStatus, checkResults); } private static int hashCodeNullable(JsonNullable a) { @@ -358,7 +307,6 @@ public String toString() { sb.append(" domainSetup: ").append(toIndentedString(domainSetup)).append("\n"); sb.append(" verificationStatus: ").append(toIndentedString(verificationStatus)).append("\n"); sb.append(" checkResults: ").append(toIndentedString(checkResults)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -394,20 +342,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to SSODomainConfig - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (SSODomainConfig.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 SSODomainConfig + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SSODomainConfig.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in SSODomainConfig is not found in the empty JSON string", SSODomainConfig.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SSODomainConfig.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SSODomainConfig` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); } @@ -425,19 +380,25 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `domain_setup` if (jsonObj.get("domain_setup") != null && !jsonObj.get("domain_setup").isJsonNull()) { - SSODomainSetup.validateJsonObject(jsonObj.getAsJsonObject("domain_setup")); + SSODomainSetup.validateJsonElement(jsonObj.get("domain_setup")); } - JsonArray jsonArraycheckResults = jsonObj.getAsJsonArray("check_results"); - if (jsonArraycheckResults != null) { - // ensure the json data is an array - if (!jsonObj.get("check_results").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `check_results` to be an array in the JSON string but got `%s`", jsonObj.get("check_results").toString())); + // validate the optional field `verification_status` + if (jsonObj.get("verification_status") != null && !jsonObj.get("verification_status").isJsonNull()) { + DomainVerificationStatus.validateJsonElement(jsonObj.get("verification_status")); + } + if (jsonObj.get("check_results") != null && !jsonObj.get("check_results").isJsonNull()) { + JsonArray jsonArraycheckResults = jsonObj.getAsJsonArray("check_results"); + if (jsonArraycheckResults != null) { + // ensure the json data is an array + if (!jsonObj.get("check_results").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `check_results` to be an array in the JSON string but got `%s`", jsonObj.get("check_results").toString())); + } + + // validate the optional field `check_results` (array) + for (int i = 0; i < jsonArraycheckResults.size(); i++) { + DomainCheckResult.validateJsonElement(jsonArraycheckResults.get(i)); + }; } - - // validate the optional field `check_results` (array) - for (int i = 0; i < jsonArraycheckResults.size(); i++) { - DomainCheckResult.validateJsonObject(jsonArraycheckResults.get(i).getAsJsonObject()); - }; } } @@ -456,71 +417,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, SSODomainConfig value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 SSODomainConfig read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - SSODomainConfig 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of SSODomainConfig given an JSON string - * - * @param jsonString JSON string - * @return An instance of SSODomainConfig - * @throws IOException if the JSON string is invalid with respect to SSODomainConfig - */ + /** + * Create an instance of SSODomainConfig given an JSON string + * + * @param jsonString JSON string + * @return An instance of SSODomainConfig + * @throws IOException if the JSON string is invalid with respect to SSODomainConfig + */ public static SSODomainConfig fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, SSODomainConfig.class); } - /** - * Convert an instance of SSODomainConfig to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of SSODomainConfig to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/SSODomainConfigResponse.java b/src/main/java/io/tiledb/cloud/rest_api/model/SSODomainConfigResponse.java index 52259f7..327e2cd 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/SSODomainConfigResponse.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/SSODomainConfigResponse.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,49 +11,57 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.SSODomainConfig; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * The response to a request for the list of domain claims associated with a particular organization. */ -@ApiModel(description = "The response to a request for the list of domain claims associated with a particular organization. ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class SSODomainConfigResponse { public static final String SERIALIZED_NAME_DOMAIN_CONFIGS = "domain_configs"; @SerializedName(SERIALIZED_NAME_DOMAIN_CONFIGS) - private List domainConfigs = null; + @javax.annotation.Nullable + private List domainConfigs = new ArrayList<>(); public SSODomainConfigResponse() { } - public SSODomainConfigResponse domainConfigs(List domainConfigs) { - + public SSODomainConfigResponse domainConfigs(@javax.annotation.Nullable List domainConfigs) { this.domainConfigs = domainConfigs; return this; } @@ -66,57 +74,19 @@ public SSODomainConfigResponse addDomainConfigsItem(SSODomainConfig domainConfig return this; } - /** + /** * Get domainConfigs * @return domainConfigs - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getDomainConfigs() { return domainConfigs; } - - public void setDomainConfigs(List domainConfigs) { + public void setDomainConfigs(@javax.annotation.Nullable List domainConfigs) { this.domainConfigs = domainConfigs; } - /** - * 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. - */ - public SSODomainConfigResponse 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -128,13 +98,12 @@ public boolean equals(Object o) { return false; } SSODomainConfigResponse ssODomainConfigResponse = (SSODomainConfigResponse) o; - return Objects.equals(this.domainConfigs, ssODomainConfigResponse.domainConfigs)&& - Objects.equals(this.additionalProperties, ssODomainConfigResponse.additionalProperties); + return Objects.equals(this.domainConfigs, ssODomainConfigResponse.domainConfigs); } @Override public int hashCode() { - return Objects.hash(domainConfigs, additionalProperties); + return Objects.hash(domainConfigs); } @Override @@ -142,7 +111,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SSODomainConfigResponse {\n"); sb.append(" domainConfigs: ").append(toIndentedString(domainConfigs)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -171,31 +139,40 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to SSODomainConfigResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (SSODomainConfigResponse.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 SSODomainConfigResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SSODomainConfigResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in SSODomainConfigResponse is not found in the empty JSON string", SSODomainConfigResponse.openapiRequiredFields.toString())); } } - JsonArray jsonArraydomainConfigs = jsonObj.getAsJsonArray("domain_configs"); - if (jsonArraydomainConfigs != null) { - // ensure the json data is an array - if (!jsonObj.get("domain_configs").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `domain_configs` to be an array in the JSON string but got `%s`", jsonObj.get("domain_configs").toString())); - } - // validate the optional field `domain_configs` (array) - for (int i = 0; i < jsonArraydomainConfigs.size(); i++) { - SSODomainConfig.validateJsonObject(jsonArraydomainConfigs.get(i).getAsJsonObject()); - }; + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SSODomainConfigResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SSODomainConfigResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("domain_configs") != null && !jsonObj.get("domain_configs").isJsonNull()) { + JsonArray jsonArraydomainConfigs = jsonObj.getAsJsonArray("domain_configs"); + if (jsonArraydomainConfigs != null) { + // ensure the json data is an array + if (!jsonObj.get("domain_configs").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `domain_configs` to be an array in the JSON string but got `%s`", jsonObj.get("domain_configs").toString())); + } + + // validate the optional field `domain_configs` (array) + for (int i = 0; i < jsonArraydomainConfigs.size(); i++) { + SSODomainConfig.validateJsonElement(jsonArraydomainConfigs.get(i)); + }; + } } } @@ -214,71 +191,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, SSODomainConfigResponse value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 SSODomainConfigResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - SSODomainConfigResponse 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of SSODomainConfigResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of SSODomainConfigResponse - * @throws IOException if the JSON string is invalid with respect to SSODomainConfigResponse - */ + /** + * Create an instance of SSODomainConfigResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of SSODomainConfigResponse + * @throws IOException if the JSON string is invalid with respect to SSODomainConfigResponse + */ public static SSODomainConfigResponse fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, SSODomainConfigResponse.class); } - /** - * Convert an instance of SSODomainConfigResponse to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of SSODomainConfigResponse to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/SSODomainSetup.java b/src/main/java/io/tiledb/cloud/rest_api/model/SSODomainSetup.java index d0f4d4c..1450685 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/SSODomainSetup.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/SSODomainSetup.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,155 +11,119 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Configuration settings to verify ownership of a given domain. At least one of these must be completed enable user login from the domain. */ -@ApiModel(description = "Configuration settings to verify ownership of a given domain. At least one of these must be completed enable user login from the domain. ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class SSODomainSetup { public static final String SERIALIZED_NAME_TXT = "txt"; @SerializedName(SERIALIZED_NAME_TXT) + @javax.annotation.Nullable private String txt; public static final String SERIALIZED_NAME_CNAME_SRC = "cname_src"; @SerializedName(SERIALIZED_NAME_CNAME_SRC) + @javax.annotation.Nullable private String cnameSrc; public static final String SERIALIZED_NAME_CNAME_DST = "cname_dst"; @SerializedName(SERIALIZED_NAME_CNAME_DST) + @javax.annotation.Nullable private String cnameDst; public SSODomainSetup() { } - public SSODomainSetup txt(String txt) { - + public SSODomainSetup txt(@javax.annotation.Nullable String txt) { this.txt = txt; return this; } - /** + /** * a DNS TXT record to set on the domain to claim. * @return txt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "a DNS TXT record to set on the domain to claim.") - public String getTxt() { return txt; } - - public void setTxt(String txt) { + public void setTxt(@javax.annotation.Nullable String txt) { this.txt = txt; } - public SSODomainSetup cnameSrc(String cnameSrc) { - + public SSODomainSetup cnameSrc(@javax.annotation.Nullable String cnameSrc) { this.cnameSrc = cnameSrc; return this; } - /** + /** * a DNS name to set a CNAME record on * @return cnameSrc - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "a DNS name to set a CNAME record on") - public String getCnameSrc() { return cnameSrc; } - - public void setCnameSrc(String cnameSrc) { + public void setCnameSrc(@javax.annotation.Nullable String cnameSrc) { this.cnameSrc = cnameSrc; } - public SSODomainSetup cnameDst(String cnameDst) { - + public SSODomainSetup cnameDst(@javax.annotation.Nullable String cnameDst) { this.cnameDst = cnameDst; return this; } - /** + /** * the CNAME target of `cname_src`. * @return cnameDst - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "the CNAME target of `cname_src`.") - public String getCnameDst() { return cnameDst; } - - public void setCnameDst(String cnameDst) { + public void setCnameDst(@javax.annotation.Nullable String cnameDst) { this.cnameDst = cnameDst; } - /** - * 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. - */ - public SSODomainSetup 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -173,13 +137,12 @@ public boolean equals(Object o) { SSODomainSetup ssODomainSetup = (SSODomainSetup) o; return Objects.equals(this.txt, ssODomainSetup.txt) && Objects.equals(this.cnameSrc, ssODomainSetup.cnameSrc) && - Objects.equals(this.cnameDst, ssODomainSetup.cnameDst)&& - Objects.equals(this.additionalProperties, ssODomainSetup.additionalProperties); + Objects.equals(this.cnameDst, ssODomainSetup.cnameDst); } @Override public int hashCode() { - return Objects.hash(txt, cnameSrc, cnameDst, additionalProperties); + return Objects.hash(txt, cnameSrc, cnameDst); } @Override @@ -189,7 +152,6 @@ public String toString() { sb.append(" txt: ").append(toIndentedString(txt)).append("\n"); sb.append(" cnameSrc: ").append(toIndentedString(cnameSrc)).append("\n"); sb.append(" cnameDst: ").append(toIndentedString(cnameDst)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -220,20 +182,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to SSODomainSetup - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (SSODomainSetup.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 SSODomainSetup + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SSODomainSetup.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in SSODomainSetup is not found in the empty JSON string", SSODomainSetup.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SSODomainSetup.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SSODomainSetup` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("txt") != null && !jsonObj.get("txt").isJsonNull()) && !jsonObj.get("txt").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `txt` to be a primitive type in the JSON string but got `%s`", jsonObj.get("txt").toString())); } @@ -260,71 +229,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, SSODomainSetup value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 SSODomainSetup read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - SSODomainSetup 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of SSODomainSetup given an JSON string - * - * @param jsonString JSON string - * @return An instance of SSODomainSetup - * @throws IOException if the JSON string is invalid with respect to SSODomainSetup - */ + /** + * Create an instance of SSODomainSetup given an JSON string + * + * @param jsonString JSON string + * @return An instance of SSODomainSetup + * @throws IOException if the JSON string is invalid with respect to SSODomainSetup + */ public static SSODomainSetup fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, SSODomainSetup.class); } - /** - * Convert an instance of SSODomainSetup to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of SSODomainSetup to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/SSOProvider.java b/src/main/java/io/tiledb/cloud/rest_api/model/SSOProvider.java index 5e7e300..49211bf 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/SSOProvider.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/SSOProvider.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -31,7 +35,11 @@ public enum SSOProvider { STRIPE("stripe"), - OKTA("okta"); + OKTA("okta"), + + PERDOMAIN("perdomain"), + + SCIM("scim"); private String value; @@ -69,5 +77,10 @@ public SSOProvider read(final JsonReader jsonReader) throws IOException { return SSOProvider.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + SSOProvider.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/SharePaymentRequest.java b/src/main/java/io/tiledb/cloud/rest_api/model/SharePaymentRequest.java new file mode 100644 index 0000000..325680e --- /dev/null +++ b/src/main/java/io/tiledb/cloud/rest_api/model/SharePaymentRequest.java @@ -0,0 +1,217 @@ +/* + * TileDB Storage Platform API + * TileDB Storage Platform REST API + * + * The version of the OpenAPI document: 2.17.51 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +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 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.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * SharePaymentRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") +public class SharePaymentRequest { + public static final String SERIALIZED_NAME_NAMESPACES = "namespaces"; + @SerializedName(SERIALIZED_NAME_NAMESPACES) + @javax.annotation.Nullable + private List namespaces = new ArrayList<>(); + + public SharePaymentRequest() { + } + + public SharePaymentRequest namespaces(@javax.annotation.Nullable List namespaces) { + this.namespaces = namespaces; + return this; + } + + public SharePaymentRequest addNamespacesItem(String namespacesItem) { + if (this.namespaces == null) { + this.namespaces = new ArrayList<>(); + } + this.namespaces.add(namespacesItem); + return this; + } + + /** + * Get namespaces + * @return namespaces + */ + @javax.annotation.Nullable + public List getNamespaces() { + return namespaces; + } + + public void setNamespaces(@javax.annotation.Nullable List namespaces) { + this.namespaces = namespaces; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SharePaymentRequest sharePaymentRequest = (SharePaymentRequest) o; + return Objects.equals(this.namespaces, sharePaymentRequest.namespaces); + } + + @Override + public int hashCode() { + return Objects.hash(namespaces); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SharePaymentRequest {\n"); + sb.append(" namespaces: ").append(toIndentedString(namespaces)).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("namespaces"); + + // 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 SharePaymentRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SharePaymentRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SharePaymentRequest is not found in the empty JSON string", SharePaymentRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SharePaymentRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SharePaymentRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("namespaces") != null && !jsonObj.get("namespaces").isJsonNull() && !jsonObj.get("namespaces").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `namespaces` to be an array in the JSON string but got `%s`", jsonObj.get("namespaces").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SharePaymentRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SharePaymentRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SharePaymentRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SharePaymentRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SharePaymentRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SharePaymentRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SharePaymentRequest + * @throws IOException if the JSON string is invalid with respect to SharePaymentRequest + */ + public static SharePaymentRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SharePaymentRequest.class); + } + + /** + * Convert an instance of SharePaymentRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/SingleFragmentInfo.java b/src/main/java/io/tiledb/cloud/rest_api/model/SingleFragmentInfo.java index 7ee92f2..117dafe 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/SingleFragmentInfo.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/SingleFragmentInfo.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,128 +11,96 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.FragmentMetadata; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Single Fragment info of an array */ -@ApiModel(description = "Single Fragment info of an array") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class SingleFragmentInfo { public static final String SERIALIZED_NAME_ARRAY_SCHEMA_NAME = "ArraySchemaName"; @SerializedName(SERIALIZED_NAME_ARRAY_SCHEMA_NAME) + @javax.annotation.Nullable private String arraySchemaName; public static final String SERIALIZED_NAME_META = "meta"; @SerializedName(SERIALIZED_NAME_META) + @javax.annotation.Nullable private FragmentMetadata meta; public SingleFragmentInfo() { } - public SingleFragmentInfo arraySchemaName(String arraySchemaName) { - + public SingleFragmentInfo arraySchemaName(@javax.annotation.Nullable String arraySchemaName) { this.arraySchemaName = arraySchemaName; return this; } - /** + /** * array schema name * @return arraySchemaName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "array schema name") - public String getArraySchemaName() { return arraySchemaName; } - - public void setArraySchemaName(String arraySchemaName) { + public void setArraySchemaName(@javax.annotation.Nullable String arraySchemaName) { this.arraySchemaName = arraySchemaName; } - public SingleFragmentInfo meta(FragmentMetadata meta) { - + public SingleFragmentInfo meta(@javax.annotation.Nullable FragmentMetadata meta) { this.meta = meta; return this; } - /** + /** * Get meta * @return meta - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public FragmentMetadata getMeta() { return meta; } - - public void setMeta(FragmentMetadata meta) { + public void setMeta(@javax.annotation.Nullable FragmentMetadata meta) { this.meta = meta; } - /** - * 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. - */ - public SingleFragmentInfo 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -145,13 +113,12 @@ public boolean equals(Object o) { } SingleFragmentInfo singleFragmentInfo = (SingleFragmentInfo) o; return Objects.equals(this.arraySchemaName, singleFragmentInfo.arraySchemaName) && - Objects.equals(this.meta, singleFragmentInfo.meta)&& - Objects.equals(this.additionalProperties, singleFragmentInfo.additionalProperties); + Objects.equals(this.meta, singleFragmentInfo.meta); } @Override public int hashCode() { - return Objects.hash(arraySchemaName, meta, additionalProperties); + return Objects.hash(arraySchemaName, meta); } @Override @@ -160,7 +127,6 @@ public String toString() { sb.append("class SingleFragmentInfo {\n"); sb.append(" arraySchemaName: ").append(toIndentedString(arraySchemaName)).append("\n"); sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -190,26 +156,33 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to SingleFragmentInfo - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (SingleFragmentInfo.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 SingleFragmentInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SingleFragmentInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in SingleFragmentInfo is not found in the empty JSON string", SingleFragmentInfo.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SingleFragmentInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SingleFragmentInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("ArraySchemaName") != null && !jsonObj.get("ArraySchemaName").isJsonNull()) && !jsonObj.get("ArraySchemaName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `ArraySchemaName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ArraySchemaName").toString())); } // validate the optional field `meta` if (jsonObj.get("meta") != null && !jsonObj.get("meta").isJsonNull()) { - FragmentMetadata.validateJsonObject(jsonObj.getAsJsonObject("meta")); + FragmentMetadata.validateJsonElement(jsonObj.get("meta")); } } @@ -228,71 +201,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, SingleFragmentInfo value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 SingleFragmentInfo read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - SingleFragmentInfo 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of SingleFragmentInfo given an JSON string - * - * @param jsonString JSON string - * @return An instance of SingleFragmentInfo - * @throws IOException if the JSON string is invalid with respect to SingleFragmentInfo - */ + /** + * Create an instance of SingleFragmentInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of SingleFragmentInfo + * @throws IOException if the JSON string is invalid with respect to SingleFragmentInfo + */ public static SingleFragmentInfo fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, SingleFragmentInfo.class); } - /** - * Convert an instance of SingleFragmentInfo to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of SingleFragmentInfo to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/StorageLocation.java b/src/main/java/io/tiledb/cloud/rest_api/model/StorageLocation.java index ac0ec01..e80506d 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/StorageLocation.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/StorageLocation.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,129 +11,96 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; - -import io.tiledb.cloud.rest_api.JSON; +import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; /** * The path at which a given asset will be stored, and the credentials used to access that asset. */ -@ApiModel(description = "The path at which a given asset will be stored, and the credentials used to access that asset. ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class StorageLocation { public static final String SERIALIZED_NAME_PATH = "path"; @SerializedName(SERIALIZED_NAME_PATH) + @javax.annotation.Nullable private String path; public static final String SERIALIZED_NAME_CREDENTIALS_NAME = "credentials_name"; @SerializedName(SERIALIZED_NAME_CREDENTIALS_NAME) + @javax.annotation.Nullable private String credentialsName; public StorageLocation() { } - public StorageLocation path(String path) { - + public StorageLocation path(@javax.annotation.Nullable String path) { this.path = path; return this; } - /** + /** * The path to store this asset type. If unset, a suffix of the user's `default_s3_path` is used. When updating, explicitly set to `\"\"`, the empty string, to clear this path; leaving it `null` (or absent) will leave the path unchanged. * @return path - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The path to store this asset type. If unset, a suffix of the user's `default_s3_path` is used. When updating, explicitly set to `\"\"`, the empty string, to clear this path; leaving it `null` (or absent) will leave the path unchanged. ") - public String getPath() { return path; } - - public void setPath(String path) { + public void setPath(@javax.annotation.Nullable String path) { this.path = path; } - public StorageLocation credentialsName(String credentialsName) { - + public StorageLocation credentialsName(@javax.annotation.Nullable String credentialsName) { this.credentialsName = credentialsName; return this; } - /** + /** * The name of the credentials used to acess this storage path. If unset, the `default_s3_path_credentials_name` is used. When updating, explicitly set to `\"\"`, the empty string, to clear this name; leaving it `null` (or absent) will leave the name unchanged. * @return credentialsName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The name of the credentials used to acess this storage path. If unset, the `default_s3_path_credentials_name` is used. When updating, explicitly set to `\"\"`, the empty string, to clear this name; leaving it `null` (or absent) will leave the name unchanged. ") - public String getCredentialsName() { return credentialsName; } - - public void setCredentialsName(String credentialsName) { + public void setCredentialsName(@javax.annotation.Nullable String credentialsName) { this.credentialsName = credentialsName; } - /** - * 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. - */ - public StorageLocation 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -146,8 +113,7 @@ public boolean equals(Object o) { } StorageLocation storageLocation = (StorageLocation) o; return Objects.equals(this.path, storageLocation.path) && - Objects.equals(this.credentialsName, storageLocation.credentialsName)&& - Objects.equals(this.additionalProperties, storageLocation.additionalProperties); + Objects.equals(this.credentialsName, storageLocation.credentialsName); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -156,7 +122,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(path, credentialsName, additionalProperties); + return Objects.hash(path, credentialsName); } private static int hashCodeNullable(JsonNullable a) { @@ -172,7 +138,6 @@ public String toString() { sb.append("class StorageLocation {\n"); sb.append(" path: ").append(toIndentedString(path)).append("\n"); sb.append(" credentialsName: ").append(toIndentedString(credentialsName)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -202,20 +167,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to StorageLocation - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (StorageLocation.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 StorageLocation + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!StorageLocation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in StorageLocation is not found in the empty JSON string", StorageLocation.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!StorageLocation.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `StorageLocation` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("path") != null && !jsonObj.get("path").isJsonNull()) && !jsonObj.get("path").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `path` to be a primitive type in the JSON string but got `%s`", jsonObj.get("path").toString())); } @@ -239,71 +211,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, StorageLocation value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 StorageLocation read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - StorageLocation 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of StorageLocation given an JSON string - * - * @param jsonString JSON string - * @return An instance of StorageLocation - * @throws IOException if the JSON string is invalid with respect to StorageLocation - */ + /** + * Create an instance of StorageLocation given an JSON string + * + * @param jsonString JSON string + * @return An instance of StorageLocation + * @throws IOException if the JSON string is invalid with respect to StorageLocation + */ public static StorageLocation fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, StorageLocation.class); } - /** - * Convert an instance of StorageLocation to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of StorageLocation to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/Subarray.java b/src/main/java/io/tiledb/cloud/rest_api/model/Subarray.java index 627f307..4e1b44c 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/Subarray.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/Subarray.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,76 +11,82 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.Layout; +import org.openapitools.client.model.SubarrayRanges; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * A Subarray */ -@ApiModel(description = "A Subarray") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class Subarray { public static final String SERIALIZED_NAME_LAYOUT = "layout"; @SerializedName(SERIALIZED_NAME_LAYOUT) + @javax.annotation.Nullable private Layout layout; public static final String SERIALIZED_NAME_RANGES = "ranges"; @SerializedName(SERIALIZED_NAME_RANGES) - private List ranges = null; + @javax.annotation.Nullable + private List ranges = new ArrayList<>(); public Subarray() { } - public Subarray layout(Layout layout) { - + public Subarray layout(@javax.annotation.Nullable Layout layout) { this.layout = layout; return this; } - /** + /** * Get layout * @return layout - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Layout getLayout() { return layout; } - - public void setLayout(Layout layout) { + public void setLayout(@javax.annotation.Nullable Layout layout) { this.layout = layout; } - public Subarray ranges(List ranges) { - + public Subarray ranges(@javax.annotation.Nullable List ranges) { this.ranges = ranges; return this; } @@ -93,57 +99,19 @@ public Subarray addRangesItem(SubarrayRanges rangesItem) { return this; } - /** + /** * List of 1D ranges, one per dimension * @return ranges - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "List of 1D ranges, one per dimension") - public List getRanges() { return ranges; } - - public void setRanges(List ranges) { + public void setRanges(@javax.annotation.Nullable List ranges) { this.ranges = ranges; } - /** - * 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. - */ - public Subarray 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -156,13 +124,12 @@ public boolean equals(Object o) { } Subarray subarray = (Subarray) o; return Objects.equals(this.layout, subarray.layout) && - Objects.equals(this.ranges, subarray.ranges)&& - Objects.equals(this.additionalProperties, subarray.additionalProperties); + Objects.equals(this.ranges, subarray.ranges); } @Override public int hashCode() { - return Objects.hash(layout, ranges, additionalProperties); + return Objects.hash(layout, ranges); } @Override @@ -171,7 +138,6 @@ public String toString() { sb.append("class Subarray {\n"); sb.append(" layout: ").append(toIndentedString(layout)).append("\n"); sb.append(" ranges: ").append(toIndentedString(ranges)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -201,31 +167,44 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Subarray - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (Subarray.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 Subarray + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Subarray.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in Subarray is not found in the empty JSON string", Subarray.openapiRequiredFields.toString())); } } - JsonArray jsonArrayranges = jsonObj.getAsJsonArray("ranges"); - if (jsonArrayranges != null) { - // ensure the json data is an array - if (!jsonObj.get("ranges").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `ranges` to be an array in the JSON string but got `%s`", jsonObj.get("ranges").toString())); - } - // validate the optional field `ranges` (array) - for (int i = 0; i < jsonArrayranges.size(); i++) { - SubarrayRanges.validateJsonObject(jsonArrayranges.get(i).getAsJsonObject()); - }; + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Subarray.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Subarray` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `layout` + if (jsonObj.get("layout") != null && !jsonObj.get("layout").isJsonNull()) { + Layout.validateJsonElement(jsonObj.get("layout")); + } + if (jsonObj.get("ranges") != null && !jsonObj.get("ranges").isJsonNull()) { + JsonArray jsonArrayranges = jsonObj.getAsJsonArray("ranges"); + if (jsonArrayranges != null) { + // ensure the json data is an array + if (!jsonObj.get("ranges").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `ranges` to be an array in the JSON string but got `%s`", jsonObj.get("ranges").toString())); + } + + // validate the optional field `ranges` (array) + for (int i = 0; i < jsonArrayranges.size(); i++) { + SubarrayRanges.validateJsonElement(jsonArrayranges.get(i)); + }; + } } } @@ -244,71 +223,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, Subarray value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 Subarray read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - Subarray 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Subarray given an JSON string - * - * @param jsonString JSON string - * @return An instance of Subarray - * @throws IOException if the JSON string is invalid with respect to Subarray - */ + /** + * Create an instance of Subarray given an JSON string + * + * @param jsonString JSON string + * @return An instance of Subarray + * @throws IOException if the JSON string is invalid with respect to Subarray + */ public static Subarray fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Subarray.class); } - /** - * Convert an instance of Subarray to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Subarray to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/SubarrayPartitioner.java b/src/main/java/io/tiledb/cloud/rest_api/model/SubarrayPartitioner.java index 45b3a74..f5ab02e 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/SubarrayPartitioner.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/SubarrayPartitioner.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,92 +11,104 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.AttributeBufferSize; +import org.openapitools.client.model.Subarray; +import org.openapitools.client.model.SubarrayPartitionerCurrent; +import org.openapitools.client.model.SubarrayPartitionerState; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * The subarray partitioner */ -@ApiModel(description = "The subarray partitioner") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class SubarrayPartitioner { public static final String SERIALIZED_NAME_SUBARRAY = "subarray"; @SerializedName(SERIALIZED_NAME_SUBARRAY) + @javax.annotation.Nullable private Subarray subarray; public static final String SERIALIZED_NAME_BUDGET = "budget"; @SerializedName(SERIALIZED_NAME_BUDGET) - private List budget = null; + @javax.annotation.Nullable + private List budget = new ArrayList<>(); public static final String SERIALIZED_NAME_CURRENT = "current"; @SerializedName(SERIALIZED_NAME_CURRENT) + @javax.annotation.Nullable private SubarrayPartitionerCurrent current; public static final String SERIALIZED_NAME_STATE = "state"; @SerializedName(SERIALIZED_NAME_STATE) + @javax.annotation.Nullable private SubarrayPartitionerState state; public static final String SERIALIZED_NAME_MEMORY_BUDGET = "memoryBudget"; @SerializedName(SERIALIZED_NAME_MEMORY_BUDGET) + @javax.annotation.Nullable private Integer memoryBudget; public static final String SERIALIZED_NAME_MEMORY_BUDGET_VAR = "memoryBudgetVar"; @SerializedName(SERIALIZED_NAME_MEMORY_BUDGET_VAR) + @javax.annotation.Nullable private Integer memoryBudgetVar; public SubarrayPartitioner() { } - public SubarrayPartitioner subarray(Subarray subarray) { - + public SubarrayPartitioner subarray(@javax.annotation.Nullable Subarray subarray) { this.subarray = subarray; return this; } - /** + /** * Get subarray * @return subarray - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Subarray getSubarray() { return subarray; } - - public void setSubarray(Subarray subarray) { + public void setSubarray(@javax.annotation.Nullable Subarray subarray) { this.subarray = subarray; } - public SubarrayPartitioner budget(List budget) { - + public SubarrayPartitioner budget(@javax.annotation.Nullable List budget) { this.budget = budget; return this; } @@ -109,149 +121,95 @@ public SubarrayPartitioner addBudgetItem(AttributeBufferSize budgetItem) { return this; } - /** + /** * Result size budget (in bytes) for all attributes. * @return budget - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Result size budget (in bytes) for all attributes.") - public List getBudget() { return budget; } - - public void setBudget(List budget) { + public void setBudget(@javax.annotation.Nullable List budget) { this.budget = budget; } - public SubarrayPartitioner current(SubarrayPartitionerCurrent current) { - + public SubarrayPartitioner current(@javax.annotation.Nullable SubarrayPartitionerCurrent current) { this.current = current; return this; } - /** + /** * Get current * @return current - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public SubarrayPartitionerCurrent getCurrent() { return current; } - - public void setCurrent(SubarrayPartitionerCurrent current) { + public void setCurrent(@javax.annotation.Nullable SubarrayPartitionerCurrent current) { this.current = current; } - public SubarrayPartitioner state(SubarrayPartitionerState state) { - + public SubarrayPartitioner state(@javax.annotation.Nullable SubarrayPartitionerState state) { this.state = state; return this; } - /** + /** * Get state * @return state - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public SubarrayPartitionerState getState() { return state; } - - public void setState(SubarrayPartitionerState state) { + public void setState(@javax.annotation.Nullable SubarrayPartitionerState state) { this.state = state; } - public SubarrayPartitioner memoryBudget(Integer memoryBudget) { - + public SubarrayPartitioner memoryBudget(@javax.annotation.Nullable Integer memoryBudget) { this.memoryBudget = memoryBudget; return this; } - /** + /** * The memory budget for the fixed-sized attributes and the offsets of the var-sized attributes * @return memoryBudget - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The memory budget for the fixed-sized attributes and the offsets of the var-sized attributes") - public Integer getMemoryBudget() { return memoryBudget; } - - public void setMemoryBudget(Integer memoryBudget) { + public void setMemoryBudget(@javax.annotation.Nullable Integer memoryBudget) { this.memoryBudget = memoryBudget; } - public SubarrayPartitioner memoryBudgetVar(Integer memoryBudgetVar) { - + public SubarrayPartitioner memoryBudgetVar(@javax.annotation.Nullable Integer memoryBudgetVar) { this.memoryBudgetVar = memoryBudgetVar; return this; } - /** + /** * The memory budget for the var-sized attributes * @return memoryBudgetVar - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The memory budget for the var-sized attributes") - public Integer getMemoryBudgetVar() { return memoryBudgetVar; } - - public void setMemoryBudgetVar(Integer memoryBudgetVar) { + public void setMemoryBudgetVar(@javax.annotation.Nullable Integer memoryBudgetVar) { this.memoryBudgetVar = memoryBudgetVar; } - /** - * 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. - */ - public SubarrayPartitioner 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -268,13 +226,12 @@ public boolean equals(Object o) { Objects.equals(this.current, subarrayPartitioner.current) && Objects.equals(this.state, subarrayPartitioner.state) && Objects.equals(this.memoryBudget, subarrayPartitioner.memoryBudget) && - Objects.equals(this.memoryBudgetVar, subarrayPartitioner.memoryBudgetVar)&& - Objects.equals(this.additionalProperties, subarrayPartitioner.additionalProperties); + Objects.equals(this.memoryBudgetVar, subarrayPartitioner.memoryBudgetVar); } @Override public int hashCode() { - return Objects.hash(subarray, budget, current, state, memoryBudget, memoryBudgetVar, additionalProperties); + return Objects.hash(subarray, budget, current, state, memoryBudget, memoryBudgetVar); } @Override @@ -287,7 +244,6 @@ public String toString() { sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" memoryBudget: ").append(toIndentedString(memoryBudget)).append("\n"); sb.append(" memoryBudgetVar: ").append(toIndentedString(memoryBudgetVar)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -321,43 +277,52 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to SubarrayPartitioner - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (SubarrayPartitioner.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 SubarrayPartitioner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SubarrayPartitioner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in SubarrayPartitioner is not found in the empty JSON string", SubarrayPartitioner.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SubarrayPartitioner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SubarrayPartitioner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `subarray` if (jsonObj.get("subarray") != null && !jsonObj.get("subarray").isJsonNull()) { - Subarray.validateJsonObject(jsonObj.getAsJsonObject("subarray")); + Subarray.validateJsonElement(jsonObj.get("subarray")); } - JsonArray jsonArraybudget = jsonObj.getAsJsonArray("budget"); - if (jsonArraybudget != null) { - // ensure the json data is an array - if (!jsonObj.get("budget").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `budget` to be an array in the JSON string but got `%s`", jsonObj.get("budget").toString())); + if (jsonObj.get("budget") != null && !jsonObj.get("budget").isJsonNull()) { + JsonArray jsonArraybudget = jsonObj.getAsJsonArray("budget"); + if (jsonArraybudget != null) { + // ensure the json data is an array + if (!jsonObj.get("budget").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `budget` to be an array in the JSON string but got `%s`", jsonObj.get("budget").toString())); + } + + // validate the optional field `budget` (array) + for (int i = 0; i < jsonArraybudget.size(); i++) { + AttributeBufferSize.validateJsonElement(jsonArraybudget.get(i)); + }; } - - // validate the optional field `budget` (array) - for (int i = 0; i < jsonArraybudget.size(); i++) { - AttributeBufferSize.validateJsonObject(jsonArraybudget.get(i).getAsJsonObject()); - }; } // validate the optional field `current` if (jsonObj.get("current") != null && !jsonObj.get("current").isJsonNull()) { - SubarrayPartitionerCurrent.validateJsonObject(jsonObj.getAsJsonObject("current")); + SubarrayPartitionerCurrent.validateJsonElement(jsonObj.get("current")); } // validate the optional field `state` if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { - SubarrayPartitionerState.validateJsonObject(jsonObj.getAsJsonObject("state")); + SubarrayPartitionerState.validateJsonElement(jsonObj.get("state")); } } @@ -376,71 +341,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, SubarrayPartitioner value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 SubarrayPartitioner read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - SubarrayPartitioner 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of SubarrayPartitioner given an JSON string - * - * @param jsonString JSON string - * @return An instance of SubarrayPartitioner - * @throws IOException if the JSON string is invalid with respect to SubarrayPartitioner - */ + /** + * Create an instance of SubarrayPartitioner given an JSON string + * + * @param jsonString JSON string + * @return An instance of SubarrayPartitioner + * @throws IOException if the JSON string is invalid with respect to SubarrayPartitioner + */ public static SubarrayPartitioner fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, SubarrayPartitioner.class); } - /** - * Convert an instance of SubarrayPartitioner to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of SubarrayPartitioner to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/SubarrayPartitionerCurrent.java b/src/main/java/io/tiledb/cloud/rest_api/model/SubarrayPartitionerCurrent.java index bcc0725..08176b4 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/SubarrayPartitionerCurrent.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/SubarrayPartitionerCurrent.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,182 +11,144 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.Subarray; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * The current partition info */ -@ApiModel(description = "The current partition info") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class SubarrayPartitionerCurrent { public static final String SERIALIZED_NAME_SUBARRAY = "subarray"; @SerializedName(SERIALIZED_NAME_SUBARRAY) + @javax.annotation.Nullable private Subarray subarray; public static final String SERIALIZED_NAME_START = "start"; @SerializedName(SERIALIZED_NAME_START) + @javax.annotation.Nullable private Integer start; public static final String SERIALIZED_NAME_END = "end"; @SerializedName(SERIALIZED_NAME_END) + @javax.annotation.Nullable private Integer end; public static final String SERIALIZED_NAME_SPLIT_MULTI_RANGE = "splitMultiRange"; @SerializedName(SERIALIZED_NAME_SPLIT_MULTI_RANGE) + @javax.annotation.Nullable private Boolean splitMultiRange; public SubarrayPartitionerCurrent() { } - public SubarrayPartitionerCurrent subarray(Subarray subarray) { - + public SubarrayPartitionerCurrent subarray(@javax.annotation.Nullable Subarray subarray) { this.subarray = subarray; return this; } - /** + /** * Get subarray * @return subarray - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Subarray getSubarray() { return subarray; } - - public void setSubarray(Subarray subarray) { + public void setSubarray(@javax.annotation.Nullable Subarray subarray) { this.subarray = subarray; } - public SubarrayPartitionerCurrent start(Integer start) { - + public SubarrayPartitionerCurrent start(@javax.annotation.Nullable Integer start) { this.start = start; return this; } - /** + /** * PartitionInfo start * @return start - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "PartitionInfo start") - public Integer getStart() { return start; } - - public void setStart(Integer start) { + public void setStart(@javax.annotation.Nullable Integer start) { this.start = start; } - public SubarrayPartitionerCurrent end(Integer end) { - + public SubarrayPartitionerCurrent end(@javax.annotation.Nullable Integer end) { this.end = end; return this; } - /** + /** * PartitionInfo end * @return end - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "PartitionInfo end") - public Integer getEnd() { return end; } - - public void setEnd(Integer end) { + public void setEnd(@javax.annotation.Nullable Integer end) { this.end = end; } - public SubarrayPartitionerCurrent splitMultiRange(Boolean splitMultiRange) { - + public SubarrayPartitionerCurrent splitMultiRange(@javax.annotation.Nullable Boolean splitMultiRange) { this.splitMultiRange = splitMultiRange; return this; } - /** + /** * PartitionInfo splitMultiRange * @return splitMultiRange - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "PartitionInfo splitMultiRange") - public Boolean getSplitMultiRange() { return splitMultiRange; } - - public void setSplitMultiRange(Boolean splitMultiRange) { + public void setSplitMultiRange(@javax.annotation.Nullable Boolean splitMultiRange) { this.splitMultiRange = splitMultiRange; } - /** - * 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. - */ - public SubarrayPartitionerCurrent 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -201,13 +163,12 @@ public boolean equals(Object o) { return Objects.equals(this.subarray, subarrayPartitionerCurrent.subarray) && Objects.equals(this.start, subarrayPartitionerCurrent.start) && Objects.equals(this.end, subarrayPartitionerCurrent.end) && - Objects.equals(this.splitMultiRange, subarrayPartitionerCurrent.splitMultiRange)&& - Objects.equals(this.additionalProperties, subarrayPartitionerCurrent.additionalProperties); + Objects.equals(this.splitMultiRange, subarrayPartitionerCurrent.splitMultiRange); } @Override public int hashCode() { - return Objects.hash(subarray, start, end, splitMultiRange, additionalProperties); + return Objects.hash(subarray, start, end, splitMultiRange); } @Override @@ -218,7 +179,6 @@ public String toString() { sb.append(" start: ").append(toIndentedString(start)).append("\n"); sb.append(" end: ").append(toIndentedString(end)).append("\n"); sb.append(" splitMultiRange: ").append(toIndentedString(splitMultiRange)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -250,23 +210,30 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to SubarrayPartitionerCurrent - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (SubarrayPartitionerCurrent.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 SubarrayPartitionerCurrent + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SubarrayPartitionerCurrent.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in SubarrayPartitionerCurrent is not found in the empty JSON string", SubarrayPartitionerCurrent.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SubarrayPartitionerCurrent.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SubarrayPartitionerCurrent` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `subarray` if (jsonObj.get("subarray") != null && !jsonObj.get("subarray").isJsonNull()) { - Subarray.validateJsonObject(jsonObj.getAsJsonObject("subarray")); + Subarray.validateJsonElement(jsonObj.get("subarray")); } } @@ -285,71 +252,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, SubarrayPartitionerCurrent value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 SubarrayPartitionerCurrent read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - SubarrayPartitionerCurrent 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of SubarrayPartitionerCurrent given an JSON string - * - * @param jsonString JSON string - * @return An instance of SubarrayPartitionerCurrent - * @throws IOException if the JSON string is invalid with respect to SubarrayPartitionerCurrent - */ + /** + * Create an instance of SubarrayPartitionerCurrent given an JSON string + * + * @param jsonString JSON string + * @return An instance of SubarrayPartitionerCurrent + * @throws IOException if the JSON string is invalid with respect to SubarrayPartitionerCurrent + */ public static SubarrayPartitionerCurrent fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, SubarrayPartitionerCurrent.class); } - /** - * Convert an instance of SubarrayPartitionerCurrent to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of SubarrayPartitionerCurrent to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/SubarrayPartitionerState.java b/src/main/java/io/tiledb/cloud/rest_api/model/SubarrayPartitionerState.java index 13ced4d..92257af 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/SubarrayPartitionerState.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/SubarrayPartitionerState.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,107 +11,110 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.Subarray; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * The state information for the remaining partitions to be produced */ -@ApiModel(description = "The state information for the remaining partitions to be produced") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class SubarrayPartitionerState { public static final String SERIALIZED_NAME_START = "start"; @SerializedName(SERIALIZED_NAME_START) + @javax.annotation.Nullable private Integer start; public static final String SERIALIZED_NAME_END = "end"; @SerializedName(SERIALIZED_NAME_END) + @javax.annotation.Nullable private Integer end; public static final String SERIALIZED_NAME_SINGLE_RANGE = "singleRange"; @SerializedName(SERIALIZED_NAME_SINGLE_RANGE) - private List singleRange = null; + @javax.annotation.Nullable + private List singleRange = new ArrayList<>(); public static final String SERIALIZED_NAME_MULTI_RANGE = "multiRange"; @SerializedName(SERIALIZED_NAME_MULTI_RANGE) - private List multiRange = null; + @javax.annotation.Nullable + private List multiRange = new ArrayList<>(); public SubarrayPartitionerState() { } - public SubarrayPartitionerState start(Integer start) { - + public SubarrayPartitionerState start(@javax.annotation.Nullable Integer start) { this.start = start; return this; } - /** + /** * State start * @return start - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "State start") - public Integer getStart() { return start; } - - public void setStart(Integer start) { + public void setStart(@javax.annotation.Nullable Integer start) { this.start = start; } - public SubarrayPartitionerState end(Integer end) { - + public SubarrayPartitionerState end(@javax.annotation.Nullable Integer end) { this.end = end; return this; } - /** + /** * State end * @return end - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "State end") - public Integer getEnd() { return end; } - - public void setEnd(Integer end) { + public void setEnd(@javax.annotation.Nullable Integer end) { this.end = end; } - public SubarrayPartitionerState singleRange(List singleRange) { - + public SubarrayPartitionerState singleRange(@javax.annotation.Nullable List singleRange) { this.singleRange = singleRange; return this; } @@ -124,25 +127,21 @@ public SubarrayPartitionerState addSingleRangeItem(Subarray singleRangeItem) { return this; } - /** + /** * State singleRange * @return singleRange - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "State singleRange") - public List getSingleRange() { return singleRange; } - - public void setSingleRange(List singleRange) { + public void setSingleRange(@javax.annotation.Nullable List singleRange) { this.singleRange = singleRange; } - public SubarrayPartitionerState multiRange(List multiRange) { - + public SubarrayPartitionerState multiRange(@javax.annotation.Nullable List multiRange) { this.multiRange = multiRange; return this; } @@ -155,57 +154,19 @@ public SubarrayPartitionerState addMultiRangeItem(Subarray multiRangeItem) { return this; } - /** + /** * State multiRange * @return multiRange - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "State multiRange") - public List getMultiRange() { return multiRange; } - - public void setMultiRange(List multiRange) { + public void setMultiRange(@javax.annotation.Nullable List multiRange) { this.multiRange = multiRange; } - /** - * 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. - */ - public SubarrayPartitionerState 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -220,13 +181,12 @@ public boolean equals(Object o) { return Objects.equals(this.start, subarrayPartitionerState.start) && Objects.equals(this.end, subarrayPartitionerState.end) && Objects.equals(this.singleRange, subarrayPartitionerState.singleRange) && - Objects.equals(this.multiRange, subarrayPartitionerState.multiRange)&& - Objects.equals(this.additionalProperties, subarrayPartitionerState.additionalProperties); + Objects.equals(this.multiRange, subarrayPartitionerState.multiRange); } @Override public int hashCode() { - return Objects.hash(start, end, singleRange, multiRange, additionalProperties); + return Objects.hash(start, end, singleRange, multiRange); } @Override @@ -237,7 +197,6 @@ public String toString() { sb.append(" end: ").append(toIndentedString(end)).append("\n"); sb.append(" singleRange: ").append(toIndentedString(singleRange)).append("\n"); sb.append(" multiRange: ").append(toIndentedString(multiRange)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -269,43 +228,54 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to SubarrayPartitionerState - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (SubarrayPartitionerState.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 SubarrayPartitionerState + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SubarrayPartitionerState.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in SubarrayPartitionerState is not found in the empty JSON string", SubarrayPartitionerState.openapiRequiredFields.toString())); } } - JsonArray jsonArraysingleRange = jsonObj.getAsJsonArray("singleRange"); - if (jsonArraysingleRange != null) { - // ensure the json data is an array - if (!jsonObj.get("singleRange").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `singleRange` to be an array in the JSON string but got `%s`", jsonObj.get("singleRange").toString())); - } - // validate the optional field `singleRange` (array) - for (int i = 0; i < jsonArraysingleRange.size(); i++) { - Subarray.validateJsonObject(jsonArraysingleRange.get(i).getAsJsonObject()); - }; + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SubarrayPartitionerState.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SubarrayPartitionerState` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } } - JsonArray jsonArraymultiRange = jsonObj.getAsJsonArray("multiRange"); - if (jsonArraymultiRange != null) { - // ensure the json data is an array - if (!jsonObj.get("multiRange").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `multiRange` to be an array in the JSON string but got `%s`", jsonObj.get("multiRange").toString())); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("singleRange") != null && !jsonObj.get("singleRange").isJsonNull()) { + JsonArray jsonArraysingleRange = jsonObj.getAsJsonArray("singleRange"); + if (jsonArraysingleRange != null) { + // ensure the json data is an array + if (!jsonObj.get("singleRange").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `singleRange` to be an array in the JSON string but got `%s`", jsonObj.get("singleRange").toString())); + } + + // validate the optional field `singleRange` (array) + for (int i = 0; i < jsonArraysingleRange.size(); i++) { + Subarray.validateJsonElement(jsonArraysingleRange.get(i)); + }; + } + } + if (jsonObj.get("multiRange") != null && !jsonObj.get("multiRange").isJsonNull()) { + JsonArray jsonArraymultiRange = jsonObj.getAsJsonArray("multiRange"); + if (jsonArraymultiRange != null) { + // ensure the json data is an array + if (!jsonObj.get("multiRange").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `multiRange` to be an array in the JSON string but got `%s`", jsonObj.get("multiRange").toString())); + } + + // validate the optional field `multiRange` (array) + for (int i = 0; i < jsonArraymultiRange.size(); i++) { + Subarray.validateJsonElement(jsonArraymultiRange.get(i)); + }; } - - // validate the optional field `multiRange` (array) - for (int i = 0; i < jsonArraymultiRange.size(); i++) { - Subarray.validateJsonObject(jsonArraymultiRange.get(i).getAsJsonObject()); - }; } } @@ -324,71 +294,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, SubarrayPartitionerState value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 SubarrayPartitionerState read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - SubarrayPartitionerState 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of SubarrayPartitionerState given an JSON string - * - * @param jsonString JSON string - * @return An instance of SubarrayPartitionerState - * @throws IOException if the JSON string is invalid with respect to SubarrayPartitionerState - */ + /** + * Create an instance of SubarrayPartitionerState given an JSON string + * + * @param jsonString JSON string + * @return An instance of SubarrayPartitionerState + * @throws IOException if the JSON string is invalid with respect to SubarrayPartitionerState + */ public static SubarrayPartitionerState fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, SubarrayPartitionerState.class); } - /** - * Convert an instance of SubarrayPartitionerState to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of SubarrayPartitionerState to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/SubarrayRanges.java b/src/main/java/io/tiledb/cloud/rest_api/model/SubarrayRanges.java index ce5aff3..457e713 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/SubarrayRanges.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/SubarrayRanges.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,102 +11,105 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.Datatype; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * A set of 1D ranges for a subarray */ -@ApiModel(description = "A set of 1D ranges for a subarray") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class SubarrayRanges { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable private Datatype type; public static final String SERIALIZED_NAME_HAS_DEFAULT_RANGE = "hasDefaultRange"; @SerializedName(SERIALIZED_NAME_HAS_DEFAULT_RANGE) + @javax.annotation.Nullable private Boolean hasDefaultRange; public static final String SERIALIZED_NAME_BUFFER = "buffer"; @SerializedName(SERIALIZED_NAME_BUFFER) - private List buffer = null; + @javax.annotation.Nullable + private List buffer = new ArrayList<>(); public SubarrayRanges() { } - public SubarrayRanges type(Datatype type) { - + public SubarrayRanges type(@javax.annotation.Nullable Datatype type) { this.type = type; return this; } - /** + /** * Get type * @return type - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Datatype getType() { return type; } - - public void setType(Datatype type) { + public void setType(@javax.annotation.Nullable Datatype type) { this.type = type; } - public SubarrayRanges hasDefaultRange(Boolean hasDefaultRange) { - + public SubarrayRanges hasDefaultRange(@javax.annotation.Nullable Boolean hasDefaultRange) { this.hasDefaultRange = hasDefaultRange; return this; } - /** + /** * True if the range is the default range * @return hasDefaultRange - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "True if the range is the default range") - public Boolean getHasDefaultRange() { return hasDefaultRange; } - - public void setHasDefaultRange(Boolean hasDefaultRange) { + public void setHasDefaultRange(@javax.annotation.Nullable Boolean hasDefaultRange) { this.hasDefaultRange = hasDefaultRange; } - public SubarrayRanges buffer(List buffer) { - + public SubarrayRanges buffer(@javax.annotation.Nullable List buffer) { this.buffer = buffer; return this; } @@ -119,57 +122,19 @@ public SubarrayRanges addBufferItem(Integer bufferItem) { return this; } - /** + /** * The bytes of the ranges * @return buffer - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The bytes of the ranges") - public List getBuffer() { return buffer; } - - public void setBuffer(List buffer) { + public void setBuffer(@javax.annotation.Nullable List buffer) { this.buffer = buffer; } - /** - * 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. - */ - public SubarrayRanges 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -183,13 +148,12 @@ public boolean equals(Object o) { SubarrayRanges subarrayRanges = (SubarrayRanges) o; return Objects.equals(this.type, subarrayRanges.type) && Objects.equals(this.hasDefaultRange, subarrayRanges.hasDefaultRange) && - Objects.equals(this.buffer, subarrayRanges.buffer)&& - Objects.equals(this.additionalProperties, subarrayRanges.additionalProperties); + Objects.equals(this.buffer, subarrayRanges.buffer); } @Override public int hashCode() { - return Objects.hash(type, hasDefaultRange, buffer, additionalProperties); + return Objects.hash(type, hasDefaultRange, buffer); } @Override @@ -199,7 +163,6 @@ public String toString() { sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" hasDefaultRange: ").append(toIndentedString(hasDefaultRange)).append("\n"); sb.append(" buffer: ").append(toIndentedString(buffer)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -230,22 +193,33 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to SubarrayRanges - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (SubarrayRanges.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 SubarrayRanges + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SubarrayRanges.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in SubarrayRanges is not found in the empty JSON string", SubarrayRanges.openapiRequiredFields.toString())); } } - // ensure the json data is an array - if ((jsonObj.get("buffer") != null && !jsonObj.get("buffer").isJsonNull()) && !jsonObj.get("buffer").isJsonArray()) { + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SubarrayRanges.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SubarrayRanges` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + Datatype.validateJsonElement(jsonObj.get("type")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("buffer") != null && !jsonObj.get("buffer").isJsonNull() && !jsonObj.get("buffer").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `buffer` to be an array in the JSON string but got `%s`", jsonObj.get("buffer").toString())); } } @@ -265,71 +239,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, SubarrayRanges value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 SubarrayRanges read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - SubarrayRanges 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of SubarrayRanges given an JSON string - * - * @param jsonString JSON string - * @return An instance of SubarrayRanges - * @throws IOException if the JSON string is invalid with respect to SubarrayRanges - */ + /** + * Create an instance of SubarrayRanges given an JSON string + * + * @param jsonString JSON string + * @return An instance of SubarrayRanges + * @throws IOException if the JSON string is invalid with respect to SubarrayRanges + */ public static SubarrayRanges fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, SubarrayRanges.class); } - /** - * Convert an instance of SubarrayRanges to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of SubarrayRanges to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/Subscription.java b/src/main/java/io/tiledb/cloud/rest_api/model/Subscription.java index 1463005..1be9958 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/Subscription.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/Subscription.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,130 +11,129 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.Pricing; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Subscription of a user (customer) to another user's arrays */ -@ApiModel(description = "Subscription of a user (customer) to another user's arrays") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class Subscription { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private String id; public static final String SERIALIZED_NAME_OWNER_NAMESPACE_UUID = "owner_namespace_uuid"; @SerializedName(SERIALIZED_NAME_OWNER_NAMESPACE_UUID) + @javax.annotation.Nullable private String ownerNamespaceUuid; public static final String SERIALIZED_NAME_CUSTOMER_NAMESPACE_UUID = "customer_namespace_uuid"; @SerializedName(SERIALIZED_NAME_CUSTOMER_NAMESPACE_UUID) + @javax.annotation.Nullable private String customerNamespaceUuid; public static final String SERIALIZED_NAME_PRICING = "pricing"; @SerializedName(SERIALIZED_NAME_PRICING) - private List pricing = null; + @javax.annotation.Nullable + private List pricing = new ArrayList<>(); public Subscription() { } - public Subscription id(String id) { - + public Subscription id(@javax.annotation.Nullable String id) { this.id = id; return this; } - /** + /** * Unique ID of subscription as defined by Stripe * @return id - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "subscriptionID", value = "Unique ID of subscription as defined by Stripe") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nullable String id) { this.id = id; } - public Subscription ownerNamespaceUuid(String ownerNamespaceUuid) { - + public Subscription ownerNamespaceUuid(@javax.annotation.Nullable String ownerNamespaceUuid) { this.ownerNamespaceUuid = ownerNamespaceUuid; return this; } - /** + /** * Unique ID of the array (product) owner * @return ownerNamespaceUuid - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", value = "Unique ID of the array (product) owner") - public String getOwnerNamespaceUuid() { return ownerNamespaceUuid; } - - public void setOwnerNamespaceUuid(String ownerNamespaceUuid) { + public void setOwnerNamespaceUuid(@javax.annotation.Nullable String ownerNamespaceUuid) { this.ownerNamespaceUuid = ownerNamespaceUuid; } - public Subscription customerNamespaceUuid(String customerNamespaceUuid) { - + public Subscription customerNamespaceUuid(@javax.annotation.Nullable String customerNamespaceUuid) { this.customerNamespaceUuid = customerNamespaceUuid; return this; } - /** + /** * Unique ID of the array (product) user (customer) * @return customerNamespaceUuid - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", value = "Unique ID of the array (product) user (customer)") - public String getCustomerNamespaceUuid() { return customerNamespaceUuid; } - - public void setCustomerNamespaceUuid(String customerNamespaceUuid) { + public void setCustomerNamespaceUuid(@javax.annotation.Nullable String customerNamespaceUuid) { this.customerNamespaceUuid = customerNamespaceUuid; } - public Subscription pricing(List pricing) { - + public Subscription pricing(@javax.annotation.Nullable List pricing) { this.pricing = pricing; return this; } @@ -147,57 +146,19 @@ public Subscription addPricingItem(Pricing pricingItem) { return this; } - /** + /** * list of pricing used by this subscription * @return pricing - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "list of pricing used by this subscription") - public List getPricing() { return pricing; } - - public void setPricing(List pricing) { + public void setPricing(@javax.annotation.Nullable List pricing) { this.pricing = pricing; } - /** - * 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. - */ - public Subscription 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -212,13 +173,12 @@ public boolean equals(Object o) { return Objects.equals(this.id, subscription.id) && Objects.equals(this.ownerNamespaceUuid, subscription.ownerNamespaceUuid) && Objects.equals(this.customerNamespaceUuid, subscription.customerNamespaceUuid) && - Objects.equals(this.pricing, subscription.pricing)&& - Objects.equals(this.additionalProperties, subscription.additionalProperties); + Objects.equals(this.pricing, subscription.pricing); } @Override public int hashCode() { - return Objects.hash(id, ownerNamespaceUuid, customerNamespaceUuid, pricing, additionalProperties); + return Objects.hash(id, ownerNamespaceUuid, customerNamespaceUuid, pricing); } @Override @@ -229,7 +189,6 @@ public String toString() { sb.append(" ownerNamespaceUuid: ").append(toIndentedString(ownerNamespaceUuid)).append("\n"); sb.append(" customerNamespaceUuid: ").append(toIndentedString(customerNamespaceUuid)).append("\n"); sb.append(" pricing: ").append(toIndentedString(pricing)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -261,20 +220,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Subscription - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (Subscription.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 Subscription + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Subscription.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in Subscription is not found in the empty JSON string", Subscription.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Subscription.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Subscription` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !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())); } @@ -284,17 +250,19 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("customer_namespace_uuid") != null && !jsonObj.get("customer_namespace_uuid").isJsonNull()) && !jsonObj.get("customer_namespace_uuid").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `customer_namespace_uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customer_namespace_uuid").toString())); } - JsonArray jsonArraypricing = jsonObj.getAsJsonArray("pricing"); - if (jsonArraypricing != null) { - // ensure the json data is an array - if (!jsonObj.get("pricing").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `pricing` to be an array in the JSON string but got `%s`", jsonObj.get("pricing").toString())); + if (jsonObj.get("pricing") != null && !jsonObj.get("pricing").isJsonNull()) { + JsonArray jsonArraypricing = jsonObj.getAsJsonArray("pricing"); + if (jsonArraypricing != null) { + // ensure the json data is an array + if (!jsonObj.get("pricing").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `pricing` to be an array in the JSON string but got `%s`", jsonObj.get("pricing").toString())); + } + + // validate the optional field `pricing` (array) + for (int i = 0; i < jsonArraypricing.size(); i++) { + Pricing.validateJsonElement(jsonArraypricing.get(i)); + }; } - - // validate the optional field `pricing` (array) - for (int i = 0; i < jsonArraypricing.size(); i++) { - Pricing.validateJsonObject(jsonArraypricing.get(i).getAsJsonObject()); - }; } } @@ -313,71 +281,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, Subscription value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 Subscription read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - Subscription 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Subscription given an JSON string - * - * @param jsonString JSON string - * @return An instance of Subscription - * @throws IOException if the JSON string is invalid with respect to Subscription - */ + /** + * Create an instance of Subscription given an JSON string + * + * @param jsonString JSON string + * @return An instance of Subscription + * @throws IOException if the JSON string is invalid with respect to Subscription + */ public static Subscription fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Subscription.class); } - /** - * Convert an instance of Subscription to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Subscription to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/TGArrayNodeData.java b/src/main/java/io/tiledb/cloud/rest_api/model/TGArrayNodeData.java index 6a9eb9e..4993907 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/TGArrayNodeData.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/TGArrayNodeData.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,155 +11,120 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.TGQueryRanges; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * The details of an array that should be queried and provided as the input to a UDF Node. This is essentially a `UDFArrayDetails`, but you’re allowed to provide most of the values as Nodes if you want. */ -@ApiModel(description = "The details of an array that should be queried and provided as the input to a UDF Node. This is essentially a `UDFArrayDetails`, but you’re allowed to provide most of the values as Nodes if you want. ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class TGArrayNodeData { public static final String SERIALIZED_NAME_URI = "uri"; @SerializedName(SERIALIZED_NAME_URI) + @javax.annotation.Nullable private Object uri; public static final String SERIALIZED_NAME_RANGES = "ranges"; @SerializedName(SERIALIZED_NAME_RANGES) + @javax.annotation.Nullable private TGQueryRanges ranges; public static final String SERIALIZED_NAME_BUFFERS = "buffers"; @SerializedName(SERIALIZED_NAME_BUFFERS) + @javax.annotation.Nullable private Object buffers; public TGArrayNodeData() { } - public TGArrayNodeData uri(Object uri) { - + public TGArrayNodeData uri(@javax.annotation.Nullable Object uri) { this.uri = uri; return this; } - /** + /** * An argument provided to a node. This is one of a direct value (i.e., a raw JSON value) or a `TGSentinel`. For example this Python value: {\"a\": [1, \"pipe\", range(30), None], \"b\": b\"bytes\"} is encoded thusly (with included comments): { // A dictionary with string keys is JSON-encodable. \"a\": [ // As is a list. 1, \"pipe\", { // A `range` is replaced with its pickle. \"__tdbudf__\": \"immediate\", \"format\": \"python_pickle\", \"base64_data\": \"gASVIAAAAAAAAACMCGJ1aWx0aW5zlIwFcmFuZ2WUk5RLAEseSwGHlFKULg==\" }, null ], \"b\": { // Raw binary data is encoded into base64. \"__tdbudf__\": \"immediate\" \"format\": \"bytes\", \"base64_data\": \"Ynl0ZXM=\" } } * @return uri - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "An argument provided to a node. This is one of a direct value (i.e., a raw JSON value) or a `TGSentinel`. For example this Python value: {\"a\": [1, \"pipe\", range(30), None], \"b\": b\"bytes\"} is encoded thusly (with included comments): { // A dictionary with string keys is JSON-encodable. \"a\": [ // As is a list. 1, \"pipe\", { // A `range` is replaced with its pickle. \"__tdbudf__\": \"immediate\", \"format\": \"python_pickle\", \"base64_data\": \"gASVIAAAAAAAAACMCGJ1aWx0aW5zlIwFcmFuZ2WUk5RLAEseSwGHlFKULg==\" }, null ], \"b\": { // Raw binary data is encoded into base64. \"__tdbudf__\": \"immediate\" \"format\": \"bytes\", \"base64_data\": \"Ynl0ZXM=\" } } ") - public Object getUri() { return uri; } - - public void setUri(Object uri) { + public void setUri(@javax.annotation.Nullable Object uri) { this.uri = uri; } - public TGArrayNodeData ranges(TGQueryRanges ranges) { - + public TGArrayNodeData ranges(@javax.annotation.Nullable TGQueryRanges ranges) { this.ranges = ranges; return this; } - /** + /** * Get ranges * @return ranges - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public TGQueryRanges getRanges() { return ranges; } - - public void setRanges(TGQueryRanges ranges) { + public void setRanges(@javax.annotation.Nullable TGQueryRanges ranges) { this.ranges = ranges; } - public TGArrayNodeData buffers(Object buffers) { - + public TGArrayNodeData buffers(@javax.annotation.Nullable Object buffers) { this.buffers = buffers; return this; } - /** + /** * An argument provided to a node. This is one of a direct value (i.e., a raw JSON value) or a `TGSentinel`. For example this Python value: {\"a\": [1, \"pipe\", range(30), None], \"b\": b\"bytes\"} is encoded thusly (with included comments): { // A dictionary with string keys is JSON-encodable. \"a\": [ // As is a list. 1, \"pipe\", { // A `range` is replaced with its pickle. \"__tdbudf__\": \"immediate\", \"format\": \"python_pickle\", \"base64_data\": \"gASVIAAAAAAAAACMCGJ1aWx0aW5zlIwFcmFuZ2WUk5RLAEseSwGHlFKULg==\" }, null ], \"b\": { // Raw binary data is encoded into base64. \"__tdbudf__\": \"immediate\" \"format\": \"bytes\", \"base64_data\": \"Ynl0ZXM=\" } } * @return buffers - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "An argument provided to a node. This is one of a direct value (i.e., a raw JSON value) or a `TGSentinel`. For example this Python value: {\"a\": [1, \"pipe\", range(30), None], \"b\": b\"bytes\"} is encoded thusly (with included comments): { // A dictionary with string keys is JSON-encodable. \"a\": [ // As is a list. 1, \"pipe\", { // A `range` is replaced with its pickle. \"__tdbudf__\": \"immediate\", \"format\": \"python_pickle\", \"base64_data\": \"gASVIAAAAAAAAACMCGJ1aWx0aW5zlIwFcmFuZ2WUk5RLAEseSwGHlFKULg==\" }, null ], \"b\": { // Raw binary data is encoded into base64. \"__tdbudf__\": \"immediate\" \"format\": \"bytes\", \"base64_data\": \"Ynl0ZXM=\" } } ") - public Object getBuffers() { return buffers; } - - public void setBuffers(Object buffers) { + public void setBuffers(@javax.annotation.Nullable Object buffers) { this.buffers = buffers; } - /** - * 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. - */ - public TGArrayNodeData 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -173,13 +138,12 @@ public boolean equals(Object o) { TGArrayNodeData tgArrayNodeData = (TGArrayNodeData) o; return Objects.equals(this.uri, tgArrayNodeData.uri) && Objects.equals(this.ranges, tgArrayNodeData.ranges) && - Objects.equals(this.buffers, tgArrayNodeData.buffers)&& - Objects.equals(this.additionalProperties, tgArrayNodeData.additionalProperties); + Objects.equals(this.buffers, tgArrayNodeData.buffers); } @Override public int hashCode() { - return Objects.hash(uri, ranges, buffers, additionalProperties); + return Objects.hash(uri, ranges, buffers); } @Override @@ -189,7 +153,6 @@ public String toString() { sb.append(" uri: ").append(toIndentedString(uri)).append("\n"); sb.append(" ranges: ").append(toIndentedString(ranges)).append("\n"); sb.append(" buffers: ").append(toIndentedString(buffers)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -220,23 +183,30 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TGArrayNodeData - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (TGArrayNodeData.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 TGArrayNodeData + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TGArrayNodeData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in TGArrayNodeData is not found in the empty JSON string", TGArrayNodeData.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TGArrayNodeData.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TGArrayNodeData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `ranges` if (jsonObj.get("ranges") != null && !jsonObj.get("ranges").isJsonNull()) { - TGQueryRanges.validateJsonObject(jsonObj.getAsJsonObject("ranges")); + TGQueryRanges.validateJsonElement(jsonObj.get("ranges")); } } @@ -255,71 +225,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, TGArrayNodeData value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 TGArrayNodeData read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - TGArrayNodeData 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of TGArrayNodeData given an JSON string - * - * @param jsonString JSON string - * @return An instance of TGArrayNodeData - * @throws IOException if the JSON string is invalid with respect to TGArrayNodeData - */ + /** + * Create an instance of TGArrayNodeData given an JSON string + * + * @param jsonString JSON string + * @return An instance of TGArrayNodeData + * @throws IOException if the JSON string is invalid with respect to TGArrayNodeData + */ public static TGArrayNodeData fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TGArrayNodeData.class); } - /** - * Convert an instance of TGArrayNodeData to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TGArrayNodeData to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/TGInputNodeData.java b/src/main/java/io/tiledb/cloud/rest_api/model/TGInputNodeData.java index 73c28c4..d9d3174 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/TGInputNodeData.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/TGInputNodeData.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,129 +11,96 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Specifies that a node is an “input value”, allowing for parameterized task graphs. An input node may not depend upon any other nodes. */ -@ApiModel(description = "Specifies that a node is an “input value”, allowing for parameterized task graphs. An input node may not depend upon any other nodes. ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class TGInputNodeData { public static final String SERIALIZED_NAME_DEFAULT_VALUE = "default_value"; @SerializedName(SERIALIZED_NAME_DEFAULT_VALUE) + @javax.annotation.Nullable private Object defaultValue; public static final String SERIALIZED_NAME_DATATYPE = "datatype"; @SerializedName(SERIALIZED_NAME_DATATYPE) + @javax.annotation.Nullable private String datatype; public TGInputNodeData() { } - public TGInputNodeData defaultValue(Object defaultValue) { - + public TGInputNodeData defaultValue(@javax.annotation.Nullable Object defaultValue) { this.defaultValue = defaultValue; return this; } - /** + /** * An argument provided to a node. This is one of a direct value (i.e., a raw JSON value) or a `TGSentinel`. For example this Python value: {\"a\": [1, \"pipe\", range(30), None], \"b\": b\"bytes\"} is encoded thusly (with included comments): { // A dictionary with string keys is JSON-encodable. \"a\": [ // As is a list. 1, \"pipe\", { // A `range` is replaced with its pickle. \"__tdbudf__\": \"immediate\", \"format\": \"python_pickle\", \"base64_data\": \"gASVIAAAAAAAAACMCGJ1aWx0aW5zlIwFcmFuZ2WUk5RLAEseSwGHlFKULg==\" }, null ], \"b\": { // Raw binary data is encoded into base64. \"__tdbudf__\": \"immediate\" \"format\": \"bytes\", \"base64_data\": \"Ynl0ZXM=\" } } * @return defaultValue - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "An argument provided to a node. This is one of a direct value (i.e., a raw JSON value) or a `TGSentinel`. For example this Python value: {\"a\": [1, \"pipe\", range(30), None], \"b\": b\"bytes\"} is encoded thusly (with included comments): { // A dictionary with string keys is JSON-encodable. \"a\": [ // As is a list. 1, \"pipe\", { // A `range` is replaced with its pickle. \"__tdbudf__\": \"immediate\", \"format\": \"python_pickle\", \"base64_data\": \"gASVIAAAAAAAAACMCGJ1aWx0aW5zlIwFcmFuZ2WUk5RLAEseSwGHlFKULg==\" }, null ], \"b\": { // Raw binary data is encoded into base64. \"__tdbudf__\": \"immediate\" \"format\": \"bytes\", \"base64_data\": \"Ynl0ZXM=\" } } ") - public Object getDefaultValue() { return defaultValue; } - - public void setDefaultValue(Object defaultValue) { + public void setDefaultValue(@javax.annotation.Nullable Object defaultValue) { this.defaultValue = defaultValue; } - public TGInputNodeData datatype(String datatype) { - + public TGInputNodeData datatype(@javax.annotation.Nullable String datatype) { this.datatype = datatype; return this; } - /** + /** * An annotation of what datatype this node is supposed to be. Conventionally, this is a Python-format type annotation, but it’s purely for documentation purposes and not validated. * @return datatype - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "An annotation of what datatype this node is supposed to be. Conventionally, this is a Python-format type annotation, but it’s purely for documentation purposes and not validated. ") - public String getDatatype() { return datatype; } - - public void setDatatype(String datatype) { + public void setDatatype(@javax.annotation.Nullable String datatype) { this.datatype = datatype; } - /** - * 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. - */ - public TGInputNodeData 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -146,8 +113,7 @@ public boolean equals(Object o) { } TGInputNodeData tgInputNodeData = (TGInputNodeData) o; return Objects.equals(this.defaultValue, tgInputNodeData.defaultValue) && - Objects.equals(this.datatype, tgInputNodeData.datatype)&& - Objects.equals(this.additionalProperties, tgInputNodeData.additionalProperties); + Objects.equals(this.datatype, tgInputNodeData.datatype); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -156,7 +122,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(defaultValue, datatype, additionalProperties); + return Objects.hash(defaultValue, datatype); } private static int hashCodeNullable(JsonNullable a) { @@ -172,7 +138,6 @@ public String toString() { sb.append("class TGInputNodeData {\n"); sb.append(" defaultValue: ").append(toIndentedString(defaultValue)).append("\n"); sb.append(" datatype: ").append(toIndentedString(datatype)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -202,20 +167,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TGInputNodeData - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (TGInputNodeData.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 TGInputNodeData + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TGInputNodeData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in TGInputNodeData is not found in the empty JSON string", TGInputNodeData.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TGInputNodeData.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TGInputNodeData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("datatype") != null && !jsonObj.get("datatype").isJsonNull()) && !jsonObj.get("datatype").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `datatype` to be a primitive type in the JSON string but got `%s`", jsonObj.get("datatype").toString())); } @@ -236,71 +208,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, TGInputNodeData value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 TGInputNodeData read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - TGInputNodeData 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of TGInputNodeData given an JSON string - * - * @param jsonString JSON string - * @return An instance of TGInputNodeData - * @throws IOException if the JSON string is invalid with respect to TGInputNodeData - */ + /** + * Create an instance of TGInputNodeData given an JSON string + * + * @param jsonString JSON string + * @return An instance of TGInputNodeData + * @throws IOException if the JSON string is invalid with respect to TGInputNodeData + */ public static TGInputNodeData fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TGInputNodeData.class); } - /** - * Convert an instance of TGInputNodeData to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TGInputNodeData to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/TGQueryRanges.java b/src/main/java/io/tiledb/cloud/rest_api/model/TGQueryRanges.java index 3738a69..2f66cae 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/TGQueryRanges.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/TGQueryRanges.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,154 +11,120 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.Layout; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Parameterizable version of `QueryRanges`. */ -@ApiModel(description = "Parameterizable version of `QueryRanges`.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class TGQueryRanges { public static final String SERIALIZED_NAME_LAYOUT = "layout"; @SerializedName(SERIALIZED_NAME_LAYOUT) + @javax.annotation.Nullable private Layout layout; public static final String SERIALIZED_NAME_FRIENDLY_RANGES = "friendly_ranges"; @SerializedName(SERIALIZED_NAME_FRIENDLY_RANGES) + @javax.annotation.Nullable private Object friendlyRanges; public static final String SERIALIZED_NAME_RANGES = "ranges"; @SerializedName(SERIALIZED_NAME_RANGES) + @javax.annotation.Nullable private Object ranges; public TGQueryRanges() { } - public TGQueryRanges layout(Layout layout) { - + public TGQueryRanges layout(@javax.annotation.Nullable Layout layout) { this.layout = layout; return this; } - /** + /** * Get layout * @return layout - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Layout getLayout() { return layout; } - - public void setLayout(Layout layout) { + public void setLayout(@javax.annotation.Nullable Layout layout) { this.layout = layout; } - public TGQueryRanges friendlyRanges(Object friendlyRanges) { - + public TGQueryRanges friendlyRanges(@javax.annotation.Nullable Object friendlyRanges) { this.friendlyRanges = friendlyRanges; return this; } - /** + /** * An argument provided to a node. This is one of a direct value (i.e., a raw JSON value) or a `TGSentinel`. For example this Python value: {\"a\": [1, \"pipe\", range(30), None], \"b\": b\"bytes\"} is encoded thusly (with included comments): { // A dictionary with string keys is JSON-encodable. \"a\": [ // As is a list. 1, \"pipe\", { // A `range` is replaced with its pickle. \"__tdbudf__\": \"immediate\", \"format\": \"python_pickle\", \"base64_data\": \"gASVIAAAAAAAAACMCGJ1aWx0aW5zlIwFcmFuZ2WUk5RLAEseSwGHlFKULg==\" }, null ], \"b\": { // Raw binary data is encoded into base64. \"__tdbudf__\": \"immediate\" \"format\": \"bytes\", \"base64_data\": \"Ynl0ZXM=\" } } * @return friendlyRanges - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "An argument provided to a node. This is one of a direct value (i.e., a raw JSON value) or a `TGSentinel`. For example this Python value: {\"a\": [1, \"pipe\", range(30), None], \"b\": b\"bytes\"} is encoded thusly (with included comments): { // A dictionary with string keys is JSON-encodable. \"a\": [ // As is a list. 1, \"pipe\", { // A `range` is replaced with its pickle. \"__tdbudf__\": \"immediate\", \"format\": \"python_pickle\", \"base64_data\": \"gASVIAAAAAAAAACMCGJ1aWx0aW5zlIwFcmFuZ2WUk5RLAEseSwGHlFKULg==\" }, null ], \"b\": { // Raw binary data is encoded into base64. \"__tdbudf__\": \"immediate\" \"format\": \"bytes\", \"base64_data\": \"Ynl0ZXM=\" } } ") - public Object getFriendlyRanges() { return friendlyRanges; } - - public void setFriendlyRanges(Object friendlyRanges) { + public void setFriendlyRanges(@javax.annotation.Nullable Object friendlyRanges) { this.friendlyRanges = friendlyRanges; } - public TGQueryRanges ranges(Object ranges) { - + public TGQueryRanges ranges(@javax.annotation.Nullable Object ranges) { this.ranges = ranges; return this; } - /** + /** * An argument provided to a node. This is one of a direct value (i.e., a raw JSON value) or a `TGSentinel`. For example this Python value: {\"a\": [1, \"pipe\", range(30), None], \"b\": b\"bytes\"} is encoded thusly (with included comments): { // A dictionary with string keys is JSON-encodable. \"a\": [ // As is a list. 1, \"pipe\", { // A `range` is replaced with its pickle. \"__tdbudf__\": \"immediate\", \"format\": \"python_pickle\", \"base64_data\": \"gASVIAAAAAAAAACMCGJ1aWx0aW5zlIwFcmFuZ2WUk5RLAEseSwGHlFKULg==\" }, null ], \"b\": { // Raw binary data is encoded into base64. \"__tdbudf__\": \"immediate\" \"format\": \"bytes\", \"base64_data\": \"Ynl0ZXM=\" } } * @return ranges - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "An argument provided to a node. This is one of a direct value (i.e., a raw JSON value) or a `TGSentinel`. For example this Python value: {\"a\": [1, \"pipe\", range(30), None], \"b\": b\"bytes\"} is encoded thusly (with included comments): { // A dictionary with string keys is JSON-encodable. \"a\": [ // As is a list. 1, \"pipe\", { // A `range` is replaced with its pickle. \"__tdbudf__\": \"immediate\", \"format\": \"python_pickle\", \"base64_data\": \"gASVIAAAAAAAAACMCGJ1aWx0aW5zlIwFcmFuZ2WUk5RLAEseSwGHlFKULg==\" }, null ], \"b\": { // Raw binary data is encoded into base64. \"__tdbudf__\": \"immediate\" \"format\": \"bytes\", \"base64_data\": \"Ynl0ZXM=\" } } ") - public Object getRanges() { return ranges; } - - public void setRanges(Object ranges) { + public void setRanges(@javax.annotation.Nullable Object ranges) { this.ranges = ranges; } - /** - * 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. - */ - public TGQueryRanges 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -172,13 +138,12 @@ public boolean equals(Object o) { TGQueryRanges tgQueryRanges = (TGQueryRanges) o; return Objects.equals(this.layout, tgQueryRanges.layout) && Objects.equals(this.friendlyRanges, tgQueryRanges.friendlyRanges) && - Objects.equals(this.ranges, tgQueryRanges.ranges)&& - Objects.equals(this.additionalProperties, tgQueryRanges.additionalProperties); + Objects.equals(this.ranges, tgQueryRanges.ranges); } @Override public int hashCode() { - return Objects.hash(layout, friendlyRanges, ranges, additionalProperties); + return Objects.hash(layout, friendlyRanges, ranges); } @Override @@ -188,7 +153,6 @@ public String toString() { sb.append(" layout: ").append(toIndentedString(layout)).append("\n"); sb.append(" friendlyRanges: ").append(toIndentedString(friendlyRanges)).append("\n"); sb.append(" ranges: ").append(toIndentedString(ranges)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -219,20 +183,31 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TGQueryRanges - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (TGQueryRanges.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 TGQueryRanges + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TGQueryRanges.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in TGQueryRanges is not found in the empty JSON string", TGQueryRanges.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TGQueryRanges.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TGQueryRanges` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `layout` + if (jsonObj.get("layout") != null && !jsonObj.get("layout").isJsonNull()) { + Layout.validateJsonElement(jsonObj.get("layout")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -250,71 +225,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, TGQueryRanges value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 TGQueryRanges read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - TGQueryRanges 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of TGQueryRanges given an JSON string - * - * @param jsonString JSON string - * @return An instance of TGQueryRanges - * @throws IOException if the JSON string is invalid with respect to TGQueryRanges - */ + /** + * Create an instance of TGQueryRanges given an JSON string + * + * @param jsonString JSON string + * @return An instance of TGQueryRanges + * @throws IOException if the JSON string is invalid with respect to TGQueryRanges + */ public static TGQueryRanges fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TGQueryRanges.class); } - /** - * Convert an instance of TGQueryRanges to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TGQueryRanges to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/TGSQLNodeData.java b/src/main/java/io/tiledb/cloud/rest_api/model/TGSQLNodeData.java index 0c100b0..a4831d2 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/TGSQLNodeData.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/TGSQLNodeData.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,65 +11,78 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; - -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.model.ResultFormat; import org.openapitools.jackson.nullable.JsonNullable; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; /** * A node specifying an SQL query to execute in TileDB Cloud. */ -@ApiModel(description = "A node specifying an SQL query to execute in TileDB Cloud. ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class TGSQLNodeData { public static final String SERIALIZED_NAME_INIT_COMMANDS = "init_commands"; @SerializedName(SERIALIZED_NAME_INIT_COMMANDS) - private List initCommands = null; + @javax.annotation.Nullable + private List initCommands = new ArrayList<>(); public static final String SERIALIZED_NAME_QUERY = "query"; @SerializedName(SERIALIZED_NAME_QUERY) + @javax.annotation.Nullable private String query; public static final String SERIALIZED_NAME_PARAMETERS = "parameters"; @SerializedName(SERIALIZED_NAME_PARAMETERS) - private List parameters = null; + @javax.annotation.Nullable + private List parameters = new ArrayList<>(); public static final String SERIALIZED_NAME_RESULT_FORMAT = "result_format"; @SerializedName(SERIALIZED_NAME_RESULT_FORMAT) + @javax.annotation.Nullable private ResultFormat resultFormat; public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; @SerializedName(SERIALIZED_NAME_NAMESPACE) + @javax.annotation.Nullable private String namespace; public TGSQLNodeData() { } - public TGSQLNodeData initCommands(List initCommands) { - + public TGSQLNodeData initCommands(@javax.annotation.Nullable List initCommands) { this.initCommands = initCommands; return this; } @@ -82,48 +95,40 @@ public TGSQLNodeData addInitCommandsItem(String initCommandsItem) { return this; } - /** + /** * The commands to execute before running the query itself. * @return initCommands - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The commands to execute before running the query itself.") - public List getInitCommands() { return initCommands; } - - public void setInitCommands(List initCommands) { + public void setInitCommands(@javax.annotation.Nullable List initCommands) { this.initCommands = initCommands; } - public TGSQLNodeData query(String query) { - + public TGSQLNodeData query(@javax.annotation.Nullable String query) { this.query = query; return this; } - /** + /** * The text of the SQL query to execute. Parameters are substituted in for `?`s, just as in a regular MariaDB query. * @return query - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The text of the SQL query to execute. Parameters are substituted in for `?`s, just as in a regular MariaDB query. ") - public String getQuery() { return query; } - - public void setQuery(String query) { + public void setQuery(@javax.annotation.Nullable String query) { this.query = query; } - public TGSQLNodeData parameters(List parameters) { - + public TGSQLNodeData parameters(@javax.annotation.Nullable List parameters) { this.parameters = parameters; return this; } @@ -136,103 +141,57 @@ public TGSQLNodeData addParametersItem(Object parametersItem) { return this; } - /** + /** * The parameters to substitute in for arguments in the `query`. Fixed-length. Arguments must be in JSON format. * @return parameters - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The parameters to substitute in for arguments in the `query`. Fixed-length. Arguments must be in JSON format. ") - public List getParameters() { return parameters; } - - public void setParameters(List parameters) { + public void setParameters(@javax.annotation.Nullable List parameters) { this.parameters = parameters; } - public TGSQLNodeData resultFormat(ResultFormat resultFormat) { - + public TGSQLNodeData resultFormat(@javax.annotation.Nullable ResultFormat resultFormat) { this.resultFormat = resultFormat; return this; } - /** + /** * Get resultFormat * @return resultFormat - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public ResultFormat getResultFormat() { return resultFormat; } - - public void setResultFormat(ResultFormat resultFormat) { + public void setResultFormat(@javax.annotation.Nullable ResultFormat resultFormat) { this.resultFormat = resultFormat; } - public TGSQLNodeData namespace(String namespace) { - + public TGSQLNodeData namespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; return this; } - /** + /** * If set, the non-default namespace to execute this SQL query under. * @return namespace - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "If set, the non-default namespace to execute this SQL query under. ") - public String getNamespace() { return namespace; } - - public void setNamespace(String namespace) { + public void setNamespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; } - /** - * 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. - */ - public TGSQLNodeData 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -248,8 +207,7 @@ public boolean equals(Object o) { Objects.equals(this.query, tgSQLNodeData.query) && Objects.equals(this.parameters, tgSQLNodeData.parameters) && Objects.equals(this.resultFormat, tgSQLNodeData.resultFormat) && - Objects.equals(this.namespace, tgSQLNodeData.namespace)&& - Objects.equals(this.additionalProperties, tgSQLNodeData.additionalProperties); + Objects.equals(this.namespace, tgSQLNodeData.namespace); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -258,7 +216,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(initCommands, query, parameters, resultFormat, namespace, additionalProperties); + return Objects.hash(initCommands, query, parameters, resultFormat, namespace); } private static int hashCodeNullable(JsonNullable a) { @@ -277,7 +235,6 @@ public String toString() { sb.append(" parameters: ").append(toIndentedString(parameters)).append("\n"); sb.append(" resultFormat: ").append(toIndentedString(resultFormat)).append("\n"); sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -310,31 +267,42 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TGSQLNodeData - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (TGSQLNodeData.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 TGSQLNodeData + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TGSQLNodeData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in TGSQLNodeData is not found in the empty JSON string", TGSQLNodeData.openapiRequiredFields.toString())); } } - // ensure the json data is an array - if ((jsonObj.get("init_commands") != null && !jsonObj.get("init_commands").isJsonNull()) && !jsonObj.get("init_commands").isJsonArray()) { + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TGSQLNodeData.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TGSQLNodeData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("init_commands") != null && !jsonObj.get("init_commands").isJsonNull() && !jsonObj.get("init_commands").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `init_commands` to be an array in the JSON string but got `%s`", jsonObj.get("init_commands").toString())); } if ((jsonObj.get("query") != null && !jsonObj.get("query").isJsonNull()) && !jsonObj.get("query").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `query` to be a primitive type in the JSON string but got `%s`", jsonObj.get("query").toString())); } - // ensure the json data is an array - if ((jsonObj.get("parameters") != null && !jsonObj.get("parameters").isJsonNull()) && !jsonObj.get("parameters").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("parameters") != null && !jsonObj.get("parameters").isJsonNull() && !jsonObj.get("parameters").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `parameters` to be an array in the JSON string but got `%s`", jsonObj.get("parameters").toString())); } + // validate the optional field `result_format` + if (jsonObj.get("result_format") != null && !jsonObj.get("result_format").isJsonNull()) { + ResultFormat.validateJsonElement(jsonObj.get("result_format")); + } if ((jsonObj.get("namespace") != null && !jsonObj.get("namespace").isJsonNull()) && !jsonObj.get("namespace").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `namespace` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespace").toString())); } @@ -355,71 +323,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, TGSQLNodeData value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 TGSQLNodeData read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - TGSQLNodeData 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of TGSQLNodeData given an JSON string - * - * @param jsonString JSON string - * @return An instance of TGSQLNodeData - * @throws IOException if the JSON string is invalid with respect to TGSQLNodeData - */ + /** + * Create an instance of TGSQLNodeData given an JSON string + * + * @param jsonString JSON string + * @return An instance of TGSQLNodeData + * @throws IOException if the JSON string is invalid with respect to TGSQLNodeData + */ public static TGSQLNodeData fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TGSQLNodeData.class); } - /** - * Convert an instance of TGSQLNodeData to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TGSQLNodeData to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/TGUDFArgument.java b/src/main/java/io/tiledb/cloud/rest_api/model/TGUDFArgument.java index 5ee6ce5..88b9721 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/TGUDFArgument.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/TGUDFArgument.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,129 +11,96 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; - -import io.tiledb.cloud.rest_api.JSON; +import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; /** * A single argument to a UDF. This may represent a positional argument or a named argument, depending upon whether `name` is set. */ -@ApiModel(description = "A single argument to a UDF. This may represent a positional argument or a named argument, depending upon whether `name` is set. ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class TGUDFArgument { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nullable private Object value; public TGUDFArgument() { } - public TGUDFArgument name(String name) { - + public TGUDFArgument name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * The name of the argument, if present. * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The name of the argument, if present.") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public TGUDFArgument value(Object value) { - + public TGUDFArgument value(@javax.annotation.Nullable Object value) { this.value = value; return this; } - /** + /** * An argument provided to a node. This is one of a direct value (i.e., a raw JSON value) or a `TGSentinel`. For example this Python value: {\"a\": [1, \"pipe\", range(30), None], \"b\": b\"bytes\"} is encoded thusly (with included comments): { // A dictionary with string keys is JSON-encodable. \"a\": [ // As is a list. 1, \"pipe\", { // A `range` is replaced with its pickle. \"__tdbudf__\": \"immediate\", \"format\": \"python_pickle\", \"base64_data\": \"gASVIAAAAAAAAACMCGJ1aWx0aW5zlIwFcmFuZ2WUk5RLAEseSwGHlFKULg==\" }, null ], \"b\": { // Raw binary data is encoded into base64. \"__tdbudf__\": \"immediate\" \"format\": \"bytes\", \"base64_data\": \"Ynl0ZXM=\" } } * @return value - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "An argument provided to a node. This is one of a direct value (i.e., a raw JSON value) or a `TGSentinel`. For example this Python value: {\"a\": [1, \"pipe\", range(30), None], \"b\": b\"bytes\"} is encoded thusly (with included comments): { // A dictionary with string keys is JSON-encodable. \"a\": [ // As is a list. 1, \"pipe\", { // A `range` is replaced with its pickle. \"__tdbudf__\": \"immediate\", \"format\": \"python_pickle\", \"base64_data\": \"gASVIAAAAAAAAACMCGJ1aWx0aW5zlIwFcmFuZ2WUk5RLAEseSwGHlFKULg==\" }, null ], \"b\": { // Raw binary data is encoded into base64. \"__tdbudf__\": \"immediate\" \"format\": \"bytes\", \"base64_data\": \"Ynl0ZXM=\" } } ") - public Object getValue() { return value; } - - public void setValue(Object value) { + public void setValue(@javax.annotation.Nullable Object 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. - */ - public TGUDFArgument 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -146,8 +113,7 @@ public boolean equals(Object o) { } TGUDFArgument tgUDFArgument = (TGUDFArgument) o; return Objects.equals(this.name, tgUDFArgument.name) && - Objects.equals(this.value, tgUDFArgument.value)&& - Objects.equals(this.additionalProperties, tgUDFArgument.additionalProperties); + Objects.equals(this.value, tgUDFArgument.value); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -156,7 +122,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(name, value, additionalProperties); + return Objects.hash(name, value); } private static int hashCodeNullable(JsonNullable a) { @@ -172,7 +138,6 @@ public String toString() { sb.append("class TGUDFArgument {\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(); } @@ -202,20 +167,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TGUDFArgument - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (TGUDFArgument.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 TGUDFArgument + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TGUDFArgument.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in TGUDFArgument is not found in the empty JSON string", TGUDFArgument.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TGUDFArgument.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TGUDFArgument` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !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())); } @@ -236,71 +208,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, TGUDFArgument value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 TGUDFArgument read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - TGUDFArgument 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of TGUDFArgument given an JSON string - * - * @param jsonString JSON string - * @return An instance of TGUDFArgument - * @throws IOException if the JSON string is invalid with respect to TGUDFArgument - */ + /** + * Create an instance of TGUDFArgument given an JSON string + * + * @param jsonString JSON string + * @return An instance of TGUDFArgument + * @throws IOException if the JSON string is invalid with respect to TGUDFArgument + */ public static TGUDFArgument fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TGUDFArgument.class); } - /** - * Convert an instance of TGUDFArgument to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TGUDFArgument to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/TGUDFEnvironment.java b/src/main/java/io/tiledb/cloud/rest_api/model/TGUDFEnvironment.java index 7b0a305..449127c 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/TGUDFEnvironment.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/TGUDFEnvironment.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,319 +11,267 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; - -import io.tiledb.cloud.rest_api.JSON; +import java.util.Arrays; +import org.openapitools.client.model.TGUDFEnvironmentResources; +import org.openapitools.client.model.UDFLanguage; import org.openapitools.jackson.nullable.JsonNullable; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; /** * Metadata about the environment where we want to execute a UDF. */ -@ApiModel(description = "Metadata about the environment where we want to execute a UDF.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class TGUDFEnvironment { public static final String SERIALIZED_NAME_LANGUAGE = "language"; @SerializedName(SERIALIZED_NAME_LANGUAGE) + @javax.annotation.Nullable private UDFLanguage language; public static final String SERIALIZED_NAME_LANGUAGE_VERSION = "language_version"; @SerializedName(SERIALIZED_NAME_LANGUAGE_VERSION) + @javax.annotation.Nullable private String languageVersion; public static final String SERIALIZED_NAME_IMAGE_NAME = "image_name"; @SerializedName(SERIALIZED_NAME_IMAGE_NAME) + @javax.annotation.Nullable private String imageName; public static final String SERIALIZED_NAME_ACCESS_CREDENTIALS_NAME = "access_credentials_name"; @SerializedName(SERIALIZED_NAME_ACCESS_CREDENTIALS_NAME) + @javax.annotation.Nullable private String accessCredentialsName; public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; @SerializedName(SERIALIZED_NAME_NAMESPACE) + @javax.annotation.Nullable private String namespace; public static final String SERIALIZED_NAME_RESOURCE_CLASS = "resource_class"; @SerializedName(SERIALIZED_NAME_RESOURCE_CLASS) + @javax.annotation.Nullable private String resourceClass; public static final String SERIALIZED_NAME_RESOURCES = "resources"; @SerializedName(SERIALIZED_NAME_RESOURCES) + @javax.annotation.Nullable private TGUDFEnvironmentResources resources; public static final String SERIALIZED_NAME_RUN_CLIENT_SIDE = "run_client_side"; @SerializedName(SERIALIZED_NAME_RUN_CLIENT_SIDE) + @javax.annotation.Nullable private Boolean runClientSide; public static final String SERIALIZED_NAME_TIMEOUT = "timeout"; @SerializedName(SERIALIZED_NAME_TIMEOUT) + @javax.annotation.Nullable private BigDecimal timeout; public TGUDFEnvironment() { } - public TGUDFEnvironment language(UDFLanguage language) { - + public TGUDFEnvironment language(@javax.annotation.Nullable UDFLanguage language) { this.language = language; return this; } - /** + /** * Get language * @return language - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public UDFLanguage getLanguage() { return language; } - - public void setLanguage(UDFLanguage language) { + public void setLanguage(@javax.annotation.Nullable UDFLanguage language) { this.language = language; } - public TGUDFEnvironment languageVersion(String languageVersion) { - + public TGUDFEnvironment languageVersion(@javax.annotation.Nullable String languageVersion) { this.languageVersion = languageVersion; return this; } - /** + /** * The language version used to execute this UDF. Neither this nor `language` needs to be set for registered UDFs, since the language and version are stored server-side with the UDF itself. * @return languageVersion - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The language version used to execute this UDF. Neither this nor `language` needs to be set for registered UDFs, since the language and version are stored server-side with the UDF itself. ") - public String getLanguageVersion() { return languageVersion; } - - public void setLanguageVersion(String languageVersion) { + public void setLanguageVersion(@javax.annotation.Nullable String languageVersion) { this.languageVersion = languageVersion; } - public TGUDFEnvironment imageName(String imageName) { - + public TGUDFEnvironment imageName(@javax.annotation.Nullable String imageName) { this.imageName = imageName; return this; } - /** + /** * The name of the image to use for the execution environment. * @return imageName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The name of the image to use for the execution environment. ") - public String getImageName() { return imageName; } - - public void setImageName(String imageName) { + public void setImageName(@javax.annotation.Nullable String imageName) { this.imageName = imageName; } - public TGUDFEnvironment accessCredentialsName(String accessCredentialsName) { - + public TGUDFEnvironment accessCredentialsName(@javax.annotation.Nullable String accessCredentialsName) { this.accessCredentialsName = accessCredentialsName; return this; } - /** + /** * The name of the access credentials to use. if unset, no credentials will be configured in the environment. * @return accessCredentialsName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The name of the access credentials to use. if unset, no credentials will be configured in the environment. ") - public String getAccessCredentialsName() { return accessCredentialsName; } - - public void setAccessCredentialsName(String accessCredentialsName) { + public void setAccessCredentialsName(@javax.annotation.Nullable String accessCredentialsName) { this.accessCredentialsName = accessCredentialsName; } - public TGUDFEnvironment namespace(String namespace) { - + public TGUDFEnvironment namespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; return this; } - /** + /** * If set, the non-default namespace to execute this UDF under (and to query any Array Nodes that are used as inputs to this UDF). * @return namespace - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "If set, the non-default namespace to execute this UDF under (and to query any Array Nodes that are used as inputs to this UDF). ") - public String getNamespace() { return namespace; } - - public void setNamespace(String namespace) { + public void setNamespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; } - public TGUDFEnvironment resourceClass(String resourceClass) { - + public TGUDFEnvironment resourceClass(@javax.annotation.Nullable String resourceClass) { this.resourceClass = resourceClass; return this; } - /** + /** * The resource class to use for the UDF execution. Resource classes define resource limits for memory and CPUs. If this is empty, then the UDF will execute in the standard resource class of the TileDB Cloud provider. * @return resourceClass - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The resource class to use for the UDF execution. Resource classes define resource limits for memory and CPUs. If this is empty, then the UDF will execute in the standard resource class of the TileDB Cloud provider. ") - public String getResourceClass() { return resourceClass; } - - public void setResourceClass(String resourceClass) { + public void setResourceClass(@javax.annotation.Nullable String resourceClass) { this.resourceClass = resourceClass; } - public TGUDFEnvironment resources(TGUDFEnvironmentResources resources) { - + public TGUDFEnvironment resources(@javax.annotation.Nullable TGUDFEnvironmentResources resources) { this.resources = resources; return this; } - /** + /** * Get resources * @return resources - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public TGUDFEnvironmentResources getResources() { return resources; } - - public void setResources(TGUDFEnvironmentResources resources) { + public void setResources(@javax.annotation.Nullable TGUDFEnvironmentResources resources) { this.resources = resources; } - public TGUDFEnvironment runClientSide(Boolean runClientSide) { - + public TGUDFEnvironment runClientSide(@javax.annotation.Nullable Boolean runClientSide) { this.runClientSide = runClientSide; return this; } - /** + /** * A hint that, if possible, this function should be executed on the client side rather than on the server. Registered UDFs and functions which take arrays as inputs can never be executed client-side. If the client’s environment is incompatible, or the client does not support client-side execution, the function will be executed on the server. * @return runClientSide - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "A hint that, if possible, this function should be executed on the client side rather than on the server. Registered UDFs and functions which take arrays as inputs can never be executed client-side. If the client’s environment is incompatible, or the client does not support client-side execution, the function will be executed on the server. ") - public Boolean getRunClientSide() { return runClientSide; } - - public void setRunClientSide(Boolean runClientSide) { + public void setRunClientSide(@javax.annotation.Nullable Boolean runClientSide) { this.runClientSide = runClientSide; } - public TGUDFEnvironment timeout(BigDecimal timeout) { - + public TGUDFEnvironment timeout(@javax.annotation.Nullable BigDecimal timeout) { this.timeout = timeout; return this; } - /** + /** * The maximum length of time this UDF is allowed to execute for before it is killed and fails. If not present (or zero), the function is allowed to run indefinitely (subject to the server’s global limits). * @return timeout - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The maximum length of time this UDF is allowed to execute for before it is killed and fails. If not present (or zero), the function is allowed to run indefinitely (subject to the server’s global limits). ") - public BigDecimal getTimeout() { return timeout; } - - public void setTimeout(BigDecimal timeout) { + public void setTimeout(@javax.annotation.Nullable BigDecimal timeout) { this.timeout = timeout; } - /** - * 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. - */ - public TGUDFEnvironment 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -343,8 +291,7 @@ public boolean equals(Object o) { Objects.equals(this.resourceClass, tgUDFEnvironment.resourceClass) && Objects.equals(this.resources, tgUDFEnvironment.resources) && Objects.equals(this.runClientSide, tgUDFEnvironment.runClientSide) && - Objects.equals(this.timeout, tgUDFEnvironment.timeout)&& - Objects.equals(this.additionalProperties, tgUDFEnvironment.additionalProperties); + Objects.equals(this.timeout, tgUDFEnvironment.timeout); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -353,7 +300,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(language, languageVersion, imageName, accessCredentialsName, namespace, resourceClass, resources, runClientSide, timeout, additionalProperties); + return Objects.hash(language, languageVersion, imageName, accessCredentialsName, namespace, resourceClass, resources, runClientSide, timeout); } private static int hashCodeNullable(JsonNullable a) { @@ -376,7 +323,6 @@ public String toString() { sb.append(" resources: ").append(toIndentedString(resources)).append("\n"); sb.append(" runClientSide: ").append(toIndentedString(runClientSide)).append("\n"); sb.append(" timeout: ").append(toIndentedString(timeout)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -413,20 +359,31 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TGUDFEnvironment - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (TGUDFEnvironment.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 TGUDFEnvironment + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TGUDFEnvironment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in TGUDFEnvironment is not found in the empty JSON string", TGUDFEnvironment.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TGUDFEnvironment.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TGUDFEnvironment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `language` + if (jsonObj.get("language") != null && !jsonObj.get("language").isJsonNull()) { + UDFLanguage.validateJsonElement(jsonObj.get("language")); + } if ((jsonObj.get("language_version") != null && !jsonObj.get("language_version").isJsonNull()) && !jsonObj.get("language_version").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `language_version` to be a primitive type in the JSON string but got `%s`", jsonObj.get("language_version").toString())); } @@ -444,7 +401,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `resources` if (jsonObj.get("resources") != null && !jsonObj.get("resources").isJsonNull()) { - TGUDFEnvironmentResources.validateJsonObject(jsonObj.getAsJsonObject("resources")); + TGUDFEnvironmentResources.validateJsonElement(jsonObj.get("resources")); } } @@ -463,71 +420,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, TGUDFEnvironment value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 TGUDFEnvironment read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - TGUDFEnvironment 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of TGUDFEnvironment given an JSON string - * - * @param jsonString JSON string - * @return An instance of TGUDFEnvironment - * @throws IOException if the JSON string is invalid with respect to TGUDFEnvironment - */ + /** + * Create an instance of TGUDFEnvironment given an JSON string + * + * @param jsonString JSON string + * @return An instance of TGUDFEnvironment + * @throws IOException if the JSON string is invalid with respect to TGUDFEnvironment + */ public static TGUDFEnvironment fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TGUDFEnvironment.class); } - /** - * Convert an instance of TGUDFEnvironment to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TGUDFEnvironment to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/TGUDFEnvironmentResources.java b/src/main/java/io/tiledb/cloud/rest_api/model/TGUDFEnvironmentResources.java index 07233d7..f942dd0 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/TGUDFEnvironmentResources.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/TGUDFEnvironmentResources.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,155 +11,119 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** - * The resources requested for this particular node. If resources are not specified resource_class is used, if it is not set the standard resource // defaults are used + * The resources requested for this particular node. If resources are not specified resource_class is used, if it is not set the standard resource // defaults are used */ -@ApiModel(description = "The resources requested for this particular node. If resources are not specified resource_class is used, if it is not set the standard resource // defaults are used ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class TGUDFEnvironmentResources { public static final String SERIALIZED_NAME_CPU = "cpu"; @SerializedName(SERIALIZED_NAME_CPU) + @javax.annotation.Nullable private String cpu; public static final String SERIALIZED_NAME_MEMORY = "memory"; @SerializedName(SERIALIZED_NAME_MEMORY) + @javax.annotation.Nullable private String memory; public static final String SERIALIZED_NAME_GPU = "gpu"; @SerializedName(SERIALIZED_NAME_GPU) + @javax.annotation.Nullable private Integer gpu; public TGUDFEnvironmentResources() { } - public TGUDFEnvironmentResources cpu(String cpu) { - + public TGUDFEnvironmentResources cpu(@javax.annotation.Nullable String cpu) { this.cpu = cpu; return this; } - /** + /** * Get cpu * @return cpu - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "500m", value = "") - public String getCpu() { return cpu; } - - public void setCpu(String cpu) { + public void setCpu(@javax.annotation.Nullable String cpu) { this.cpu = cpu; } - public TGUDFEnvironmentResources memory(String memory) { - + public TGUDFEnvironmentResources memory(@javax.annotation.Nullable String memory) { this.memory = memory; return this; } - /** + /** * Get memory * @return memory - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "8Gi", value = "") - public String getMemory() { return memory; } - - public void setMemory(String memory) { + public void setMemory(@javax.annotation.Nullable String memory) { this.memory = memory; } - public TGUDFEnvironmentResources gpu(Integer gpu) { - + public TGUDFEnvironmentResources gpu(@javax.annotation.Nullable Integer gpu) { this.gpu = gpu; return this; } - /** + /** * Get gpu * @return gpu - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "1", value = "") - public Integer getGpu() { return gpu; } - - public void setGpu(Integer gpu) { + public void setGpu(@javax.annotation.Nullable Integer gpu) { this.gpu = gpu; } - /** - * 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. - */ - public TGUDFEnvironmentResources 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -173,13 +137,12 @@ public boolean equals(Object o) { TGUDFEnvironmentResources tgUDFEnvironmentResources = (TGUDFEnvironmentResources) o; return Objects.equals(this.cpu, tgUDFEnvironmentResources.cpu) && Objects.equals(this.memory, tgUDFEnvironmentResources.memory) && - Objects.equals(this.gpu, tgUDFEnvironmentResources.gpu)&& - Objects.equals(this.additionalProperties, tgUDFEnvironmentResources.additionalProperties); + Objects.equals(this.gpu, tgUDFEnvironmentResources.gpu); } @Override public int hashCode() { - return Objects.hash(cpu, memory, gpu, additionalProperties); + return Objects.hash(cpu, memory, gpu); } @Override @@ -189,7 +152,6 @@ public String toString() { sb.append(" cpu: ").append(toIndentedString(cpu)).append("\n"); sb.append(" memory: ").append(toIndentedString(memory)).append("\n"); sb.append(" gpu: ").append(toIndentedString(gpu)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -220,20 +182,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TGUDFEnvironmentResources - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (TGUDFEnvironmentResources.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 TGUDFEnvironmentResources + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TGUDFEnvironmentResources.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in TGUDFEnvironmentResources is not found in the empty JSON string", TGUDFEnvironmentResources.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TGUDFEnvironmentResources.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TGUDFEnvironmentResources` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("cpu") != null && !jsonObj.get("cpu").isJsonNull()) && !jsonObj.get("cpu").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `cpu` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cpu").toString())); } @@ -257,71 +226,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, TGUDFEnvironmentResources value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 TGUDFEnvironmentResources read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - TGUDFEnvironmentResources 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of TGUDFEnvironmentResources given an JSON string - * - * @param jsonString JSON string - * @return An instance of TGUDFEnvironmentResources - * @throws IOException if the JSON string is invalid with respect to TGUDFEnvironmentResources - */ + /** + * Create an instance of TGUDFEnvironmentResources given an JSON string + * + * @param jsonString JSON string + * @return An instance of TGUDFEnvironmentResources + * @throws IOException if the JSON string is invalid with respect to TGUDFEnvironmentResources + */ public static TGUDFEnvironmentResources fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TGUDFEnvironmentResources.class); } - /** - * Convert an instance of TGUDFEnvironmentResources to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TGUDFEnvironmentResources to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/TGUDFNodeData.java b/src/main/java/io/tiledb/cloud/rest_api/model/TGUDFNodeData.java index 983fb76..8185154 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/TGUDFNodeData.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/TGUDFNodeData.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,162 +11,161 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; - -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.model.ResultFormat; +import org.openapitools.client.model.TGUDFArgument; +import org.openapitools.client.model.TGUDFEnvironment; import org.openapitools.jackson.nullable.JsonNullable; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; /** * A node specifying the execution of a user-defined function. */ -@ApiModel(description = "A node specifying the execution of a user-defined function.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class TGUDFNodeData { public static final String SERIALIZED_NAME_REGISTERED_UDF_NAME = "registered_udf_name"; @SerializedName(SERIALIZED_NAME_REGISTERED_UDF_NAME) + @javax.annotation.Nullable private String registeredUdfName; public static final String SERIALIZED_NAME_EXECUTABLE_CODE = "executable_code"; @SerializedName(SERIALIZED_NAME_EXECUTABLE_CODE) + @javax.annotation.Nullable private String executableCode; public static final String SERIALIZED_NAME_SOURCE_TEXT = "source_text"; @SerializedName(SERIALIZED_NAME_SOURCE_TEXT) + @javax.annotation.Nullable private String sourceText; public static final String SERIALIZED_NAME_ENVIRONMENT = "environment"; @SerializedName(SERIALIZED_NAME_ENVIRONMENT) + @javax.annotation.Nullable private TGUDFEnvironment environment; public static final String SERIALIZED_NAME_ARGUMENTS = "arguments"; @SerializedName(SERIALIZED_NAME_ARGUMENTS) - private List arguments = null; + @javax.annotation.Nullable + private List arguments = new ArrayList<>(); public static final String SERIALIZED_NAME_RESULT_FORMAT = "result_format"; @SerializedName(SERIALIZED_NAME_RESULT_FORMAT) + @javax.annotation.Nullable private ResultFormat resultFormat; public TGUDFNodeData() { } - public TGUDFNodeData registeredUdfName(String registeredUdfName) { - + public TGUDFNodeData registeredUdfName(@javax.annotation.Nullable String registeredUdfName) { this.registeredUdfName = registeredUdfName; return this; } - /** + /** * If set, the name of the registered UDF to execute, in the format `namespace/name`. Either this or `executable_code` should be set, but not both. * @return registeredUdfName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "If set, the name of the registered UDF to execute, in the format `namespace/name`. Either this or `executable_code` should be set, but not both. ") - public String getRegisteredUdfName() { return registeredUdfName; } - - public void setRegisteredUdfName(String registeredUdfName) { + public void setRegisteredUdfName(@javax.annotation.Nullable String registeredUdfName) { this.registeredUdfName = registeredUdfName; } - public TGUDFNodeData executableCode(String executableCode) { - + public TGUDFNodeData executableCode(@javax.annotation.Nullable String executableCode) { this.executableCode = executableCode; return this; } - /** + /** * If set, the base64 serialization of the code for this step, encoded in a language-specific format (e.g. Pickle for Python, serialization for R). * @return executableCode - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "If set, the base64 serialization of the code for this step, encoded in a language-specific format (e.g. Pickle for Python, serialization for R). ") - public String getExecutableCode() { return executableCode; } - - public void setExecutableCode(String executableCode) { + public void setExecutableCode(@javax.annotation.Nullable String executableCode) { this.executableCode = executableCode; } - public TGUDFNodeData sourceText(String sourceText) { - + public TGUDFNodeData sourceText(@javax.annotation.Nullable String sourceText) { this.sourceText = sourceText; return this; } - /** + /** * Optionally, the source text for the code passed in `executable_code`. *For reference only; only the code in `executable_code` is actually executed.* This will be included in activity logs and may be useful for debugging. * @return sourceText - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Optionally, the source text for the code passed in `executable_code`. *For reference only; only the code in `executable_code` is actually executed.* This will be included in activity logs and may be useful for debugging. ") - public String getSourceText() { return sourceText; } - - public void setSourceText(String sourceText) { + public void setSourceText(@javax.annotation.Nullable String sourceText) { this.sourceText = sourceText; } - public TGUDFNodeData environment(TGUDFEnvironment environment) { - + public TGUDFNodeData environment(@javax.annotation.Nullable TGUDFEnvironment environment) { this.environment = environment; return this; } - /** + /** * Get environment * @return environment - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public TGUDFEnvironment getEnvironment() { return environment; } - - public void setEnvironment(TGUDFEnvironment environment) { + public void setEnvironment(@javax.annotation.Nullable TGUDFEnvironment environment) { this.environment = environment; } - public TGUDFNodeData arguments(List arguments) { - + public TGUDFNodeData arguments(@javax.annotation.Nullable List arguments) { this.arguments = arguments; return this; } @@ -179,80 +178,38 @@ public TGUDFNodeData addArgumentsItem(TGUDFArgument argumentsItem) { return this; } - /** + /** * The arguments to a UDF function. This encompasses both named and positional arguments. The format is designed to provide compatibility across languages like Python which have a fairly traditional split between positional arguments and named arguments, and languages like R which has a rather unique way of specifying arguments. For Python (and most other languages), all positional arguments will come before all named arguments (if any are present): // fn(arg1, arg2, arg3) [ {value: arg1}, {value: arg2}, {value: arg3}, ] // fn(arg1, arg2, n=kw1, a=kw2) [ {value: arg1}, {value: arg2}, {name: \"n\", value: kw1}, {name: \"a\", value: kw2}, ] // fn(kw=k1, only=k2) [ {name: \"kw\", value: k1}, {name: \"only\", value: k2}, ] However, in R, named and positional arguments may be intermixed freely: // fn(arg, n=kw1, arg2) [ {value: arg}, {name: \"n\", value: kw1}, {value: arg2}, ] * @return arguments - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The arguments to a UDF function. This encompasses both named and positional arguments. The format is designed to provide compatibility across languages like Python which have a fairly traditional split between positional arguments and named arguments, and languages like R which has a rather unique way of specifying arguments. For Python (and most other languages), all positional arguments will come before all named arguments (if any are present): // fn(arg1, arg2, arg3) [ {value: arg1}, {value: arg2}, {value: arg3}, ] // fn(arg1, arg2, n=kw1, a=kw2) [ {value: arg1}, {value: arg2}, {name: \"n\", value: kw1}, {name: \"a\", value: kw2}, ] // fn(kw=k1, only=k2) [ {name: \"kw\", value: k1}, {name: \"only\", value: k2}, ] However, in R, named and positional arguments may be intermixed freely: // fn(arg, n=kw1, arg2) [ {value: arg}, {name: \"n\", value: kw1}, {value: arg2}, ] ") - public List getArguments() { return arguments; } - - public void setArguments(List arguments) { + public void setArguments(@javax.annotation.Nullable List arguments) { this.arguments = arguments; } - public TGUDFNodeData resultFormat(ResultFormat resultFormat) { - + public TGUDFNodeData resultFormat(@javax.annotation.Nullable ResultFormat resultFormat) { this.resultFormat = resultFormat; return this; } - /** + /** * Get resultFormat * @return resultFormat - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public ResultFormat getResultFormat() { return resultFormat; } - - public void setResultFormat(ResultFormat resultFormat) { + public void setResultFormat(@javax.annotation.Nullable ResultFormat resultFormat) { this.resultFormat = resultFormat; } - /** - * 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. - */ - public TGUDFNodeData 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -269,8 +226,7 @@ public boolean equals(Object o) { Objects.equals(this.sourceText, tgUDFNodeData.sourceText) && Objects.equals(this.environment, tgUDFNodeData.environment) && Objects.equals(this.arguments, tgUDFNodeData.arguments) && - Objects.equals(this.resultFormat, tgUDFNodeData.resultFormat)&& - Objects.equals(this.additionalProperties, tgUDFNodeData.additionalProperties); + Objects.equals(this.resultFormat, tgUDFNodeData.resultFormat); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -279,7 +235,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(registeredUdfName, executableCode, sourceText, environment, arguments, resultFormat, additionalProperties); + return Objects.hash(registeredUdfName, executableCode, sourceText, environment, arguments, resultFormat); } private static int hashCodeNullable(JsonNullable a) { @@ -299,7 +255,6 @@ public String toString() { sb.append(" environment: ").append(toIndentedString(environment)).append("\n"); sb.append(" arguments: ").append(toIndentedString(arguments)).append("\n"); sb.append(" resultFormat: ").append(toIndentedString(resultFormat)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -333,20 +288,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TGUDFNodeData - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (TGUDFNodeData.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 TGUDFNodeData + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TGUDFNodeData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in TGUDFNodeData is not found in the empty JSON string", TGUDFNodeData.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TGUDFNodeData.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TGUDFNodeData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("registered_udf_name") != null && !jsonObj.get("registered_udf_name").isJsonNull()) && !jsonObj.get("registered_udf_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `registered_udf_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("registered_udf_name").toString())); } @@ -358,19 +320,25 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `environment` if (jsonObj.get("environment") != null && !jsonObj.get("environment").isJsonNull()) { - TGUDFEnvironment.validateJsonObject(jsonObj.getAsJsonObject("environment")); + TGUDFEnvironment.validateJsonElement(jsonObj.get("environment")); } - JsonArray jsonArrayarguments = jsonObj.getAsJsonArray("arguments"); - if (jsonArrayarguments != null) { - // ensure the json data is an array - if (!jsonObj.get("arguments").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `arguments` to be an array in the JSON string but got `%s`", jsonObj.get("arguments").toString())); + if (jsonObj.get("arguments") != null && !jsonObj.get("arguments").isJsonNull()) { + JsonArray jsonArrayarguments = jsonObj.getAsJsonArray("arguments"); + if (jsonArrayarguments != null) { + // ensure the json data is an array + if (!jsonObj.get("arguments").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `arguments` to be an array in the JSON string but got `%s`", jsonObj.get("arguments").toString())); + } + + // validate the optional field `arguments` (array) + for (int i = 0; i < jsonArrayarguments.size(); i++) { + TGUDFArgument.validateJsonElement(jsonArrayarguments.get(i)); + }; } - - // validate the optional field `arguments` (array) - for (int i = 0; i < jsonArrayarguments.size(); i++) { - TGUDFArgument.validateJsonObject(jsonArrayarguments.get(i).getAsJsonObject()); - }; + } + // validate the optional field `result_format` + if (jsonObj.get("result_format") != null && !jsonObj.get("result_format").isJsonNull()) { + ResultFormat.validateJsonElement(jsonObj.get("result_format")); } } @@ -389,71 +357,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, TGUDFNodeData value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 TGUDFNodeData read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - TGUDFNodeData 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of TGUDFNodeData given an JSON string - * - * @param jsonString JSON string - * @return An instance of TGUDFNodeData - * @throws IOException if the JSON string is invalid with respect to TGUDFNodeData - */ + /** + * Create an instance of TGUDFNodeData given an JSON string + * + * @param jsonString JSON string + * @return An instance of TGUDFNodeData + * @throws IOException if the JSON string is invalid with respect to TGUDFNodeData + */ public static TGUDFNodeData fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TGUDFNodeData.class); } - /** - * Convert an instance of TGUDFNodeData to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TGUDFNodeData to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraph.java b/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraph.java index c5241a1..be7f2c0 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraph.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraph.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,86 +11,105 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; - -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.model.RetryStrategy; +import org.openapitools.client.model.TaskGraphNode; +import org.openapitools.client.model.TaskGraphType; import org.openapitools.jackson.nullable.JsonNullable; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; /** * Information about a task graph. */ -@ApiModel(description = "Information about a task graph.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class TaskGraph { public static final String SERIALIZED_NAME_UUID = "uuid"; @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nullable private String uuid; public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; @SerializedName(SERIALIZED_NAME_NAMESPACE) + @javax.annotation.Nullable private String namespace; public static final String SERIALIZED_NAME_CREATED_BY = "created_by"; @SerializedName(SERIALIZED_NAME_CREATED_BY) + @javax.annotation.Nullable private String createdBy; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_NODES = "nodes"; @SerializedName(SERIALIZED_NAME_NODES) - private List nodes = null; + @javax.annotation.Nullable + private List nodes = new ArrayList<>(); public static final String SERIALIZED_NAME_PARALLELISM = "parallelism"; @SerializedName(SERIALIZED_NAME_PARALLELISM) + @javax.annotation.Nullable private Long parallelism; public static final String SERIALIZED_NAME_RETRY_STRATEGY = "retry_strategy"; @SerializedName(SERIALIZED_NAME_RETRY_STRATEGY) + @javax.annotation.Nullable private RetryStrategy retryStrategy; public static final String SERIALIZED_NAME_DEADLINE = "deadline"; @SerializedName(SERIALIZED_NAME_DEADLINE) + @javax.annotation.Nullable private Long deadline; public static final String SERIALIZED_NAME_TASK_GRAPH_TYPE = "task_graph_type"; @SerializedName(SERIALIZED_NAME_TASK_GRAPH_TYPE) + @javax.annotation.Nullable private TaskGraphType taskGraphType; public TaskGraph() { } - public TaskGraph( String uuid, String createdBy, @@ -102,96 +121,78 @@ public TaskGraph( this.createdAt = createdAt; } - /** + /** * The server-generated UUID of the task graph. * @return uuid - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The server-generated UUID of the task graph.") - public String getUuid() { return uuid; } - - public TaskGraph namespace(String namespace) { - + public TaskGraph namespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; return this; } - /** + /** * The namespace that owns this task graph. When creating a task graph log, this is used as the namespace to create the log in; thereafter it is read-only. * @return namespace - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The namespace that owns this task graph. When creating a task graph log, this is used as the namespace to create the log in; thereafter it is read-only. ") - public String getNamespace() { return namespace; } - - public void setNamespace(String namespace) { + public void setNamespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; } - /** + /** * The name of the user who created this task graph log. * @return createdBy - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The name of the user who created this task graph log.") - public String getCreatedBy() { return createdBy; } - - public TaskGraph name(String name) { - + public TaskGraph name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * A name for this task graph, displayed in the UI. Does not need to be unique. * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "A name for this task graph, displayed in the UI. Does not need to be unique. ") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - /** + /** * The date/time when this task graph was originally created. * @return createdAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The date/time when this task graph was originally created. ") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public TaskGraph nodes(List nodes) { - + public TaskGraph nodes(@javax.annotation.Nullable List nodes) { this.nodes = nodes; return this; } @@ -204,149 +205,95 @@ public TaskGraph addNodesItem(TaskGraphNode nodesItem) { return this; } - /** - * The structure of the graph. This is provided by the client when first setting up the task graph. This must be topographically sorted; that is, each node must appear after all nodes that it depends upon. + /** + * The structure of the graph. This is provided by the client when first setting up the task graph. This must be topographically sorted; that is, each node must appear after all nodes that it depends upon. * @return nodes - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The structure of the graph. This is provided by the client when first setting up the task graph. This must be topographically sorted; that is, each node must appear after all nodes that it depends upon. ") - public List getNodes() { return nodes; } - - public void setNodes(List nodes) { + public void setNodes(@javax.annotation.Nullable List nodes) { this.nodes = nodes; } - public TaskGraph parallelism(Long parallelism) { - + public TaskGraph parallelism(@javax.annotation.Nullable Long parallelism) { this.parallelism = parallelism; return this; } - /** + /** * Parallelism limits the max total parallel pods that can execute at the same time in a workflow. * @return parallelism - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Parallelism limits the max total parallel pods that can execute at the same time in a workflow. ") - public Long getParallelism() { return parallelism; } - - public void setParallelism(Long parallelism) { + public void setParallelism(@javax.annotation.Nullable Long parallelism) { this.parallelism = parallelism; } - public TaskGraph retryStrategy(RetryStrategy retryStrategy) { - + public TaskGraph retryStrategy(@javax.annotation.Nullable RetryStrategy retryStrategy) { this.retryStrategy = retryStrategy; return this; } - /** + /** * Get retryStrategy * @return retryStrategy - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public RetryStrategy getRetryStrategy() { return retryStrategy; } - - public void setRetryStrategy(RetryStrategy retryStrategy) { + public void setRetryStrategy(@javax.annotation.Nullable RetryStrategy retryStrategy) { this.retryStrategy = retryStrategy; } - public TaskGraph deadline(Long deadline) { - + public TaskGraph deadline(@javax.annotation.Nullable Long deadline) { this.deadline = deadline; return this; } - /** - * Duration in seconds relative to the workflow start time which the workflow is allowed to run before it gets terminated. + /** + * Duration in seconds relative to the workflow start time which the workflow is allowed to run before it gets terminated. Defaults to 24h when unset * @return deadline - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Duration in seconds relative to the workflow start time which the workflow is allowed to run before it gets terminated. ") - public Long getDeadline() { return deadline; } - - public void setDeadline(Long deadline) { + public void setDeadline(@javax.annotation.Nullable Long deadline) { this.deadline = deadline; } - public TaskGraph taskGraphType(TaskGraphType taskGraphType) { - + public TaskGraph taskGraphType(@javax.annotation.Nullable TaskGraphType taskGraphType) { this.taskGraphType = taskGraphType; return this; } - /** + /** * Get taskGraphType * @return taskGraphType - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public TaskGraphType getTaskGraphType() { return taskGraphType; } - - public void setTaskGraphType(TaskGraphType taskGraphType) { + public void setTaskGraphType(@javax.annotation.Nullable TaskGraphType taskGraphType) { this.taskGraphType = taskGraphType; } - /** - * 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. - */ - public TaskGraph 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -367,8 +314,7 @@ public boolean equals(Object o) { Objects.equals(this.parallelism, taskGraph.parallelism) && Objects.equals(this.retryStrategy, taskGraph.retryStrategy) && Objects.equals(this.deadline, taskGraph.deadline) && - Objects.equals(this.taskGraphType, taskGraph.taskGraphType)&& - Objects.equals(this.additionalProperties, taskGraph.additionalProperties); + Objects.equals(this.taskGraphType, taskGraph.taskGraphType); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -377,7 +323,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(uuid, namespace, createdBy, name, createdAt, nodes, parallelism, retryStrategy, deadline, taskGraphType, additionalProperties); + return Objects.hash(uuid, namespace, createdBy, name, createdAt, nodes, parallelism, retryStrategy, deadline, taskGraphType); } private static int hashCodeNullable(JsonNullable a) { @@ -401,7 +347,6 @@ public String toString() { sb.append(" retryStrategy: ").append(toIndentedString(retryStrategy)).append("\n"); sb.append(" deadline: ").append(toIndentedString(deadline)).append("\n"); sb.append(" taskGraphType: ").append(toIndentedString(taskGraphType)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -439,20 +384,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TaskGraph - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (TaskGraph.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 TaskGraph + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TaskGraph.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in TaskGraph is not found in the empty JSON string", TaskGraph.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TaskGraph.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TaskGraph` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); } @@ -465,21 +417,27 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !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())); } - JsonArray jsonArraynodes = jsonObj.getAsJsonArray("nodes"); - if (jsonArraynodes != null) { - // ensure the json data is an array - if (!jsonObj.get("nodes").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `nodes` to be an array in the JSON string but got `%s`", jsonObj.get("nodes").toString())); + if (jsonObj.get("nodes") != null && !jsonObj.get("nodes").isJsonNull()) { + JsonArray jsonArraynodes = jsonObj.getAsJsonArray("nodes"); + if (jsonArraynodes != null) { + // ensure the json data is an array + if (!jsonObj.get("nodes").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `nodes` to be an array in the JSON string but got `%s`", jsonObj.get("nodes").toString())); + } + + // validate the optional field `nodes` (array) + for (int i = 0; i < jsonArraynodes.size(); i++) { + TaskGraphNode.validateJsonElement(jsonArraynodes.get(i)); + }; } - - // validate the optional field `nodes` (array) - for (int i = 0; i < jsonArraynodes.size(); i++) { - TaskGraphNode.validateJsonObject(jsonArraynodes.get(i).getAsJsonObject()); - }; } // validate the optional field `retry_strategy` if (jsonObj.get("retry_strategy") != null && !jsonObj.get("retry_strategy").isJsonNull()) { - RetryStrategy.validateJsonObject(jsonObj.getAsJsonObject("retry_strategy")); + RetryStrategy.validateJsonElement(jsonObj.get("retry_strategy")); + } + // validate the optional field `task_graph_type` + if (jsonObj.get("task_graph_type") != null && !jsonObj.get("task_graph_type").isJsonNull()) { + TaskGraphType.validateJsonElement(jsonObj.get("task_graph_type")); } } @@ -498,71 +456,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, TaskGraph value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 TaskGraph read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - TaskGraph 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of TaskGraph given an JSON string - * - * @param jsonString JSON string - * @return An instance of TaskGraph - * @throws IOException if the JSON string is invalid with respect to TaskGraph - */ + /** + * Create an instance of TaskGraph given an JSON string + * + * @param jsonString JSON string + * @return An instance of TaskGraph + * @throws IOException if the JSON string is invalid with respect to TaskGraph + */ public static TaskGraph fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TaskGraph.class); } - /** - * Convert an instance of TaskGraph to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TaskGraph to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphActions.java b/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphActions.java index 9474456..10b890f 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphActions.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphActions.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -65,5 +69,10 @@ public TaskGraphActions read(final JsonReader jsonReader) throws IOException { return TaskGraphActions.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TaskGraphActions.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphClientNodeStatus.java b/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphClientNodeStatus.java index e443a0f..8269cac 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphClientNodeStatus.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphClientNodeStatus.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,128 +11,96 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.ArrayTaskStatus; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * A report of the execution status of a node that ran on the client side. */ -@ApiModel(description = "A report of the execution status of a node that ran on the client side. ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class TaskGraphClientNodeStatus { public static final String SERIALIZED_NAME_CLIENT_NODE_UUID = "client_node_uuid"; @SerializedName(SERIALIZED_NAME_CLIENT_NODE_UUID) + @javax.annotation.Nullable private String clientNodeUuid; public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable private ArrayTaskStatus status; public TaskGraphClientNodeStatus() { } - public TaskGraphClientNodeStatus clientNodeUuid(String clientNodeUuid) { - + public TaskGraphClientNodeStatus clientNodeUuid(@javax.annotation.Nullable String clientNodeUuid) { this.clientNodeUuid = clientNodeUuid; return this; } - /** + /** * Get clientNodeUuid * @return clientNodeUuid - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getClientNodeUuid() { return clientNodeUuid; } - - public void setClientNodeUuid(String clientNodeUuid) { + public void setClientNodeUuid(@javax.annotation.Nullable String clientNodeUuid) { this.clientNodeUuid = clientNodeUuid; } - public TaskGraphClientNodeStatus status(ArrayTaskStatus status) { - + public TaskGraphClientNodeStatus status(@javax.annotation.Nullable ArrayTaskStatus status) { this.status = status; return this; } - /** + /** * Get status * @return status - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public ArrayTaskStatus getStatus() { return status; } - - public void setStatus(ArrayTaskStatus status) { + public void setStatus(@javax.annotation.Nullable ArrayTaskStatus status) { this.status = status; } - /** - * 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. - */ - public TaskGraphClientNodeStatus 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -145,13 +113,12 @@ public boolean equals(Object o) { } TaskGraphClientNodeStatus taskGraphClientNodeStatus = (TaskGraphClientNodeStatus) o; return Objects.equals(this.clientNodeUuid, taskGraphClientNodeStatus.clientNodeUuid) && - Objects.equals(this.status, taskGraphClientNodeStatus.status)&& - Objects.equals(this.additionalProperties, taskGraphClientNodeStatus.additionalProperties); + Objects.equals(this.status, taskGraphClientNodeStatus.status); } @Override public int hashCode() { - return Objects.hash(clientNodeUuid, status, additionalProperties); + return Objects.hash(clientNodeUuid, status); } @Override @@ -160,7 +127,6 @@ public String toString() { sb.append("class TaskGraphClientNodeStatus {\n"); sb.append(" clientNodeUuid: ").append(toIndentedString(clientNodeUuid)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -190,23 +156,34 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TaskGraphClientNodeStatus - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (TaskGraphClientNodeStatus.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 TaskGraphClientNodeStatus + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TaskGraphClientNodeStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in TaskGraphClientNodeStatus is not found in the empty JSON string", TaskGraphClientNodeStatus.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TaskGraphClientNodeStatus.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TaskGraphClientNodeStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("client_node_uuid") != null && !jsonObj.get("client_node_uuid").isJsonNull()) && !jsonObj.get("client_node_uuid").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `client_node_uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("client_node_uuid").toString())); } + // validate the optional field `status` + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { + ArrayTaskStatus.validateJsonElement(jsonObj.get("status")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -224,71 +201,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, TaskGraphClientNodeStatus value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 TaskGraphClientNodeStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - TaskGraphClientNodeStatus 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of TaskGraphClientNodeStatus given an JSON string - * - * @param jsonString JSON string - * @return An instance of TaskGraphClientNodeStatus - * @throws IOException if the JSON string is invalid with respect to TaskGraphClientNodeStatus - */ + /** + * Create an instance of TaskGraphClientNodeStatus given an JSON string + * + * @param jsonString JSON string + * @return An instance of TaskGraphClientNodeStatus + * @throws IOException if the JSON string is invalid with respect to TaskGraphClientNodeStatus + */ public static TaskGraphClientNodeStatus fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TaskGraphClientNodeStatus.class); } - /** - * Convert an instance of TaskGraphClientNodeStatus to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TaskGraphClientNodeStatus to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphLog.java b/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphLog.java index f3579f9..b111654 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphLog.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphLog.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,112 +11,148 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; - +import org.openapitools.client.model.TaskGraphLogStatus; +import org.openapitools.client.model.TaskGraphNodeMetadata; +import org.openapitools.client.model.TaskGraphType; import org.openapitools.jackson.nullable.JsonNullable; 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.util.HashMap; import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Logging information about the execution of a task graph. */ -@ApiModel(description = "Logging information about the execution of a task graph.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class TaskGraphLog { public static final String SERIALIZED_NAME_UUID = "uuid"; @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nullable private String uuid; public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; @SerializedName(SERIALIZED_NAME_NAMESPACE) + @javax.annotation.Nullable private String namespace; public static final String SERIALIZED_NAME_CREATED_BY = "created_by"; @SerializedName(SERIALIZED_NAME_CREATED_BY) + @javax.annotation.Nullable private String createdBy; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_START_TIME = "start_time"; @SerializedName(SERIALIZED_NAME_START_TIME) + @javax.annotation.Nullable private OffsetDateTime startTime; public static final String SERIALIZED_NAME_END_TIME = "end_time"; @SerializedName(SERIALIZED_NAME_END_TIME) + @javax.annotation.Nullable private OffsetDateTime endTime; public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable private TaskGraphLogStatus status; public static final String SERIALIZED_NAME_TOTAL_COST = "total_cost"; @SerializedName(SERIALIZED_NAME_TOTAL_COST) + @javax.annotation.Nullable private BigDecimal totalCost; public static final String SERIALIZED_NAME_ACCESS_COST = "access_cost"; @SerializedName(SERIALIZED_NAME_ACCESS_COST) + @javax.annotation.Nullable private BigDecimal accessCost; public static final String SERIALIZED_NAME_EGRESS_COST = "egress_cost"; @SerializedName(SERIALIZED_NAME_EGRESS_COST) + @javax.annotation.Nullable private BigDecimal egressCost; public static final String SERIALIZED_NAME_EXECUTION_TIME = "execution_time"; @SerializedName(SERIALIZED_NAME_EXECUTION_TIME) + @javax.annotation.Nullable private String executionTime; public static final String SERIALIZED_NAME_STATUS_COUNT = "status_count"; @SerializedName(SERIALIZED_NAME_STATUS_COUNT) - private Map statusCount = null; + @javax.annotation.Nullable + private Map statusCount = new HashMap<>(); public static final String SERIALIZED_NAME_NODES = "nodes"; @SerializedName(SERIALIZED_NAME_NODES) - private List nodes = null; + @javax.annotation.Nullable + private List nodes = new ArrayList<>(); public static final String SERIALIZED_NAME_TASK_GRAPH_TYPE = "task_graph_type"; @SerializedName(SERIALIZED_NAME_TASK_GRAPH_TYPE) + @javax.annotation.Nullable private TaskGraphType taskGraphType; public static final String SERIALIZED_NAME_TASK_GRAPH_ID = "task_graph_id"; @SerializedName(SERIALIZED_NAME_TASK_GRAPH_ID) + @javax.annotation.Nullable private String taskGraphId; + public static final String SERIALIZED_NAME_CLOUD_PROVIDER = "cloud_provider"; + @SerializedName(SERIALIZED_NAME_CLOUD_PROVIDER) + @javax.annotation.Nullable + private String cloudProvider; + + public static final String SERIALIZED_NAME_CLOUD_REGION = "cloud_region"; + @SerializedName(SERIALIZED_NAME_CLOUD_REGION) + @javax.annotation.Nullable + private String cloudRegion; + public TaskGraphLog() { } - public TaskGraphLog( String uuid, String createdBy, @@ -132,239 +168,195 @@ public TaskGraphLog( this.endTime = endTime; } - /** + /** * The server-generated UUID of the task graph. * @return uuid - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The server-generated UUID of the task graph.") - public String getUuid() { return uuid; } - - public TaskGraphLog namespace(String namespace) { - + public TaskGraphLog namespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; return this; } - /** + /** * The namespace that owns this task graph log. When creating a task graph log, this is used as the namespace to create the log in; thereafter it is read-only. * @return namespace - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The namespace that owns this task graph log. When creating a task graph log, this is used as the namespace to create the log in; thereafter it is read-only. ") - public String getNamespace() { return namespace; } - - public void setNamespace(String namespace) { + public void setNamespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; } - /** + /** * The name of the user who created this task graph log. * @return createdBy - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The name of the user who created this task graph log.") - public String getCreatedBy() { return createdBy; } - - public TaskGraphLog name(String name) { - + public TaskGraphLog name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * A name for this task graph log, displayed in the UI. Does not need to be unique. * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "A name for this task graph log, displayed in the UI. Does not need to be unique. ") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - /** + /** * The date/time when this task graph log was originally created. This is distinct from the execution start_time. * @return createdAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The date/time when this task graph log was originally created. This is distinct from the execution start_time. ") - public OffsetDateTime getCreatedAt() { return createdAt; } - - /** + /** * The start time of the task graph, recorded when the server starts executing the first node. * @return startTime - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The start time of the task graph, recorded when the server starts executing the first node. ") - public OffsetDateTime getStartTime() { return startTime; } - - /** + /** * The end time of the task graph, recorded when the client reports completion. * @return endTime - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The end time of the task graph, recorded when the client reports completion. ") - public OffsetDateTime getEndTime() { return endTime; } - - public TaskGraphLog status(TaskGraphLogStatus status) { - + public TaskGraphLog status(@javax.annotation.Nullable TaskGraphLogStatus status) { this.status = status; return this; } - /** + /** * Get status * @return status - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public TaskGraphLogStatus getStatus() { return status; } - - public void setStatus(TaskGraphLogStatus status) { + public void setStatus(@javax.annotation.Nullable TaskGraphLogStatus status) { this.status = status; } - public TaskGraphLog totalCost(BigDecimal totalCost) { - + public TaskGraphLog totalCost(@javax.annotation.Nullable BigDecimal totalCost) { this.totalCost = totalCost; return this; } - /** + /** * If present, the total cost of executing all nodes in this task graph. * @return totalCost - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "If present, the total cost of executing all nodes in this task graph. ") - public BigDecimal getTotalCost() { return totalCost; } - - public void setTotalCost(BigDecimal totalCost) { + public void setTotalCost(@javax.annotation.Nullable BigDecimal totalCost) { this.totalCost = totalCost; } - public TaskGraphLog accessCost(BigDecimal accessCost) { - + public TaskGraphLog accessCost(@javax.annotation.Nullable BigDecimal accessCost) { this.accessCost = accessCost; return this; } - /** + /** * If present, the total cost of access from execution of the nodes in this task graph. * @return accessCost - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "If present, the total cost of access from execution of the nodes in this task graph. ") - public BigDecimal getAccessCost() { return accessCost; } - - public void setAccessCost(BigDecimal accessCost) { + public void setAccessCost(@javax.annotation.Nullable BigDecimal accessCost) { this.accessCost = accessCost; } - public TaskGraphLog egressCost(BigDecimal egressCost) { - + public TaskGraphLog egressCost(@javax.annotation.Nullable BigDecimal egressCost) { this.egressCost = egressCost; return this; } - /** + /** * If present, the total cost of access from execution of the nodes in this task graph. * @return egressCost - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "If present, the total cost of access from execution of the nodes in this task graph. ") - public BigDecimal getEgressCost() { return egressCost; } - - public void setEgressCost(BigDecimal egressCost) { + public void setEgressCost(@javax.annotation.Nullable BigDecimal egressCost) { this.egressCost = egressCost; } - public TaskGraphLog executionTime(String executionTime) { - + public TaskGraphLog executionTime(@javax.annotation.Nullable String executionTime) { this.executionTime = executionTime; return this; } - /** + /** * The total execution time of all the nodes in this graph, in ISO 8601 format with hours, minutes, and seconds. * @return executionTime - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "P15H22M0.45S", value = "The total execution time of all the nodes in this graph, in ISO 8601 format with hours, minutes, and seconds. ") - public String getExecutionTime() { return executionTime; } - - public void setExecutionTime(String executionTime) { + public void setExecutionTime(@javax.annotation.Nullable String executionTime) { this.executionTime = executionTime; } - public TaskGraphLog statusCount(Map statusCount) { - + public TaskGraphLog statusCount(@javax.annotation.Nullable Map statusCount) { this.statusCount = statusCount; return this; } @@ -377,25 +369,21 @@ public TaskGraphLog putStatusCountItem(String key, BigDecimal statusCountItem) { return this; } - /** + /** * A mapping from `ArrayTaskStatus` string value to the number of nodes in this graph that are in that status. * @return statusCount - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "A mapping from `ArrayTaskStatus` string value to the number of nodes in this graph that are in that status. ") - public Map getStatusCount() { return statusCount; } - - public void setStatusCount(Map statusCount) { + public void setStatusCount(@javax.annotation.Nullable Map statusCount) { this.statusCount = statusCount; } - public TaskGraphLog nodes(List nodes) { - + public TaskGraphLog nodes(@javax.annotation.Nullable List nodes) { this.nodes = nodes; return this; } @@ -408,105 +396,97 @@ public TaskGraphLog addNodesItem(TaskGraphNodeMetadata nodesItem) { return this; } - /** + /** * The structure of the graph. This is provided by the client when first setting up the task graph. Thereafter, it is read-only. This must be topographically sorted; that is, each node must appear after all nodes that it depends upon. * @return nodes - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The structure of the graph. This is provided by the client when first setting up the task graph. Thereafter, it is read-only. This must be topographically sorted; that is, each node must appear after all nodes that it depends upon. ") - public List getNodes() { return nodes; } - - public void setNodes(List nodes) { + public void setNodes(@javax.annotation.Nullable List nodes) { this.nodes = nodes; } - public TaskGraphLog taskGraphType(TaskGraphType taskGraphType) { - + public TaskGraphLog taskGraphType(@javax.annotation.Nullable TaskGraphType taskGraphType) { this.taskGraphType = taskGraphType; return this; } - /** + /** * Get taskGraphType * @return taskGraphType - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public TaskGraphType getTaskGraphType() { return taskGraphType; } - - public void setTaskGraphType(TaskGraphType taskGraphType) { + public void setTaskGraphType(@javax.annotation.Nullable TaskGraphType taskGraphType) { this.taskGraphType = taskGraphType; } - public TaskGraphLog taskGraphId(String taskGraphId) { - + public TaskGraphLog taskGraphId(@javax.annotation.Nullable String taskGraphId) { this.taskGraphId = taskGraphId; return this; } - /** + /** * The UUID of the task graph. * @return taskGraphId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The UUID of the task graph.") - public String getTaskGraphId() { return taskGraphId; } - - public void setTaskGraphId(String taskGraphId) { + public void setTaskGraphId(@javax.annotation.Nullable String taskGraphId) { this.taskGraphId = taskGraphId; } - /** - * 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. - */ - public TaskGraphLog putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); + public TaskGraphLog cloudProvider(@javax.annotation.Nullable String cloudProvider) { + this.cloudProvider = cloudProvider; return this; } /** - * Return the additional (undeclared) property. + * The name of the cloud provider where this task graph executed. + * @return cloudProvider */ - public Map getAdditionalProperties() { - return additionalProperties; + @javax.annotation.Nullable + public String getCloudProvider() { + return cloudProvider; + } + + public void setCloudProvider(@javax.annotation.Nullable String cloudProvider) { + this.cloudProvider = cloudProvider; + } + + + public TaskGraphLog cloudRegion(@javax.annotation.Nullable String cloudRegion) { + this.cloudRegion = cloudRegion; + return this; } /** - * Return the additional (undeclared) property with the specified name. + * The region of the cloud provider where this task graph executed. + * @return cloudRegion */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); + @javax.annotation.Nullable + public String getCloudRegion() { + return cloudRegion; + } + + public void setCloudRegion(@javax.annotation.Nullable String cloudRegion) { + this.cloudRegion = cloudRegion; } + @Override public boolean equals(Object o) { if (this == o) { @@ -531,8 +511,9 @@ public boolean equals(Object o) { Objects.equals(this.statusCount, taskGraphLog.statusCount) && Objects.equals(this.nodes, taskGraphLog.nodes) && Objects.equals(this.taskGraphType, taskGraphLog.taskGraphType) && - Objects.equals(this.taskGraphId, taskGraphLog.taskGraphId)&& - Objects.equals(this.additionalProperties, taskGraphLog.additionalProperties); + Objects.equals(this.taskGraphId, taskGraphLog.taskGraphId) && + Objects.equals(this.cloudProvider, taskGraphLog.cloudProvider) && + Objects.equals(this.cloudRegion, taskGraphLog.cloudRegion); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -541,7 +522,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(uuid, namespace, createdBy, name, createdAt, startTime, endTime, status, totalCost, accessCost, egressCost, executionTime, statusCount, nodes, taskGraphType, taskGraphId, additionalProperties); + return Objects.hash(uuid, namespace, createdBy, name, createdAt, startTime, endTime, status, totalCost, accessCost, egressCost, executionTime, statusCount, nodes, taskGraphType, taskGraphId, cloudProvider, cloudRegion); } private static int hashCodeNullable(JsonNullable a) { @@ -571,7 +552,8 @@ public String toString() { sb.append(" nodes: ").append(toIndentedString(nodes)).append("\n"); sb.append(" taskGraphType: ").append(toIndentedString(taskGraphType)).append("\n"); sb.append(" taskGraphId: ").append(toIndentedString(taskGraphId)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append(" cloudProvider: ").append(toIndentedString(cloudProvider)).append("\n"); + sb.append(" cloudRegion: ").append(toIndentedString(cloudRegion)).append("\n"); sb.append("}"); return sb.toString(); } @@ -610,25 +592,34 @@ private String toIndentedString(Object o) { openapiFields.add("nodes"); openapiFields.add("task_graph_type"); openapiFields.add("task_graph_id"); + openapiFields.add("cloud_provider"); + openapiFields.add("cloud_region"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TaskGraphLog - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (TaskGraphLog.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 TaskGraphLog + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TaskGraphLog.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in TaskGraphLog is not found in the empty JSON string", TaskGraphLog.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TaskGraphLog.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TaskGraphLog` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); } @@ -641,24 +632,40 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !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())); } + // validate the optional field `status` + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { + TaskGraphLogStatus.validateJsonElement(jsonObj.get("status")); + } if ((jsonObj.get("execution_time") != null && !jsonObj.get("execution_time").isJsonNull()) && !jsonObj.get("execution_time").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `execution_time` to be a primitive type in the JSON string but got `%s`", jsonObj.get("execution_time").toString())); } - JsonArray jsonArraynodes = jsonObj.getAsJsonArray("nodes"); - if (jsonArraynodes != null) { - // ensure the json data is an array - if (!jsonObj.get("nodes").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `nodes` to be an array in the JSON string but got `%s`", jsonObj.get("nodes").toString())); + if (jsonObj.get("nodes") != null && !jsonObj.get("nodes").isJsonNull()) { + JsonArray jsonArraynodes = jsonObj.getAsJsonArray("nodes"); + if (jsonArraynodes != null) { + // ensure the json data is an array + if (!jsonObj.get("nodes").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `nodes` to be an array in the JSON string but got `%s`", jsonObj.get("nodes").toString())); + } + + // validate the optional field `nodes` (array) + for (int i = 0; i < jsonArraynodes.size(); i++) { + TaskGraphNodeMetadata.validateJsonElement(jsonArraynodes.get(i)); + }; } - - // validate the optional field `nodes` (array) - for (int i = 0; i < jsonArraynodes.size(); i++) { - TaskGraphNodeMetadata.validateJsonObject(jsonArraynodes.get(i).getAsJsonObject()); - }; + } + // validate the optional field `task_graph_type` + if (jsonObj.get("task_graph_type") != null && !jsonObj.get("task_graph_type").isJsonNull()) { + TaskGraphType.validateJsonElement(jsonObj.get("task_graph_type")); } if ((jsonObj.get("task_graph_id") != null && !jsonObj.get("task_graph_id").isJsonNull()) && !jsonObj.get("task_graph_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `task_graph_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("task_graph_id").toString())); } + if ((jsonObj.get("cloud_provider") != null && !jsonObj.get("cloud_provider").isJsonNull()) && !jsonObj.get("cloud_provider").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `cloud_provider` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cloud_provider").toString())); + } + if ((jsonObj.get("cloud_region") != null && !jsonObj.get("cloud_region").isJsonNull()) && !jsonObj.get("cloud_region").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `cloud_region` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cloud_region").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -676,71 +683,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, TaskGraphLog value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 TaskGraphLog read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - TaskGraphLog 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of TaskGraphLog given an JSON string - * - * @param jsonString JSON string - * @return An instance of TaskGraphLog - * @throws IOException if the JSON string is invalid with respect to TaskGraphLog - */ + /** + * Create an instance of TaskGraphLog given an JSON string + * + * @param jsonString JSON string + * @return An instance of TaskGraphLog + * @throws IOException if the JSON string is invalid with respect to TaskGraphLog + */ public static TaskGraphLog fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TaskGraphLog.class); } - /** - * Convert an instance of TaskGraphLog to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TaskGraphLog to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphLogRunLocation.java b/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphLogRunLocation.java index ef565b2..ce3f73a 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphLogRunLocation.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphLogRunLocation.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -67,5 +71,10 @@ public TaskGraphLogRunLocation read(final JsonReader jsonReader) throws IOExcept return TaskGraphLogRunLocation.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TaskGraphLogRunLocation.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphLogStatus.java b/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphLogStatus.java index c80d780..832bfd3 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphLogStatus.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphLogStatus.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -75,5 +79,10 @@ public TaskGraphLogStatus read(final JsonReader jsonReader) throws IOException { return TaskGraphLogStatus.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TaskGraphLogStatus.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphLogsData.java b/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphLogsData.java index a5e519a..1b4eea9 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphLogsData.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphLogsData.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,53 +11,63 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.PaginationMetadata; +import org.openapitools.client.model.TaskGraphLog; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Response data for a task graph list, including pagination metadata. */ -@ApiModel(description = "Response data for a task graph list, including pagination metadata.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class TaskGraphLogsData { public static final String SERIALIZED_NAME_TASK_GRAPH_LOGS = "task_graph_logs"; @SerializedName(SERIALIZED_NAME_TASK_GRAPH_LOGS) - private List taskGraphLogs = null; + @javax.annotation.Nullable + private List taskGraphLogs = new ArrayList<>(); public static final String SERIALIZED_NAME_PAGINATION_METADATA = "pagination_metadata"; @SerializedName(SERIALIZED_NAME_PAGINATION_METADATA) + @javax.annotation.Nullable private PaginationMetadata paginationMetadata; public TaskGraphLogsData() { } - public TaskGraphLogsData taskGraphLogs(List taskGraphLogs) { - + public TaskGraphLogsData taskGraphLogs(@javax.annotation.Nullable List taskGraphLogs) { this.taskGraphLogs = taskGraphLogs; return this; } @@ -70,80 +80,38 @@ public TaskGraphLogsData addTaskGraphLogsItem(TaskGraphLog taskGraphLogsItem) { return this; } - /** + /** * The requested task graph logs. * @return taskGraphLogs - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The requested task graph logs.") - public List getTaskGraphLogs() { return taskGraphLogs; } - - public void setTaskGraphLogs(List taskGraphLogs) { + public void setTaskGraphLogs(@javax.annotation.Nullable List taskGraphLogs) { this.taskGraphLogs = taskGraphLogs; } - public TaskGraphLogsData paginationMetadata(PaginationMetadata paginationMetadata) { - + public TaskGraphLogsData paginationMetadata(@javax.annotation.Nullable PaginationMetadata paginationMetadata) { this.paginationMetadata = paginationMetadata; return this; } - /** + /** * Get paginationMetadata * @return paginationMetadata - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public PaginationMetadata getPaginationMetadata() { return paginationMetadata; } - - public void setPaginationMetadata(PaginationMetadata paginationMetadata) { + public void setPaginationMetadata(@javax.annotation.Nullable PaginationMetadata paginationMetadata) { this.paginationMetadata = paginationMetadata; } - /** - * 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. - */ - public TaskGraphLogsData 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -156,13 +124,12 @@ public boolean equals(Object o) { } TaskGraphLogsData taskGraphLogsData = (TaskGraphLogsData) o; return Objects.equals(this.taskGraphLogs, taskGraphLogsData.taskGraphLogs) && - Objects.equals(this.paginationMetadata, taskGraphLogsData.paginationMetadata)&& - Objects.equals(this.additionalProperties, taskGraphLogsData.additionalProperties); + Objects.equals(this.paginationMetadata, taskGraphLogsData.paginationMetadata); } @Override public int hashCode() { - return Objects.hash(taskGraphLogs, paginationMetadata, additionalProperties); + return Objects.hash(taskGraphLogs, paginationMetadata); } @Override @@ -171,7 +138,6 @@ public String toString() { sb.append("class TaskGraphLogsData {\n"); sb.append(" taskGraphLogs: ").append(toIndentedString(taskGraphLogs)).append("\n"); sb.append(" paginationMetadata: ").append(toIndentedString(paginationMetadata)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -201,35 +167,44 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TaskGraphLogsData - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (TaskGraphLogsData.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 TaskGraphLogsData + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TaskGraphLogsData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in TaskGraphLogsData is not found in the empty JSON string", TaskGraphLogsData.openapiRequiredFields.toString())); } } - JsonArray jsonArraytaskGraphLogs = jsonObj.getAsJsonArray("task_graph_logs"); - if (jsonArraytaskGraphLogs != null) { - // ensure the json data is an array - if (!jsonObj.get("task_graph_logs").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `task_graph_logs` to be an array in the JSON string but got `%s`", jsonObj.get("task_graph_logs").toString())); - } - // validate the optional field `task_graph_logs` (array) - for (int i = 0; i < jsonArraytaskGraphLogs.size(); i++) { - TaskGraphLog.validateJsonObject(jsonArraytaskGraphLogs.get(i).getAsJsonObject()); - }; + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TaskGraphLogsData.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TaskGraphLogsData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("task_graph_logs") != null && !jsonObj.get("task_graph_logs").isJsonNull()) { + JsonArray jsonArraytaskGraphLogs = jsonObj.getAsJsonArray("task_graph_logs"); + if (jsonArraytaskGraphLogs != null) { + // ensure the json data is an array + if (!jsonObj.get("task_graph_logs").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `task_graph_logs` to be an array in the JSON string but got `%s`", jsonObj.get("task_graph_logs").toString())); + } + + // validate the optional field `task_graph_logs` (array) + for (int i = 0; i < jsonArraytaskGraphLogs.size(); i++) { + TaskGraphLog.validateJsonElement(jsonArraytaskGraphLogs.get(i)); + }; + } } // validate the optional field `pagination_metadata` if (jsonObj.get("pagination_metadata") != null && !jsonObj.get("pagination_metadata").isJsonNull()) { - PaginationMetadata.validateJsonObject(jsonObj.getAsJsonObject("pagination_metadata")); + PaginationMetadata.validateJsonElement(jsonObj.get("pagination_metadata")); } } @@ -248,71 +223,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, TaskGraphLogsData value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 TaskGraphLogsData read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - TaskGraphLogsData 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of TaskGraphLogsData given an JSON string - * - * @param jsonString JSON string - * @return An instance of TaskGraphLogsData - * @throws IOException if the JSON string is invalid with respect to TaskGraphLogsData - */ + /** + * Create an instance of TaskGraphLogsData given an JSON string + * + * @param jsonString JSON string + * @return An instance of TaskGraphLogsData + * @throws IOException if the JSON string is invalid with respect to TaskGraphLogsData + */ public static TaskGraphLogsData fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TaskGraphLogsData.class); } - /** - * Convert an instance of TaskGraphLogsData to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TaskGraphLogsData to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphNode.java b/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphNode.java index c8d68b9..6bf795a 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphNode.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphNode.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,131 +11,145 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; - -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.model.RetryStrategy; +import org.openapitools.client.model.TGInputNodeData; +import org.openapitools.client.model.TGSQLNodeData; +import org.openapitools.client.model.TGUDFNodeData; +import org.openapitools.client.model.UDFArrayDetails; import org.openapitools.jackson.nullable.JsonNullable; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; /** * Information about a single node within a registered task graph. A single node represents one piece of data or a computational step; either as an input value, a data source, or a computation that acts upon earlier nodes. The structure parallels the existing `TaskGraphNodeMetadata`. */ -@ApiModel(description = "Information about a single node within a registered task graph. A single node represents one piece of data or a computational step; either as an input value, a data source, or a computation that acts upon earlier nodes. The structure parallels the existing `TaskGraphNodeMetadata`. ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class TaskGraphNode { public static final String SERIALIZED_NAME_CLIENT_NODE_ID = "client_node_id"; @SerializedName(SERIALIZED_NAME_CLIENT_NODE_ID) + @javax.annotation.Nullable private String clientNodeId; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_DEPENDS_ON = "depends_on"; @SerializedName(SERIALIZED_NAME_DEPENDS_ON) - private List dependsOn = null; + @javax.annotation.Nullable + private List dependsOn = new ArrayList<>(); public static final String SERIALIZED_NAME_ARRAY_NODE = "array_node"; @SerializedName(SERIALIZED_NAME_ARRAY_NODE) + @javax.annotation.Nullable private UDFArrayDetails arrayNode; public static final String SERIALIZED_NAME_INPUT_NODE = "input_node"; @SerializedName(SERIALIZED_NAME_INPUT_NODE) + @javax.annotation.Nullable private TGInputNodeData inputNode; public static final String SERIALIZED_NAME_SQL_NODE = "sql_node"; @SerializedName(SERIALIZED_NAME_SQL_NODE) + @javax.annotation.Nullable private TGSQLNodeData sqlNode; public static final String SERIALIZED_NAME_UDF_NODE = "udf_node"; @SerializedName(SERIALIZED_NAME_UDF_NODE) + @javax.annotation.Nullable private TGUDFNodeData udfNode; public static final String SERIALIZED_NAME_RETRY_STRATEGY = "retry_strategy"; @SerializedName(SERIALIZED_NAME_RETRY_STRATEGY) + @javax.annotation.Nullable private RetryStrategy retryStrategy; public static final String SERIALIZED_NAME_EXPAND_NODE_OUTPUT = "expand_node_output"; @SerializedName(SERIALIZED_NAME_EXPAND_NODE_OUTPUT) + @javax.annotation.Nullable private String expandNodeOutput; public static final String SERIALIZED_NAME_DEADLINE = "deadline"; @SerializedName(SERIALIZED_NAME_DEADLINE) + @javax.annotation.Nullable private Long deadline; public TaskGraphNode() { } - public TaskGraphNode clientNodeId(String clientNodeId) { - + public TaskGraphNode clientNodeId(@javax.annotation.Nullable String clientNodeId) { this.clientNodeId = clientNodeId; return this; } - /** + /** * The client-generated UUID of the given graph node. * @return clientNodeId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The client-generated UUID of the given graph node.") - public String getClientNodeId() { return clientNodeId; } - - public void setClientNodeId(String clientNodeId) { + public void setClientNodeId(@javax.annotation.Nullable String clientNodeId) { this.clientNodeId = clientNodeId; } - public TaskGraphNode name(String name) { - + public TaskGraphNode name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * A client-specified name for the node. If provided, this must be unique. * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "A client-specified name for the node. If provided, this must be unique. ") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public TaskGraphNode dependsOn(List dependsOn) { - + public TaskGraphNode dependsOn(@javax.annotation.Nullable List dependsOn) { this.dependsOn = dependsOn; return this; } @@ -148,218 +162,152 @@ public TaskGraphNode addDependsOnItem(String dependsOnItem) { return this; } - /** + /** * The client_node_uuid of each node that this node depends upon. Used to define the structure of the graph. * @return dependsOn - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The client_node_uuid of each node that this node depends upon. Used to define the structure of the graph. ") - public List getDependsOn() { return dependsOn; } - - public void setDependsOn(List dependsOn) { + public void setDependsOn(@javax.annotation.Nullable List dependsOn) { this.dependsOn = dependsOn; } - public TaskGraphNode arrayNode(UDFArrayDetails arrayNode) { - + public TaskGraphNode arrayNode(@javax.annotation.Nullable UDFArrayDetails arrayNode) { this.arrayNode = arrayNode; return this; } - /** + /** * Get arrayNode * @return arrayNode - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public UDFArrayDetails getArrayNode() { return arrayNode; } - - public void setArrayNode(UDFArrayDetails arrayNode) { + public void setArrayNode(@javax.annotation.Nullable UDFArrayDetails arrayNode) { this.arrayNode = arrayNode; } - public TaskGraphNode inputNode(TGInputNodeData inputNode) { - + public TaskGraphNode inputNode(@javax.annotation.Nullable TGInputNodeData inputNode) { this.inputNode = inputNode; return this; } - /** + /** * Get inputNode * @return inputNode - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public TGInputNodeData getInputNode() { return inputNode; } - - public void setInputNode(TGInputNodeData inputNode) { + public void setInputNode(@javax.annotation.Nullable TGInputNodeData inputNode) { this.inputNode = inputNode; } - public TaskGraphNode sqlNode(TGSQLNodeData sqlNode) { - + public TaskGraphNode sqlNode(@javax.annotation.Nullable TGSQLNodeData sqlNode) { this.sqlNode = sqlNode; return this; } - /** + /** * Get sqlNode * @return sqlNode - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public TGSQLNodeData getSqlNode() { return sqlNode; } - - public void setSqlNode(TGSQLNodeData sqlNode) { + public void setSqlNode(@javax.annotation.Nullable TGSQLNodeData sqlNode) { this.sqlNode = sqlNode; } - public TaskGraphNode udfNode(TGUDFNodeData udfNode) { - + public TaskGraphNode udfNode(@javax.annotation.Nullable TGUDFNodeData udfNode) { this.udfNode = udfNode; return this; } - /** + /** * Get udfNode * @return udfNode - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public TGUDFNodeData getUdfNode() { return udfNode; } - - public void setUdfNode(TGUDFNodeData udfNode) { + public void setUdfNode(@javax.annotation.Nullable TGUDFNodeData udfNode) { this.udfNode = udfNode; } - public TaskGraphNode retryStrategy(RetryStrategy retryStrategy) { - + public TaskGraphNode retryStrategy(@javax.annotation.Nullable RetryStrategy retryStrategy) { this.retryStrategy = retryStrategy; return this; } - /** + /** * Get retryStrategy * @return retryStrategy - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public RetryStrategy getRetryStrategy() { return retryStrategy; } - - public void setRetryStrategy(RetryStrategy retryStrategy) { + public void setRetryStrategy(@javax.annotation.Nullable RetryStrategy retryStrategy) { this.retryStrategy = retryStrategy; } - public TaskGraphNode expandNodeOutput(String expandNodeOutput) { - + public TaskGraphNode expandNodeOutput(@javax.annotation.Nullable String expandNodeOutput) { this.expandNodeOutput = expandNodeOutput; return this; } - /** + /** * Used to create dynamic tasks based on the output of another node. The other node's output must be a JSON list of values. The expansion process creates one task per item in the output list. The item is also passed as an argument to each task. The value is the client_node_uuid of the node that we want to expand. * @return expandNodeOutput - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Used to create dynamic tasks based on the output of another node. The other node's output must be a JSON list of values. The expansion process creates one task per item in the output list. The item is also passed as an argument to each task. The value is the client_node_uuid of the node that we want to expand. ") - public String getExpandNodeOutput() { return expandNodeOutput; } - - public void setExpandNodeOutput(String expandNodeOutput) { + public void setExpandNodeOutput(@javax.annotation.Nullable String expandNodeOutput) { this.expandNodeOutput = expandNodeOutput; } - public TaskGraphNode deadline(Long deadline) { - + public TaskGraphNode deadline(@javax.annotation.Nullable Long deadline) { this.deadline = deadline; return this; } - /** + /** * Duration in seconds relative to the node start time which the node is allowed to run before it gets terminated. * @return deadline - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Duration in seconds relative to the node start time which the node is allowed to run before it gets terminated. ") - public Long getDeadline() { return deadline; } - - public void setDeadline(Long deadline) { + public void setDeadline(@javax.annotation.Nullable Long deadline) { this.deadline = deadline; } - /** - * 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. - */ - public TaskGraphNode 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -380,8 +328,7 @@ public boolean equals(Object o) { Objects.equals(this.udfNode, taskGraphNode.udfNode) && Objects.equals(this.retryStrategy, taskGraphNode.retryStrategy) && Objects.equals(this.expandNodeOutput, taskGraphNode.expandNodeOutput) && - Objects.equals(this.deadline, taskGraphNode.deadline)&& - Objects.equals(this.additionalProperties, taskGraphNode.additionalProperties); + Objects.equals(this.deadline, taskGraphNode.deadline); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -390,7 +337,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(clientNodeId, name, dependsOn, arrayNode, inputNode, sqlNode, udfNode, retryStrategy, expandNodeOutput, deadline, additionalProperties); + return Objects.hash(clientNodeId, name, dependsOn, arrayNode, inputNode, sqlNode, udfNode, retryStrategy, expandNodeOutput, deadline); } private static int hashCodeNullable(JsonNullable a) { @@ -414,7 +361,6 @@ public String toString() { sb.append(" retryStrategy: ").append(toIndentedString(retryStrategy)).append("\n"); sb.append(" expandNodeOutput: ").append(toIndentedString(expandNodeOutput)).append("\n"); sb.append(" deadline: ").append(toIndentedString(deadline)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -452,49 +398,56 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TaskGraphNode - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (TaskGraphNode.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 TaskGraphNode + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TaskGraphNode.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in TaskGraphNode is not found in the empty JSON string", TaskGraphNode.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TaskGraphNode.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TaskGraphNode` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("client_node_id") != null && !jsonObj.get("client_node_id").isJsonNull()) && !jsonObj.get("client_node_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `client_node_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("client_node_id").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !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())); } - // ensure the json data is an array - if ((jsonObj.get("depends_on") != null && !jsonObj.get("depends_on").isJsonNull()) && !jsonObj.get("depends_on").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("depends_on") != null && !jsonObj.get("depends_on").isJsonNull() && !jsonObj.get("depends_on").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `depends_on` to be an array in the JSON string but got `%s`", jsonObj.get("depends_on").toString())); } // validate the optional field `array_node` if (jsonObj.get("array_node") != null && !jsonObj.get("array_node").isJsonNull()) { - UDFArrayDetails.validateJsonObject(jsonObj.getAsJsonObject("array_node")); + UDFArrayDetails.validateJsonElement(jsonObj.get("array_node")); } // validate the optional field `input_node` if (jsonObj.get("input_node") != null && !jsonObj.get("input_node").isJsonNull()) { - TGInputNodeData.validateJsonObject(jsonObj.getAsJsonObject("input_node")); + TGInputNodeData.validateJsonElement(jsonObj.get("input_node")); } // validate the optional field `sql_node` if (jsonObj.get("sql_node") != null && !jsonObj.get("sql_node").isJsonNull()) { - TGSQLNodeData.validateJsonObject(jsonObj.getAsJsonObject("sql_node")); + TGSQLNodeData.validateJsonElement(jsonObj.get("sql_node")); } // validate the optional field `udf_node` if (jsonObj.get("udf_node") != null && !jsonObj.get("udf_node").isJsonNull()) { - TGUDFNodeData.validateJsonObject(jsonObj.getAsJsonObject("udf_node")); + TGUDFNodeData.validateJsonElement(jsonObj.get("udf_node")); } // validate the optional field `retry_strategy` if (jsonObj.get("retry_strategy") != null && !jsonObj.get("retry_strategy").isJsonNull()) { - RetryStrategy.validateJsonObject(jsonObj.getAsJsonObject("retry_strategy")); + RetryStrategy.validateJsonElement(jsonObj.get("retry_strategy")); } if ((jsonObj.get("expand_node_output") != null && !jsonObj.get("expand_node_output").isJsonNull()) && !jsonObj.get("expand_node_output").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `expand_node_output` to be a primitive type in the JSON string but got `%s`", jsonObj.get("expand_node_output").toString())); @@ -516,71 +469,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, TaskGraphNode value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 TaskGraphNode read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - TaskGraphNode 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of TaskGraphNode given an JSON string - * - * @param jsonString JSON string - * @return An instance of TaskGraphNode - * @throws IOException if the JSON string is invalid with respect to TaskGraphNode - */ + /** + * Create an instance of TaskGraphNode given an JSON string + * + * @param jsonString JSON string + * @return An instance of TaskGraphNode + * @throws IOException if the JSON string is invalid with respect to TaskGraphNode + */ public static TaskGraphNode fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TaskGraphNode.class); } - /** - * Convert an instance of TaskGraphNode to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TaskGraphNode to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphNodeMetadata.java b/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphNodeMetadata.java index 3ed4672..4902af3 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphNodeMetadata.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphNodeMetadata.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,74 +11,89 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; - +import org.openapitools.client.model.ArrayTask; +import org.openapitools.client.model.ArrayTaskStatus; +import org.openapitools.client.model.TaskGraphLogRunLocation; import org.openapitools.jackson.nullable.JsonNullable; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Metadata about an individual node in a task graph. */ -@ApiModel(description = "Metadata about an individual node in a task graph.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class TaskGraphNodeMetadata { public static final String SERIALIZED_NAME_CLIENT_NODE_UUID = "client_node_uuid"; @SerializedName(SERIALIZED_NAME_CLIENT_NODE_UUID) + @javax.annotation.Nullable private String clientNodeUuid; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_DEPENDS_ON = "depends_on"; @SerializedName(SERIALIZED_NAME_DEPENDS_ON) - private List dependsOn = null; + @javax.annotation.Nullable + private List dependsOn = new ArrayList<>(); public static final String SERIALIZED_NAME_RUN_LOCATION = "run_location"; @SerializedName(SERIALIZED_NAME_RUN_LOCATION) + @javax.annotation.Nullable private TaskGraphLogRunLocation runLocation; public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable private ArrayTaskStatus status; public static final String SERIALIZED_NAME_STATUS_MESSAGE = "status_message"; @SerializedName(SERIALIZED_NAME_STATUS_MESSAGE) + @javax.annotation.Nullable private String statusMessage; public static final String SERIALIZED_NAME_EXECUTIONS = "executions"; @SerializedName(SERIALIZED_NAME_EXECUTIONS) - private List executions = null; + @javax.annotation.Nullable + private List executions = new ArrayList<>(); public TaskGraphNodeMetadata() { } - public TaskGraphNodeMetadata( List executions ) { @@ -86,54 +101,45 @@ public TaskGraphNodeMetadata( this.executions = executions; } - public TaskGraphNodeMetadata clientNodeUuid(String clientNodeUuid) { - + public TaskGraphNodeMetadata clientNodeUuid(@javax.annotation.Nullable String clientNodeUuid) { this.clientNodeUuid = clientNodeUuid; return this; } - /** + /** * The client-generated UUID of the given graph node. * @return clientNodeUuid - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The client-generated UUID of the given graph node.") - public String getClientNodeUuid() { return clientNodeUuid; } - - public void setClientNodeUuid(String clientNodeUuid) { + public void setClientNodeUuid(@javax.annotation.Nullable String clientNodeUuid) { this.clientNodeUuid = clientNodeUuid; } - public TaskGraphNodeMetadata name(String name) { - + public TaskGraphNodeMetadata name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * The client-generated name of the node. This is not guaranteed to be unique. * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The client-generated name of the node. This is not guaranteed to be unique. ") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public TaskGraphNodeMetadata dependsOn(List dependsOn) { - + public TaskGraphNodeMetadata dependsOn(@javax.annotation.Nullable List dependsOn) { this.dependsOn = dependsOn; return this; } @@ -146,141 +152,88 @@ public TaskGraphNodeMetadata addDependsOnItem(String dependsOnItem) { return this; } - /** + /** * The client_node_uuid of each node that this node depends upon. Used to define the structure of the graph. * @return dependsOn - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The client_node_uuid of each node that this node depends upon. Used to define the structure of the graph. ") - public List getDependsOn() { return dependsOn; } - - public void setDependsOn(List dependsOn) { + public void setDependsOn(@javax.annotation.Nullable List dependsOn) { this.dependsOn = dependsOn; } - public TaskGraphNodeMetadata runLocation(TaskGraphLogRunLocation runLocation) { - + public TaskGraphNodeMetadata runLocation(@javax.annotation.Nullable TaskGraphLogRunLocation runLocation) { this.runLocation = runLocation; return this; } - /** + /** * Get runLocation * @return runLocation - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public TaskGraphLogRunLocation getRunLocation() { return runLocation; } - - public void setRunLocation(TaskGraphLogRunLocation runLocation) { + public void setRunLocation(@javax.annotation.Nullable TaskGraphLogRunLocation runLocation) { this.runLocation = runLocation; } - public TaskGraphNodeMetadata status(ArrayTaskStatus status) { - + public TaskGraphNodeMetadata status(@javax.annotation.Nullable ArrayTaskStatus status) { this.status = status; return this; } - /** + /** * Get status * @return status - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public ArrayTaskStatus getStatus() { return status; } - - public void setStatus(ArrayTaskStatus status) { + public void setStatus(@javax.annotation.Nullable ArrayTaskStatus status) { this.status = status; } - public TaskGraphNodeMetadata statusMessage(String statusMessage) { - + public TaskGraphNodeMetadata statusMessage(@javax.annotation.Nullable String statusMessage) { this.statusMessage = statusMessage; return this; } - /** + /** * The reason the array task status is in the state * @return statusMessage - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The reason the array task status is in the state") - public String getStatusMessage() { return statusMessage; } - - public void setStatusMessage(String statusMessage) { + public void setStatusMessage(@javax.annotation.Nullable String statusMessage) { this.statusMessage = statusMessage; } - /** + /** * ArrayTasks representing each execution attempt for this node. For nodes that have never been submitted, this will be empty. For nodes that have been retried, this may have multiple entries. The last one in the list represents the most recent execution. This is read-only and generated by the server based on the tasks it has actually executed. * @return executions - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "ArrayTasks representing each execution attempt for this node. For nodes that have never been submitted, this will be empty. For nodes that have been retried, this may have multiple entries. The last one in the list represents the most recent execution. This is read-only and generated by the server based on the tasks it has actually executed. ") - public List getExecutions() { return executions; } - /** - * 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. - */ - public TaskGraphNodeMetadata 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - @Override public boolean equals(Object o) { @@ -297,8 +250,7 @@ public boolean equals(Object o) { Objects.equals(this.runLocation, taskGraphNodeMetadata.runLocation) && Objects.equals(this.status, taskGraphNodeMetadata.status) && Objects.equals(this.statusMessage, taskGraphNodeMetadata.statusMessage) && - Objects.equals(this.executions, taskGraphNodeMetadata.executions)&& - Objects.equals(this.additionalProperties, taskGraphNodeMetadata.additionalProperties); + Objects.equals(this.executions, taskGraphNodeMetadata.executions); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -307,7 +259,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(clientNodeUuid, name, dependsOn, runLocation, status, statusMessage, executions, additionalProperties); + return Objects.hash(clientNodeUuid, name, dependsOn, runLocation, status, statusMessage, executions); } private static int hashCodeNullable(JsonNullable a) { @@ -328,7 +280,6 @@ public String toString() { sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" statusMessage: ").append(toIndentedString(statusMessage)).append("\n"); sb.append(" executions: ").append(toIndentedString(executions)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -363,44 +314,61 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TaskGraphNodeMetadata - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (TaskGraphNodeMetadata.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 TaskGraphNodeMetadata + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TaskGraphNodeMetadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in TaskGraphNodeMetadata is not found in the empty JSON string", TaskGraphNodeMetadata.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TaskGraphNodeMetadata.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TaskGraphNodeMetadata` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("client_node_uuid") != null && !jsonObj.get("client_node_uuid").isJsonNull()) && !jsonObj.get("client_node_uuid").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `client_node_uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("client_node_uuid").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !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())); } - // ensure the json data is an array - if ((jsonObj.get("depends_on") != null && !jsonObj.get("depends_on").isJsonNull()) && !jsonObj.get("depends_on").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("depends_on") != null && !jsonObj.get("depends_on").isJsonNull() && !jsonObj.get("depends_on").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `depends_on` to be an array in the JSON string but got `%s`", jsonObj.get("depends_on").toString())); } + // validate the optional field `run_location` + if (jsonObj.get("run_location") != null && !jsonObj.get("run_location").isJsonNull()) { + TaskGraphLogRunLocation.validateJsonElement(jsonObj.get("run_location")); + } + // validate the optional field `status` + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { + ArrayTaskStatus.validateJsonElement(jsonObj.get("status")); + } if ((jsonObj.get("status_message") != null && !jsonObj.get("status_message").isJsonNull()) && !jsonObj.get("status_message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `status_message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status_message").toString())); } - JsonArray jsonArrayexecutions = jsonObj.getAsJsonArray("executions"); - if (jsonArrayexecutions != null) { - // ensure the json data is an array - if (!jsonObj.get("executions").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `executions` to be an array in the JSON string but got `%s`", jsonObj.get("executions").toString())); + if (jsonObj.get("executions") != null && !jsonObj.get("executions").isJsonNull()) { + JsonArray jsonArrayexecutions = jsonObj.getAsJsonArray("executions"); + if (jsonArrayexecutions != null) { + // ensure the json data is an array + if (!jsonObj.get("executions").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `executions` to be an array in the JSON string but got `%s`", jsonObj.get("executions").toString())); + } + + // validate the optional field `executions` (array) + for (int i = 0; i < jsonArrayexecutions.size(); i++) { + ArrayTask.validateJsonElement(jsonArrayexecutions.get(i)); + }; } - - // validate the optional field `executions` (array) - for (int i = 0; i < jsonArrayexecutions.size(); i++) { - ArrayTask.validateJsonObject(jsonArrayexecutions.get(i).getAsJsonObject()); - }; } } @@ -419,71 +387,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, TaskGraphNodeMetadata value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 TaskGraphNodeMetadata read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - TaskGraphNodeMetadata 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of TaskGraphNodeMetadata given an JSON string - * - * @param jsonString JSON string - * @return An instance of TaskGraphNodeMetadata - * @throws IOException if the JSON string is invalid with respect to TaskGraphNodeMetadata - */ + /** + * Create an instance of TaskGraphNodeMetadata given an JSON string + * + * @param jsonString JSON string + * @return An instance of TaskGraphNodeMetadata + * @throws IOException if the JSON string is invalid with respect to TaskGraphNodeMetadata + */ public static TaskGraphNodeMetadata fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TaskGraphNodeMetadata.class); } - /** - * Convert an instance of TaskGraphNodeMetadata to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TaskGraphNodeMetadata to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphSharing.java b/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphSharing.java index 0f243d3..578ac27 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphSharing.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphSharing.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,56 +11,67 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.TaskGraphActions; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * details for sharing a given registered task graph */ -@ApiModel(description = "details for sharing a given registered task graph") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class TaskGraphSharing { public static final String SERIALIZED_NAME_ACTIONS = "actions"; @SerializedName(SERIALIZED_NAME_ACTIONS) - private List actions = null; + @javax.annotation.Nullable + private List actions = new ArrayList<>(); public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; @SerializedName(SERIALIZED_NAME_NAMESPACE) + @javax.annotation.Nullable private String namespace; public static final String SERIALIZED_NAME_NAMESPACE_TYPE = "namespace_type"; @SerializedName(SERIALIZED_NAME_NAMESPACE_TYPE) + @javax.annotation.Nullable private String namespaceType; public TaskGraphSharing() { } - public TaskGraphSharing actions(List actions) { - + public TaskGraphSharing actions(@javax.annotation.Nullable List actions) { this.actions = actions; return this; } @@ -73,103 +84,57 @@ public TaskGraphSharing addActionsItem(TaskGraphActions actionsItem) { return this; } - /** + /** * List of permitted actions * @return actions - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "[fetch_task_graph, share_task_graph]", value = "List of permitted actions") - public List getActions() { return actions; } - - public void setActions(List actions) { + public void setActions(@javax.annotation.Nullable List actions) { this.actions = actions; } - public TaskGraphSharing namespace(String namespace) { - + public TaskGraphSharing namespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; return this; } - /** + /** * namespace being granted array access can be a user or organization * @return namespace - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "MyOrganization", value = "namespace being granted array access can be a user or organization") - public String getNamespace() { return namespace; } - - public void setNamespace(String namespace) { + public void setNamespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; } - public TaskGraphSharing namespaceType(String namespaceType) { - + public TaskGraphSharing namespaceType(@javax.annotation.Nullable String namespaceType) { this.namespaceType = namespaceType; return this; } - /** + /** * details on if the namespace is a organization or user * @return namespaceType - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "organization", value = "details on if the namespace is a organization or user") - public String getNamespaceType() { return namespaceType; } - - public void setNamespaceType(String namespaceType) { + public void setNamespaceType(@javax.annotation.Nullable String namespaceType) { this.namespaceType = namespaceType; } - /** - * 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. - */ - public TaskGraphSharing 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -183,13 +148,12 @@ public boolean equals(Object o) { TaskGraphSharing taskGraphSharing = (TaskGraphSharing) o; return Objects.equals(this.actions, taskGraphSharing.actions) && Objects.equals(this.namespace, taskGraphSharing.namespace) && - Objects.equals(this.namespaceType, taskGraphSharing.namespaceType)&& - Objects.equals(this.additionalProperties, taskGraphSharing.additionalProperties); + Objects.equals(this.namespaceType, taskGraphSharing.namespaceType); } @Override public int hashCode() { - return Objects.hash(actions, namespace, namespaceType, additionalProperties); + return Objects.hash(actions, namespace, namespaceType); } @Override @@ -199,7 +163,6 @@ public String toString() { sb.append(" actions: ").append(toIndentedString(actions)).append("\n"); sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); sb.append(" namespaceType: ").append(toIndentedString(namespaceType)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -230,22 +193,29 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TaskGraphSharing - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (TaskGraphSharing.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 TaskGraphSharing + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TaskGraphSharing.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in TaskGraphSharing is not found in the empty JSON string", TaskGraphSharing.openapiRequiredFields.toString())); } } - // ensure the json data is an array - if ((jsonObj.get("actions") != null && !jsonObj.get("actions").isJsonNull()) && !jsonObj.get("actions").isJsonArray()) { + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TaskGraphSharing.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TaskGraphSharing` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("actions") != null && !jsonObj.get("actions").isJsonNull() && !jsonObj.get("actions").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `actions` to be an array in the JSON string but got `%s`", jsonObj.get("actions").toString())); } if ((jsonObj.get("namespace") != null && !jsonObj.get("namespace").isJsonNull()) && !jsonObj.get("namespace").isJsonPrimitive()) { @@ -271,71 +241,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, TaskGraphSharing value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 TaskGraphSharing read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - TaskGraphSharing 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of TaskGraphSharing given an JSON string - * - * @param jsonString JSON string - * @return An instance of TaskGraphSharing - * @throws IOException if the JSON string is invalid with respect to TaskGraphSharing - */ + /** + * Create an instance of TaskGraphSharing given an JSON string + * + * @param jsonString JSON string + * @return An instance of TaskGraphSharing + * @throws IOException if the JSON string is invalid with respect to TaskGraphSharing + */ public static TaskGraphSharing fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TaskGraphSharing.class); } - /** - * Convert an instance of TaskGraphSharing to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TaskGraphSharing to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphType.java b/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphType.java index 888185f..e582993 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphType.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphType.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -65,5 +69,10 @@ public TaskGraphType read(final JsonReader jsonReader) throws IOException { return TaskGraphType.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TaskGraphType.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphs.java b/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphs.java index 1699690..228b7c1 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphs.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/TaskGraphs.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,49 +11,57 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.TaskGraph; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Information about a series of task graphs. */ -@ApiModel(description = "Information about a series of task graphs.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class TaskGraphs { public static final String SERIALIZED_NAME_GRAPHS = "graphs"; @SerializedName(SERIALIZED_NAME_GRAPHS) - private List graphs = null; + @javax.annotation.Nullable + private List graphs = new ArrayList<>(); public TaskGraphs() { } - public TaskGraphs graphs(List graphs) { - + public TaskGraphs graphs(@javax.annotation.Nullable List graphs) { this.graphs = graphs; return this; } @@ -66,57 +74,19 @@ public TaskGraphs addGraphsItem(TaskGraph graphsItem) { return this; } - /** + /** * The series of graphs. * @return graphs - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The series of graphs. ") - public List getGraphs() { return graphs; } - - public void setGraphs(List graphs) { + public void setGraphs(@javax.annotation.Nullable List graphs) { this.graphs = graphs; } - /** - * 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. - */ - public TaskGraphs 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -128,13 +98,12 @@ public boolean equals(Object o) { return false; } TaskGraphs taskGraphs = (TaskGraphs) o; - return Objects.equals(this.graphs, taskGraphs.graphs)&& - Objects.equals(this.additionalProperties, taskGraphs.additionalProperties); + return Objects.equals(this.graphs, taskGraphs.graphs); } @Override public int hashCode() { - return Objects.hash(graphs, additionalProperties); + return Objects.hash(graphs); } @Override @@ -142,7 +111,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TaskGraphs {\n"); sb.append(" graphs: ").append(toIndentedString(graphs)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -171,31 +139,40 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TaskGraphs - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (TaskGraphs.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 TaskGraphs + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TaskGraphs.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in TaskGraphs is not found in the empty JSON string", TaskGraphs.openapiRequiredFields.toString())); } } - JsonArray jsonArraygraphs = jsonObj.getAsJsonArray("graphs"); - if (jsonArraygraphs != null) { - // ensure the json data is an array - if (!jsonObj.get("graphs").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `graphs` to be an array in the JSON string but got `%s`", jsonObj.get("graphs").toString())); - } - // validate the optional field `graphs` (array) - for (int i = 0; i < jsonArraygraphs.size(); i++) { - TaskGraph.validateJsonObject(jsonArraygraphs.get(i).getAsJsonObject()); - }; + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TaskGraphs.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TaskGraphs` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("graphs") != null && !jsonObj.get("graphs").isJsonNull()) { + JsonArray jsonArraygraphs = jsonObj.getAsJsonArray("graphs"); + if (jsonArraygraphs != null) { + // ensure the json data is an array + if (!jsonObj.get("graphs").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `graphs` to be an array in the JSON string but got `%s`", jsonObj.get("graphs").toString())); + } + + // validate the optional field `graphs` (array) + for (int i = 0; i < jsonArraygraphs.size(); i++) { + TaskGraph.validateJsonElement(jsonArraygraphs.get(i)); + }; + } } } @@ -214,71 +191,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, TaskGraphs value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 TaskGraphs read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - TaskGraphs 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of TaskGraphs given an JSON string - * - * @param jsonString JSON string - * @return An instance of TaskGraphs - * @throws IOException if the JSON string is invalid with respect to TaskGraphs - */ + /** + * Create an instance of TaskGraphs given an JSON string + * + * @param jsonString JSON string + * @return An instance of TaskGraphs + * @throws IOException if the JSON string is invalid with respect to TaskGraphs + */ public static TaskGraphs fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TaskGraphs.class); } - /** - * Convert an instance of TaskGraphs to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TaskGraphs to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/TileDBConfig.java b/src/main/java/io/tiledb/cloud/rest_api/model/TileDBConfig.java index 8416228..128c83c 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/TileDBConfig.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/TileDBConfig.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,49 +11,57 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.TileDBConfigEntriesInner; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * TileDB config used for interaction with the embedded library */ -@ApiModel(description = "TileDB config used for interaction with the embedded library") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class TileDBConfig { public static final String SERIALIZED_NAME_ENTRIES = "entries"; @SerializedName(SERIALIZED_NAME_ENTRIES) - private List entries = null; + @javax.annotation.Nullable + private List entries = new ArrayList<>(); public TileDBConfig() { } - public TileDBConfig entries(List entries) { - + public TileDBConfig entries(@javax.annotation.Nullable List entries) { this.entries = entries; return this; } @@ -66,57 +74,19 @@ public TileDBConfig addEntriesItem(TileDBConfigEntriesInner entriesItem) { return this; } - /** + /** * Get entries * @return entries - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getEntries() { return entries; } - - public void setEntries(List entries) { + public void setEntries(@javax.annotation.Nullable List entries) { this.entries = entries; } - /** - * 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. - */ - public TileDBConfig 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -128,13 +98,12 @@ public boolean equals(Object o) { return false; } TileDBConfig tileDBConfig = (TileDBConfig) o; - return Objects.equals(this.entries, tileDBConfig.entries)&& - Objects.equals(this.additionalProperties, tileDBConfig.additionalProperties); + return Objects.equals(this.entries, tileDBConfig.entries); } @Override public int hashCode() { - return Objects.hash(entries, additionalProperties); + return Objects.hash(entries); } @Override @@ -142,7 +111,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TileDBConfig {\n"); sb.append(" entries: ").append(toIndentedString(entries)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -171,31 +139,40 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TileDBConfig - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (TileDBConfig.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 TileDBConfig + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TileDBConfig.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in TileDBConfig is not found in the empty JSON string", TileDBConfig.openapiRequiredFields.toString())); } } - JsonArray jsonArrayentries = jsonObj.getAsJsonArray("entries"); - if (jsonArrayentries != null) { - // ensure the json data is an array - if (!jsonObj.get("entries").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `entries` to be an array in the JSON string but got `%s`", jsonObj.get("entries").toString())); - } - // validate the optional field `entries` (array) - for (int i = 0; i < jsonArrayentries.size(); i++) { - TileDBConfigEntriesInner.validateJsonObject(jsonArrayentries.get(i).getAsJsonObject()); - }; + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TileDBConfig.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TileDBConfig` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("entries") != null && !jsonObj.get("entries").isJsonNull()) { + JsonArray jsonArrayentries = jsonObj.getAsJsonArray("entries"); + if (jsonArrayentries != null) { + // ensure the json data is an array + if (!jsonObj.get("entries").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `entries` to be an array in the JSON string but got `%s`", jsonObj.get("entries").toString())); + } + + // validate the optional field `entries` (array) + for (int i = 0; i < jsonArrayentries.size(); i++) { + TileDBConfigEntriesInner.validateJsonElement(jsonArrayentries.get(i)); + }; + } } } @@ -214,71 +191,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, TileDBConfig value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 TileDBConfig read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - TileDBConfig 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of TileDBConfig given an JSON string - * - * @param jsonString JSON string - * @return An instance of TileDBConfig - * @throws IOException if the JSON string is invalid with respect to TileDBConfig - */ + /** + * Create an instance of TileDBConfig given an JSON string + * + * @param jsonString JSON string + * @return An instance of TileDBConfig + * @throws IOException if the JSON string is invalid with respect to TileDBConfig + */ public static TileDBConfig fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TileDBConfig.class); } - /** - * Convert an instance of TileDBConfig to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TileDBConfig to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/TileDBConfigEntriesInner.java b/src/main/java/io/tiledb/cloud/rest_api/model/TileDBConfigEntriesInner.java index 8c5333f..0d58738 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/TileDBConfigEntriesInner.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/TileDBConfigEntriesInner.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,126 +11,95 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModelProperty; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * TileDBConfigEntriesInner */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class TileDBConfigEntriesInner { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) + @javax.annotation.Nullable private String key; public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nullable private String value; public TileDBConfigEntriesInner() { } - public TileDBConfigEntriesInner key(String key) { - + public TileDBConfigEntriesInner key(@javax.annotation.Nullable String key) { this.key = key; return this; } - /** + /** * Get key * @return key - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getKey() { return key; } - - public void setKey(String key) { + public void setKey(@javax.annotation.Nullable String key) { this.key = key; } - public TileDBConfigEntriesInner value(String value) { - + public TileDBConfigEntriesInner value(@javax.annotation.Nullable String value) { this.value = value; return this; } - /** + /** * Get value * @return value - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getValue() { return value; } - - public void setValue(String value) { + public void setValue(@javax.annotation.Nullable 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. - */ - public TileDBConfigEntriesInner 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -143,13 +112,12 @@ public boolean equals(Object o) { } TileDBConfigEntriesInner tileDBConfigEntriesInner = (TileDBConfigEntriesInner) o; return Objects.equals(this.key, tileDBConfigEntriesInner.key) && - Objects.equals(this.value, tileDBConfigEntriesInner.value)&& - Objects.equals(this.additionalProperties, tileDBConfigEntriesInner.additionalProperties); + Objects.equals(this.value, tileDBConfigEntriesInner.value); } @Override public int hashCode() { - return Objects.hash(key, value, additionalProperties); + return Objects.hash(key, value); } @Override @@ -158,7 +126,6 @@ public String toString() { sb.append("class TileDBConfigEntriesInner {\n"); sb.append(" key: ").append(toIndentedString(key)).append("\n"); sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -188,20 +155,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TileDBConfigEntriesInner - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (TileDBConfigEntriesInner.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 TileDBConfigEntriesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TileDBConfigEntriesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in TileDBConfigEntriesInner is not found in the empty JSON string", TileDBConfigEntriesInner.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TileDBConfigEntriesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TileDBConfigEntriesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("key") != null && !jsonObj.get("key").isJsonNull()) && !jsonObj.get("key").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); } @@ -225,71 +199,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, TileDBConfigEntriesInner value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 TileDBConfigEntriesInner read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - TileDBConfigEntriesInner 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of TileDBConfigEntriesInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of TileDBConfigEntriesInner - * @throws IOException if the JSON string is invalid with respect to TileDBConfigEntriesInner - */ + /** + * Create an instance of TileDBConfigEntriesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of TileDBConfigEntriesInner + * @throws IOException if the JSON string is invalid with respect to TileDBConfigEntriesInner + */ public static TileDBConfigEntriesInner fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TileDBConfigEntriesInner.class); } - /** - * Convert an instance of TileDBConfigEntriesInner to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TileDBConfigEntriesInner to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/Token.java b/src/main/java/io/tiledb/cloud/rest_api/model/Token.java index 5d4fadf..eed2f1e 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/Token.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/Token.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,157 +11,154 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.TokenScope; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * A api token and its metadata */ -@ApiModel(description = "A api token and its metadata") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class Token { public static final String SERIALIZED_NAME_TOKEN = "token"; @SerializedName(SERIALIZED_NAME_TOKEN) + @javax.annotation.Nullable private String token; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_ISSUED_AT = "issued_at"; @SerializedName(SERIALIZED_NAME_ISSUED_AT) + @javax.annotation.Nullable private OffsetDateTime issuedAt; public static final String SERIALIZED_NAME_EXPIRES_AT = "expires_at"; @SerializedName(SERIALIZED_NAME_EXPIRES_AT) + @javax.annotation.Nullable private OffsetDateTime expiresAt; public static final String SERIALIZED_NAME_SCOPE = "scope"; @SerializedName(SERIALIZED_NAME_SCOPE) - private List scope = null; + @javax.annotation.Nullable + private List scope = new ArrayList<>(); public Token() { } - public Token token(String token) { - + public Token token(@javax.annotation.Nullable String token) { this.token = token; return this; } - /** + /** * A api token * @return token - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "A api token") - public String getToken() { return token; } - - public void setToken(String token) { + public void setToken(@javax.annotation.Nullable String token) { this.token = token; } - public Token name(String name) { - + public Token name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * Name of token to revoke * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Name of token to revoke") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public Token issuedAt(OffsetDateTime issuedAt) { - + public Token issuedAt(@javax.annotation.Nullable OffsetDateTime issuedAt) { this.issuedAt = issuedAt; return this; } - /** + /** * datetime the token was created * @return issuedAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "datetime the token was created") - public OffsetDateTime getIssuedAt() { return issuedAt; } - - public void setIssuedAt(OffsetDateTime issuedAt) { + public void setIssuedAt(@javax.annotation.Nullable OffsetDateTime issuedAt) { this.issuedAt = issuedAt; } - public Token expiresAt(OffsetDateTime expiresAt) { - + public Token expiresAt(@javax.annotation.Nullable OffsetDateTime expiresAt) { this.expiresAt = expiresAt; return this; } - /** + /** * datetime the token when token will expire * @return expiresAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "datetime the token when token will expire") - public OffsetDateTime getExpiresAt() { return expiresAt; } - - public void setExpiresAt(OffsetDateTime expiresAt) { + public void setExpiresAt(@javax.annotation.Nullable OffsetDateTime expiresAt) { this.expiresAt = expiresAt; } - public Token scope(List scope) { - + public Token scope(@javax.annotation.Nullable List scope) { this.scope = scope; return this; } @@ -174,57 +171,19 @@ public Token addScopeItem(TokenScope scopeItem) { return this; } - /** + /** * Optional scope to limit token, defaults to all permissions, current supported values are password_reset or * * @return scope - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Optional scope to limit token, defaults to all permissions, current supported values are password_reset or *") - public List getScope() { return scope; } - - public void setScope(List scope) { + public void setScope(@javax.annotation.Nullable List scope) { this.scope = scope; } - /** - * 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. - */ - public Token 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -240,13 +199,12 @@ public boolean equals(Object o) { Objects.equals(this.name, token.name) && Objects.equals(this.issuedAt, token.issuedAt) && Objects.equals(this.expiresAt, token.expiresAt) && - Objects.equals(this.scope, token.scope)&& - Objects.equals(this.additionalProperties, token.additionalProperties); + Objects.equals(this.scope, token.scope); } @Override public int hashCode() { - return Objects.hash(token, name, issuedAt, expiresAt, scope, additionalProperties); + return Objects.hash(token, name, issuedAt, expiresAt, scope); } @Override @@ -258,7 +216,6 @@ public String toString() { sb.append(" issuedAt: ").append(toIndentedString(issuedAt)).append("\n"); sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -291,28 +248,35 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Token - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (Token.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 Token + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Token.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in Token is not found in the empty JSON string", Token.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Token.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Token` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("token") != null && !jsonObj.get("token").isJsonNull()) && !jsonObj.get("token").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("token").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !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())); } - // ensure the json data is an array - if ((jsonObj.get("scope") != null && !jsonObj.get("scope").isJsonNull()) && !jsonObj.get("scope").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("scope") != null && !jsonObj.get("scope").isJsonNull() && !jsonObj.get("scope").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `scope` to be an array in the JSON string but got `%s`", jsonObj.get("scope").toString())); } } @@ -332,71 +296,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, Token value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 Token read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - Token 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Token given an JSON string - * - * @param jsonString JSON string - * @return An instance of Token - * @throws IOException if the JSON string is invalid with respect to Token - */ + /** + * Create an instance of Token given an JSON string + * + * @param jsonString JSON string + * @return An instance of Token + * @throws IOException if the JSON string is invalid with respect to Token + */ public static Token fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Token.class); } - /** - * Convert an instance of Token to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Token to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/TokenRequest.java b/src/main/java/io/tiledb/cloud/rest_api/model/TokenRequest.java index e623046..cd2a537 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/TokenRequest.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/TokenRequest.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,103 +11,106 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.TokenScope; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * A request from a user for an api token */ -@ApiModel(description = "A request from a user for an api token") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class TokenRequest { public static final String SERIALIZED_NAME_EXPIRES = "expires"; @SerializedName(SERIALIZED_NAME_EXPIRES) + @javax.annotation.Nullable private OffsetDateTime expires; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_SCOPE = "scope"; @SerializedName(SERIALIZED_NAME_SCOPE) - private List scope = null; + @javax.annotation.Nullable + private List scope = new ArrayList<>(); public TokenRequest() { } - public TokenRequest expires(OffsetDateTime expires) { - + public TokenRequest expires(@javax.annotation.Nullable OffsetDateTime expires) { this.expires = expires; return this; } - /** + /** * Expiration date for token, if empty token defaults to 30 minutes * @return expires - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "2018-12-31T12:13:14Z", value = "Expiration date for token, if empty token defaults to 30 minutes") - public OffsetDateTime getExpires() { return expires; } - - public void setExpires(OffsetDateTime expires) { + public void setExpires(@javax.annotation.Nullable OffsetDateTime expires) { this.expires = expires; } - public TokenRequest name(String name) { - + public TokenRequest name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * Optional name for token, if the name already exists for the user it will be auto incremented (i.e. myToken-1) * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "myToken", value = "Optional name for token, if the name already exists for the user it will be auto incremented (i.e. myToken-1)") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public TokenRequest scope(List scope) { - + public TokenRequest scope(@javax.annotation.Nullable List scope) { this.scope = scope; return this; } @@ -120,57 +123,19 @@ public TokenRequest addScopeItem(TokenScope scopeItem) { return this; } - /** + /** * Optional scope to limit token, defaults to all permissions, current supported values are password_reset or * * @return scope - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Optional scope to limit token, defaults to all permissions, current supported values are password_reset or *") - public List getScope() { return scope; } - - public void setScope(List scope) { + public void setScope(@javax.annotation.Nullable List scope) { this.scope = scope; } - /** - * 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. - */ - public TokenRequest 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -184,13 +149,12 @@ public boolean equals(Object o) { TokenRequest tokenRequest = (TokenRequest) o; return Objects.equals(this.expires, tokenRequest.expires) && Objects.equals(this.name, tokenRequest.name) && - Objects.equals(this.scope, tokenRequest.scope)&& - Objects.equals(this.additionalProperties, tokenRequest.additionalProperties); + Objects.equals(this.scope, tokenRequest.scope); } @Override public int hashCode() { - return Objects.hash(expires, name, scope, additionalProperties); + return Objects.hash(expires, name, scope); } @Override @@ -200,7 +164,6 @@ public String toString() { sb.append(" expires: ").append(toIndentedString(expires)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -231,25 +194,32 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TokenRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (TokenRequest.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 TokenRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TokenRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in TokenRequest is not found in the empty JSON string", TokenRequest.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TokenRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TokenRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !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())); } - // ensure the json data is an array - if ((jsonObj.get("scope") != null && !jsonObj.get("scope").isJsonNull()) && !jsonObj.get("scope").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("scope") != null && !jsonObj.get("scope").isJsonNull() && !jsonObj.get("scope").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `scope` to be an array in the JSON string but got `%s`", jsonObj.get("scope").toString())); } } @@ -269,71 +239,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, TokenRequest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 TokenRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - TokenRequest 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of TokenRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of TokenRequest - * @throws IOException if the JSON string is invalid with respect to TokenRequest - */ + /** + * Create an instance of TokenRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of TokenRequest + * @throws IOException if the JSON string is invalid with respect to TokenRequest + */ public static TokenRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TokenRequest.class); } - /** - * Convert an instance of TokenRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TokenRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/TokenScope.java b/src/main/java/io/tiledb/cloud/rest_api/model/TokenScope.java index 562e24b..89edd33 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/TokenScope.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/TokenScope.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -91,5 +95,10 @@ public TokenScope read(final JsonReader jsonReader) throws IOException { return TokenScope.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TokenScope.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/UDFActions.java b/src/main/java/io/tiledb/cloud/rest_api/model/UDFActions.java index 1de3937..2871cab 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/UDFActions.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/UDFActions.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -65,5 +69,10 @@ public UDFActions read(final JsonReader jsonReader) throws IOException { return UDFActions.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + UDFActions.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/UDFArrayDetails.java b/src/main/java/io/tiledb/cloud/rest_api/model/UDFArrayDetails.java index 976b048..b9a4bac 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/UDFArrayDetails.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/UDFArrayDetails.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,130 +11,130 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; - -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.model.QueryRanges; import org.openapitools.jackson.nullable.JsonNullable; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; /** * Contains array details for multi-array query including uri, ranges buffers */ -@ApiModel(description = "Contains array details for multi-array query including uri, ranges buffers") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class UDFArrayDetails { public static final String SERIALIZED_NAME_PARAMETER_ID = "parameter_id"; @SerializedName(SERIALIZED_NAME_PARAMETER_ID) + @javax.annotation.Nullable private String parameterId; public static final String SERIALIZED_NAME_URI = "uri"; @SerializedName(SERIALIZED_NAME_URI) + @javax.annotation.Nullable private String uri; public static final String SERIALIZED_NAME_RANGES = "ranges"; @SerializedName(SERIALIZED_NAME_RANGES) + @javax.annotation.Nullable private QueryRanges ranges; public static final String SERIALIZED_NAME_BUFFERS = "buffers"; @SerializedName(SERIALIZED_NAME_BUFFERS) - private List buffers = null; + @javax.annotation.Nullable + private List buffers = new ArrayList<>(); public UDFArrayDetails() { } - public UDFArrayDetails parameterId(String parameterId) { - + public UDFArrayDetails parameterId(@javax.annotation.Nullable String parameterId) { this.parameterId = parameterId; return this; } - /** + /** * An optional client-generated identifier to distinguish between multiple range/buffer requests from the same array in the same call. This may be set for MultiArrayUDFs that use the `argument_json` style of passing arrays. * @return parameterId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "An optional client-generated identifier to distinguish between multiple range/buffer requests from the same array in the same call. This may be set for MultiArrayUDFs that use the `argument_json` style of passing arrays. ") - public String getParameterId() { return parameterId; } - - public void setParameterId(String parameterId) { + public void setParameterId(@javax.annotation.Nullable String parameterId) { this.parameterId = parameterId; } - public UDFArrayDetails uri(String uri) { - + public UDFArrayDetails uri(@javax.annotation.Nullable String uri) { this.uri = uri; return this; } - /** + /** * array to set ranges and buffers on, must be in tiledb:// format * @return uri - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "array to set ranges and buffers on, must be in tiledb:// format") - public String getUri() { return uri; } - - public void setUri(String uri) { + public void setUri(@javax.annotation.Nullable String uri) { this.uri = uri; } - public UDFArrayDetails ranges(QueryRanges ranges) { - + public UDFArrayDetails ranges(@javax.annotation.Nullable QueryRanges ranges) { this.ranges = ranges; return this; } - /** + /** * Get ranges * @return ranges - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public QueryRanges getRanges() { return ranges; } - - public void setRanges(QueryRanges ranges) { + public void setRanges(@javax.annotation.Nullable QueryRanges ranges) { this.ranges = ranges; } - public UDFArrayDetails buffers(List buffers) { - + public UDFArrayDetails buffers(@javax.annotation.Nullable List buffers) { this.buffers = buffers; return this; } @@ -147,57 +147,19 @@ public UDFArrayDetails addBuffersItem(String buffersItem) { return this; } - /** + /** * List of buffers to fetch (attributes + dimensions) * @return buffers - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "List of buffers to fetch (attributes + dimensions)") - public List getBuffers() { return buffers; } - - public void setBuffers(List buffers) { + public void setBuffers(@javax.annotation.Nullable List buffers) { this.buffers = buffers; } - /** - * 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. - */ - public UDFArrayDetails 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -212,8 +174,7 @@ public boolean equals(Object o) { return Objects.equals(this.parameterId, udFArrayDetails.parameterId) && Objects.equals(this.uri, udFArrayDetails.uri) && Objects.equals(this.ranges, udFArrayDetails.ranges) && - Objects.equals(this.buffers, udFArrayDetails.buffers)&& - Objects.equals(this.additionalProperties, udFArrayDetails.additionalProperties); + Objects.equals(this.buffers, udFArrayDetails.buffers); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -222,7 +183,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(parameterId, uri, ranges, buffers, additionalProperties); + return Objects.hash(parameterId, uri, ranges, buffers); } private static int hashCodeNullable(JsonNullable a) { @@ -240,7 +201,6 @@ public String toString() { sb.append(" uri: ").append(toIndentedString(uri)).append("\n"); sb.append(" ranges: ").append(toIndentedString(ranges)).append("\n"); sb.append(" buffers: ").append(toIndentedString(buffers)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -272,20 +232,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UDFArrayDetails - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (UDFArrayDetails.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 UDFArrayDetails + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UDFArrayDetails.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in UDFArrayDetails is not found in the empty JSON string", UDFArrayDetails.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UDFArrayDetails.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UDFArrayDetails` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("parameter_id") != null && !jsonObj.get("parameter_id").isJsonNull()) && !jsonObj.get("parameter_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `parameter_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parameter_id").toString())); } @@ -294,10 +261,10 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `ranges` if (jsonObj.get("ranges") != null && !jsonObj.get("ranges").isJsonNull()) { - QueryRanges.validateJsonObject(jsonObj.getAsJsonObject("ranges")); + QueryRanges.validateJsonElement(jsonObj.get("ranges")); } - // ensure the json data is an array - if ((jsonObj.get("buffers") != null && !jsonObj.get("buffers").isJsonNull()) && !jsonObj.get("buffers").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("buffers") != null && !jsonObj.get("buffers").isJsonNull() && !jsonObj.get("buffers").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `buffers` to be an array in the JSON string but got `%s`", jsonObj.get("buffers").toString())); } } @@ -317,71 +284,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, UDFArrayDetails value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 UDFArrayDetails read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - UDFArrayDetails 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UDFArrayDetails given an JSON string - * - * @param jsonString JSON string - * @return An instance of UDFArrayDetails - * @throws IOException if the JSON string is invalid with respect to UDFArrayDetails - */ + /** + * Create an instance of UDFArrayDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of UDFArrayDetails + * @throws IOException if the JSON string is invalid with respect to UDFArrayDetails + */ public static UDFArrayDetails fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UDFArrayDetails.class); } - /** - * Convert an instance of UDFArrayDetails to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UDFArrayDetails to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/UDFCopied.java b/src/main/java/io/tiledb/cloud/rest_api/model/UDFCopied.java index 60c237d..399a231 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/UDFCopied.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/UDFCopied.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,182 +11,143 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Copied udf uri and information */ -@ApiModel(description = "Copied udf uri and information") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class UDFCopied { public static final String SERIALIZED_NAME_OUTPUT_URI = "output_uri"; @SerializedName(SERIALIZED_NAME_OUTPUT_URI) + @javax.annotation.Nullable private String outputUri; public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; @SerializedName(SERIALIZED_NAME_NAMESPACE) + @javax.annotation.Nullable private String namespace; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public UDFCopied() { } - public UDFCopied outputUri(String outputUri) { - + public UDFCopied outputUri(@javax.annotation.Nullable String outputUri) { this.outputUri = outputUri; return this; } - /** + /** * output location of the TileDB udf * @return outputUri - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "output location of the TileDB udf") - public String getOutputUri() { return outputUri; } - - public void setOutputUri(String outputUri) { + public void setOutputUri(@javax.annotation.Nullable String outputUri) { this.outputUri = outputUri; } - public UDFCopied namespace(String namespace) { - + public UDFCopied namespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; return this; } - /** + /** * namespace of the copied udf * @return namespace - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "namespace of the copied udf") - public String getNamespace() { return namespace; } - - public void setNamespace(String namespace) { + public void setNamespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; } - public UDFCopied name(String name) { - + public UDFCopied name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * name of the copied udf * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "name of the copied udf") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public UDFCopied id(String id) { - + public UDFCopied id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * unique ID of the copied udf * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", required = true, value = "unique ID of the copied udf") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - /** - * 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. - */ - public UDFCopied 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -201,13 +162,12 @@ public boolean equals(Object o) { return Objects.equals(this.outputUri, udFCopied.outputUri) && Objects.equals(this.namespace, udFCopied.namespace) && Objects.equals(this.name, udFCopied.name) && - Objects.equals(this.id, udFCopied.id)&& - Objects.equals(this.additionalProperties, udFCopied.additionalProperties); + Objects.equals(this.id, udFCopied.id); } @Override public int hashCode() { - return Objects.hash(outputUri, namespace, name, id, additionalProperties); + return Objects.hash(outputUri, namespace, name, id); } @Override @@ -218,7 +178,6 @@ public String toString() { sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -251,27 +210,34 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("id"); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UDFCopied - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (UDFCopied.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 UDFCopied + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UDFCopied.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in UDFCopied is not found in the empty JSON string", UDFCopied.openapiRequiredFields.toString())); } } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UDFCopied.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UDFCopied` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + // check to make sure all required properties/fields are present in the JSON string for (String requiredField : UDFCopied.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + 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("output_uri") != null && !jsonObj.get("output_uri").isJsonNull()) && !jsonObj.get("output_uri").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `output_uri` to be a primitive type in the JSON string but got `%s`", jsonObj.get("output_uri").toString())); } @@ -281,7 +247,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !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("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + 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())); } } @@ -301,71 +267,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, UDFCopied value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 UDFCopied read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - UDFCopied 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UDFCopied given an JSON string - * - * @param jsonString JSON string - * @return An instance of UDFCopied - * @throws IOException if the JSON string is invalid with respect to UDFCopied - */ + /** + * Create an instance of UDFCopied given an JSON string + * + * @param jsonString JSON string + * @return An instance of UDFCopied + * @throws IOException if the JSON string is invalid with respect to UDFCopied + */ public static UDFCopied fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UDFCopied.class); } - /** - * Convert an instance of UDFCopied to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UDFCopied to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/UDFCopy.java b/src/main/java/io/tiledb/cloud/rest_api/model/UDFCopy.java index b3e315c..3758c8e 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/UDFCopy.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/UDFCopy.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,155 +11,119 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * information required to copy a udf */ -@ApiModel(description = "information required to copy a udf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class UDFCopy { public static final String SERIALIZED_NAME_OUTPUT_URI = "output_uri"; @SerializedName(SERIALIZED_NAME_OUTPUT_URI) + @javax.annotation.Nullable private String outputUri; public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; @SerializedName(SERIALIZED_NAME_NAMESPACE) + @javax.annotation.Nullable private String namespace; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public UDFCopy() { } - public UDFCopy outputUri(String outputUri) { - + public UDFCopy outputUri(@javax.annotation.Nullable String outputUri) { this.outputUri = outputUri; return this; } - /** + /** * output location of the TileDB File * @return outputUri - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "output location of the TileDB File") - public String getOutputUri() { return outputUri; } - - public void setOutputUri(String outputUri) { + public void setOutputUri(@javax.annotation.Nullable String outputUri) { this.outputUri = outputUri; } - public UDFCopy namespace(String namespace) { - + public UDFCopy namespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; return this; } - /** + /** * namespace to register the copy. If empty use the namespace of the request user * @return namespace - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "namespace to register the copy. If empty use the namespace of the request user") - public String getNamespace() { return namespace; } - - public void setNamespace(String namespace) { + public void setNamespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; } - public UDFCopy name(String name) { - + public UDFCopy name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * name to set for the copy. If empty use the name as the original udf, if it not already used in the namespace * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "name to set for the copy. If empty use the name as the original udf, if it not already used in the namespace") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - /** - * 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. - */ - public UDFCopy 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -173,13 +137,12 @@ public boolean equals(Object o) { UDFCopy udFCopy = (UDFCopy) o; return Objects.equals(this.outputUri, udFCopy.outputUri) && Objects.equals(this.namespace, udFCopy.namespace) && - Objects.equals(this.name, udFCopy.name)&& - Objects.equals(this.additionalProperties, udFCopy.additionalProperties); + Objects.equals(this.name, udFCopy.name); } @Override public int hashCode() { - return Objects.hash(outputUri, namespace, name, additionalProperties); + return Objects.hash(outputUri, namespace, name); } @Override @@ -189,7 +152,6 @@ public String toString() { sb.append(" outputUri: ").append(toIndentedString(outputUri)).append("\n"); sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -220,20 +182,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UDFCopy - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (UDFCopy.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 UDFCopy + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UDFCopy.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in UDFCopy is not found in the empty JSON string", UDFCopy.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UDFCopy.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UDFCopy` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("output_uri") != null && !jsonObj.get("output_uri").isJsonNull()) && !jsonObj.get("output_uri").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `output_uri` to be a primitive type in the JSON string but got `%s`", jsonObj.get("output_uri").toString())); } @@ -260,71 +229,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, UDFCopy value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 UDFCopy read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - UDFCopy 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UDFCopy given an JSON string - * - * @param jsonString JSON string - * @return An instance of UDFCopy - * @throws IOException if the JSON string is invalid with respect to UDFCopy - */ + /** + * Create an instance of UDFCopy given an JSON string + * + * @param jsonString JSON string + * @return An instance of UDFCopy + * @throws IOException if the JSON string is invalid with respect to UDFCopy + */ public static UDFCopy fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UDFCopy.class); } - /** - * Convert an instance of UDFCopy to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UDFCopy to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/UDFFavorite.java b/src/main/java/io/tiledb/cloud/rest_api/model/UDFFavorite.java index 7d2b7d7..a6e58e6 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/UDFFavorite.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/UDFFavorite.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,155 +11,119 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * A user-favorite UDF item */ -@ApiModel(description = "A user-favorite UDF item") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class UDFFavorite { public static final String SERIALIZED_NAME_UDF_UUID = "udf_uuid"; @SerializedName(SERIALIZED_NAME_UDF_UUID) + @javax.annotation.Nullable private String udfUuid; public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; @SerializedName(SERIALIZED_NAME_NAMESPACE) + @javax.annotation.Nullable private String namespace; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public UDFFavorite() { } - public UDFFavorite udfUuid(String udfUuid) { - + public UDFFavorite udfUuid(@javax.annotation.Nullable String udfUuid) { this.udfUuid = udfUuid; return this; } - /** + /** * unique UUID of the UDF * @return udfUuid - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "unique UUID of the UDF") - public String getUdfUuid() { return udfUuid; } - - public void setUdfUuid(String udfUuid) { + public void setUdfUuid(@javax.annotation.Nullable String udfUuid) { this.udfUuid = udfUuid; } - public UDFFavorite namespace(String namespace) { - + public UDFFavorite namespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; return this; } - /** + /** * the namespace of the UDF * @return namespace - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "the namespace of the UDF") - public String getNamespace() { return namespace; } - - public void setNamespace(String namespace) { + public void setNamespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; } - public UDFFavorite name(String name) { - + public UDFFavorite name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * the name of the UDF * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "the name of the UDF") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - /** - * 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. - */ - public UDFFavorite 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -173,13 +137,12 @@ public boolean equals(Object o) { UDFFavorite udFFavorite = (UDFFavorite) o; return Objects.equals(this.udfUuid, udFFavorite.udfUuid) && Objects.equals(this.namespace, udFFavorite.namespace) && - Objects.equals(this.name, udFFavorite.name)&& - Objects.equals(this.additionalProperties, udFFavorite.additionalProperties); + Objects.equals(this.name, udFFavorite.name); } @Override public int hashCode() { - return Objects.hash(udfUuid, namespace, name, additionalProperties); + return Objects.hash(udfUuid, namespace, name); } @Override @@ -189,7 +152,6 @@ public String toString() { sb.append(" udfUuid: ").append(toIndentedString(udfUuid)).append("\n"); sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -220,20 +182,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UDFFavorite - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (UDFFavorite.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 UDFFavorite + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UDFFavorite.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in UDFFavorite is not found in the empty JSON string", UDFFavorite.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UDFFavorite.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UDFFavorite` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("udf_uuid") != null && !jsonObj.get("udf_uuid").isJsonNull()) && !jsonObj.get("udf_uuid").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `udf_uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("udf_uuid").toString())); } @@ -260,71 +229,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, UDFFavorite value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 UDFFavorite read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - UDFFavorite 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UDFFavorite given an JSON string - * - * @param jsonString JSON string - * @return An instance of UDFFavorite - * @throws IOException if the JSON string is invalid with respect to UDFFavorite - */ + /** + * Create an instance of UDFFavorite given an JSON string + * + * @param jsonString JSON string + * @return An instance of UDFFavorite + * @throws IOException if the JSON string is invalid with respect to UDFFavorite + */ public static UDFFavorite fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UDFFavorite.class); } - /** - * Convert an instance of UDFFavorite to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UDFFavorite to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/UDFFavoritesData.java b/src/main/java/io/tiledb/cloud/rest_api/model/UDFFavoritesData.java index c3d7d28..e8580e0 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/UDFFavoritesData.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/UDFFavoritesData.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,53 +11,63 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.ArrayInfo; +import org.openapitools.client.model.PaginationMetadata; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Object including UDF favorites and pagination metadata */ -@ApiModel(description = "Object including UDF favorites and pagination metadata") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class UDFFavoritesData { public static final String SERIALIZED_NAME_UDFS = "udfs"; @SerializedName(SERIALIZED_NAME_UDFS) - private List udfs = null; + @javax.annotation.Nullable + private List udfs = new ArrayList<>(); public static final String SERIALIZED_NAME_PAGINATION_METADATA = "pagination_metadata"; @SerializedName(SERIALIZED_NAME_PAGINATION_METADATA) + @javax.annotation.Nullable private PaginationMetadata paginationMetadata; public UDFFavoritesData() { } - public UDFFavoritesData udfs(List udfs) { - + public UDFFavoritesData udfs(@javax.annotation.Nullable List udfs) { this.udfs = udfs; return this; } @@ -70,80 +80,38 @@ public UDFFavoritesData addUdfsItem(ArrayInfo udfsItem) { return this; } - /** + /** * List of UDF infos * @return udfs - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "List of UDF infos") - public List getUdfs() { return udfs; } - - public void setUdfs(List udfs) { + public void setUdfs(@javax.annotation.Nullable List udfs) { this.udfs = udfs; } - public UDFFavoritesData paginationMetadata(PaginationMetadata paginationMetadata) { - + public UDFFavoritesData paginationMetadata(@javax.annotation.Nullable PaginationMetadata paginationMetadata) { this.paginationMetadata = paginationMetadata; return this; } - /** + /** * Get paginationMetadata * @return paginationMetadata - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public PaginationMetadata getPaginationMetadata() { return paginationMetadata; } - - public void setPaginationMetadata(PaginationMetadata paginationMetadata) { + public void setPaginationMetadata(@javax.annotation.Nullable PaginationMetadata paginationMetadata) { this.paginationMetadata = paginationMetadata; } - /** - * 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. - */ - public UDFFavoritesData 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -156,13 +124,12 @@ public boolean equals(Object o) { } UDFFavoritesData udFFavoritesData = (UDFFavoritesData) o; return Objects.equals(this.udfs, udFFavoritesData.udfs) && - Objects.equals(this.paginationMetadata, udFFavoritesData.paginationMetadata)&& - Objects.equals(this.additionalProperties, udFFavoritesData.additionalProperties); + Objects.equals(this.paginationMetadata, udFFavoritesData.paginationMetadata); } @Override public int hashCode() { - return Objects.hash(udfs, paginationMetadata, additionalProperties); + return Objects.hash(udfs, paginationMetadata); } @Override @@ -171,7 +138,6 @@ public String toString() { sb.append("class UDFFavoritesData {\n"); sb.append(" udfs: ").append(toIndentedString(udfs)).append("\n"); sb.append(" paginationMetadata: ").append(toIndentedString(paginationMetadata)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -201,35 +167,44 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UDFFavoritesData - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (UDFFavoritesData.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 UDFFavoritesData + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UDFFavoritesData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in UDFFavoritesData is not found in the empty JSON string", UDFFavoritesData.openapiRequiredFields.toString())); } } - JsonArray jsonArrayudfs = jsonObj.getAsJsonArray("udfs"); - if (jsonArrayudfs != null) { - // ensure the json data is an array - if (!jsonObj.get("udfs").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `udfs` to be an array in the JSON string but got `%s`", jsonObj.get("udfs").toString())); - } - // validate the optional field `udfs` (array) - for (int i = 0; i < jsonArrayudfs.size(); i++) { - ArrayInfo.validateJsonObject(jsonArrayudfs.get(i).getAsJsonObject()); - }; + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UDFFavoritesData.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UDFFavoritesData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("udfs") != null && !jsonObj.get("udfs").isJsonNull()) { + JsonArray jsonArrayudfs = jsonObj.getAsJsonArray("udfs"); + if (jsonArrayudfs != null) { + // ensure the json data is an array + if (!jsonObj.get("udfs").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `udfs` to be an array in the JSON string but got `%s`", jsonObj.get("udfs").toString())); + } + + // validate the optional field `udfs` (array) + for (int i = 0; i < jsonArrayudfs.size(); i++) { + ArrayInfo.validateJsonElement(jsonArrayudfs.get(i)); + }; + } } // validate the optional field `pagination_metadata` if (jsonObj.get("pagination_metadata") != null && !jsonObj.get("pagination_metadata").isJsonNull()) { - PaginationMetadata.validateJsonObject(jsonObj.getAsJsonObject("pagination_metadata")); + PaginationMetadata.validateJsonElement(jsonObj.get("pagination_metadata")); } } @@ -248,71 +223,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, UDFFavoritesData value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 UDFFavoritesData read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - UDFFavoritesData 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UDFFavoritesData given an JSON string - * - * @param jsonString JSON string - * @return An instance of UDFFavoritesData - * @throws IOException if the JSON string is invalid with respect to UDFFavoritesData - */ + /** + * Create an instance of UDFFavoritesData given an JSON string + * + * @param jsonString JSON string + * @return An instance of UDFFavoritesData + * @throws IOException if the JSON string is invalid with respect to UDFFavoritesData + */ public static UDFFavoritesData fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UDFFavoritesData.class); } - /** - * Convert an instance of UDFFavoritesData to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UDFFavoritesData to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/UDFImage.java b/src/main/java/io/tiledb/cloud/rest_api/model/UDFImage.java index d07f710..599e5fa 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/UDFImage.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/UDFImage.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,155 +11,120 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.UDFLanguage; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Defines a set of images related to a specific name */ -@ApiModel(description = "Defines a set of images related to a specific name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class UDFImage { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private String id; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_LANGUAGE = "language"; @SerializedName(SERIALIZED_NAME_LANGUAGE) + @javax.annotation.Nullable private UDFLanguage language; public UDFImage() { } - public UDFImage id(String id) { - + public UDFImage id(@javax.annotation.Nullable String id) { this.id = id; return this; } - /** + /** * Unique ID of set of images * @return id - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", value = "Unique ID of set of images") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nullable String id) { this.id = id; } - public UDFImage name(String name) { - + public UDFImage name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * name of UDF * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "name of UDF") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public UDFImage language(UDFLanguage language) { - + public UDFImage language(@javax.annotation.Nullable UDFLanguage language) { this.language = language; return this; } - /** + /** * Get language * @return language - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public UDFLanguage getLanguage() { return language; } - - public void setLanguage(UDFLanguage language) { + public void setLanguage(@javax.annotation.Nullable UDFLanguage language) { this.language = language; } - /** - * 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. - */ - public UDFImage 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -173,13 +138,12 @@ public boolean equals(Object o) { UDFImage udFImage = (UDFImage) o; return Objects.equals(this.id, udFImage.id) && Objects.equals(this.name, udFImage.name) && - Objects.equals(this.language, udFImage.language)&& - Objects.equals(this.additionalProperties, udFImage.additionalProperties); + Objects.equals(this.language, udFImage.language); } @Override public int hashCode() { - return Objects.hash(id, name, language, additionalProperties); + return Objects.hash(id, name, language); } @Override @@ -189,7 +153,6 @@ public String toString() { sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" language: ").append(toIndentedString(language)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -220,26 +183,37 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UDFImage - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (UDFImage.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 UDFImage + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UDFImage.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in UDFImage is not found in the empty JSON string", UDFImage.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UDFImage.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UDFImage` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !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())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !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())); } + // validate the optional field `language` + if (jsonObj.get("language") != null && !jsonObj.get("language").isJsonNull()) { + UDFLanguage.validateJsonElement(jsonObj.get("language")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -257,71 +231,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, UDFImage value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 UDFImage read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - UDFImage 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UDFImage given an JSON string - * - * @param jsonString JSON string - * @return An instance of UDFImage - * @throws IOException if the JSON string is invalid with respect to UDFImage - */ + /** + * Create an instance of UDFImage given an JSON string + * + * @param jsonString JSON string + * @return An instance of UDFImage + * @throws IOException if the JSON string is invalid with respect to UDFImage + */ public static UDFImage fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UDFImage.class); } - /** - * Convert an instance of UDFImage to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UDFImage to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/UDFImageVersion.java b/src/main/java/io/tiledb/cloud/rest_api/model/UDFImageVersion.java index 54a491c..9b47aee 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/UDFImageVersion.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/UDFImageVersion.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,264 +11,216 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; +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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Defines an image that belongs to a set of images having a version */ -@ApiModel(description = "Defines an image that belongs to a set of images having a version") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class UDFImageVersion { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private String id; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_UDF_IMAGE_UUID = "udf_image_uuid"; @SerializedName(SERIALIZED_NAME_UDF_IMAGE_UUID) + @javax.annotation.Nullable private String udfImageUuid; public static final String SERIALIZED_NAME_DOCKER_IMAGE = "docker_image"; @SerializedName(SERIALIZED_NAME_DOCKER_IMAGE) + @javax.annotation.Nullable private String dockerImage; public static final String SERIALIZED_NAME_VERSION = "version"; @SerializedName(SERIALIZED_NAME_VERSION) + @javax.annotation.Nullable private BigDecimal version; public static final String SERIALIZED_NAME_DEFAULT = "default"; @SerializedName(SERIALIZED_NAME_DEFAULT) + @javax.annotation.Nullable private Boolean _default; public static final String SERIALIZED_NAME_LATEST = "latest"; @SerializedName(SERIALIZED_NAME_LATEST) + @javax.annotation.Nullable private Boolean latest; public UDFImageVersion() { } - public UDFImageVersion id(String id) { - + public UDFImageVersion id(@javax.annotation.Nullable String id) { this.id = id; return this; } - /** + /** * Unique ID of a versioned image * @return id - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", value = "Unique ID of a versioned image") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nullable String id) { this.id = id; } - public UDFImageVersion name(String name) { - + public UDFImageVersion name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * name of UDFImageVersion * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "name of UDFImageVersion") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public UDFImageVersion udfImageUuid(String udfImageUuid) { - + public UDFImageVersion udfImageUuid(@javax.annotation.Nullable String udfImageUuid) { this.udfImageUuid = udfImageUuid; return this; } - /** + /** * Unique ID of the UDF image set * @return udfImageUuid - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", value = "Unique ID of the UDF image set") - public String getUdfImageUuid() { return udfImageUuid; } - - public void setUdfImageUuid(String udfImageUuid) { + public void setUdfImageUuid(@javax.annotation.Nullable String udfImageUuid) { this.udfImageUuid = udfImageUuid; } - public UDFImageVersion dockerImage(String dockerImage) { - + public UDFImageVersion dockerImage(@javax.annotation.Nullable String dockerImage) { this.dockerImage = dockerImage; return this; } - /** + /** * Uri of docker image related to current entry * @return dockerImage - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Uri of docker image related to current entry") - public String getDockerImage() { return dockerImage; } - - public void setDockerImage(String dockerImage) { + public void setDockerImage(@javax.annotation.Nullable String dockerImage) { this.dockerImage = dockerImage; } - public UDFImageVersion version(BigDecimal version) { - + public UDFImageVersion version(@javax.annotation.Nullable BigDecimal version) { this.version = version; return this; } - /** + /** * Image-specific version * @return version - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "2.0", value = "Image-specific version") - public BigDecimal getVersion() { return version; } - - public void setVersion(BigDecimal version) { + public void setVersion(@javax.annotation.Nullable BigDecimal version) { this.version = version; } - public UDFImageVersion _default(Boolean _default) { - + public UDFImageVersion _default(@javax.annotation.Nullable Boolean _default) { this._default = _default; return this; } - /** + /** * If current image is default version * @return _default - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "If current image is default version") - public Boolean getDefault() { return _default; } - - public void setDefault(Boolean _default) { + public void setDefault(@javax.annotation.Nullable Boolean _default) { this._default = _default; } - public UDFImageVersion latest(Boolean latest) { - + public UDFImageVersion latest(@javax.annotation.Nullable Boolean latest) { this.latest = latest; return this; } - /** + /** * If current image is latest version * @return latest - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "If current image is latest version") - public Boolean getLatest() { return latest; } - - public void setLatest(Boolean latest) { + public void setLatest(@javax.annotation.Nullable Boolean latest) { this.latest = latest; } - /** - * 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. - */ - public UDFImageVersion 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -286,13 +238,12 @@ public boolean equals(Object o) { Objects.equals(this.dockerImage, udFImageVersion.dockerImage) && Objects.equals(this.version, udFImageVersion.version) && Objects.equals(this._default, udFImageVersion._default) && - Objects.equals(this.latest, udFImageVersion.latest)&& - Objects.equals(this.additionalProperties, udFImageVersion.additionalProperties); + Objects.equals(this.latest, udFImageVersion.latest); } @Override public int hashCode() { - return Objects.hash(id, name, udfImageUuid, dockerImage, version, _default, latest, additionalProperties); + return Objects.hash(id, name, udfImageUuid, dockerImage, version, _default, latest); } @Override @@ -306,7 +257,6 @@ public String toString() { sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append(" _default: ").append(toIndentedString(_default)).append("\n"); sb.append(" latest: ").append(toIndentedString(latest)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -341,20 +291,27 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UDFImageVersion - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (UDFImageVersion.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 UDFImageVersion + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UDFImageVersion.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in UDFImageVersion is not found in the empty JSON string", UDFImageVersion.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UDFImageVersion.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UDFImageVersion` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !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())); } @@ -384,71 +341,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, UDFImageVersion value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 UDFImageVersion read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - UDFImageVersion 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UDFImageVersion given an JSON string - * - * @param jsonString JSON string - * @return An instance of UDFImageVersion - * @throws IOException if the JSON string is invalid with respect to UDFImageVersion - */ + /** + * Create an instance of UDFImageVersion given an JSON string + * + * @param jsonString JSON string + * @return An instance of UDFImageVersion + * @throws IOException if the JSON string is invalid with respect to UDFImageVersion + */ public static UDFImageVersion fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UDFImageVersion.class); } - /** - * Convert an instance of UDFImageVersion to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UDFImageVersion to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/UDFInfo.java b/src/main/java/io/tiledb/cloud/rest_api/model/UDFInfo.java index b677626..a482f40 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/UDFInfo.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/UDFInfo.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,237 +11,226 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.UDFLanguage; +import org.openapitools.client.model.UDFType; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * User-defined function that can persist in db, used and shared multiple times */ -@ApiModel(description = "User-defined function that can persist in db, used and shared multiple times") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class UDFInfo { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private String id; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_LANGUAGE = "language"; @SerializedName(SERIALIZED_NAME_LANGUAGE) + @javax.annotation.Nullable private UDFLanguage language; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable private UDFType type; public static final String SERIALIZED_NAME_README = "readme"; @SerializedName(SERIALIZED_NAME_README) + @javax.annotation.Nullable private String readme; public static final String SERIALIZED_NAME_LICENSE_ID = "license_id"; @SerializedName(SERIALIZED_NAME_LICENSE_ID) + @javax.annotation.Nullable private String licenseId; public static final String SERIALIZED_NAME_LICENSE_TEXT = "license_text"; @SerializedName(SERIALIZED_NAME_LICENSE_TEXT) + @javax.annotation.Nullable private String licenseText; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; + @javax.annotation.Nullable + private List tags = new ArrayList<>(); public UDFInfo() { } - public UDFInfo id(String id) { - + public UDFInfo id(@javax.annotation.Nullable String id) { this.id = id; return this; } - /** + /** * Unique ID of UDF * @return id - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", value = "Unique ID of UDF") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nullable String id) { this.id = id; } - public UDFInfo name(String name) { - + public UDFInfo name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * name of UDF * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "name of UDF") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public UDFInfo language(UDFLanguage language) { - + public UDFInfo language(@javax.annotation.Nullable UDFLanguage language) { this.language = language; return this; } - /** + /** * Get language * @return language - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public UDFLanguage getLanguage() { return language; } - - public void setLanguage(UDFLanguage language) { + public void setLanguage(@javax.annotation.Nullable UDFLanguage language) { this.language = language; } - public UDFInfo type(UDFType type) { - + public UDFInfo type(@javax.annotation.Nullable UDFType type) { this.type = type; return this; } - /** + /** * Get type * @return type - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public UDFType getType() { return type; } - - public void setType(UDFType type) { + public void setType(@javax.annotation.Nullable UDFType type) { this.type = type; } - public UDFInfo readme(String readme) { - + public UDFInfo readme(@javax.annotation.Nullable String readme) { this.readme = readme; return this; } - /** + /** * Markdown readme of UDFs * @return readme - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Markdown readme of UDFs") - public String getReadme() { return readme; } - - public void setReadme(String readme) { + public void setReadme(@javax.annotation.Nullable String readme) { this.readme = readme; } - public UDFInfo licenseId(String licenseId) { - + public UDFInfo licenseId(@javax.annotation.Nullable String licenseId) { this.licenseId = licenseId; return this; } - /** + /** * License identifier from SPDX License List or Custom * @return licenseId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "License identifier from SPDX License List or Custom") - public String getLicenseId() { return licenseId; } - - public void setLicenseId(String licenseId) { + public void setLicenseId(@javax.annotation.Nullable String licenseId) { this.licenseId = licenseId; } - public UDFInfo licenseText(String licenseText) { - + public UDFInfo licenseText(@javax.annotation.Nullable String licenseText) { this.licenseText = licenseText; return this; } - /** + /** * License text * @return licenseText - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "License text") - public String getLicenseText() { return licenseText; } - - public void setLicenseText(String licenseText) { + public void setLicenseText(@javax.annotation.Nullable String licenseText) { this.licenseText = licenseText; } - public UDFInfo tags(List tags) { - + public UDFInfo tags(@javax.annotation.Nullable List tags) { this.tags = tags; return this; } @@ -254,57 +243,19 @@ public UDFInfo addTagsItem(String tagsItem) { return this; } - /** + /** * optional tags for UDF * @return tags - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "optional tags for UDF") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nullable List tags) { this.tags = tags; } - /** - * 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. - */ - public UDFInfo 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -323,13 +274,12 @@ public boolean equals(Object o) { Objects.equals(this.readme, udFInfo.readme) && Objects.equals(this.licenseId, udFInfo.licenseId) && Objects.equals(this.licenseText, udFInfo.licenseText) && - Objects.equals(this.tags, udFInfo.tags)&& - Objects.equals(this.additionalProperties, udFInfo.additionalProperties); + Objects.equals(this.tags, udFInfo.tags); } @Override public int hashCode() { - return Objects.hash(id, name, language, type, readme, licenseId, licenseText, tags, additionalProperties); + return Objects.hash(id, name, language, type, readme, licenseId, licenseText, tags); } @Override @@ -344,7 +294,6 @@ public String toString() { sb.append(" licenseId: ").append(toIndentedString(licenseId)).append("\n"); sb.append(" licenseText: ").append(toIndentedString(licenseText)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -380,26 +329,41 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UDFInfo - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (UDFInfo.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 UDFInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UDFInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in UDFInfo is not found in the empty JSON string", UDFInfo.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UDFInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UDFInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !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())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !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())); } + // validate the optional field `language` + if (jsonObj.get("language") != null && !jsonObj.get("language").isJsonNull()) { + UDFLanguage.validateJsonElement(jsonObj.get("language")); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + UDFType.validateJsonElement(jsonObj.get("type")); + } if ((jsonObj.get("readme") != null && !jsonObj.get("readme").isJsonNull()) && !jsonObj.get("readme").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `readme` to be a primitive type in the JSON string but got `%s`", jsonObj.get("readme").toString())); } @@ -409,8 +373,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("license_text") != null && !jsonObj.get("license_text").isJsonNull()) && !jsonObj.get("license_text").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `license_text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("license_text").toString())); } - // ensure the json data is an array - if ((jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) && !jsonObj.get("tags").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } } @@ -430,71 +394,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, UDFInfo value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 UDFInfo read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - UDFInfo 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UDFInfo given an JSON string - * - * @param jsonString JSON string - * @return An instance of UDFInfo - * @throws IOException if the JSON string is invalid with respect to UDFInfo - */ + /** + * Create an instance of UDFInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of UDFInfo + * @throws IOException if the JSON string is invalid with respect to UDFInfo + */ public static UDFInfo fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UDFInfo.class); } - /** - * Convert an instance of UDFInfo to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UDFInfo to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/UDFInfoUpdate.java b/src/main/java/io/tiledb/cloud/rest_api/model/UDFInfoUpdate.java index 2693901..198aff2 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/UDFInfoUpdate.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/UDFInfoUpdate.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,318 +11,298 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.UDFLanguage; +import org.openapitools.client.model.UDFType; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * User-defined function that can persist in db, used and shared multiple times */ -@ApiModel(description = "User-defined function that can persist in db, used and shared multiple times") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class UDFInfoUpdate { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_LANGUAGE = "language"; @SerializedName(SERIALIZED_NAME_LANGUAGE) + @javax.annotation.Nullable private UDFLanguage language; public static final String SERIALIZED_NAME_VERSION = "version"; @SerializedName(SERIALIZED_NAME_VERSION) + @javax.annotation.Nullable private String version; public static final String SERIALIZED_NAME_IMAGE_NAME = "image_name"; @SerializedName(SERIALIZED_NAME_IMAGE_NAME) + @javax.annotation.Nullable private String imageName; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable private UDFType type; public static final String SERIALIZED_NAME_EXEC = "exec"; @SerializedName(SERIALIZED_NAME_EXEC) + @javax.annotation.Nullable private String exec; public static final String SERIALIZED_NAME_EXEC_RAW = "exec_raw"; @SerializedName(SERIALIZED_NAME_EXEC_RAW) + @javax.annotation.Nullable private String execRaw; public static final String SERIALIZED_NAME_README = "readme"; @SerializedName(SERIALIZED_NAME_README) + @javax.annotation.Nullable private String readme; public static final String SERIALIZED_NAME_LICENSE_ID = "license_id"; @SerializedName(SERIALIZED_NAME_LICENSE_ID) + @javax.annotation.Nullable private String licenseId; public static final String SERIALIZED_NAME_LICENSE_TEXT = "license_text"; @SerializedName(SERIALIZED_NAME_LICENSE_TEXT) + @javax.annotation.Nullable private String licenseText; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; + @javax.annotation.Nullable + private List tags = new ArrayList<>(); public UDFInfoUpdate() { } - public UDFInfoUpdate name(String name) { - + public UDFInfoUpdate name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * name of UDF * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "name of UDF") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public UDFInfoUpdate language(UDFLanguage language) { - + public UDFInfoUpdate language(@javax.annotation.Nullable UDFLanguage language) { this.language = language; return this; } - /** + /** * Get language * @return language - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public UDFLanguage getLanguage() { return language; } - - public void setLanguage(UDFLanguage language) { + public void setLanguage(@javax.annotation.Nullable UDFLanguage language) { this.language = language; } - public UDFInfoUpdate version(String version) { - + public UDFInfoUpdate version(@javax.annotation.Nullable String version) { this.version = version; return this; } - /** + /** * Type-specific version * @return version - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Type-specific version") - public String getVersion() { return version; } - - public void setVersion(String version) { + public void setVersion(@javax.annotation.Nullable String version) { this.version = version; } - public UDFInfoUpdate imageName(String imageName) { - + public UDFInfoUpdate imageName(@javax.annotation.Nullable String imageName) { this.imageName = imageName; return this; } - /** + /** * Docker image name to use for UDF * @return imageName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Docker image name to use for UDF") - public String getImageName() { return imageName; } - - public void setImageName(String imageName) { + public void setImageName(@javax.annotation.Nullable String imageName) { this.imageName = imageName; } - public UDFInfoUpdate type(UDFType type) { - + public UDFInfoUpdate type(@javax.annotation.Nullable UDFType type) { this.type = type; return this; } - /** + /** * Get type * @return type - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public UDFType getType() { return type; } - - public void setType(UDFType type) { + public void setType(@javax.annotation.Nullable UDFType type) { this.type = type; } - public UDFInfoUpdate exec(String exec) { - + public UDFInfoUpdate exec(@javax.annotation.Nullable String exec) { this.exec = exec; return this; } - /** + /** * Type-specific executable text * @return exec - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Type-specific executable text") - public String getExec() { return exec; } - - public void setExec(String exec) { + public void setExec(@javax.annotation.Nullable String exec) { this.exec = exec; } - public UDFInfoUpdate execRaw(String execRaw) { - + public UDFInfoUpdate execRaw(@javax.annotation.Nullable String execRaw) { this.execRaw = execRaw; return this; } - /** + /** * optional raw text to store of serialized function, used for showing in UI * @return execRaw - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "optional raw text to store of serialized function, used for showing in UI") - public String getExecRaw() { return execRaw; } - - public void setExecRaw(String execRaw) { + public void setExecRaw(@javax.annotation.Nullable String execRaw) { this.execRaw = execRaw; } - public UDFInfoUpdate readme(String readme) { - + public UDFInfoUpdate readme(@javax.annotation.Nullable String readme) { this.readme = readme; return this; } - /** + /** * Markdown readme of UDFs * @return readme - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Markdown readme of UDFs") - public String getReadme() { return readme; } - - public void setReadme(String readme) { + public void setReadme(@javax.annotation.Nullable String readme) { this.readme = readme; } - public UDFInfoUpdate licenseId(String licenseId) { - + public UDFInfoUpdate licenseId(@javax.annotation.Nullable String licenseId) { this.licenseId = licenseId; return this; } - /** + /** * License identifier from SPDX License List or Custom * @return licenseId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "License identifier from SPDX License List or Custom") - public String getLicenseId() { return licenseId; } - - public void setLicenseId(String licenseId) { + public void setLicenseId(@javax.annotation.Nullable String licenseId) { this.licenseId = licenseId; } - public UDFInfoUpdate licenseText(String licenseText) { - + public UDFInfoUpdate licenseText(@javax.annotation.Nullable String licenseText) { this.licenseText = licenseText; return this; } - /** + /** * License text * @return licenseText - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "License text") - public String getLicenseText() { return licenseText; } - - public void setLicenseText(String licenseText) { + public void setLicenseText(@javax.annotation.Nullable String licenseText) { this.licenseText = licenseText; } - public UDFInfoUpdate tags(List tags) { - + public UDFInfoUpdate tags(@javax.annotation.Nullable List tags) { this.tags = tags; return this; } @@ -335,57 +315,19 @@ public UDFInfoUpdate addTagsItem(String tagsItem) { return this; } - /** + /** * optional tags for UDF * @return tags - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "optional tags for UDF") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nullable List tags) { this.tags = tags; } - /** - * 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. - */ - public UDFInfoUpdate 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -407,13 +349,12 @@ public boolean equals(Object o) { Objects.equals(this.readme, udFInfoUpdate.readme) && Objects.equals(this.licenseId, udFInfoUpdate.licenseId) && Objects.equals(this.licenseText, udFInfoUpdate.licenseText) && - Objects.equals(this.tags, udFInfoUpdate.tags)&& - Objects.equals(this.additionalProperties, udFInfoUpdate.additionalProperties); + Objects.equals(this.tags, udFInfoUpdate.tags); } @Override public int hashCode() { - return Objects.hash(name, language, version, imageName, type, exec, execRaw, readme, licenseId, licenseText, tags, additionalProperties); + return Objects.hash(name, language, version, imageName, type, exec, execRaw, readme, licenseId, licenseText, tags); } @Override @@ -431,7 +372,6 @@ public String toString() { sb.append(" licenseId: ").append(toIndentedString(licenseId)).append("\n"); sb.append(" licenseText: ").append(toIndentedString(licenseText)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -470,29 +410,44 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UDFInfoUpdate - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (UDFInfoUpdate.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 UDFInfoUpdate + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UDFInfoUpdate.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in UDFInfoUpdate is not found in the empty JSON string", UDFInfoUpdate.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UDFInfoUpdate.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UDFInfoUpdate` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !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())); } + // validate the optional field `language` + if (jsonObj.get("language") != null && !jsonObj.get("language").isJsonNull()) { + UDFLanguage.validateJsonElement(jsonObj.get("language")); + } if ((jsonObj.get("version") != null && !jsonObj.get("version").isJsonNull()) && !jsonObj.get("version").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `version` to be a primitive type in the JSON string but got `%s`", jsonObj.get("version").toString())); } if ((jsonObj.get("image_name") != null && !jsonObj.get("image_name").isJsonNull()) && !jsonObj.get("image_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `image_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("image_name").toString())); } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + UDFType.validateJsonElement(jsonObj.get("type")); + } if ((jsonObj.get("exec") != null && !jsonObj.get("exec").isJsonNull()) && !jsonObj.get("exec").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `exec` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exec").toString())); } @@ -508,8 +463,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("license_text") != null && !jsonObj.get("license_text").isJsonNull()) && !jsonObj.get("license_text").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `license_text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("license_text").toString())); } - // ensure the json data is an array - if ((jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) && !jsonObj.get("tags").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } } @@ -529,71 +484,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, UDFInfoUpdate value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 UDFInfoUpdate read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - UDFInfoUpdate 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UDFInfoUpdate given an JSON string - * - * @param jsonString JSON string - * @return An instance of UDFInfoUpdate - * @throws IOException if the JSON string is invalid with respect to UDFInfoUpdate - */ + /** + * Create an instance of UDFInfoUpdate given an JSON string + * + * @param jsonString JSON string + * @return An instance of UDFInfoUpdate + * @throws IOException if the JSON string is invalid with respect to UDFInfoUpdate + */ public static UDFInfoUpdate fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UDFInfoUpdate.class); } - /** - * Convert an instance of UDFInfoUpdate to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UDFInfoUpdate to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/UDFLanguage.java b/src/main/java/io/tiledb/cloud/rest_api/model/UDFLanguage.java index 3ffaf4b..b4cc397 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/UDFLanguage.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/UDFLanguage.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -65,5 +69,10 @@ public UDFLanguage read(final JsonReader jsonReader) throws IOException { return UDFLanguage.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + UDFLanguage.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/UDFSharing.java b/src/main/java/io/tiledb/cloud/rest_api/model/UDFSharing.java index 5ba1e61..63f85b1 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/UDFSharing.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/UDFSharing.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,56 +11,67 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.UDFActions; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * details for sharing a given UDF */ -@ApiModel(description = "details for sharing a given UDF") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class UDFSharing { public static final String SERIALIZED_NAME_ACTIONS = "actions"; @SerializedName(SERIALIZED_NAME_ACTIONS) - private List actions = null; + @javax.annotation.Nullable + private List actions = new ArrayList<>(); public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; @SerializedName(SERIALIZED_NAME_NAMESPACE) + @javax.annotation.Nullable private String namespace; public static final String SERIALIZED_NAME_NAMESPACE_TYPE = "namespace_type"; @SerializedName(SERIALIZED_NAME_NAMESPACE_TYPE) + @javax.annotation.Nullable private String namespaceType; public UDFSharing() { } - public UDFSharing actions(List actions) { - + public UDFSharing actions(@javax.annotation.Nullable List actions) { this.actions = actions; return this; } @@ -73,103 +84,57 @@ public UDFSharing addActionsItem(UDFActions actionsItem) { return this; } - /** + /** * List of permitted actions * @return actions - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "[fetch, share]", value = "List of permitted actions") - public List getActions() { return actions; } - - public void setActions(List actions) { + public void setActions(@javax.annotation.Nullable List actions) { this.actions = actions; } - public UDFSharing namespace(String namespace) { - + public UDFSharing namespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; return this; } - /** + /** * namespace being granted array access can be a user or organization * @return namespace - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "MyOrganization", value = "namespace being granted array access can be a user or organization") - public String getNamespace() { return namespace; } - - public void setNamespace(String namespace) { + public void setNamespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; } - public UDFSharing namespaceType(String namespaceType) { - + public UDFSharing namespaceType(@javax.annotation.Nullable String namespaceType) { this.namespaceType = namespaceType; return this; } - /** + /** * details on if the namespace is a organization or user * @return namespaceType - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "organization", value = "details on if the namespace is a organization or user") - public String getNamespaceType() { return namespaceType; } - - public void setNamespaceType(String namespaceType) { + public void setNamespaceType(@javax.annotation.Nullable String namespaceType) { this.namespaceType = namespaceType; } - /** - * 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. - */ - public UDFSharing 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -183,13 +148,12 @@ public boolean equals(Object o) { UDFSharing udFSharing = (UDFSharing) o; return Objects.equals(this.actions, udFSharing.actions) && Objects.equals(this.namespace, udFSharing.namespace) && - Objects.equals(this.namespaceType, udFSharing.namespaceType)&& - Objects.equals(this.additionalProperties, udFSharing.additionalProperties); + Objects.equals(this.namespaceType, udFSharing.namespaceType); } @Override public int hashCode() { - return Objects.hash(actions, namespace, namespaceType, additionalProperties); + return Objects.hash(actions, namespace, namespaceType); } @Override @@ -199,7 +163,6 @@ public String toString() { sb.append(" actions: ").append(toIndentedString(actions)).append("\n"); sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); sb.append(" namespaceType: ").append(toIndentedString(namespaceType)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -230,22 +193,29 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UDFSharing - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (UDFSharing.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 UDFSharing + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UDFSharing.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in UDFSharing is not found in the empty JSON string", UDFSharing.openapiRequiredFields.toString())); } } - // ensure the json data is an array - if ((jsonObj.get("actions") != null && !jsonObj.get("actions").isJsonNull()) && !jsonObj.get("actions").isJsonArray()) { + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UDFSharing.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UDFSharing` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("actions") != null && !jsonObj.get("actions").isJsonNull() && !jsonObj.get("actions").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `actions` to be an array in the JSON string but got `%s`", jsonObj.get("actions").toString())); } if ((jsonObj.get("namespace") != null && !jsonObj.get("namespace").isJsonNull()) && !jsonObj.get("namespace").isJsonPrimitive()) { @@ -271,71 +241,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, UDFSharing value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 UDFSharing read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - UDFSharing 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UDFSharing given an JSON string - * - * @param jsonString JSON string - * @return An instance of UDFSharing - * @throws IOException if the JSON string is invalid with respect to UDFSharing - */ + /** + * Create an instance of UDFSharing given an JSON string + * + * @param jsonString JSON string + * @return An instance of UDFSharing + * @throws IOException if the JSON string is invalid with respect to UDFSharing + */ public static UDFSharing fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UDFSharing.class); } - /** - * Convert an instance of UDFSharing to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UDFSharing to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/UDFSubarray.java b/src/main/java/io/tiledb/cloud/rest_api/model/UDFSubarray.java index 9174fee..77f105c 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/UDFSubarray.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/UDFSubarray.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,76 +11,82 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.Layout; +import org.openapitools.client.model.UDFSubarrayRange; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Subarray bounds to query for a UDF to operate on */ -@ApiModel(description = "Subarray bounds to query for a UDF to operate on") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class UDFSubarray { public static final String SERIALIZED_NAME_LAYOUT = "layout"; @SerializedName(SERIALIZED_NAME_LAYOUT) + @javax.annotation.Nullable private Layout layout; public static final String SERIALIZED_NAME_RANGES = "ranges"; @SerializedName(SERIALIZED_NAME_RANGES) - private List ranges = null; + @javax.annotation.Nullable + private List ranges = new ArrayList<>(); public UDFSubarray() { } - public UDFSubarray layout(Layout layout) { - + public UDFSubarray layout(@javax.annotation.Nullable Layout layout) { this.layout = layout; return this; } - /** + /** * Get layout * @return layout - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Layout getLayout() { return layout; } - - public void setLayout(Layout layout) { + public void setLayout(@javax.annotation.Nullable Layout layout) { this.layout = layout; } - public UDFSubarray ranges(List ranges) { - + public UDFSubarray ranges(@javax.annotation.Nullable List ranges) { this.ranges = ranges; return this; } @@ -93,57 +99,19 @@ public UDFSubarray addRangesItem(UDFSubarrayRange rangesItem) { return this; } - /** + /** * List of ranges, * @return ranges - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "List of ranges,") - public List getRanges() { return ranges; } - - public void setRanges(List ranges) { + public void setRanges(@javax.annotation.Nullable List ranges) { this.ranges = ranges; } - /** - * 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. - */ - public UDFSubarray 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -156,13 +124,12 @@ public boolean equals(Object o) { } UDFSubarray udFSubarray = (UDFSubarray) o; return Objects.equals(this.layout, udFSubarray.layout) && - Objects.equals(this.ranges, udFSubarray.ranges)&& - Objects.equals(this.additionalProperties, udFSubarray.additionalProperties); + Objects.equals(this.ranges, udFSubarray.ranges); } @Override public int hashCode() { - return Objects.hash(layout, ranges, additionalProperties); + return Objects.hash(layout, ranges); } @Override @@ -171,7 +138,6 @@ public String toString() { sb.append("class UDFSubarray {\n"); sb.append(" layout: ").append(toIndentedString(layout)).append("\n"); sb.append(" ranges: ").append(toIndentedString(ranges)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -201,31 +167,44 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UDFSubarray - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (UDFSubarray.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 UDFSubarray + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UDFSubarray.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in UDFSubarray is not found in the empty JSON string", UDFSubarray.openapiRequiredFields.toString())); } } - JsonArray jsonArrayranges = jsonObj.getAsJsonArray("ranges"); - if (jsonArrayranges != null) { - // ensure the json data is an array - if (!jsonObj.get("ranges").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `ranges` to be an array in the JSON string but got `%s`", jsonObj.get("ranges").toString())); - } - // validate the optional field `ranges` (array) - for (int i = 0; i < jsonArrayranges.size(); i++) { - UDFSubarrayRange.validateJsonObject(jsonArrayranges.get(i).getAsJsonObject()); - }; + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UDFSubarray.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UDFSubarray` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `layout` + if (jsonObj.get("layout") != null && !jsonObj.get("layout").isJsonNull()) { + Layout.validateJsonElement(jsonObj.get("layout")); + } + if (jsonObj.get("ranges") != null && !jsonObj.get("ranges").isJsonNull()) { + JsonArray jsonArrayranges = jsonObj.getAsJsonArray("ranges"); + if (jsonArrayranges != null) { + // ensure the json data is an array + if (!jsonObj.get("ranges").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `ranges` to be an array in the JSON string but got `%s`", jsonObj.get("ranges").toString())); + } + + // validate the optional field `ranges` (array) + for (int i = 0; i < jsonArrayranges.size(); i++) { + UDFSubarrayRange.validateJsonElement(jsonArrayranges.get(i)); + }; + } } } @@ -244,71 +223,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, UDFSubarray value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 UDFSubarray read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - UDFSubarray 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UDFSubarray given an JSON string - * - * @param jsonString JSON string - * @return An instance of UDFSubarray - * @throws IOException if the JSON string is invalid with respect to UDFSubarray - */ + /** + * Create an instance of UDFSubarray given an JSON string + * + * @param jsonString JSON string + * @return An instance of UDFSubarray + * @throws IOException if the JSON string is invalid with respect to UDFSubarray + */ public static UDFSubarray fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UDFSubarray.class); } - /** - * Convert an instance of UDFSubarray to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UDFSubarray to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/UDFSubarrayRange.java b/src/main/java/io/tiledb/cloud/rest_api/model/UDFSubarrayRange.java index 06473bf..6033187 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/UDFSubarrayRange.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/UDFSubarrayRange.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,155 +11,120 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.DimensionCoordinate; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * A dimension range to query */ -@ApiModel(description = "A dimension range to query") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class UDFSubarrayRange { public static final String SERIALIZED_NAME_DIMENSION_ID = "dimension_id"; @SerializedName(SERIALIZED_NAME_DIMENSION_ID) + @javax.annotation.Nullable private Integer dimensionId; public static final String SERIALIZED_NAME_RANGE_START = "range_start"; @SerializedName(SERIALIZED_NAME_RANGE_START) + @javax.annotation.Nullable private DimensionCoordinate rangeStart; public static final String SERIALIZED_NAME_RANGE_END = "range_end"; @SerializedName(SERIALIZED_NAME_RANGE_END) + @javax.annotation.Nullable private DimensionCoordinate rangeEnd; public UDFSubarrayRange() { } - public UDFSubarrayRange dimensionId(Integer dimensionId) { - + public UDFSubarrayRange dimensionId(@javax.annotation.Nullable Integer dimensionId) { this.dimensionId = dimensionId; return this; } - /** + /** * The dimension index * @return dimensionId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The dimension index") - public Integer getDimensionId() { return dimensionId; } - - public void setDimensionId(Integer dimensionId) { + public void setDimensionId(@javax.annotation.Nullable Integer dimensionId) { this.dimensionId = dimensionId; } - public UDFSubarrayRange rangeStart(DimensionCoordinate rangeStart) { - + public UDFSubarrayRange rangeStart(@javax.annotation.Nullable DimensionCoordinate rangeStart) { this.rangeStart = rangeStart; return this; } - /** + /** * Get rangeStart * @return rangeStart - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public DimensionCoordinate getRangeStart() { return rangeStart; } - - public void setRangeStart(DimensionCoordinate rangeStart) { + public void setRangeStart(@javax.annotation.Nullable DimensionCoordinate rangeStart) { this.rangeStart = rangeStart; } - public UDFSubarrayRange rangeEnd(DimensionCoordinate rangeEnd) { - + public UDFSubarrayRange rangeEnd(@javax.annotation.Nullable DimensionCoordinate rangeEnd) { this.rangeEnd = rangeEnd; return this; } - /** + /** * Get rangeEnd * @return rangeEnd - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public DimensionCoordinate getRangeEnd() { return rangeEnd; } - - public void setRangeEnd(DimensionCoordinate rangeEnd) { + public void setRangeEnd(@javax.annotation.Nullable DimensionCoordinate rangeEnd) { this.rangeEnd = rangeEnd; } - /** - * 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. - */ - public UDFSubarrayRange 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -173,13 +138,12 @@ public boolean equals(Object o) { UDFSubarrayRange udFSubarrayRange = (UDFSubarrayRange) o; return Objects.equals(this.dimensionId, udFSubarrayRange.dimensionId) && Objects.equals(this.rangeStart, udFSubarrayRange.rangeStart) && - Objects.equals(this.rangeEnd, udFSubarrayRange.rangeEnd)&& - Objects.equals(this.additionalProperties, udFSubarrayRange.additionalProperties); + Objects.equals(this.rangeEnd, udFSubarrayRange.rangeEnd); } @Override public int hashCode() { - return Objects.hash(dimensionId, rangeStart, rangeEnd, additionalProperties); + return Objects.hash(dimensionId, rangeStart, rangeEnd); } @Override @@ -189,7 +153,6 @@ public String toString() { sb.append(" dimensionId: ").append(toIndentedString(dimensionId)).append("\n"); sb.append(" rangeStart: ").append(toIndentedString(rangeStart)).append("\n"); sb.append(" rangeEnd: ").append(toIndentedString(rangeEnd)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -220,27 +183,34 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UDFSubarrayRange - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (UDFSubarrayRange.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 UDFSubarrayRange + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UDFSubarrayRange.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in UDFSubarrayRange is not found in the empty JSON string", UDFSubarrayRange.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UDFSubarrayRange.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UDFSubarrayRange` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `range_start` if (jsonObj.get("range_start") != null && !jsonObj.get("range_start").isJsonNull()) { - DimensionCoordinate.validateJsonObject(jsonObj.getAsJsonObject("range_start")); + DimensionCoordinate.validateJsonElement(jsonObj.get("range_start")); } // validate the optional field `range_end` if (jsonObj.get("range_end") != null && !jsonObj.get("range_end").isJsonNull()) { - DimensionCoordinate.validateJsonObject(jsonObj.getAsJsonObject("range_end")); + DimensionCoordinate.validateJsonElement(jsonObj.get("range_end")); } } @@ -259,71 +229,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, UDFSubarrayRange value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 UDFSubarrayRange read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - UDFSubarrayRange 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UDFSubarrayRange given an JSON string - * - * @param jsonString JSON string - * @return An instance of UDFSubarrayRange - * @throws IOException if the JSON string is invalid with respect to UDFSubarrayRange - */ + /** + * Create an instance of UDFSubarrayRange given an JSON string + * + * @param jsonString JSON string + * @return An instance of UDFSubarrayRange + * @throws IOException if the JSON string is invalid with respect to UDFSubarrayRange + */ public static UDFSubarrayRange fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UDFSubarrayRange.class); } - /** - * Convert an instance of UDFSubarrayRange to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UDFSubarrayRange to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/UDFType.java b/src/main/java/io/tiledb/cloud/rest_api/model/UDFType.java index c4892b1..ddd9930 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/UDFType.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/UDFType.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,14 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; + +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; @@ -67,5 +71,10 @@ public UDFType read(final JsonReader jsonReader) throws IOException { return UDFType.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + UDFType.fromValue(value); + } } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/User.java b/src/main/java/io/tiledb/cloud/rest_api/model/User.java index eab02ed..208dc68 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/User.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/User.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,117 +11,149 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; 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 io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; - -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.model.AssetLocations; +import org.openapitools.client.model.NamespaceActions; +import org.openapitools.client.model.OrganizationUser; import org.openapitools.jackson.nullable.JsonNullable; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; + +import org.openapitools.client.JSON; /** * User */ -@ApiModel(description = "User") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class User { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private String id; public static final String SERIALIZED_NAME_USERNAME = "username"; @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nonnull private String username; public static final String SERIALIZED_NAME_PASSWORD = "password"; @SerializedName(SERIALIZED_NAME_PASSWORD) + @javax.annotation.Nullable private String password; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_EMAIL = "email"; @SerializedName(SERIALIZED_NAME_EMAIL) + @javax.annotation.Nullable private String email; public static final String SERIALIZED_NAME_IS_VALID_EMAIL = "is_valid_email"; @SerializedName(SERIALIZED_NAME_IS_VALID_EMAIL) + @javax.annotation.Nullable private Boolean isValidEmail; public static final String SERIALIZED_NAME_STRIPE_CONNECT = "stripe_connect"; @SerializedName(SERIALIZED_NAME_STRIPE_CONNECT) + @javax.annotation.Nullable private Boolean stripeConnect; public static final String SERIALIZED_NAME_COMPANY = "company"; @SerializedName(SERIALIZED_NAME_COMPANY) + @javax.annotation.Nullable private String company; public static final String SERIALIZED_NAME_LOGO = "logo"; @SerializedName(SERIALIZED_NAME_LOGO) + @javax.annotation.Nullable private String logo; public static final String SERIALIZED_NAME_TIMEZONE = "timezone"; @SerializedName(SERIALIZED_NAME_TIMEZONE) + @javax.annotation.Nullable private String timezone; public static final String SERIALIZED_NAME_ORGANIZATIONS = "organizations"; @SerializedName(SERIALIZED_NAME_ORGANIZATIONS) - private List organizations = null; + @javax.annotation.Nullable + private List organizations = new ArrayList<>(); public static final String SERIALIZED_NAME_ALLOWED_ACTIONS = "allowed_actions"; @SerializedName(SERIALIZED_NAME_ALLOWED_ACTIONS) - private List allowedActions = null; + @javax.annotation.Nullable + private List allowedActions = new ArrayList<>(); public static final String SERIALIZED_NAME_ENABLED_FEATURES = "enabled_features"; @SerializedName(SERIALIZED_NAME_ENABLED_FEATURES) - private List enabledFeatures = null; + @javax.annotation.Nullable + private List enabledFeatures = new ArrayList<>(); public static final String SERIALIZED_NAME_UNPAID_SUBSCRIPTION = "unpaid_subscription"; @SerializedName(SERIALIZED_NAME_UNPAID_SUBSCRIPTION) + @javax.annotation.Nullable private Boolean unpaidSubscription; public static final String SERIALIZED_NAME_DEFAULT_S3_PATH = "default_s3_path"; @SerializedName(SERIALIZED_NAME_DEFAULT_S3_PATH) + @javax.annotation.Nullable private String defaultS3Path; public static final String SERIALIZED_NAME_DEFAULT_S3_PATH_CREDENTIALS_NAME = "default_s3_path_credentials_name"; @SerializedName(SERIALIZED_NAME_DEFAULT_S3_PATH_CREDENTIALS_NAME) + @javax.annotation.Nullable private Object defaultS3PathCredentialsName; public static final String SERIALIZED_NAME_ASSET_LOCATIONS = "asset_locations"; @SerializedName(SERIALIZED_NAME_ASSET_LOCATIONS) + @javax.annotation.Nullable private AssetLocations assetLocations; public static final String SERIALIZED_NAME_DEFAULT_NAMESPACE_CHARGED = "default_namespace_charged"; @SerializedName(SERIALIZED_NAME_DEFAULT_NAMESPACE_CHARGED) + @javax.annotation.Nullable private String defaultNamespaceCharged; + public static final String SERIALIZED_NAME_DEFAULT_REGION = "default_region"; + @SerializedName(SERIALIZED_NAME_DEFAULT_REGION) + @javax.annotation.Nullable + private String defaultRegion; + public User() { } - public User( Boolean isValidEmail, Boolean stripeConnect, @@ -137,234 +169,192 @@ public User( this.unpaidSubscription = unpaidSubscription; } - public User id(String id) { - + public User id(@javax.annotation.Nullable String id) { this.id = id; return this; } - /** + /** * unique ID of user * @return id - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", value = "unique ID of user") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nullable String id) { this.id = id; } - public User username(String username) { - + public User username(@javax.annotation.Nonnull String username) { this.username = username; return this; } - /** + /** * username must be unique * @return username - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "username", required = true, value = "username must be unique") - public String getUsername() { return username; } - - public void setUsername(String username) { + public void setUsername(@javax.annotation.Nonnull String username) { this.username = username; } - public User password(String password) { - + public User password(@javax.annotation.Nullable String password) { this.password = password; return this; } - /** + /** * password * @return password - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "password", value = "password") - public String getPassword() { return password; } - - public void setPassword(String password) { + public void setPassword(@javax.annotation.Nullable String password) { this.password = password; } - public User name(String name) { - + public User name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * the user's full, real name * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "Jane Doe", value = "the user's full, real name") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public User email(String email) { - + public User email(@javax.annotation.Nullable String email) { this.email = email; return this; } - /** + /** * the user's email * @return email - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "jane.doe@example.com", value = "the user's email") - public String getEmail() { return email; } - - public void setEmail(String email) { + public void setEmail(@javax.annotation.Nullable String email) { this.email = email; } - /** + /** * user's email is validated to be correct * @return isValidEmail - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "false", value = "user's email is validated to be correct") - public Boolean getIsValidEmail() { return isValidEmail; } - - /** + /** * Denotes that the user is able to apply pricing to arrays by means of Stripe Connect * @return stripeConnect - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "false", value = "Denotes that the user is able to apply pricing to arrays by means of Stripe Connect") - public Boolean getStripeConnect() { return stripeConnect; } - - public User company(String company) { - + public User company(@javax.annotation.Nullable String company) { this.company = company; return this; } - /** + /** * the user's company * @return company - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "TileDB", value = "the user's company") - public String getCompany() { return company; } - - public void setCompany(String company) { + public void setCompany(@javax.annotation.Nullable String company) { this.company = company; } - public User logo(String logo) { - + public User logo(@javax.annotation.Nullable String logo) { this.logo = logo; return this; } - /** + /** * the user's logo * @return logo - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "the user's logo") - public String getLogo() { return logo; } - - public void setLogo(String logo) { + public void setLogo(@javax.annotation.Nullable String logo) { this.logo = logo; } - public User timezone(String timezone) { - + public User timezone(@javax.annotation.Nullable String timezone) { this.timezone = timezone; return this; } - /** + /** * Get timezone * @return timezone - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "Europe/Athens", value = "") - public String getTimezone() { return timezone; } - - public void setTimezone(String timezone) { + public void setTimezone(@javax.annotation.Nullable String timezone) { this.timezone = timezone; } - /** + /** * Array of organizations a user is part of and their roles * @return organizations - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Array of organizations a user is part of and their roles") - public List getOrganizations() { return organizations; } - - public User allowedActions(List allowedActions) { - + public User allowedActions(@javax.annotation.Nullable List allowedActions) { this.allowedActions = allowedActions; return this; } @@ -377,179 +367,138 @@ public User addAllowedActionsItem(NamespaceActions allowedActionsItem) { return this; } - /** + /** * list of actions user is allowed to do on this organization * @return allowedActions - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "list of actions user is allowed to do on this organization") - public List getAllowedActions() { return allowedActions; } - - public void setAllowedActions(List allowedActions) { + public void setAllowedActions(@javax.annotation.Nullable List allowedActions) { this.allowedActions = allowedActions; } - /** + /** * List of extra/optional/beta features to enable for namespace * @return enabledFeatures - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "List of extra/optional/beta features to enable for namespace") - public List getEnabledFeatures() { return enabledFeatures; } - - /** + /** * A notice that the user has an unpaid subscription * @return unpaidSubscription - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "A notice that the user has an unpaid subscription") - public Boolean getUnpaidSubscription() { return unpaidSubscription; } - - public User defaultS3Path(String defaultS3Path) { - + public User defaultS3Path(@javax.annotation.Nullable String defaultS3Path) { this.defaultS3Path = defaultS3Path; return this; } - /** + /** * The default location to store newly-created notebooks and other assets like UDFs. The name `default_s3_path` is a legacy holdover; it may refer to any supported storage location. * @return defaultS3Path - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The default location to store newly-created notebooks and other assets like UDFs. The name `default_s3_path` is a legacy holdover; it may refer to any supported storage location. ") - public String getDefaultS3Path() { return defaultS3Path; } - - public void setDefaultS3Path(String defaultS3Path) { + public void setDefaultS3Path(@javax.annotation.Nullable String defaultS3Path) { this.defaultS3Path = defaultS3Path; } - public User defaultS3PathCredentialsName(Object defaultS3PathCredentialsName) { - + public User defaultS3PathCredentialsName(@javax.annotation.Nullable Object defaultS3PathCredentialsName) { this.defaultS3PathCredentialsName = defaultS3PathCredentialsName; return this; } - /** + /** * The name of the credentials used to create and access files in the `default_s3_path`, if needed. * @return defaultS3PathCredentialsName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The name of the credentials used to create and access files in the `default_s3_path`, if needed. ") - public Object getDefaultS3PathCredentialsName() { return defaultS3PathCredentialsName; } - - public void setDefaultS3PathCredentialsName(Object defaultS3PathCredentialsName) { + public void setDefaultS3PathCredentialsName(@javax.annotation.Nullable Object defaultS3PathCredentialsName) { this.defaultS3PathCredentialsName = defaultS3PathCredentialsName; } - public User assetLocations(AssetLocations assetLocations) { - + public User assetLocations(@javax.annotation.Nullable AssetLocations assetLocations) { this.assetLocations = assetLocations; return this; } - /** + /** * Get assetLocations * @return assetLocations - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public AssetLocations getAssetLocations() { return assetLocations; } - - public void setAssetLocations(AssetLocations assetLocations) { + public void setAssetLocations(@javax.annotation.Nullable AssetLocations assetLocations) { this.assetLocations = assetLocations; } - public User defaultNamespaceCharged(String defaultNamespaceCharged) { - + public User defaultNamespaceCharged(@javax.annotation.Nullable String defaultNamespaceCharged) { this.defaultNamespaceCharged = defaultNamespaceCharged; return this; } - /** + /** * Override the default namespace charged for actions when no namespace is specified * @return defaultNamespaceCharged - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Override the default namespace charged for actions when no namespace is specified") - public String getDefaultNamespaceCharged() { return defaultNamespaceCharged; } - - public void setDefaultNamespaceCharged(String defaultNamespaceCharged) { + public void setDefaultNamespaceCharged(@javax.annotation.Nullable String defaultNamespaceCharged) { this.defaultNamespaceCharged = defaultNamespaceCharged; } - /** - * 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. - */ - public User putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); + public User defaultRegion(@javax.annotation.Nullable String defaultRegion) { + this.defaultRegion = defaultRegion; return this; } /** - * Return the additional (undeclared) property. + * The default region to use for notebooks and other operations. It must be a region supported by TileDB, see https://docs.tiledb.com/cloud/concepts/tiledb-cloud-internals/architecture#orchestration + * @return defaultRegion */ - public Map getAdditionalProperties() { - return additionalProperties; + @javax.annotation.Nullable + public String getDefaultRegion() { + return defaultRegion; } - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); + public void setDefaultRegion(@javax.annotation.Nullable String defaultRegion) { + this.defaultRegion = defaultRegion; } + @Override public boolean equals(Object o) { if (this == o) { @@ -576,8 +525,8 @@ public boolean equals(Object o) { Objects.equals(this.defaultS3Path, user.defaultS3Path) && Objects.equals(this.defaultS3PathCredentialsName, user.defaultS3PathCredentialsName) && Objects.equals(this.assetLocations, user.assetLocations) && - Objects.equals(this.defaultNamespaceCharged, user.defaultNamespaceCharged)&& - Objects.equals(this.additionalProperties, user.additionalProperties); + Objects.equals(this.defaultNamespaceCharged, user.defaultNamespaceCharged) && + Objects.equals(this.defaultRegion, user.defaultRegion); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -586,7 +535,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, username, password, name, email, isValidEmail, stripeConnect, company, logo, timezone, organizations, allowedActions, enabledFeatures, unpaidSubscription, defaultS3Path, defaultS3PathCredentialsName, assetLocations, defaultNamespaceCharged, additionalProperties); + return Objects.hash(id, username, password, name, email, isValidEmail, stripeConnect, company, logo, timezone, organizations, allowedActions, enabledFeatures, unpaidSubscription, defaultS3Path, defaultS3PathCredentialsName, assetLocations, defaultNamespaceCharged, defaultRegion); } private static int hashCodeNullable(JsonNullable a) { @@ -618,7 +567,7 @@ public String toString() { sb.append(" defaultS3PathCredentialsName: ").append(toIndentedString(defaultS3PathCredentialsName)).append("\n"); sb.append(" assetLocations: ").append(toIndentedString(assetLocations)).append("\n"); sb.append(" defaultNamespaceCharged: ").append(toIndentedString(defaultNamespaceCharged)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append(" defaultRegion: ").append(toIndentedString(defaultRegion)).append("\n"); sb.append("}"); return sb.toString(); } @@ -659,37 +608,45 @@ private String toIndentedString(Object o) { openapiFields.add("default_s3_path_credentials_name"); openapiFields.add("asset_locations"); openapiFields.add("default_namespace_charged"); + openapiFields.add("default_region"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("username"); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to User - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (User.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 User + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!User.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in User is not found in the empty JSON string", User.openapiRequiredFields.toString())); } } + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!User.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `User` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + // check to make sure all required properties/fields are present in the JSON string for (String requiredField : User.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + 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") != null && !jsonObj.get("id").isJsonNull()) && !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())); } - if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { + if (!jsonObj.get("username").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { @@ -710,24 +667,26 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("timezone") != null && !jsonObj.get("timezone").isJsonNull()) && !jsonObj.get("timezone").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `timezone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("timezone").toString())); } - JsonArray jsonArrayorganizations = jsonObj.getAsJsonArray("organizations"); - if (jsonArrayorganizations != null) { - // ensure the json data is an array - if (!jsonObj.get("organizations").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `organizations` to be an array in the JSON string but got `%s`", jsonObj.get("organizations").toString())); + if (jsonObj.get("organizations") != null && !jsonObj.get("organizations").isJsonNull()) { + JsonArray jsonArrayorganizations = jsonObj.getAsJsonArray("organizations"); + if (jsonArrayorganizations != null) { + // ensure the json data is an array + if (!jsonObj.get("organizations").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `organizations` to be an array in the JSON string but got `%s`", jsonObj.get("organizations").toString())); + } + + // validate the optional field `organizations` (array) + for (int i = 0; i < jsonArrayorganizations.size(); i++) { + OrganizationUser.validateJsonElement(jsonArrayorganizations.get(i)); + }; } - - // validate the optional field `organizations` (array) - for (int i = 0; i < jsonArrayorganizations.size(); i++) { - OrganizationUser.validateJsonObject(jsonArrayorganizations.get(i).getAsJsonObject()); - }; } - // ensure the json data is an array - if ((jsonObj.get("allowed_actions") != null && !jsonObj.get("allowed_actions").isJsonNull()) && !jsonObj.get("allowed_actions").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("allowed_actions") != null && !jsonObj.get("allowed_actions").isJsonNull() && !jsonObj.get("allowed_actions").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `allowed_actions` to be an array in the JSON string but got `%s`", jsonObj.get("allowed_actions").toString())); } - // ensure the json data is an array - if ((jsonObj.get("enabled_features") != null && !jsonObj.get("enabled_features").isJsonNull()) && !jsonObj.get("enabled_features").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("enabled_features") != null && !jsonObj.get("enabled_features").isJsonNull() && !jsonObj.get("enabled_features").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `enabled_features` to be an array in the JSON string but got `%s`", jsonObj.get("enabled_features").toString())); } if ((jsonObj.get("default_s3_path") != null && !jsonObj.get("default_s3_path").isJsonNull()) && !jsonObj.get("default_s3_path").isJsonPrimitive()) { @@ -735,11 +694,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `asset_locations` if (jsonObj.get("asset_locations") != null && !jsonObj.get("asset_locations").isJsonNull()) { - AssetLocations.validateJsonObject(jsonObj.getAsJsonObject("asset_locations")); + AssetLocations.validateJsonElement(jsonObj.get("asset_locations")); } if ((jsonObj.get("default_namespace_charged") != null && !jsonObj.get("default_namespace_charged").isJsonNull()) && !jsonObj.get("default_namespace_charged").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `default_namespace_charged` to be a primitive type in the JSON string but got `%s`", jsonObj.get("default_namespace_charged").toString())); } + if ((jsonObj.get("default_region") != null && !jsonObj.get("default_region").isJsonNull()) && !jsonObj.get("default_region").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `default_region` to be a primitive type in the JSON string but got `%s`", jsonObj.get("default_region").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -757,71 +719,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, User value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 User read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - User 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of User given an JSON string - * - * @param jsonString JSON string - * @return An instance of User - * @throws IOException if the JSON string is invalid with respect to User - */ + /** + * Create an instance of User given an JSON string + * + * @param jsonString JSON string + * @return An instance of User + * @throws IOException if the JSON string is invalid with respect to User + */ public static User fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, User.class); } - /** - * Convert an instance of User to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of User to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/tiledb/cloud/rest_api/model/Writer.java b/src/main/java/io/tiledb/cloud/rest_api/model/Writer.java index e752eb3..5058dd9 100644 --- a/src/main/java/io/tiledb/cloud/rest_api/model/Writer.java +++ b/src/main/java/io/tiledb/cloud/rest_api/model/Writer.java @@ -2,7 +2,7 @@ * TileDB Storage Platform API * TileDB Storage Platform REST API * - * The version of the OpenAPI document: 2.2.19 + * The version of the OpenAPI document: 2.17.51 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,180 +11,144 @@ */ -package io.tiledb.cloud.rest_api.model; +package org.openapitools.client.model; 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 io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; +import org.openapitools.client.model.DomainArray; 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.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; +import java.util.Set; -import io.tiledb.cloud.rest_api.JSON; +import org.openapitools.client.JSON; /** * Writer */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-02T12:25:58.319138+03:00[Europe/Athens]") - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-21T11:51:21.275554462Z[Etc/UTC]", comments = "Generator version: 7.12.0-SNAPSHOT") public class Writer { public static final String SERIALIZED_NAME_CHECK_COORD_DUPS = "checkCoordDups"; @SerializedName(SERIALIZED_NAME_CHECK_COORD_DUPS) + @javax.annotation.Nullable private Boolean checkCoordDups; public static final String SERIALIZED_NAME_CHECK_COORD_O_O_B = "checkCoordOOB"; @SerializedName(SERIALIZED_NAME_CHECK_COORD_O_O_B) + @javax.annotation.Nullable private Boolean checkCoordOOB; public static final String SERIALIZED_NAME_DEDUP_COORDS = "dedupCoords"; @SerializedName(SERIALIZED_NAME_DEDUP_COORDS) + @javax.annotation.Nullable private Boolean dedupCoords; public static final String SERIALIZED_NAME_SUBARRAY = "subarray"; @SerializedName(SERIALIZED_NAME_SUBARRAY) + @javax.annotation.Nullable private DomainArray subarray; public Writer() { } - public Writer checkCoordDups(Boolean checkCoordDups) { - + public Writer checkCoordDups(@javax.annotation.Nullable Boolean checkCoordDups) { this.checkCoordDups = checkCoordDups; return this; } - /** + /** * Get checkCoordDups * @return checkCoordDups - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getCheckCoordDups() { return checkCoordDups; } - - public void setCheckCoordDups(Boolean checkCoordDups) { + public void setCheckCoordDups(@javax.annotation.Nullable Boolean checkCoordDups) { this.checkCoordDups = checkCoordDups; } - public Writer checkCoordOOB(Boolean checkCoordOOB) { - + public Writer checkCoordOOB(@javax.annotation.Nullable Boolean checkCoordOOB) { this.checkCoordOOB = checkCoordOOB; return this; } - /** + /** * Get checkCoordOOB * @return checkCoordOOB - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getCheckCoordOOB() { return checkCoordOOB; } - - public void setCheckCoordOOB(Boolean checkCoordOOB) { + public void setCheckCoordOOB(@javax.annotation.Nullable Boolean checkCoordOOB) { this.checkCoordOOB = checkCoordOOB; } - public Writer dedupCoords(Boolean dedupCoords) { - + public Writer dedupCoords(@javax.annotation.Nullable Boolean dedupCoords) { this.dedupCoords = dedupCoords; return this; } - /** + /** * Get dedupCoords * @return dedupCoords - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getDedupCoords() { return dedupCoords; } - - public void setDedupCoords(Boolean dedupCoords) { + public void setDedupCoords(@javax.annotation.Nullable Boolean dedupCoords) { this.dedupCoords = dedupCoords; } - public Writer subarray(DomainArray subarray) { - + public Writer subarray(@javax.annotation.Nullable DomainArray subarray) { this.subarray = subarray; return this; } - /** + /** * Get subarray * @return subarray - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public DomainArray getSubarray() { return subarray; } - - public void setSubarray(DomainArray subarray) { + public void setSubarray(@javax.annotation.Nullable DomainArray subarray) { this.subarray = subarray; } - /** - * 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. - */ - public Writer 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. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } @Override @@ -199,13 +163,12 @@ public boolean equals(Object o) { return Objects.equals(this.checkCoordDups, writer.checkCoordDups) && Objects.equals(this.checkCoordOOB, writer.checkCoordOOB) && Objects.equals(this.dedupCoords, writer.dedupCoords) && - Objects.equals(this.subarray, writer.subarray)&& - Objects.equals(this.additionalProperties, writer.additionalProperties); + Objects.equals(this.subarray, writer.subarray); } @Override public int hashCode() { - return Objects.hash(checkCoordDups, checkCoordOOB, dedupCoords, subarray, additionalProperties); + return Objects.hash(checkCoordDups, checkCoordOOB, dedupCoords, subarray); } @Override @@ -216,7 +179,6 @@ public String toString() { sb.append(" checkCoordOOB: ").append(toIndentedString(checkCoordOOB)).append("\n"); sb.append(" dedupCoords: ").append(toIndentedString(dedupCoords)).append("\n"); sb.append(" subarray: ").append(toIndentedString(subarray)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); } @@ -248,23 +210,30 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Writer - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (Writer.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields + /** + * 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 Writer + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Writer.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in Writer is not found in the empty JSON string", Writer.openapiRequiredFields.toString())); } } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Writer.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Writer` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `subarray` if (jsonObj.get("subarray") != null && !jsonObj.get("subarray").isJsonNull()) { - DomainArray.validateJsonObject(jsonObj.getAsJsonObject("subarray")); + DomainArray.validateJsonElement(jsonObj.get("subarray")); } } @@ -283,71 +252,36 @@ public TypeAdapter create(Gson gson, TypeToken type) { @Override public void write(JsonWriter out, Writer value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal 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 Writer read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - Writer 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 { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Writer given an JSON string - * - * @param jsonString JSON string - * @return An instance of Writer - * @throws IOException if the JSON string is invalid with respect to Writer - */ + /** + * Create an instance of Writer given an JSON string + * + * @param jsonString JSON string + * @return An instance of Writer + * @throws IOException if the JSON string is invalid with respect to Writer + */ public static Writer fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Writer.class); } - /** - * Convert an instance of Writer to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Writer to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); }
Response Details
Status Code Description Response Headers
204 user update in organization successfully -
502 Bad Gateway -